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 |
---|---|---|---|---|---|---|
Display a listing of the resource. | public function index()
{
$categories = Category::all();
$optionGroups = OptionGroup::all();
$subcategories = (new Category)->getSubcategories();
$orders = Order::limit(15)->orderBy('created_at', 'desc')->get();
if (request()->wantsJson()) {
return response($orders, 200);
}
return view(
'admin.restaurantindex',
compact('optionGroups', 'categories', 'subcategories')
);
} | {
"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 |
Display the specified resource. | public function show()
{
$orders = new Order();
$yearlyTotal = $orders->yearlyTotal();
$totalOrders = $orders->totalOrders();
$taxcollection = $orders->taxCollection();
$totalOrdersYearBefore = $orders->totalOrdersYearBefore();
$taxcollectionYearBefore = $orders->taxCollectionYearBefore();
$averageOrder = $orders->averageOrder();
return view(
'admin.panel',
compact(
'yearlyTotal',
'totalOrders',
'taxcollection',
'totalOrdersYearBefore',
'taxcollectionYearBefore',
'averageOrder'
)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Register any application services. | public function register()
{
// Service
$this->app->bind('UserService', UserService::class);
// Repository
$this->app->bind(UserRepositoryInterface::class, UserRepository::class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function register()\n {\n $this->registerServices();\n }",
"public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }",
"public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }",
"public function register()\n { \n // User Repository\n $this->app->bind('App\\Contracts\\Repository\\User', 'App\\Repositories\\User');\n \n // JWT Token Repository\n $this->app->bind('App\\Contracts\\Repository\\JSONWebToken', 'App\\Repositories\\JSONWebToken');\n \n $this->registerClearSettleApiLogin();\n \n $this->registerClearSettleApiClients();\n \n \n }",
"public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }",
"public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }",
"public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }",
"public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }",
"public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }",
"public function register()\n {\n $this->registerRepositories();\n }",
"public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }",
"public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }",
"public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }",
"public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }",
"public function register()\n {\n $this->registerGraphQL();\n\n $this->registerConsole();\n }",
"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }",
"public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/telescope-error-service-client.php', 'telescope-error-service-client'\n );\n\n $this->registerStorageDriver();\n\n $this->commands([\n Console\\InstallCommand::class,\n Console\\PublishCommand::class,\n ]);\n }",
"public function register()\n\t{\n\t\t$this->registerPasswordBroker();\n\n\t\t$this->registerTokenRepository();\n\t}",
"public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }",
"public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }",
"public function register()\n {\n // $this->app->make('CheckStructureService');\n }",
"public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}",
"public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }",
"public function register()\n {\n $this->registerInertia();\n $this->registerLengthAwarePaginator();\n }",
"public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }",
"public function register()\n {\n $this->app->bind(\n 'Toyopecas\\Repositories\\TopoRepository',\n 'Toyopecas\\Repositories\\TopoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ServicesRepository',\n 'Toyopecas\\Repositories\\ServicesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\SobreRepository',\n 'Toyopecas\\Repositories\\SobreRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ProdutosRepository',\n 'Toyopecas\\Repositories\\ProdutosRepositoryEloquent'\n );\n }",
"public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }",
"public function register()\n {\n $this->registerRepositories();\n\n $this->pushMiddleware();\n }",
"public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel-base.php', 'laravel-base');\r\n\r\n $this->app->bind(UuidGenerator::class, UuidGeneratorService::class);\r\n\r\n }",
"public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }",
"public function register()\n {\n $this->app->bind(\n 'Uhmane\\Repositories\\ContatosRepository', \n 'Uhmane\\Repositories\\ContatosRepositoryEloquent'\n );\n }",
"public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }",
"public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }",
"public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }",
"public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }",
"public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }",
"public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }",
"public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\UsersInterface',\n 'App\\Services\\UsersService'\n );\n $this->app->bind(\n 'App\\Contracts\\CallsInterface',\n 'App\\Services\\CallsService'\n );\n $this->app->bind(\n 'App\\Contracts\\ContactsInterface',\n 'App\\Services\\ContactsService'\n );\n $this->app->bind(\n 'App\\Contracts\\EmailsInterface',\n 'App\\Services\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PhoneNumbersInterface',\n 'App\\Services\\PhoneNumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\NumbersInterface',\n 'App\\Services\\NumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserNumbersInterface',\n 'App\\Services\\UserNumbersService'\n );\n }",
"public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }",
"public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }",
"public function register()\n {\n $this->registerFriendsLog();\n $this->registerNotifications();\n $this->registerAPI();\n $this->registerMailChimpIntegration();\n }",
"public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/awesio-auth.php', 'awesio-auth');\n\n $this->app->singleton(AuthContract::class, Auth::class);\n\n $this->registerRepositories();\n\n $this->registerServices();\n\n $this->registerHelpers();\n }",
"public function register()\n {\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerArtisanCommands();\n }",
"public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/services.php', 'services'\n );\n }",
"public function register()\n {\n $this->registerRateLimiting();\n\n $this->registerHttpValidation();\n\n $this->registerHttpParsers();\n\n $this->registerResponseFactory();\n\n $this->registerMiddleware();\n }",
"public function register()\n {\n $this->registerConfig();\n $this->registerView();\n $this->registerMessage();\n $this->registerMenu();\n $this->registerOutput();\n $this->registerCommands();\n require __DIR__ . '/Service/ServiceProvider.php';\n require __DIR__ . '/Service/RegisterRepoInterface.php';\n require __DIR__ . '/Service/ErrorHandling.php';\n $this->registerExportDompdf();\n $this->registerExtjs();\n }",
"public function register()\n {\n $this->registerRepository();\n $this->registerParser();\n }",
"public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }",
"public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }",
"public function register()\n {\n $this->registerGuard();\n $this->registerBladeDirectives();\n }",
"public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }",
"public function register()\n {\n $this->app->bind(ReviewService::class, function ($app) {\n return new ReviewService();\n });\n }",
"public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }",
"public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }",
"public function register()\n {\n $this->app->bind('gameService', 'App\\Service\\GameService');\n }",
"public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }",
"public function register()\n {\n $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function($app){\n return new ElasticsearchNedvizhimostsObserver(new Client());\n });\n\n // $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function()\n // {\n // return new ElasticsearchNedvizhimostsObserver(new Client());\n // });\n }",
"public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }",
"public function register()\n {\n $this->registerGeography();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n\n $this->countriesCache();\n }",
"public function register()\n {\n $this->app->bind(CertificationService::class, function($app){\n return new CertificationService();\n });\n }",
"public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}",
"public function register()\n {\n $this->registerRollbar();\n }",
"public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }",
"public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }",
"public function register()\n {\n $this->registerDomainLocalization();\n $this->registerDomainLocaleFilter();\n }",
"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }",
"public function register()\n {\n $this->registerUserProvider();\n $this->registerGroupProvider();\n $this->registerNeo();\n\n $this->registerCommands();\n\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Neo', 'Wetcat\\Neo\\Facades\\Neo');\n });\n }",
"public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CompanyInterface', \n 'App\\Repositories\\CompanyRepo'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\UtilityInterface', \n 'App\\Repositories\\UtilityRepo'\n );\n }",
"public function register()\n {\n $this->registerPayment();\n\n $this->app->alias('image', 'App\\Framework\\Image\\ImageService');\n }",
"public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }",
"public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n App::bind('App\\Repositories\\ReserveProductRepositoryInterface','App\\Repositories\\ReserveProductRepository');\n App::bind('App\\Repositories\\Product_reserveRepositoryInterface','App\\Repositories\\Product_reserveRepository');\n App::bind('App\\Repositories\\Ordering_productRepositoryInterface','App\\Repositories\\Ordering_productRepository');\n App::bind('App\\Repositories\\OrderingRepositoryInterface','App\\Repositories\\OrderingRepository');\n App::bind('App\\Repositories\\UserUpdateSlipRepositoryInterface','App\\Repositories\\UserUpdateSlipRepository');\n }",
"public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n }",
"public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }",
"public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }",
"public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }",
"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }",
"public function register()\n {\n\n $config = $this->app['config']['cors'];\n\n $this->app->bind('Yocome\\Cors\\CorsService', function() use ($config){\n return new CorsService($config);\n });\n\n }",
"public function register()\n {\n // Bind facade\n\n $this->registerRepositoryBibdings();\n $this->registerFacades();\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(\\Laravel\\Socialite\\SocialiteServiceProvider::class);\n }",
"public function register()\n {\n\n\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\UserRepository',\n 'Onlinecorrection\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ClientRepository',\n 'Onlinecorrection\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ProjectRepository',\n 'Onlinecorrection\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentRepository',\n 'Onlinecorrection\\Repositories\\DocumentRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderRepository',\n 'Onlinecorrection\\Repositories\\OrderRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderItemRepository',\n 'Onlinecorrection\\Repositories\\OrderItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentImageRepository',\n 'Onlinecorrection\\Repositories\\DocumentImageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\PackageRepository',\n 'Onlinecorrection\\Repositories\\PackageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\StatusRepository',\n 'Onlinecorrection\\Repositories\\StatusRepositoryEloquent'\n );\n\n }",
"public function register()\n {\n $this->registerConfig();\n\n $this->registerDataStore();\n\n $this->registerStorageFactory();\n\n $this->registerStorageManager();\n\n $this->registerSimplePhoto();\n }",
"public function register()\n {\n // Default configuration file\n $this->mergeConfigFrom(\n __DIR__.'/Config/auzo_tools.php', 'auzoTools'\n );\n\n $this->registerModelBindings();\n $this->registerFacadesAliases();\n }",
"public function register()\n {\n $this->app->bind(\\Cookiesoft\\Repositories\\CategoryRepository::class, \\Cookiesoft\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\BillpayRepository::class, \\Cookiesoft\\Repositories\\BillpayRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\UserRepository::class, \\Cookiesoft\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }",
"public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(\n config('settings.authentication_services'),\n $app['Laravel\\Socialite\\Contracts\\Factory'],\n $app['Illuminate\\Contracts\\Auth\\Factory']\n );\n });\n\n $this->app->singleton(ImageValidator::class, function ($app) {\n return new ImageValidator(\n config('settings.image.max_filesize'),\n config('settings.image.mime_types'),\n $app['Intervention\\Image\\ImageManager']\n );\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(\n config('settings.image.max_width'),\n config('settings.image.max_height'),\n config('settings.image.folder')\n );\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService(\n $app['App\\Repositories\\WordRepository'],\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.number_of_words_to_remember')\n );\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService(\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.min_number_of_chars_per_one_mistake')\n );\n });\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }",
"public function register()\n {\n $this->registerJWT();\n $this->registerJWSProxy();\n $this->registerJWTAlgoFactory();\n $this->registerPayload();\n $this->registerPayloadValidator();\n $this->registerPayloadUtilities();\n\n // use this if your package has a config file\n // config([\n // 'config/JWT.php',\n // ]);\n }",
"public function register()\n {\n $this->registerManager();\n $this->registerConnection();\n $this->registerWorker();\n $this->registerListener();\n $this->registerFailedJobServices();\n $this->registerOpisSecurityKey();\n }",
"public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }",
"public function register()\n {\n $this->app->bind('App\\Services\\TripService.php', function ($app) {\n return new TripService();\n });\n }",
"public function register()\n {\n $this->registerUserComponent();\n $this->registerLocationComponent();\n\n }",
"public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }",
"public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\n }",
"public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }",
"public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }",
"public function register()\n {\n\n\n\n $this->mergeConfigFrom(__DIR__ . '/../config/counter.php', 'counter');\n\n $this->app->register(RouteServiceProvider::class);\n\n\n }",
"public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__.'/../config/colissimo.php', 'colissimo');\r\n $this->mergeConfigFrom(__DIR__.'/../config/rules.php', 'colissimo.rules');\r\n $this->mergeConfigFrom(__DIR__.'/../config/prices.php', 'colissimo.prices');\r\n $this->mergeConfigFrom(__DIR__.'/../config/zones.php', 'colissimo.zones');\r\n $this->mergeConfigFrom(__DIR__.'/../config/insurances.php', 'colissimo.insurances');\r\n $this->mergeConfigFrom(__DIR__.'/../config/supplements.php', 'colissimo.supplements');\r\n // Register the service the package provides.\r\n $this->app->singleton('colissimo', function ($app) {\r\n return new Colissimo;\r\n });\r\n }",
"public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }",
"public function register()\n {\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyService::class,\n \\App\\Services\\Survey\\SurveyService::class\n );\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyQuestionService::class,\n \\App\\Services\\Survey\\SurveyQuestionService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptService::class,\n \\App\\Services\\Survey\\SurveyAttemptService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptDataService::class,\n \\App\\Services\\Survey\\SurveyAttemptDataService::class\n );\n }",
"public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }",
"public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }",
"public function register()\n {\n $this->registerRepositoryBindings();\n\n $this->registerInterfaceBindings();\n\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n\n $this->registerFilterBindings();\n\n $this->registerCommands();\n }",
"public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events');\n\n $this->app->singleton(EventsService::class);\n $this->app->singleton(GuestService::class);\n }",
"public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }"
] | [
"0.7879658",
"0.7600202",
"0.74930716",
"0.73852855",
"0.736794",
"0.7306089",
"0.7291359",
"0.72896826",
"0.72802424",
"0.7268026",
"0.7267702",
"0.72658145",
"0.7249053",
"0.72171587",
"0.7208486",
"0.7198799",
"0.7196415",
"0.719478",
"0.7176513",
"0.7176227",
"0.7164647",
"0.71484524",
"0.71337837",
"0.7129424",
"0.71231985",
"0.7120174",
"0.7103653",
"0.71020955",
"0.70977163",
"0.7094701",
"0.7092148",
"0.70914364",
"0.7088618",
"0.7087278",
"0.70827085",
"0.70756096",
"0.7075115",
"0.70741326",
"0.7071857",
"0.707093",
"0.7070619",
"0.7067406",
"0.7066438",
"0.7061766",
"0.70562875",
"0.7051525",
"0.7049684",
"0.70467263",
"0.7043264",
"0.7043229",
"0.70429426",
"0.7042174",
"0.7038729",
"0.70384216",
"0.70348704",
"0.7034105",
"0.70324445",
"0.70282733",
"0.7025024",
"0.702349",
"0.7023382",
"0.702262",
"0.7022583",
"0.7022161",
"0.702139",
"0.7021084",
"0.7020801",
"0.7019928",
"0.70180106",
"0.7017351",
"0.7011482",
"0.7008627",
"0.7007786",
"0.70065045",
"0.7006424",
"0.70060986",
"0.69992065",
"0.699874",
"0.69980377",
"0.69980335",
"0.6997871",
"0.6996457",
"0.69961494",
"0.6994749",
"0.6991596",
"0.699025",
"0.6988414",
"0.6987274",
"0.69865865",
"0.69862866",
"0.69848233",
"0.6978736",
"0.69779474",
"0.6977697",
"0.6976002",
"0.69734764",
"0.6972392",
"0.69721776",
"0.6970663",
"0.6968296",
"0.696758"
] | 0.0 | -1 |
Bootstrap any application services. | public function boot()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }",
"public function boot()\n {\n // Boot here application\n }",
"public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }",
"public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }",
"public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }",
"public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }",
"public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }",
"public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }",
"public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }",
"public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }",
"public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }",
"public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }",
"public function boot()\n {\n $this->setupConfig($this->app);\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }",
"public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }",
"public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }",
"public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }",
"public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }",
"public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }",
"public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }",
"public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }",
"public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }",
"protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}",
"public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }",
"public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }",
"public static function boot() {\n\t\tstatic::container()->boot();\n\t}",
"public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }",
"public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }",
"public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }",
"public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }",
"public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }",
"public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }",
"public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }",
"public function boot()\n {\n $this->makeRepositories();\n }",
"public function boot(): void\n {\n $this->loadMiddlewares();\n }",
"public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }",
"public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }",
"public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }",
"public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }",
"public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }",
"public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }",
"public function boot()\n {\n $this->bootPackages();\n }",
"public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }",
"public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }",
"public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }",
"public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }",
"public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }",
"public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }",
"public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }",
"public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }",
"public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }",
"public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }",
"protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }",
"public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }",
"public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }",
"public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }",
"public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}",
"public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }",
"public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}",
"public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }",
"public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }",
"public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }",
"public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }",
"public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }",
"public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }",
"public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}",
"public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }",
"public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }",
"public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }",
"public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }",
"public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }",
"public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }",
"public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }",
"public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }",
"public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }",
"public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }",
"public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }",
"public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }",
"public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }",
"public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }",
"public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}",
"public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }",
"public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }",
"public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }",
"public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }",
"public function boot(Application $app)\n {\n\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }"
] | [
"0.7344842",
"0.7212776",
"0.7207748",
"0.7123287",
"0.7109729",
"0.70822036",
"0.7076881",
"0.70718396",
"0.7051853",
"0.7025475",
"0.7011949",
"0.70043486",
"0.6955807",
"0.69322443",
"0.69319373",
"0.69272774",
"0.6911386",
"0.69069713",
"0.6898877",
"0.6898432",
"0.6896597",
"0.6889767",
"0.6886577",
"0.6880688",
"0.6875815",
"0.6874972",
"0.68696195",
"0.6864291",
"0.6864246",
"0.68631536",
"0.68599164",
"0.6857919",
"0.685537",
"0.68552583",
"0.68522125",
"0.6839775",
"0.683261",
"0.6831196",
"0.68272495",
"0.68250644",
"0.68241394",
"0.68181944",
"0.68132496",
"0.68117976",
"0.6811785",
"0.6808445",
"0.68066794",
"0.680175",
"0.68005246",
"0.67994386",
"0.67969066",
"0.67912513",
"0.67884964",
"0.678574",
"0.678558",
"0.6783794",
"0.67782456",
"0.6773669",
"0.6766658",
"0.6766194",
"0.67617613",
"0.67611295",
"0.6758855",
"0.6756636",
"0.6754412",
"0.6751842",
"0.6747439",
"0.6744991",
"0.67441815",
"0.6743506",
"0.67400324",
"0.6739403",
"0.6738356",
"0.6738189",
"0.6731425",
"0.6730627",
"0.67293024",
"0.6726232",
"0.67261064",
"0.67192256",
"0.6716676",
"0.6716229",
"0.671442",
"0.6713091",
"0.6702467",
"0.66990495",
"0.66913867",
"0.6689953",
"0.66861963",
"0.66840357",
"0.66826946",
"0.6681548",
"0.6680455",
"0.6676407",
"0.6675645",
"0.6672465",
"0.66722375",
"0.66722375",
"0.66722375",
"0.66722375",
"0.66722375"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
foreach (range(1, 200) as $value) {
Users::create(['user_nickname' => strlen(10), 'user_telephone' => '1828019' . rand(1000, 9999), 'user_time' => $_SERVER['REQUEST_TIME'], 'user_password' => encrypt('admin')]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Template file used via Ajax | function sanitize($arg) {
if (is_array($arg)) {
return array_map('sanitize', $arg);
}
return htmlentities($arg, ENT_QUOTES, 'UTF-8');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function renderTemplate();",
"private function renderTemplate(){\n\t\trequire($this->TemplateFile);\n\t}",
"function render($file='') {\n\tif(isset($_REQUEST['ajax'])) {\n\t\tprint '{\"success\":\"Done\",\"error\":false}';\n\t\treturn;\n\t}\n\n\t//Otherwise, render it.\n\t$GLOBALS['template']->render($file);\n}",
"public function loadTemplate()\n\t\t{\n\t\t}",
"protected function content_template() {}",
"protected function content_template() {}",
"public function ajax_content()\n\t{\n\t\t$return_struct = array(\n\t\t\t'status' => 0,\n\t\t\t'code'\t => 501,\n\t\t\t'msg'\t => 'Not Implemented'\n\t\t);\n\t\tif(request::is_ajax())\n\t\t{\n\t\t\t$id = intval($this->input->get('id')); \n $value = $this->single($id);\n \n\t\t\t$return_template = $this->template = new View('template_blank');\n\t\t\t$this->template->content = $value;\n\t\t\t$return_str = $return_template->render();\n\t\t\t$return_struct['status'] = 1;\n\t\t\t$return_struct['code'] = 200;\n\t\t\t$return_struct['msg'] = 'Success';\n\t\t\t$return_struct['content'] = $return_str;\n\t\t\texit(json_encode($return_struct));\n\t\t}\n\t}",
"public static function ajax_include($template) {\n ob_start();\n require Config::get('prefix') . '/templates/' . $template;\n $output = ob_get_contents();\n ob_end_clean();\n\n return $output;\n }",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"public function showTemplate(){\n\t\tinclude \"view/template.php\";\n\t}",
"public function getTemplates(){\n\n if($this->input->is_ajax_request()){\n $html = '';\n $client_id = $this->input->post('client_id', true);\n if(!empty($client_id)) {\n\n $plantillas_cat = $this->LstPlantillasCatModel->getPlantillasCatByNumbre(strtolower($this->data['controller_name']));\n $id_cat = isset($plantillas_cat[0]->id) ? $plantillas_cat[0]->id : \"7\";\n $document_cat = $this->TemplateModel->getAllUsersTemplates($id_cat);//$this->get_documentos($this->data['id_cat']);\n }\n echo json_encode(array('templates'=>$document_cat, 'cat_id'=>$id_cat));\n exit;\n }else{\n $this->layouts->view('error_404',$this->data, 'error_404');\n }\n }",
"function Template()\r\n\t{\t\t\r\n\t\tglobal $_REQUEST;\t\t\r\n\t\t$theme = $this->theme;\r\n\t\t/*** Get Template By Page Id ***/\r\n\t\t$file = $this->get_template();\r\n\t\t\r\n\t\tif($_SETTINGS['debug'] == 1){\r\n\t\t\techo \"TEMPLATE: \".$file.\" <Br>\";\r\n\t\t}\r\n\t\t\r\n\t\t$websitepath = $this->website_path;\r\n\t\t//die(\"FILE: $file\");\r\n\t\t//exit();\r\n\t\tinclude''.$_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$file.'';\r\n\t}",
"function ajax_fetchTemplateContent()\n{\n\n $cc = new CapabilityCheck('fetchTemplateContent');\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $templateName = sanitize_text_field($_POST['templateName']);\n\n if ($templateName == 'New Server Created') {\n $content = get_option(WPCP_NEW_SERVER, WPCPHTTP::$ServerDetails);\n } elseif ($templateName == 'Server Cancelled') {\n $content = get_option(WPCP_SERVER_CANCELLED, WPCPHTTP::$ServerCancelled);\n } elseif ($templateName == 'Server Suspended') {\n $content = get_option(WPCP_SERVER_SUSPENDED, WPCPHTTP::$ServerSuspended);\n } elseif ($templateName == 'Server Terminated') {\n $content = get_option(WPCP_SERVER_TERMINATED, WPCPHTTP::$ServerTerminated);\n }\n\n wp_send_json(array('status' => 1, 'result' => nl2br($content)));\n}",
"protected function content_template() {\n\t}",
"public function load_template_callback() {\n\n // Make sure a template was submitted\n if ( ! isset($_POST['template']) ) {\n return;\n }\n // grabe the template being rendered\n $template = $_POST['template'];\n\n // Activate builder callbacks for the shortcodes\n $this->activate_builder_callbacks();\n\n // Remove inactive shortcodes\n $template = cv_strip_inactive_plugin_shortcodes( $template );\n\n // Display the rendered shortcodes\n echo do_shortcode( stripslashes( $template ) );\n\n die();\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()\n {\n }",
"public function index() \n\t{\n\t\tif(! $this->xmlHttpRequest){\n\t\t\t$this->registry->template->show($this->file . $this->extension);\n\t\t}\n\t\telse{\n\t\t\t$this->process();\n\t\t}\n\t}",
"public function forAjaxTemplate()\n {\n $view = SSViewer::create($this->getTemplates());\n\n $return = $view->dontRewriteHashlinks()->process($this);\n\n // Now that we're rendered, clear message\n $this->clearMessage();\n\n return $return;\n }",
"public function actionAjaxLoad()\r\n {\r\n \treturn $this->render('ajax-load');\r\n }",
"public function ajaxFile()\n\t{\n\t\t$type = $_POST['type'];\n\t\t$id = $_POST['id'];\n\t\t$file_src = wp_get_attachment_url( $id );\n\t\t$have_file = !empty( $file_src );\n\t\tswitch ( $type ) {\n\t\t\tcase 'image':\n\t\t\t\t?>\n\t\t\t\t<img src=\"<?php echo esc_url( $file_src ); ?>\" alt=\"\" />\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\n\t\t\tcase 'audio':\n\t\t\t\techo wp_audio_shortcode( array(\n\t\t\t\t\t'src' => $file_src\n\t\t\t\t) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'video':\n\t\t\t\techo wp_video_shortcode( array(\n\t\t\t\t\t'src' => $file_src\n\t\t\t\t) );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$filename = basename( get_attached_file( $id ) );\n\t\t\t\t?>\n\t\t\t\t<span class=\"dashicons dashicons-media-default\"></span>\n\t\t\t\t<span class=\"file-name\"><?php echo wp_kses_post( $filename ); ?></span>\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\t}\n\t\twp_die();\n\t}",
"public function action_demo_json() {\n // which is useful if the same controller is used for HTML and AJAX\n $this->template->title = 'This page has been updated';\n $this->template->content = 'This content has been delivered with <strong>AJAX</strong> - beware it contains <script> tags <script>alert(\\'Told you so!\\')</script>';\n $this->template->hidden = 'This page has been updated';\n // $this->template->_no_header = true;\n $this->template->set_filename('json:');\n $this->template->render();\n }",
"protected function content_template()\n\t{\n\t\t//\n\t}",
"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 }",
"protected function _content_template() {\n \n }",
"public function template();",
"public function include_template_files()\n\t{\n\t\t$shopUrl = session('myshopifyDomain');\n\t\t$accessToken = session('accessToken');\n\t\t$data = $this->shopify->setShopUrl($shopUrl)->setAccessToken($accessToken)->get('admin/themes.json');\n\t\t$objection = json_decode($data);\n\t\t$name_check = \"\";\n\t\t$theme_id;\n\t\tforeach ($data as $datas) {\n\t\t\tif ($datas->role == \"main\") {\n\t\t\t\t$theme_id = $datas->id;\n\t\t\t\t$name_check = $datas->name;\n\t\t\t}\n\t\t}\n\t\t$template_name = 'templates/product.liquid';\n\t\t$server_template = $this->shopify->setShopUrl($shopUrl)\n\t\t\t->setAccessToken($accessToken)\n\t\t\t->get(\"/admin/themes/\" . $theme_id . \"/assets.json\", [\"asset[key]\" => \"$template_name\", \"theme_id\" => $theme_id]);\n\t\t$view = $server_template['value'];\n\t\t$view .= \"{% include 'personalisation-popup' %}{% assign event_identifier = product.metafields.disable_robe_key %}\n\t\t<input type='hidden' value='{{ disable_robe_key['disable_robe_key'] }}' id='disable_robe_key' class='disable_robe_key' />\n\n\t\t<input type='hidden' value='{{ product.variants.first.id }}' id='product_id' class='product' />\n\t\t<input type='hidden' value='{{ product.id }}' id='product_id_real' class='product' />\n\t\t<input type='hidden' value='{{ product.title }}' id='product_name' class='product' />\";\n\n\t\t$this->update_templete_files($view, $shopUrl, $accessToken, $theme_id);\n\t}",
"protected function _content_template()\n {\n\n }",
"function f_get_template(){\n /// you need get info config in setting then insert here. the present it default\n $host = $this->host;\n $slugs = $this->slugs;\n $key = $this->key;\n $ajax_url = $this->ajax_url;\n $elementor = $this->elementor;\n/// get slug from url and remove element empty\n $slug = array_filter( explode('/', $_SERVER['REQUEST_URI']) );\n // check exist in slugs config\n if( isset( $slugs[$slug[1]] )){\n $template_api = $slugs[$slug[1]];\n $template_api['action'] = 'action_slug_api';\n $template_api['key'] = $key;\n $template_api['ajax_url'] = $ajax_url;\n $template_api['elementor'] = $elementor;\n $template_api['name'] = $slug[1];\n // check type template list or template single\n if($template_api['slug']){\n $template_api['url'] = $host.$template_api['url'].$slug[2];\n }else{\n $template_api['url'] = $host.$template_api['url'];\n }\n $this->do_template($template_api);\n\n }\n }",
"function getTemplate();",
"function erp_get_js_template( $file_path, $id ) {\n if ( file_exists( $file_path ) ) {\n echo '<script type=\"text/html\" id=\"tmpl-' . esc_html( $id ) . '\">' . \"\\n\";\n include_once apply_filters( 'erp_crm_js_template_file_path', $file_path, esc_html( $id ) );\n echo \"\\n\" . '</script>' . \"\\n\";\n }\n}",
"public function loadTemplate()\n {\n return json_decode(file_get_contents(app_path(self::BASE_TEMPLATE_PATH)), true);\n }",
"protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore \n\t\t$this->content_template();\n\t}",
"public function render_template_options_template() { ?>\n\n <script type=\"text/html\" id=\"tmpl-cv-builder-template-options\">\n\n <div class=\"cv-modal-content-padding\">\n\n <a class=\"cv-composer-large-option has-icon\" data-action=\"prepend\">\n <i class=\"icon-up-bold\"></i>\n <strong><?php _e( 'Add Before Existing Content', 'canvys' ); ?></strong>\n <span><?php _e( 'Insert the selected template before the existing page content.', 'canvys' ); ?></span>\n </a>\n <a class=\"cv-composer-large-option has-icon\" data-action=\"replace\">\n <i class=\"icon-stop\"></i>\n <strong><?php _e( 'Replace Existing Content', 'canvys' ); ?></strong>\n <span><?php _e( 'Replace the existing page content with the selected template.', 'canvys' ); ?></span>\n </a>\n <a class=\"cv-composer-large-option has-icon\" data-action=\"append\">\n <i class=\"icon-down-bold\"></i>\n <strong><?php _e( 'Add After Existing Content', 'canvys' ); ?></strong>\n <span><?php _e( 'Insert the selected template after the existing page content.', 'canvys' ); ?></span>\n </a>\n\n </div>\n\n </script>\n\n <?php }",
"public function processaTemplate() {\n return $this->fetch('ricerca_'.$this->_layout.'.tpl');\n }",
"protected function _content_template() {\n\t}",
"public function render($success) {\r\n\t\tif($success){\r\n\t\t\tif(file_exists('AjaxTemplates/'.$this->template.'.htm')){ // If this ajax call has a template\r\n\t\t\t\techo json_encode(array(\r\n\t\t\t\t\t\"success\" => true,\r\n\t\t\t\t\t\"data\" => RenderAjax($this->template,$this->pageData)\r\n\t\t\t\t));\r\n\t\t\t}else{ // All that matters is that there was success (there's no template for this ajax call)\r\n\t\t\t\techo json_encode(array(\r\n\t\t\t\t\t\"success\" => true,\r\n\t\t\t\t\t\"data\" => $this->pageData\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\techo json_encode(array(\r\n\t\t\t\t\"success\" => false,\r\n\t\t\t\t\"reason\" => $this->failureReason\r\n\t\t\t));\r\n\t\t}\r\n\t}",
"function get_template()\n {\n }",
"public function pagina(){\r\n include\"vies/template.php\";\r\n }",
"public function AjaxMovil() {\n\t\t\tif(AppValidar::PeticionAjax() == true):\n\t\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t\t$plantilla->Parametro('avisos', $this->Modelo->avisos());\n\t\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'AjaxMovil.html')));\n\t\t\telse:\n\t\t\t\techo 'No es posible cargar la información';\n\t\t\tendif;\n\t\t}",
"public function new_template()\n\t{\n\t\tee()->load->library('table');\n\t\tee()->cp->add_to_head('<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css\">');\n\t\tee()->cp->add_to_head('<link rel=\"stylesheet\" href=\"'.$this->theme_url.'css/app.css\" type=\"text/css\" media=\"screen\">');\n\t\tee()->cp->add_to_foot('<script type=\"text/javascript\">var $token = 1;</script>');\n\t\tee()->cp->add_to_foot('<script src=\"'.$this->theme_url.'js/app.js\" type=\"text/javascript\" charset=\"utf-8\"></script>');\n\t\tee()->cp->add_to_foot('<script src=\"'.$this->theme_url.'js/draganddrop.js\" type=\"text/javascript\" charset=\"utf-8\"></script>');\n\n\t\t$this->_data['action_url'] = ee('CP/URL')->make('addons/settings/json_ld/savetemplate');\n\n\t\t$this->_data['templates'] = ee()->jsonld->templates();\n\n\t\t// Get types\n\t\t$this->_data['types'] = ee()->jsonld->types();\n\n\t\treturn ee('View')->make('json_ld:new')->render($this->_data);\n\n\t}",
"protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore\n\t\t$this->content_template();\n\t}",
"public function template()\n {\n\n include './views/template.php';\n\n }",
"public function tempalte()\n \t{\n \t\t$this->load->template('index-1');\n \t}",
"public function load_cancel_template() {\n\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\tob_start();\n\t\t\tinclude 'Templates/cancel_template.php';\n\t\t\t$html = ob_get_clean();\n\t\t\twp_send_json_success( $html );\n\t\t\twp_die();\n\t\t}\n\t\t$html = 'Error';\n\t\twp_send_json_error( $html );\n\t\twp_die();\n\t}",
"static function get_template( $options = array(), $callback = '' ){\n\n\t\t\t\tif( !check_ajax_referer('gdlr_core_page_builder', 'security', false) ){\n\t\t\t\t\tdie(json_encode(array(\n\t\t\t\t\t\t'status' => 'failed',\n\t\t\t\t\t\t'head' => esc_html__('Invalid Nonce', 'goodlayers-core'),\n\t\t\t\t\t\t'message'=> esc_html__('Please refresh the page and try again.' ,'goodlayers-core')\n\t\t\t\t\t)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( !empty($_POST['slug']) ){\n\n\t\t\t\t\t$pb_page_template = apply_filters('gdlr_core_page_builder_get_page_template', '', $_POST['slug']);\n\t\t\t\t\t\n\t\t\t\t\tif( !empty($pb_page_template) ){\n\t\t\t\t\t\t$pb_data = json_decode($pb_page_template, true);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$pb_block_template = apply_filters('gdlr_core_page_builder_get_block_template', '', $_POST['slug']);\n\n\t\t\t\t\t\tif( !empty($pb_block_template) ){\n\t\t\t\t\t\t\t$pb_data = json_decode($pb_block_template, true);\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$content = gdlr_core_page_builder::get_page_builder_item($pb_data);\n\n\t\t\t\t\tdie(json_encode(array(\n\t\t\t\t\t\t'status' => 'success',\n\t\t\t\t\t\t'content' => $content\n\t\t\t\t\t))); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"private function render_template() {\n\t\t$template = $this->template;\n\n\t\tif ( ! is_readable( $template ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tinclude $template;\n\t}",
"function _template($data=NULL,$templatename=NULL)\n {\n $header = ($this->tank_auth->get_user_id()) ? 'header-2':'header';\n $data['template'] = $templatename;\n\t $data['header'] = 'includes/'.$header; \n $this->load->view('includes/template',$data); \n }",
"public function getTemplate() {}",
"public function AjaxTablet() {\n\t\t\tif(AppValidar::PeticionAjax() == true):\n\t\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t\t$plantilla->Parametro('avisos', $this->Modelo->avisos());\n\t\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'AjaxTablet.html')));\n\t\t\telse:\n\t\t\t\techo 'No es posible cargar la información';\n\t\t\tendif;\n\t\t}",
"public function get_template()\n {\n }",
"public function get_template()\n {\n }",
"public function resavetemplate()\n\t{\n\t\t// Get form data\n\t\t$template_id = ee()->input->get_post('json-ld-template-id');\n\t\t$template_name = ee()->input->get_post('template_name');\n\t\t$template = ee()->input->get_post('json-ld-template-final');\n\n\t\t// Write it to database\n\t\t$data = [\n\t\t\t'template_name' => $template_name,\n\t\t\t'template_text' => $template\n\t\t];\n\n\t\tee()->db->update('exp_json_ld_templates', $data, ['id' => $template_id]);\n\n\t\t// return index view\n\t\treturn $this->index();\n\t}",
"public function actionGetTemplate(){\n $post = Yii::$app->getRequest()->post();\n echo file_get_contents(dirname(\\Yii::getAlias('@webroot')).'/frontend/views/templates/'.$post['template']);\n }",
"public function initTemplate() {}",
"public function loadTemplate(){\n\t\t$tpl = $this->template;\n\t\t$file = $this->path . DIRECTORY_SEPARATOR . $tpl . '.tmpl.php';\n\t\t$exists = file_exists($file);\n\t\t// Wenn Template vorhanden\n\t\tif( $exists ){\n\n\t\t\tob_start();\n\t\t\tinclude $file;\n\t\t\t$output = ob_get_contents();\n\t\t\tob_end_clean();\n\n\t\t\treturn $output;\n\t\t}else{\n\t\t\treturn 'Datei nicht gefunden!';\n\t\t}\n\t}",
"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 index(){\n\t\t$this->template->run();\n\t}",
"function getTemplate(){\n\t\treturn $this->html_result;\n\t}",
"public function LoadTemplate($sFilename) {\t\t\n\t}",
"abstract public function getTemplate();",
"public function js_template()\n {\n ?>\n <script id=\"js-builderius-setting-<?php \n echo $this->setting_key ;\n ?>-tmpl\" type=\"text/template\">\n <?php \n ?>\n </script>\n <?php \n }",
"function load_template(){ \n\t\t$company_id = $this->input->post('company_id');\n\t\t$type = $this->input->post('task_type');\n\t\t$user_id = $this->input->post('user_id');\n\t\t$post_id = $this->input->post('post_id');\n\t\tif(!empty($company_id) && !empty($type) && !empty($user_id) && !empty($post_id) ){\n\t\t$data= $this->InteractModal->load_template($company_id,$type,$user_id,$post_id);\n\t\t\t\n\t\t?>\t\t\n\t\t <table class=\"table table-striped\">\n\t\t <?php if(!empty($data)){\n\t\t\t ?>\n \t<tr>\n \t\t<th>#/Name</th>\n \t\t<th>Action</th>\n \t</tr>\n\t\t <?php } else{\n\t\t\t echo \"<h3> No Data Found</h3>\";\n\t\t }?> \n </table>\n\t\t <?php\n\t\t}\n\t}",
"abstract public function getTemplateFile();",
"public function js_template() {\n\t\t?>\n <script id=\"js-builderius-setting-<?php echo $this->setting_key; ?>-tmpl\" type=\"text/template\">\n <div class=\"uni-modal-row uni-clear\">\n\t\t\t\t<?php echo $this->generate_field_label_html() ?>\n <div class=\"uni-modal-row-second\">\n\t\t\t\t\t<?php echo $this->generate_select_html() ?>\n </div>\n </div>\n </script>\n\t\t<?php\n\t}",
"public function AjaxTelevision() {\n\t\t\t$data = $this->Modelo->avisos();\n\t\t\t$pagina = (count($data) >= 1) ? array_chunk($data, 4) : array();\n\t\t\t\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('cantidad', count($data));\n\t\t\t$plantilla->Parametro('paginas', count($pagina));\n\t\t\t$plantilla->Parametro('listado', $pagina);\n\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'AjaxTelevision.html')));\n\t\t}",
"public function plantilla(){\n //el include se utiliza para invocar el archivo que tiene el codigo html\n include \"View/template.php\";\n }",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function processaTemplate() {\n return $this->fetch('partita_'.$this->_layout.'.tpl');\n }",
"public static function loadTemplateData()\n {\n $templateId = 0;\n $app = Factory::getApplication();\n\n if ($app->isClient('site'))\n {\n $currentTemplate = $app->getTemplate(true);\n $templateId = $currentTemplate->id ?? 0;\n\n\t\t\t/**\n\t\t\t * If a page/menu is assigned to a specific template\n\t\t\t * then get the template ID.\n\t\t\t */\n\t\t\t$activeMenu = $app->getMenu()->getActive();\n\n\t\t\tif (!empty($activeMenu) && !empty($activeMenu->template_style_id))\n\t\t\t{\n\t\t\t\t$templateId = $activeMenu->template_style_id;\n\t\t\t}\n }\n else\n {\n if ($app->input->get('option') === 'com_ajax' && $app->input->get('helix') === 'ultimate')\n {\n $templateId = $app->input->get('id', 0, 'INT');\n }\n }\n\n\t\tif (empty($templateId))\n\t\t{\n\t\t\t$templateId = $app->input->get('helix_id', 0, 'INT');\n\t\t}\n\n if($templateId)\n {\n $template = [];\n\n $draftKeyOptions = [\n 'option' => 'com_ajax',\n 'helix' => 'ultimate',\n 'status' => 'draft',\n 'id' => $templateId\n ];\n\n $draftKey = self::generateKey($draftKeyOptions);\n $cache = new HelixCache($draftKey);\n\n /**\n * Check the fetch destination. If it is iframe then load the settings\n * from draft, otherwise if it is document that means this request\n * comes from the original site visit. So load from saved cache.\n */\n $requestFromIframe = $app->input->get('helixMode', '') === 'edit';\n \n if ($cache->contains() && $requestFromIframe)\n {\n $template = $cache->loadData();\n }\n else\n {\n $keyOptions = [\n 'option' => 'com_ajax',\n 'helix' => 'ultimate',\n 'status' => 'init',\n 'id' => $templateId\n ];\n \n $key = self::generateKey($keyOptions);\n $cache->setCacheKey($key);\n \n if ($cache->contains())\n {\n $template = $cache->loadData();\n }\n else\n {\n $template = self::getTemplateStyle($templateId); \n }\n }\n\n\t\t\tif (isset($template->template) && !empty($template->template))\n\t\t\t{\n\t\t\t\tif (!empty($template->params) && \\is_string($template->params))\n\t\t\t\t{\n\t\t\t\t\t$template->params = new Registry($template->params);\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * If params field is found empty in the database or cache then\n\t\t\t\t * read the default options.json file from the template and assign\n\t\t\t\t * the options as template params.\n\t\t\t\t */\n\t\t\t\telseif (empty($template->params))\n\t\t\t\t{\n\t\t\t\t\t$filePath = JPATH_ROOT . '/templates/' . $template->template . '/' . 'options.json';\n\n\t\t\t\t\tif (\\file_exists($filePath))\n\t\t\t\t\t{\n\t\t\t\t\t\t$defaultParams = \\file_get_contents($filePath);\n\t\t\t\t\t\t$template->params = new Registry($defaultParams);\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$template->params = new Registry;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn $template;\n\t\t\t}\n }\n\n $template = new \\stdClass;\n $template->template = 'system';\n $template->params = new Registry;\n\n return $template;\n }",
"function index()\n {\n //call some deafaults not to spoil template\n $data=$this->default_data();\n $this->template($data);\n\n }",
"public function render() {\n $template = $this->template;\n $template->setFile(__DIR__ . '/QuestionControl.latte');\n $this->template->question = $this->questions->getById($this->questionId);\n $template->render();\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}",
"public function contato() {\n $this->load_template('contato');\n }",
"public function pagina(){\n\t\t\tinclude \"views/template.php\";\n\t\t}",
"final public function wp_ajax(){\n\t nocache_headers();\n\t\theader( 'Content-Type: application/x-javascript; charset=UTF-8' );\n\t if ( ! wp_verify_nonce( $_GET['nonce'], 'tinymce_templates' ) ) \n\t return;\n\t \n\t\t$arr = array(\n\t\t\t\t\tarray( \t\"title\" \t\t=> \"2 Colonnes : 1/4, 3/4\", \n\t\t\t\t\t\t\t\"description\" \t=> \"1 colonne d'1/4 et l'autre de 3/4\",\n\t\t\t\t\t\t\t\"url\" \t\t\t=> self::tFyAppUrl() . \"/templates/2cols_0.25-0.75.htm\"\n\t\t\t\t\t),\n\t\t\t\t\tarray( \t\"title\" \t\t=> \"2 Colonnes : 1/3, 2/3\", \n\t\t\t\t\t\t\t\"description\" \t=> \"1 colonne d'1/3 et l'autre de 2/3\",\n\t\t\t\t\t\t\t\"url\" \t\t\t=> self::tFyAppUrl() . \"/templates/2cols_0.33-0.66.htm\"\n\t\t\t\t\t),\n\t\t\t\t\tarray( \t\"title\" \t\t=> \"2 Colonnes : 1/2, 1/2\", \n\t\t\t\t\t\t\t\"description\" \t=> \"1 colonnes d'1/2 et l'autre d'1/2\",\n\t\t\t\t\t\t\t\"url\" \t\t\t=> self::tFyAppUrl() . \"/templates/2cols_0.5-0.5.htm\"\n\t\t\t\t\t),\n\t\t\t\t\tarray( \t\"title\" \t\t=> \"2 Colonnes : 2/3, 1/3\", \n\t\t\t\t\t\t\t\"description\" \t=> \"1 colonne de 2/3 et l'autre d'1/3\",\n\t\t\t\t\t\t\t\"url\" \t\t\t=> self::tFyAppUrl() . \"/templates/2cols_0.66-0.33.htm\"\n\t\t\t\t\t),\n\t\t\t\t\tarray( \t\"title\" \t\t=> \"2 Colonnes : 3/4, 1/4\", \n\t\t\t\t\t\t\t\"description\" \t=> \"1 colonne de 3/4 et l'autre d'1/4\",\n\t\t\t\t\t\t\t\"url\" \t\t\t=> self::tFyAppUrl() . \"/templates/2cols_0.75-0.25.htm\"\n\t\t\t\t\t),\n\t\t\t\t\tarray( \t\"title\" \t\t=> \"3 Colonnes : 1/4, 1/4, 1/2\", \n\t\t\t\t\t\t\t\"description\" \t=> \"1 colonne d'1/4, une d'1/4 et une d'1/2\",\n\t\t\t\t\t\t\t\"url\" \t\t\t=> self::tFyAppUrl() . \"/templates/3cols_0.25-0.25-0.5.htm\"\n\t\t\t\t\t),\n\t\t\t\t\tarray( \t\"title\" \t\t=> \"3 Colonnes : 1/4, 1/2, 1/4\", \n\t\t\t\t\t\t\t\"description\" \t=> \"1 colonne d'1/4, une d'1/2 et une d'1/4\",\n\t\t\t\t\t\t\t\"url\" \t\t\t=> self::tFyAppUrl() . \"/templates/3cols_0.25-0.5-0.25.htm\"\n\t\t\t\t\t),\n\t\t\t\t\tarray( \t\"title\" \t\t=> \"3 Colonnes : 1/3, 1/3, 1/3\", \n\t\t\t\t\t\t\t\"description\" \t=> \"1 colonne d'1/3, une d'1/3 et une d'1/3\",\n\t\t\t\t\t\t\t\"url\" \t\t\t=> self::tFyAppUrl() . \"/templates/3cols_0.33-0.33-0.33.htm\"\n\t\t\t\t\t),\n\t\t\t\t\tarray( \t\"title\" \t\t=> \"3 Colonnes : 1/2, 1/4, 1/4\", \n\t\t\t\t\t\t\t\"description\" \t=> \"1 colonne d'1/2, une d'1/4 et une d'1/4\",\n\t\t\t\t\t\t\t\"url\" \t\t\t=> self::tFyAppUrl() . \"/templates/3cols_0.5-0.25-0.25.htm\"\n\t\t\t\t\t),\n\t\t\t\t\tarray( \t\"title\" \t\t=> \"4 Colonnes : 1/4, 1/4, 1/4, 1/4\", \n\t\t\t\t\t\t\t\"description\" \t=> \"1 colonnes d'1/4, une d'1/4, une d'1/4 et une d'1/4\",\n\t\t\t\t\t\t\t\"url\" \t\t\t=> self::tFyAppUrl() . \"/templates/4cols_0.25-0.25-0.25-0.25.htm\"\n\t\t\t\t\t)\n\t\t\t);\n\t\t\t\t\n\t echo json_encode($arr);\n\t exit;\n\t}",
"public function echoAjaxContent() {\n\t\t\n\t\t$sSection = trim( $_GET[ 'section' ] );\n\t\t$sMethod = '';\n\t\t\n\t\tif ( $sSection ) {\n\t\t\t$sMethod = sprintf( 'get%sAjax', Geko_Inflector::camelize( $sSection ) );\n\t\t\tif ( !method_exists( $this, $sMethod ) ) $sMethod = '';\n\t\t}\n\t\t\n\t\tif ( $sMethod ) {\n\t\t\t$aAjaxResponse = $this->$sMethod();\n\t\t\techo Zend_Json::encode( $aAjaxResponse );\n\t\t}\n\t}",
"function st_get_template($file,$data = array()){\r $file = ST_DIR.'/templates/'.$file;\r if(file_exists($file)){\r include($file); return true;\r }\r return false;\r}",
"public function getHtmlTemplate() {}",
"public function getTemplateFile();"
] | [
"0.6876186",
"0.68158495",
"0.6768764",
"0.67432666",
"0.67408407",
"0.67408407",
"0.6723754",
"0.6639431",
"0.6522823",
"0.6522729",
"0.6522729",
"0.6522729",
"0.6508507",
"0.6493109",
"0.64623487",
"0.6429008",
"0.64194155",
"0.63971514",
"0.6393888",
"0.6393888",
"0.6393888",
"0.6393888",
"0.6393888",
"0.6393888",
"0.6388112",
"0.6352451",
"0.63491845",
"0.6348335",
"0.63435286",
"0.6343441",
"0.6340219",
"0.6340219",
"0.6340219",
"0.6340219",
"0.6340219",
"0.6340219",
"0.6340219",
"0.6340219",
"0.6340219",
"0.6340219",
"0.6324132",
"0.6323626",
"0.6312935",
"0.6309652",
"0.6306751",
"0.6306202",
"0.6297994",
"0.62873685",
"0.6277609",
"0.6277552",
"0.624887",
"0.6246731",
"0.62415355",
"0.62354046",
"0.62250847",
"0.6209834",
"0.62088627",
"0.6203726",
"0.6202962",
"0.6179664",
"0.61702144",
"0.61673796",
"0.61575925",
"0.6142171",
"0.61391383",
"0.6138792",
"0.6124482",
"0.61240655",
"0.612006",
"0.6111192",
"0.6104516",
"0.6100116",
"0.6099267",
"0.609229",
"0.60786146",
"0.606188",
"0.605783",
"0.6057421",
"0.6054563",
"0.60423654",
"0.60380214",
"0.6027624",
"0.6022918",
"0.60185",
"0.60185",
"0.60185",
"0.60185",
"0.60185",
"0.60185",
"0.6010586",
"0.60082144",
"0.60042447",
"0.6002895",
"0.59980816",
"0.5996197",
"0.5990197",
"0.5987398",
"0.5952291",
"0.5947235",
"0.5936281",
"0.5930315"
] | 0.0 | -1 |
Tests that a user receives the right permissions for group nodes. | public function testPermissions() {
$handler = $this->entityManager->getAccessControlHandler('media');
// Test anonymous permissions.
$view = $handler->access($this->mediaEntity1, 'view', $this->anonymous, TRUE);
$update = $handler->access($this->mediaEntity1, 'update', $this->anonymous, TRUE);
$delete = $handler->access($this->mediaEntity1, 'delete', $this->anonymous, TRUE);
$this->assertTrue($view instanceof AccessResultAllowed,
'1 Anonymous should be able to view media A.');
$this->assertTrue($update instanceof AccessResultNeutral,
'2 Anonymous should be able to update media A depending on "user.permissions".');
$this->assertTrue($delete instanceof AccessResultNeutral,
'3 Anonymous should be able to delete media A depending on "user.permissions".');
// Test as member of group A1.
$this->groupA1->addMember($this->account);
$this->clearCaches();
$view = $handler->access($this->mediaEntity1, 'view', $this->account, TRUE);
$update = $handler->access($this->mediaEntity1, 'update', $this->account, TRUE);
$delete = $handler->access($this->mediaEntity1, 'delete', $this->account, TRUE);
$this->assertTrue($view instanceof AccessResultAllowed,
'4 Member should be able to view media A.');
$this->assertTrue($update instanceof AccessResultAllowed,
'5 Member should be able to update media A.');
$this->assertTrue($delete instanceof AccessResultAllowed,
'6 Member should be able to delete media A.');
// Test outsider permissions.
$view = $handler->access($this->mediaEntity2, 'view', $this->account, TRUE);
$update = $handler->access($this->mediaEntity2, 'update', $this->account, TRUE);
$delete = $handler->access($this->mediaEntity2, 'delete', $this->account, TRUE);
$this->assertTrue($view instanceof AccessResultAllowed,
'7 Outsider should be able to view media A.');
$this->assertTrue($update instanceof AccessResultNeutral,
'8 Outsider should be able to update media A depending on "user.permissions"');
$this->assertTrue($delete instanceof AccessResultNeutral,
'9 Outsider should be able to delete media A depending on "user.permissions"');
// Test as author.
$view = $handler->access($this->mediaEntity3, 'view', $this->account, TRUE);
$update = $handler->access($this->mediaEntity3, 'update', $this->account, TRUE);
$delete = $handler->access($this->mediaEntity3, 'delete', $this->account, TRUE);
$this->assertTrue($view instanceof AccessResultAllowed,
'10 Author should be able to view media A.');
$this->assertTrue($update instanceof AccessResultAllowed,
'11 Author should be able to update media A.');
$this->assertTrue($delete instanceof AccessResultAllowed,
'12 Author should be able to delete media A.');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAccessModulePermission() {\n $this->drupalLogin($this->adminUser);\n\n // When Node is not installed, the node-permissions page is not available.\n $this->drupalGet('admin/people/permissions/module/node');\n $this->assertSession()->statusCodeEquals(403);\n\n // Modules that do not create permissions have no permissions pages.\n \\Drupal::service('module_installer')->install(['automated_cron']);\n $this->drupalGet('admin/people/permissions/module/automated_cron');\n $this->assertSession()->statusCodeEquals(403);\n $this->drupalGet('admin/people/permissions/module/node,automated_cron');\n $this->assertSession()->statusCodeEquals(403);\n\n // When Node is installed, the node-permissions page is available.\n \\Drupal::service('module_installer')->install(['node']);\n $this->drupalGet('admin/people/permissions/module/node');\n $this->assertSession()->statusCodeEquals(200);\n $this->drupalGet('admin/people/permissions/module/node,automated_cron');\n $this->assertSession()->statusCodeEquals(200);\n\n // Anonymous users cannot access any of these pages.\n $this->drupalLogout();\n $this->drupalGet('admin/people/permissions/module/node');\n $this->assertSession()->statusCodeEquals(403);\n $this->drupalGet('admin/people/permissions/module/automated_cron');\n $this->assertSession()->statusCodeEquals(403);\n $this->drupalGet('admin/people/permissions/module/node,automated_cron');\n $this->assertSession()->statusCodeEquals(403);\n }",
"public function testRoleGroups()\n {\n }",
"public function testGetUserGroups()\n {\n }",
"private function setGroup() {\n if (Request::has(\"include-group-read\") && Request::input(\"include-group-read\") === \"true\") { $permissionRead = 4; } else { $permissionRead = 0; }\n if (Request::has(\"include-group-write\") && Request::input(\"include-group-write\") === \"true\") { $permissionWrite = 2; } else { $permissionWrite = 0; }\n if (Request::has(\"include-group-execute\") && Request::input(\"include-group-execute\") === \"true\") { $permissionExecute = 1; } else { $permissionExecute = 0; }\n return $permissionRead + $permissionWrite + $permissionExecute;\n }",
"function virustotalscan_check_permissions($groups_comma)\r\n{\r\n global $mybb;\r\n // daca nu a fost trimis niciun grup ca si parametru\r\n if ($groups_comma == '') return false;\r\n // se verifica posibilitatea ca nu cumva sa fie mai multe grupuri trimise ca parametru\r\n $groups = explode(\",\", $groups_comma);\r\n // se creaza vectori cu acestee grupuri\r\n $add_groups = explode(\",\", $mybb->user['additionalgroups']);\r\n // se fac teste de apartenenta\r\n if (!in_array($mybb->user['usergroup'], $groups)) { \r\n // in grupul primar nu este\r\n // verificam mai departe daca este in cel aditional, secundar\r\n if ($add_groups) {\r\n if (count(array_intersect($add_groups, $groups)) == 0)\r\n return false;\r\n else\r\n return true;\r\n }\r\n else \r\n return false;\r\n }\r\n else\r\n return true;\r\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}",
"public function testAddUserIntoGroup(){\n jAcl2DbUserGroup::createUser('robert');\n self::$grpId7 = $this->getLastId('id_aclgrp', 'jacl2_group');\n jAcl2DbUserGroup::addUserToGroup('robert', self::$grpId1);\n\n self::$groups[] = array('id_aclgrp'=>self::$grpId7,\n 'name'=>'robert',\n 'grouptype'=>2,\n 'ownerlogin'=>'robert');\n $this->assertTableContainsRecords('jacl2_group', self::$groups);\n\n self::$usergroups=array(\n array('login'=>'laurent', 'id_aclgrp'=>self::$grpId5),\n array('login'=>'max', 'id_aclgrp'=>self::$grpId6),\n array('login'=>'max', 'id_aclgrp'=>self::$defaultGroupId),\n array('login'=>'robert', 'id_aclgrp'=>self::$grpId7),\n array('login'=>'robert', 'id_aclgrp'=>self::$defaultGroupId),\n array('login'=>'robert', 'id_aclgrp'=>self::$grpId1),\n );\n $this->assertTableContainsRecords('jacl2_user_group', self::$usergroups);\n }",
"public function testQueryAccessWithNodeGrants() {\n // Create user that will be passed into the query.\n $authenticated_user = $this->createUser(array('uid' => 2), array('access content'));\n\n Database::getConnection()->insert('node_access')\n ->fields(array(\n 'nid' => $this->nodes[0]->id(),\n 'langcode' => $this->nodes[0]->language()->getId(),\n 'gid' => $authenticated_user->id(),\n 'realm' => 'search_api_test',\n 'grant_view' => 1,\n ))\n ->execute();\n\n $this->index->reindex();\n $this->index->indexItems();\n $query = Utility::createQuery($this->index);\n $query->setOption('search_api_access_account', $authenticated_user);\n $result = $query->execute();\n\n $this->assertResults($result, array('user' => array(0, 2), 'node' => array(0)));\n }",
"function group_membership_group_admin_permissions($hook, $type, $return, $params) {\n\n\t$entity = elgg_extract('entity', $params);\n\t$user = elgg_extract('user', $params);\n\n\tif (!$entity instanceof ElggGroup || !$user instanceof ElggUser || !$entity->isMember($user)) {\n\t\treturn;\n\t}\n\n\tif (check_entity_relationship($user->guid, 'group_admin', $entity->guid)) {\n\t\treturn true;\n\t}\n}",
"public function testAllPermissions()\n {\n }",
"public function testGetRestrictAccess(array $values) {\n $permission = new GroupPermission($values);\n $this->assertEquals($values['restrict access'], $permission->getRestrictAccess());\n }",
"public function testSetRoleGroups()\n {\n }",
"public function allowed_group()\n\t{\n\t\t$which = func_get_args();\n\n\t\tif ( ! count($which))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Super Admins always have access\n\t\tif (ee()->session->userdata('group_id') == 1)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tforeach ($which as $w)\n\t\t{\n\t\t\t$k = ee()->session->userdata($w);\n\n\t\t\tif ( ! $k OR $k !== 'y')\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\treturn TRUE;\n\t}",
"public function testPermissionSet()\n {\n }",
"public function testPolicyPermissions()\n {\n // User of super admin role always has permission\n $role = factory(\\App\\Models\\Role::class)->make(['name' => 'Admin']);\n $this->roleRepository->create($role);\n $admin = $this->createUser(['role' => $role]);\n $this->assertTrue($admin->isSuperAdmin());\n $this->assertTrue($admin->can('create', User::class));\n\n // User of normal role does not have permission ...\n $user = $this->createUser();\n $this->assertFalse($user->isSuperAdmin());\n $this->assertFalse($user->can('create', User::class));\n $this->assertFalse($user->can('list', User::class));\n\n // ... even if it has module permission ..\n $role = $user->getRole();\n $this->roleRepository->addPermission($role, $this->permissionRepository->findBy('name', 'use-access-module'));\n $this->assertTrue($user->can('access', 'module'));\n $this->assertFalse($user->can('master', 'module'));\n $this->assertFalse($user->can('create', User::class));\n\n // ... until final permission is added\n $this->roleRepository->addPermission($role, $this->permissionRepository->findBy('name', 'user-create'));\n $this->assertTrue($user->can('create', User::class));\n $this->assertFalse($user->can('list', User::class));\n }",
"public function test_admin_group_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'group_list']);\n $this->assertResponseCode(404);\n }",
"function testEntityGalleryAccess() {\n // Ensures user without 'access entity galleries' permission can do nothing.\n $web_user1 = $this->drupalCreateUser(array('create page entity galleries', 'edit any page entity galleries', 'delete any page entity galleries'));\n $entity_gallery1 = $this->drupalCreateEntityGallery(array('type' => 'page'));\n $this->assertEntityGalleryCreateAccess($entity_gallery1->bundle(), FALSE, $web_user1);\n $this->assertEntityGalleryAccess(array('view' => FALSE, 'update' => FALSE, 'delete' => FALSE), $entity_gallery1, $web_user1);\n\n // Ensures user with 'bypass entity gallery access' permission can do everything.\n $web_user2 = $this->drupalCreateUser(array('bypass entity gallery access'));\n $entity_gallery2 = $this->drupalCreateEntityGallery(array('type' => 'page'));\n $this->assertEntityGalleryCreateAccess($entity_gallery2->bundle(), TRUE, $web_user2);\n $this->assertEntityGalleryAccess(array('view' => TRUE, 'update' => TRUE, 'delete' => TRUE), $entity_gallery2, $web_user2);\n\n // User cannot 'view own unpublished entity galleries'.\n $web_user3 = $this->drupalCreateUser(array('access entity galleries'));\n $entity_gallery3 = $this->drupalCreateEntityGallery(array('status' => 0, 'uid' => $web_user3->id()));\n $this->assertEntityGalleryAccess(array('view' => FALSE), $entity_gallery3, $web_user3);\n\n // User cannot create entity galleries without permission.\n $this->assertEntityGalleryCreateAccess($entity_gallery3->bundle(), FALSE, $web_user3);\n\n // User can 'view own unpublished entity galleries', but another user cannot.\n $web_user4 = $this->drupalCreateUser(array('access entity galleries', 'view own unpublished entity galleries'));\n $web_user5 = $this->drupalCreateUser(array('access entity galleries', 'view own unpublished entity galleries'));\n $entity_gallery4 = $this->drupalCreateEntityGallery(array('status' => 0, 'uid' => $web_user4->id()));\n $this->assertEntityGalleryAccess(array('view' => TRUE, 'update' => FALSE), $entity_gallery4, $web_user4);\n $this->assertEntityGalleryAccess(array('view' => FALSE), $entity_gallery4, $web_user5);\n\n // Tests the default access provided for a published entity gallery.\n $entity_gallery5 = $this->drupalCreateEntityGallery();\n $this->assertEntityGalleryAccess(array('view' => TRUE, 'update' => FALSE, 'delete' => FALSE), $entity_gallery5, $web_user3);\n\n // Tests the \"edit any BUNDLE\" and \"delete any BUNDLE\" permissions.\n $web_user6 = $this->drupalCreateUser(array('access entity galleries', 'edit any page entity galleries', 'delete any page entity galleries'));\n $entity_gallery6 = $this->drupalCreateEntityGallery(array('type' => 'page'));\n $this->assertEntityGalleryAccess(array('view' => TRUE, 'update' => TRUE, 'delete' => TRUE), $entity_gallery6, $web_user6);\n\n // Tests the \"edit own BUNDLE\" and \"delete own BUNDLE\" permission.\n $web_user7 = $this->drupalCreateUser(array('access entity galleries', 'edit own page entity galleries', 'delete own page entity galleries'));\n // User should not be able to edit or delete entity galleries they do not own.\n $this->assertEntityGalleryAccess(array('view' => TRUE, 'update' => FALSE, 'delete' => FALSE), $entity_gallery6, $web_user7);\n\n // User should be able to edit or delete entity galleries they own.\n $entity_gallery7 = $this->drupalCreateEntityGallery(array('type' => 'page', 'uid' => $web_user7->id()));\n $this->assertEntityGalleryAccess(array('view' => TRUE, 'update' => TRUE, 'delete' => TRUE), $entity_gallery7, $web_user7);\n }",
"function checkActionPermissionGroup($permittedGroups) {\n if (is_array($permittedGroups) && count($permittedGroups) > 0) {\n foreach ($permittedGroups as $groupId => $allowed) {\n if ($allowed && $groupId == -2) {\n return TRUE;\n } elseif ($allowed && $this->authUser->inGroup($groupId)) {\n return TRUE;\n }\n }\n }\n return FALSE;\n }",
"function hook_roomify_rights_group_alter(&$permissions) {\n // Remove permission 'add member' for group_manager users.\n unset($permissions['group_manager']['add member']);\n}",
"public function testAllPermissionSets()\n {\n }",
"function isAdminOfThisGroup($groupId)\n{\n\t$_c_user_id = (isset($_COOKIE[$GLOBALS['c_id']]) ? $_COOKIE[$GLOBALS['c_id']] : 0);\n\n\tif ($_c_user_id != 0 && isUserLoggedIn($user_id)) {\n \n\t\t$db = new db_util();\n\n\t $sql = \"SELECT * \n\t FROM vm_group \n\t WHERE v_group_leader_id='$_c_user_id' \n\t AND v_group_id = '$groupId'\";\n\n\t $result = $db->query($sql);\n\n\t if ($result !== false) {\n\t // if there any error in sql then it will false\n\t if ($result->num_rows > 0) {\n\t // if the sql execute successful then it give \n\t \n\t return true;\n\t }\n\t }\n }\n \n return false;\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 }",
"private function validateGroup(){\n\n\t global $db;\n\t \n\t #see if this is a guest, if so, do some hard-coded checks.\n\t\tif($this->user == \"guest\"){\n\t\t if(($this->user == \"guest\") and ($this->gid == 0)){\n\t\t return(true);\n\t\t }else{\n\t\t return(false);\n\t\t }\n\t\t}else{\n\t\t\t$db->SQL = \"SELECT id FROM ebb_groups WHERE id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$validateGroup = $db->affectedRows();\n\n\t\t\tif($validateGroup == 1){\n\t\t\t return (true);\n\t\t\t}else{\n\t\t\t return(false);\n\t\t\t}\n\t\t}\n\t}",
"public function testUsersWithoutPermission() {\n // Create 3 users, each with insufficient permissions, i.e. without either\n // or both of the following permissions:\n // - the 'access in-place editing' permission\n // - the 'edit any article content' permission (necessary to edit node 1)\n $users = [\n $this->drupalCreateUser(static::$basicPermissions),\n $this->drupalCreateUser(array_merge(static::$basicPermissions, ['edit any article content'])),\n $this->drupalCreateUser(array_merge(static::$basicPermissions, ['access in-place editing'])),\n ];\n\n // Now test with each of the 3 users with insufficient permissions.\n foreach ($users as $user) {\n $this->drupalLogin($user);\n $this->drupalGet('node/1');\n\n // Ensure the text is transformed.\n $this->assertSession()->responseContains('<p>Do you also love Drupal?</p><figure role=\"group\" class=\"caption caption-img\"><img src=\"druplicon.png\" /><figcaption>Druplicon</figcaption></figure>');\n\n $client = $this->getHttpClient();\n\n // Retrieving the untransformed text should result in a 403 response and\n // return a different error message depending of the missing permission.\n $response = $client->post($this->buildUrl('editor/node/1/body/en/full'), [\n 'query' => http_build_query([MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']),\n 'cookies' => $this->getSessionCookies(),\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/x-www-form-urlencoded',\n ],\n 'http_errors' => FALSE,\n ]);\n\n $this->assertEquals(403, $response->getStatusCode());\n if (!$user->hasPermission('access in-place editing')) {\n $message = \"The 'access in-place editing' permission is required.\";\n }\n else {\n $message = \"The 'edit any article content' permission is required.\";\n }\n\n $body = Json::decode($response->getBody());\n $this->assertSame($message, $body['message']);\n }\n }",
"public function testAccess() {\n\n $this->drupalGet('udb3/api/1.0/user');\n $this->assertResponse('403');\n\n }",
"public function testAddGroupFailsIfLackingPermissions(): void\n {\n $this->expectException(\\Exception::class);\n $this->slimStub->shouldReceive('halt')->times(1)->with(403, '{\"status\":403,\"message\":\"Access Denied\",\"title\":\"You do not have the permission: manage_groups\"}')->andThrow(new \\Exception);\n\n $this->userController->_add_group();\n }",
"public function create(User $user)\n {\n return $user->hasPermissions(['group_create']);\n }",
"public function canAccess(string $myGroup, string $wantedGroup): bool;",
"public function testNoPermission(){\n $noAccessUser = $this->drupalCreateUser([]);\n $this->drupalLogin($noAccessUser);\n $this->drupalGet('connect-four');\n $this->assertSession()->statusCodeEquals(403);\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 testPrivs()\n {\n return true;\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 }",
"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 testNodeViewAccess() {\n\n // Ensures user with 'access content' can't access node if specific\n // 'view type content' is not assigned.\n $web_user = $this->drupalCreateUser(array('access content'));\n $this->assertNodeAccess(array('view' => FALSE), $this->pageNode, $web_user);\n $this->assertNodeAccess(array('view' => FALSE), $this->articleNode, $web_user);\n\n // Ensures user without 'access content' can't access node even if\n // 'view type content' is assigned.\n $no_access_user = $this->drupalCreateUser(array(\n 'view article content',\n 'view page content',\n ));\n $this->assertNodeAccess(array('view' => FALSE), $this->pageNode, $no_access_user);\n $this->assertNodeAccess(array('view' => FALSE), $this->articleNode, $no_access_user);\n\n // Ensures user with 'view page content' can see node of type page but\n // not node of type article.\n $page_user = $this->drupalCreateUser(array(\n 'access content',\n 'view page content',\n ));\n $this->assertNodeAccess(array('view' => TRUE), $this->pageNode, $page_user);\n $this->assertNodeAccess(array('view' => FALSE), $this->articleNode, $page_user);\n\n // Ensures user with 'view article content' can see node of type article\n // but not node of type page.\n $article_user = $this->drupalCreateUser(array(\n 'access content',\n 'view article content',\n ));\n $this->assertNodeAccess(array('view' => FALSE), $this->pageNode, $article_user);\n $this->assertNodeAccess(array('view' => TRUE), $this->articleNode, $article_user);\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 testAddGroupPermissionFailsIfLackingPermissions(): void\n {\n $this->expectException(\\Exception::class);\n $this->slimStub->shouldReceive('halt')->times(1)->with(403, '{\"status\":403,\"message\":\"Access Denied\",\"title\":\"You do not have the permission: manage_groups\"}')->andThrow(new \\Exception);\n\n $this->userController->_add_group_permission();\n }",
"public function isUserOrGroupSet() {}",
"public function elevatePremissions() {\n\t\tif($user->group == 'USR'){\n\t\t\t$user->group = \"ROOT\";\n\t\t}\n\t\telse{\n\t\t\tthrow new Exception('This user group cannot elevate permissions');\n\t\t}\n\t}",
"public function testFilterNodeAccess() {\n $this->drupalLogin($this->users[0]);\n $this->drupalGet('test_filter_node_access');\n // Test that the private node of the current user is shown.\n $this->assertSession()->pageTextContains('Private Article created by ' . $this->users[0]->getAccountName());\n // Test that the private node of the other use isn't shown.\n $this->assertSession()->pageTextNotContains('Private Article created by ' . $this->users[1]->getAccountName());\n // Test that both public nodes are shown.\n $this->assertSession()->pageTextContains('Public Article created by ' . $this->users[0]->getAccountName());\n $this->assertSession()->pageTextContains('Public Article created by ' . $this->users[1]->getAccountName());\n\n // Switch users and test the other private node is shown.\n $this->drupalLogin($this->users[1]);\n $this->drupalGet('test_filter_node_access');\n // Test that the private node of the current user is shown.\n $this->assertSession()->pageTextContains('Private Article created by ' . $this->users[1]->getAccountName());\n // Test that the private node of the other use isn't shown.\n $this->assertSession()->pageTextNotContains('Private Article created by ' . $this->users[0]->getAccountName());\n\n // Test that a user with administer nodes permission can't see all nodes.\n $administer_nodes_user = $this->drupalCreateUser([\n 'access content',\n 'administer nodes',\n ]);\n $this->drupalLogin($administer_nodes_user);\n $this->drupalGet('test_filter_node_access');\n $this->assertSession()->pageTextNotContains('Private Article created by ' . $this->users[0]->getAccountName());\n $this->assertSession()->pageTextNotContains('Private Article created by ' . $this->users[1]->getAccountName());\n $this->assertSession()->pageTextContains('Public Article created by ' . $this->users[0]->getAccountName());\n $this->assertSession()->pageTextContains('Public Article created by ' . $this->users[1]->getAccountName());\n\n // Test that a user with bypass node access can see all nodes.\n $bypass_access_user = $this->drupalCreateUser([\n 'access content',\n 'bypass node access',\n ]);\n $this->drupalLogin($bypass_access_user);\n $this->drupalGet('test_filter_node_access');\n $this->assertSession()->pageTextContains('Private Article created by ' . $this->users[0]->getAccountName());\n $this->assertSession()->pageTextContains('Private Article created by ' . $this->users[1]->getAccountName());\n $this->assertSession()->pageTextContains('Public Article created by ' . $this->users[0]->getAccountName());\n $this->assertSession()->pageTextContains('Public Article created by ' . $this->users[1]->getAccountName());\n }",
"function canBeAccessedByUser($user)\n\t{\n\t\tif($user->isRoot())\n\t\t\treturn true;\n\n\t\tif($this->get('id') == $this->root_group_id)\n\t\t\treturn false;\n\t\t\t\n\t\treturn true;\n\t}",
"public function testAccessContentPermission() {\n $this->drupalLogin($this->adminUser);\n\n // When Node is not installed the 'access content' permission is listed next\n // to 'access site reports'.\n $this->drupalGet('admin/people/permissions');\n $next_row = $this->xpath('//tr[@data-drupal-selector=\\'edit-permissions-access-content\\']/following-sibling::tr[1]');\n $this->assertEquals('edit-permissions-access-site-reports', $next_row[0]->getAttribute('data-drupal-selector'));\n\n // When Node is installed the 'access content' permission is listed next to\n // to 'view own unpublished content'.\n \\Drupal::service('module_installer')->install(['node']);\n $this->drupalGet('admin/people/permissions');\n $next_row = $this->xpath('//tr[@data-drupal-selector=\\'edit-permissions-access-content\\']/following-sibling::tr[1]');\n $this->assertEquals('edit-permissions-view-own-unpublished-content', $next_row[0]->getAttribute('data-drupal-selector'));\n }",
"public function test_super_user()\n {\n // This guy is the super user with fresh install.\n $user = User::find(1);\n $this->assertTrue($user->hasRole('Super User'));\n\n // Because he's a super user, the ModelPolicy should allow him to do anything.\n $this->assertTrue($user->can('view', 'Birdmin\\Page'));\n $this->assertTrue($user->can('edit', 'Birdmin\\Page'));\n $this->assertTrue($user->can('delete', 'Birdmin\\Page'));\n $this->assertTrue($user->can('create', 'Birdmin\\Page'));\n $this->assertTrue($user->can('manage', 'Birdmin\\User'));\n\n // Non-existent permissions should always return true when tested.\n $this->assertTrue($user->can('wrong', 'Birdmin\\Page'));\n\n }",
"public function isAuthorized($user){\n /*\n * \n 1 \tAdmin\n 2 \tOfficer / Manager\n 3 \tRead Only\n 4 \tStaff\n 5 \tUser / Operator\n 6 \tStudent\n 7 \tLimited\n */\n \n //managers can add / edit\n if (in_array($this->request->action, ['delete','add','edit','reorder'])) {\n if ($user['group_id'] <= 4) {\n return true;\n }\n }\n \n \n //Admins have all\n return parent::isAuthorized($user);\n }",
"public function testUserPermissionChanges() {\n $permissions_hash_generator = $this->container->get('user_permissions_hash_generator');\n\n $storage = $this->container->get('entity_type.manager')->getStorage('user_role');\n\n // Create an additional role and mark it as admin role.\n Role::create(['is_admin' => TRUE, 'id' => 'administrator', 'label' => 'Administrator'])->save();\n $storage->resetCache();\n\n $this->drupalLogin($this->adminUser);\n $rid = $this->rid;\n $account = $this->adminUser;\n $previous_permissions_hash = $permissions_hash_generator->generate($account);\n $this->assertSame($previous_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));\n\n // Add a permission.\n $this->assertFalse($account->hasPermission('administer users'), 'User does not have \"administer users\" permission.');\n $edit = [];\n $edit[$rid . '[administer users]'] = TRUE;\n $this->drupalGet('admin/people/permissions');\n $this->submitForm($edit, 'Save permissions');\n $this->assertSession()->pageTextContains('The changes have been saved.');\n $storage->resetCache();\n $this->assertTrue($account->hasPermission('administer users'), 'User now has \"administer users\" permission.');\n $current_permissions_hash = $permissions_hash_generator->generate($account);\n $this->assertSame($current_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));\n $this->assertNotEquals($previous_permissions_hash, $current_permissions_hash, 'Permissions hash has changed.');\n $previous_permissions_hash = $current_permissions_hash;\n\n // Remove a permission.\n $this->assertTrue($account->hasPermission('access user profiles'), 'User has \"access user profiles\" permission.');\n $edit = [];\n $edit[$rid . '[access user profiles]'] = FALSE;\n $this->drupalGet('admin/people/permissions');\n $this->submitForm($edit, 'Save permissions');\n $this->assertSession()->pageTextContains('The changes have been saved.');\n $storage->resetCache();\n $this->assertFalse($account->hasPermission('access user profiles'), 'User no longer has \"access user profiles\" permission.');\n $current_permissions_hash = $permissions_hash_generator->generate($account);\n $this->assertSame($current_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));\n $this->assertNotEquals($previous_permissions_hash, $current_permissions_hash, 'Permissions hash has changed.');\n\n // Permissions can be changed using the module-specific pages with the same\n // result.\n $edit = [];\n $edit[$rid . '[access user profiles]'] = TRUE;\n $this->drupalGet('admin/people/permissions/module/user');\n $this->submitForm($edit, 'Save permissions');\n $this->assertSession()->pageTextContains('The changes have been saved.');\n $storage->resetCache();\n $this->assertTrue($account->hasPermission('access user profiles'), 'User again has \"access user profiles\" permission.');\n $current_permissions_hash = $permissions_hash_generator->generate($account);\n $this->assertSame($current_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));\n $this->assertEquals($previous_permissions_hash, $current_permissions_hash, 'Permissions hash has reverted.');\n\n // Ensure that the admin role doesn't have any checkboxes.\n $this->drupalGet('admin/people/permissions');\n foreach (array_keys($this->container->get('user.permissions')->getPermissions()) as $permission) {\n $this->assertSession()->checkboxChecked('administrator[' . $permission . ']');\n $this->assertSession()->fieldDisabled('administrator[' . $permission . ']');\n }\n }",
"public function test_no_group_memberships_group_node_appears_userid_filter() {\n\n // User 1 is in no groups. Ought to show up with groupid of 0. This ought to give us\n // a single node for groupid 0 with a count of 1.\n $params = array(\n 'coursemoduleid' => $this->assign1->cmid,\n 'groupid' => 0,\n 'userid' => 'nextnodefilter',\n );\n\n $nodes = block_ajax_marking_nodes_builder_base::unmarked_nodes($params);\n $this->assertCount(1, $nodes, 'Too many nodes!');\n $node = reset($nodes);\n\n $this->assertObjectHasAttribute('userid', $node);\n $this->assertEquals($this->user1->id, $node->userid, 'Wrong userid returned for groupid 0');\n $this->assertEquals(1, $node->itemcount);\n }",
"public function testCreatePermissionSet()\n {\n }",
"function isGroupAdmin($authorisers)\r\n{\r\n if ($authorisers == 999 || $authorisers == 0)\r\n return false;\r\n\r\n\treturn in_array($authorisers, $GLOBALS['group_membership']) \r\n\t\t\t|| \r\n\t\t\t\tin_array(2, $GLOBALS['group_membership']);\r\n}",
"public function checkPermissions();",
"public function test_no_group_memberships_group_node_appears_groupid_filter() {\n\n // User 1 is in no groups. Ought to show up with groupid of 0. This ought to give us\n // a single node for groupid 0 with a count of 1.\n $params = array(\n 'coursemoduleid' => $this->assign1->cmid,\n 'groupid' => 'nextnodefilter',\n );\n\n $nodes = block_ajax_marking_nodes_builder_base::unmarked_nodes($params);\n\n $this->assertNotEmpty($nodes, 'No nodes returned');\n\n $foundnode = new stdClass();\n $count = 0;\n foreach ($nodes as $node) {\n if ($node->groupid == 0) {\n $count++;\n $foundnode = $node;\n break;\n }\n }\n\n $this->assertEquals(1, $count, 'Too many nodes found');\n $this->assertObjectHasAttribute('groupid', $foundnode);\n $this->assertEquals(0, $foundnode->groupid, 'Nothing returned for groupid 0');\n $this->assertEquals(1, $foundnode->itemcount);\n }",
"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 testOgRole() {\n $roles = OgRole::loadMultiple();\n\n $this->assertEquals(7, count($roles), '7 roles were migrated.');\n\n // Asserts that the non-member role has subscribe permission.\n $anonymousRole = OgRole::load('node-test_content_type-non-member');\n $this->assertEquals(['subscribe'], $anonymousRole->getPermissions());\n\n // Asserts permissions on administrative role.\n $adminRole = OgRole::load('node-test_content_type-administrator');\n $expected = [\n 'add user',\n 'administer group',\n 'approve and deny subscription',\n 'manage members',\n 'manage permissions',\n 'manage roles',\n 'update group',\n ];\n $this->assertEquals($expected, $adminRole->getPermissions());\n\n // Asserts permissions for content creator role.\n $contentRole = OgRole::load('node-test_content_type-content-creator');\n $expected = [\n 'create article content',\n 'create page content',\n ];\n $this->assertEquals($expected, $contentRole->getPermissions());\n }",
"public function userInGroup()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\t$group = FormUtil::getPassedValue('group', null);\n\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\t\tif($group == null) {\n\t\t\treturn self::retError('ERROR: No group passed!');\n\t\t}\n\n\t\t$uid = UserUtil::getIdFromName($uname);\n\t\tif($uid == false) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\tif($group == 'admin') {\n\t\t\tif(SecurityUtil::checkPermission('Owncloud::Admin', '::', ACCESS_MODERATE, $uid)) {\n\t\t\t\t$return = true;\n\t\t\t} else {\n\t\t\t\t$return = false;\n\t\t\t}\n\t\t} else {\n\t\t\t$groups = UserUtil::getGroupsForUser($uid);\n\t\t\t$return = false;\n\t\t\tforeach($groups as $item) {\n\t\t\t\t$itemgroup = UserUtil::getGroup($item);\n\t\t\t\tif($itemgroup['name'] == $group) {\n\t\t\t\t\t$return = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn self::ret($return);\n\t}",
"function hook_mm_ensure_node_access_check_perm_alter(&$permission, $item) {\n $path = key($item);\n switch ($path) {\n // Require elevated permissions for some path.\n case 'node/%/foo/bar':\n $permission = MM_PERMS_WRITE;\n break;\n // Remove the MM permission check for some other path.\n case 'node/%/baz/foo':\n $permission = '';\n break;\n }\n}",
"public function testContentAccessWithNodeGrants() {\n $items = array();\n foreach ($this->comments as $comment) {\n $items[] = array(\n 'datasource' => 'entity:comment',\n 'item' => $comment->getTypedData(),\n 'item_id' => $comment->id(),\n 'field_text' => $this->randomMachineName(),\n );\n }\n $items = $this->generateItems($items);\n\n $this->processor->preprocessIndexItems($items);\n\n foreach ($items as $item) {\n $this->assertEqual($item->getField('search_api_node_grants')->getValues(), array('node_access_search_api_test:0'));\n }\n }",
"function check_permissions($required_permission,$redirect_url)\n\t{\n\t\tglobal $userdata, $template, $db, $SID, $lang, $phpEx, $phpbb_root_path, $garage_config, $board_config;\n\t\n\t\t$required_permission = strtolower($required_permission);\n\t\n\t\t//Right Lets Start And Work Out Your User Level\n\t\tif ( $userdata['user_id'] == ANONYMOUS )\n\t\t{\n\t\t\t$your_level = 'GUEST';\n\t\t}\n\t\telse if ( $userdata['user_level'] == ADMIN )\n\t\t{\n\t\t\t$your_level = 'ADMIN';\n\t\t}\n\t\telse if ( $userdata['user_level'] == MOD )\n\t\t{\n\t\t\t$your_level = 'MOD';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$your_level = 'USER';\n\t\t}\t\t\n\t\n\t\tif ($garage_config[$required_permission.\"_perms\"] == '*')\n\t\t{\n\t\t\t//Looks Like Everyone Is Allowed Do This...So On Your Way\n\t\t\treturn (TRUE);\n\t\t}\t\n\t\t//Since Not Globally Allowed Lets See If Your Level Is Allowed For The Permission You Are Requesting\n\t\telse if (preg_match( \"/$your_level/\", $garage_config[$required_permission.\"_perms\"]))\n\t\t{\n\t\t\t//Good News Your User Level Is Allowed\n\t\t\treturn (TRUE);\n\t\t}\n\t\t//Right We Need To Resort And See If Private Is Set For This Required Permission And See If You Qualify\n\t\telse if (preg_match( \"/PRIVATE/\", $garage_config[$required_permission.\"_perms\"]))\n\t\t{\n\t\t\t//Right We Need To See If You Are In Any User Group Granted This Permission\n\t\t\t$sql = \"SELECT ug.group_id, g.group_name\n\t \t\tFROM \" . USER_GROUP_TABLE . \" AS ug, \" . GROUPS_TABLE .\" g\n\t WHERE ug.user_id = \" . $userdata['user_id'] . \"\n\t\t\t\t\tand ug.group_id = g.group_id and g.group_single_user <> \" . TRUE .\"\n\t\t\t\tORDER BY g.group_name ASC\";\n\t \tif( !($result = $db->sql_query($sql)) )\n\t \t\t{\n\t \t\tmessage_die(GENERAL_ERROR, 'Could Not Select Groups', '', __LINE__, __FILE__, $sql);\n\t \t\t}\n\t\n\t\t\t//Lets Populate An Array With All The Groups You Are Part Of\n\t\t\twhile( $grouprow = $db->sql_fetchrow($result) )\n\t\t\t{\n\t\t\t\t$groupdata[] = $grouprow;\n\t\t\t}\n\t\n\t\t\t//Lets Get All Private Groups Granted This Permission\n\t\t\t$sql = \"SELECT config_value as private_groups\n\t\t\t\tFROM \". GARAGE_CONFIG_TABLE .\"\n\t\t\t\tWHERE config_name = 'private_\".$required_permission.\"_perms'\";\n\t\t\tif( !$result = $db->sql_query($sql) )\n\t\t\t{\n\t\t\t\tmessage_die(GENERAL_ERROR, 'Could not get permissions', '', __LINE__, __FILE__, $sql);\n\t\t\t}\n\t\t\t$private_perms = $db->sql_fetchrow($result);\n\t\t\t$private_groups = @explode(',', $private_perms['private_groups']);\n\t\n\t\t\tfor ($i = 0; $i < count($groupdata); $i++)\n\t\t\t{\n\t\t\t\tif (in_array($groupdata[$i]['group_id'], $private_groups))\n\t\t\t\t{\n\t\t\t\t\treturn (TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Looks Like You Are Out Of Look...You Are Not Allowed Perform The Action You Requested...\n\t\tif (!empty($redirect_url))\n\t\t{\n\t\t\tredirect(append_sid(\"$redirect_url\", true));\n\t\t}\n\t\t//No URL To Redirect So We Will Just Return FALSE\n\t\telse\n\t\t{\n\t\t\treturn (FALSE);\n\t\t}\n\t}",
"function group_is_only_admin($groupid, $userid=null) {\n static $result;\n\n $groupid = group_param_groupid($groupid);\n $userid = group_param_userid($userid);\n\n if (isset($result[$groupid][$userid])) {\n return $result[$groupid][$userid];\n }\n\n return $result[$groupid][$userid] = (group_user_access($groupid, $userid) == 'admin'\n && count_records('group_member', 'group', $groupid, 'role', 'admin') == 1);\n}",
"function group_can_change_role($groupid, $userid, $role) {\n $groupid = group_param_groupid($groupid);\n $userid = group_param_userid($userid);\n\n if (!group_user_access($groupid, $userid)) {\n return false;\n }\n\n // Sole remaining admins can never change their role\n if (group_is_only_admin($groupid, $userid)) {\n return false;\n }\n\n // admin role permissions check\n if ($role == 'admin') {\n $group = group_current_group();\n $user = new User();\n $user->find_by_id($userid);\n safe_require('grouptype', $group->grouptype);\n return in_array($group->jointype, call_static_method('GroupType' . $group->grouptype, 'user_allowed_join_types', $user));\n }\n\n return true;\n}",
"private function checkUserAdministrator():bool\n {\n $user = JFactory::getUser();\n if (in_array(8, $user->groups)) {\n return true;\n }\n return false;\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 testAvailableGroupOperations()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function allowed_group_any()\n\t{\n\t\t$which = func_get_args();\n\n\t\tif ( ! count($which))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Super Admins always have access\n\t\tif (ee()->session->userdata('group_id') == 1)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t$result = FALSE;\n\n\t\tforeach ($which as $w)\n\t\t{\n\t\t\t$k = ee()->session->userdata($w);\n\n\t\t\tif ($k === TRUE OR $k == 'y')\n\t\t\t{\n\t\t\t\t$result = TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function testSetRestrictAccess(array $values) {\n $permission = new GroupPermission();\n $permission->setRestrictAccess($values['restrict access']);\n $this->assertEquals($values['restrict access'], $permission->get('restrict access'));\n }",
"public function testChown_Chgrp()\n {\n if (!function_exists('posix_getuid')) $this->markTestSkipped(\"Posix functions not available: I don't know if I'm root.\");\n \tif (posix_getuid() !== 0) $this->markTestSkipped(\"Can only chown as root.\");\n\n \t$sysusr = posix_getpwuid(3);\n \tif (!$sysusr) $this->markTestSkipped(\"The system has no user with uid 3, which is used in the test.\");\n\n \t$sysgrp = posix_getgrgid(2);\n \tif (!$sysgrp) $this->markTestSkipped(\"The system has no group with gid 2, which is used in the test.\");\n\n clearstatcache(false, $this->file);\n $this->Fs_Node->chown(array($sysusr['name'], $sysgrp['name']));\n $this->assertEquals(3, fileowner($this->file));\n $this->assertEquals(2, filegroup($this->file));\n\n clearstatcache(false, $this->file);\n $this->Fs_Node->chown(array(0, 0));\n $this->assertEquals(0, fileowner($this->file));\n $this->assertEquals(0, filegroup($this->file));\n }",
"function checkRights(&$db,&$user)\r\n{\r\n\treturn $user->hasRight($db,\"testplan_execute\") && $user->hasRight($db,\"exec_edit_notes\");\r\n}",
"public function canCreateSitegroups() {\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!$viewer || !$viewer->getIdentity()) {\n return false;\n }\n\n // Must be able to view Sitegroups\n if (!Engine_Api::_()->authorization()->isAllowed('sitegroup_group', $viewer, 'view')) {\n return false;\n }\n\n // Must be able to create Sitegroups\n if (!Engine_Api::_()->authorization()->isAllowed('sitegroup_group', $viewer, 'create')) {\n return false;\n }\n return true;\n }",
"public static function grantMod( $usr, $user, $group ) {\n\t\tif( !Group::isMod( $group, $usr ) ) return false;\n\t\t\tif(!($db = new DB()) ) return false;\n\t\t\t$result = $db->query( \"UPDATE `group_participants` SET `mod`=1 WHERE `group_id` Like '§0' AND `user_id` Like '§1'\",[$group,$user]);\n\t\t\tLog::msg( \"Groups\", \"$usr granted $user moderator rights in $group\" );\n\t\t\treturn true;\n\t}",
"function isMemberOfThisGroup($groupId)\n{\n\t$_c_user_id = (isset($_COOKIE[$GLOBALS['c_id']]) ? $_COOKIE[$GLOBALS['c_id']] : 0);\n\n\tif ($_c_user_id != 0 && isUserLoggedIn()) {\n \n\t\t$db = new db_util();\n\n\t $sql = \"SELECT * \n\t FROM vm_member_list \n\t WHERE vm_member_id='$_c_user_id' \n\t AND vm_group_id = '$groupId'\";\n\n\t $result = $db->query($sql);\n\n\t if ($result !== false) {\n\t // if there any error in sql then it will false\n\t if ($result->num_rows > 0) {\n\t // if the sql execute successful then it give \n\t \n\t return true;\n\t }\n\t }\n }\n \n return false;\n}",
"public function testUserAccess() {\n $this->drupalGet('user/' . $this->adminUser->id() . '/payment-methods');\n $this->assertSession()->statusCodeEquals(403);\n\n $this->drupalGet('user/' . $this->adminUser->id() . '/payment-methods/add');\n $this->assertSession()->statusCodeEquals(403);\n\n $this->drupalLogout();\n // Ensure anonymous users don't have access to the manage payment methods\n // page, even if either the \"manage own payment methods\" permission or\n // the \"administer commerce_payment_method\" is granted.\n $role = Role::load(AccountInterface::ANONYMOUS_ROLE);\n $role->grantPermission('manage own commerce_payment_method');\n $role->grantPermission('administer commerce_payment_method');\n $role->trustData()->save();\n $this->drupalGet('user/0/payment-methods');\n $this->assertSession()->statusCodeEquals(403);\n\n $this->drupalGet('user/0/payment-methods/add');\n $this->assertSession()->statusCodeEquals(403);\n }",
"public function iShouldBeAbleToLeaveTheGroup()\n {\n $main = $this->getMainContext();\n /** @var \\Behat\\MinkExtension\\Context\\MinkContext $mink */\n $mink = $main->getSubcontext('mink');\n\n $mink->clickLink('My profile');\n $this->waitForPageToLoad();\n\n $mink->clickLink('Leave group');\n $this->waitForPageToLoad();\n\n $mink->pressButton('Leave the Group');\n $this->waitForPageToLoad();\n\n $mink->assertPageContainsText(\"You've left\");\n }",
"function mysteam_filter_groups($user)\n{\n\tglobal $mybb;\n\tstatic $gids;\n\n\t// Return true if no usergroups to filter from.\n\tif (!$mybb->settings['mysteam_limitbygroup'])\n\t{\n\t\treturn true;\n\t}\n\t\n\t// Check if the user is in an authorized usergroup.\n\tif (empty($gids))\n\t{\n\t\t$gids = explode(',', $mybb->settings['mysteam_limitbygroup']);\n\t\t\t\n\t\tif (is_array($gids))\n\t\t{\n\t\t\t$gids = array_map('intval', $gids);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$gids = (int) $mybb->settings['mysteam_limitbygroup'];\n\t\t}\n\t}\n\t\t\n\t$usergroups = explode(',', $user['additionalgroups']);\n\t$usergroups[] = $user['usergroup'];\n\t\n\tif (!is_array($usergroups))\n\t{\n\t\t$usergroups = array($usergroups);\n\t}\n\t\n\tif (array_intersect($usergroups, $gids))\n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}",
"public function test_manage_checklist_groups()\n {\n $response = $this->post('admin/checklist_groups', [\n 'name' => 'First group'\n ]);\n $response->assertRedirect('welcome');\n\n $group = ChecklistGroup::where('name', 'First group')->first();\n $this->assertNotNull($group);\n\n // Test EDITING the checklist group\n $response = $this->get('admin/checklist_groups/' . $group->id . '/edit');\n $response->assertStatus(200);\n\n $response = $this->put('admin/checklist_groups/' . $group->id, [\n 'name' => 'Updated first group'\n ]);\n $response->assertRedirect('welcome');\n\n $group = ChecklistGroup::where('name', 'Updated first group')->first();\n $this->assertNotNull($group);\n\n $menu = (new MenuService())->get_menu();\n $this->assertEquals(1, $menu['admin_menu']->where('name', 'Updated first group')->count());\n\n // Test DELETING the checklist group\n $response = $this->delete('admin/checklist_groups/' . $group->id);\n $response->assertRedirect('welcome');\n\n $group = ChecklistGroup::where('name', 'Updated first group')->first();\n $this->assertNull($group);\n\n $menu = (new MenuService())->get_menu();\n $this->assertEquals(0, $menu['admin_menu']->where('name', 'Updated first group')->count());\n }",
"public function testAccess() {\n $assert_session = $this->assertSession();\n\n $this->drupalLogin($this->drupalCreateUser([\n 'configure any layout',\n 'administer node display',\n ]));\n\n $field_ui_prefix = 'admin/structure/types/manage/bundle_with_section_field';\n // Allow overrides for the layout.\n $this->drupalGet(\"{$field_ui_prefix}/display/default\");\n $this->submitForm(['layout[enabled]' => TRUE], 'Save');\n $this->drupalGet(\"{$field_ui_prefix}/display/default\");\n $this->submitForm(['layout[allow_custom]' => TRUE], 'Save');\n\n $this->drupalLogin($this->drupalCreateUser(['configure any layout']));\n $this->drupalGet('node/1');\n $assert_session->pageTextContains('The first node body');\n $assert_session->pageTextNotContains('Powered by Drupal');\n $node = Node::load(1);\n $node->setUnpublished();\n $node->save();\n $this->drupalGet('node/1');\n $assert_session->pageTextNotContains('The first node body');\n $assert_session->pageTextContains('Access denied');\n\n $this->drupalGet('node/1/layout');\n $assert_session->pageTextNotContains('The first node body');\n $assert_session->pageTextContains('Access denied');\n }",
"public function testRemoveUserFromGroup(){\n jAcl2DbUserGroup::removeUserFromGroup('robert', self::$grpId1);\n\n self::$usergroups=array(\n array('login'=>'laurent', 'id_aclgrp'=>self::$grpId5),\n array('login'=>'max', 'id_aclgrp'=>self::$grpId6),\n array('login'=>'max', 'id_aclgrp'=>self::$defaultGroupId),\n array('login'=>'robert', 'id_aclgrp'=>self::$grpId7),\n array('login'=>'robert', 'id_aclgrp'=>self::$defaultGroupId),\n );\n $this->assertTableContainsRecords('jacl2_user_group', self::$usergroups);\n\n }",
"public function test_group_one_group_node_appears_groupid_filter() {\n\n $params = array(\n 'coursemoduleid' => $this->assign1->cmid,\n 'groupid' => 'nextnodefilter',\n );\n\n $nodes = block_ajax_marking_nodes_builder_base::unmarked_nodes($params);\n\n $this->assertNotEmpty($nodes, 'No nodes returned');\n\n $foundnode = new stdClass();\n $count = 0;\n foreach ($nodes as $node) {\n if ($node->groupid == $this->group1->id) {\n $count++;\n $foundnode = $node;\n break;\n }\n }\n\n $this->assertNotEquals(0, $count, 'No nodes returned for groupid '.$this->group1->id);\n $this->assertEquals(1, $count, 'Too many nodes found');\n $this->assertEquals(1, $foundnode->itemcount, 'User should be hidden here due to other goup membership');\n }",
"function request($username, $groupid){\n \t$con = new mysqli('localhost','heng','@powell135','200ok');\n\tif ($con -> connect_errno){\n\t\treturn CONNECTION_FAIL;\n\t}\n\t$status = REQUEST;\n\t$requester_permission = getGroupPermission($groupid,$username);\n\t\n\tif($requester_permission == MANAGER)\n\t\treturn FAIL;\n\n\t$permission = DEVELOPER;\n\t$query = \"insert into jnjn_user_group (groupid, username, status, permission) values('$groupid', '$username', '$status', '$permission')\";\n\tif($con -> query($query))\n\t\treturn SUCCESS;\n\telse\n\t\treturn FAIL;\n }",
"public function test_group_two_group_node_appears_groupid_filter() {\n\n $params = array(\n 'coursemoduleid' => $this->assign1->cmid,\n 'groupid' => 'nextnodefilter',\n );\n\n $nodes = block_ajax_marking_nodes_builder_base::unmarked_nodes($params);\n\n $this->assertNotEmpty($nodes, 'No nodes returned');\n\n $foundnode = new stdClass();\n $count = 0;\n foreach ($nodes as $node) {\n if ($node->groupid == $this->group2->id) {\n $count++;\n $foundnode = $node;\n break;\n }\n }\n\n $this->assertNotEquals(0, $count, 'No nodes returned for groupid '.$this->group2->id);\n $this->assertEquals(1, $count, 'Too many nodes found');\n $this->assertEquals(1, $foundnode->itemcount,\n 'User should be hidden here due to other goup membership');\n }",
"function db_user_is_member_of_group($username, $groupname, $snuuid)\n{\n\t$sql = \"SELECT creation FROM group_members\n\t\tWHERE username=$1\n\t\tAND groupname=$2\n\t\tAND snuuid=$3\";\n\t$res = pg_query_params($sql, array($username, $groupname, $snuuid));\n\treturn pg_num_rows($res) != 0;\n}",
"public function isAccessible() {\n\t\treturn UserGroup::isAccessibleGroup(array($this->groupID));\n\t}",
"public function changeUserGroup()\n {\n $userId = $this->request->variable('user_id',0);\n $groupId = $this->request->variable('group_id',9999);\n\n if($userId === 0 || $groupId === 9999)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => ['User ID was not supplied']\n ]);\n }\n\n /**\n * Group IDs\n * 5 - ADMIN\n * 4 - GLOBAL MOD\n * 2 - REGISTERED\n */\n $arrGroups = group_memberships(false, [$userId]);\n\n $arrCurrentGroupIds = [];\n\n // Get the user's current groups\n foreach($arrGroups as $group)\n {\n $arrCurrentGroupIds[$group['group_id']] = $group['group_id'];\n }\n\n // If the new group is 'registered user' we need to remove the user from\n // any admin or moderator groups they were previously in\n if($groupId < 4)\n {\n // User was an admin - remove them from the admin group\n if(in_array(5,$arrCurrentGroupIds))\n {\n group_user_del(5,[$userId]);\n }\n\n // User was a global mod - remove them from the global mod group\n if(in_array(4,$arrCurrentGroupIds))\n {\n group_user_del(4,[$userId]);\n }\n }\n\n // If the user is being made an admin, make sure they are a global mod too\n if($groupId == 5 AND !in_array(4,$arrCurrentGroupIds))\n {\n group_user_add(4, [$userId],false, false, false);\n }\n\n // User could already have the group they need if they are\n // being downgraded. Check if they have the group and\n // if not, add them. If they were, then make it the default\n if(!in_array($groupId,$arrCurrentGroupIds))\n {\n group_user_add($groupId, [$userId],false, false, true);\n }\n else\n {\n group_set_user_default($groupId,[$userId]);\n }\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user\\'s group was updated',\n 'data' => [\n 'user_id' => $userId,\n 'group_id' => $groupId\n ]\n ]);\n }",
"function permissions_grant_user ($user, $dir, $file, $action)\n{\n\t$permissions = user_get_permissions($user);\n\n\t// determine the permission definitions\n\t$permdefs = permissions_get();\n\n\t// the user with the name \"admin\" always has admin rights\n\tif ($action == \"admin\" && $user == \"admin\")\n\t\treturn true;\n\n\t// check if the action is allowed\n\treturn ($permdefs[$action] & $permissions) != 0;\n}",
"function checkAccess($group, $accessRequired) {\n if ($group > $accessRequired) {\n $retval = 0;\n header('Location: index.php');\n } else {\n $retval = 1;\n }\n return $retval;\n}",
"public function testAvailableGroupMembersOperations()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function isAuthorized($user)\n {\n if (isset($user['group_id']) && $user['group_id'] === '4') {\n return true;\n } else { \n return false;\n }\n }",
"public function isAuthorized($user, $request) {\n\t\tController::loadModel('Member');\n\n\t\tif ($this->Member->GroupsMember->isMemberInGroup( $this->Member->getIdForMember($user), Group::FULL_ACCESS )) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function testRemoveGroupPermissionFailsIfLackingPermissions(): void\n {\n $this->expectException(\\Exception::class);\n $this->slimStub->shouldReceive('halt')->times(1)->with(403, '{\"status\":403,\"message\":\"Access Denied\",\"title\":\"You do not have the permission: manage_groups\"}')->andThrow(new \\Exception);\n\n $this->userController->_remove_group_permission();\n }",
"public function testAddGroupUserFailsIfLackingUsers(): void\n {\n $this->expectException(\\Exception::class);\n $this->slimStub->shouldReceive('halt')->times(1)->with(403, '{\"status\":403,\"message\":\"Access Denied\",\"title\":\"You do not have the permission: manage_groups\"}')->andThrow(new \\Exception);\n\n $this->userController->_add_group_user();\n }",
"public function testChown_Security()\n {\n \t$this->setExpectedException('Q\\SecurityException', \"Won't change owner of '{$this->file}' to user 'myusr:mygrp': To change both owner and group, user array(owner, group) instead\");\n \t$this->Fs_Node->chown('myusr:mygrp');\n }",
"public function testAllow()\n {\n $this->assertFalse($this->Acl->check('jeff', 'foo/bar'));\n\n $this->Acl->allow('jeff', 'foo/bar');\n\n $this->assertTrue($this->Acl->check('jeff', 'foo/bar'));\n $this->assertFalse($this->Acl->check('peter', 'foo/bar'));\n $this->assertFalse($this->Acl->check('hardy', 'foo/bar'));\n\n $this->Acl->allow('Role/accounting', 'foo/bar');\n\n $this->assertTrue($this->Acl->check('peter', 'foo/bar'));\n $this->assertTrue($this->Acl->check('hardy', 'foo/bar'));\n\n $this->assertFalse($this->Acl->check('Role/reports', 'foo/bar'));\n }",
"function isInGroup($user, $group)\n{\n\tglobal $db;\n\n\t$ret = $db->query('select * from group_user where group_user_user=' . $user . ' and group_user_group=' . $group);\n\n\tif(count($ret))\n\t\treturn true;\n\telse\n\t\treturn false;\n}",
"public function testUpdateGroupFailsIfLackingPermissions(): void\n {\n $this->expectException(\\Exception::class);\n $this->slimStub->shouldReceive('halt')->times(1)->with(403, '{\"status\":403,\"message\":\"Access Denied\",\"title\":\"You do not have the permission: manage_groups\"}')->andThrow(new \\Exception);\n\n $this->userController->_update_group();\n }",
"public function testMeetupAccessWillCheckPermission()\n {\n list($responseCodeForUser1, $responseBody) = sendGetRequest($this->endpoint .'/5003e8bc757df2020d0f0033', array(), $this->user1Headers);\n list($responseCodeForUser2, $responseBody) = sendGetRequest($this->endpoint .'/5003e8bc757df2020d0f0033', array(), $this->user3Headers);\n\n $this->assertEquals(200, $responseCodeForUser1);\n $this->assertEquals(403, $responseCodeForUser2);\n }",
"public function testGroupContentEntityOperationAccessAlterHook(string $operation): void {\n // Check that our test user doesn't have access to edit or delete comments\n // in the group.\n // This is the default behavior for users that are not a group member.\n $this->assertFalse($this->userHasAccess($operation));\n\n // Now enable our hook which will alter the group content entity operation\n // access rules to allow moderators to edit and delete comments in all\n // groups. Since our user is a moderator they should now have access.\n \\Drupal::state()->set('og_test_group_content_entity_operation_access_alter', TRUE);\n $this->assertTrue($this->userHasAccess($operation));\n }",
"public function usergroupConditionDoesNotMatchDefaulUserGroupIds() {}",
"function tx_notusergroup($cmd){\r\n\t\t$cmd = t3lib_div::trimExplode('|',$cmd,true);\r\n\t\t$gr_list = $GLOBALS['TSFE']->gr_list;\r\n\t\tforeach( $cmd as $grp) {\r\n\t\t\tif(t3lib_div::inList($gr_list,$grp)){\r\n\t\t\t\treturn false; // matched a group so condition is false\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true; // no Group Found so return true;\r\n\t}",
"function userIsInGroup($user, $gid, $subgroups = true)\n {\n return false;\n }",
"public function testHasRoleModule()\n {\n\n $this->user->switchUser('test_annon');\n\n $orm = $this->db->orm;\n $textTest = $orm->get('WbfsysText',\"access_key='text_1'\");\n $textSecret = $orm->get('WbfsysText',\"access_key='secret'\");\n\n $res = $this->acl->hasRole('test_annon');\n $this->assertTrue('hasRole test_annon returned false',$res);\n\n $res = $this->acl->hasRole('test_annon', 'mod-test');\n $this->assertTrue('hasRole test_annon returned false',$res);\n\n $res = $this->acl->hasRole('test_annon', 'mod-test', $textTest);\n $this->assertTrue('hasRole test_annon for text test returned false',$res);\n\n $res = $this->acl->hasRole('test_annon', 'mod-test', $textSecret);\n $this->assertTrue('hasRole test_annon text secret returned false',$res);\n\n $res = $this->acl->hasRole('test_annon', 'mod-test_2');\n $this->assertTrue('hasRole test_annon returned false',$res);\n\n $res = $this->acl->hasRole('test_annon', 'mod-test_2', $textTest);\n $this->assertTrue('hasRole test_annon for text test returned false',$res);\n\n $res = $this->acl->hasRole('test_annon', 'mod-test_2', $textSecret);\n $this->assertTrue('hasRole test_annon text secret returned false',$res);\n\n $res = $this->acl->hasRole('fubar');\n $this->assertFalse('hasRole fubar returned true',$res);\n\n }",
"function is_user_allowed($user, $permission){\n\n \tif($permission == PERMISSION_LOGIN){\n \t\tif($user->is_surveyor == TRUE\n \t\t\t\t&& $user->is_supervisor == FALSE\n \t\t\t\t&& $user->is_manager == FALSE\n \t\t\t\t&& $user->is_general_manager == FALSE\n \t\t\t\t&& $user->is_admin == FALSE){\n \t\t\treturn FALSE;\n \t\t}\n \t}else if($permission == PERMISSION_ADD_SURVEYOR\n \t\t\t|| $permission == PERMISSION_EDIT_SURVEYOR\n \t\t\t|| $permission == PERMISSION_DELETE_SURVEYOR\n \t\t\t|| $permission == PERMISSION_DETAIL_SURVEYOR){\n \t\treturn $user->is_admin;\n \t}\n\n \treturn TRUE;\n }",
"function sf_group_def_perms()\n{\n\tglobal $wpdb;\n\n\t# grab the \"default\" permissions if they exist\n\t$noaccess = $wpdb->get_var(\"SELECT role_id FROM \".SFROLES.\" WHERE role_name='No Access'\");\n\tif (!$noaccess) $noaccess = -1;\n\t$readonly = $wpdb->get_var(\"SELECT role_id FROM \".SFROLES.\" WHERE role_name='Read Only Access'\");\n\tif (!$readonly) $readonly = -1;\n\t$standard = $wpdb->get_var(\"SELECT role_id FROM \".SFROLES.\" WHERE role_name='Standard Access'\");\n\tif (!$standard) $standard = -1;\n\t$moderator = $wpdb->get_var(\"SELECT role_id FROM \".SFROLES.\" WHERE role_name='Moderator Access'\");\n\tif (!$moderator) $moderator = -1;\n\n\t$usergroups = $wpdb->get_results(\"SELECT * FROM \".SFUSERGROUPS);\n\t$groups = $wpdb->get_results(\"SELECT group_id FROM \".SFGROUPS);\n\tif ($groups && $usergroups)\n\t{\n\t\tforeach ($groups as $group)\n\t\t{\n\t\t\tforeach ($usergroups as $usergroup)\n\t\t\t{\n\t\t\t\tif ($usergroup->usergroup_name == 'Guests')\n\t\t\t\t{\n\t\t\t\t\t$rid = $readonly;\n\t\t\t\t} else if ($usergroup->usergroup_name == 'Members')\n\t\t\t\t{\n\t\t\t\t\t$rid = $standard;\n\t\t\t\t} else if ($usergroup->usergroup_name == 'Moderators')\n\t\t\t\t{\n\t\t\t\t\t$rid = $moderator;\n\t\t\t\t} else {\n\t\t\t\t\t$rid = $noaccess;\n\t\t\t\t}\n\t\t\t\t$wpdb->query(\"\n\t\t\t\t\tINSERT INTO \".SFDEFPERMISSIONS.\"\n\t\t\t\t\t(group_id, usergroup_id, permission_role)\n\t\t\t\t\tVALUES\n\t\t\t\t\t($group->group_id, $usergroup->usergroup_id, $rid)\");\n\t\t\t}\n\t\t}\n\t}\n}",
"public function testCreateGroupMember()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testGetAuthorizationPermissions()\n {\n }"
] | [
"0.6800941",
"0.64626575",
"0.6456137",
"0.63845026",
"0.6374069",
"0.63727885",
"0.63681656",
"0.632655",
"0.6325659",
"0.6280718",
"0.62506217",
"0.6249304",
"0.62220126",
"0.6208894",
"0.61564285",
"0.6132432",
"0.61323667",
"0.6113838",
"0.6082301",
"0.60804015",
"0.60765284",
"0.606273",
"0.60590506",
"0.6039301",
"0.60209024",
"0.6020433",
"0.6013637",
"0.59983516",
"0.5997413",
"0.59915805",
"0.5970541",
"0.59549",
"0.5931933",
"0.5926417",
"0.59242845",
"0.5915116",
"0.5910499",
"0.5909742",
"0.59031904",
"0.59007406",
"0.5875843",
"0.58727586",
"0.5872636",
"0.58722967",
"0.58684975",
"0.58469003",
"0.58439314",
"0.5831519",
"0.5816223",
"0.58135885",
"0.5798538",
"0.5783396",
"0.57816374",
"0.57786",
"0.57778007",
"0.57689536",
"0.5767693",
"0.5759193",
"0.57586855",
"0.5750617",
"0.57499087",
"0.57475966",
"0.57170796",
"0.5708216",
"0.5706737",
"0.5706202",
"0.5704261",
"0.57030416",
"0.5681626",
"0.56761193",
"0.5672223",
"0.56690556",
"0.5664494",
"0.56608033",
"0.5660145",
"0.56588036",
"0.5652974",
"0.56510633",
"0.56504095",
"0.56460655",
"0.56448793",
"0.56439483",
"0.56425005",
"0.5635318",
"0.56272936",
"0.5625816",
"0.5624329",
"0.5621598",
"0.56208897",
"0.56186295",
"0.5613334",
"0.5611396",
"0.55996555",
"0.5599611",
"0.5599001",
"0.5597844",
"0.55952626",
"0.5586699",
"0.5586534",
"0.5585338"
] | 0.5682366 | 68 |
Grant permissions to a user role. | protected function grantPermissions(RoleInterface $role, array $permissions) {
foreach ($permissions as $permission) {
$role->grantPermission($permission);
}
$role->trustData()->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function grantPermissionToUserAction()\n {\n $data['email'] = $this->params()->fromPost('email','');\n $data['featureName'] = $this->params()->fromPost('featureName','');\n \n $user = $this->entityManager->getRepository(Usersso::class)->findOneByEmail($data['email']);\n $role = $this->entityManager->getRepository(Role::class)->find($user->getRole()); //\n\n $permission = $this->entityManager->getRepository(Permission::class)->findOneByName($data['featureName']);\n\n // $permissions \n $permissions = $role->getPermissions();\n $data['permissions'] = array();\n $data['permissions'][] = $data['featureName'];\n\n foreach($permissions as $p)\n {\n $data['permissions'][] = $p->getName();\n }\n \n $this->httpStatusCode = 403;\n $this->apiResponse['canAccess'] = 0;\n if ($this->roleManager->updateRolePermissions($role, $data)) {\n $this->httpStatusCode = 200; \n $this->apiResponse['canAccess'] = 1; \n }\n \n return $this->createResponse();\n \n }",
"public function assign($role, $permission);",
"public function grant( $identity, Role $role)\n {\n $identity->addPermission($role);\n $this->entityManager->persist($role);\n $this->entityManager->flush($role);\n\n $role->createAuthorizations($this);\n }",
"public function run()\n {\n App\\Role::find(1)->attachPermission(1);\n App\\Role::find(1)->attachPermission(2);\n App\\Role::find(1)->attachPermission(3);\n }",
"public function assignPermission(Request $request, Role $role)\n {\n if(Auth::user()->can('assign-permission-to-role')){\n if($request->ids){\n $ids = $request->ids;\n foreach ($ids as $id) {\n $permission = Permission::find($id);\n $role->givePermissionTo($permission->name);\n ActivityLogger::activity(\"Le role ID:\".$role->id.'('.$role->name.') a désormais la permission id:'.$permission->id.'('.$permission->name.') donnée par l\\'utilisateur ID:'.Auth::id());\n }\n $message = sizeof($ids).' role(s) assigné(s) à la permission '.$permission->name.' avec succès';\n }\n else{\n $message = \"Aucune action n'a été effectuée.\";\n }\n // Envoyer un mail à la personne qui a recu le role avec la liste des permissions possibles\n return redirect()->route(\"roles.show\", compact('role'))->with('success',$message);\n }else{\n return back()->with('error',\"Vous n'avez pas ce droit\");\n } \n }",
"public function grantUserRolePermissions(User $user, array $permissions): void\n {\n $newRole = $this->userRoleProvider->createRole($permissions);\n $user->attachRole($newRole);\n $user->load('roles');\n $user->clearPermissionCache();\n }",
"public function grant($user, $permission, $comment=null, $expire=null);",
"public function assignPermissionToRole(Request $request)\n {\n $role_id = $request->get(\"role_id\");\n $permission_id = $request->get(\"permission_id\");\n $permissionName = Permission::findById($permission_id)->name;\n return response(Role::findById($role_id)->givePermissionTo($permissionName),HTTP_OK);\n }",
"public function scopeGrantRole($query, $user_id, $role)\n {\n \n // Find User with ID\n $user = $query->find($user_id);\n // Grant user the role\n $user->attachRole($role);\n // Return True is user has been granted succesfully\n return $user->hasRole($role);\n }",
"public function grant_permission(Role $Role, string $action): ?PermissionInterface;",
"public function assignPermissions(Request $request)\n {\n $request->validate([\n 'role_id' => 'required',\n 'permissionIds' => 'required'\n ]);\n\n $role = Role::find($request->role_id);\n $role->givePermission($request->permissionIds); \n }",
"public function run()\n {\n \\Illuminate\\Support\\Facades\\Artisan::call('permission:create-role admin\"');\n\n \\Illuminate\\Support\\Facades\\Artisan::call('permission:create-role user');\n }",
"public function run()\n {\n $permissions = [\n 'product_create',\n 'product_show',\n 'product_edit',\n 'product_delete'\n ];\n\n $user = Role::findByName('admin');\n\n foreach ($permissions as $permission) {\n $user->givePermissionTo($permission);\n }\n }",
"function lb_subscription_grant_role($account, $subscription) {\n user_multiple_role_edit(array($account->uid), 'add_role', $subscription->field_assign_role[LANGUAGE_NONE][0]['rid']);\n}",
"public function givePermission($permissions);",
"public function ability($roles, $permissions, $options = []);",
"public function testUserRoleChangePermissions() {\n $permissions_hash_generator = $this->container->get('user_permissions_hash_generator');\n\n $rid = $this->rid;\n $account = $this->adminUser;\n $previous_permissions_hash = $permissions_hash_generator->generate($account);\n\n // Verify current permissions.\n $this->assertFalse($account->hasPermission('administer users'), 'User does not have \"administer users\" permission.');\n $this->assertTrue($account->hasPermission('access user profiles'), 'User has \"access user profiles\" permission.');\n $this->assertTrue($account->hasPermission('administer site configuration'), 'User has \"administer site configuration\" permission.');\n\n // Change permissions.\n $permissions = [\n 'administer users' => 1,\n 'access user profiles' => 0,\n ];\n user_role_change_permissions($rid, $permissions);\n\n // Verify proper permission changes.\n $this->assertTrue($account->hasPermission('administer users'), 'User now has \"administer users\" permission.');\n $this->assertFalse($account->hasPermission('access user profiles'), 'User no longer has \"access user profiles\" permission.');\n $this->assertTrue($account->hasPermission('administer site configuration'), 'User still has \"administer site configuration\" permission.');\n\n // Verify the permissions hash has changed.\n $current_permissions_hash = $permissions_hash_generator->generate($account);\n $this->assertNotEquals($previous_permissions_hash, $current_permissions_hash, 'Permissions hash has changed.');\n }",
"function group_change_role($groupid, $userid, $role) {\n // group_can_change_role checks whether the group and user parameters are valid\n if (!group_can_change_role($groupid, $userid, $role)) {\n throw new AccessDeniedException(get_string('usercannotchangetothisrole', 'group'));\n }\n\n set_field('group_member', 'role', $role, 'group', $groupid, 'member', $userid);\n}",
"public function run()\n {\n Role::create(['name'=>'Administrador']);\n $role = Role::create(['name'=>'Vendedor']);\n $role->givePermissionTo(['Ver cualquier venta','Crear venta','Ver cualquier cliente','Crear cliente','Modificar cliente']);\n }",
"public function setUserRole(User $user, Role $role);",
"public function store(StoreRequest $request)\n{\n $AgentPermission=Permission::where('name','like','%Order%')->get();\n\n $user = User::create([\n 'name' => $request->name,\n 'email' => $request->email,\n 'password'=>Hash::make($request->password),\n 'password_confirmation'=>Hash::make($request->password_confirmation),\n 'mobile'=>$request->mobile,\n 'work'=>$request->work,\n 'is_agent'=>'1'\n ]);\n\n $user->assignRole([3]);\n\n foreach($AgentPermission as $a)\n {\n $user->givePermissionTo($a->id);\n\n }\n\n return $user;\n}",
"public function run()\n {\n //\n $role = \\Spatie\\Permission\\Models\\Role::findByName('Admin');\n foreach ($this->permissions as $permission)\n {\n $permission = \\Spatie\\Permission\\Models\\Permission::create(['name'=>$permission]);\n $role->givePermissionTo($permission);\n\n }\n }",
"public function run()\n {\n\n \t// ???\n $role = App\\Role::where('name', 'super')->first();\n\n $role = App\\Role::where('name', 'content')->first();\n $role->addPermission('gallery.create');\n $role->addPermission('gallery.edit');\n $role->addPermission('gallery.delete');\n\n }",
"public function assign_permission_to_role(Request $request, PermissionServices $permission): void\n {\n }",
"public function givePermission($permission);",
"public function givePermission($permission);",
"public function assignRole($role)\n {\n if (!Yii::$app->authManager->checkAccess($this->id, $role)) {\n $authRole = Yii::$app->authManager->getRole($role);\n Yii::$app->authManager->assign($authRole, $this->id);\n\n return true;\n }\n\n return false;\n }",
"public function assignUser(Request $request, Role $role)\n {\n if(Auth::user()->can('assign-role-to-user')){\n if($request->ids){\n $ids = $request->ids;\n foreach ($ids as $id) {\n $user = User::find($id);\n $user->assignRole($role->name);\n ActivityLogger::activity(\"Le collaborateur ID:\".$user->id.'('.$user->name.') a désormais le role id:'.$role->id.'('.$role->name.') donné par l\\'utilisateur ID:'.Auth::id());\n }\n $message = sizeof($ids).' collaborateur(s) assigné(s) au role '.$role->name.' avec succès';\n }\n else{\n $message = \"Aucune action n'a été effectuée.\";\n }\n // Envoyer un mail à la personne qui a recu le role avec la liste des permissions possibles\n return redirect()->route(\"roles.show\", compact('role'))->with('success',$message);\n }else{\n return back()->with('error',\"Vous n'avez pas ce droit\");\n } \n }",
"public function run()\n {\n $roles = [\n 'super-admin',\n 'admin',\n 'user',\n ];\n\n if(env('APP_DEBUG') === true) {\n \\Spatie\\Permission\\Models\\Role::query()->truncate();\n }\n\n foreach ($roles as $role) {\n Spatie\\Permission\\Models\\Role::create(['name' => $role]);\n }\n\n $roles = \\Spatie\\Permission\\Models\\Role::where('name', 'admin')->get();\n $permissions = \\Spatie\\Permission\\Models\\Permission::select('name')->get()->toArray();\n foreach ($roles as $role) {\n $role->givePermissionTo($permissions);\n }\n }",
"public function makeAdministrator()\n {\n $this->setRole('administrator');\n }",
"public function store(StoreRolePermission $request, Role $role)\n {\n $role->givePermissionTo(Permission::findOrFail($request->permission_id));\n }",
"public function attachRole($role);",
"public function attachRole($role);",
"public function run()\n {\n $permission = Permission::where('slug', 'all-actions')->first();\n\n $role = new Role();\n $role->slug = 'super-admin';\n $role->name = 'Super Admin';\n $role->save();\n $role->permissions()->attach($permission);\n }",
"public function run()\n {\n $user = User::find(1);\n\n $role = Role::find(1);\n\n $user->attachRole($role);\n }",
"public function testPolicyPermissions()\n {\n // User of super admin role always has permission\n $role = factory(\\App\\Models\\Role::class)->make(['name' => 'Admin']);\n $this->roleRepository->create($role);\n $admin = $this->createUser(['role' => $role]);\n $this->assertTrue($admin->isSuperAdmin());\n $this->assertTrue($admin->can('create', User::class));\n\n // User of normal role does not have permission ...\n $user = $this->createUser();\n $this->assertFalse($user->isSuperAdmin());\n $this->assertFalse($user->can('create', User::class));\n $this->assertFalse($user->can('list', User::class));\n\n // ... even if it has module permission ..\n $role = $user->getRole();\n $this->roleRepository->addPermission($role, $this->permissionRepository->findBy('name', 'use-access-module'));\n $this->assertTrue($user->can('access', 'module'));\n $this->assertFalse($user->can('master', 'module'));\n $this->assertFalse($user->can('create', User::class));\n\n // ... until final permission is added\n $this->roleRepository->addPermission($role, $this->permissionRepository->findBy('name', 'user-create'));\n $this->assertTrue($user->can('create', User::class));\n $this->assertFalse($user->can('list', User::class));\n }",
"function permissions_grant_user ($user, $dir, $file, $action)\n{\n\t$permissions = user_get_permissions($user);\n\n\t// determine the permission definitions\n\t$permdefs = permissions_get();\n\n\t// the user with the name \"admin\" always has admin rights\n\tif ($action == \"admin\" && $user == \"admin\")\n\t\treturn true;\n\n\t// check if the action is allowed\n\treturn ($permdefs[$action] & $permissions) != 0;\n}",
"function role_add_permission($role_id, $permission_id, $allow = 1) {\n\t\t$this->db->insert('system_security.security_role_permission', array('role_id' => $role_id, 'permission_id' => $permission_id, 'allow_deny' => $allow));\n\t\treturn $this->db->insert_id();\n\t}",
"function addUserPermissions($userRoleId, $userId)\n{\n $basePermissions = UserRole::find($userRoleId)->base_permissions;\n $permission = new Permission;\n $permission->getPermissions($basePermissions, $userId);\n\n return true;\n}",
"public function run()\n {\n $admin = new Role();\n $admin->name = 'admin';\n $admin->display_name = 'User Administrator';\n $admin->description = 'User is allowed to manage and edit other users';\n $admin->save();\n\n $user = new Role();\n $user->name = 'user';\n $user->display_name = 'User';\n $user->description = '';\n $user->save();\n\n $userObj = User::where('id', 1)->first();\n\n\n $userObj->attachRole($admin);\n\n\n $createProduct = new Permission();\n $createProduct->name = 'create-product';\n $createProduct->display_name = 'Create Product';\n $createProduct->description = '';\n $createProduct->save();\n\n $orderProduct = new Permission();\n $orderProduct->name = 'order-product';\n $orderProduct->display_name = 'Order Product';\n $orderProduct->description = '';\n $orderProduct->save();\n\n $user->attachPermission($orderProduct);\n\n\n $admin->attachPermissions(array($createProduct, $orderProduct));\n }",
"public function run()\n {\n //\n User::findOrFail(1)->assignRole('procurer');\n User::findOrFail(2)->assignRole('bidder');\n User::findOrFail(3)->assignRole('super-admin');\n }",
"public function run()\n {\n Role::create([\n 'name' => 'manager',\n 'label' => 'System Manager',\n ]);\n\n Role::create([\n 'name' => 'editor',\n 'label' => 'System Editor',\n ]);\n\n Role::create([\n 'name' => 'user',\n 'label' => 'System User',\n ]);\n\n // Asign All Permissions To Manager\n $allPermissions = Permission::pluck('id')->toArray();\n\n $manager = Role::whereName('manager')->first();\n \n $manager->syncPermissions($allPermissions);\n\n // Asign Manager Role To User ID 1\n $user = App\\User::find(1);\n\n $user->assignRole('manager');\n }",
"public function run()\n {\n $admin = new Role();\n $admin->name = 'admin';\n $admin->display_name = 'Administrator';\n $admin->description = 'User is allowed to manage and edit other users';\n $admin->save();\n\n $editor = new Role();\n $editor->name = 'editor';\n $editor->display_name = 'Editor';\n $editor->description = 'User is allowed to manage and edit other users';\n $editor->save();\n\n $permission = App\\Models\\Permission::where(['name' => 'edit-user'])->first();\n $admin->attachPermission($permission);\n }",
"function grant_super_admin($user_id)\n {\n }",
"public function authorize()\n {\n return auth()->user()->can('updatePermissions', [Role::class, request('role')]);\n }",
"public function permission_mass_assignament(array $roles){\n foreach($roles as $role){\n if(!$this->has_role($role)){\n $role_obj=Role::findOrFail($role);\n $permissions=$role_obj->permissions;\n //como queremos conservar los permisos que ya tiene el usuario NO USAMOS\n //que solamente se sincronizen los nuevos permisos\n //pasamos como parametro la coleccion de modelos\n $this->permissions()->syncWithoutDetaching($permissions);\n\n }\n }\n\n }",
"function add_manager_role()\n{\n add_role('manager', __(\n 'Manager'),\n array(\n 'read' => true, // Allows a user to read\n 'create_posts' => true, // Allows user to create new posts\n 'edit_posts' => true, // Allows user to edit their own posts\n )\n );\n}",
"public function addRole($username, $role);",
"public function run(\n \\App\\Repositories\\UserRepository $userRepository,\n \\App\\Repositories\\RoleRepository $roleRepository\n )\n {\n //\n $user = $userRepository->first();\n $admin = $roleRepository->create([\n 'name' => \\App\\Entities\\Role::ADMIN,\n 'guard_name' => AUTH_GUARD_USER,\n 'description' => 'Administrator',\n ]);\n $user->assignRole($admin);\n\n $this->permissions();\n }",
"public function visitUser(User $role);",
"public function assignRole ($name);",
"public function add_role(){\n// $admin->name = 'admin';\n// $admin->display_name = 'User Administrator';\n// $admin->description = 'User is allowed to manage and edit other users';\n// $admin->save();\n\n// $user = User::where('name','admin')->first();\n// $user->attachRole(2);\n //这个添加方法也可以\n// $user->roles()->attach($admin->id); //只需传递id即可\n\n// $editUser = new Permission();\n// $editUser->name = 'edit-user';\n// $editUser->display_name = 'Edit Users';\n// $editUser->description = 'edit existing users';\n// $editUser->save();\n\n //给角色添加权限\n// $owner = Role::where('name','admin')->first();\n// $owner->attachPermission(1);\n //另一种写法,多权限\n// $admin = Role::where('name','admin')->first();\n// $admin->perms()->sync([1,2]);\n\n //检查权限角色\n $user = User::find(2);\n//\n// if($user->hasRole('owner')){\n// echo 'yes';\n// }else{\n// echo 'no';\n// }\n\n if($user->hasRole('admin')){\n echo 'yes';\n }else{\n echo 'no';\n }\n if($user->can('edit-user')){\n echo 'yes permission';\n }else{\n echo 'no permission';\n }\n\n// $user->hasRole(['owner', 'admin'], true); //同时具有角色的时候,才显示true\n// $user->can(['edit-user', 'create-post'], true); // false //同时具有多个权限的时候才显示true\n echo \"<br/>\".Auth::user()->name.\"<br/>\";\n if(Auth::user()->can('create-post')){\n echo 'i have perms';\n }else{\n\n echo 'i don.t have';\n }\n }",
"abstract protected function rolePerms($role);",
"function associatePermissionsToRole()\n {\n $retObj = array();\n try {\n\n if (isset($_POST['role_id']))\n {\n $permission_ids = json_decode($_POST['permission_ids']);\n $params = array(\n 'role_id' => $_POST['role_id'],\n 'permission_ids' => $permission_ids\n );\n\n $objAcl = new AclManager();\n $retObj['completed'] = false;\n $response = $objAcl->associatePermissionsToRole($params);\n $retObj['completed'] = true;\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"public function run()\n {\n $clients = Permission::where('name', 'like', '%clients%')->get()->toArray();\n $corporations = Permission::where('name', 'like', '%corporations%')->get()->toArray();\n $jobs = Permission::where('name', 'like', '%jobs%')->get()->toArray();\n $users = Permission::where('name', 'like', '%users%')->get()->toArray();\n $tags = Permission::where('name', 'like', '%tags%')->get()->toArray();\n\n \\tecai\\Models\\System\\Role::create([\n 'name' => 'root',\n 'display_name' => 'Super Admin',\n 'description' => 'the root account,Super Admin'\n ]);\n\n $roleAdmin = \\tecai\\Models\\System\\Role::create([\n 'name' => 'admin',\n 'display_name' => 'platform Admin',\n 'description' => 'the guy to admin the platform'\n ]);\n $this->attachPermission($roleAdmin, $clients, $corporations, $jobs, $users, $tags);\n\n\n $roleLegaler = \\tecai\\Models\\System\\Role::create([\n 'name' => 'legaler',\n 'display_name' => 'corporation-legaler',\n 'description' => 'the corporation legal person'\n ]);\n $this->attachPermission($roleLegaler, $corporations, $jobs, $users, $tags);\n\n $roleStaff = \\tecai\\Models\\System\\Role::create([\n 'name' => 'staff',\n 'display_name' => 'corporation-staff',\n 'description' => 'the corporation staff'\n ]);\n $this->attachPermission($roleStaff, $corporations, $jobs, $users, $tags);\n\n }",
"public function setRole() {\n\n $res= $_POST['link']->query(\"SELECT t2.perm_name FROM role_perm as t1\n JOIN permissions as t2 ON t1.perm_id = t2.perm_id\n WHERE t1.role_id = $this->rol_id\");\n\n\n foreach($res as $item)\n $this->role_perm[]= $item['perm_name'];\n }",
"protected function attachPermissionToRole($role)\n {\n $permissions = $this->permissionRepository->all();\n\n foreach ($permissions as $permission) {\n $this->bus->dispatch( new Commands\\AttachPermissionToRole($role->id()->value(), $permission->id()->value()) );\n }\n }",
"protected function assignPermissions()\n {\n $role = Role::whereName(config('system.default_role.admin'))->first();\n $role->syncPermissions(config('system.default_permission'));\n }",
"public function run()\n {\n $role1 = Role::create(['name' => 'Administrador']);\n\n Permission::create(['name' => 'perdidos.all'])->assignRole($role1);\n\n }",
"public function setRole($role);",
"public function setAuthenticatedRole($role);",
"public function add_role($role)\n {\n }",
"public function run(): void\n {\n foreach ($this->getDefault() as $role) {\n if (!Role::whereName($role['name'])->exists()) {\n unset($role['permissions']);\n\n Role::create($role);\n }\n }\n\n foreach (Role::all() as $role) {\n $defaultRoles = array_filter($this->getDefault(), fn($r) => $r['name'] === $role->name);\n\n foreach ($defaultRoles as $defaultRole) {\n foreach ($defaultRole['permissions'] as $permission) {\n\n if ($role->permissions->map(fn ($p) => $p->name)->contains($permission)) {\n continue;\n }\n\n $role->givePermissionTo(Permission::whereName($permission)->first());\n }\n }\n }\n }",
"protected abstract function grant_token($user, $token);",
"function set_user_role($role, $user_id = null) {\n\tglobal $db;\n\tif ($user_id == null)\n\t\t// defaults to the current user\n\t\t$user_id = $_SESSION['user_id'];\n\n\t$prepared = $db->prepare(\"\n UPDATE users\n\t\t\tSet role_id = (SELECT role_id FROM roles WHERE name = ?)\n\t\t\tWhere user_id = ?\n \");\n\n\t$prepared->bind_param('si', $role, $user_id);\n\n\tif (!$prepared->execute()) {\n\t\t$message['error'][] = ERROR;\n\t\treturn false;\n\t}\n\n\treturn true;\n}",
"public function create()\n {\n $this->authorize('create', Role::class);\n }",
"public function create() {\n// $role = Sentinel::findRoleById(1);\n// $roles = Rol::get();\n// foreach($roles as $role){\n// $role->removePermission(0);\n// $role->removePermission(1);\n// $role->save();\n// }\n// dd(Sentinel::getUser()->hasAccess('sds'));\n// dd(\\Modules\\Permissions\\Entities\\ModulePermission::where('module_id', 10)->where('permission', 'like', '%.view')->orderBy('menu_id')->lists('permission')->toArray());\n }",
"public function store(AdminRoleRequest $request)\n {\n $data = $request->except('_token','save','permission');\n $data['guard_name'] = 'admins';\n $role = Role::create($data);\n\n // check nếu chưa lưu permission vào role\n if ($permissions = $request->permission){\n foreach ($permissions as $permission)\n // dùng hàm có sẵn của package\n $role->givePermissionTo($permission);\n }\n $this->showMessagesSuccess();\n return redirect()->back();\n }",
"public function run(\n PermissionRepository $permissionRepository,\n RoleRepository $roleRepository,\n UserRepository $userRepository\n ) {\n //! Vraag voor verversing van de databank zou moeten verplaatst worden\n //! Dit zou gevraagd moeten worden in DatabaseSeeder.php\n //! Omdat niet alleen gerelateerd is aan de gebruikers.\n\n // TODO: (Localisation) Mogelijk heb bekijken om de commando vragon ook te laten vertalen.\n\n // Ask for db migration refresh, default is no\n if ($this->command->confirm('Do you wish to refresh migration before seeding, it will clear all old data?')) {\n // Call the php artisan migrate:refresh\n $this->command->call('migrate:refresh');\n $this->command->warn('Data cleared, starting from blank database.');\n }\n\n // TODO: (acl) Registratie van permissies voor de stadsmonitor.\n $permissions = []; // No default permissions assigned for now.\n\n foreach ($permissions as $perms) { // Seed default permissions\n $permissionRepository->seedFirstOrCreate(['name' => $perms]);\n }\n\n $this->command->info('Default permissions added.');\n\n // Confirm roles needed\n if ($this->command->confirm('Create Roles for user, default is admin and user? [y|N]', true)) {\n // Ask role from input\n $inputRoles = $this->command->ask('Enter roles in comma seperated format.', 'admin,api,user');\n\n // Explode roles\n $rolesArray = explode(',', $inputRoles); // BOOM!\n\n foreach ($rolesArray as $role) { // Add roles\n $roles = $roleRepository->entity();\n $role = $roleRepository->seedFirstOrCreate(['name' => trim($role)]);\n\n if ($role->name == 'admin') {\n // Assign all permissions\n $roles->syncPermissions($permissionRepository->all());\n\n $this->command->info('Admin granted all permissions.');\n } else { // Forother by default only read access\n $roles->syncPermissions(\n $permissionRepository->entity()->where('name', 'LIKE', 'view_%')->get()\n );\n }\n\n $userRepository->seedCreateUser($role, $this->command);\n }\n\n $this->command->info('Roles' . $inputRoles . ' added successfully.');\n } else {\n $roleRepository->seedFirstOrCreate(['name' => 'user']);\n $this->command->info('Added only default user role.');\n }\n }",
"public function isUserGranted(string $role, User $user, mixed $object = null): bool\n {\n return $this->securityContext->isGranted($role, $object, $user);\n }",
"public function run()\n {\n $user = User::orderBy('id', 'ASC')->get(['id']);\n $role = Role::get(['id', 'guard_name']);\n\n $user[0]->assignRole($role[0]);\n $user[1]->assignRole($role[1]);\n $user[2]->assignRole($role[1]);\n $user[3]->assignRole($role[1]);\n }",
"public function run()\n {\n $admin = new Role();\n $admin->name = 'admin';\n $admin->save();\n\n $support = new Role();\n $support->name = 'support';\n $support->save();\n\n $chauffør = new Role();\n $chauffør->name = 'chauffør';\n $chauffør->save();\n\n $user = new Role();\n $user->name = 'user';\n $user->save();\n\n \\App\\User::where('email', '[email protected]')->first()->roles()->attach($admin->id);\n \\App\\User::where('email', '[email protected]')->first()->roles()->attach($support->id);\n\n $editOrders = new Permission();\n $editOrders->name = 'edit-orders';\n $editOrders->display_name = 'Rette Ordre';\n $editOrders->description = 'Kan rette ordre fra brugere';\n $editOrders->save();\n\n $update = new Permission();\n $update->name = 'update-orders';\n $update->display_name = 'Opdatere Ordre';\n $update->description = 'Kan opdatere ordre';\n $update->save();\n\n $tracking = new Permission();\n $tracking->name = 'update-tracking';\n $tracking->display_name = 'Opdatere Tracking';\n $tracking->description = 'Kan opdatere tracking';\n $tracking->save();\n\n $admin->attachPermissions([$editOrders, $update, $tracking]);\n $support->attachPermissions([$editOrders, $tracking]);\n $chauffør->attachPermission($tracking);\n }",
"function SetUserRole ($userRoleId = null, $data = array()) {\n $answer = $this->answer;\n\n if ($userRoleId) {\n // update user role\n $this->db\n ->where('role_id', $userRoleId)\n ->update('user_role', $data);\n // here must be notification email function\n }\n else {\n // create user role\n $this->db->insert('user_role', $data);\n $userRoleId = $this->db->insert_id();\n\n // here must be notification email function, new id is for it\n }\n\n $answer['success'] = true;\n $answer['result'] = $userRoleId;\n return $answer;\n }",
"public function updateRolePermissions()\n\t{\n\t\t$input = Input::all();\n\n\t\tforeach ($input['permissions'] as $role => $permissions) {\n\t\t\tRole::whereName($role)->first()->perms()->sync($permissions);\n\t\t}\n\n\t\treturn Redirect::route('role.permissions.edit')\n\t\t\t\t\t\t\t->with('message', 'Successfully updated role permissions')\n\t\t\t\t\t\t\t->with('alert-class', 'success');\n\t}",
"function sf_upgrade_add_new_role($newaction, $perm, $limit_access=false, $mods_only=false)\n{\n\tglobal $wpdb;\n\n\t$roles = $wpdb->get_results(\"SELECT * FROM \".SFROLES.\" ORDER BY role_id\");\n\tif ($roles)\n\t{\n\t\tforeach ($roles as $role)\n\t\t{\n\t\t\tif ($limit_access)\n\t\t\t{\n\t\t\t\t$perm = 1;\n\t\t\t\tif ($role->role_name == 'No Access' || $role->role_name == 'Read Only Access')\n\t\t\t\t{\n\t\t\t\t\t$perm = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($mods_only)\n\t\t\t{\n\t\t\t\t$perm = 0;\n\t\t\t\tif ($role->role_name == 'Moderators')\n\t\t\t\t{\n\t\t\t\t\t$perm = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$actions = unserialize($role->role_actions);\n\t\t\t$actions[$newaction] = $perm;\n\t\t\t$actions = maybe_serialize($actions);\n\t\t\t$sql = \"UPDATE \".SFROLES.\" SET \";\n\t\t\t$sql.= 'role_name=\"'.$role->role_name.'\", ';\n\t\t\t$sql.= 'role_desc=\"'.$role->role_desc.'\", ';\n\t\t\t$sql.= 'role_actions=\"'.$wpdb->escape($actions).'\" ';\n\t\t\t$sql.= \"WHERE role_id=\".$role->role_id.\";\";\n\t\t\t$wpdb->query($sql);\n\t\t}\n\t}\n}",
"public function testGrantCollectionRole()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function run()\n {\n $roles_permissions = [\n \t'superuser' => [\n \t\t'superuser'\n \t],\n \t'member_manager' => [\n \t\t'can add member',\n \t\t'can edit member',\n \t\t'can delete member',\n \t],\n \t'checker' => [\n \t\t'can check record',\n \t\t'can delete record',\n \t\t'can update record',\n \t\t'can generate report',\n \t],\n \t'encoder' => [\n \t\t'can encode record',\n \t\t'can update record',\n \t]\n ];\n\n foreach ($roles_permissions as $role => $permissions) {\n $role = Role::create(['name' => $role]);\n\n echo \"> Role created: \" . $role->name . \"\\n\";\n\n \tforeach ($permissions as $permission) {\n \t\tPermission::firstOrCreate(['name' => $permission]);\n echo \"=> Permission created: \" . $permission . \"\\n\";\n \t}\n\n \t$role->givePermissionTo($permissions);\n echo \"\\n\";\n }\n }",
"public function run()\n {\n Permission::create([\n 'name' => 'create_labels',\n ]);\n\n Permission::create([\n 'name' => 'update_labels',\n ]);\n\n Permission::create([\n 'name' => 'delete_labels',\n ]);\n\n Permission::create([\n 'name' => 'generate_language_files',\n ]);\n\n // Site Admin\n $site_admin_role = Role::create([\n 'name' => 'site_admin',\n ]);\n\n // Client Admin\n $client_admin_role = Role::create([\n 'name' => 'client_admin',\n ]);\n\n // Customer\n $customer_role = Role::create([\n 'name' => 'customer',\n ]);\n\n $site_admin_role->givePermissionTo([\n 'create_labels',\n 'update_labels',\n 'delete_labels',\n ]);\n }",
"public function add_customer_user_role() {\n add_role(\n 'customer',\n 'Customer',\n [\n 'read' => true,\n ]\n );\n }",
"public function run()\n {\n $input = [\n 'first_name' => 'Super',\n 'last_name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456'),\n 'phone' => '+917878454512',\n 'is_enable' => true,\n 'email_verified_at' => Carbon::now(),\n ];\n\n $user = User::create($input);\n\n\n /** @var \\App\\Models\\Permission $permissions */\n $permissions = \\App\\Models\\Permission::all();\n\n /** @var \\App\\Models\\Role $adminRole */\n $adminRole = \\App\\Models\\Role::whereName('admin')->first();\n $user->assignRole($adminRole);\n $adminRole->givePermissionTo($permissions);\n \n $user->givePermissionTo($permissions);\n \n }",
"public function run()\n {\n User::find(1)->assignRole('admin');\n foreach (User::all() as $user) {\n if ($user->id == 1) {\n continue;\n }\n $user->assignRole('user');\n\n }\n }",
"public function setPermission(Request $request)\n {\n $input = $request->all();\n $roles = $this->roleRepository->all();\n $permissionsSync = [];\n foreach ($roles as $role) {\n if (isset($input['roles'][$role->id])) {\n $permissionsSync = $input['roles'][$role->id]['permissions'];\n $role->permissions()->sync($permissionsSync);\n }\n }\n Session::flash('message', trans('permission.message.set_role'));\n return back();\n }",
"public function actionUserRole ()\n\t\t{\n\t\t\t$userClass = $this->module->modelUser;\n\t\t\t$post = Yii::$app->request->post();\n\t\t\t$user = $userClass::findOne($post[ 'id' ]);\n\t\t\tif (!is_null($user))\n\t\t\t{\n\n\t\t\t\tLogManager::info(Yii::tr('Пользователю {user} забрали права {roles}', [ 'user' => Html::a($user->name, Url::toRoute([ 'user/view', 'id' => $user->id ])), 'roles' => implode(',', $user->getRolesNames()) ]));\n\t\t\t\t$user->revokeAllRoles();\n\t\t\t\tif (is_array($post[ 'roles' ]))\n\t\t\t\t{\n\t\t\t\t\tforeach ($post[ 'roles' ] as $item)\n\t\t\t\t\t{\n\t\t\t\t\t\t$user->assignRole($item);\n\t\t\t\t\t}\n\t\t\t\t\tLogManager::info(Yii::tr('Пользователю {user} добавили права {roles}', [ 'user' => Html::a($user->name, Url::toRoute([ 'user/view', 'id' => $user->id ])), 'roles' => implode(',', $post[ 'roles' ]) ]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tYii::$app->end();\n\t\t}",
"public function run()\n {\n foreach (config('admins.user_has_permission') as $user_permission){\n $user = \\App\\User::find($user_permission['user_id']);\n if ($user) {\n $user->permissions()->attach(\\App\\Permission::find($user_permission['permission_id']),[\n 'create'=>$user_permission['create'],\n 'update'=>$user_permission['update'],\n 'delete'=>$user_permission['delete'],\n 'read'=>$user_permission['read'],\n ]);\n }\n }\n }",
"public function run()\n {\n AdminRole::creates(['name' => '超级管理员', 'description' => '拥有系统的全部权限']);\n AdminRole::creates(['name' => '内容管理员', 'description' => '拥有管理内容的权限']);\n }",
"public function givePermission($user, $permission) {\n global $MYSQL, $TANGO;\n $user = $TANGO->user($user);\n if( !empty($user) ) {\n $perm = $TANGO->perm->perm($permission);\n if( $user['additional_permissions'] == \"0\" ) {\n $update = array(\n 'additional_permissions' => $perm['permission_name']\n );\n } else {\n $ap_array = array();\n foreach( $user['additional_permissions'] as $ap ) {\n $MYSQL->where('permission_name', $ap);\n $ap_query = $MYSQL->get('{prefix}permissions');\n if( $ap_query ) {\n $ap_array[] = $ap_query['0']['id'];\n }\n }\n $additional_permissions = implode(',', $ap_array);\n $update = array(\n 'additional_permissions' => $additional_permissions . ',' . $perm['permission_name']\n );\n }\n $MYSQL->where('id', $user['id']);\n if( $MYSQL->update('{prefix}users', $update) ) {\n return true;\n } else {\n return false;\n }\n } else { \n return false;\n }\n }",
"function add_user_role_leadership(){\r\n\tif(isset($_GET['addrole']) && ($_GET['addrole'] == 'do')){\r\n\t\tadd_role( 'quote_manager', 'Quote Manager', array( 'read' => true, 'level_2' => true ) );\r\n\r\n//\t\tremove_role( 'tow_company' );\r\n\t}\r\n}",
"public function assignRole(\n string $username,\n string $role,\n ColumnInterface $column = null\n ):bool;",
"public function givePermissions($roleID, array $permissions)\n {\n\n $role = parent::find($roleID);\n\n $role->attachPermissions($permissions);\n\n return 1;\n }",
"public function role_assignment(Request $request, User $user)\n {\n $this->authorize('assign_role', $user);\n $user->role_assignment($request);\n return redirect()->route('backoffice.user.show', $user);\n }",
"public function run()\n {\n $role = Role::create(['name' => 'administrator']);\n $role->givePermissionTo('users_manage');\n $role->givePermissionTo('payments_manage');\n $role->givePermissionTo('create_sales_purchase');\n $role->givePermissionTo('manage_tax');\n $role->givePermissionTo('view_reports');\n $role->givePermissionTo('companies_manage');\n $role->givePermissionTo('vendors_manage');\n $role->givePermissionTo('customers_manage');\n $role = Role::create(['name' => 'manager']);\n $role->givePermissionTo('payments_manage');\n $role->givePermissionTo('create_sales_purchase');\n $role->givePermissionTo('manage_tax');\n $role->givePermissionTo('view_reports');\n $role->givePermissionTo('vendors_manage');\n $role->givePermissionTo('customers_manage');\n $role = Role::create(['name' => 'accountant']);\n $role->givePermissionTo('payments_manage');\n $role->givePermissionTo('create_sales_purchase');\n $role->givePermissionTo('manage_tax');\n $role->givePermissionTo('view_reports');\n $role->givePermissionTo('vendors_manage');\n $role->givePermissionTo('customers_manage');\n \n }",
"public function run()\n {\n $this->disableForeignKeys();\n\n User::find(1)->assignRole(config('access.users.admin_role'));\n User::find(2)->assignRole(config('access.users.owner_role'));\n User::find(3)->assignRole(config('access.users.operational_manager_role'));\n User::find(4)->assignRole(config('access.users.operational_staff_role'));\n User::find(5)->assignRole(config('access.users.akunting_manager_role'));\n User::find(6)->assignRole(config('access.users.akunting_staff_role'));\n User::find(6)->assignRole(config('access.users.butler_role'));\n User::find(7)->assignRole(config('access.users.default_role'));\n\n $this->enableForeignKeys();\n }",
"public function addPermission(){\n\t\t\n\t\t\n\t\t$role = $this->checkExist();\n\t\tif($role === false){\n\t\t\treturn \"Role doesn't exist <br>\";\n\t\t}\n\t\t\n\t\t$PC = new PermissionController(array(\"id\"=>$this->_params[\"permissionId\"], \"permission\"=>$this->_params[\"permissionName\"]));\n\t\t$permission = $PC->checkExist();\n\t\tif($permission===false){\n\t\t\treturn \"Permission doesn't exist <br>\";\n\t\t}\n\t\t\n\t\t$RP = new RolePermission($role->_id, $permission->_id);\n\t\t\n\t\t$check = $RP->findInDB();\n\t\t\n\t\tif($check != false){\n\t\t\treturn(\"This role already has this permission. <br>\");\n\t\t}\n\t\t\n\t\t$RP->create();\n\t\treturn true;\n\t}",
"function update_role_permision() {\n\t\t$user_role = $this->get_role_permission($_POST['role_id']);\n\t\tforeach ($user_role->result() as $role) {\n\t\t\t\n\t\t\t$this->db->where('entry_id', $role->entry_id);\n\t\t\t$list = $_POST['role_permission'];\n\t\t\t$allow = isset($list[$role->entry_id]) ? 1 : 0;\n\t\t\t$this->db->update('system_security.security_role_permission', array('allow_deny' => $allow));\n\t\t}\n\t}",
"public function testCreateUser()\n {\n /** @var Role $role */\n// $role = Role::query()->where('name', 'root')->get();\n// $user = User::query()->create([\n// 'name' => 'white',\n// 'email' => '[email protected]',\n// 'password' => '123456',\n// ]);\n// $role = Role::query()->where('id', 1)->get();\n// /** @var Permission $permission */\n// $permission = Permission::query()->where('name','edit articles')->get();\n// /** @var User $user */\n// $user = User::query()->where('name', 'white')->get();\n// $role->givePermissionTo('edit articles');\n// $setRoot = $permission->assignRole('whitess');\n// dd($setRoot);\n }",
"public static function addPermissionToUser($user_id, $permission_name){\n if (\\Yii::$app->authManager\n ->checkAccess($user_id,\n $permission_name) === false) {\n\n if (self::authManager()->getPermission($permission_name) == NULL) {\n self::createPermission($permission_name, 'The permission for one account\\'s credentials data.');\n }\n\n $role = self::authManager()->createRole($permission_name . '-r4uid-' . $user_id);\n\n // add parent item.\n self::authManager()->add($role);\n $permission = self::authManager()->getPermission($permission_name);\n // add child item.\n self::authManager()->addChild($role, $permission);\n\n // assign role to user by id.\n self::authManager()->assign($role, $user_id);\n }\n }",
"public function actionCreateRole($role_name, $user_id_or_name){\n $user_id = $this->getUserId($user_id_or_name);\n\n $auth = Yii::$app->authManager;\n $role = $auth->createRole($role_name . '-user-id-' . $user_id);\n $auth->add($role);\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 permission_assignment(Request $request, User $user)\n {\n $this->authorize('assign_permission', $user);\n $user->permissions()->sync($request->permissions);\n alert('Exito', 'Permisos asignados', 'success');\n return redirect()->route('backoffice.user.show', $user);\n }",
"public function authorizeAction()\n {\n $this->view->title .= ' - Grant Access';\n\n $id = $this->_getParam('roleId');\n if (empty($id)) throw new InvalidArgumentException('Missing parameter roleId.');\n\n // find current role\n $roleResource = new Application_Model_Mapper_Roles();\n /* @var $role Application_Model_Role */\n $role = current($roleResource->find($id));\n\n $Acl = new Application_Model_Mapper_Acl();\n\n $form = $this->_getForm('aclAdd');\n $form->setAction($form->getAction());\n\n $request = $this->getRequest();\n if ($request->isPost() && $form->isValid($request->getPost())) {\n $values = $form->getValues();\n $i = 0;\n $Acl->cleanByRoleAndResource($values['roleId'], $values['resourceId']);\n foreach ($values['action'] as $action) {\n $data = $values;\n $data['action'] = $action;\n\n $aclItem = $Acl->fetchRowByRoleAndResource($data['roleId'], $data['resourceId'], $action);\n $aclItem->setData($data);\n $aclItem->save();\n }\n $this->_helper->flashMessenger(\"Update $i rule(s) for role \\\"{$role->name}\\\"!\");\n //clean acl cache\n $i = $this->_cleanAclCacheByRole($role);\n $this->_helper->flashMessenger(\"clean $i acl cache for {$role->name}.\");\n }\n\n //get all registered resources\n $Resources = new Application_Model_Mapper_Resources();\n $rowset = $Resources->fetchAll();\n\n $allResources = array();\n foreach ($rowset as $resource) {\n $allResources[$resource->id] = $resource->name;\n }\n\n $form->setDefault('roleId', $role->id);\n //find resources by role\n $rowset = $role->getResources();\n $resources = array();\n foreach ($rowset as $resource) {\n $resources[$resource->id] = $resource;\n }\n //$aResources = array_diff_key($allResources, $resources);\n $rowset = $role->getAcl();\n $acl = array();\n foreach ($rowset as $item) {\n $acl[$item->resourceId][] = $item;\n }\n\n $form->getElement('resourceId')->setMultiOptions($allResources);\n\n $this->view->resources = $resources;\n $this->view->acl = $acl;\n $this->view->form = $form;\n\n $this->view->role = $role;\n }"
] | [
"0.6846279",
"0.66425914",
"0.6507504",
"0.6435825",
"0.6371213",
"0.6353974",
"0.632731",
"0.6325993",
"0.6303463",
"0.614327",
"0.6086499",
"0.6079334",
"0.6072519",
"0.6056568",
"0.6009098",
"0.5989631",
"0.5989022",
"0.5970255",
"0.59632045",
"0.59330463",
"0.5932881",
"0.5932275",
"0.5904106",
"0.58975035",
"0.58754224",
"0.58754224",
"0.5861637",
"0.585775",
"0.58406585",
"0.582772",
"0.5809354",
"0.5799466",
"0.5799466",
"0.57912225",
"0.57855374",
"0.5783559",
"0.5756443",
"0.57534754",
"0.5750291",
"0.5746935",
"0.5735147",
"0.5733676",
"0.57247216",
"0.5716446",
"0.5713686",
"0.57109416",
"0.57086223",
"0.57047164",
"0.569553",
"0.56887007",
"0.5688324",
"0.56873894",
"0.5678487",
"0.56674415",
"0.5664094",
"0.5647783",
"0.5643581",
"0.5630569",
"0.5620269",
"0.56159383",
"0.561431",
"0.56137073",
"0.5599821",
"0.55981094",
"0.55951285",
"0.55831367",
"0.5574314",
"0.55729854",
"0.55621105",
"0.55607176",
"0.55597883",
"0.55584013",
"0.5548043",
"0.5547738",
"0.55394065",
"0.5537329",
"0.55362034",
"0.5525222",
"0.5521112",
"0.551679",
"0.5516534",
"0.55038637",
"0.54996634",
"0.54978937",
"0.54955196",
"0.549376",
"0.54869056",
"0.54863614",
"0.5484791",
"0.5484564",
"0.5481945",
"0.5479784",
"0.54793394",
"0.5478058",
"0.5473937",
"0.54695433",
"0.5469276",
"0.5468576",
"0.5463073",
"0.5460284"
] | 0.65905255 | 2 |
Get the document that owns the document pic. | public function document()
{
return $this->belongsTo('App\Document');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOwnerDocument()\n {\n return $this->document;\n }",
"public function getOwnerPdfDocument();",
"public function getOwnerPdfDocument() {}",
"public function getOwnerPdfDocument() {}",
"public function getOwnerPdfDocument() {}",
"public function getOwnerPdfDocument() {}",
"public function get_document()\n {\n return $this->document;\n }",
"public function get_document() {\n\t\treturn $this->doc;\n\t}",
"function getIdDoc() {\r\n return $this->IdDoc;\r\n }",
"public function getCurrentObjectDocument() {}",
"public function getDocument()\n {\n return $this->document;\n }",
"public function getDocument()\n {\n return $this->document;\n }",
"public function getCurrentDocument()\n {\n return $this->current_document;\n }",
"public function getDocument() {\n\t\treturn phpQuery::getDocument($this->getDocumentID());\n\t}",
"public function getDocument() {\n\t\treturn phpQuery::getDocument($this->getDocumentID());\n\t}",
"public function getDocument() {\n return $this->document;\n }",
"public function getDocument()\n\t{\n\t\treturn $this->document;\n\t}",
"public function getPictureName()\n {\n foreach ($this->getDocuments() as $document) {\n if ($document->getType() === DocumentType::PICTURE) {\n return $document->getFilename();\n }\n }\n }",
"public function getIdentityDocumentReference()\n {\n return $this->identityDocumentReference;\n }",
"public function getDoc()\n {\n return $this->doc;\n }",
"public function getDocId()\n {\n return $this->doc_id;\n }",
"public function getDocument()\n\t{\n\t\treturn $this->_doc;\n\t}",
"public function getDocument();",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null);",
"public function getOwner();",
"public function getOwner();",
"public function getOwner();",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function getDocument() {}",
"public function document()\n\t{\n\t\treturn $this->Obj_Doc;\n\t}",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}",
"public function getIndirectObject(?\\SetaPDF_Core_Document $document = null) {}",
"public static function getDocument()\n {\n return self::$_document;\n }",
"function getDocumentID() {\n\t\treturn $this->iDocumentID;\n\t}",
"public function getParentDocument(): ?object\n {\n return $this->parent;\n }",
"public function getDocumentReference()\n {\n return $this->documentReference;\n }",
"public function getOwner()\n {\n if (!$this->owner) {\n return $this->getForm();\n }\n\n return $this->owner;\n }",
"public function getAbsolutePicture();",
"abstract public static function getDoc();",
"public function getDocument(): Document\n {\n return $this->document;\n }",
"function getOwner() {\n \n return $this->principalInfo['uri'];\n \n }",
"public function photo()\n {\n \treturn $this->article->photos->first();\n }",
"public function getOwner()\n {\n if (array_key_exists(\"owner\", $this->_propDict)) {\n return $this->_propDict[\"owner\"];\n } else {\n return null;\n }\n }",
"public function getOwner()\n {\n return $this->get(self::_OWNER);\n }",
"public function getDocumentID()\n {\n return $this->documentID;\n }",
"public function getDocument()\n {\n return $this->_pdfDocument;\n }",
"public function getOwner()\n {\n return isset($this->owner) ? $this->owner : null;\n }",
"public function getOwner()\n\t{\n\t\treturn $this->getObject('owner', null, 'user');\n\t}",
"public function getOwner() {\n\t\treturn $this->owner;\n\t}",
"function readOwner() { return($this->owner); }",
"public function document() {\n return $this->hasOne('App\\Documents', 'id', 'document_id');\n }",
"public function getOwner()\n {\n return $this->owner;\n }",
"public function getOwner()\n {\n return $this->owner;\n }",
"public function getOwner()\n {\n return $this->owner;\n }",
"public function getOwner()\n {\n return $this->_owner;\n }",
"public function getPhoto()\n {\n return $this->execute('GET', '/' . self::PHOTO);\n }",
"public function getOwner() {\r\n return $this->owner;\r\n }",
"public function getDocumentID() {\n\t\treturn $this->documentID;\n\t}",
"public function getDocumentID() {\n\t\treturn $this->documentID;\n\t}",
"public function document($filename = null) {\n if(is_null($filename)) return $this->documents()->first();\n return $this->documents()->find($filename);\n }",
"public function getOwner() {}",
"public function getOwner() {}",
"public function getOwner() {}",
"public function getOwner() {}",
"public function getPhotoFile()\n\t{\n\t\treturn $this->photo_file;\n\t}",
"function getOwner() \n {\n return $this->instance->getOwner();\n }",
"public function getPhoto()\n {\n return $this->photo;\n }",
"public function getPhoto()\n {\n return $this->photo;\n }",
"public function getPhoto()\n {\n return $this->photo;\n }",
"public function getPhoto()\n {\n return $this->photo;\n }",
"public function getPhoto()\n {\n return $this->photo;\n }",
"public function getDocumentId()\n {\n return $this->_documentId;\n }",
"public function getPictureFile()\n {\n return $this->pictureFile;\n }",
"public function getPictureFile()\n {\n return $this->pictureFile;\n }",
"function readOwner()\r\n {\r\n return(null);\r\n }",
"public function getOwner() {\n // no need to check whether exist because of database constrain\n return User::getUserById($this->owner_id);\n }",
"public function getPhotoFile()\n {\n return $this->photoFile;\n }",
"public function getDocument(): ?Document\n {\n return $this->document;\n }",
"public function getDocument(): ?Document\n {\n return $this->document;\n }",
"public function getOwner()\n {\n return $this->data['owner'];\n }"
] | [
"0.73866093",
"0.708827",
"0.7010102",
"0.7010102",
"0.70094514",
"0.70094514",
"0.6422977",
"0.62486047",
"0.6131506",
"0.6126206",
"0.6054657",
"0.6054657",
"0.60396755",
"0.60393167",
"0.60393167",
"0.6016094",
"0.6014086",
"0.58988655",
"0.58805126",
"0.58710754",
"0.5827649",
"0.5826789",
"0.58157504",
"0.58090824",
"0.5796209",
"0.5796209",
"0.5796209",
"0.579325",
"0.579325",
"0.579325",
"0.579325",
"0.579325",
"0.579325",
"0.579325",
"0.579325",
"0.579325",
"0.579325",
"0.57929045",
"0.57929045",
"0.57929045",
"0.57929045",
"0.57654697",
"0.57595956",
"0.5759398",
"0.5759307",
"0.5759307",
"0.57587",
"0.57587",
"0.57587",
"0.57587",
"0.57587",
"0.57576126",
"0.57576126",
"0.57354075",
"0.5713861",
"0.56998736",
"0.56799",
"0.56356543",
"0.5627327",
"0.56230825",
"0.5618121",
"0.5614411",
"0.5603095",
"0.55998933",
"0.5599473",
"0.55937517",
"0.5573027",
"0.55708784",
"0.5567554",
"0.5566546",
"0.55640715",
"0.5552678",
"0.55259264",
"0.55259264",
"0.55259264",
"0.55202496",
"0.55097663",
"0.550346",
"0.55031663",
"0.55031663",
"0.5497179",
"0.5480011",
"0.54791677",
"0.54791677",
"0.54791677",
"0.5470887",
"0.5465522",
"0.5438493",
"0.5438493",
"0.5438493",
"0.5438493",
"0.5438493",
"0.54265577",
"0.53888285",
"0.53888285",
"0.5387415",
"0.5382112",
"0.5381445",
"0.5378859",
"0.5378859",
"0.53751576"
] | 0.0 | -1 |
Get the pic that owns the document pic. | public function pic()
{
return $this->belongsTo('App\Pic');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPicture()\n\t{\n\t\treturn $this->picture;\n\t}",
"public function getAbsolutePicture();",
"public function getPicture()\n {\n return $this->picture;\n }",
"public function getPicture()\n {\n return $this->picture;\n }",
"public function getPicture() {\n return $this->picture;\n }",
"function getPicture(){\r\n return $this->picture;\r\n }",
"public function getPictureFile()\n {\n return $this->pictureFile;\n }",
"public function getPictureFile()\n {\n return $this->pictureFile;\n }",
"public function getPictureName()\n {\n foreach ($this->getDocuments() as $document) {\n if ($document->getType() === DocumentType::PICTURE) {\n return $document->getFilename();\n }\n }\n }",
"public function get_picture(){ return $this->_picture;}",
"public function getPictureId()\n {\n return $this->pictureId;\n }",
"public function getPhoto()\n {\n return $this->photo;\n }",
"public function getPhoto()\n {\n return $this->photo;\n }",
"public function getPhoto()\n {\n return $this->photo;\n }",
"public function getPhoto()\n {\n return $this->photo;\n }",
"public function getPhoto()\n {\n return $this->photo;\n }",
"public function getActPicture()\n {\n $aPicGallery = $this->getPictureGallery();\n\n return $aPicGallery['ActPic'];\n }",
"public function getPhoto()\n {\n return $this->execute('GET', '/' . self::PHOTO);\n }",
"public function getPhoto()\n {\n return $this->photo;\n }",
"public function getPhoto($photo_uid) {\r\n\t\t$photo = tx_cwtcommunity_lib_common::dbQuery('SELECT * FROM tx_cwtcommunity_photos p WHERE uid = \"'.intval($photo_uid).'\" AND NOT deleted = \"1\" AND NOT hidden = 1;');\r\n\t\treturn $photo[0];\r\n\t}",
"public function getCbImageId() : ?ComicBookImage\n { \n return($this->cb_image);\n }",
"function getImage() {\n\t\treturn $this->_image;\n\t}",
"function getPicUrl()\n\t\t{\n\t\t\treturn $this->picurl;\n\t\t}",
"public function getProfilePicture()\n {\n return $this->profilePicture;\n }",
"public function getProfilePicture()\n\t{\n\t\treturn $this->info['profile_picture'];\n\t}",
"function getImage()\n {\n return $this->_image;\n }",
"public function getOppoAvatar()\n {\n return $this->get(self::_OPPO_AVATAR);\n }",
"public function getImage() {\n\t\treturn $this->image;\n\t}",
"public function getImage() {\n\t\treturn $this->image;\n\t}",
"public function getImage() {\n\t\treturn $this->image;\n\t}",
"public function getImage()\n {\n return $this->_image;\n }",
"function getImage()\r\n\t\t{\r\n\t\t\treturn $this->image;\r\n\t\t\t\r\n\t\t}",
"public function getImage()\n\t{\n\t\treturn $this->image;\n\t}",
"public function getImage()\n\t{\n\t\treturn $this->image;\n\t}",
"public function get_pic_path()\n {\n if(!$this->img_path || !file_exists($this->img_path)) {\n return Config::$NO_PRES_PIC_PATH;\n }\n else {\n return $this->img_path;\n }\n }",
"public function getWebPicture();",
"public function getProfPic() {\n $response = $this->getRequest(\"me\");\n $response = json_decode($response->getBody()->getContents());\n \n if (count($response->{\"images\"}) == 0) {\n return null;\n } else {\n return $response->{\"images\"}[0]->{\"url\"};\n }\n }",
"public function getImage() {\n\t\t\treturn $this->image;\n\t\t}",
"public function photo()\n {\n \treturn $this->article->photos->first();\n }",
"public function getContenidoPictureFile() {\n return $this->contenido_picture_file;\n }",
"public function getImageResource()\n {\n return $this->image;\n }",
"public function getProfilePictureFile()\n {\n return $this->profile_picture_file;\n }",
"public function get_image() {\r\n return $this->image;\r\n }",
"public function getImage()\r\n {\r\n return $this->image;\r\n }",
"public function getImage()\r\n {\r\n return $this->image;\r\n }",
"private function getOriginalImage()\n {\n return $this->getDisk()->get($this->path);\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function getProfilePicture();",
"public function getOwnerDocument()\n {\n return $this->document;\n }",
"public function getPhotoFile()\n\t{\n\t\treturn $this->photo_file;\n\t}",
"public function getImage() {\n return $this->image;\n }",
"public function getContenidoPicture() {\n return $this->contenidoPicture;\n }",
"public function getPicture(){\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->condition = \"emp_id = :EMPID\";\n\t\t$criteria->params[':EMPID'] = $this->emp_id;\n\t\t$criteria->select = \"pic,location_pic\";\n\t\t$empl_pic = Employees::model()->find($criteria);\n\t\treturn \t$empl_pic;\n\t}",
"public function getCurrentImage()\n {\n return $this->image;\n }",
"public function getPhotoFile()\n {\n return $this->photoFile;\n }",
"public function getPictureURL()\n {\n return $this->pictureURL;\n }",
"public function getPictureURL() {\n return $this->picture_url;\n }",
"public function getImage()\n {\n return $this->Image;\n }",
"public function getImage()\n {\n return $this->get('image');\n }",
"public function getPictureUrl()\n {\n return $this->getImageurl();\n }",
"public function getSpotifyProfilePicture()\n {\n return $this->spotifyProfilePicture;\n }",
"function get_display_photo(){\n\t$display_photo = get_profile( 'photo' );\n\tif ( empty($display_photo) || !file_exists(abspath('/contents/images/profile/'.$display_photo)) )\n\t\treturn false;\n\n\treturn get_image_link( \"/images/profile/$display_photo\", \"default\" );\n}",
"public function getImage()\n {\n return $this->image;\n }",
"public function get_image() {\n\n return $this->image_id !== null ? $this->image->full_src() : null;\n }",
"public function getImage()\n {\n return $this->image;\n }",
"public function currentPicture()\n {\n return $this->belongsTo('App\\Models\\Picture', 'current_picture_id');\n }",
"public function getUserPhoto() {\n $response = $this->_connectAndGrabUserData();\n\n if($response && isset($response['picture']) && $response['picture']) {\n return $response['picture'];\n }\n\n return false;\n }",
"public function getPhoto() : string\r\n\t{\r\n\t\treturn $this->photo;\r\n\t}",
"public function getAvatar()\n\t{\n\t\treturn $this->instance->profile;\n\t}",
"public function picture_url() {\n return $this->_adaptee->user_photo(\"\", true);\n }",
"public function getAvatar() {\n return (new Query())->select('profile_photo')->from('user_cv')\n ->where(['user_id' => $this->id, 'is_default' => true])\n ->limit(1)->scalar();\n }",
"public function getImg()\n {\n return $this->imgLink;\n }",
"public function getOwnerPdfDocument();",
"public function getPhoto() : string {\n $hash = crc32($this->name);\n $filename = self::PHOTO_DIRECTORY . $hash . '.png';\n\n if (file_exists($filename))\n return '/images/photos/' . $hash . '.png';\n\n return '/images/no-photo.png';\n }",
"public function getPictogram()\n {\n return $this->pictogram;\n }"
] | [
"0.6765548",
"0.6737297",
"0.6707673",
"0.6707673",
"0.6661579",
"0.652561",
"0.6456228",
"0.6456228",
"0.6437082",
"0.6389591",
"0.63231903",
"0.6322596",
"0.6322596",
"0.6322596",
"0.6322596",
"0.6322596",
"0.63184077",
"0.628055",
"0.6223906",
"0.62201834",
"0.62138915",
"0.61492115",
"0.6095464",
"0.6079792",
"0.6076779",
"0.60590845",
"0.6047254",
"0.60402906",
"0.60402906",
"0.60402906",
"0.6039215",
"0.6030939",
"0.6030156",
"0.6030156",
"0.60219115",
"0.599",
"0.5989652",
"0.5989513",
"0.59875554",
"0.59741324",
"0.59690034",
"0.5968707",
"0.5954561",
"0.5950822",
"0.5950822",
"0.59505224",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5950521",
"0.5947444",
"0.5934323",
"0.59317964",
"0.5924209",
"0.59231836",
"0.59217113",
"0.5920691",
"0.59044343",
"0.5903821",
"0.5883175",
"0.5874495",
"0.5866618",
"0.5860487",
"0.5856004",
"0.58556336",
"0.5852242",
"0.58508086",
"0.58485657",
"0.5848453",
"0.58278084",
"0.58146137",
"0.5787445",
"0.5769157",
"0.57550836",
"0.57528394",
"0.57499284",
"0.57428783",
"0.5740488"
] | 0.0 | -1 |
Return the default loader object. | public function getLoader(ObjectManager $manager, $queryBuilder, $class)
{
return new EntityChoice\ArbitrarySetLoader(
$queryBuilder
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public function get_loader() {\n\t\treturn $this->loader;\n\t}",
"public static function loader()\r\n {\r\n if(is_null(self::$instance))\r\n self::$instance = new self();\r\n return self::$instance;\r\n }",
"public static function init(){\n if( self::$loader == null ){\n self::$loader = new self();\n }\n return self::$loader;\n }",
"public function get_loader()\n {\n return $this->loader;\n }",
"static private function _getLoader() {\n\t\tif(self::isNull(self::$_loader)) {\n\t\t\tself::$_loader = Loader::getImageLoader(self::webiny()->getConfig()->get('components.image'));\n\t\t}\n\n\t\treturn self::$_loader;\n\t}",
"private function getLoader(): FilesystemLoader\n {\n if (null == $this->loader) {\n $this->loader = new FilesystemLoader(\n $this->locations\n );\n }\n return $this->loader;\n }",
"public function getLoader()\n {\n return $this->loader;\n }",
"protected function getLoader()\n {\n }",
"public function getDefaultConfigLoader(): ?ConfigLoader;",
"public function config() : LoaderInterface {\n return $this -> loader;\n }",
"protected function getConfigLoader()\n\t{\n\t\treturn new FileLoader(new Filesystem, $this->defaultPath);\n\t}",
"public static function get_instance() {\n\n\t\tif ( ! isset( self::$instance ) || ! ( self::$instance instanceof self ) ) {\n\t\t\tself::$instance = new Loader();\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"protected function initLoader()\n {\n $config = $this->di->getShared('config');\n $loader = new Loader;\n $loader->registerNamespaces(\n [\n 'Phosphorum\\Models' => $config->get('application')->modelsDir,\n 'Phosphorum\\Controllers' => $config->get('application')->controllersDir,\n 'Phosphorum\\Forms' => $config->get('application')->formsDir,\n 'Phosphorum' => $config->get('application')->libraryDir\n ]\n );\n\n $loader->register();\n $this->di->setShared('loader', $loader);\n\n return $loader;\n }",
"public function newLoader()\n {\n $loader = substr(get_class($this), 0, -9) . 'Loader';\n\n return app()->make($loader, ['extension' => $this]);\n }",
"public static function getInstance() : Loader{\n return self::$instance;\n }",
"public static function loader()\n\t{\n\t\treturn static::$_parser_loader;\n\t}",
"protected function getLiipImagine_Binary_Loader_DefaultService()\n {\n return $this->services['liip_imagine.binary.loader.default'] = new \\Liip\\ImagineBundle\\Binary\\Loader\\FileSystemLoader($this->get('liip_imagine.mime_type_guesser'), $this->get('liip_imagine.extension_guesser'), array(0 => ($this->targetDirs[3].'/app/../web')), new \\Liip\\ImagineBundle\\Binary\\Locator\\FileSystemLocator());\n }",
"protected function makeEmptyLoaderInstance(): Loader\n {\n return new Loader('testCase', 'test');\n }",
"protected function getLanguage_LoaderService()\n {\n $this->services['language.loader'] = $instance = new \\phpbb\\language\\language_file_loader('./../', 'php');\n\n $instance->set_extension_manager(${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'});\n\n return $instance;\n }",
"public function getLoader()\n {\n if ('file' === $this->source) {\n return new DefinitionManagerFileLoader($this->container, $this->definitionFile);\n } else {\n return new DefinitionManagerDoctrineLoader($this->container, $this->emName);\n }\n }",
"public static function get_loader() {\n if (self::$loader == null) {\n self::$loader = new Autoloader();\n }\n /**\n * Unlike our previous singleton, in order to have this class automatically load our classes it is necessary to use the spl_autoload_register function before returning the instance.\n * \n * This function takes an array as the first parameter which holds the class name of an autoloading method we want to call, followed by the method name.\n */\n spl_autoload_register(array('Autoloader', 'class_loader'), true, false);\n /**\n * The second and third parameters are boolean values. The first specifies whether the function should throw exceptions (errors) if the class_loader() method can not be registered and should be set to true.\n * \n * The second specifies that this autoloader method should be moved to the top of the queue if there are multiple autoloaders and should beset to false as we will want this autoloader to come after another autoloader we will be importing.\n */\n return self::$loader;\n }",
"private function loader()\n {\n return new ServiceDescriptionLoader();\n }",
"public function getLoader()\n {\n if (null === $this->loader) {\n throw new LogicException('You must set a loader first.');\n }\n return $this->loader;\n }",
"public function getLoader()\n {\n if (null === $this->loader) {\n throw new LogicException('You must set a loader first.');\n }\n\n return $this->loader;\n }",
"protected function getLoader() : FilteredLoaderInterface\n {\n return $this->loader;\n }",
"private function initLoader() {\n $this->_loader = new Loader();\n\t}",
"protected function getRegistryLoader()\n {\n return $this->registryLoader;\n }",
"public function getLoader(): TestSuiteLoader\n {\n if ($this->loader === null) {\n $this->loader = new StandardTestSuiteLoader;\n }\n\n return $this->loader;\n }",
"public function getLoader(): TestSuiteLoader\n {\n if ($this->loader === null) {\n $this->loader = new StandardTestSuiteLoader;\n }\n\n return $this->loader;\n }",
"protected function getTemplating_LoaderService()\n {\n return $this->services['templating.loader'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\FilesystemLoader(${($_ = isset($this->services['templating.locator']) ? $this->services['templating.locator'] : $this->getTemplating_LocatorService()) && false ?: '_'});\n }",
"public static function getLoader(string $section, bool $load_all = true) : Extend\\Utils\\Loader\\Basic {\n\n\t\t\treturn new static::$loader_class($section, $load_all);\n\t\t}",
"public function defaultLoading() {}",
"public function getPageLoader() {\n return $this->pageLoader;\n }",
"protected function getTranslation_LoaderService()\n {\n $a = $this->get('translation.loader.xliff');\n\n $this->services['translation.loader'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\TranslationLoader();\n\n $instance->addLoader('php', $this->get('translation.loader.php'));\n $instance->addLoader('yml', $this->get('translation.loader.yml'));\n $instance->addLoader('xlf', $a);\n $instance->addLoader('xliff', $a);\n $instance->addLoader('po', $this->get('translation.loader.po'));\n $instance->addLoader('mo', $this->get('translation.loader.mo'));\n $instance->addLoader('ts', $this->get('translation.loader.qt'));\n $instance->addLoader('csv', $this->get('translation.loader.csv'));\n $instance->addLoader('res', $this->get('translation.loader.res'));\n $instance->addLoader('dat', $this->get('translation.loader.dat'));\n $instance->addLoader('ini', $this->get('translation.loader.ini'));\n $instance->addLoader('json', $this->get('translation.loader.json'));\n\n return $instance;\n }",
"protected static function getClassLoader() {}",
"public function getConfigLoader(): ?ConfigLoader;",
"public abstract function get_loader_name();",
"protected function getStepsLoaderService()\n {\n if (isset($this->shared['steps_loader'])) return $this->shared['steps_loader'];\n\n $class = $this->getParameter('steps_loader.class');\n $instance = new $class($this->getParameter('steps.path'), $this);\n $this->shared['steps_loader'] = $instance;\n\n return $instance;\n }",
"public function setLoader(Loader $loader): self;",
"protected function getClassLoaderService()\n {\n $this->services['class_loader'] = $instance = new \\phpbb\\class_loader('phpbb\\\\', './../includes/', 'php');\n\n $instance->register();\n $instance->set_cache(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n\n return $instance;\n }",
"protected function getFilesystemLoader() : PregMatchFilteredLoaderInterface\n {\n return $this->filesystemLoader;\n }",
"public static function getInstance() {\n if (is_null(self::$_modelLoader)) {\n self::$_modelLoader = new self();\n //Zend_Debug::dump(self::$_instance);\n return self::$_modelLoader;\n } else {\n return self::$_modelLoader;\n }\n }",
"public function getClassLoader() {\n return $this->classLoader;\n }",
"public function getLoader($locale);",
"protected function getFeaturesLoaderService()\n {\n $class = $this->getParameter('features_loader.class');\n $instance = new $class($this->getParameter('features.path'), $this);\n\n return $instance;\n }",
"public static function getAppLoader() {\n return self::$appLoader;\n }",
"public static function getLoader($whichLoader)\n {\n $loaderArray = array(\n Loader::XML_LOADER => __NAMESPACE__ . \"\\\\Loaders\\\\XmlLoader\"\n );\n return new $loaderArray[$whichLoader]();\n }",
"public static function getClassLoader()\n {\n if (static::$loader === null) {\n\n spl_autoload_register(array('NamespaceClassLoader', 'loadClassLoader'), true, true);\n static::$loader = $loader = new \\Composer\\Autoload\\ClassLoader();\n spl_autoload_unregister(array('NamespaceClassLoader', 'loadClassLoader'));\n static::$loader->register();\n }\n\n return static::$loader;\n }",
"public function getProcessorsLoader()\n {\n if ($this->processorsLoader === null)\n {\n $processorsToFilter = $this->parameters['processors'];\n $this->processorsLoader = new PluginLoader(\n 'PieCrust\\\\Baker\\\\Processors\\\\IProcessor',\n PieCrustDefaults::APP_DIR . '/Baker/Processors',\n function ($p1, $p2) { return $p1->getPriority() < $p2->getPriority(); },\n $processorsToFilter == '*' ?\n null :\n function ($p) use ($processorsToFilter) { return in_array($p->getName(), $processorsToFilter); },\n 'SimpleFileProcessor.php'\n );\n foreach ($this->processorsLoader->getPlugins() as $proc)\n {\n $proc->initialize($this->pieCrust);\n }\n }\n return $this->processorsLoader;\n }",
"protected function _initAutoload()\n\t{\n\t\t$config = $this->getOption('autoloader');\n\t\t$autoloader = new Zend_Loader_Autoloader_Resource($config);\n\n\t\treturn $autoloader;\n\t}",
"public function __load();",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"public function get_loader_name()\n {\n }",
"function importClass($loader, $default = null, $exportKey = _INIT_CONFIG)\n {\n if (is_string($loader)) {\n $loader = l($loader);\n }\n $class = isset($loader->var) ? get(\n $loader->var[$exportKey],\n _CLASS\n ) : getDefault($default);\n\n if (is_null($class)) {\n $class = '';\n }\n\n return $class;\n }",
"protected function getUserLoaderService()\n {\n return $this->services['user_loader'] = new \\phpbb\\user_loader(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, './../', 'php', 'phpbb_users');\n }",
"public function getPlugin(): Plugin {\n\t\treturn $this->loader;\n\t}",
"public function get_loader($key)\n {\n }",
"protected function getRouting_LoaderService()\n {\n $a = $this->get('file_locator');\n $b = $this->get('annotation_reader');\n\n $c = new \\Sensio\\Bundle\\FrameworkExtraBundle\\Routing\\AnnotatedRouteControllerLoader($b);\n\n $d = new \\Symfony\\Component\\Config\\Loader\\LoaderResolver();\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\XmlFileLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\YamlFileLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\PhpFileLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\DirectoryLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\DependencyInjection\\ServiceRouterLoader($this));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\AnnotationDirectoryLoader($a, $c));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\AnnotationFileLoader($a, $c));\n $d->addLoader($c);\n $d->addLoader($this->get('victoire_core.routing_loader'));\n $d->addLoader($this->get('victoire_i18n.routing_loader'));\n\n return $this->services['routing.loader'] = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\DelegatingLoader(${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->getControllerNameConverterService()) && false ?: '_'}, $d);\n }",
"function someloader($filepath) {\n\treturn SomeLoader::import($filepath);\n}",
"protected function autoLoader()\n {\n $bool = file_exists(MAIN_PATH . '/bin/autoload.php');\n\n if ($bool) {\n $this->loader = require_once MAIN_PATH . '/bin/autoload.php';\n }\n\n return $this;\n }",
"public function getSnippetLoader()\n {\n if (! $this->snippetLoader) {\n $this->loadSnippetLoader();\n }\n\n return $this->snippetLoader;\n }",
"public function load()\n {\n $loader = new Loader($this->filePath, true);\n return $loader->load();\n }",
"public static function getPluginLoader()\n {\n if (!isset(self::$_pluginLoader)) {\n require_once 'Zend/Loader/PluginLoader.php';\n self::$_pluginLoader = new Zend_Loader_PluginLoader([\n 'Zend_Feed_Reader_Extension_' => 'Zend/Feed/Reader/Extension/',\n ]);\n }\n return self::$_pluginLoader;\n }",
"public static function CreateLoader($fileName, $laodType = 'array' )\n\t\t{\n\t\t\tswitch (strtolower($laodType)) {\n\t\t\t\tcase 'array':\n\t\t\t\t\treturn new EabArrayFileSettingsLoader($fileName);\n\t\t\t\t\t\n\t\t\t\tcase 'xml': \n\t\t\t\t\treturn new EabXmlFileSettingsLoader($fileName);\n\t\t\t\t\n\t\t\t\tcase 'json': \n\t\t\t\t\treturn new EabJsonFileSettingsLoader($fileName);\n\t\t\t\t\n\t\t\t\tdefault :\n\t\t\t\t\tthrow new EabException(\"Incorrect load type!\", EabExceptionCodes::INCORECT_TYPE_EXC);\n\t\t\t}\n\t\t}",
"protected function getRouting_DelegatedLoaderService()\n {\n return $this->services['routing.delegated_loader'] = new \\Symfony\\Component\\Config\\Loader\\DelegatingLoader(${($_ = isset($this->services['routing.resolver']) ? $this->services['routing.resolver'] : $this->getRouting_ResolverService()) && false ?: '_'});\n }",
"protected function getTemplate_Twig_LoaderService()\n {\n return $this->services['template.twig.loader'] = new \\phpbb\\template\\twig\\loader(${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'});\n }",
"protected function getClassLoader_ExtService()\n {\n $this->services['class_loader.ext'] = $instance = new \\phpbb\\class_loader('\\\\', './../ext/', 'php');\n\n $instance->register();\n $instance->set_cache(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n\n return $instance;\n }",
"protected function createLoader() {\n //normally you'd create a specific loader, which would get the data\n //from a backend somewhere.\n \n // 6 transitions, 5 states\n $transitions = array();\n $new = new State('new', \\izzum\\statemachine\\State::TYPE_INITIAL);\n $a = new State('a');\n $b = new State('b');\n $c = new State('c');\n $done = new State('done', \\izzum\\statemachine\\State::TYPE_FINAL);\n $transitions[] = new Transition($new, $a, null,'izzum\\rules\\TrueRule', 'izzum\\command\\NullCommand');\n //can never go, a false rule\n $transitions[] = new Transition($a, $done, null, 'izzum\\rules\\FalseRule', 'izzum\\command\\NullCommand');\n $transitions[] = new Transition($a, $b, null, 'izzum\\rules\\TrueRule', 'izzum\\command\\NullCommand');\n //can never go, a false rule\n $transitions[] = new Transition($b, $c, null, 'izzum\\rules\\FalseRule', 'izzum\\command\\NullCommand');\n $transitions[] = new Transition($c, $done, null, 'izzum\\rules\\TrueRule', 'izzum\\command\\NullCommand');\n $transitions[] = new Transition($b, $done, null, 'izzum\\rules\\TrueRule', 'izzum\\command\\NullCommand');\n return new loader\\LoaderArray($transitions);\n \n \n }",
"public static function load() {\n if (self::$_instance == null) {\n self::$_instance = new \\Maleeby\\Core();\n }\n return self::$_instance;\n }",
"private function createUserLoader(): UserLoader\n {\n if (isset($this->config['useDb'])) {\n return new UserMysqliLoader($this->createDatabase());\n }\n\n return new UserArrayLoader();\n\n }",
"public function loadTheInstance();",
"protected function initFileLoader() \n\t{\n\t\t$this->fileLoader = new FileLoader();\n\t}",
"public function overLoad()\n {\n $loader = new Loader($this->filePath, false);\n return $loader->load();\n }",
"public function _loadRealInstance() {}",
"public function getTwigLoader(): FilesystemLoader\n {\n return $this->twigLoader;\n }",
"function AviaWidgetLoader()\n\t{\n\t\treturn avia_widget_loader::instance();\n\t}",
"protected function loadAutoloader()\n {\n new Autoloader();\n }",
"protected function getRouting_Loader_YamlService()\n {\n return $this->services['routing.loader.yaml'] = new \\Symfony\\Component\\Routing\\Loader\\YamlFileLoader(${($_ = isset($this->services['file_locator']) ? $this->services['file_locator'] : $this->getFileLocatorService()) && false ?: '_'});\n }",
"static public function instance()\n\t\t{\n\t\t\tif( is_null( avia_widget_loader::$_instance ) )\n\t\t\t{\n\t\t\t\tavia_widget_loader::$_instance = new avia_widget_loader();\n\t\t\t}\n\n\t\t\treturn avia_widget_loader::$_instance;\n\t\t}",
"public function with__class_loader($vParam = null) {\n $pReturn = clone $this;\n\n if(!isset($vParam)) {\n $pReturn['class_loader'] = function($vClassName) {\n return new $vClassName;\n };\n } elseif(is_callable($vParam)) {\n $pReturn['class_loader'] = $vParam;\n } elseif(is_array($vParam)) {\n $returnFor__class_loader = $vParam;\n $pReturn['class_loader'] = $this->get__class_loader();\n }\n\n return $pReturn;\n }",
"public static function initLoader()\n\t{\n\t\t$views_paths = \\Config::get('parser.View_Twig.views_paths', array(APPPATH . 'views'));\n static::$_parser_loader = new Twig_Loader_Filesystem($views_paths);\n\t}",
"public function testStringLoader() {\n $this->factory->setLoader('string', 'Phloem\\\\Loader\\\\NullLoader');\n\n $loader = $this->factory->getLoader('filename.extra.string');\n $this->assertEquals(get_class($loader), 'Phloem\\\\Loader\\\\NullLoader');\n }",
"protected function _initAutoload() {\n $autoLoader = Zend_Loader_Autoloader::getInstance();\n\n $resourceLoader = new Zend_Loader_Autoloader_Resource(array(\n 'basePath' => APPLICATION_PATH,\n 'namespace' => '',\n 'resourceTypes' => array(\n 'model' => array(\n 'path' => 'models/',\n 'namespace' => 'Model_'\n ), \n ),\n ));\n \n \n $resourceLoader = new Zend_Loader_Autoloader_Resource(array(\n 'basePath' => APPLICATION_PATH,\n 'namespace' => '',\n 'resourceTypes' => array(\n 'model' => array(\n 'path' => 'models/Functions',\n 'namespace' => 'Model_'\n )\n ),\n ));\n \n // Return it so that it can be stored by the bootstrap\n return $autoLoader;\n }",
"public function __construct() {\n spl_autoload_register(array($this, 'loader'));\n }",
"protected function _initAutoload(){\n\t $autoLoader = Zend_Loader_Autoloader::getInstance();\n\t $autoLoader->registerNamespace('CMS_');\n\t $resourceLoader = new Zend_Loader_Autoloader_Resource(\n\t \tarray(\n\t\t\t 'basePath' => APPLICATION_PATH,\n\t\t\t 'namespace' => '',\n\t\t\t 'resourceTypes' => array(\n\t\t\t \t'form' => array(\n\t\t\t\t \t'path' => 'forms/',\n\t\t\t\t \t'namespace' => 'Form_',\n\t\t\t\t ),\n\t \t\t\t\n\t \t\t),\n\t \t)\n\t );\n\t // Return it so that it can be stored b the bootstrap\n\t return $autoLoader;\n\t }",
"public function __construct() {\n $this->loader();\n }",
"protected function _initAutoload() {\r\n $autoLoader = Zend_Loader_Autoloader::getInstance();\r\n $autoLoader->registerNamespace('CMS_');\r\n $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => '', 'resourceTypes' => array('form' => array('path' => 'forms/', 'namespace' => 'Form_',), 'model' => array('path' => 'models/', 'namespace' => 'Model_'),),));\r\n // Return it so that it can be stored by the bootstrap\r\n return $autoLoader;\r\n }",
"public function getLoad();"
] | [
"0.77556056",
"0.77556056",
"0.77556056",
"0.77556056",
"0.77556056",
"0.77556056",
"0.77556056",
"0.77556056",
"0.77556056",
"0.7751041",
"0.7749072",
"0.7717993",
"0.7593732",
"0.75734484",
"0.7508862",
"0.7413813",
"0.7358335",
"0.7299955",
"0.72876936",
"0.7237762",
"0.7174472",
"0.71685636",
"0.7158174",
"0.7118531",
"0.70917606",
"0.70820665",
"0.6971724",
"0.69485223",
"0.69328713",
"0.68471247",
"0.6819014",
"0.6809985",
"0.6784017",
"0.6744899",
"0.67341346",
"0.6726432",
"0.6726432",
"0.6678279",
"0.66589934",
"0.6579225",
"0.65130603",
"0.6493101",
"0.64542127",
"0.6420188",
"0.6417169",
"0.6403685",
"0.63665724",
"0.63549984",
"0.6328384",
"0.63276076",
"0.63048106",
"0.62961566",
"0.6250898",
"0.6221353",
"0.62006587",
"0.61523986",
"0.6143042",
"0.6120562",
"0.6085329",
"0.60793424",
"0.60793424",
"0.60793424",
"0.60793424",
"0.60793424",
"0.60793424",
"0.60793424",
"0.6068954",
"0.6053837",
"0.6047745",
"0.6047155",
"0.6031222",
"0.6002562",
"0.60024625",
"0.6002351",
"0.59943706",
"0.5962809",
"0.5962629",
"0.59533614",
"0.5942487",
"0.5934876",
"0.5908212",
"0.5900381",
"0.589359",
"0.58910066",
"0.5882671",
"0.58806944",
"0.5768192",
"0.57633126",
"0.57584774",
"0.57470876",
"0.5719758",
"0.5708",
"0.5684794",
"0.5681833",
"0.56619066",
"0.565282",
"0.56440675",
"0.5640367",
"0.563733",
"0.56059974",
"0.558933"
] | 0.0 | -1 |
updateFriendList.php Inserts or deletes a user from the user's friend list. Then redirects user to either search page or profile page. Date: 11/30/14 Created by Nishi | function connectSQL(){
//MySQL default credentials
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
return $conn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateFriends($user) {\n if ($user==null)\n return;\n $this->load->model('facebook_model');\n $facebook_friends = $this->facebook_model->getFriends();\n if (count($facebook_friends)==0)\n return;\n // filter users in DB\n $friends = $this->getUsersByFacebookIds($facebook_friends);\n if (count($friends)==0) {\n echo 'no friends left :(';\n return;\n }\n // prepare list\n $values = '';\n $userId = $user->id;\n foreach ($friends as $friend) {\n $friendId = $friend->id;\n $values .= '(\"' . $userId . '\", \"' . $friendId . '\"), ';\n $values .= '(\"' . $friendId . '\", \"' . $userId . '\"), ';\n }\n // delete current friendships and insert the updated ones\n $queryStr = 'DELETE FROM users_friends WHERE user_id='.$userId.' OR friend_id='.$userId.';';\n $this->runQuery($queryStr);\n $queryStr = 'INSERT INTO users_friends (user_id, friend_id) VALUES ' . substr($values, 0, -2) . ';';\n $this->runQuery($queryStr);\n }",
"function handle_memberlist_update() {\r\n\tglobal $wpdb;\r\n\t\r\n\t$table = $wpdb->prefix . 'memberlist';\r\n\t\r\n\tif (isset($_POST['memberid'])) {\r\n\t\t$id = $_POST['memberid'];\r\n\t}\r\n\tif (isset($_POST['name'])) {\r\n\t\t$name = $_POST['name'];\r\n\t}\r\n\tif (isset($_POST['phone'])) {\r\n\t\t$phone = $_POST['phone'];\r\n\t}\r\n\tif (isset($_POST['email'])) {\r\n\t\t$email = $_POST['email'];\r\n\t}\r\n\tif (isset($_POST['extra'])) {\r\n\t\t$extra = $_POST['extra'];\r\n\t}\r\n\t\r\n\t$wpdb->update(\r\n\t\t$table, //table\r\n\t\tarray('name' => $name, 'phone' => $phone, 'email' => $email, 'extra' => $extra ), //variables\r\n\t\tarray('ID'=>$id), // where\r\n\t\tarray('%s','%s','%s','%s'), //data format\r\n\t\tarray('%s') // where format\r\n\t);\r\n}",
"public function index() {\n $this->users = (new UsersModel())->getUsers($_SESSION['user_id']);\n\n if ($this->isPost) {\n $friendId = $_POST['user-id'];\n $_SESSION['friend_id'] = $friendId;\n $this->redirect('messages', 'chat');\n }\n }",
"public function loadFriendsList() {\n\t\t$this -> template = TemplateManager::load(\"StyledTable\");\n\t\t$this -> template -> insert(\"title\", \"Friends List\");\n\t\t$friends = $this -> user -> getContactManager() -> getFriends();\n\t\t$table = \"\";\n\t\t$online = array();\n\t\t$offline = array();\n\t\tforeach($friends as $friend) {\n\t\t\t$owner = User::getByName($friend);\n\t\t\tif (!$owner) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!$owner -> isOnline()) {\n\t\t\t\t$offline[$owner -> getUid()] = $owner;\n\t\t\t} else {\n\t\t\t\t$online[$owner -> getUid()] = $owner;\n\t\t\t}\n\t\t}\n\t\tforeach ($online as $owner) {\n\t\t\t$table .= \"<tr class=\\\"online\\\">\n\t\t\t<td class=\\\"name\\\"><span class='username' style=''>\" . $owner -> getModule(\"UserTools\") -> getFormatUsername(true) . \"</span></td>\n\t\t\t<td class=\\\"world\\\"> World \" . $owner -> getLastWorld() . \"</td></tr>\";\n\t\t}\n\t\tforeach ($offline as $owner) {\n\t\t\t$table .= \"<tr class=\\\"offline\\\">\n\t\t\t<td class=\\\"name\\\"><span class='username' style='color: #9fabbf; '>\" . $owner -> getModule(\"UserTools\") -> getFormatUsername(true) . \"</span></td>\n\t\t\t<td class=\\\"world\\\">Offline</td></tr>\";\n\t\t}\n\t\tif ($table == \"\") {\n\t\t$table = \"You don't have any friends in your contact list. Add friends in-game for them to appear here.\";\n\t\t}\n\t\t$this -> template ->insert(\"icon\", \"user\");\n\t\t$this -> template -> insert(\"table\", $table);\n\t\t$this -> display();\n\t}",
"function update_friend($friendid, $email, $name, $include)\r\n\t{\r\n\t\tglobal $db_link;\r\n\t\tif ($friendid == \"0\") {\r\n\t\t\t$this->add_friend($email, $name, $include);\r\n\t\t} else {\r\n\t\t\treset($this->friend_list);\r\n\t\t\twhile(list($friend_id, $friend) = each($this->friend_list)) {\r\n\t\t\t\tif ($friend->friend_id == $friendid) {\r\n\t\t\t\t\t$friend->email\t= $email;\r\n\t\t\t\t\t$friend->name\t= $name;\r\n\t\t\t\t\t$friend->include= $include;\r\n\t\t\t\t\t$this->friend_list[] = $friend;\r\n\t\t\t\t\tif ($this->save_friends()) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"function updateUser(){\n\t$conn = db_connect();\n\n\tif(isset($_GET['id']) && (int)$_GET['id'] > 0){#proper data must be on querystring\n\t\t$myID = (int)$_GET['id']; #Convert to integer, will equate to zero if fails\n\t}\n\n\tif(isset($_POST['firstname'])){$firstName=$_POST['firstname'];}else{$firstName = '';}\n if(isset($_POST['lastname'])){$lastName=$_POST['lastname'];}else{$lastName = '';}\n if(isset($_POST['userPhone'])){$userPhone=$_POST['userPhone'];}else{$firstName = '';}\n if(isset($_POST['userEmail'])){$userEmail=$_POST['userEmail'];}else{$lastName = '';}\n if(isset($_POST['type'])){$type=$_POST['type'];}else{$type = '';}\n\n\t$sql = \"UPDATE users set firstName='%s',lastName='%s',PhoneNumber='%s',EmailAddress='%s',TypeId=%d WHERE UserId = \" . $myID;\n\n\t$sql = sprintf($sql,$firstName,$lastName, $userPhone,$userEmail, $type);\n\t$result = mysqli_query($conn,$sql); \n \n\tif ($result)\n\t{#successful update!\n\t\t$newURL = 'detail.php?id=' . $myID;\n\t}else{\n\t\t$newURL = 'edit.php?id=' . $myID;\n\t}\n\theader('Location: '.$newURL);\n die();\n}",
"function manageFriends()\n\t{\n\t\t//init variable\n\t\t$app = JFactory::getApplication();\n\t\t$log_user = JFactory::getUser($this->plugin->get('user')->id);\n\t\t$db = JFactory::getDbo();\n\t\t$frnd_id = $app->input->get('target_userid',0,'INT');\n\t\t$userid = $log_user->id;\n\t\t$res = new stdClass();\n\t\t\n\t\tif(!$frnd_id)\n\t\t{\n\t\t\treturn 'Friend id not found';\n\t\t}\n\n\t\t$frnds_obj = new EasySocialModelFriends();\n\t\t$result = $frnds_obj->request($userid,$frnd_id);\n\t\t\n\t\tif($result->id)\n\t\t{\n\t\t\t$res->status = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res->status = 0;\n\t\t}\n\t\treturn $res;\n\t}",
"public function updateEntryDetails() {\n\t\t\n\t\t//NOTE: Replace sample data with get/post/session/db\n\t\t$user_entry_id=1;\n\t\t$friend_ids='12,9,16';\t\t\n\t\t\n\t\tif($user_entry_id != ''\n\t\t\t&& $friend_ids != '')\n\t\t{\n\t\t\t//first delete old friend reference from user_entry_details table\n\t\t\t$this->deleteEntryDetails($user_entry_id=1,$friend_ids='12,9,16');\t\n\n\t\t\t//now replace new friends lists\n\t\t\t$this->replaceEntryDetails();\t\t\t\n\t\t}\n\t\treturn false;\n\t}",
"public function update(){\n $facebook = $_POST['facebook'];\n $linkedin = $_POST['linkedin'];\n $twitter = $_POST['twitter'];\n $youtube = $_POST['youtube'];\n $id = $_POST['hiddenid'];\n\t\t $sql= $this->link->query(\"UPDATE category SET facebook='$facebook',linkedin='$linkedin',twitter='$twitter ',youtube='$youtube' WHERE id=$id\");\n if($sql){\n\t\t echo \"<script>alert('Link Update')</script>\";\n\t\t echo \"<script>window.location.href = './social.php'</script>\";\n exit;\n\t }\n\t}",
"function updateUser (){\n\t\t$params = array(\n\t\t\t':idusuarios' => $_SESSION['idusuarios'],\n\t\t\t':nombres' => $_POST['nombres'],\n\t\t\t':apellidos' => $_POST['apellidos'],\n\t\t\t':direccion' => $_POST['direccion'],\n\t\t\t':foto' => $_POST['foto'],\n\t\t\t':email' => $_POST['email'],\n\t\t\t':usuario' => $_POST['usuario'],\n\t\t\t':contrasena' => $_POST['contrasena'],\n\t\t);\n\n\t\t/* Preparamos el query apartir del array $params*/\n\t\t$query ='UPDATE usuarios SET\n\t\t\t\t\tnombres = :nombres,\n\t\t\t\t\tapellidos = :apellidos,\n\t\t\t\t\tdireccion = :direccion,\n\t\t\t\t\tfoto = :foto,\n\t\t\t\t\temail = :email,\n\t\t\t\t\tusuario = :usuario,\n\t\t\t\t\tcontrasena = :contrasena \n\t\t\t\t WHERE idusuarios = :idusuarios;\n\t\t\t\t';\n\n\t\t$result = excuteQuery(\"blogs\", \"\", $query, $params);\n\t\tif ($result > 0){\n\t\t\tunset($_SESSION['idusuarios']);\n\t\t\t$_SESSION['idusuarios'] = NULL;\n\t\t\theader('Location: viewUsers.php?result=true');\n\t\t}else{\n\t\t\theader('Location: editUser.php?result=false');\n\t\t}\n\t}",
"function addUser(){\n\t$conn = db_connect();\n\n\tif(isset($_GET['id']) && (int)$_GET['id'] > 0){#proper data must be on querystring\n\t\t$myID = (int)$_GET['id']; #Convert to integer, will equate to zero if fails\n\t}\n \n\tif(isset($_POST['firstname'])){$firstName=$_POST['firstname'];}else{$firstName = '';}\n if(isset($_POST['lastName'])){$lastName=$_POST['lastName'];}else{$lastName = '';}\n if(isset($_POST['userPhone'])){$userPhone=$_POST['userPhone'];}else{$firstName = '';}\n if(isset($_POST['userEmail'])){$userEmail=$_POST['userEmail'];}else{$lastName = '';}\n if(isset($_POST['type'])){$type=$_POST['type'];}else{$type = '';}\n \n if(strlen($firstName) >=3)#check if users last name is smaller than 3 characters\n { \n $userName = substr($firstName,0,3) . substr($lastName,0,2);\n }else{#if first name is shorter use as is for username\n $userName = $firstName . substr($lastName,0,2);\n }\n $userName = strtolower($userName); #format users name to site standards\n $userPW = $userName; #default pw is userName\n \n\t$sql = \"INSERT INTO users(FirstName,LastName,PhoneNumber,EmailAddress,TypeId,UserName,UserPassword) VALUES('%s','%s','%s','%s',%d,'%s','%s')\";\n\t$sql = sprintf($sql,$firstName,$lastName,$userPhone,$userEmail,$type,$userName,$userPW);\n\t$result = mysqli_query($conn,$sql); \n\n\tif ($result)\n\t{#successful update!\n\t\t$newURL = 'list.php';\n\t}else{\n\t\t$newURL = 'add.php';\n\t}\n\theader('Location: '.$newURL);\n\tdie();\n}",
"public function actionGetUserListXML()\n\t{\n\t\tif (Yii::app()->user->isGuest) {\n\t\t\treturn;\n\t\t}\n\t\t$pageNo = 1;\n\t\tif (isset($_REQUEST['pageNo']) && $_REQUEST['pageNo'] > 0) {\n\t\t\t$pageNo = (int) $_REQUEST['pageNo'];\n\t\t}\n\t\t$offset = ($pageNo - 1) * Yii::app()->params->itemCountInDataListPage;\n\t\t$out = '';\n\t\t$dataFetchedTimeKey = \"UsersController.dataFetchedTime\";\n\t\tif (isset($_REQUEST['list'])) {\n\t\t\tif ($_REQUEST['list'] == \"onlyUpdated\")\n\t\t\t{\n\t\t\t\t$time = Yii::app()->session[$dataFetchedTimeKey];\n\t\t\t\tif ($time !== null && $time !== false)\n\t\t\t\t{\n\t\t\t\t\t$sqlCount = 'SELECT ceil(count(*)/'. Yii::app()->params->itemCountInDataListPage .')\n\t\t\t\t\t \t\tFROM ' . Friends::model()->tableName() . ' f\n\t\t\t\t\t \t\tLEFT JOIN '. Users::model()->tableName() . ' u \n\t\t\t\t\t \t\t\tON u.Id = IF(f.friend1 != '.Yii::app()->user->id.', f.friend1, f.friend2)\n\t\t\t\t\t \t\t\t\tOR\n\t\t\t\t\t \t\t\t\tu.Id = '.Yii::app()->user->id.'\n\t\t\t\t\t\t\tWHERE unix_timestamp(u.dataArrivedTime) >= '. $time . '\n\t\t\t\t\t\t\t\t AND\n\t\t\t\t\t\t\t\t ((((f.friend1 = '. Yii::app()->user->id .') \n\t\t\t\t\t\t\t\t\t\tOR (f.friend2 ='. Yii::app()->user->id .')\n\t\t\t\t\t\t\t\t ) \n\t\t\t\t\t\t\t\t \tAND f.status= 1\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t OR \n\t\t\t\t\t\t\t\t u.Id = '.Yii::app()->user->id.')';\n\n\t\t\t\t\t$pageCount = Yii::app()->db->createCommand($sqlCount)->queryScalar();\n\n\t\t\t\t\t$sql = 'SELECT u.Id as id, u.realname,u.latitude, u.longitude, u.altitude, f.Id as friendShipId, \n\t\t\t\t\t\t\t\tdate_format(u.dataArrivedTime, \"%H:%i %d/%m/%Y\") as dataArrivedTime, \n\t\t\t\t\t\t\t\tdate_format(u.dataCalculatedTime, \"%H:%i %d/%m/%Y\") as dataCalculatedTime,\n\t\t\t\t\t\t\t\t1 isFriend\n\t\t\t\t\t\t\tFROM '. Users::model()->tableName() . ' u \n\t\t\t\t\t\t\tLEFT JOIN ' . Friends::model()->tableName() . ' f\n\t\t\t\t\t\t\t\tON u.Id = IF(f.friend1 != '.Yii::app()->user->id.', f.friend1, f.friend2)\n\t\t\t\t\t\t\t\t\tOR\n\t\t\t\t\t\t\t\t\tu.Id = '.Yii::app()->user->id.'\n\t\t\t\t\t\t\tWHERE ((((f.friend1 = '. Yii::app()->user->id .' ) \n\t\t\t\t\t\t\t\t\t\tOR (f.friend2 ='. Yii::app()->user->id .')) AND f.status= 1)\n\t\t\t\t\t\t\t\t\tOR \n\t\t\t\t\t\t\t\t \t\tu.Id = '.Yii::app()->user->id.'\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\tAND unix_timestamp(u.dataArrivedTime) >= '. $time . '\n\t\t\t\t\t\t\tLIMIT ' . $offset . ' , ' . Yii::app()->params->itemCountInDataListPage;\n\t\t\t\t\t\n\t\t\t\t\t$out = $this->prepareXML($sql, $pageNo, $pageCount, \"userList\");\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\telse {\n\n\t\t\t// +1 is for user himself\n\t\t\t$sqlCount = 'SELECT ceil((count(*)+1)/'. Yii::app()->params->itemCountInDataListPage .')\n\t\t\t\t\t FROM '. Friends::model()->tableName() . ' f \n\t\t\t\t\t WHERE ((f.friend1 = '. Yii::app()->user->id .' AND f.friend2Visibility = 1) \n\t\t\t\t\t\t\t\t\t\tOR (f.friend2 ='. Yii::app()->user->id .' AND f.friend1Visibility = 1)) AND status= 1';\n\n\t\t\t$pageCount = Yii::app()->db->createCommand($sqlCount)->queryScalar();\n\n\t\t\t$sql = 'SELECT u.Id as id, u.realname,u.latitude, u.longitude, u.altitude, f.Id as friendShipId, \n\t\t\t\t\t\tdate_format(u.dataArrivedTime, \"%H:%i %d/%m/%Y\") as dataArrivedTime, \n\t\t\t\t\t\tdate_format(u.dataCalculatedTime, \"%H:%i %d/%m/%Y\") as dataCalculatedTime,\n\t\t\t\t\t\t1 isFriend\n\t\t\t\tFROM '. Friends::model()->tableName() . ' f \n\t\t\t\tLEFT JOIN ' . Users::model()->tableName() . ' u\n\t\t\t\t\tON u.Id = IF(f.friend1 != '.Yii::app()->user->id.', f.friend1, f.friend2)\n\t\t\t\t\t\tOR\n\t\t\t\t\t\tu.Id = '.Yii::app()->user->id.'\n\t\t\t\tWHERE (((friend1 = '.Yii::app()->user->id.') \n\t\t\t\t\t\tOR (friend2 ='.Yii::app()->user->id.')) AND status= 1)\n\t\t\t\t\t OR\n\t\t\t\t\t\tu.Id = '.Yii::app()->user->id.'\n\t\t\t\tLIMIT ' . $offset . ' , ' . Yii::app()->params->itemCountInDataListPage;\n\n\t\t$out = $this-> prepareXML($sql, $pageNo, $pageCount, \"userList\");\n\t\t}\n\t\techo $out;\n\t\tYii::app()->session[$dataFetchedTimeKey] = time();\n\t\tYii::app()->end();\n\t}",
"public function removeFromFriendsAction()\n {\n $model = $this->getCurrentUser();\n $friendId = $this->getRequest()->getBodyParams('id');\n\n try\n {\n $friend = $this->getUserService()->removeFromFriends($model->getId(), $friendId);\n } catch (\\InvalidArgumentException $e)\n {\n return $this->sendErrorResponse([$e->getMessage()]);\n } catch (NotFoundException $e)\n {\n return $this->sendErrorResponse([$e->getMessage()]);\n }\n\n $map = $this->getMapService()->renderMapWithMarker($friend->getLatlng(), $friend->getLocationName());\n\n $this->sendResponse(\n [\n 'id' => $friend->getId(),\n 'type' => User::class,\n 'properties' => [\n 'user' => $friend,\n 'isFriend' => false,\n 'location' => [\n 'html' => htmlentities($map['html']),\n 'js' => htmlentities(trim($map['js'])),\n ],\n ],\n ]\n );\n }",
"public function edit(UserList $list)\n {\n \n }",
"function agreeFriendHandler() {\n global $inputs;\n\n $res = getOne('SELECT * FROM member_friend_apply WHERE id = ?',[$inputs['id']]);\n\n insert('member_friend',[\n 'member_id' => getLogin()['mid'],\n 'friend_id' => $res['member_id']\n ]);\n\n insert('member_friend',[\n 'member_id' => $res['member_id'],\n 'friend_id' =>getLogin()['mid']\n ]);\n\n $sql = \"DELETE FROM `member_friend_apply` WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'option success');\n}",
"public function updateUserLinked\t(){\n\t\t\n\t\t}",
"function becomeFriendsWith($person) {\n $query = \"INSERT INTO friends (friend_id, user_id) VALUES ('{$person}','\".$this->data['id'].\"')\";\n $query2 = \"INSERT INTO friends (friend_id, user_id) VALUES ('\".$this->data['id'].\"','{$person}')\";\n mysql_query($query);\n mysql_query($query2);\n\n header('location: home.php');\n }",
"public function update(UserList $userlist)\n {\n $this->authorize('modify', $userlist);\n if (request()->has('public')) {\n $userlist->update(['public' => request('public')]);\n }\n else {\n if (request()->has('userlist_picture')) {\n $this->uploadListImage($userlist);\n }\n $userlist->update($this->validateRequest());\n }\n return back();\n }",
"public function update()\r\n {\r\n if (isset($_POST[\"update\"])) {\r\n // Instance new Model (Song)\r\n $profile = new Profile();\r\n // do updateSong() from model/model.php\r\n $profile->breyta($_POST[\"nafn\"], $_POST[\"pass\"], $_POST[\"user\"]);\r\n }\r\n // where to go after song has been added\r\n header('location: ' . URL . 'profile/index');\r\n }",
"function updateUsers($newUser,$action){\n if($action == \"add\"){\n array_push($this->names,$newUser);\n }\n elseif($action == \"remove\"){\n $index = array_search($newUser,$this->names);\n array_splice($this->names,$index,1);\n }\n }",
"public function addToFriendsAction()\n {\n $model = $this->getCurrentUser();\n $friendId = $this->getRequest()->getBodyParams('id');\n\n try\n {\n $friend = $this->getUserService()->addToFriends($model->getId(), $friendId);\n } catch (\\InvalidArgumentException $e)\n {\n return $this->sendErrorResponse([$e->getMessage()]);\n } catch (NotFoundException $e)\n {\n return $this->sendErrorResponse([$e->getMessage()]);\n }\n\n $map = $this->getMapService()->renderMapWithMarker($friend->getLatlng(), $friend->getLocationName());\n\n $this->sendResponse(\n [\n 'id' => $friend->getId(),\n 'type' => User::class,\n 'properties' => [\n 'user' => $friend,\n 'isFriend' => true,\n 'location' => [\n 'html' => htmlentities($map['html']),\n 'js' => htmlentities(trim($map['js'])),\n ],\n ],\n ]\n );\n }",
"function updateUserSocialController(){\n\t\t\t$this->load->model('User_model');\n\t\t\t$id = $_POST[\"id\"];\n\t\t\t$facebook = $_POST[\"facebook\"]; \n\t\t\t$googleplus = $_POST[\"googleplus\"]; \n\t\t\t$linkedIn = $_POST[\"linkedIn\"];\n\t\t\t$twitter = $_POST[\"twitter\"];\n\t\t\t$website = $_POST[\"website\"];\n\t\t\tif($this->User_model->updateUserSocialModel($id,$facebook,$googleplus,$linkedIn,$twitter,$website)){\n\t\t\t \techo 'added';\n\t\t\t}else{\n\t\t\t\techo 'Failed';\n\t\t\t}\n\t\t\t \n\t\t}",
"protected function lstUsersAsCharity_Update() {\n\t\t\tif ($this->lstUsersAsCharity) {\n\t\t\t\t$this->objCharityPartner->UnassociateAllUsersAsCharity();\n\t\t\t\t$objSelectedListItems = $this->lstUsersAsCharity->SelectedItems;\n\t\t\t\tif ($objSelectedListItems) foreach ($objSelectedListItems as $objListItem) {\n\t\t\t\t\t$this->objCharityPartner->AssociateUserAsCharity(User::Load($objListItem->Value));\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function FriendList(){\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n $discussion_id = $_POST['discussion_id'];\n $user_id = $_POST['user_id'];\n $authkey = $_POST['authkey'];\n $status = $_POST['status'];// 0 for declined, 1 for accept, 9 for pending\n $format = $_POST['format'];\n $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($user_id) && !empty($authkey)){\n $result = $res->CheckAuthentication($user_id, $authkey, $conn);\n if($result!=false){\n $result=$res->get_friend_list($discussion_id, $user_id, $status, $conn);\n }\n else{\n $error = array('status' => \"0\",\"msg\" => \"Not authorised to do this\");\n ($_REQUEST['format'] == 'xml') ? $this->response($this->xml($error), 200) : $this->response($this->json($error), 200);\n }\n }\n else{\n $error = array('status' => \"0\", \"msg\" => \"Fill All Fields\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($this->json($error), 200);\n }\n }",
"function memberlist_post_action() {\r\n\tglobal $wpdb;\r\n\tglobal $id;\r\n\tif (!empty($_POST)) {\r\n\t\t$listaction = $_POST['listaction'];\r\n\t\tif (isset($_POST['memberid'])) {\r\n\t\t\t$id = $_POST['memberid'];\r\n\t\t}\r\n\t\tswitch ($listaction) {\r\n\t\t\tcase 'insert':\r\n\t\t\t\tinclude MEMBERLIST_PLUGIN_DIR . '/pages/memberlist-insert.php';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'edit':\r\n\t\t\t\tinclude MEMBERLIST_PLUGIN_DIR . '/pages/memberlist-edit.php';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'list':\r\n\t\t\t\tinclude MEMBERLIST_PLUGIN_DIR . '/pages/memberlist-list.php';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'handleupdate':\r\n\t\t\t\thandle_memberlist_update();\r\n\t\t\t\tinclude MEMBERLIST_PLUGIN_DIR . '/pages/memberlist-list.php';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'handledelete':\r\n\t\t\t\thandle_memberlist_delete();\r\n\t\t\t\tinclude MEMBERLIST_PLUGIN_DIR . '/pages/memberlist-list.php';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'handleinsert':\r\n\t\t\t\thandle_memberlist_insert();\r\n\t\t\t\tinclude MEMBERLIST_PLUGIN_DIR . '/pages/memberlist-list.php';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault: \r\n\t\t\t\techo \"<h2>Nothing found!</h2>\";\r\n\t\t}\r\n\t} else {\r\n\t\tinclude MEMBERLIST_PLUGIN_DIR . '/pages/memberlist-list.php';\r\n\t}\r\n}",
"function editInfo(){\r\n\tif($_POST['url']=='editInfo'){\r\n\t$arrArgs=array('fav_book' =>@$_POST[\"fav_book\"] ,\r\n\t'fav_movies'=>@$_POST[\"fav_mv\"],\r\n\t'fav_food'=>@$_POST[\"fav_food\"] \r\n\t);\r\n\t\r\n\t$arrData=loadModel(\"personalprofile\",\"upInfo\",$arrArgs);\r\n\theader(\"location:\".ROOTPATH.\"/index.php?controller=profile\");\r\n\t\r\n\t\r\n\t} \r\n\t\r\n\t}",
"public function update_profile($username,$email,$surname,$finame,$status,$address,$state,$dob){\r\n $update_profile = \"UPDATE student_registration SET username='$username', email='$email', surname='$surname', firstname='$finame', status='$status', address='$address', state='$state', dob='$dob' WHERE email='$email'\";\r\n $update_query = $this->conn->query($update_profile);\r\n if($update_query){\r\n echo \"<script>\r\n alert('Your profile has been updated successfully');\r\n window.location = 'my_profile.php';\r\n </script>\";\r\n }\r\n \r\n }",
"public function UserListChangeStatus(): void{\n \n if(!ArtworkVerifier::setStatusList($_POST) || !Session::isLogin()){\n exit;\n }\n \n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id)){\n UserList::values([ 'user_list.status' => $_POST['status'] ])\n ->where('user_id' ,Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->update();\n exit;\n }\n }",
"public function actionIndex()\n {\n\n if ($already_exists = RecordHelpers::userHas('user_profile')) {\n\n return $this->render('update', [\n\n 'model' => $this->findModel($already_exists),\n ]);\n\n } else {\n\n return $this->redirect(['create']);\n\n }\n\n }",
"function updateUser()\r\n {\r\n return $this->UD->user_update($_GET['uid']);\r\n }",
"public function indexApUpdate(){\n //This will be used to display in the Wizard of available Realms in the Create screens of Vouchers; Permanent Users; and Devices\n $user = $this->Aa->user_for_token($this);\n if(!$user){ //If not a valid user\n return;\n }\n $this->_doApListFor($user,'update'); \n }",
"public function p_editProfile() {\n\t$_POST['modified'] = Time::now();\n \n $w = \"WHERE user_id = \".$this->user->user_id;\n\t\t\n\t# Insert\n\tDB::instance(DB_NAME)->update(\"users\", $_POST, $w);\n \n Router::redirect(\"/users/profile\");\n\n }",
"function friendList($settings, $user_id)\r\n{\r\n$url = \"https://api.twitter.com/1.1/friends/list.json\";\r\n$requestMethod = \"GET\";\r\n$getfield = \"?user_id=\".$user_id;\r\n$twitter = new TwitterAPIExchange($settings);\r\n$string = json_decode($twitter->setGetfield($getfield)\r\n->buildOauth($url, $requestMethod)\r\n->performRequest(),$assoc = TRUE);\t\r\necho \"<b><u>\" . \"Get Friend List of user ID \" . $user_id . \"</u></b>\";\r\necho \"<br>\";\r\n$i = 0;\r\nforeach($string[\"users\"] as $items)\r\n{\r\n$i++;\r\necho \"Friend: \" . $i . \"<br>\";\r\necho \"Profile Picture : \" . \"<img src=\" . $items['profile_image_url_https'] . \"/>\" . \"<br />\";\r\necho \"Name : \" . $items[\"name\"] . \"<br />\";\r\necho \"Screen name: \". $items[\"screen_name\"].\"<br />\";\r\necho \"<br><br>\";\r\n}\r\necho \"<hr>\";\r\n}",
"public function friendReqSeenUpdate()\n {\n\n $array = array(\n 'status' => 'seen'\n );\n $this->db->where(array(\n 'friend_id' => $this->session->Auth['id'],\n 'status' => 'pending',\n ));\n $this->db->update('relationship',$array);\n }",
"public function _friendadd() {\n\t\t$this->history = false;\n\n\t\t// for authenticated only\n\t\tif ($this->user && csrf::valid()) {\n\n\t\t\t// require valid user\n\t\t\t$this->member = new User_Model($username);\n\t\t\tif ($this->member->id) {\n\t\t\t\t$this->user->add_friend($this->member);\n\n\t\t\t\t// News feed event\n\t\t\t\tnewsfeeditem_user::friend($this->user, $this->member);\n\n\t\t\t}\n\t\t}\n\n\t\turl::back('members');\n\t}",
"function setMember(){\n\t\t//to do: do we need static method, use Convert::raw2sql\n\t\tPage::setFriend($_REQUEST['FriendName'], $_REQUEST['SocialID'], $_REQUEST['SocialNetwork']);\n\t\tDirector::redirectBack();\n\t}",
"function handle_memberlist_delete() {\r\n\tglobal $wpdb;\r\n\t\r\n\tif(isset($_POST['memberid'])) {\r\n\t\t$id = $_POST['memberid'];\r\n\t\t$sql = \"DELETE FROM \" . $wpdb->prefix . \"memberlist WHERE id=$id\";\r\n\t\t$wpdb->query($sql);\r\n\t}\r\n}",
"public function updateAction(){\n\n \n if ($this->user->updateProfile($_POST)) {\n\n $this->token = new Token($_POST['token']);\n \n if(isset($_POST['token']) && $_POST['token'] === $this->token->getValue()){\n\n \n Flash::addMessage('Profile was Update');\n $this->redirect('/profile/index');\n\n }else{\n\n\n Flash::addMessage('Profile was not Update', Flash::WARNING);\n\n View::renderTemplate('Profile/index.html', [\n 'user' => htmlspecialchars($this->user),\n 'token'=> $this->token->updateToken()\n ]);\n \n }\n\n\n } else {\n\n Flash::addMessage('Profile was not Update', Flash::INFO);\n\n View::renderTemplate('Profile/index.html', [\n 'user' => htmlspecialchars($this->user)\n ]);\n\n }\n }",
"function ShowOwnersUpdateForm($mysqli) {\n $index = $_SESSION['OwnerID']; // \"uid\" is id of db record to be updated \n global $usertable;\n if ($result = $mysqli->query(\"SELECT id, attempts_allowed, title, description FROM $usertable WHERE id = $index\")) {\n while ($row = $result->fetch_row()) {\n echo '<div class=\"col-md-4\">\n <form name=\"basic\" method=\"POST\" action=\"Owners.php\" \n onSubmit=\"return validate();\"> \n <table class=\"table table-condensed\" style=\"border: 1px solid #dddddd; \n border-radius: 5px; box-shadow: 2px 2px 10px;\">\n <tr><td colspan=\"2\" style=\"text-align: center; border-radius: 5px; \n color: white; background-color:#333333;\"> <h2>Update Owner</h2></td></tr>';\n\n\t\t\t//the entries for the user to change\n echo '<tr><td>Days Expected Gone: </td><td><input type=\"number\" name=\"max_attempts\" value= ' . $row[1] . ' min=\"1\" max=\"100000\"></td></tr>\n <tr><td>Owner Name: </td><td><input type=\"edit\" name=\"quiz_title\" value= \"' . $row[2] . ' \" size=\"49\"></td></tr>\n <tr><td>Contact Information: </td><td><textarea maxlength=\"200\" style=\"resize: none;\" name=\"quiz_des\" cols=\"51\" rows=\"3\">' . $row[3] . ' </textarea></td></tr>';\n\n\t\t//on submit call the ownerExecuteUpdateFunction to finish the update and then go back to owners.php to see the changes\n echo '\n </td></tr> \n <tr><td><input type=\"submit\" name=\"OwnerExecuteUpdate\" class=\"btn btn-primary\" value=\"Update Entry\"></td> \n\t</table> <input type=\"hidden\" name=\"uid\" value=\"' . $row[0] . '\"> </form> \n <form action=\"Owners.php\"> <input type=\"submit\" name=\"BackToOwners\" value=\"Back to Owners List\" class=\"btn btn-primary\"\"> </form> <br> </div>';\n } //close database connection\n $result->close();\n }\n}",
"public function testFriendsUpdateOut()\n {\n $result = $this->visit('account/friends/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }",
"function User_sp_update() {\n\tglobal $smarty, $dbconn, $config, $lang;\n\n\n\t$id_user=$_POST[\"id_user\"];\n\t$str_id = \" (\";\n\t$i = 0;\n\tforeach ($_POST[\"id_ad\"] as $ad_id){\n\t\t\n\t\t$i++;\n\t\tif ($i==sizeof($_POST[\"id_ad\"])){\n\t\t\t$str_id .= $ad_id.\" \";\n\t\t} else {\n\t\t\t$str_id .= $ad_id.\" , \";\n\t\t}\n\t}\n\t$str_id .= \" )\";\n\t\n\t\n\t$rs = $dbconn->Execute(\"SELECT id_ad FROM \".SPONSORS_ADS_TABLE.\" WHERE id_ad IN \".$str_id);\n\t$arr_id = array();\n\t$i = 0;\n\t\n\twhile(!$rs->EOF){\n\t\t$row = $rs->GetRowAssoc(false);\t\t\n\t\t$i++;\n\t\t$arr_id[$i] = $row[\"id_ad\"];\t\t\t\t\n\t\t$rs->MoveNext();\n\t}\t\n\t\n\t$rs = $dbconn->Execute(\"SELECT MAX(order_id) as max_order FROM \".SPONSORS_ADS_TABLE);\n\t$row = $rs->GetRowAssoc(false);\n\t$next_order=$row[\"max_order\"]+1;\t\t\n\t$i = 0;\n\tforeach ($_POST[\"id_ad\"] as $ad_id){\n\t\t\n\t\t$i++;\n\t\tif ($_POST[\"issponsor\"][$ad_id]) {\n\t\t\tif (!in_array($ad_id,$arr_id)) {\n\t\t\t\t$dbconn->Execute(\"INSERT INTO \".SPONSORS_ADS_TABLE.\" (id_ad, id_user, order_id, status) \n\t\tVALUES ('\".$ad_id.\"', '\".$id_user.\"', '\".$next_order.\"', '1')\");\t\t\t\t\n\t\t\t\t$next_order++;\n\t\t\t}\n\t\t\t\n\t\t } \n\t\telse {\n\t\t\tif (in_array($ad_id,$arr_id)) {\n\t\t\t\t$dbconn->Execute(\"DELETE FROM \".SPONSORS_ADS_TABLE.\" WHERE id_ad = \".$ad_id);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\t\n\techo \"<script>location.href='\".$config[\"site_root\"].\"/admin/admin_sponsors.php?sel=user_rent&type=add&id_user=\".$id_user.\"'</script>\";\n\t\n}",
"function rh_gmw_fl_delete_location() {\n global $wpdb, $bp;\n $usergetid = (!empty($_POST['usergetid'])) ? $_POST['usergetid'] : '';\n $userid = ($usergetid) ? $usergetid : get_current_user_id(); \n $wpdb->query($wpdb->prepare(\"DELETE FROM wppl_friends_locator WHERE member_id = %d\", $userid));\n do_action('gmw_fl_after_location_deleted', $userid);\n die( __( 'Location successfully deleted!', 'GMW' ) );\n}",
"public function actionUpdate() {\r\n\r\n //common view data\r\n $mainCategories = $this->mainCategories;\r\n $brands = $this->brands;\r\n \r\n $errors = [];\r\n $success = null;\r\n \r\n //check if the user is logged in and get User $user properties from the database\r\n $userID = $this->checkLogged();\r\n \r\n $user = new User;\r\n $user = $user->getUserById($userID);\r\n \r\n if(!$user) {\r\n $errors['firstname'][0] = 'Unable to find user. Please, try again later';\r\n } else {\r\n //user properties\r\n $firstname = $user->firstname;\r\n $lastname = $user->lastname;\r\n $email = $user->email;\r\n } \r\n \r\n //check if the form has been submitted\r\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n \r\n $firstname = $this->test_input($_POST['firstname']);\r\n $lastname = $this->test_input($_POST['lastname']);\r\n $email = $this->test_input($_POST['email']);\r\n \r\n //create form model, validate it and if success - update user profile\r\n $model = new EditProfileForm($userID, $firstname, $lastname, $email);\r\n \r\n if(!$model->validate()) {\r\n $errors = $model->errors;\r\n } else {\r\n #!!!!!!!!!!!!!\r\n $success = $model->updateProfile() ? 'USER DATA SUCCESFULLY UPDATED': 'UNABLE TO UPDATE USER PROFILE. TRY AGAIN LATER';\r\n }\r\n }\r\n \r\n include_once ROOT . '/views/profile/update.php';\r\n }",
"public function updateMember() {\n\n $memberModel = $GLOBALS[\"memberModel\"];\n \n $memb = $memberModel->getOneByMemberNumber($_SESSION[\"MembershipNumber\"]);\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 == $memb[\"Login_Password\"]) {\n $givenNewLogin_Password = sha1($givenNewLogin_Password);\n }\n } else {\n $givenNewLogin_Password = $memb[\"Login_Password\"];\n //kanskje en error beskjed ?\n }\n \n \n // set the values 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 $Membership_number = filter_input(INPUT_POST, 'Membership_number');\n\n $memberModel->updateMember($updateFirst_name, $updateLast_name, $updateBirth, $updatePhone_Number, $Membership_number,$givenNewLogin_Password);\n $GLOBALS[\"included_members\"] = $memberModel->getAll();\n\n return $this->render(\"listMembers\");\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 }",
"function privateGuestListSaveToDatabase() {\n //\n // http://dev4.krubner.com/private.php?page=private_guest_list\n\n global $controller; \n\n $g = $controller->getVar(\"guest\");\n $g[\"active\"] = \"not active\"; \n $loggedInId = $controller->command(\"getUserIdFromUserLoggedInTable\");\n $idOfNewUser = $controller->command(\"rowCreate\", \"users\", $g);\n if (!$idOfNewUser) {\n $controller->error(\"In privateReservationsGuestListSaveToDatabase() we tried, but failed, to create a new user record. This is the data we tried to save to the 'users' table: \" . print_r($g, true)); \n // this will usually be true reason\n $controller->addToResults(\"We already have a user in the database with the email address that you gave us.\"); \n } else {\n $controller->addToResults(\"We have added your friend to our database.\"); \n }\n $newRowForInvitedFriends['user_id_of_friend '] = $idOfNewUser;\n $newRowForInvitedFriends['user_id'] = $loggedInId;\n $controller->command(\"rowCreate\", \"lk_friends\", $newRowForInvitedFriends);\n\n}",
"public function update()\n {\n $userId = Helper::getIdFromUrl('user');\n\n // Save post data in $user\n $user = $_POST;\n \n // Save record to database\n UserModel::load()->update($user, $userId);\n\n View::redirect('user/' . $userId);\n }",
"public function actionUpdate()\n\t{\n\t if (!Yii::app()->user->checkAccess('admin')){\n\t\t\treturn $this->actionView();\n\t }\n\t\t$this->model = DrcUser::loadModel();\n\t\tif($this->model===null)\n\t\t\tthrow new CHttpException(404,'The requested user does not exist.');\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '../drcUser/_edit',\n\t\t\t'contentTitle' => 'Update User Data',\n\t\t\t'createNew'=>false,\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'action'=>Yii::app()->createUrl(\"user/save\", array('username'=>$this->model->username)),\n\t\t));\n\t}",
"public function p_edit() { if(!$this->user) {\n Router::redirect('/');\n }\n \n $this->user->user_id = DB::instance(DB_NAME)->sanitize($this->user->user_id);\n $q = 'SELECT first_name, last_name, email\n FROM users\n WHERE user_id = \"'.$this->user->user_id.'\"';\n $user = DB::instance(DB_NAME)->select_row($q);\n \n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n \n $_POST['first_name'] = htmlspecialchars($_POST['first_name'], ENT_QUOTES, 'UTF-8');\n $_POST['last_name'] = htmlspecialchars($_POST['last_name'], ENT_QUOTES, 'UTF-8');\n \n $q = 'SELECT count(*)\n FROM users\n WHERE email = \"'.$_POST['email'].'\"'; \n $count = DB::instance(DB_NAME)->select_rows($q); \n //if the user enters an email which already exists in the data base kick them back\n if(intval($count[0]['count(*)']) >= 1) {\n Router::redirect('/users/edit/error');\n } else {\n \n if($_POST['first_name'] != NULL)\n {\n $user['first_name'] = $_POST['first_name'];\n }\n if($_POST['last_name'] != NULL )\n {\n $user['last_name'] = $_POST['last_name'];\n }\n if($_POST['email'] != NULL )\n {\n $user['email'] = $_POST['email'];\n }\n \n \n \n DB::instance(DB_NAME)->update(\"users\", $user, \"WHERE user_id =\".$this->user->user_id);\n Router::redirect('/users/profile/'.$this->user->user_id);\n }\n \n \n }",
"public function invokeUsers()\r\n {\r\n if (!isset($_GET['users'])) {\r\n $users = $this->model->getUsers();\r\n include 'view/userslist.php';\r\n }\r\n }",
"public function updateUsers($id, $new_fullname, $new_username, $new_email, $new_password, $new_cpassword, $new_ugid, $postby_id, $verifiedby_id, $status){\n // \t\tdie();\n\t\t\t$query = \"SELECT * FROM `users` WHERE `id` <> '$id' \";\n\t\t\t// echo '<br><br>'.$query;\n\t\t\t// die();\n\t\t\t$result = $this->execute($query);\n\t\t\twhile($data = mysqli_fetch_assoc($result)){\n\t\t\t\t// if($new_id == $data['id']){\n\t\t\t\t// \treturn 2;\n\t\t\t\t// }\n\t\t\t\tif($new_username == $data['username']){\n\t\t\t\t\treturn 3;\n\t\t\t\t}\n\t\t\t\tif($new_email == $data['email']){\n\t\t\t\t\treturn 4;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$query1 = \"UPDATE `users` SET `fullname` = '$new_fullname', `username` = '$new_username', `email` = '$new_email', `password` = '$new_password', `usergroup_id` = '$new_ugid', `postby_id` = '$postby_id', `verifiedby_id` = '$verifiedby_id', `status` = '$status' WHERE `id` = '$id' \";\n\t\t\techo '<br><br><br>'.$query1;\n\t\t\t// die();\n\t\t\t$result = $this->execute($query1);\n\t\t\tif($query1){\n\t\t\t\theader('location: ../users.php');\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}",
"public function admin_user_edit($id) {\n if ($this->request->is('post')) {\n $this->loadModel('Manager');\n $data = $this->request->data;\n if(!isset($data['is_reporting_manager'])){\n $data['is_reporting_manager'] = 0;\n }\n $id = $data['id'];\n $repmanager = $data['reporting_manager'];\n $update = $this->User->updateUser($id, $data);\n if(!empty($repmanager)){\n $update = $this->Manager->updateManager($id, $repmanager);\n }\n $this->redirect(array(\n 'action' => 'user_list?msg=succesmsg',\n ));\n \n }\n\n $data = $this->User->findById($id);\n $this->set('user', $data);\n $friendList = $this->User->userList();\n $this->set('friendList', $friendList);\n $this->render('/Users/user_edit');\n }",
"function update()\n {\n global $db, $fullname, $email, $Dateofbirth, $Phonenumber, $Occupation, $Address, $gender, $path, $nationality, $user_type;\n\n $id = $_POST['id'];\n $fullname = $_POST['fullname'];\n $Dateofbirth = $_POST['dbirth'];\n $Phonenumber = $_POST['phonenumber'];\n $Occupation = $_POST['occupation'];\n $Address = $_POST['address'];\n $gender = $_POST['mradio'];\n $email = $_POST['email'];\n $$user_type = $_POST['user_type'];\n $path = $_FILES['image'];\n $nationality =$_POST['nationality'];\n $path = mysqli_real_escape_string($db, '../images/uploads/' . $_FILES['image']['name']);\n copy($_FILES['image']['tmp_name'], $path);\n\n mysqli_query($db, \"UPDATE users SET name='$fullname', 'admin','$Occupation','$Address','$Phonenumber', '$Dateofbirth','$gender','$email','$nationality','$path' WHERE id=$id\");\n $_SESSION['message'] = \"Address updated!\";\n header('location: ../members.php');\n \n }",
"function updateProfile($data) {\ntry {\n\n if (!$conn = connectDB()) {\n return false;\n }\n\n $userId = $_SESSION[\"userId\"];\n $args = array(\n $data[\"firstName\"], $data[\"lastName\"],\n $data[\"phone\"], $data[\"email\"], $data[\"location\"],\n $userId\n );\n\n $sql = <<<SQL\nUPDATE WebUser\nSET firstName=$1, lastName=$2,\n phonenumber=$3, emailaddress=$4, location=$5\nWHERE userId=$6\nSQL;\n\n $result = executeSQL($conn, $sql, $args);\n\n if (getUpdateCount($result) != 1) {\n /* Update was unsuccessful */\n closeDB($conn);\n return false;\n }\n\n /* Update succeeded */\n closeDB($conn);\n return true;\n\n} catch (Exception $e) {\n error(\"updateProfile\");\n closeDB($conn);\n return false;\n}\n}",
"public function index() {\r\n $_SESSION[\"sql_dump\"][]=\"___________________________________________________\";\r\n\r\n $friObj = spClass(\"lib_friend\");\r\n $moodObj = spClass(\"lib_mood\");\r\n \t$uid = $_SESSION[\"userinfo\"][\"uid\"];\r\n\r\n \t//Friends\r\n \t//Friend (uid,uname, email, lname, fname)\r\n \t$fris = $friObj->listing($uid);\r\n \t$_SESSION[\"sql_dump\"][]= $friObj->dumpSql();\r\n\r\n \t//Retrive moods for each friends\r\n\t\tforeach($fris as &$fri){\r\n\t\t //Moods\r\n\t\t //Mood (fid, time, fname)\r\n\t\t $fri[\"moods\"] = $moodObj->listing($fri[\"uid\"], 10);\r\n $_SESSION[\"sql_dump\"][]= $moodObj->dumpSql();\r\n\t\t}\r\n\t\t$this->friends = $fris;\r\n }",
"function friends($uid=''){\n\t\t$userInfo = array();\n if($uid==''){\n $uid = $this->session->userdata('user_id'); \n $layoutView = 'user/friends';\n } else {\n $layoutView = 'user/timelinefriends';\n // Login verification and user stats update\n\t\t\t$user = null;\n\t\t\t$sk = array();\n\t\t\t$config['site_url'] \t=base_url();\n\t\t\t$config['theme_url'] \t='';\n\t\t\t$config['script_path'] \t=str_replace('index.php', '', $_SERVER['PHP_SELF']);\n\t\t\t$config['ajax_path'] \t=base_url() . 'ajax/socialAjax';\n $userInfo['logged'] = false;\n $userInfo['config'] = $config;\n\t\t\t$user = $this->socialkit->SK_getUser($uid, true);\n\t\t\t$sk['logged'] = false;\n $sk['config'] = $config;\n if (!empty($user['id']) && $user['type'] == \"user\") {\n $sk['user'] = $userInfo['user'] = $user;\n $sk['timeline'] = $user;\n $sk['timeline']['wall_user_id'] = false;\n $sk['logged'] = $userInfo['logged'] = true;\n $userInfo['timeline']['wall_user_id'] = $uid;//TIMELINE ID IS USER_ID and is double md5 ed\n }\n $data['sk']=$sk;\n }\n if ($this->socialkit->SK_isLogged()) {\n $data['title'] ='Friends List';\n $data['userInfo'] =$userInfo;\n $this->load->view($layoutView, $data);\n } else {\n redirect(base_url('login').'?url='.base64_encode(uri_string()));\n }\n }",
"function getUserList() {\n $connection = openConnection(); // connect to database\n echo '<tr class=\"userEntry\">'; // create select tag with id of country so it can be selected in Register.js\n $query = mysqli_query($connection, 'SELECT `user_id`, `full_name`, `acc_active` FROM `tbl_members`'); // create query to select record from user_id and full_name columns\n if(mysqli_num_rows($query) > 0) { // if a record exists then...\n while($option_row = mysqli_fetch_array($query, MYSQLI_NUM)) { // fetch query result as a numbered array and assign as $option_row\n // Ref: $option_row[0] = 'user_id', $option_row[1] = 'full_name', $option_row[2] = 'acc_active'\n if($option_row[0] === $_SESSION['user_id'] || $option_row[2] != 1) { // if current row user_id matches logged in user or if user account is not active then...\n // do not display record\n } else { // otherwise display user record in table\n echo \"<td class='user_name'>\" . $option_row[1] . \"</td>\"; // create table cell with full_name displayed\n echo \"<td></td>\"; // create a cell which will say if a follower or not\n echo \"<td><a href='#' id='follow_\" . $option_row[0] . \"' class='actionFollowUser'>Follow</a></td>\"; // action to follow a user\n echo \"<td><a href='#' id='wall_\" . $option_row[0] . \"' class='actionViewUserWall'>View Wall</a></td>\"; // create table cell with user_id as tag id which is passed to indentify user wall\n echo \"<td><a href='#'id='chat_\" . $option_row[0] . \"' class='actionChatMessage'>Send Message</a></td>\"; // create table cell with chat-user_id as tag id which is passed to indentify chat group\n echo \"<td><a href='#' id='report_\" . $option_row[0] . \"' class='actionReportUser'>Report User</a></td>\"; // create table cell with report user action link\n echo '</tr>'; // close select tag\n }\n }\n } \n closeConnection($connection); // close database connection\n}",
"public function showUsers(){\n\n\t\ttry{\n\t\t\trequire CONTROLLER_DIR . '/dbConnecterController.php';\n\n\t\t\t$result = $db->query('SELECT id, username FROM users ORDER BY id');\n\n\n\t\t\techo \"<table border='1'>\n\t\t\t\t<tr>\n\t\t\t\t<th>ID</th>\n\t\t\t\t<th>Username</th>\n\t\t\t\t<th></th>\n\t\t\t\t<th></th>\n\t\t\t\t</tr>\";\n\t\t\t// This will make it so admin is not displayed on the table\n\t\t\t$row = $result->fetchColumn();\n\t\t\twhile($row = $result->fetch(PDO::FETCH_ASSOC)){\n\t \t\t\techo \"<tr>\";\n\t\t echo \"<td>\" . $row['id'] . \"</td>\";\n\t\t echo \"<td>\" . $row['username'] . \"</td>\";\n\t\t echo '<td> \n\t\t \t\t<form method=\"GET\" action=\"/showEditUserPage\"> \n\t\t \t\t\t<input type=\"hidden\" name=\"id\" value=\"' . $row['id'] . '\"/>\n\t\t\t \t\t<input type=\"hidden\" name=\"username\" value=\"' . $row['username'] . '\"/>\n\t\t \t\t\t<input type=\"submit\" value=\"EDIT\" name=\"showEditUserPage\"/> \n\t\t \t\t</form></td>';\n\t\t echo '<td> \n\t\t \t\t<form method=\"POST\" action=\"/deleteUser\"> \n\t\t\t \t\t<input type=\"hidden\" name=\"id\" value=\"' . $row['id'] . '\"/>\n\t\t \t\t\t<input type=\"submit\" value=\"DELETE\" name=\"deleteUser\"/> \n\t\t \t\t</form></td>';\n\t\t echo \"</tr>\";\n\t\t\t}\n\t\t\techo '</table>';\n\n\t\t} catch (PDOException $e) {\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t\tdie();\n\t\t}\n\t}",
"function friendApplyHandler() {\n global $inputs;\n\n insert('member_friend_apply',[\n 'member_id' => getLogin()['mid'],\n 'apply_member_id' => $inputs['id']\n ]);\n\n formatOutput(true, 'apply success');\n}",
"public function actionSeeUpdate(){\n\t\t$data = Put::get();\n\t\t$token = F3::get('GET.token');\n\n\t\t$getToken = $this->model_users->getToken($token);\n\n\t\tif (!empty($getToken)):\n\n\t\t\tif (!empty($data['user']) && !empty($data['movie'])):\n\t\t\t\t$this->model_likes->updateSee($data['user'], $data['movie'], $statut = 'delete');\n\t\t\t\tApi::response(200, 'Movie updated see to unsee this user');;\n\t\t\telse:\n\t\t\t\tApi::response(204, 'No movies');\n\t\t\tendif;\n\n\t\telseif (empty($token)):\n\t\t\tApi::response(401, 'Hum... you need a token');\n\t\telse:\n\t\t\tApi::response(403, 'Invalid token');\n\t\tendif;\n\t}",
"function displayListing($result){\n?>\n\t\t<table>\n\t\t\t<tr style=\"text-align:left;\"><th>Username</th> <th>Full Name</th><th>User Privileges</th><th>Actions</th></tr>\n<?php\n\t\twhile ($row = mysql_fetch_array($result))\n\t\t{\n\t\t?>\n\t\t\t<tr><td>\n\t\t\t\t<?php\t echo $row['user_name']; ?></td>\n\t\t\t\t<td><?php echo $row['user_first_name']; ?> \t <?php echo $row['user_last_name']; ?></td>\n\t\t\t\t<td><?php echo $row['name']; ?></td>\n\t\t\t\t<td><form name=\"edit_app\" method=\"post\" action=\"index.php?page=user&id=<?php echo $row['pkuser_id'];?>\"> \n\t\t\t\t\t<input class=\"btton\" type=\"submit\" value=\"Edit\" />\n\t\t\t\t</form></td>\n\t\t\t</tr>\n\t\t\n\t<?php\t\n\t\t}\n\t\t?>\n\t\t</table>\n<?php\n}",
"public function updateManagelistAction(){\n $ebookers_obj = new Ep_Ebookers_Managelist();\n //to call a functio to update themes//\n if($this->_request->getParam('submit') != ''){\n $ebookers_obj->updateManagelist($this->_request->getParams());\n exit;\n }\n }",
"function userConfirmation($data){\n\t\t$requiredData['action'] = $this->getPassword(@trim($data->action));\n\t\t$user_name_id = explode(\"#/#\",$requiredData['action']);\n\t\t$rec = $this->query(\"UPDATE `users` SET `status`=1 where `user_name` = '\".@$user_name_id[0].\"' AND `id`= \".@$user_name_id[1]);\n\t\tif($rec){\n\t\t\t$url = HTTP_HOST.\"confirm.php?action=1\";\n\t\t\techo \"<meta http-equiv=Refresh content=0;url=\".$url.\">\";\t\t\t\n\t\t\texit;\n\t\t}else{\n\t\t\t$url = HTTP_HOST.\"confirm.php?action=0\";\n\t\t\techo \"<meta http-equiv=Refresh content=0;url=\".$url.\">\";\t\t\t\n\t\t\texit;\t\t\n\t\t}\n\t}",
"function checkUser() {\n\tglobal $con;\n\t$userId = $_SESSION['user_id']; //$_SESSION['user_id'];\n $edit = $_GET['edit'];\n\t//If user type is a company.\n\tif ($_SESSION['user-type'] == 'company'){\n\t\t$result = mysqli_query($con, \"SELECT * FROM `company` WHERE `company_id` = $userId \");\n\n\t\twhile ($row = mysqli_fetch_array($result)) {\n\n \n // check if edit button is clicked\n if($edit == ''){\n \n echo '\n <div class=\"een\">\n <img src=\"../img/medtronic.jpeg\">\n <a href=\"admin.php?edit=true\" >Edit Profile</a>\n <ul class = \"profielList\">\n <li>' . $row['company_name'] .' </li>\n <li>' . $row['company_sector'] . '</li>\n <li>' . $row['company_location'] . '</li>\n </ul>\n </div>\n <div class=\"twee profielOmschrijving\">\n <p><span>' . $row['company_name'] . '</span> '. $row['company_info'] . '</p>\n </div>\n ';\n }\n else if($edit != ''){\n\n echo '\n <div class=\"een\">\n <img src=\"../img/medtronic.jpeg\">\n <a href=\"admin.php\" >Exit edit</a>\n <form action=\"profile_edit.php\" method=\"post\" name\"edit-form\"><br/>\n <input type=\"number\" name=\"user-id\" value=\"' . $userId . '\" hidden/><br/> \n <ul class = \"profielList\">\n <li><input type=\"text\" name=\"firstName\" value=\"' . $row['company_name'] .'\"/></li>\n <li><input type=\"text\" name=\"sector\" value=\"' . $row['company_sector'] . '\"/></li>\n <li><input type=\"text\" name=\"location\" value=\"' . $row['company_location'] . '\"/></li>\n </ul>\n </div>\n <div class=\"twee profielOmschrijving\">\n <p><span>' . $row['company_name'] . '</span><br/><textarea rows=\"10\" cols=\"30\" name=\"info\">'. $row['company_info'] . '</textarea></p>\n <input type=\"submit\" value=\"submit\"/>\n </form>\n </div>\n ';\n }\n\n\t\t\n\n\t\t} //If user type is a user.\n\t}\n else if ($_SESSION['user-type'] == 'user'){\n\t\t$result = mysqli_query($con, \"SELECT * FROM `users` WHERE `user_id` = $userId \");\n\n while ($row = mysqli_fetch_array($result)) {\n\n\n\n // check if edit button is clicked\n if($edit == ''){\n\n\n echo \"\n <div class='een'>\n <img src='../img/profiel2.jpg' width='100%''>\n <a href='admin.php?edit=true' >Edit Profile</a>\n <ul class = 'profielList'>\n <li>\" . $row['user_firstname'] . \" \" . $row['user_lastname'] . \"</li>\n <li>\" . $row['user_location'] . \"</li>\n <li><a href='http://\" . $row['user_cv'] . \"' target='_blank'>LinkedIn</a></li>\n </ul>\n </div>\n\n <div class='twee profielOmschrijving'>\n <p>\" . $row['user_contact_info'] . \"</p>\n </div>\n \";\n \n \n }\n else if($edit != ''){\n // Set values in edit form\n \n \n echo \"\n <div class='een'>\n <img src='../img/profiel2.jpg' width='100%''>\n <a href='admin.php' >Exit edit</a>\n <form action='profile_edit.php' method='post' name='edit-form'><br/>\n <input type='number' name='user-id' value='\" . $userId . \"' hidden/><br/>\n <ul class = 'profielList'>\n <li><input type='text' name='firstName' value='\" . $row['user_firstname'] . \"'/></li>\n <li><input type='text' name='lastName' value='\" . $row['user_lastname'] . \"'/></li>\n <li><input type='text' name='location' value='\" . $row['user_location'] . \"'</li>\n <li><input type='text' name='cv' value='http://\" . $row['user_cv'] . \"'/></li>\n </ul> \n </div>\n\n <div class='twee profielOmschrijving'>\n <textarea rows='10' cols='30' name='info'>\". $row['user_contact_info'] . \"</textarea></p>\n <input type='submit' value='submit'/>\n </form>\n </div>\n \";\n \n \n }\n \n\t\t}\n\t}\n}",
"public function tellAFriendAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $sitemobile = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemobile');\r\n if ($sitemobile && !Engine_Api::_()->sitemobile()->checkMode('mobile-mode'))\r\n\t\t\t$this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET VIEWER DETAIL\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewr_id = $viewer->getIdentity();\r\n\r\n //GET PAGE ID AND PAGE OBJECT\r\n $page_id = $this->_getParam('page_id', $this->_getParam('id', null));\r\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\r\n if (empty($sitepage))\r\n return $this->_forwardCustom('notfound', 'error', 'core');\r\n //AUTHORIZATION CHECK FOR TELL A FRIEND\r\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'tfriend');\r\n if (empty($isManageAdmin)) {\r\n return $this->_forwardCustom('requireauth', 'error', 'core');\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitepage_Form_TellAFriend();\r\n \r\n if (!empty($viewr_id)) {\r\n $value['sender_email'] = $viewer->email;\r\n $value['sender_name'] = $viewer->displayname;\r\n $form->populate($value);\r\n }\r\n \r\n //IF THE MODE IS APP MODE THEN\r\n if (Engine_Api::_()->seaocore()->isSitemobileApp()) {\r\n Zend_Registry::set('setFixedCreationForm', true);\r\n Zend_Registry::set('setFixedCreationFormBack', 'Back');\r\n Zend_Registry::set('setFixedCreationHeaderTitle', Zend_Registry::get('Zend_Translate')->_('Tell a friend'));\r\n Zend_Registry::set('setFixedCreationHeaderSubmit', Zend_Registry::get('Zend_Translate')->_('Send'));\r\n $this->view->form->setAttrib('id', 'tellAFriendFrom');\r\n Zend_Registry::set('setFixedCreationFormId', '#tellAFriendFrom');\r\n $this->view->form->removeElement('sitepage_send');\r\n $this->view->form->removeElement('sitepage_cancel');\r\n $form->setTitle('');\r\n }\r\n\r\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\r\n\r\n $values = $form->getValues();\r\n\r\n //EDPLODES EMAIL IDS\r\n $reciver_ids = explode(',', $values['sitepage_reciver_emails']);\r\n\r\n if (!empty($values['sitepage_send_me'])) {\r\n $reciver_ids[] = $values['sitepage_sender_email'];\r\n }\r\n $sender_email = $values['sitepage_sender_email'];\r\n\r\n //CHECK VALID EMAIL ID FORMITE\r\n $validator = new Zend_Validate_EmailAddress();\r\n\r\n if (!$validator->isValid($sender_email)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Invalid sender email address value'));\r\n return;\r\n }\r\n foreach ($reciver_ids as $reciver_id) {\r\n $reciver_id = trim($reciver_id, ' ');\r\n if (!$validator->isValid($reciver_id)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter correct email address of the receiver(s).'));\r\n return;\r\n }\r\n }\r\n $sender = $values['sitepage_sender_name'];\r\n $message = $values['sitepage_message'];\r\n $heading = ucfirst($sitepage->getTitle());\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($reciver_ids, 'SITEPAGE_TELLAFRIEND_EMAIL', array(\r\n 'host' => $_SERVER['HTTP_HOST'],\r\n 'sender_name' => $sender,\r\n 'page_title' => $heading,\r\n 'message' => '<div>' . $message . '</div>',\r\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] . Engine_Api::_()->sitepage()->getHref($sitepage->page_id, $sitepage->owner_id, $sitepage->getSlug()),\r\n 'sender_email' => $sender_email,\r\n 'queue' => true\r\n ));\r\n\r\n if ($sitemobile && Engine_Api::_()->sitemobile()->checkMode('mobile-mode'))\r\n\t\t\t\t$this->_forwardCustom('success', 'utility', 'core', array( \r\n 'parentRedirect' => $sitepage->getHref(), \r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to your friend has been sent successfully.'))\r\n ));\r\n\t\t else\t\r\n $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => false,\r\n 'format' => 'smoothbox',\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to your friend has been sent successfully.'))\r\n ));\r\n }\r\n }",
"public function actionUpdateUser()\n {\n\n\n if ($model = UserProfile::find()->where(['user_id' => Yii::$app->user->identity->id])->one()) {\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view']);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n }\n\n } else {\n\n return $this->redirect(['create']);\n\n }\n\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 static function append_into_contact_list(){\n\n\n $id_added_user = $_SESSION[\"user_id_added\"]; // usuario que acabamos de agregar\n\t$current_user_id = $_SESSION[\"id_user\"]; // este soy yo osea el que agrega\n\n\t$QUERY = \"INSERT INTO contact values(NULL,$current_user_id ,$id_added_user) \";\n\n\n\t mysql_query( $QUERY , Conectar::con());\n\n\n\n\t}",
"public function addfriendAction()\n {\n $response = $this->getResponse();\n $data = $this->params()->fromPost();\n $dm = $this->getDocumentService();\n $successModel = new SuccessModel();\n\n $check = $successModel->checkFriend($data['actionUser'], $data['actionLocation'], $dm);\n if($check== null)\n {\n $result = $successModel->sendRequestAddFriend($data, $dm);\n\n if($result)\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 1,\n )));\n }\n else\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 0,\n )));\n }\n }\n else\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 0,\n )));\n }\n\n }",
"public function editionAction() {\r\n //inactivate header/footer\r\n $this->_includeTemplate = false;\r\n\r\n if ($_GET['checkboxAd'] == 'false') {\r\n $typeU = \"child\";\r\n } else {\r\n $typeU = \"adult\";\r\n }\r\n\r\n if ($_GET['checkboxAdmin'] == 'false') {\r\n $admin = \"0\";\r\n } else {\r\n $admin = \"1\";\r\n }\r\n\r\n //test to know if the user already exists\r\n $cpt = true;\r\n foreach ($_SESSION['members'] as $member) {\r\n\r\n if (($_GET['Name'] == $member->getName()) && ($_GET['CurrName'] != $member->getName() )) {\r\n $cpt = false;\r\n }\r\n }\r\n\r\n //if user doesn't exist\r\n if ($cpt) {\r\n //sql connection\r\n\r\n if ($_SESSION['Name'] == $_GET['CurrName'])//Current edit current\r\n $_SESSION['Name'] = $_GET['Name'];\r\n\r\n $connect = connection::getInstance();\r\n $_GET['Name'] = Users::secure($_GET['Name']);\r\n $_GET['Pass'] = Users::secure($_GET['Pass']);\r\n $_GET['Id'] = Users::secure($_GET['Id']);\r\n\r\n $sql = \"UPDATE users SET nameU='\" . $_GET['Name'] . \"', typeU='\" . $typeU . \"',password='\" . $_GET['Pass'] . \"', admin='\" . $admin . \"' where IDU ='\" . $_GET['Id'] . \"'\"; //on recupere tout les utilisateurs\r\n //sending request\r\n $req = mysql_query($sql) or die('Erreur SQL !<br>' . $sql . '<br>' . mysql_error());\r\n\r\n \r\n $_SESSION['admin'] = $admin;\r\n $_SESSION['current'] = 'members';\r\n $this->members = Users::Getuser(); //give data to view\r\n } else {\r\n $this->members = $_SESSION['members']; //give data to view\r\n }\r\n }",
"function editUser($id, $fname, $username, $password, $email){\n $pdo = Database::getInstance()->getConnection();\n\n //TODO: Run the proper SQL query to update tbl_user with proper values\n $update_user_query = 'UPDATE tbl_user SET user_fname = :fname, user_name = :username,';\n $update_user_query .= ' user_pass=:password, user_email =:email WHERE user_id = :id';\n $update_user_set = $pdo->prepare($update_user_query);\n $update_user_result = $update_user_set->execute(\n array(\n ':fname'=>$fname,\n ':username'=>$username,\n ':password'=>$password,\n ':email'=>$email,\n ':id'=>$id\n )\n );\n\n // echo $update_user_set->debugDumpParams();\n // exit;\n\n //TODO: if everything goes well, redirect user to index.php\n // Otherwise, return some error message...\n if($update_user_result){\n redirect_to('index.php');\n }else{\n return 'Guess you got canned...';\n }\n}",
"static function modificanome($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(\"nome\", $_POST['nome'], \"id\", $id, \"FWatchlist\");\n //$_SESSION['utente']->setPassword($hashPW);\n //$_SESSION['pwedit']=true;\n $pos=array_search($w[0],$_SESSION['watchlist']);\n $_SESSION['watchlist'][$pos]->setNome($_POST['nome']);\n\n }\n // else $_SESSION['pwedit']=false;\n\n header('Location: /Progetto'.$_SESSION['location']);\n }\n }\n}",
"function editUser($id, $fname, $username, $password, $email) {\n\t\tinclude('connect.php');\n// Update user with edit query\n\t\t$updatestring = \"UPDATE tbl_user SET user_fname='{$fname}', user_name='{$username}', user_pass='{$password}', user_email='{$email}' WHERE user_id={$id}\";\n\t\t$updatequery = mysqli_query($link, $updatestring);\n\n\t\tif($updatequery) {\n\t\t\tredirect_to(\"admin_index.php\");\n\t\t}else{\n\t\t\t$message = \"Something went wrong; you are not allowed to change the information.\";\n\t\t\treturn $message;\n\t\t}\n mysqli_close($link);\n\t}",
"function updateUserController(){\n\t\t\t$this->load->model('User_model');\n\t\t\t$id = $_POST[\"id\"];\n\t\t\t$title = $_POST[\"title\"]; \n\t\t\t$city = $_POST[\"city\"]; \n\t\t\t$country = $_POST[\"country\"];\n\t\t\t$phone = $_POST[\"phone\"];\n\t\t\t$bio = $_POST[\"bio\"];\n\t\t\t$interest = $_POST[\"interest\"];\n\t\t\tif($this->User_model->updateUserModel($id,$title,$city,$country,$phone,$bio,$interest)){\n\t\t\t \t$this->userTimeline($id, 'Bio', 'You updated your Bio and Interests', '');\n\t\t\t\techo 'added';\n\t\t\t}else{\n\t\t\t\techo 'Failed';\n\t\t\t}\n\t\t\t \n\t\t}",
"function friends() {\n $user = UserQuery::create()->findPK($_SESSION['uid']);\n $profile = ProfileQuery::create()->findPK($_SESSION['uid']);\n $friends = FriendQuery::create()->findByUserid($_SESSION['uid']);\n $friendgroups = FriendQuery::create()->findOneByFriendid($_SESSION['uid']);\n $buckets = BucketQuery::create()->findByUserid($_SESSION['uid']);\n $hasbuckets = BucketQuery::create()->findOneByUserid($_SESSION['uid']);\n $nbFriends = FriendQuery::create()->filterByUserid($_SESSION['uid'])->count($con);\n\n\t\tif ($user) {\n\t\t\t$profile = ProfileQuery::create()->findPK($user->getId());\n\t\t\t$nbFriends = FriendQuery::create()->filterByUserid($user->getId())->count($con);\n\t\t\n\t\t\tif ($userid != $user->getId() && $userid && $user->getId()) {\n\t\t\t\t$friends = FriendQuery::create()\n\t\t\t\t->filterByUserid($_SESSION['uid'])\n\t\t\t\t->filterByFriendid($user->getId())\n\t\t\t\t->findOne();\n\t\t\n\t\t\t\tif ($friends) {\n\t\t\t\t$bucket = FriendBucketQuery::create()\n\t\t\t\t->filterByUserid($friends->getUserid())\n\t\t\t\t->findOne();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($nbFriends > 0) {\n\t\t\t\t$friendslist = FriendQuery::create()\n\t\t\t\t\t->filterByUserid($user->getId())\n\t\t\t\t\t->find();\n\t\t\t\t\t\t\t\n\t\t\t\t// Load friends Userid's into array, include logged in user.\n\t\t\t\tforeach ($friendslist as $friendlist) {\n\t\t\t\t\t$friendid = $friendlist->getFriendid();\n\t\t\t\t\t$groupid = $friendlist->getGroupid();\n\t\t\t\t\t$aFriends[$groupid] = $friendid;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($aFriends as $aFriend) {\n\t\t\t\t\t$myfriend = UserQuery::create()\n\t\t\t\t\t\t->findPK($aFriend);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$friendList[] = array (\n\t\t\t\t\t\t\t\"username\" => $myfriend->getUsername(),\n\t\t\t\t\t\t\t\"firstname\" => $myfriend->getFirstname(),\n\t\t\t\t\t\t\t\"lastname\" => $myfriend->getLastname(),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tif ($_SESSION['uid']) {\n\t\t\t\t\t\tif ($aFriend === $_SESSION['uid'] || $user->getId() === $_SESSION['uid']) {\n\t\t\t\t\t\t\t$showfriend = 1;\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} else {\n\t\t\t$notfound = 1;\n\t\t}\n \n $info = array (\n \"user\" => $user,\n \"profile\" => $profile,\n \"friends\" => $friends,\n \"friendgroups\" => $friendgroups,\n \"buckets\" => $buckets,\n \"hasbuckets\" => $hasbuckets,\n \"nbFriends\" => $nbFriends,\n \"friendlist\" => $friendList,\n \"showfriend\" => $showfriend,\n \"notfound\" => $notfound,\n \n ); \n return $info; \n }",
"public function am_lists(){\n $query = \"SELECT * FROM `users` where STATUS = 'Apprentice Master'\";\n $cart_result = @mysqli_query($this->dbc, $query) or die(\"Couldn't ViewSql userd lists:(\");\n $this->num_rows = mysqli_num_rows($cart_result);\n while ($row = mysqli_fetch_assoc($cart_result)) {\n\n if($row['email_confirmed'] == 1 ){$email_confirmed = \"Yes\";}else{$email_confirmed = \"No\";}\n if($row[\"role\"] == 3 ){$role = \"Admin\";}else{$role = \"User\";}\n\n $this->list .= \"\n <tr>\n <td>\" .$row[\"id\"] .\"</td>\n <td>\" . openssl_decrypt($row['firstname'], ENCRYPTION_METHOD, ENCRYPTION_KEY) .\"</td>\n <td>\" . openssl_decrypt($row['lastname'], ENCRYPTION_METHOD, ENCRYPTION_KEY) .\"</td>\n <td>\" . openssl_decrypt($row['email'], ENCRYPTION_METHOD, ENCRYPTION_KEY) .\"</td>\n <td>\" . $row['dbs_status'] . \"</td>\n <td>\" . $row['dbs_issue_date'] .\"</td>\n \n \n \n <td>\n <form method='post' action='users-edit.php'>\n <input type='hidden' name='id' value='\" .$row[\"id\"] .\"'>\n <input type='hidden' name='nb' value='cc'>\n <button class='btn btn-icon btn-success mr-2 mb5' name='button' value='article'>\n <i class='icon-pencil2'></i>\n </button>\n </form>\n </td> \n </tr>\n \";\n }// end while\n mysqli_close($this->dbc);\n }",
"protected function lstUsersAsAssessmentManager_Update() {\n\t\t\tif ($this->lstUsersAsAssessmentManager) {\n\t\t\t\t$this->objGroupAssessmentList->UnassociateAllUsersAsAssessmentManager();\n\t\t\t\t$objSelectedListItems = $this->lstUsersAsAssessmentManager->SelectedItems;\n\t\t\t\tif ($objSelectedListItems) foreach ($objSelectedListItems as $objListItem) {\n\t\t\t\t\t$this->objGroupAssessmentList->AssociateUserAsAssessmentManager(User::Load($objListItem->Value));\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function inviteAction() {\n\n if( !$this->_helper->requireUser()->isValid() ) return;\n\n //GET PAGE ID.\n $page_id = $this->_getParam('page_id');\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n \n $automaticallyJoin = Engine_Api::_()->getApi('settings', 'core')->getSetting( 'pagemember.automatically.addmember', 1);\n \n //PREPARE DATA\n $viewer = Engine_Api::_()->user()->getViewer();\n $this->view->friends = $friends = $viewer->membership()->getMembers();\n\n $hasMembers_viewer = Engine_Api::_()->getDbTable('membership', 'sitepage')->hasMembers($viewer->getIdentity(), $sitepage->getIdentity());\n\n //PREPARE FORM\n $this->view->form = $form = new Sitepagemember_Form_Invite();\n\n $count = 0;\n foreach( $friends as $friend ) {\n \n\t\t\t$friend_id = $friend->getIdentity();\n\n\t\t\t$hasMembers = Engine_Api::_()->getDbTable('membership', 'sitepage')->hasMembers($friend_id, $page_id);\n\n\t\t\tif(!empty($hasMembers)) {\n\t\t\t\tcontinue;\n\t\t }\n //if( $sitepage->membership()->isMember($friend, null) ) continue;\n $form->users->addMultiOption($friend_id, $friend->getTitle());\n $count++;\n }\n\n $this->view->count = $count;\n\n // throw notice if count = 0\n if( $count == 0 ) {\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('You have currently no friends to invite.')),\n 'layout' => 'default-simple',\n 'parentRefresh' => true,\n ));\n }\n\n //NOT POSTING\n if( !$this->getRequest()->isPost() ) {\n return;\n }\n\n if( !$form->isValid($this->getRequest()->getPost()) ) {\n return;\n }\n\n $usersIds = $form->getValue('users');\n\t\tforeach( $friends as $friend ) {\n\t\t\n\t\t\tif( !in_array($friend->getIdentity(), $usersIds) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//GET VALUE FROM THE FORM.\n\t\t\t$values = $this->getRequest()->getPost();\n\t\t\t$membersTable = Engine_Api::_()->getDbtable('membership', 'sitepage');\n\t\t\t$row = $membersTable->createRow();\n\t\t\t$row->resource_id = $page_id;\n\t\t\t$row->page_id = $page_id;\n\t\t\t$row->user_id = $friend->getIdentity();\n\t\t\t$row->resource_approved = 1;\n\t\t\t\n\t\t\tif (!empty($automaticallyJoin) && !empty($sitepage->member_approval)) {\n\t\t\t\t$row->active = 1;\n\t\t\t\t$row->user_approved = 1;\n\n\t\t\t\t//MEMBER COUNT INCREASE WHEN MEMBER JOIN THE PAGE.\n\t\t\t\t$sitepage->member_count++;\n\t\t\t\t$sitepage->save();\n\t\t\t} else {\n\t\t\t\t$row->active = 0;\n\t\t\t\tif(!empty($automaticallyJoin) && empty($sitepage->member_approval)) {\n\t\t\t\t\t$row->resource_approved = 0;\n\t\t\t\t}\n\t\t\t\t$row->user_approved = 0;\n\t\t\t}\n\t\t\t\n\t\t\t$row->save();\n\t\t\t\n if (empty($automaticallyJoin)) {\n\t\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->addNotification($friend, $viewer, $sitepage, 'sitepagemember_invite');\n\t\t\t} elseif (!empty($automaticallyJoin) && empty($sitepage->member_approval)) {\n\t\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->addNotification($friend, $viewer, $sitepage, 'sitepagemember_invite');\n\t\t\t}\n\t\t}\n if (!empty($automaticallyJoin) && !empty($sitepage->member_approval)) {\n\t\t\t$messages = Zend_Registry::get('Zend_Translate')->_('Members have been successfully added.');\n } else {\n\t\t\t$messages = Zend_Registry::get('Zend_Translate')->_('Members have been successfully invited.');\n }\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_($messages)),\n 'layout' => 'default-simple',\n 'parentRefresh' => true,\n ));\n }",
"public function renderEditUserForm($action, $errors, $user, $data)\n\t{\n\t\t$associations = $user->getGoogleFriendsConnectAssociations();\n\n\t\t?>\n\t\t<form action=\"<?php echo $action?>\" method=\"POST\">\n\t\t<input type=\"hidden\" name=\"save\" value=\"save\"/>\n\t\t<?php\n\t\tforeach ($associations as $association)\n\t\t{\n\t\t\t?><div style=\"float: left; margin-right: 1em\">\n\t\t\t<img src=\"<?php echo $association['userpic']?>\"/><br/>\n\t\t\t<input type=\"submit\" name=\"remove[<?php echo $association['google_id']?>]\" value=\"remove\" style=\"font-size: xx-small\"/>\n\t\t\t</div><?php\n\t\t}\n\n\t\tUserTools::renderCSRFNonce();\n\t\t?>\n\t\t</form>\n\n\t\t<div style=\"clear: both\"></div>\n\n\t\t<script src=\"http://www.google.com/jsapi\"></script>\n\t\t<script src=\"http://www.google.com/friendconnect/script/friendconnect.js?key=notsupplied&v=0.8\"></script>\n\t\t<script>\n\t\tgoogle.setOnLoadCallback(function() {\n\t\t\tgoogle.friendconnect.container.loadOpenSocialApi({\n\t\t\t\tsite: '<?php echo $this->siteid?>',\n\t\t\t\tonload: function(securityToken) {\n\t\t\t\t\tif (!window.timesloaded) {\n\t\t\t\t\t\twindow.timesloaded = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twindow.timesloaded++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (window.timesloaded > 1) {\n\t\t\t\t\t\tdocument.googleeditform.submit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\t</script>\n\t\t<p>Connect to your <b>OpenID</b> or existing account with <b>Google</b>, <b>Twitter</b>, <b>Yahoo!</b> and more.</p>\n\t\t<a href=\"#\" onclick=\"google.friendconnect.requestSignIn(function() {document.googleeditform.submit()}); return false;\"><span style=\"background-image: url(<?php echo UserConfig::$USERSROOTURL ?>/modules/google/google-sprite.png); background-position: 0px -21px; width: 218px; height: 21px; display: block; cursor: hand;\" title=\"Connect to another account via Google Friend Connect\"></span></a>\n\n\t\t<form action=\"<?php echo $action?>\" method=\"POST\" name=\"googleeditform\">\n\t\t<input type=\"hidden\" name=\"save\" value=\"Save >>>\"/>\n\t\t<?php UserTools::renderCSRFNonce(); ?>\n\t\t</form>\n\t\t<?php\n\t}",
"public function follow_user(){\n\n\t\t$follow_user_data=array(\n\t\t\t'user_id'=>$this->session->userdata('usr_id'),\n\t\t\t'follow_user_id' => $this->input->post('id')\n\t\t);\n\n\t\treturn $this->db->insert('friends', $follow_user_data);\n\n\t}",
"function displayUsers(){\r\n $admin = $_SESSION['admin'];\r\n \r\n if($admin >= 50 && isValidUser()) { \r\n $mysqli = connectToSQL();\r\n $myq = \"SELECT *\r\n FROM EMPLOYEE\";\r\n $result = $mysqli->query($myq);\r\n if (!$result) \r\n throw new Exception(\"Database Error [{$mysqli->errno}] {$mysqli->error}\");\r\n\r\n //build table\r\n resultTable($mysqli, $result);\r\n\r\n //write any updates to DB when Save is pressed\r\n if (isset($_POST['saveBtn'])) { //saveBtn created in resultTable()\r\n $result = $mysqli->query($myq);\r\n \r\n $i = 0;\r\n $fieldNameArray = array();\r\n $values = array();\r\n \r\n while($finfo = mysqli_fetch_field($result)) {\r\n $tableName = $finfo->orgtable;\r\n $fieldNameArray[$i] = $finfo->orgname;\r\n $values[\"$fieldNameArray[$i]\"] = $fieldNameArray[$i] .\"=\".\"'\". $mysqli->real_escape_string($_POST[\"$fieldNameArray[$i]\"]).\"'\";\r\n $i++;\r\n }\r\n \r\n //turn the array into comma seperated values\r\n $csvValues = implode(',' , $values);\r\n \r\n $updateQuery = \"UPDATE \".$tableName.\" SET \".$csvValues.\" \r\n WHERE \" .$values['ID'];\r\n \r\n echo \"<br>\" . $updateQuery;\r\n $updateResult = $mysqli->query($updateQuery);\r\n\r\n if (!$updateResult) \r\n throw new Exception(\"Database Error [{$mysqli->errno}] {$mysqli->error}\");\r\n } \r\n\r\n } \r\n \r\n}",
"private function updateUser(){\n\t\t$data['datosUsuario'] = $this->users->get($_REQUEST[\"idusuario\"]);\n\t\t$data['tipoUsuario'] = Seguridad::getTipo(); \n\t\tView::show(\"user/updateForm\", $data);\n\t}",
"public function updatePost(){\n\t\t\t//goi ham de update du lieu\n\t\t\t$this->modelUpdate();\n\t\t\t//di chuyen den trang read\n\t\t\techo \"<script>location.href='account/detail';</script>\";\n\t\t}",
"public function actionIndex()\n\t{\n $this->setPageTitle('我的好友'); \n\n\t\t$gid = Yii::app()->request->getParam('gid');\n\t\t$uid = Yii::app()->request->getParam('uid');\n\t\t\n\t\tif(!empty($uid)) {\n\t\t\t$is_me = ($this->mid == $uid);\n\t\t}else {\n\t\t\t$uid = $this->mid;\n\t\t\t$is_me = true;\n\t\t}\n\n\t\t$model = new Friend();\n\t\t //初始化\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->order='t.uid';\n\t\t$criteria->condition=\"t.uid=:uid AND t.status = 1\";\n\t\t$criteria->params=array(':uid'=>$uid);\n\n\t\tif(!empty($gid))\n\t\t{\n\t\t\t$criteria->join = \"left join {{friend_belong_group}} on {{friend_belong_group}}.uid = t.uid and {{friend_belong_group}}.fuid = t.fuid \";\n\t\t\t$criteria->addCondition(\"{{friend_belong_group}}.gid=\".$gid);\n\t\t}\n else\n {\n $_GET['gid'] = 0;\n }\n\n\t\t//取得数据总数,分页显示\n\t\t$total = $model->count($criteria);\n\t\t$pages=new CPagination($total);\n\t\t$pages->pageSize=self::PAGE_SIZE;\n\t\t$pages->applyLimit($criteria);\n\t\t//获取数据集\n\t\t$friend_list = $model->inGroup($_GET['gid'])->with('frienBelongdGroup')->together()->findAll($criteria);\n\n\t\t$friendGroup = $model->getFriendGroups($uid);\n\t\t//在线人数\n\t\t$online = 0;\n\n\t\t$data = array(\n\t\t\t'is_me' => $is_me,\n\t\t\t'uid' => $uid,\n\t\t\t'gid' => $gid,\n\t\t\t'pages' => $pages,\n\t\t\t'total' => $total,\n\t\t\t'online' => $online,\n 'friendGroup'=>$friendGroup,\n 'friend_list'=>$friend_list,\n\t\t);\n\t\t\n\t\t\n\t\t$this->render('index',$data);\n\t}",
"public function update() {\n $data = $this->load($people);\n \n if(isset($_Post['people']))\n {\n $data->attributes=$_Post['people'];\n if($data->save())\n $this->redirect(array('view'=>$data->firstname,lastname));\n }\n \n $this->render('update',array('data'=>$data,));\n }",
"function culturefeed_pages_manage_members_list(CultureFeed_Cdb_Item_Page $page, CultureFeed_Pages_UserList $user_list, $cf_user = NULL) {\n\n // Get all the uid's in 1 time. Otherwise the theming layer will search it 1 by 1.\n culturefeed_get_uids_for_memberships($user_list->memberships);\n\n $header = array(\n t('Name'),\n t('Function'),\n t('Role'),\n t('Member since'),\n '',\n '',\n );\n\n // Count how many admins.\n $admins = array();\n foreach ($user_list->memberships as $member) {\n if ($member->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN) {\n $admins[] = $member;\n }\n }\n $total_admins = count($admins);\n\n $rows = array();\n // Create row for every member.\n foreach ($user_list->memberships as $member) {\n\n $row = array();\n\n $name = '';\n $depiction = !empty($member->user->depiction) ? $member->user->depiction : 'http://media.uitid.be/fis/rest/download/ce126667652776f0e9e55160f12f5478/uiv/default.png';\n $name = '<span class=\"depiction\">' . theme('image', array('path' => $depiction . '?width=30&height=30&crop=auto')) . '</span>';\n $drupal_uid = culturefeed_get_uid_for_cf_uid($member->user->id, $member->user->nick);\n $name .= l($member->user->nick, 'user/' . $drupal_uid);\n\n $row['name'] = $name;\n\n // Show the user data.\n if (empty($cf_user) || $cf_user->id != $member->user->id) {\n\n $row['function'] = $member->relation;\n switch ($member->role) {\n case CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN:\n $role = t('administrator');\n break;\n case CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_MEMBER:\n default:\n $role = t('member');\n break;\n }\n $row['role'] = $role;\n $row['member_since'] = date('d/m/Y H:i', $member->creationDate);\n $row['edit'] = l(t('Edit'), 'pages/' . $page->getId() . '/membership/' . $member->user->id . '/edit/nojs', array('attributes' => array('class' => 'use-ajax')));\n\n if ($total_admins == 1 && $member->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN) {\n $row['delete'] = theme('culturefeed_pages_membership_delete_not_possible', array('page' => $page));\n }\n else {\n $delete_options = array(\n 'attributes' => array(\n 'role' => 'button',\n 'data-toggle' => 'modal',\n 'data-target' => '#page_confirm',\n 'data-remote' => url('pages/' . $page->getId() . '/membership/' . $member->user->id . '/delete/ajax'),\n ),\n );\n $row['delete'] = l(t('Remove as member'), 'pages/' . $page->getId() . '/membership/' . $member->user->id . '/delete/nojs', $delete_options);\n }\n }\n // Show the edit form.\n else {\n\n $form = drupal_get_form('culturefeed_pages_edit_membership_form', $page, $cf_user, $user_list);\n $row['function'] = array(\n 'data' => render($form),\n 'colspan' => 2,\n );\n $row['member_since'] = date('d/m/Y H:i', $member->creationDate);\n $row['cancel'] = array(\n 'data' => l(t('Cancel changes'), 'pages/' . $page->getId() . '/members/nojs', array('attributes' => array('class' => 'use-ajax'))),\n 'colspan' => 2,\n );\n\n }\n\n $rows[] = array('data' => $row, 'id' => 'member-' . $member->user->id);\n\n }\n\n return array(\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n '#empty' => t('No content available.'),\n '#attached' => array('library' => array(array('system', 'drupal.ajax'))),\n '#prefix' => '<div id=\"manage-members\">',\n '#suffix' => '</div>',\n );\n\n}",
"public function pendingAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n \t$user = $this->_user;\n if($user->{User::COLUMN_STATUS} == User::STATUS_MEMBER ){\n // Redirect to update if is a member already\n $this->_helper->redirectToRoute('userupdate');\n }\n\n $form = new User_Form_Update($user, true);\n\n // Populate form with data from DB in case user comes back to this page\n $form->populateFromDatabaseData($user->toArray());\n\n $data = $this->_request->getPost();\n if(!$data){\n // Display default data form\n $this->view->form = $form;\n return;\n }\n\n if (!$form->isValid($data)) {\n // Display form with errors\n $this->view->form = $form;\n return;\n }\n\n if(!$this->_updateUser($user, $form->getFormattedValuesForDatabase(), false)){\n // Update failed\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::UPDATE_FAILED));\n }\n\n // Update succeeded, redirect to next page\n $this->_helper->redirectToRoute('userwaitforconfirmation');\n }",
"function createFriendListRecord($user_id, $friend_id, $connection_id) {\n //get both user rows\n $friend_user_row = getUserRow($friend_id, \"user_loging\");\n if ($friend_user_row) {\n $user_row = getUserRow($user_id, \"user_loging\");\n //create friend_list record for user\n createListRecord($user_id, $friend_id, $friend_user_row['l_name'], $connection_id, 'friend_list');\n //create friend_list for friend\n createListRecord($friend_id, $user_id, $user_row['l_name'], $connection_id, 'friend_list');\n }\n}",
"function disAgreeFriendHandler() {\n global $inputs;\n\n $sql = \"DELETE FROM `member_friend_apply` WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'option success');\n}",
"public function index()\n\t{\n\t\t// delete action\n\t\t$ids = Input::get('ids');\n\t\tif( !empty($ids) )\n\t\t{\n\t\t\tDB::table('wc_member')->whereIn('id', $ids)->delete();\t\t\t\n\t\t\treturn Redirect::back()->withInput();\t\t\t\t\n\t\t}\n/*\n\t\tfor($i = 0; $i < 100; $i++)\n\t\t{\t\n\t\t\t$user = new Member();\n\t\t\t$user->username = 'member' . $i;\n\t\t\t$user->fullname = 'Member ' . $i;\n\t\t\t$user->email = '[email protected]' . $i;\n\t\t\t$user->contact = 'contactno_' . $i;\n\t\t\t$user->password = Hash::make('123456');\t\t\t\n\t\t\t$user->save();\n\t\t}\t\n*/\t\n\t\t// $admin = Auth::user();\n\t\t$admin = $_SESSION[\"admin\"];\n\t\t\n\t\t$query = Member::sortable();\n\t\t\n\t\t$search = Input::get('search');\n\t\tif( !empty($search) )\n\t\t{\n\t\t\t$query->where(function($searchquery)\n\t\t\t\t{\n\t\t\t\t\t$search = '%' . Input::get('search') . '%';\n\t\t\t\t\t$searchquery->where('username', 'like', $search)\t\t\t\t\t\t\n\t\t\t\t\t\t\t->orWhere('fullname', 'like', $search)\t\n\t\t\t\t\t\t\t->orWhere('email', 'like', $search);\n\t\t\t\t});\t\n\t\t}\n\t\telse \n\t\t\t$search = \"\";\n\n\t\t$pagesize = Input::get('pagesize');\n\t\tif( empty($pagesize) )\n\t\t\t$pagesize = 10;\t\t\n\t\t\n\t\t$users = $query->paginate($pagesize);\t\n\t\t\n\t\tInput::flashOnly('search');\n\t\t\n\t\treturn View::make('member.list')->with('users', $users)\n\t\t\t\t\t\t\t\t\t\t\t->with('pagesize',$pagesize);\n\t}",
"function editInfo($user) {\n\n if (isset ($_POST ['submit'])) {\n $newUsername = trim(strip_tags($_POST['username']));\n $newFirstName = trim(strip_tags($_POST['firstname']));\n $newLastName = trim(strip_tags($_POST['lastname']));\n $newEmail = trim(strip_tags($_POST['email']));\n\n if(!empty($_POST['username']) AND !empty($_POST['email']) AND !empty($_POST['firstname'] AND !empty($_POST['lastname']))) {\n\n if(strlen($newUsername) <= 100 && strlen($newFirstName) <= 100 && strlen($newLastName) <= 100) {\n\n if (filter_var($newEmail, FILTER_VALIDATE_EMAIL)){\n\n $bdd = dbConnect();\n $reqmail = $bdd->prepare(\"SELECT * FROM user WHERE email = ?\");\n $reqmail->execute(array($newEmail));\n\n if ($reqmail->rowCount() > 0){\n $result = $reqmail->fetch(PDO::FETCH_ASSOC);\n if ($result['username'] == $user) // We can replace its old mail with the same one\n $mailexist = 0;\n else\n $mailexist = 1;\n }\n\n $requsername = $bdd->prepare(\"SELECT * FROM user WHERE username = ?\");\n $requsername->execute(array($newUsername));\n\n if ($requsername->rowCount() > 0){\n $result = $requsername->fetch(PDO::FETCH_ASSOC);\n if ($result['username'] == $user) // We can replace its old username with the same one\n $usernameexist = 0;\n else\n $usernameexist = 1;\n }\n\n if($mailexist == 0) {\n if($usernameexist == 0) {\n try {\n $stmt = $bdd->prepare(\"UPDATE user SET username=:newUsername, first_name=:newFirstName, last_name=:newLastName, email=:newEmail WHERE username=:username\");\n $stmt->execute(array(\n 'newUsername' => $newUsername,\n 'newFirstName' => $newFirstName,\n 'newLastName' => $newLastName,\n 'newEmail' => $newEmail,\n 'username' => $user\n ));\n $_SESSION['username'] = $newUsername;\n }\n catch(PDOException $e) {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n return 0;\n\n } else\n return -3; // Username already used\n } else\n return -2; // Mail already used\n }\n }\n }\n }\n\n return -1;\n\n }",
"public function user_list()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$this->load->model('User_Profiles', 'up');\n\t\t\t$data['users'] = $this->up->get_all_users();\n\t\t\t$this->load->view('user_list-admin',$data);\n\t\t}",
"function user_list()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '运营人员列表';\n $this->global['pageName'] = 'userlist';\n\n $data['searchType'] = '0';\n $data['searchName'] = '';\n\n $this->loadViews(\"user_manage/users\", $this->global, $data, NULL);\n }\n }",
"public function lst(){\n\t\t$args = $this->getArgs();\n\t\t$uid = $_SESSION[\"user\"][\"uid\"];\n\t\t$base_url = substr($_SERVER[\"REQUEST_URI\"], 0, strrpos($_SERVER[\"REQUEST_URI\"], \"/\") + 1);\n\t\t$header = array(\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_ID)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_EMAIL)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_FNAME)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_LNAME)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_PHONE))\n\t\t);\n\t\t\n\t\t$config = array(\n\t\t\t\t\"config\" => array(\n\t\t\t\t\t\t\"page\" => (isset($args[\"GET\"][\"page\"]) ? $args[\"GET\"][\"page\"] : System::PAGE_ACTUAL_DEFAULT),\n\t\t\t\t\t\t\"column\" => (isset($args[\"GET\"][\"column\"]) ? $args[\"GET\"][\"column\"] : System::SORT_DEFAULT_COLUMN),\n\t\t\t\t\t\t\"direction\" => (isset($args[\"GET\"][\"direction\"]) ? $args[\"GET\"][\"direction\"] : System::SORT_DES),\n\t\t\t\t\t\t\"actual_pagesize\" => (isset($_SESSION[\"page_size\"]) ? $_SESSION[\"page_size\"] : System::PAGE_SIZE_DEFAULT),\n\t\t\t\t\t\t\"data_count\" => $this->getModel()->getCountUserList(),\n\t\t\t\t\t\t\"disable_menu\" => true,\n\t\t\t\t\t\t\"disable_select\" => true,\n\t\t\t\t\t\t\"disable_pagging\" => false,\n\t\t\t\t\t\t\"disable_set_pagesize\" => false\n\t\t\t\t),\n\t\t\t\t\"form_url\" => array(\n\t\t\t\t\t\t\"page\" => $base_url . \"-%d-%d-%s\",\n\t\t\t\t\t\t\"header_sort\" => $base_url . \"-%d-%d-%s\",\n\t\t\t\t\t\t\"form_action\" => $base_url\n\t\t\t\t),\n\t\t\t\t\"item_menu\" => array(),\n\t\t\t\t\"select_item_action\" => array(),\n\t\t\t\t\"style\" => array(\n\t\t\t\t\t\t\"marked_row_class\" => \"marked\",\n\t\t\t\t\t\t\"count_box_class\" => \"count_box\",\n\t\t\t\t\t\t\"pagging_box_class\" => \"pagging_box\",\n\t\t\t\t\t\t\"actual_page_class\" => \"actual_page\",\n\t\t\t\t\t\t\"table_header_class\" => \"head\",\n\t\t\t\t\t\t\"table_id\" => \"user_lst\",\n\t\t\t\t\t\t\"select_form_id\" => \"\",\n\t\t\t\t\t\t\"pagesize_form_id\" => \"pagesize_box\",\n\t\t\t\t\t\t\"list_footer_id\" => \"\"\n\t\t\t\t)\n\t\t);\n\t\t$data = $this->getModel()->getUserList($config[\"config\"][\"page\"], $config[\"config\"][\"actual_pagesize\"], $config[\"config\"][\"column\"], $config[\"config\"][\"direction\"], $config[\"config\"][\"disable_pagging\"]);\n\t\t$out = Paginator::generatePage($header, $data, $config);\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}",
"public function sTellFriend()\n {\n $checkMail = $this->sUserData['additional']['user']['email'];\n\n $tmpSQL = '\n SELECT * FROM s_emarketing_tellafriend WHERE confirmed=0 AND recipient=?\n ';\n $checkIfUserFound = $this->db->fetchRow($tmpSQL, [$checkMail]);\n if ($checkIfUserFound) {\n $this->db->executeUpdate('\n UPDATE s_emarketing_tellafriend SET confirmed=1 WHERE recipient=?\n ', [$checkMail]);\n\n $advertiser = $this->db->fetchRow('\n SELECT email, firstname, lastname FROM s_user\n WHERE s_user.id=?\n ', [$checkIfUserFound['sender']]);\n\n if (!$advertiser) {\n return;\n }\n\n $context = [\n 'customer' => $advertiser['firstname'] . ' ' . $advertiser['lastname'],\n 'user' => $this->sUserData['billingaddress']['firstname'] . ' ' . $this->sUserData['billingaddress']['lastname'],\n 'voucherValue' => $this->config->get('sVOUCHERTELLFRIENDVALUE'),\n 'voucherCode' => $this->config->get('sVOUCHERTELLFRIENDCODE'),\n ];\n\n $mail = Shopware()->TemplateMail()->createMail('sVOUCHER', $context);\n $mail->addTo($advertiser['email']);\n $mail->send();\n } // - if user found\n }",
"public function actionIndex()\r\n {\r\n if (Profile::findOne(Yii::$app->user->id) !== null) {\r\n $model = Profile::findOne(Yii::$app->user->id);\r\n } else {\r\n $model = new Profile;\r\n $model->user_id = Yii::$app->user->id;\r\n }\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n Yii::$app->getSession()->setFlash('success', '个人信息修改成功。');\r\n return $this->refresh();\r\n }\r\n\r\n return $this->render('index', [\r\n 'model' => $model,\r\n ]);\r\n }",
"function ffl_settings_page()\n{\n\tif(!empty($_REQUEST['updateusers']) && current_user_can(\"manage_options\"))\n\t{\n\t\tglobal $wpdb;\n\t\t$user_ids = $wpdb->get_col(\"SELECT ID FROM $wpdb->users\");\n\t\t\n\t\tforeach($user_ids as $user_id)\n\t\t{\n\t\t\tffl_fix_user_display_name($user_id);\t\t \n\t\t\tset_time_limit(30);\t\t\t\n\t\t}\n\t\t\n\t\t?>\n\t\t<p><?php echo count($user_ids);?> users(s) fixed.</p>\n\t\t<?php\n\t}\n\t\n\t?>\n\t<p>The <em>Force First and Last Name as Display Name</em> plugin will only fix display names at registration or when a profile is updated.</p>\n\t<p>If you just activated this plugin, please click on the button below to update the display names of your existing users.</p>\n\t<p><a href=\"?page=ffl_settings&updateusers=1\" class=\"button-primary\">Update Existing Users</a></p>\n\t<p><strong>WARNING:</strong> This may take a while! If you have a bunch of users or a slow server, <strong>this may hang up or cause other issues with your site</strong>. Use at your own risk.</p>\t\n\t<?php\n}",
"public function displayHome($listUsers) {\n if (isset($_SESSION['user']) && ($_SESSION['level'] == \"admin\")){\n $this->page .=\"<h1 class='text-center'>Les différentes Utilisateurs !</h1>\";\n $this->page .= \"<p><a class='btn btn-success col-12 mt-3 p-2 mb-4' href='index.php?controller=user&action=addForm'>Ajouter</a></p>\";\n $this->page .= \"<table class='table text-center col p-2 mt-2 mb-4'>\";\n $this->page .= \"<thead class='thead-light'><th>Username</th><th>Password</th><th>Nom</th><th>Prénom</th><th>Supprimer</th><th>Modifier</th></thead>\";\n foreach ($listUsers as $users) {\n $this->page .= \"<tr><td>\" .$users['username'] \n .\"</td><td class=''>\" .$users['password']\n .\"</td><td class=''>\" .$users['firstname']\n .\"</td><td class=''>\" .$users['lastname']\n .\"</td><td><a class='btn btn-danger' href='index.php?controller=user&action=suppDB&id=\"\n .$users['id']\n .\"'><i class='fas fa-trash-alt'></i></a></td><td><a class='btn btn-primary' href='index.php?controller=user&action=updateForm&id=\"\n .$users['id']\n .\"'><i class='fas fa-edit'></i></a></td></tr>\";\n }\n $this->page .= \"</table>\";\n $this->displayPage();\n } else {\n header ('location:index.php?controller=login&action=formLog');\n }\n }",
"function edit_list($ajax_php_file, $dbname, $table_name, $is_current_vocs) {\n\t//echo \"<br>Tabellennname:$table_name<br>\";\n\t// erhält von Javascript die id des Pools, der angezeigt werden soll\n\t// table_name ist der name des Tabellenregister mit der Sammlung von Listen\n\n// löscht einen Eintrag aus Users lists\n\t// wird von js-Funktion delete_row ausgeführt\n\tif (isset($_GET['delete_row'])) {\n\t\t$array = $_GET['delete_row'];\n\t\t$array = json_decode(stripslashes($array));\n\t\t$pool_id = $array[0];\n\t\t$row_id = $array[1];\n\t\t$sql = \"DELETE FROM `$dbname` . `vocs_usr` WHERE `vocs_usr`.`id` = $row_id;\";\n\t\tsimplequery($sql);\n\t\t//display_edit_vocs($ajax_php_file,$dbname, $table_name,$is_current_vocs, $pool_id);\n\t}\n\n// Vokabel aus Current Vocs bearbeiten\n\tif (isset($_GET['edit_row'])) {\n\t\t$array = $_GET['edit_row'];\n\t\t$array = json_decode(stripslashes($array));\n\t\t// Struktur des Js arrays: new Array(type,field_value,table_id,row_id);\n\t\t$type = $array[0];\n\t\t$field_value = utf8_encode($array[1]);\n\t\t$pool_id = $array[2];\n\t\t$row_id = $array[3];\n\n\t\t//echo $sql;\n\t\t$sql = \"UPDATE `$dbname`.`$table_name` SET \";\n\t\tif ($type == \"q\") {\n\t\t\t$sql .= \" `Question`\";\n\t\t}\n\t\tif ($type == \"a\") {\n\t\t\t$sql .= \"`Answer`\";\n\t\t}\n\n\t\t$sql .= \" = '$field_value' WHERE `$table_name`.`Id` = $row_id;\";\n\t\t//echo \"<br>$sql\";\n\t\t$result = simplequery($sql);\n\t\tif ($result) {\n\t\t\techo \"Änderung erfolgreich,neuer Eintrag:<b> $field_value </b>\";\n\t\t}\n\t\t//display_edit_vocs($ajax_php_file,$dbname, $table_name,$is_current_vocs, $pool_id);\n\t}\n\n\t// speicher die neu hinzugefügten Felder eines Pools\n\tif (isset($_GET['save_added_vocs'])) {\n\t\t$array = $_GET['save_added_vocs'];\n\t\t$array = json_decode(stripslashes($array));\n\t\t// Struktur des Js arrays: new Array(type,field_value,table_id,row_id);\n\t\t$sql = $array[0];\n\t\t$pool_id = $array[1];\n\t\t//simplequery($sql);\n\t\tupdate_voc_object_array($pool_id, $dbname, $user_id, $current_vocs);\n\n\t}\n\n}",
"public function admin_user_list() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array('User.created' => 'desc' ),\n 'conditions' => array('User.status' => 1),\n );\n $data = $this->paginate('User');\n $this->set('user', $data);\n $this->render('/Users/user_list');\n }",
"function unfriendHandle() {\n global $inputs;\n\n $res=getOne(\"SELECT * FROM member_friend WHERE id =?\", [$inputs['id']]);\n\n $sql = \"DELETE FROM `member_friend` WHERE member_id= \".$res['member_id'].\" AND friend_id= \".$res['friend_id'];\n execSql($sql);\n\n $sql = \"DELETE FROM `member_friend` WHERE member_id= \".$res['friend_id'].\" AND friend_id= \".$res['member_id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}",
"public function u_friendlist( $user_id ){\n\t\t$sql =\t\"SELECT c_users.user_id, c_friends.friend_id, firstname, lastname, middlename, be_friends,request_to FROM cool_users AS c_users\n\t\t\t\tINNER JOIN cool_users_friends AS c_friends ON c_users.user_id =\n\t\t\t\t(\n\t\t\t\t CASE WHEN c_users.user_id IN (SELECT friend_id \n\t\t\t\tFROM cool_users_friends WHERE user_id = $user_id ) then c_users.user_id\n\t\t\t\t WHEN c_users.user_id IN (SELECT user_id \n\t\t\t\tFROM cool_users_friends WHERE friend_id = $user_id ) then c_users.user_id end\n\t\t\t\t)\n\t\t\t\tWHERE c_friends.friend_id= \n\t\t\t\t(\n\n\t\t\t\tCASE WHEN c_users.user_id IN (SELECT friend_id \n\t\t\t\tFROM cool_users_friends WHERE user_id = $user_id ) then c_users.user_id\n\t\t\t\tWHEN c_users.user_id IN (SELECT user_id\n\t\t\t\tFROM cool_users_friends WHERE friend_id = $user_id ) then $user_id end\n\t\t\t\t) AND c_friends.user_id = \n\t\t\t\t( \n\t\t\t\tCASE WHEN c_users.user_id IN (SELECT user_id\n\t\t\t\tFROM cool_users_friends WHERE friend_id = $user_id ) then c_users.user_id\n\t\t\t\tWHEN c_users.user_id IN (SELECT friend_id\n\t\t\t\tFROM cool_users_friends WHERE user_id = $user_id ) then $user_id \n\t\t\t\tend\n\t\t\t\t)\";\n\t\t\t\treturn $this->query($sql);\n\t}"
] | [
"0.6385278",
"0.627395",
"0.6115488",
"0.6075004",
"0.607336",
"0.59694046",
"0.5966418",
"0.5937028",
"0.59320205",
"0.5930388",
"0.5854676",
"0.5848173",
"0.5801219",
"0.57924646",
"0.5789029",
"0.5776227",
"0.5754267",
"0.5721999",
"0.5718345",
"0.57091075",
"0.57048243",
"0.5695088",
"0.5690987",
"0.5687789",
"0.5684643",
"0.5665224",
"0.5628248",
"0.5619766",
"0.56120914",
"0.56081325",
"0.5597076",
"0.5593086",
"0.5578542",
"0.5553554",
"0.55518913",
"0.5548747",
"0.554866",
"0.55484504",
"0.5536436",
"0.5511665",
"0.55008096",
"0.5492576",
"0.5476285",
"0.5469398",
"0.54410666",
"0.5439012",
"0.54388946",
"0.54383254",
"0.5434126",
"0.5432632",
"0.54310906",
"0.54309916",
"0.5427632",
"0.54216623",
"0.54106325",
"0.54042023",
"0.54024446",
"0.538952",
"0.5386331",
"0.5382764",
"0.53798664",
"0.53774977",
"0.53660274",
"0.53604305",
"0.535575",
"0.53519326",
"0.5337257",
"0.53308463",
"0.53229386",
"0.53218824",
"0.5321046",
"0.53200233",
"0.5316299",
"0.53127754",
"0.53120583",
"0.5305923",
"0.53022563",
"0.52968264",
"0.52942795",
"0.52905613",
"0.52883774",
"0.5279428",
"0.5278117",
"0.5277837",
"0.5267656",
"0.5259813",
"0.5259315",
"0.52591556",
"0.5244233",
"0.5241562",
"0.5241213",
"0.524039",
"0.5233781",
"0.5232709",
"0.52316445",
"0.523154",
"0.523014",
"0.5226725",
"0.5226483",
"0.521312",
"0.5211426"
] | 0.0 | -1 |
Create a new bug | public function create() {
$this->operationsModel->create($_POST);
$this->response('',200,'Success');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return view('bug.create');\n }",
"public function actionCreate()\n {\n $model = new BugReport();\n $uploadForm = new UploadForm();\n $model->reporter_id = Yii::$app->user->id;\n $model->status = '1';\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', 'Yeah! It is! Bug №' . $model->bug_id . ' was added successfully!');\n return $this->redirect(['bug-report/index', 'id' => $model->project_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'uploadForm' => $uploadForm,\n ]);\n }",
"public function create()\n {\n return view('bug.create', ['levels' => self::getLevels()]);\n }",
"public static function create($projectID, $description, $bugs)\n {\n $query = \"INSERT INTO changelog (userID, projectID, description, changeDate) VALUES ('\" . unserialize($_SESSION['user'])->getID() . \"', '\" . $projectID . \"', '\" . mysql_real_escape_string($description) . \"', NOW())\";\n $res = mysql_query($query)or die(Helper::SQLErrorFormat(mysql_error(), $query, __METHOD__, __FILE__, __LINE__));\n \n $changeID = mysql_insert_id();\n\n foreach($bugs as $key => $value)\n {\n $query = \"INSERT INTO changelog_bug_relation (changeID, bugID) VALUES ('$changeID', '$value')\";\n $res = mysql_query($query)or die(Helper::SQLErrorFormat(mysql_error(), $query, __METHOD__, __FILE__, __LINE__));\n\n $bug = Bug::getBugByID((int) $value);\n\n Bug::change($bug->getID(), $bug->getPriority()->getID(), $bug->getTitle(), $bug->getDescription(), $bug->getAssignedToUser()->getID(), 100, Status::FIXED, true);\n }\n return $changeID;\n }",
"public function testCreateIssueMutation()\n {\n $query = file_get_contents(__DIR__ . '/Issue/Mutation/createIssueMutation.gql');\n $base64 =$this->getBase64ImageString();\n $headers = $this->getRandomUserHeaders();\n $variables = [\n \"title\" => \"创建一个问题\",\n \"background\" => \"HelloWorld\",\n ];\n\n $this->runGuestGQL($query, $variables, $headers);\n\n //创建戴图片的问题\n $variables = [\n \"title\" => \"创建一个问题\",\n \"background\" => \"HelloWorld\",\n 'cover_image'=>$base64\n ];\n\n $this->runGuestGQL($query, $variables, $headers);\n }",
"function Debug($bug){\n\tMagratheaDebugger::Instance()->Add($bug);\n}",
"function submitNewBug2Remine( $bugReport, $submitResult) {\n\t$myFile = \"_newBug.json\";\r\n\t$fh = fopen($myFile, 'w') or die(\"can't open file\");\n\t\n\t$description = '\\\\nOS: '.$bugReport['os'].'\\nCytoscape version: '.$bugReport['cyversion'].'\\\\n\\\\n'.$bugReport['description'];\n\t\n\tif ($submitResult != null){\n\t\t$description = $description.\"\\\\n\\\\n\\\\nAttached file is at \".$submitResult.\"\\\\n\\\\n\\\\n\";\n\t}\n\n\t$description = $description.'\\\\n\\\\n\\\\nReported by: '.$bugReport['name']; //.'\\nE-mail: '.$bugReport['email'];\r\n\t\t\n\t$json = \t\n\t\t\"{\r\n\t\t\t\t\\\"issue\\\": {\r\n\t\t\t\t\\\"project_id\\\": \\\"cytoscape3\\\",\r\n\t\t\t\t\\\"subject\\\": \\\"\".clean_unwanted_characters($bugReport['cysubject']).\"\\\",\r\n\t\t\t\t\\\"description\\\": \\\"\".clean_unwanted_characters($description).\"\\\"\r\n\t\t\t\t}\r\n\t\t}\";\t\n\t\n\t\t\n\tfwrite($fh, $json);\n\t\t\n\tfclose($fh);\n\t\n\t// submit the new bug to redmine (Cytosape bug tracker)\r\n\tsystem(\"./run_curl.sh > _reportOutput.txt\");\n}",
"public function store(BugCreateRequest $request)\n {\n $bug = $this->bugRepository->store($request->all());\n $users = User::where('admin', '1')->get();\n\n foreach ($users as $user) {\n Mail::to($user)->queue(new BugCreated($bug));\n }\n\n return redirect('/bug')->withOk(\"Le bug \" . $bug->title . \" a été créé.\");\n }",
"function updateBug($bug_id, $bug_data) {\r\n\techo \"update the bug -- bug_id = $bug_id by adding a test note\";\r\n\taddBugNote($bug_id, $bug_data);\r\n}",
"function process_ch8bt_bug() {\r\n\t// Check if user has proper security level\r\n\tif ( !current_user_can( 'manage_options' ) ) {\r\n\t\twp_die( 'Not allowed' );\r\n\t}\r\n\r\n\t// Check if nonce field is present for security\r\n\tcheck_admin_referer( 'ch8bt_add_edit' );\r\n\tglobal $wpdb;\r\n\r\n\t// Place all user submitted values in an array\r\n\t$bug_data = array();\r\n\t$bug_data['bug_title'] = ( isset( $_POST['bug_title'] ) ? sanitize_text_field( $_POST['bug_title'] ) : '' );\r\n\t$bug_data['bug_description'] = ( isset( $_POST['bug_description'] ) ? sanitize_text_field( $_POST['bug_description'] ) : '' );\r\n\t$bug_data['bug_version'] = ( isset( $_POST['bug_version'] ) ? sanitize_text_field( $_POST['bug_version'] ) : '' );\r\n\r\n\t// Set bug report date as current date\r\n\t$bug_data['bug_report_date'] = date( 'Y-m-d' );\r\n\r\n\t// Set status of all new bugs to 0 (Open)\r\n\t$bug_data['bug_status'] = ( isset( $_POST['bug_status'] ) ? intval( $_POST['bug_status'] ) : 0 );\r\n\r\n\t// Call the wpdb insert or update method based on value\r\n\t// of hidden bug_id field\r\n\tif ( isset( $_POST['bug_id'] ) && 0 == $_POST['bug_id'] ) {\r\n\t\t$wpdb->insert($wpdb->get_blog_prefix() . 'ch8_bug_data', $bug_data );\r\n\t} elseif ( isset( $_POST['bug_id'] ) && $_POST['bug_id'] > 0 ) {\r\n\t\t$wpdb->update( $wpdb->get_blog_prefix() . 'ch8_bug_data', $bug_data, array( 'bug_id' => $_POST['bug_id'] ) );\r\n\t}\r\n\r\n\t// Redirect the page to the admin form\r\n\twp_redirect( add_query_arg( 'page', 'ch8bt-bug-tracker', admin_url( 'options-general.php' ) ) );\r\n\texit;\r\n}",
"function Info($bug){\n\tMagratheaDebugger::Instance()->Info($bug);\n}",
"function getBugByID ($bug_id)\n {\n return DBUtil::selectObjectByID ('mantis_bug_table', $bug_id);\n }",
"public function createIssue( $data )\n\t{\n\t\t$this->issue->create([\n\t\t\t'name' => $data['name'],\n\t\t\t'slug' => $data['slug'],\n\t\t\t'description' => $data['description'],\n\t\t\t'product_id' => $data['productId'],\n\t\t\t'issue_stage_id' => 1,\n\t\t\t'issue_status' => 0\n\t\t]);\n\t}",
"public function testLoadExistingBug() {\n\n $session = $this->getSampleProjectSession(true);\n\n $bug = $session->find('sample_Bug bug')->filterBy('bugId', 521152)->one();\n\n $this->assertEquals('Existing Bug', $bug->title);\n $this->assertEquals('This bug existed from the time the database was created', $bug->body);\n\n $this->assertEquals('existingUser', $bug->reporter->name, 'Reporter');\n $this->assertEquals('existingManager', $bug->owner->name, 'Owner');\n\n $this->assertEquals('Existing Project', $bug->project->name, 'Bug\\'s Project\\'s name does not match');\n $this->assertEquals('existingManager', $bug->project->manager->name, 'Manager');\n\n $this->assertEquals('Existing Bug', $bug->project->bugs[0]->title);\n\n $bug2 = $session->execute(\n 'FROM sample_Bug bug WHERE bug.bugId = :bugId',\n array('bugId' => 521152)\n )->one();\n\n $this->assertEquals(521152, $bug2->bugId);\n\n $bug3 = $session->execute(\n 'FROM sample_Bug WHERE bugId = :bugId',\n array('bugId' => 521152)\n )->one();\n\n $this->assertEquals(521152, $bug3->bugId);\n\n $bug4 = $session->find('sample_Bug')->filterBy('bugId', 521152)->one();\n $this->assertEquals(521152, $bug4->bugId);\n \n // We want to add another user that sorts to the top so that we can\n // be more certain that our order by and limit actions are working\n // as we expect.\n $topUser = new sample_User('000zero');\n $topUser = $session->add($topUser);\n $session->flush();\n \n $users = $session->find('sample_User')->orderBy('name')->all();\n $this->assertEquals(6, count($users));\n\n $users = $session->find('sample_User')->orderBy('name')->limit(1)->offset(4)->all();\n $this->assertEquals(1, count($users));\n $this->assertEquals('firstUser', $users[0]->name);\n \n }",
"public function destroy(Bug $bug)\n {\n //\n }",
"public static function create_comment($input, $project, $issue)\n\t{\n\t\t$config_app = require path('public') . 'config.app.php';\n\t\tif (!isset($config_app['Percent'])) { $config_app['Percent'] = array (100,0,10,80,100); }\n\t\trequire \"tag.php\";\n\t\t$fill = array(\n\t\t\t'created_by' => \\Auth::user()->id,\n\t\t\t'project_id' => $project->id,\n\t\t\t'issue_id' => $issue->id,\n\t\t\t'comment' => $input['comment'],\n\t\t);\n\n\t\t$comment = new static;\n\t\t$comment->fill($fill);\n\t\t$comment->save();\n\n\t\t/* Add to user's activity log */\n\t\t\\User\\Activity::add(2, $project->id, $issue->id, $comment->id);\n\t\t$vide = true;\n\t\t$Val = ($input['Pourcentage'] > $config_app['Percent'][3]) ? 8: (($input['Pourcentage'] == 100 ) ? 2: 9);\n\t\tif(!empty($issue->tags)):\n\t\t\tforeach($issue->tags()->order_by('tag', 'ASC')->get() as $tag):\n\t\t\t\tif ($Val == $tag->id) { $vide = false; }\n\t\t\tendforeach;\n\t\tendif;\n\t\tif ($vide) { Tag::addNew_tags($issue->id, $Val); }\n\n\t\t/* Add attachments to issue */\n\t\t\\DB::table('projects_issues_attachments')->where('upload_token', '=', $input['token'])->where('uploaded_by', '=', \\Auth::user()->id)->update(array('issue_id' => $issue->id, 'comment_id' => $comment->id));\n\n\t\t/* Update the Todo state for this issue */\n\t\t//\\DB::table('users_todos')->where('issue_id', '=', $issue->id)->update(array('user_id' => \\Auth::user()->id, 'status' => (($input['Pourcentage'] > $config_app['Percent'][3]) ? 3: 2), 'weight' => $input['Pourcentage'], 'updated_at'=>date(\"Y-m-d H:m:s\")));\n\t\t\\DB::table('users_todos')->where('issue_id', '=', $issue->id)->update(array('status' => (($input['Pourcentage'] > $config_app['Percent'][3]) ? 3: 2), 'weight' => $input['Pourcentage'], 'updated_at'=>date(\"Y-m-d H:m:s\")));\n\n\t\t/* Update the status of this issue according to its percentage done; */\n\t\t\\DB::table('projects_issues')->where('id', '=', $issue->id)->update(array('closed_by' => (($input['Pourcentage'] == 100 ) ? \\Auth::user()->id : NULL), 'status' => (($input['Pourcentage'] == 100 )? 0 : 1),'status' => (($input['Pourcentage'] == 100 )? 0 : 1)));\n\n\t\t/*Update tags attached to this issue */\n\t\t$MesTags = explode(\",\", $input[\"MesTags\"]);\n\t\t$IDtags = array();\n\t\tforeach($MesTags as $val) {\n\t\t\tforeach(\\Tag::where('tag', '=', $val)->get(\"id\",\"tag\") as $activity) {\n\t\t\t\t$Idtags[] = $activity->id;\n\t\t\t}\n\t\t}\n\t\tif (isset($Idtags)) {\n\t\t$issue->tags()->sync($Idtags);\n\t\t$issue->save();\n\t\t}\n\n\t\t/* Update the project */\n\t\t$issue->updated_at = date('Y-m-d H:i:s');\n\t\t$issue->updated_by = \\Auth::user()->id;\n\t\t$issue->save();\n\t\tif ($input['Pourcentage'] == 100 ) {\n\t\t\t$tags = $issue->tags;\n\t\t\t$tag_ids = array();\n\t\t\tforeach($tags as $tag) { $tag_ids[$tag->id] = $tag->id; }\n\t\t\t$issue->closed_by = \\Auth::user()->id;\n\t\t\t$issue->closed_at = date('Y-m-d H:i:s');\n\n\t\t\t/* Update tags */\n\t\t\t$tag_ids[2] = 2;\n\t\t\tif(isset($tag_ids[1])) { unset($tag_ids[1]); }\n\t\t\tif(isset($tag_ids[8])) { unset($tag_ids[8]); }\n\t\t\tif(isset($tag_ids[9])) { unset($tag_ids[9]); }\n\n\t\t\t/* Add to activity log */\n\t\t\t\\User\\Activity::add(3, $issue->project_id, $issue->id);\n\t\t\t$issue->tags()->sync($tag_ids);\n\t\t\t$issue->status = 0;\n\t\t\t$issue->save();\n\t\t}\n\n\t\t/*Notifications by email to those who concern */\n\t\t$project = \\Project::current();\n\t\t$subject = sprintf(__('email.new_comment'), $issue->title, $project->name);\n\t\t$text = \\View::make('email.commented_issue', array(\n\t\t\t\t'actor' => \\Auth::user()->firstname . ' ' . \\Auth::user()->lastname,\n\t\t\t\t'project' => $project,\n\t\t\t\t'issue' => $issue,\n\t\t\t\t'comment' => $comment->comment\n\t\t\t));\n\n\t\t/* Notify the person to whom the issue is currently assigned, unless that person is the one making the comment */\n\t\tif($issue->assigned_to && $issue->assigned_to != \\Auth::user()->id && (!empty($issue->assigned->email))) {\n \t\t\t\\Mail::send_email($text, $issue->assigned->email, $subject);\n\t\t}\n\n\t\t/* Notify the person who created the issue, unless that person is the one making the comment */\n\t\tif($issue->created_by && $issue->created_by != \\Auth::user()->id && (!empty($issue->user->email))) {\n\t\t\t\\Mail::send_email($text, $issue->user->email, $subject);\n\t\t}\n\n\t\treturn $comment;\n\t}",
"public function run()\n {\n\n Bug::create([\n 'title' => 'Incidencia 1',\n 'description' => 'Descripcion incidencia 1',\n 'severity' => 'M',\n //'category_id' = ,\n 'project_id' => 1,\n 'level_id' => 1,\n 'client_id' => 2\n //'support_id' = 2\n ]);\n\n Bug::create([\n 'title' => 'Incidencia 2',\n 'description' => 'Descripcion incidencia 2',\n 'severity' => 'N',\n 'category_id' => 2,\n 'project_id' => 2,\n 'level_id' => 2,\n 'client_id' => 3\n //'support_id' = ,\n ]);\n\n Bug::create([\n 'title' => 'Incidencia 3',\n 'description' => 'Descripcion incidencia 3',\n 'severity' => 'A',\n 'category_id' => 1,\n 'project_id' => 1,\n 'level_id' => 1,\n 'client_id' => 4,\n 'support_id' => 2,\n ]);\n\n Bug::create([\n 'title' => 'Incidencia 4',\n 'description' => 'Descripcion incidencia 4',\n 'severity' => 'M',\n 'category_id' => 4,\n 'project_id' => 2,\n 'level_id' => 2,\n 'client_id' => 5,\n 'support_id' => 3,\n ]);\n\n Bug::create([\n 'title' => 'Incidencia 5',\n 'description' => 'Descripcion incidencia 5',\n 'severity' => 'A',\n 'category_id' => 3,\n 'project_id' => 1,\n 'level_id' => 1,\n 'client_id' => 2\n //'support_id' = ,\n ]);\n\n Bug::create([\n 'title' => 'Incidencia 6',\n 'description' => 'Descripcion incidencia 6',\n 'severity' => 'M',\n //'category_id' = ,\n 'project_id' => 2,\n 'level_id' => 2,\n 'client_id' => 4,\n 'support_id' => 2\n ]);\n }",
"function printBugData($bugData){\r\n\t//echo \"build = \", $bugData->build;\r\n\t//echo \"platform = \", $bugData->platform;\r\n\techo \"os = \", $bugData->os;\r\n\techo \"os_build = \", $bugData->os_build;\r\n\techo \"version = \", $bugData->version;\r\n\t//echo \"profile_id = \", $bugData->profile_id;\r\n\t//echo \"handler_id = \", $bugData->handler_id;\r\n\techo \"view_state = \", $bugData->view_state;\r\n\techo \"category = \", $bugData->category;\r\n\t//echo \"severity = \", $bugData->severity;\r\n\t//echo \"priority = \",$bugData->priority;\r\n\techo \"summary = \", $bugData->summary;\r\n\techo \"description = \", $bugData->description;\r\n\techo \"steps_to_reproduce = \", $bugData->steps_to_reproduce;\r\n\techo \"additional_information = \", $bugData->additional_information;\r\n\t//echo \"f_file = \", \"\";\r\n\t//echo \"f_report_stay = \", ;\r\n\techo \"project_id = \", $bugData->project_id;\r\n\t//echo \"target_version = \", $bugData->target_version;\r\n}",
"public function show(Bug $bug)\n {\n //\n }",
"public function testCreateFailure()\n {\n FactoryGirl::create('Bar');\n }",
"function section_bugs() {\r\n\t\tprint \"<ul id='admin-section-bug-wrap'>\";\r\n\t\tprint \"<li><p>If you have found a bug in this plugin, please open a new <a id='framework-bug' href='https://github.com/OneManOneLaptop/\" . $this->slug . \"/issues/' target='_blank' style=''>Github Issue</a>.</p><p>Describe the problem clearly and where possible include a reduced test case.</p></li>\";\r\n\t\tprint \"</ul>\"; \r\n\t}",
"public function store(BugReportRequest $request)\n {\n $bug = new Bug();\n\n $bug->level = $request->input('level');\n $bug->title = $request->input('title');\n $bug->page = $request->input('page');\n $bug->detail = $request->input('detail', 'NULL');\n\n $bug->save();\n\n return redirect()->route('bug.list');\n }",
"function insertBugTrace($UUID, $data, $debugInfo) {\n\tob_start();\n\t//$firephp = FirePHP::getInstance(true);\n\t//$firephp->log(\"insertBugTrace entered.\");\n\t$time = time();\n\t$fullTrace = \"$data\\n<!-- $debugInfo -->\";\n\t$filename = \"bugtraces/$time\" . \"_\" . $UUID . \".xml\";\n\t// $firephp->log(\"putting bug trace ($filename) to disk: $fullTrace\");\n\t//$firephp->log(\"putting bug trace ($filename) to disk.\");\n file_put_contents($filename, $fullTrace);\n}",
"public function createChangeLog() {}",
"public function bugs()\n {\n return $this->hasMany('App\\Bug');\n }",
"public function edit(Bug $bug)\n {\n //\n }",
"public function store(Request $request)\n {\n $this->log(__CLASS__, __FUNCTION__, $request, \"添加 BUG\");\n $data = $this->get_params($request, ['title','content','desc']);\n SysBug::create($data);\n\n //发送通知\n $data = [\n 'mode' => 1,\n 'user' => 1,\n 'title' => \"bug提交\",\n 'type' => 3,\n 'content' => '有一个新的bug提交',\n 'add_time' => date('Y-m-d H:i:s',time())\n ];\n SysMessage::create($data);\n\n\n return $this->ajax_return(200, '操作成功!');\n }",
"public function newItem() \t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n { $this->autorender = false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n \t\t$this->layout = null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n \t $this->render('ajax');\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $params = json_decode(file_get_contents('php://input'),true); //\n $thisItem=$params['fullData'];\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t//\n Controller::loadModel('Bugs');\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t $data = array();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $data['Bugs']['parentid'] = 0; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $data['Bugs']['bugorfeature'] = $thisItem['type']; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $data['Bugs']['fileid'] = 0; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $data['Bugs']['dataObject'] = json_encode($thisItem['dataObject']); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $data['Bugs']['userid']=$this->Auth->user('id');\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $data['Bugs']['user']=$this->Auth->user('username');\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $data['Bugs']['status'] = 0; \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $this->Bugs->create();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $this->Bugs->save($data);\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\n $lastid=$this->Bugs->getLastInsertID();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t//\n $bugData=$this->Bugs->find('first', array('conditions' => array('id' => $lastid))); //\n echo(json_encode($bugData)); //\n }",
"public function testFlagCreationComment()\n {\n $flagCreated = new Flag;\n\n $flagCreated->NarrativeID = NULL;\n $flagCreated->CommentID = 1;\n $flagCreated->Comment = \"Test\";\n\n $flagCreated->save();\n\n $insertedId = $flagCreated->FlagID;\n\n $flagFetched = Flag::find($insertedId);\n\n $this->assertEquals(NULL, $flagFetched->NarrativeID);\n $this->assertEquals(1, $flagFetched->CommentID);\n $this->assertEquals(\"Test\", $flagFetched->Comment);\n\n $flagFetched->delete();\n\n $flagFetched = Flag::find($insertedId);\n\n $this->assertNull($flagFetched);\n\n }",
"public function create_solution_serial($solution_name) {\n \n \n \n \n $serial_collumn = array(\n 'Id' =>array('type' => 'bigint','constraint'=>10,\n 'auto_increment' => TRUE,'unsigned'=>true),\n 'serial' => array('type' => 'VARCHAR',\n 'constraint'=>36),\n 'hwfingerprint' => array('type' => 'VARCHAR',\n 'constraint'=>36,'null' => true),\n 'expirationdate' => array('type' => 'date'),\n 'period' => array('type' => 'int','constraint'=>11),\n 'lictype' => array('type' => 'varchar','constraint'=>10),\n 'status' => array('type' => 'varchar','constraint'=>1),\n 'description' => array('type' => 'varchar','constraint'=>255));\n $this->dbforge->add_field($serial_collumn);\n $this->dbforge->add_key('Id',TRUE);\n if($this->dbforge->create_table($solution_name.'_serials', TRUE)){\n \n return true;\n }else{return false;}\n \n \n \n }",
"public function create($project, CreateIssueRequest $request)\n {\n $issue = new Issue();\n $issue->hidden \t = $request->has('hidden');\n $issue->author_id = Auth::user()->id;\n $issue->project_id = $project->id;\n $issue->summary = $request->summary;\n $issue->priority = 'Medium';\n $issue->version\t\t= $project->current_version;\n $issue->reference = $request->reference;\n $issue->description = $request->description;\n\n if($request->assigned == '1') {\n $groupid = Group::where('name', '=', 'Client')->first()->id;\n $issue->status = 'Awaiting Client';\n $issue->assigned_to_id = $groupid;\n } else {\n $groupid = Group::where('name', '=', 'Sponge UK')->first()->id;\n $issue->status = 'New';\n $issue->assigned_to_id = $groupid;\n }\n $result = $issue->save();\n\n if($request->file('attachment')) {\n $attachment = $request->file('attachment');\n $file = array(\n \"filename\" => $attachment->getClientOriginalName(),\n \"extension\" => $attachment->getClientOriginalExtension(),\n \"filetype\" => $attachment->getMimeType()\n );\n $attachment->move(\"uploads/tmp\", $file['filename']);\n $this->dispatch(new AddAttachmentCommand($file, $issue->id, Auth::user()->id));\n }\n\n if($result) {\n $update = new IssueHistory();\n $update->hidden = false;\n $update->project_id = $issue->project->id;\n $update->issue_id = $issue->id;\n $update->author_id = $issue->author->id;\n $update->type = 'status';\n $update->status = 'created';\n $update->comment = 'Amendment was created';\n $update->save();\n }\n\n return $issue->id;\n }",
"function post_solution_simple($puznid, $uid, $sequence, $title) {\n $node->type = 'solution';\n $node->status = 1;\n $node->uid = $uid;\n $node->title = $title; \n\n $node->comment = 2;\n $node->field_sequence[0]['value'] = $sequence;\n $node->field_puzzle_ref_solution[0]['nid'] = $puznid;\n $node->field_solution_submitted_round[0]['value'] = 1;\n //$node->field_solution_cloud_round[0]['value'] = $puzzle_node->field_puzzle_cloud_round[0]['value']; \n $node->created = time();\n node_save($node);\n }",
"protected function setUp() {\n\t$this->object = new Bug(1);\n }",
"public function create()\n {\n throw new Exception('Not yet implemented');\n }",
"public function create()\n {\n return view('fixes.create');\n }",
"protected function file_these(array $bugs_to_file, $form_input) {\n $success = array();\n $filing = array();\n foreach ($bugs_to_file as $bug_to_file) {\n try {\n $filing = Filing::factory($bug_to_file, $form_input, $this->bugzilla_client);\n $filing->file();\n $bug_link = sprintf(\"<a href=\\\"%s/show_bug.cgi?id=%d\\\" target=\\\"_blank\\\">bug %d</a>\",\n $this->bugzilla_client->config('bugzilla_url'),\n $filing->bug_id,\n $filing->bug_id\n );\n Client::messageSend(\n str_replace(\n array('{label}','{bug}'),\n array($filing->label, $bug_link),\n $filing->success_message),\n E_USER_NOTICE\n );\n $success[] = $filing->bug_id;\n } catch (Exception $e) {\n /**\n * Timed out session most likely\n */\n if($e->getCode()==Filing::EXCEPTION_AUTHENTICATION_FAILED) {\n client::messageSend('Authentication Failed, need to re-login', E_USER_ERROR);\n $this->request->redirect('authenticate/login');\n /**\n * either the supplied $submitted_data to the Filing instance\n * was missing or construct_content() method of the Filing\n * instance tried to access a submitted content key that did\n * not exist.\n */\n } else if($e->getCode()==Filing::EXCEPTION_MISSING_INPUT) {\n Kohana_Log::instance()->add('error',__METHOD__.\" {$e->getMessage()}\");\n Client::messageSend('Missing required input to build this Bug', E_USER_ERROR);\n /**\n * bug was constructed successfully but we got an error back\n * when we sent it to Bugzilla\n */\n } else if($e->getCode()==Filing::EXCEPTION_BUGZILLA_INTERACTION) {\n Kohana_Log::instance()->add('error',__METHOD__.\" {$e->getMessage()}\");\n Client::messageSend(\"There was an error communicating \"\n .\"with the Bugzilla server for Bug \\\"{$filing->label}\\\": {$e->getMessage()}\", E_USER_ERROR);\n /**\n * something happend, log it and toss it\n */\n } else {\n Kohana_Log::instance()->add('error',__METHOD__.\" {$e->getMessage()}\\n{$e->getTraceAsString()}\");\n Client::messageSend('Unknown exception when filing this bug', E_USER_ERROR);\n throw $e;\n }\n }\n }\n return $success;\n }",
"function createNote();",
"public function test_getMantisBugs_CalledWithCorrectParameters_returnCorrectAnswer()\n {\n $bug1 = $this->prepareBug(1,\n \"No me funciona el extintor\",\n \"Si pongo boca a bajo el extintor no me funciona\",\n 'Pepito',\n \"new\");\n\n $bug2 = $this->prepareBug(2,\n \"Estoy en brasil\",\n \"O pais mais grande du mundo\",\n 'Caio',\n \"new\");\n $expected = array($bug1, $bug2);\n\n $fc = new FakeConector();\n $bugsController = new bugsController($fc);\n $this->assertEquals($expected, $bugsController->getMantisBugs(NULL));\n }",
"function TestCaseRun_create($assignee, $build_id, $case_id, $case_text_version, $environment_id, $run_id, $canview = NULL, $close_date = NULL, $iscurrent = NULL, $notes = NULL, $sortkey = NULL, $testedby = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"build_id\" => \"int\", \"case_id\" => \"int\", \"case_text_version\" => \"int\", \"environment_id\" => \"int\", \"run_id\" => \"int\", \"canview\" => \"int\", \"close_date\" => \"string\", \"iscurrent\" => \"int\", \"notes\" => \"string\", \"sortkey\" => \"int\", \"testedby\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function createNew() {\n\t}",
"public function testSimpleModelUsageWithPersistence() {\n\n $session = $this->getSampleProjectSession(true);\n\n $this->loadClass('sample_User');\n $this->loadClass('sample_Project');\n $this->loadClass('sample_Bug');\n\n $userBeau = new sample_User('beau');\n $userJosh = new sample_User('josh');\n\n $project = new sample_Project('Sample Project', $userBeau);\n\n $bug = new sample_Bug(\n $project,\n 'Something is broken',\n 'Click http://example.com/ to test!',\n $userJosh, // Reporter\n $userBeau // Owner\n );\n\n $pBug = $session->add($bug);\n\n $this->assertEquals('Something is broken', $pBug->title);\n $this->assertEquals('Click http://example.com/ to test!', $pBug->body);\n\n $this->assertEquals('josh', $pBug->reporter->name, 'Reporter');\n $this->assertEquals('beau', $pBug->owner->name, 'Owner');\n\n $this->assertEquals('Sample Project', $pBug->project->name, 'Bug\\'s Project\\'s name does not match');\n $this->assertEquals('beau', $pBug->project->manager->name, 'Manager');\n\n $this->assertEquals('Sample Project', $pBug->project->name);\n $this->assertEquals('beau', $pBug->project->manager->name, 'Manager');\n\n $this->assertEquals('beau', $pBug->owner->name);\n $this->assertEquals('josh', $pBug->reporter->name);\n\n $this->assertTrue($pBug->project->manager === $pBug->owner);\n\n $this->assertTrue($pBug->title === $pBug->project->bugs[0]->title);\n\n }",
"function newPatchFileName($bugid, $patch, $handle)\n\t{\n\t\t$id = time();\n\t\tPEAR::pushErrorHandling(PEAR_ERROR_RETURN);\n\t\t$e = $this->_dbh->prepare('INSERT INTO bugdb_patchtracker\n\t\t\t(bugdb_id, patch, revision, developer) VALUES(?, ?, ?, ?)')->execute(\n\t\t\t[$bugid, $patch, $id, $handle]);\n\t\tif (PEAR::isError($e)) {\n\t\t\t// try with another timestamp\n\t\t\t$id++;\n\t\t\t$e = $this->_dbh->prepare('INSERT INTO bugdb_patchtracker\n\t\t\t\t(bugdb_id, patch, revision, developer) VALUES(?, ?, ?, ?)')->execute(\n\t\t\t\t[$bugid, $patch, $id, $handle]);\n\t\t}\n\t\tPEAR::popErrorHandling();\n\t\tif (PEAR::isError($e)) {\n\t\t\treturn PEAR::raiseError(\"Could not get unique patch file name for bug #{$bugid}, patch \\\"{$patch}\\\"\");\n\t\t}\n\t\treturn [$id, $this->getPatchFileName($id)];\n\t}",
"public function insertFixReport($title, $coor_x, $coor_y, $user_id){\n $query = \"insert into $this->problem_tableName values( NULL, 0, '$title', '$title', $coor_x, $coor_y, $user_id, 1, NOW(), NULL, $user_id);\";\n $result = $this->dbh->query($query);\n }",
"public function create()\n {\n throw new NotImplementedException();\n }",
"public function test_create__invalid_class()\n {\n\n (new ElementFactory())->create(['attributes' => ['type' => ElementFactory::class, 'name' => '']]);\n }",
"public function create()\n {\n\t\t\n return view('issue.create',['pageData' => $this->pageData]);\n }",
"protected static function _getIbugInstance() \r\n\t{\r\n\t\tif (null === self::$_instance) {\r\n\t\t\tself::$_instance = new self();\r\n\t\t}\r\n\t\treturn self::$_instance;\r\n\t}",
"public function show(bugget $bugget)\n {\n //\n }",
"public function testCreate()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}",
"public function createTicket()\n {\n Zendesk::tickets()->create([\n 'subject' => 'Subject',\n 'comment' => [\n 'body' => 'Ticket content.'\n ],\n 'priority' => 'normal'\n ]);\n return \"success\";\n }",
"public function testCreate()\n {\n \n $response = factory(\\App\\Models\\Ticket::class)->create([\n 'name' => 'Test Ticket',\n 'email' => '[email protected]',\n 'title' => 'Test ticket title',\n 'content' => 'Test ticket content'\n ]);\n \n \n $response->assertOk();\n\n }",
"public function destroy(bugget $bugget)\n {\n //\n }",
"function setupPatchDir($bugid, $name)\n\t{\n\t\tif (file_exists($this->patchDir($bugid, $name))) {\n\t\t\tif (!is_dir($this->patchDir($bugid, $name))) {\n\t\t\t\treturn PEAR::raiseError('Cannot create patch storage for Bug #' . $bugid .\n\t\t\t\t\t', storage directory exists and is not a directory');\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (!file_exists(dirname($this->patchDir($bugid, $name)))) {\n\t\t\t// setup bug directory\n\t\t\tif (!@mkdir(dirname($this->patchDir($bugid, $name)))) {\n\t\t\t\trequire_once 'PEAR.php';\n\t\t\t\treturn PEAR::raiseError('Cannot create patch storage for Bug #' . $bugid);\n\t\t\t}\n\t\t} elseif (!is_dir(dirname($this->patchDir($bugid, $name)))) {\n\t\t\treturn PEAR::raiseError('Cannot create patch storage for Bug #' . $bugid .\n\t\t\t\t', storage directory exists and is not a directory');\n\t\t}\n\t\t// setup patch directory\n\t\tif (!@mkdir($this->patchDir($bugid, $name))) {\n\t\t\trequire_once 'PEAR.php';\n\t\t\treturn PEAR::raiseError('Cannot create patch storage for Bug #' . $bugid);\n\t\t}\n\t}",
"public function run()\n {\n factory(App\\Work::class)->create([\n 'title' => 'Paseo Boulevard',\n 'content' => 'El intendente José Corral presentó a los vecinos el proyecto de remodelación del Paseo Boulevard en febrero de 2016. Las obras de puesta en valor comprenden desde el Puente Colgante hasta Avenida Freyre, priorizan la circulación peatonal por sobre la actividad vehicular. ',\n 'action_id' => 2\n ]);\n\n factory(App\\Work::class)->create([\n 'title' => 'Remodelación de la Avenida Blas Parera',\n 'content' => 'La avenida contará con un corredor exclusivo para transporte público de pasajeros urbano y metropolitano en el centro de la traza, en ambos sentidos de circulación, además de una ciclovía. Esa avenida-ruta -que fue centro de tantos reclamos durante años- modificará completamente su fisonomía a lo largo de casi 6 km.',\n 'action_id' => 2\n ]);\n\n factory(App\\Work::class, 10)->create();\n }",
"public function create()\n { \n /** Session::forget('problem');\n Session::forget('content');\n $idea = new Idea();\n return view('ideas.create', [\n 'idea' => $idea,\n ]);\n */\n }",
"function sf_bug($number) {\n print(\"<a href=\\\"http://sourceforge.net/p/gtk-gnutella/bugs/$number/\\\">#$number</a>\");\n }",
"function create()\n {\n $query = \"INSERT INTO \n \" . $this->table_name . \"\n SET \n is_bug=:is_bug,id_startup=:id_startup ,more_info=:more_info, email=:email\";\n \n // prepare query\n $stmt = $this->conn->prepare($query);\n \n // posted values\n $this->is_bug=json_decode(utf8_decode($this->is_bug));\n $this->id_startup=json_decode(utf8_decode($this->id_startup));\n $this->more_info=json_decode(utf8_decode($this->more_info));\n $this->email=json_decode(utf8_decode($this->email));\n \n // bind values\n $stmt->bindParam(\":is_bug\", $this->is_bug);\n $stmt->bindParam(\":id_startup\", $this->id_startup);\n $stmt->bindParam(\":more_info\", $this->more_info);\n $stmt->bindParam(\":email\", $this->email);\n \n // execute query\n if($stmt->execute()) {\n return true;\n } else {\n echo \"<pre>\";\n print_r($stmt->errorInfo());\n echo \"</pre>\";\n \n return false;\n }\n }",
"public function create()\n {\n return view('issues.create');\n }",
"public function create()\n\t\t{\n\t\t\t//\n\t\t}",
"public function create()\n\t\t{\n\t\t\t//\n\t\t}",
"public function create()\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function createJail();",
"public function create()\n\t {\n\t //\n\t }",
"public function createDuplicate();",
"public function createAction()\n {\n $issue = new Issue();\n $request = $this->getRequest();\n $form = $this->createForm(new IssueType(), $issue);\n $form->submit($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($issue);\n $em->flush();\n\n return $this->redirect($this->generateUrl('issue_show', array('id' => $issue->getId())));\n \n }\n\n return array(\n 'issue' => $issue,\n 'form' => $form->createView()\n );\n }",
"public function run()\n {\n $prio = array('laag', 'gemiddeld', 'hoog' , 'kritisch');\n $status = array('open', 'gesloten');\n $soort = array('lay-out','seo','performance', 'code');\n $i = rand(0,3);\n $x = rand(0,3);\n $y = rand(0,1);\n DB::table('bugs')->insert([\n 'project_id' => rand(11,990),\n 'titel' => str_random(10),\n 'status' => $status[$y],\n 'prioriteit' => $prio[$x],\n 'soort' => $soort[$i],\n 'beschrijving' => str_random(140),\n 'klant_id' => rand(10,99),\n 'project_id' => rand(10,99),\n 'medewerker_id' => rand(10,99),\n ]);\n\n }",
"public function create()\n\t{\n\n\n\t\t//\n\t}",
"private function runComment()\n {\n $num = (int) $this->ask('How many records do you want to create for the comments table?');\n factory(Comment::class, $num)->create();\n }",
"public function create($comment)\n {\n\n }",
"public function create()\n {\n return view('admin.bookIssue.create');\n }",
"public function create($id)\n {\n $test_id = $id;\n return view('problems.create', ['test_id' => $test_id]);\n }",
"public function create()\r\n\t{\r\n\t\t//\r\n\t}",
"function ticketCreate($creator, $cat, $topic, $text)\r\n{\r\n\tglobal $db, $_cfg;\r\n\tif (!is_array($creator))\r\n\t{\r\n\t\t$usr = opReadUser($creator);\r\n\t\tif (!$usr)\r\n\t\t\treturn 'user_not_found';\r\n\t\t$creator = array('uID' => $creator, 'Name' => $usr['aName'], 'Mail' => $usr['uMail']);\r\n\t}\r\n//\tif (!validMail($frommail))\r\n//\t\treturn 'mail_wrong';\r\n\tif (!$topic)\r\n\t\treturn 'topic_empty';\r\n\tif (!$text)\r\n\t\treturn 'text_empty';\r\n\t$tid = $db->insert('Tickets', array(\r\n\t\t'tuID' => $creator['uID'],\r\n\t\t'tTS' => timeToStamp(),\r\n//\t\t'tTID' => ???,\r\n\t\t'tName' => $creator['Name'],\r\n\t\t'tMail' => $creator['Mail'],\r\n\t\t'tCat' => $cat,\r\n\t\t'tTopic' => $topic,\r\n\t\t'tText' => $text,\r\n\t\t'tPriority' => 1,\r\n\t\t'tState' => 1,\r\n\t\t'tLTS' => timeToStamp()\r\n\t));\r\n\t$creator['id'] = $tid;\r\n\t$creator['topic'] = $topic;\r\n\t$creator['text'] = $text;\r\n\t$creator['url'] = fullURL(moduleToLink('tickets/admin/ticket'));\r\n\tsendMailToAdmin('NewTicket', $creator);\r\n\treturn $tid;\r\n}",
"public function create()\n\t{ \n \n\t}",
"public function create()\n {\n //\n ;\n }",
"public function create() {\n //not implemented\n }",
"public function createNew();",
"protected function create() {\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}",
"public function create()\n\t{\n\t\t//\n\t}"
] | [
"0.6431337",
"0.6357885",
"0.6187069",
"0.59068686",
"0.5887191",
"0.5845717",
"0.5677965",
"0.5677239",
"0.56608456",
"0.56126624",
"0.55801684",
"0.55487925",
"0.5529405",
"0.5526376",
"0.5491195",
"0.54613173",
"0.5441347",
"0.54365516",
"0.54258657",
"0.5399503",
"0.5390305",
"0.53858536",
"0.5369551",
"0.5368977",
"0.5353104",
"0.53464955",
"0.5296413",
"0.52934015",
"0.52867514",
"0.526275",
"0.52387583",
"0.5232294",
"0.5189052",
"0.5152993",
"0.5136978",
"0.51340175",
"0.5130708",
"0.51107305",
"0.5110344",
"0.51098096",
"0.51062113",
"0.5104143",
"0.5100668",
"0.50990874",
"0.50958127",
"0.5092963",
"0.50835234",
"0.50644356",
"0.50635654",
"0.5040149",
"0.50388175",
"0.5025863",
"0.5018238",
"0.50002426",
"0.49947974",
"0.4992286",
"0.49818558",
"0.49728644",
"0.4953929",
"0.4953929",
"0.4941519",
"0.49395975",
"0.4933901",
"0.49267837",
"0.4926639",
"0.49258655",
"0.49256474",
"0.49180275",
"0.49159575",
"0.49131706",
"0.49081668",
"0.4905541",
"0.49019673",
"0.49008727",
"0.4895711",
"0.48912895",
"0.48883212",
"0.48876607",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378",
"0.4887378"
] | 0.0 | -1 |
Return the bug details for edit popup | public function details() {
try {
$details = $this->operationsModel->details($_POST['bugId']);
if($details) {
$this->response($details,200,'Success');
} else {
$this->response('',204,'Error');
}
} catch(Exception $ex) {
$this->response('',500,'Error');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Bug $bug)\n {\n //\n }",
"public function edit(bugget $bugget)\n {\n //\n }",
"public function edit($bug)\n {\n try {\n $bug = Bug::findOrFail($bug);\n } catch (ModelNotFoundException $e) {\n return redirect()->route('bug.list');\n }\n\n return view('bug.edit', compact('bug'));\n }",
"public function edit(SysBug $sysBug)\n {\n //\n }",
"public function show(bugget $bugget)\n {\n //\n }",
"function process_ch8bt_bug() {\r\n\t// Check if user has proper security level\r\n\tif ( !current_user_can( 'manage_options' ) ) {\r\n\t\twp_die( 'Not allowed' );\r\n\t}\r\n\r\n\t// Check if nonce field is present for security\r\n\tcheck_admin_referer( 'ch8bt_add_edit' );\r\n\tglobal $wpdb;\r\n\r\n\t// Place all user submitted values in an array\r\n\t$bug_data = array();\r\n\t$bug_data['bug_title'] = ( isset( $_POST['bug_title'] ) ? sanitize_text_field( $_POST['bug_title'] ) : '' );\r\n\t$bug_data['bug_description'] = ( isset( $_POST['bug_description'] ) ? sanitize_text_field( $_POST['bug_description'] ) : '' );\r\n\t$bug_data['bug_version'] = ( isset( $_POST['bug_version'] ) ? sanitize_text_field( $_POST['bug_version'] ) : '' );\r\n\r\n\t// Set bug report date as current date\r\n\t$bug_data['bug_report_date'] = date( 'Y-m-d' );\r\n\r\n\t// Set status of all new bugs to 0 (Open)\r\n\t$bug_data['bug_status'] = ( isset( $_POST['bug_status'] ) ? intval( $_POST['bug_status'] ) : 0 );\r\n\r\n\t// Call the wpdb insert or update method based on value\r\n\t// of hidden bug_id field\r\n\tif ( isset( $_POST['bug_id'] ) && 0 == $_POST['bug_id'] ) {\r\n\t\t$wpdb->insert($wpdb->get_blog_prefix() . 'ch8_bug_data', $bug_data );\r\n\t} elseif ( isset( $_POST['bug_id'] ) && $_POST['bug_id'] > 0 ) {\r\n\t\t$wpdb->update( $wpdb->get_blog_prefix() . 'ch8_bug_data', $bug_data, array( 'bug_id' => $_POST['bug_id'] ) );\r\n\t}\r\n\r\n\t// Redirect the page to the admin form\r\n\twp_redirect( add_query_arg( 'page', 'ch8bt-bug-tracker', admin_url( 'options-general.php' ) ) );\r\n\texit;\r\n}",
"function printBugData($bugData){\r\n\t//echo \"build = \", $bugData->build;\r\n\t//echo \"platform = \", $bugData->platform;\r\n\techo \"os = \", $bugData->os;\r\n\techo \"os_build = \", $bugData->os_build;\r\n\techo \"version = \", $bugData->version;\r\n\t//echo \"profile_id = \", $bugData->profile_id;\r\n\t//echo \"handler_id = \", $bugData->handler_id;\r\n\techo \"view_state = \", $bugData->view_state;\r\n\techo \"category = \", $bugData->category;\r\n\t//echo \"severity = \", $bugData->severity;\r\n\t//echo \"priority = \",$bugData->priority;\r\n\techo \"summary = \", $bugData->summary;\r\n\techo \"description = \", $bugData->description;\r\n\techo \"steps_to_reproduce = \", $bugData->steps_to_reproduce;\r\n\techo \"additional_information = \", $bugData->additional_information;\r\n\t//echo \"f_file = \", \"\";\r\n\t//echo \"f_report_stay = \", ;\r\n\techo \"project_id = \", $bugData->project_id;\r\n\t//echo \"target_version = \", $bugData->target_version;\r\n}",
"function section_bugs() {\r\n\t\tprint \"<ul id='admin-section-bug-wrap'>\";\r\n\t\tprint \"<li><p>If you have found a bug in this plugin, please open a new <a id='framework-bug' href='https://github.com/OneManOneLaptop/\" . $this->slug . \"/issues/' target='_blank' style=''>Github Issue</a>.</p><p>Describe the problem clearly and where possible include a reduced test case.</p></li>\";\r\n\t\tprint \"</ul>\"; \r\n\t}",
"function getBugByID ($bug_id)\n {\n return DBUtil::selectObjectByID ('mantis_bug_table', $bug_id);\n }",
"public function show(Bug $bug)\n {\n //\n }",
"function Info($bug){\n\tMagratheaDebugger::Instance()->Info($bug);\n}",
"public function edit()\n\t{\n\t\t\n\t\t$sql = SqlQuery::getInstance();\n\t\t\n\t\t$tbl = new AbTable(\"SELECT u.first_name, u.last_name, u.zip, c.* FROM IBO_camp c JOIN user u ON u.id = c.user_id\",array('user_id'));\n\t\t\n\t\treturn $tbl->getHtml();\n\t\t\n\t\t\n\t}",
"public function getEdit()\n\t{\n\t}",
"public function edit()\n {\n $contact = Contact_info::orderBy('created_at', 'desc')->first();\n $hours = Hour::orderBy('created_at', 'desc')->first();\n \n \n return view('admin.contactInfo.edit', compact('contact','hours'));\n }",
"public function edit()\r\n {\r\n return null;\r\n }",
"public function itemissuedetails(){\n\t$sel='ii_id,ii_itemid,ii_mtid,ii_name,ii_qty,ii_desc,ii_staffpfno,ii_staffname,ii_dept,ii_receivername,ii_creatordate';\n\t$whorder='ii_mtid asc,ii_itemid asc';\n\t$data['result'] = $this->picomodel->get_orderlistspficemore('items_issued',$sel,'',$whorder);\n $this->logger->write_logmessage(\"view\",\" View Item List setting\", \"Item List setting details...\");\n\t$this->logger->write_dblogmessage(\"view\",\" View Item List setting\", \"Item List setting details...\");\n $this->load->view('itemaction/displayissueitem',$data);\n }",
"function show_edit()\n\t{\n\t\t$this->tpl->set_var('name', '_f_'.$this->name);\n\t\t$this->tpl->set_var('description', $this->description);\n\t\t$this->tpl->set_var('error', $this->error);\n\t\t$this->tpl->set_var('select', html_build_date($this->name, $this->value));\n\t\t\n\n\t\t$out = $this->tpl->process('temp', 'avcDate_edit');\n\n\t\t$this->tpl->drop_var('name');\n\t\t$this->tpl->drop_var('description');\n\t\t$this->tpl->drop_var('select');\n\t\t$this->tpl->drop_var('error');\n\n\t\treturn $out;\n\t}",
"public function getPopup() {}",
"function listBugFixes( ){\n global $config, $lang;\n\n if( !isset( $_SESSION['mBugFixes'] ) ){\n $_SESSION['mBugFixes'] = getContentFromUrl( 'http://opensolution.org/bugfixes.html' );\n }\n\n if( !empty( $_SESSION['mBugFixes'] ) ){\n if( $_SESSION['mBugFixes'] == 'no-bugs' )\n return true;\n\n $aBugs = unserialize( $_SESSION['mBugFixes'] );\n $i = 0;\n $content = null;\n foreach( $aBugs as $iBug => $aData ){\n $aData['sStatus'] = $lang['Cant_check'];\n if( isset( $aData['aSteps'] ) || isset( $aData['bDontVerifySteps'] ) ){\n if( isset( $aData['sPluginVerify'] ) && verifyCodeInFile( $aData['sPluginVerify'] ) === false ){\n $aData['sName'] = null;\n }\n if( isset( $aData['sName'] ) && isset( $aData['aSteps'] ) ){\n $iCount = count( $aData['aSteps'] );\n $iOk = 0;\n foreach( $aData['aSteps'] as $aSteps ){\n $mReturn = checkFileToUpgrade( $aSteps );\n if( isset( $mReturn ) && $mReturn === true ){\n $iOk++;\n }\n else\n break;\n } // end foreach\n $aData['sStatus'] = ( $iOk == $iCount ) ? $lang['Fixed'] : ( ( $iOk > 0 ) ? $lang['Uncompleted'] : '<strong>'.$lang['Fix_it'].'</strong>' );\n }\n }\n\n if( isset( $aData['sName'] ) ){\n $content .= '<tr class=\"level-'.$aData['iLevel'].'\"><td class=\"name\">'.$aData['sName'].'</td><td class=\"status\">'.( isset( $aData['sStatus'] ) ? $aData['sStatus'] : null ).'</td><td class=\"options\"><a href=\"'.$config['bugfixes_link'].'?sBug='.base64_encode( $config['version'].'-'.$iBug ).'\" target=\"_blank\" class=\"manual\" title=\"'.$lang['More'].'\">'.$lang['More'].'</a></td></tr>';\n }\n } // end foreach\n\n if( isset( $content ) )\n return $content;\n }\n}",
"public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Gc_Service_OrderShow::getOrderShow(intval($id));\n\t\n\t\t//状态\n\t\t$this->assign('ordershow_status', $this->ordershow_status);\n\t\t\n\t\t//渠道\n\t\tlist(,$ordershow_channel) = Gc_Service_OrderChannel::getAllOrderChannel();\n\t\t$ordershow_channel = Common::resetKey($ordershow_channel, 'id');\n\t\t$this->assign('ordershow_channel', $ordershow_channel);\n\t\t\t\t\n\t\t$this->assign('info', $info);\n\t}",
"public function editAction() {\n $this->_title($this->__(\"Supportticket\"));\n $this->_title($this->__(\"Supportticket\"));\n $this->_title($this->__(\"Edit Item\"));\n $id = $this->getRequest()->getParam(\"id\");\n $model = Mage::getModel(\"supportticket/supportticket\")->load($id);\n if ($model->getId()) {\n Mage::register(\"supportticket_data\", $model);\n $this->loadLayout();\n $this->_setActiveMenu(\"supportticket/supportticket\");\n $this->_addBreadcrumb(Mage::helper(\"adminhtml\")->__(\"Supportticket Manager\"), Mage::helper(\"adminhtml\")->__(\"Supportticket Manager\"));\n $this->_addBreadcrumb(Mage::helper(\"adminhtml\")->__(\"Supportticket Description\"), Mage::helper(\"adminhtml\")->__(\"Supportticket Description\"));\n $this->getLayout()->getBlock(\"head\")->setCanLoadExtJs(true);\n $this->_addContent($this->getLayout()->createBlock(\"supportticket/adminhtml_supportticket_edit\"))->_addLeft($this->getLayout()->createBlock(\"supportticket/adminhtml_supportticket_edit_tabs\"));\n $this->renderLayout();\n } else {\n Mage::getSingleton(\"adminhtml/session\")->addError(Mage::helper(\"supportticket\")->__(\"Item does not exist.\"));\n $this->_redirect(\"*/*/\");\n }\n }",
"function get_comments_popup_template()\n {\n }",
"function bug_list_print($p_bug_ids, $p_columns, $p_table_class = ''){\n\t/* cache bugs */\n\tbug_cache_array_rows($p_bug_ids);\n\n\t/* prepare table header */\n\t$t_header = array();\n\n\tfor($i=0; $i<count($p_columns); $i++){\n\t\t$t_title = column_title($p_columns[$i]);\n\n\t\tif($t_title === false){\n\t\t\t$t_title = '[invalid \\'' . $p_columns[$i] . '\\']';\n\t\t\t$p_columns[$i] = 'invalid';\n\t\t}\n\n\t\t$t_header[] = $t_title;\n\t}\n\n\t/* print table */\n\ttable_begin($t_header, $p_table_class);\n\n\tforeach($p_bug_ids as $t_bug_id){\n\t\t$t_bug = bug_get($t_bug_id);\n\t\t$t_row = array();\n\n\t\tforeach($p_columns as $t_col){\n\t\t\t$t_title = column_title($t_col);\n\t\t\t$t_cf_id = custom_field_get_id_from_name($t_title);\n\n\t\t\tif($t_cf_id != null){\n\t\t\t\tif(custom_field_is_linked($t_cf_id, $t_bug->project_id)){\n\t\t\t\t\t$t_def = custom_field_get_definition($t_cf_id);\n\t\t\t\t\t$t_row[] = string_custom_field_value($t_def, $t_cf_id, $t_bug_id);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$t_row[] = format_content_notlinked($t_bug);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$t_func = 'format_content_' . $t_col;\n\t\t\t\t$t_row[] = $t_func($t_bug);\n\t\t\t}\n\t\t}\n\n\t\ttable_row($t_row);\n\t}\n\n\ttable_end();\n}",
"function updateBug($bug_id, $bug_data) {\r\n\techo \"update the bug -- bug_id = $bug_id by adding a test note\";\r\n\taddBugNote($bug_id, $bug_data);\r\n}",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function edit(Issue $issue)\n {\n\t\t$this->pageData->issue = $issue;\n return view('issue.edit',['pageData' => $this->pageData]);\n }",
"function simplenews_admin_issues() {\n // Build an 'Update options' form.\n $form['options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Update options'),\n '#prefix' => '<div class=\"container-inline\">',\n '#suffix' => '</div>',\n );\n $options = array();\n foreach (module_invoke_all('simplenews_issue_operations') as $operation => $array) {\n $options[$operation] = $array['label'];\n }\n $form['options']['operation'] = array(\n '#type' => 'select',\n '#options' => $options,\n '#default_value' => 'activate',\n );\n $form['options']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Update'),\n '#submit' => array('simplenews_admin_issues_submit'),\n '#validate' => array('simplenews_admin_issues_validate'),\n );\n\n if (variable_get('simplenews_last_cron', '')) {\n $form['last_sent'] = array(\n '#markup' => '<p>' . format_plural(variable_get('simplenews_last_sent', 0), 'Last batch: 1 mail sent at !time.', 'Last batch: !count mails sent at !time.', array('!time' => format_date(variable_get('simplenews_last_cron', ''), 'small'), '!count' => variable_get('simplenews_last_sent', 0))) . \"</p>\\n\",\n );\n }\n // Table header. Used as tablesort default\n $header = array(\n 'title' => array(\n 'data' => t('Title'),\n 'specifier' => 'title',\n 'type' => 'property',\n ),\n 'newsletter' => array(\n 'data' => t('Newsletter'),\n 'specified' => array(\n 'field' => variable_get('simplenews_newsletter_field', 'simplenews_newsletter'),\n 'column' => 'target_id',\n ),\n 'type' => 'field',\n ),\n 'created' => array(\n 'data' => t('Created'),\n 'specifier' => 'created',\n 'sort' => 'desc',\n 'type' => 'property',\n ),\n 'published' => array('data' => t('Published')),\n 'sent' => array('data' => t('Sent')),\n 'subscribers' => array('data' => t('Subscribers')),\n 'operations' => array('data' => t('Operations')),\n );\n\n $query = new EntityFieldQuery();\n simplenews_build_issue_filter_query($query);\n $result = $query\n ->entityCondition('entity_type', 'node')\n ->tableSort($header)\n ->entityCondition('bundle', simplenews_get_content_types())\n ->pager(30)\n ->execute();\n\n $nids = !empty($result['node']) ? array_keys($result['node']) : array();\n $options = array();\n\n module_load_include('inc', 'simplenews', 'includes/simplenews.mail');\n $categories = simplenews_newsletter_list();\n foreach (node_load_multiple($nids) as $node) {\n $subscriber_count = simplenews_count_subscriptions(simplenews_issue_newsletter_id($node));\n $pending_count = simplenews_count_spool(array('entity_id' => $node->nid, 'entity_type' => 'node'));\n $send_status = simplenews_issue_status($node) == SIMPLENEWS_STATUS_SEND_PENDING ? $subscriber_count - $pending_count : theme('simplenews_status', array('source' => 'sent', 'status' => simplenews_issue_status($node)));\n\n $options[$node->nid] = array(\n 'title' => l($node->title, 'node/' . $node->nid),\n 'newsletter' => simplenews_issue_newsletter_id($node) && isset($categories[simplenews_issue_newsletter_id($node)]) ? $categories[simplenews_issue_newsletter_id($node)] : t('- Unassigned -'),\n 'created' => format_date($node->created, 'small'),\n 'published' => theme('simplenews_status', array('source' => 'published', 'status' => $node->status)),\n 'sent' => $send_status,\n 'subscribers' => $subscriber_count,\n 'operations' => l(t('edit'), 'node/' . $node->nid . '/edit', array('query' => drupal_get_destination())),\n );\n }\n\n $form['issues'] = array(\n '#type' => 'tableselect',\n '#header' => $header,\n '#options' => $options,\n '#empty' => t('No newsletters available.'),\n );\n\n $form['pager'] = array('#theme' => 'pager');\n\n return $form;\n}",
"public function editAction(){\n\t\t$id = $this->getInput('id');\n\t\t$info = Gou_Service_ForumReply::getForumReply(intval($id));\t\t\n\t\t$this->assign('status', $this->status);\t\t\n $this->assign('info', $info);\t\n\t}",
"private function edit(): array {\n return [\n 'title' => $this->t('Edit Team Member'),\n ];\n }",
"public function getEditTitle()\n {\n return $this->edit_title;\n }",
"function buildPopup(){\t\t\n\t\t$html = '';\n\t\t$html .= JDom::_('html.fly.bootstrap.modal', array(\n\t\t\t\t'domId' => 'fset_modal_form',\n\t\t\t\t'domClass' => 'popupform formFieldsContainer',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'data-backdrop'=> 'static'\n\t\t\t\t\t),\n\t\t\t\t'title' => JText::_(\"JACTION_EDIT\")\n\t\t\t));\n\t\t\n\t\treturn $html;\n\t}",
"function show_edit()\n\t{\n\t\treturn '';\n\t}",
"public function getPopupContent();",
"function edithistory_edit_page()\n{\n\tglobal $db, $lang, $mybb, $post, $templates, $post_errors, $reason, $postreason;\n\t$lang->load(\"edithistory\");\n\n\tif($mybb->input['previewpost'] || $post_errors)\n\t{\n\t\t$postreason = htmlspecialchars_uni($mybb->input['reason']);\n\t}\n\telse\n\t{\n\t\t$postreason = htmlspecialchars_uni($post['reason']);\n\t}\n\n\teval(\"\\$reason = \\\"\".$templates->get(\"editpost_reason\").\"\\\";\");\n}",
"function case_detail($case_id) {\n\t\tif ($this->ensure_portal() !== -1) {\n\t\t\t$this->login();\n\t\t\t $ge_parameters = array(\n\t\t\t\t\t\"session\" => $this->session,\n\t\t\t\t\t\"module_name\" => \"Cases\",\n\t\t\t\t\t\"id\" => $case_id,\n\t\t\t\t\t\"select_fields\" => array(),\n\t\t\t\t\t'link_name_to_fields_array' => [],\n\t\t\t );\n\n\t\t $ge_result = $this->call(\"get_entry\", $ge_parameters);\n\n\t\t $case_name = $ge_result->entry_list[0]->name_value_list->name->value;\n\t\t $case_number = $ge_result->entry_list[0]->name_value_list->case_number->value;\n\t\t $case_description = $ge_result->entry_list[0]->name_value_list->description->value;\n\n\t\t $cid = $case_id;\n\n\t\t $case_info = array(\"case_id\" => $cid, \"case_name\" => $case_name, \"case_number\" => $case_number, \"case_description\" => $case_description);\n\t\t\t\treturn $case_info;\n\t\t\t} else {\n\t\t\t\t$this->kick();\n\t\t\t}\n\t\t}",
"public function show(SysBug $sysBug)\n {\n //\n }",
"public function edit( )\r\n {\r\n //\r\n }",
"public function show($bug)\n {\n $template = [];\n\n try {\n $instance = Bug::findOrFail($bug);\n } catch (ModelNotFoundException $e) {\n return redirect()->route('bug.list');\n }\n\n $template['bug'] = $instance;\n\n return view('bug.show', $template);\n }",
"public function edit($id)\n {\n $this->data['pageDescription'] = 'Detail of mail tracking log data';\n $this->data['model'] = MailTracking::find($id);\n\n return parent::edit($id);\n }",
"function issue_prepare_brief_view_vars($issue = null) {\n\t$fields = array(\n 'Title' => $issue->title,\n 'Description' => $issue->description,\n 'Status' => $issue->status,\n 'Issue #' => $issue->number,\n 'Asset' => get_entity($issue->asset)->title,\n 'Tags' => $issue->tags,\n\t);\n\n\tif ($issue) {\n\t\tforeach (array_keys($fields) as $field) {\n\t\t\tif (isset($issue->$field)) {\n\t\t\t\t$values[$field] = $issue->$field;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (elgg_is_sticky_form('jot')) {\n\t\t$sticky_values = elgg_get_sticky_values('jot');\n\t\tforeach ($sticky_values as $key => $value) {\n\t\t\t$fields[$key] = $value;\n\t\t}\n\t}\n\n\telgg_clear_sticky_form('jot');\n\n\treturn $fields;\n}",
"function editItem() {\n\t\tglobal $HTML;\n\t\t$HTML->details(1);\n\t\t$name = stringOr($this->vars[\"name\"], $this->getQueryResult(0, \"name\"));\n\n\t\t$_ = '';\n\t\t$_ .= $HTML->head($this->translate(\"Edit point name\"));\n\t\t$_ .= $HTML->block($this->translate(\"Point\").\":\", $this->getQueryResult(0, \"file\"));\n\t\t$_ .= $HTML->input($this->varnames[\"name\"], \"name\", $name);\n\n\t\treturn $_;\n\t}",
"public function edit() {\r\n\t\treturn $this->_edit(false);\r\n\t}",
"function get_comment_to_edit($id)\n {\n }",
"public function edit()\n\t{\n\t\t//\n\t}",
"public function getPreviewDetails()\n {\n return $this->previewDetails;\n }",
"public function edit(Popup $popup)\n {\n return view('popup::admin.popups.edit', compact('popup'));\n }",
"function Debug($bug){\n\tMagratheaDebugger::Instance()->Add($bug);\n}",
"private function showTicketDetails()\n {\n $data = array();\n\n $ticket_id = $this->param[2];\n\n $data['ticket_status_type'] = Utils::arrayAlterKeyValue(\n $GLOBALS['TICKET_STATUS_TYPE']\n );\n \n $my_sources = array();\n foreach($_SESSION['LOGIN_USER']['sources'] as $index => $source)\n {\n $my_sources[$source->source_id] = $source->name;\n }\n $data['source_list'] = $my_sources;\n \n $sql = \"SELECT t.*, ts.source_id \n FROM \" . TICKETS_TBL . \" as t, \" . TICKET_SOURCES_TBL . \" as ts \n WHERE t.ticket_id = ts.ticket_id AND t.ticket_id = $ticket_id\";\n try\n {\n $ticket = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n \n $ticket = isset($ticket[0]) ? $ticket[0] : new stdClass();\n $ticket->status_text = $GLOBALS['TICKET_STATUS_TYPE'][$ticket->status];\n $ticket->create_date = date('l jS F Y @ h:i A (T)', \n strtotime($ticket->create_date));\n \n $priorityColorSettings = Utils::getPriorityColorSettings($this->db,$_SESSION['LOGIN_USER']['userId']); \n \n $ticket->color = $priorityColorSettings[$ticket->priority];\n $data['ticket'] = $ticket; \n\n $sql = \"SELECT d.*, u.first_name, u.last_name \n FROM \" . TICKETS_DETAILS_TBL . \" as d, \" . USERS_TBL . \" as u \n WHERE d.user_id = u.user_id \n AND d.ticket_id = $ticket_id \n ORDER BY d.create_date desc\";\n try\n {\n $list = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n\n // if($list)\n // {\n // foreach($list as $index => $row)\n // {\n // $list[$index]->create_date = date('l jS F Y @ h:i A (T)', \n // strtotime($row->create_date));\n // }\n // }\n // \n // $first_detail_pos = count($list)-1;\n // $first_detail = $list[$first_detail_pos];\n // unset($list[$first_detail_pos]);\n // \n // $data['first_detail'] = $first_detail;\n // $data['detail_list'] = $list;\n \n if($list)\n {\n foreach($list as $index => $row)\n {\n $row->create_date = date('l jS F Y @ h:i A (T)', \n strtotime($row->create_date));\n if($row->type == 1)\n {\n $description = $row;\n }\n else\n {\n $res[] = $row;\n }\n }\n }\n $data['first_detail'] = $description;\n $data['detail_list'] = $res;\n\n $list = array();\n $sql = \"SELECT * \n FROM \" . TICKET_ATTACHMENTS_TBL . \" \n WHERE deleted = 0 AND ticket_id = $ticket_id\";\n try\n {\n $rows = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n \n if($rows)\n {\n foreach($rows as $index => $row)\n {\n $extArray = split(\"[.]\",$row->original_filename);\n $row->extension = strtolower($extArray[count($extArray)-1]);\n \n $list[$row->details_id][] = $row;\n }\n }\n $data['attachments_by_details_id'] = $list; \n \n $sql = \"SELECT * \n FROM \" . TICKET_RATING_SUMMARY_TBL . \" \n WHERE ticket_id = $ticket_id\";\n try\n {\n $rows = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n \n if(count($rows) > 0)\n {\n $data['ticket_rating_submissions'] = $rows[0]->rating_submissions;\n if($rows[0]->rating_sum > 0)\n {\n $data['ticket_average_rating'] = number_format((float)$rows[0]->rating_sum / (float)$data['ticket_rating_submissions'], 2, '.', '');\n }\n else\n {\n $data['ticket_average_rating'] = 0;\n }\n }\n else\n {\n $data['ticket_rating_submissions'] = 0;\n $data['ticket_average_rating'] = 0;\n }\n\n $data['ticket_status_list'] = $GLOBALS['TICKET_STATUS_TYPE'];\n $data['login_user_id'] = $_SESSION['LOGIN_USER']['userId'];\n $data['is_resolver'] = Utils::isResolverUser($ticket->source_id); \n \n $data['add_detail_dialog'] = $this->template\n ->parseTemplate(TICKET_DETAIL_DIALOG_TEMPLATE, $data);\n\n $data['add_tag_dialog'] = $this->template\n ->parseTemplate(TICKET_TAG_DIALOG_TEMPLATE, $data);\n \n $data['add_merge_dialog'] = $this->template\n ->parseTemplate(TICKET_MERGE_DIALOG_TEMPLATE, $data); \n\n $data['is_source'] = count($_SESSION['LOGIN_USER']['authorized_sources']);\n $data['is_executive'] = Utils::isExecutive($ticket->source_id);\n // Utils::dumpvar($data);\n return $this->template->parseTemplate(TICKET_DETAIL_TEMPLATE, $data);\n }",
"public function showEdit()\n {\n\n }",
"function tab_project(){\n\tglobal $t_project_ids;\n\tglobal $f_version_id;\n\tglobal $t_version_type;\n\tstatic $i = 0;\n\n\n\t$f_columns = bug_list_columns('bug_list_columns_versions');\n\n\t$t_project_id = $t_project_ids[$i];\n\t$i++;\n\n\t/* get all project versions */\n\t$t_version_rows = version_get_all_rows($t_project_id, true, true);\n\n\tif($t_version_type == 'target_version')\n\t\t$t_version_rows = array_reverse($t_version_rows);\n\t\t\n\t$t_is_first_version = true;\n\n\t/* print sectin per version */\n\tforeach($t_version_rows as $t_version_row){\n\t\t$t_version_name = $t_version_row['version'];\n\t\t$t_released = $t_version_row['released'];\n\t\t$t_obsolete = $t_version_row['obsolete'];\n\n\t\t/* only show either released or unreleased versions */\n\t\tif(($t_version_type == 'target_version' && ($t_released || $t_obsolete)) || ($t_version_type != 'target_version' && !$t_released && !$t_obsolete))\n\t\t\tcontinue;\n\n\t\t/* Skip all versions except the specified one (if any) */\n\t\tif($f_version_id != -1 && $f_version_id != $t_version_row['id'])\n\t\t\tcontinue;\n\n\t\t/* query issue list */\n\t\t$t_issues_resolved = 0;\n\t\t$t_issue_ids = db_query_roadmap_info($t_project_id, $t_version_name, $t_version_type, $t_issues_resolved);\n\t\t$t_num_issues = count($t_issue_ids);\n\t\n\t\t/* print section */\n\t\tsection_begin('Version: ' . $t_version_name, !$t_is_first_version);\n\t\t\t/* print version description and progress */\n\t\t\tcolumn_begin('6-left');\n\n\t\t\t$t_progress = 0;\n\n\t\t\tif($t_num_issues > 0)\n\t\t\t\t$t_progress = (int)($t_issues_resolved * 100 / $t_num_issues);\n\n\t\t\t$t_release_date = date(config_get('short_date_format'), $t_version_row['date_order']);\n\n\t\t\tif(!$t_obsolete){\n\t\t\t\tif($t_released)\t$t_release_state = format_label('Released (' . $t_release_date . ')', 'label-success');\n\t\t\t\telse\t\t\t$t_release_state = format_label('Planned Release (' . $t_release_date . ')', 'label-info');\n\t\t\t}\n\t\t\telse\n\t\t\t\t$t_release_state = format_label('Obsolete (' . $t_release_date . ')', 'label-danger');\n\n\n\t\t\ttable_begin(array());\n\t\t\ttable_row(\n\t\t\t\tarray(\n\t\t\t\t\t$t_release_state,\n\t\t\t\t\tformat_progressbar($t_progress),\n\t\t\t\t\tformat_button_link($t_issues_resolved . ' of ' . $t_num_issues . ' issue(s) resolved', 'filter_apply.php', array('type' => 1, 'temporary' => 'y', FILTER_PROPERTY_PROJECT_ID => $t_project_id, FILTER_PROPERTY_TARGET_VERSION => $t_version_name), 'input-xxs')\n\t\t\t\t),\n\t\t\t\t'',\n\t\t\t\tarray('', 'width=\"100%\"', '')\n\t\t\t);\n\t\t\ttable_end();\n\n\t\t\t$t_description = $t_version_row['description'];\n\n\t\t\tif(!is_blank($t_description))\n\t\t\t\talert('warning', string_display($t_description));\n\n\t\t\tcolumn_end();\n\n\t\t\t/* print issues */\n\t\t\tcolumn_begin('6-right');\n\t\t\tactionbar_begin();\n\t\t\t\techo '<div class=\"pull-right\">';\n\t\t\t\t\t$t_menu = array(\n\t\t\t\t\t\tarray('label' => 'Select Columns', 'data' => array('link' => format_href('columns_select_page.php', column_select_input('bug_list_columns_versions', $f_columns, false, true, basename(__FILE__))), 'class' => 'inline-page-link')),\n\t\t\t\t\t);\n\n\t\t\t\t\tdropdown_menu('', $t_menu, '', '', 'dropdown-menu-right');\n\t\t\t\techo '</div>';\n\t\t\tactionbar_end();\n\n\t\t\tbug_list_print($t_issue_ids, $f_columns, 'table-condensed table-hover table-datatable no-border');\n\t\t\tcolumn_end();\n\t\tsection_end();\n\n\t\t$t_is_first_version = false;\n\t}\n\n\t/* print message if no versions have been shown */\n\tif($t_is_first_version){\n\t\techo '<p class=\"lead\">';\n\t\techo 'No Roadmap information available. Issues are included once projects have versions and issues have \"target version\" set.';\n\t\techo '</p>';\n\t}\n}",
"function get_post_to_edit($id)\n {\n }",
"function doedit(){\r\n\t\tif(!isset($this->post['editsubmit'])){\r\n\t\t\t$did=isset($this->get[2])?$this->get[2]:'';\r\n\t\t\tif(!is_numeric($did)){\r\n\t\t\t\t$this->message($this->view->lang['docIdMustNum'],'BACK');\r\n\t\t\t}\r\n\t\t\t$focus=$this->db->fetch_by_field('focus','did',$did);\r\n\t\t\t$focus['time']=$this->date($focus['time']);\r\n\t\t\t$this->view->assign(\"focus\",$focus);\r\n\t\t\t$this->view->display(\"admin_focus_content\");\r\n\t\t}else{\r\n\t\t\t$did=isset($this->post['did'])?$this->post['did']:'';\r\n\t\t\tif(!is_numeric($did)){\r\n\t\t\t\t$this->message($this->view->lang['docIdMustNum'],'BACK');\r\n\t\t\t}\r\n\t\t\t$summary=_string::hiconv($this->post['summary']);\r\n\t\t\t$image=_string::hiconv($this->post['image']);\r\n\t\t\t$order=$this->post['displayorder'];\r\n\t\t\t$type=$this->post['doctype'];\r\n\t\t\tif(is_numeric($order)&&$_ENV['doc']->save_focus_content($did,$summary,$image,$order,$type)){\r\n\t\t\t\t$this->cache->removecache('data_'.$GLOBALS['theme'].'_index');\r\n\t\t\t\t$this->message($this->view->lang['docEditSuccess'],\"index.php?admin_focus-edit-$did\");\r\n\t\t\t}else{\r\n\t\t\t\t$this->message($this->view->lang['docEditFail'],'BACK');\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function edit($id=0)\n {\n $tab=\\DB::table('in_store_repair_problems')->where('id',$id)->first();\n return view('apps.pages.instorerepair.settings.problem',compact('tab'));\n }",
"public function getEditForm();",
"public function getChangeInformation(){\n return view('pages.change_information');\n }",
"function edithistory_info()\n{\n\treturn array(\n\t\t\"name\"\t\t\t\t=> \"Edit History Log\",\n\t\t\"description\"\t\t=> \"Allows you to log all edits made to posts.\",\n\t\t\"website\"\t\t\t=> \"http://galaxiesrealm.com/index.php\",\n\t\t\"author\"\t\t\t=> \"Starpaul20\",\n\t\t\"authorsite\"\t\t=> \"http://galaxiesrealm.com/index.php\",\n\t\t\"version\"\t\t\t=> \"1.2.2\",\n\t\t\"guid\"\t\t\t\t=> \"b8223bbc5a67bc02ea405bcc4101a56c\",\n\t\t\"compatibility\"\t\t=> \"16*\"\n\t);\n}",
"public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}",
"function getPatch($bugid, $name, $revision)\n\t{\n\t\tif ($this->_dbh->prepare('\n\t\t\tSELECT bugdb_id\n\t\t\tFROM bugdb_patchtracker\n\t\t\tWHERE bugdb_id = ? AND patch = ? AND revision = ?')->execute([$bugid, $name, $revision])->fetchOne()\n\t\t) {\n\t\t\t$contents = @file_get_contents($this->getPatchFullpath($bugid, $name, $revision));\n\t\t\tif (!$contents) {\n\t\t\t\treturn PEAR::raiseError('Cannot retrieve patch revision \"' . $revision . '\" for patch \"' . $name . '\"');\n\t\t\t}\n\t\t\treturn $contents;\n\t\t}\n\t\treturn PEAR::raiseError('No such patch revision \"' . $revision . '\", or no such patch \"' . $name . '\"');\n\t}",
"public function edit(Ticket $ticket)\n {\n //\n }",
"public function edit(Ticket $ticket)\n {\n //\n }",
"public function edit(Ticket $ticket)\n {\n //\n }",
"public function edit(FakturReturBeliDetail $fakturReturBeliDetail)\n {\n //\n }",
"function ch8bt_config_page() {\r\n\tglobal $wpdb;\r\n\t?>\r\n\t<!-- Top-level menu -->\r\n\t<div id=\"ch8bt-general\" class=\"wrap\">\r\n\t<h2>Bug Tracker\r\n\t\t<a class=\"add-new-h2\" \r\n\t\t\thref=\"<?php echo add_query_arg( array ( 'page' => 'ch8bt-bug-tracker', 'id' => 'new' ), admin_url( 'options-general.php' ) ); ?>\">Add New Bug</a></h2>\r\n\t\t\r\n\t<!-- Display bug list if no parameter sent in URL -->\r\n\t<?php if ( empty( $_GET['id'] ) ) { \r\n\t\t$bug_query = 'select * from ' . $wpdb->get_blog_prefix();\r\n\t\t$bug_query .= 'ch8_bug_data ORDER by bug_report_date DESC';\r\n\t\t$bug_items = $wpdb->get_results( $bug_query, ARRAY_A );\r\n\t?>\r\n\r\n\t<h3>Manage Bug Entries</h3>\r\n\t<form method=\"post\" action=\"<?php echo admin_url( 'admin-post.php' ); ?>\">\r\n\t<input type=\"hidden\" name=\"action\" value=\"delete_ch8bt_bug\" />\r\n\r\n\t<!-- Adding security through hidden referrer field -->\r\n\t<?php wp_nonce_field( 'ch8bt_deletion' ); ?>\r\n\t\r\n\t<table class=\"wp-list-table widefat fixed\" >\r\n\t<thead><tr><th style=\"width: 50px\"></th><th style=\"width: 80px\">ID</th>\r\n\t<th style=width: 300px>Title</th><th>Version</th></tr></thead>\r\n\r\n\t<?php \r\n\t\t// Display bugs if query returned results\r\n\t\tif ( $bug_items ) {\r\n\t\t\tforeach ( $bug_items as $bug_item ) {\r\n\t\t\t\techo '<tr style=\"background: #FFF\">';\r\n\t\t\t\techo '<td><input type=\"checkbox\" name=\"bugs[]\" value=\"';\r\n\t\t\t\techo esc_attr( $bug_item['bug_id'] ) . '\" /></td>';\r\n\t\t\t\techo '<td>' . $bug_item['bug_id'] . '</td>';\r\n\t\t\t\techo '<td><a href=\"' . add_query_arg( array( 'page' => 'ch8bt-bug-tracker', 'id' => $bug_item['bug_id'] ), admin_url( 'options-general.php' ) );\r\n\t\t\t\techo '\">' . $bug_item['bug_title'] . '</a></td>';\r\n\t\t\t\techo '<td>' . $bug_item['bug_version'] . '</td></tr>';\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\techo '<tr style=\"background: #FFF\">';\r\n\t\t\techo '<td colspan=\"4\">No Bug Found</td></tr>';\r\n\t\t}\r\n\t?>\r\n\t</table><br />\r\n\t\r\n\t<input type=\"submit\" value=\"Delete Selected\" class=\"button-primary\"/>\r\n\t</form>\r\n\t\r\n\t<!-- Form to upload new bugs in csv format --> \r\n\t<form method=\"post\" \r\n\t\t action=\"<?php echo admin_url( 'admin-post.php' ); ?>\" \r\n\t\t enctype=\"multipart/form-data\"> \r\n\t \r\n\t<input type=\"hidden\" name=\"action\" value=\"import_ch8bt_bug\" /> \r\n\t\t \r\n\t<!-- Adding security through hidden referrer field --> \r\n\t<?php wp_nonce_field( 'ch8bt_import' ); ?> \r\n\t\t \r\n\t<h3>Import Bugs</h3> \r\n\t<div class=\"import_data\">Import Bugs from CSV File \r\n\t\t(<a href=\"<?php echo plugins_url( 'importtemplate.csv', \r\n\t\t\t\t\t\t\t\t\t\t __FILE__ ); ?>\">Template</a>) \r\n\t\t<input name=\"import_bugs_file\" type=\"file\" /></div> \r\n\t<input type=\"submit\" value=\"Import\" class=\"button-primary\"/> \r\n\t</form> \r\n\r\n\t<?php } elseif ( isset( $_GET['id'] ) && ( 'new' == $_GET['id'] || is_numeric( $_GET['id'] ) ) ) {\r\n\r\n\t// Display bug creation and editing form if bug is new\r\n\t// or numeric id was sen \r\n\t$bug_id = intval( $_GET['id'] );\r\n\t$mode = 'new';\r\n\r\n\t// Query database if numeric id is present\r\n\tif ( $bug_id > 0 ) {\r\n\t\t$bug_query = 'select * from ' . $wpdb->get_blog_prefix();\r\n\t\t$bug_query .= 'ch8_bug_data where bug_id = %d';\r\n\r\n\t\t$bug_data = $wpdb->get_row( $wpdb->prepare( $bug_query, $bug_id ), ARRAY_A );\r\n\r\n\t\tif ( $bug_data ) {\r\n\t\t\t$mode = 'edit';\r\n\t\t}\r\n\t}\r\n\t\r\n\tif ( 'new' == $mode ) {\r\n $bug_data = array(\r\n 'bug_title' => '',\r\n 'bug_description' => '',\r\n 'bug_version' => '',\r\n 'bug_status' => ''\r\n ); \r\n }\r\n\r\n\t// Display title based on current mode\r\n\tif ( 'new' == $mode ) {\r\n\t\techo '<h3>Add New Bug</h3>';\r\n\t} elseif ( 'edit' == $mode ) {\r\n\t\techo '<h3>Edit Bug #' . $bug_data['bug_id'] . ' - ';\r\n\t\techo $bug_data['bug_title'] . '</h3>';\r\n\t}\r\n\t?>\r\n\r\n\t<form method=\"post\" action=\"<?php echo admin_url( 'admin-post.php' ); ?>\">\r\n\t<input type=\"hidden\" name=\"action\" value=\"save_ch8bt_bug\" />\r\n\t<input type=\"hidden\" name=\"bug_id\" value=\"<?php echo $bug_id; ?>\" />\r\n\r\n\t<!-- Adding security through hidden referrer field -->\r\n\t<?php wp_nonce_field( 'ch8bt_add_edit' ); ?>\r\n\r\n\t<!-- Display bug editing form, with previous values if available -->\r\n\t<table>\r\n\t\t<tr>\r\n\t\t\t<td style=\"width: 150px\">Title</td>\r\n\t\t\t<td><input type=\"text\" name=\"bug_title\" size=\"60\" value=\"<?php echo esc_html( $bug_data['bug_title'] ); ?>\"/></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td>Description</td>\r\n\t\t\t<td><textarea name=\"bug_description\" cols=\"60\"><?php echo esc_textarea( $bug_data['bug_description'] ); ?></textarea></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td>Version</td>\r\n\t\t\t<td><input type=\"text\" name=\"bug_version\" value=\"<?php echo esc_html( $bug_data['bug_version'] ); ?>\" /></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td>Status</td>\r\n\t\t\t<td>\r\n\t\t\t\t<select name=\"bug_status\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\t$bug_statuses = array( 0 => 'Open', 1 => 'Closed', 2 => 'Not-a-Bug' );\r\n\t\t\t\t\tforeach ( $bug_statuses as $status_id => $status ) {\r\n\t\t\t\t\t\techo '<option value=\"' . $status_id . '\" ';\r\n\t\t\t\t\t\tselected( $bug_data['bug_status'], $status_id );\r\n\t\t\t\t\t\techo '>' . $status;\r\n\t\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t\t</select>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n\t<input type=\"submit\" value=\"Submit\" class=\"button-primary\"/>\r\n\t</form>\r\n\r\n\t<?php } ?>\r\n\t</div>\r\n<?php }",
"public function edit(ticket $ticket)\n {\n //\n }",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit(Ticket $ticket)\n {\n\n $users= User::role('developer')->join('members','members.modelid','=','users.id')->where('members.projectid','=',$ticket->projectid)->get()->pluck('name','name');\n return view('tickets.edit',compact('ticket','users'));\n }",
"function displayEditScreen()\t{\t \n\t\t// We handle here Edit mode or Preview Mode\n\t\t// Edit Mode : User can edit fields\n\t\t// Preview Mode : user can only see fields\t\n\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('displayEditScreen'=>'on'));\n\t\t$exporttype=$this->piVars['exporttype'];\n\t\t$print=$this->piVars['print'];\n\t\t$printerName=$this->piVars['printername'];\n\t\t$printServerName=$this->piVars['printservename'];\n\t\tif ($exporttype == 'PDF') $exporttype = \"PDFDET\";\n\t\t$this->conf['cmdmode']='edit';\t\n\t\t// We handle here Edit mode or Preview Mode\n\t \t// Edit Mode : User can edit fields\n\t \t// Preview Mode : user can only see fields\t \n\t \t//$this->markerArray['###BACK_URL###'] = \"\";\n\t \t\n\t\t//We handle backurl...\n\t\t/*if ($this->conf['edit.']['backPagePid'] && !$this->conf['no_action']) {\n\t\t\t$this->backURL=$this->pi_getPageLink($this->conf['edit.']['backPagePid']);\n\t\t\tif (!strpos($this->backURL,'?')) $this->backURL.='?';\n\t\t\t$this->markerArray['###BACK_URL###'] = $this->backURL;\n\t\t}*/\n\t\t// If editing is enabled\n\t\tif ($this->conf['edit'] || $this->preview || $this->conf['list'] )\t{\t\n\t\t\t// hack for lists in second plugin ... to be checked.., Will not work if we want to edit in second plugin ...\n\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('Edit or preview'=>'on'));\n\t\t\t$uid=$this->dataArr[$this->conf['uidField']]?$this->dataArr[$this->conf['uidField']]:$this->recUid;\n \t\t\tif ($this->conf['list.']['rUJoinField']=='uid' && $uid){\n \t\t\t\t\n\t\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('UIDFIELD'=>$this->conf['uidField'].' : '.$this->recUid));\n\t\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('dataArr'=>$this->dataArr[$this->conf['uidField']]));\n\t\t\t\t$origArr = $this->metafeeditlib->getRawRecord($this->theTable,$uid,$this->conf);\n\t\t\t\tif (!$origArr) die(__METHOD__.\":Detail mode and no id given for $this->theTable,$uid\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('editMode'=>'on'));\n\n\t\t\t// here we handle foreign tables not the best way , we should work on join tables especially if we handle lists...\n\t\t\t\n\t\t\tif ($this->conf['foreignTables'] && is_array($origArr)) {\n\t\t\t\t\n\t\t\t\t//MM not implemented\n\t\t\t\t//Not MM\n\t\t\t\t\n\t\t\t\t$FTRels=t3lib_div::trimexplode(',',$this->conf['foreignTables']);\n\t\t\t\tforeach($FTRels as $FTRel) {\n\t\t\t\t\t$FTable=$GLOBALS['TCA'][$this->theTable]['columns'][$FTRel]['config']['foreign_table'];\n\t\t\t\t\t$FTUid=$origArr[$FTRel];\n\t\t\t\t\t// what if multiple ???\n\t\t\t\t\t// what if editmenu list ???\n\t\t\t\t\tif ($FTUid) {\n\t\t\t\t\t\t //on recup l'id de l'enregistrement a associer\n\t\t\t\t\t\tif ($GLOBALS['TCA'][$this->theTable]['columns'][$FTRel]['config']['MM']) { //si on est dans une MM faut d'abord recup les id de la table MM\n\t\t\t\t\t\t\t$MMT = $GLOBALS['TCA'][$this->theTable]['columns'][$FTRel]['config']['MM'];\n\t\t\t\t\t\t\t$LTUid=$origArr[\"uid\"];\n\t\t\t\t\t\t\t$MMTreq = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('*',$this->theTable,$MMT,$FTable,'AND '.$this->theTable.'.uid='.$origArr['uid']);\n\t\t\t\t\t\t\t$resu=$GLOBALS['TYPO3_DB']->sql_num_rows($MMTreq);\n\t\t\t\t\t\t\tif ($resu>=1) {\n\t\t\t\t\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($MMTreq)) {\n\t\t\t\t\t\t\t\t\tforeach($row as $key =>$val) $origArr[$FTRel.'.'.$key]=$val;\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\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// originally there only these 2 lines in this condition (if ($FTUid) )\n\t\t\t\t\t\t\t$FTorigArr = $GLOBALS['TSFE']->sys_page->getRawRecord($FTable, $FTUid);\n\t\t\t\t\t\t\tif (is_array($FTorigArr)) foreach($FTorigArr as $key =>$val) $origArr[$FTRel.'.'.$key]=$val;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$FTCA=$GLOBALS['TCA'][$FTable]['columns'];\n\t\t\t\t\t\t//krumo ($FTCA);\n\t\t\t\t\t\tif (is_array($FCTA)) foreach($FTCA as $key=>$val) {\n\t\t\t\t\t\t\tif (in_array(substr($FTCA,0,11),array('--div--;Tab','--fsb--;FSB','--fse--;FSE'))) continue;\n\t\t\t\t\t\t\t$this->markerArray['###FIELD_'.$FTRel.'.'.$key.'###']='';\n\t\t\t\t\t\t\t$this->markerArray['###FIELD_EVAL_'.$FTRel.'.'.$key.'###']='';\n\t\t\t\t\t\t\t$this->markerArray['###EVAL_ERROR_FIELD_'.$FTRel.'.'.$key.'###']='';\n\t\t\t\t\t\t\t$this->markerArray['###EVAL_ERROR_FIELD_'.$FTRel.'_'.$key.'###']='';\n\t\t\t\t\t\t\t$this->markerArray['###CSS_ERROR_FIELD_'.$FTRel.'.'.$key.'###']='';\n\t\t\t\t\t\t\t$this->markerArray['###CSS_ERROR_FIELD_'.$FTRel.'_'.$key.'###']='';\n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//<CBY> We go to detail mode directly if editUnique is true and there is only one elment to edit.\n\t\t\t$DBSELECT=$this->metafeeditlib->DBmayFEUserEditSelectMM($this->theTable,$GLOBALS['TSFE']->fe_user->user, $this->conf['allowedGroups'],$this->conf['fe_userEditSelf'],$mmTable,$this->conf).$GLOBALS['TSFE']->sys_page->deleteClause($this->theTable);\n\n\t\t\t$TABLES=$mmTable?$this->theTable.','.$mmTable:$this->theTable;\n\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('EDIT'=>$origArr));\n\t\t\tif (!is_array($origArr)&&$this->conf['editUnique']) {\n\t\t\t\t$lockPid = ($this->conf['edit.']['menuLockPid'] && $this->conf['pid'])? ' AND pid='.intval($this->thePid) : '';\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $TABLES, '1 '.$lockPid.$DBSELECT);\n\t\t\t\tif ($this->conf['debug']) \techo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('EDITUNIQUE TEST'=>$GLOBALS['TYPO3_DB']->SELECTquery('*', $TABLES, '1 '.$lockPid.$DBSELECT)));\n\t\t\t\t$resu=$GLOBALS['TYPO3_DB']->sql_num_rows($res);\n\t\t\t\tif ($resu>=1)\t{\n \t\t\t\t\twhile($menuRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t\t\t\t$origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $menuRow[$this->conf['uidField']]);\n\t\t\t\t\t\t$this->recUid=$menuRow[$this->conf['uidField']];\n\t\t\t\t\t\t$this->conf['recUid']=$this->recUid;\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t\t// <CBY>\n\t\t\t$this->markerArray['###REC_UID###']=$this->recUid;\n\t\t\t//if ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr))\t{\t// Must be logged in OR be authenticated by the aC code in order to edit\n\t\t\tif (($GLOBALS['TSFE']->loginUser && $this->conf['requireLogin']) || ( $this->aCAuth($origArr)&& $this->conf['requireLogin'])||!$this->conf['requireLogin'])\t{\n\t\t\t\t// Must be logged in OR be authenticated by the aC code in order to edit\n\t\t\t\t// If the recUid selects a record.... (no check here)\n\t\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('EDIT'=>\"No login\"));\n\t\t\t\n\t\t\t\t// We come from ??\n\t\t\t\tif (is_array($origArr) && !($this->conf['inputvar.']['BACK'] && $this->conf['inputvar.']['cameFromBlog']))\t{\n\t\t\t\t\tif ($this->conf['blogData']) $this->preview=1; \n\t\t\t\t\t// we check if edit or preview mode is allowed ...\n\t\t\t\t\tif (!$this->conf['edit'] && !$this->preview )\t{\t// If editing is enabled\n\t\t\t\t\t\t$content.='meta_feedit : feadminlib.inc, Edit-option is not set and Preview-option is not set in TypoScript';\n\t\t\t\t\t\treturn $content;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($this->conf['disableEdit'] && !$this->preview )\t{\t// If editing is enabled\n\t\t\t\t\t\t$content.='meta_feedit : feadminlib.inc, Edit-option disabled and Preview-option is not set in TypoScript';\n\t\t\t\t\t\treturn $content;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->aCAuth($origArr) || $this->metafeeditlib->DBmayFEUserEdit($this->theTable,$origArr, $GLOBALS['TSFE']->fe_user->user,$this->conf['allowedGroups'],$this->conf['fe_userEditSelf'],$this->conf))\t{\t\n\t\t\t\t\t\t// Display the form, if access granted.\n\t\t\t\t\t\tif ($this->conf['debug']) echo Tx_MetaFeedit_Lib_ViewArray::viewArray(array('EDIT'=>\"User may edit\"));\n\t\t\t\t\t\tif \t($this->conf['evalFunc'])\t{\n\t\t\t\t\t\t\t$origArr = $this->userProcess('evalFunc',$origArr);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->markerArray = $this->setfixed($this->markerArray, $this->conf['setfixed.'], $origArr);\n\t\t\t\t\t\t$content=$this->displayEditForm($origArr,$this->conf,$exporttype,$print,$printerName,$printServerName);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Else display error, that you could not edit that particular record...\t\n\t\t\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_NO_PERMISSIONS###');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// If the recUid did not select a record, we display a menu of records. (eg. if no recUid)\n\t\t\t\t\t// we check if list mode is allowed ...\n\t\t\t\t\tif (!$this->conf['list'])\t{\t// If editing is enabled\n\t\t\t\t\t\t\t$content.='List-option is not set in TypoScript';\n\t\t\t\t\t\t return $content;\n\t\t\t\t\t}\n\t\t\t\t\t//$content=($this->conf['general.']['listMode']==2)?$this->metafeeditgrid->displayGridScreen($TABLES,$DBSELECT,$this->conf):$this->displayListScreen($TABLES,$DBSELECT,$this->conf);\n\t\t\t\t\tswitch($this->conf['general.']['listMode']) {\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t$content=$this->metafeeditgrid->displayGridScreen($TABLES,$DBSELECT,$this->conf);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t\t//$content=$this->metafecalendar->displayCalendarScreen($TABLES,$DBSELECT,$this->conf);\n\t\t\t\t\t\t\t$cal=t3lib_div::makeInstance('tx_metafeedit_calendar');\n\t\t\t\t\t\t $cal->initObj($this->metafeeditlib,$this->cObj);\n\t\t\t\t\t\t\t$content=$cal->displayCalendarScreen($TABLES,$DBSELECT,$this->conf);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t$content=$this->displayListScreen($TABLES,$DBSELECT,$this->conf);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Finally this is if there is no login user. This must tell that you must login. Perhaps link to a page with create-user or login information.\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_AUTH###');\n\t\t\t}\n\t\t} else {\n\t\t\t$content.='Display Edit Screen : Edit-option , Preview-option or List-option is not set in TypoScript';\n\t\t}\n\t\treturn $content;\n\t}",
"public function edit(IdeaSubmission $ideaSubmission)\n {\n //\n }",
"public function getSpec_detail_info()\n {\n return $this->spec_detail_info;\n }",
"function edit_columns_html($column, $post_id){\n \n switch($column){\n \n // Name\n case 'name':\n \n echo '<code style=\"font-size: 12px;\">' . $this->get_name($post_id) . '</code>';\n break;\n \n // Field Groups\n case 'field_groups':\n \n $return = '—';\n \n $field_groups = acf_get_array(get_field('acfe_form_field_groups', $post_id));\n \n if(!empty($field_groups)){\n \n $links = array();\n \n foreach($field_groups as $key){\n \n $field_group = acf_get_field_group($key);\n \n if(!$field_group)\n continue;\n \n if(acf_maybe_get($field_group, 'ID')){\n \n $links[] = '<a href=\"' . admin_url(\"post.php?post={$field_group['ID']}&action=edit\") . '\">' . $field_group['title'] . '</a>';\n \n }else{\n \n $links[] = $field_group['title'];\n \n }\n \n }\n \n $return = implode(', ', $links);\n \n }\n \n echo $return;\n break;\n \n // Actions\n case 'actions':\n \n $return = '—';\n \n $icons = array();\n \n if(have_rows('acfe_form_actions', $post_id)):\n while(have_rows('acfe_form_actions', $post_id)): the_row();\n \n // Custom\n if(get_row_layout() === 'custom'){\n \n $action_name = get_sub_field('acfe_form_custom_action');\n \n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-editor-code\" title=\"Custom action: ' . $action_name . '\"></span>';\n \n }\n \n // E-mail\n elseif(get_row_layout() === 'email'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-email\" title=\"E-mail\"></span>';\n }\n \n // Post\n elseif(get_row_layout() === 'post'){\n \n $action = get_sub_field('acfe_form_post_action');\n \n // Insert\n if($action === 'insert_post'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-edit\" title=\"Create post\"></span>';\n }\n \n // Update\n elseif($action === 'update_post'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-update\" title=\"Update post\"></span>';\n }\n \n }\n \n // Term\n elseif(get_row_layout() === 'term'){\n \n $action = get_sub_field('acfe_form_term_action');\n \n // Insert\n if($action === 'insert_term'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-category\" title=\"Create term\"></span>';\n }\n \n // Update\n elseif($action === 'update_term'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-category\" title=\"Update term\"></span>';\n }\n \n }\n \n // User\n elseif(get_row_layout() === 'user'){\n \n $action = get_sub_field('acfe_form_user_action');\n \n // Insert\n if($action === 'insert_user'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-admin-users\" title=\"Create user\"></span>';\n }\n \n // Update\n elseif($action === 'update_user'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-admin-users\" title=\"Update user\"></span>';\n }\n \n // Update\n elseif($action === 'log_user'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-migrate\" title=\"Log user\"></span>';\n }\n \n }\n \n endwhile;\n endif;\n \n if(!empty($icons)){\n $return = implode('', $icons);\n }\n \n echo $return;\n break;\n \n // Shortcode\n case 'shortcode':\n \n echo '<code style=\"font-size: 12px;\">[acfe_form name=\"' . $this->get_name($post_id) . '\"]</code>';\n break;\n \n }\n \n }",
"public function get_editentries() {\n return $this->_editentries;\n }",
"public function getPopup() { \n if($this->blocks) {\n return $this->desc . \"<BR /> <BR />\" . \n \"<b>Blocks\" . \n ($this->charges > 0 ? \" \" . $this->charges . \" more\" : \"\") .\n ($this->blockActionTypes != \"all\" ? $this->blockActionTypes : \"\") . \" actions\" . \n ($this->blockChance < 1 ? \" with a chance of \" . floor($this->blockChance * 100) . \"%\" : \"\") . \n ($this->turns > 0 ? \" within the next \" . $this->turns . \" rounds\" : \"\") .\n \".\";\n }\n return $this->desc;\n }",
"function edit()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t\n\t\tif ($_SERVER['REQUEST_METHOD'] == \"GET\") {\n\t\t\t\n\t\t\t//render the edit form\n\t\t\t$view = $this->getView('manage','html');\n\t\t\t\n\t\t\t//load data\n\t\t\t$db->setQuery('select * from #__shbesuche_config');\n\t\t\t$view->config = $db->loadObject();\n\t\t\t$db->setQuery('select * from #__pbbooking_events where id = '.$db->escape(JRequest::getInt('id')));\n\t\t\t$view->event = $db->loadObject();\n\t\t\t$db->setQuery('select * from #__pbbooking_treatments');\n\t\t\t$view->services = $db->loadObjectList();\n\t\t\t$db->setQuery('select * from #__pbbooking_cals');\n\t\t\t$view->cals = $db->loadObjectList();\n\t\t\tif ($view->config->consolidated_view == 1) { \n\t\t\t\t$db->setQuery('select * from #__pbbooking_cals where out_cal = 1');\n\t\t\t\t$view->outcal = $db->loadObject();\n\t\t\t}\n\t\t\t//sort out openign and closing times\n\t\t\t$opening_hours = json_decode($view->config->trading_hours,true);\n\t\t\t$opening_time_arr = str_split($opening_hours[date_create($view->event->dtstart, new DateTimeZone(SHBESUCHE_TIMEZONE))->format('w')]['open_time'],2);\n\t\t\t$closing_time_arr = str_split($opening_hours[date_create($view->event->dtstart, new DateTimeZone(SHBESUCHE_TIMEZONE))->format('w')]['close_time'],2);\n\t\t\t$view->dt_start = date_create($view->event->dtstart,new DateTimeZone(SHBESUCHE_TIMEZONE));\n\t\t\t$view->dt_end = date_create($view->event->dtstart,new DateTimeZone(SHBESUCHE_TIMEZONE));\n\t\t\t$view->dt_start->setTime($opening_time_arr[0],$opening_time_arr[1]);\n\t\t\t$view->dt_end->setTime($closing_time_arr[0],$closing_time_arr[1]);\n\t\t\t\n\t\t\t//display the view\n\t\t\t$view->setLayout('edit_event');\n\t\t\tJToolbarHelper::save('edit',Jtext::_('COM_SHBESUCHE_SAVE_CHANGES'));\n\t\t\tJToolbarHelper::trash('delete',Jtext::_('COM_SHBESUCHE_DELETE_EVENT'),false);\n\t\t\tJToolbarHelper::custom('view_ical','view_ics','',Jtext::_('COM_SHBESUCHE_VIEW_ICS'),false);\n\t\t\tJToolbarHelper::cancel();\n\t\t\t$view->display();\n\t\t}\n\t\t\n\t\tif ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n\t\t\t$db->setQuery('select * from #__pbbooking_events where id = '.$db->escape(JRequest::getInt('id')));\n\t\t\t$event = $db->loadObject();\n\t\t\t$db->setQuery('select * from #__pbbooking_treatments where id = '.$db->escape($event->service_id));\n\t\t\t$service = $db->loadObject();\n\t\t\t\n\t\t\t$treatment_time = JRequest::getVar('treatment-time');\n\t\t\t$times_arr = str_split($treatment_time,2);\n\t\t\t$dtstart = date_create(JRequest::getVar('date'),new DateTimeZone(SHBESUCHE_TIMEZONE));\n\t\t\t$dtstart->setTime((int)ltrim($times_arr[0],'0'),(int)ltrim($times_arr[1],'0'),0);\n\t\t\t$dtend = date_create($dtstart->format(DATE_ATOM),new DateTimeZone(SHBESUCHE_TIMEZONE));\n\t\t\t$dtend->modify('+'.$service->duration.' minutes');\n\t\t\t\n\t\t\t$event->summary = JRequest::getVar('summary');\n\t\t\t$event->description = JRequest::getVar('description');\n\t\t\t$event->dtstart = $dtstart->format('Y-m-d H:i:s');\n\t\t\t$event->dtend = $dtend->format('Y-m-d H:i:s');\n\n\n\t\t\tif ((int)$_POST['reccur'] == 1) {\n\t\t\t\t$event->r_int = JRequest::getVar('interval');\n\t\t\t\t$event->r_freq = JRequest::getVar('frequency');\n\t\t\t\t$event->r_end = JRequest::getVar('recur_end');\n \t\t\t}\t\n\n\t\t\tif (isset($_POST['cal_id'])) $event->cal_id = JRequest::getInt('cal_id');\n\t\t\tif ($db->updateObject('#__pbbooking_events',$event,'id')) {\n\t\t\t\t$this->setRedirect('index.php?option=com_pbbooking&controller=manage&date='.JRequest::getVar('date'),Jtext::_('COM_SHBESUCHE_EDIT_SUCCESS'));\n\t\t\t} else {\n\t\t\t\techo $db->getErrorMsg();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\n\t}",
"public function create()\n {\n return view('bug.create');\n }",
"function getDetails() {\n\t\treturn $this->data_array['details'];\n\t}",
"public function edit($id)\n\t{\n\t\t$edit_data = fc_comment::where('id',$id)->first();\n\t\treturn view(\"vendor.pingpong.admin.comments.edit\")->with('edit', $edit_data);\n\t}",
"public function edit()\n\t{\n //$CityMod = M('hangye');\n //$hangye_list = $CityMod->field('id,title')->where(\" status=1 \" )->order('sort asc')->select();\n //echo \"<pre>\";print_r($hangye_list);exit;\n // $this->assign('hangye_list', $hangye_list);\n\n\n \t///注意:老信息反馈信息反馈已填写情况下不允许修改信息反馈名,信息反馈名空可设置,需检查唯一\n \t///email 改变的话 还要检查 email 不重复\n\n\t\tif(isset($_POST['dosubmit'])){\n\t\t\t$id = intval($this->REQUEST('id'), 0);\n\n // $rst=$this->CheckcontactData_Post($id);\n\n/*\n \t///密码为空则不修改密码\n \tif( isset($_POST['password'])){\n if($_POST['password'] != '' ){\n \t\t $_POST['password'] = md5($_POST['password']);\n \t }\n \t else{\n unset( $_POST['password'] );\n \t }\n }*/\n\n\t $contactMod = M('contact');\n\n\t if($contactMod->create()) {\n\t \t\n //$rst=$this->CheckcontactData_Mod($contactMod,$id);\n $contactMod->modify_time=time();\n\n\t $result = $contactMod->save();\n\t if($result) {\n\t $this->success('操作成功!', U('contact/edit', array('id'=>$id)) );\n\t }else{\n\t $this->error('写入错误!');\n\t }\n\t }else{\n\t $this->error($contactMod->getError());\n\t }\n\n\t\t}else{\n\t\t\tif( isset($_GET['id']) ){\n\t\t\t\t$id = isset($_GET['id']) && intval($_GET['id']) ? intval($_GET['id']) : $this->error(L('参数错误'));\n\t\t\t}\n\n\t $contactMod = M('contact');\n\t\t // 读取数据\n\t\t $data = $contactMod->find($id);\n\t\t if($data) {\n\t\t $this->record = $data;// 模板变量赋值\n\t\t }else{\n\t\t $this->error('信息反馈读取错误');\n\t\t }\n \n\t\t\t$PageTitle = L('编辑信息反馈');\n\t\t\t$PageMenu = array(\n\t\t\t\t\t//array( U('contact/create'), L('信息反馈') ),\n\t\t\t\t\tarray( U('contact/listing'), L('信息反馈列表') ),\n\t\t\t);\n\t\t\t$this->setPagething( $PageTitle, $PageMenu, true);\n\t\t\t$this->display();\n\t\t}\n\t}",
"public function edit($id)\n {\n $issue = Issue::find($id);\n $issue->release_date = explode(' ', $issue->release_date)[0];\n return view('issues.edit')->withIssue($issue);\n }",
"public function edit() {\n\t\t\t\n\t\t}",
"public function getChangeLogDescription()\r\n {\r\n $hide = array(\r\n \"revision\",\r\n \"uname\",\r\n \"num_comments\",\r\n \"num_attachments\",\r\n );\r\n $buf = \"\";\r\n foreach ($this->changelog as $fname=>$log)\r\n {\r\n $oldVal = $log['oldval'];\r\n $newVal = $log['newval'];\r\n\r\n $field = $this->def->getField($fname);\r\n\r\n // Skip multi key arrays\r\n if ($field->type == \"object_multi\" || $field->type == \"fkey_multi\")\r\n continue;\r\n\r\n if ($field->type == \"bool\")\r\n {\r\n if ($oldVal == 't') $oldVal = \"Yes\";\r\n if ($oldVal == 'f') $oldVal = \"No\";\r\n if ($newVal == 't') $newVal = \"Yes\";\r\n if ($newVal == 'f') $newVal = \"No\";\r\n }\r\n\r\n if (!in_array($field->name, $hide))\r\n {\r\n $buf .= $field->title . \" was changed \";\r\n if ($oldVal)\r\n $buf .=\"from \\\"\" . $oldVal . \"\\\" \";\r\n $buf .= \"to \\\"\" . $newVal . \"\\\" \\n\";\r\n }\r\n }\r\n\r\n if (!$buf)\r\n $buf = \"No changes were made\";\r\n\r\n return $buf;\r\n }",
"function get_attachment_fields_to_edit($post, $errors = \\null)\n {\n }",
"public function getEditInput();",
"public function submissionDetailsEdit2(){\r\n\t\t\t$this->load->model('gs_admission/ajax_base_model', 'AB');\r\n\t\t\t$data_id = $this->input->post(\"data_id\");\r\n\t\t\t$details = $this->AB->list_of_admission_form3($data_id);\r\n\r\n\t\t\t$data[\"data_id\"] = $details;\r\n\t\t\t\r\n\r\n\t\t\t$grade_id = (int)$details[\"Grade_id\"];\r\n\t\t\t$Batch_id = (int)$details[\"Batch_id\"];\r\n\t\t\t\r\n\t\t\t$data[\"formBatchDetails\"] = $this->AB->getGradeFormBatch($grade_id);\r\n\r\n\t\t\t\r\n\t\t\t$data[\"school_lists\"] = $this->AB->school_id();\r\n\t\t\t$data[\"grade_lists\"] = $this->AB->grade_id();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$this->load->model('gs_admission/submission_model', 'SM');\r\n\t\t\t$data[\"slotInfo\"] = $this->SM->getSlots($Batch_id,$data_id);\r\n\r\n\t\t\t$this->load->view('gs_admission/submission/form_only',$data);\r\n\t\t}",
"public function edit(feedback $feedback)\n {\n //\n }",
"public function home_featured_data_edit() {\n Session::put('menu_item_parent', 'home');\n Session::put('menu_item_child', 'home_featured_data');\n Session::put('menu_item_child_child', '');\n $board = HomeFeaturedData::first(); \n $providers = Provider::get();\n\n $statusList = array(\n 0 => 'Unpublish',\n 1 => 'Publish'\n );\n\n $offers = Offer::where('status',1)->pluck('offerTitle','offerIdx')->toArray();\n \n $data = array('board', 'providers', 'statusList','offers');\n return view('admin.home_featured_data_edit', compact($data));\n }",
"public function actionsurveydetails()\n {\n $model = new Troubleticket;\n $this->LoginCheck();\n $module = \"HelpDesk\";\n $urlquerystring = $_SERVER['QUERY_STRING'];\n $paraArr = explode(\"/\", $urlquerystring);\n $ticketId = $paraArr['2'];\n $storedata = $model->findById($module, $ticketId);\n\n $picklist_damagestatus = $model->getpickList('damagestatus');\n $this->render('surveydetails', array('model' => $model,\n 'result' => $storedata,\n 'damagestatus' => $picklist_damagestatus)\n );\n }",
"public function edit($id)\n {\n $recent = Project_updates::find($id);\n $ideas = Idea::all();\n return view('Admin.recents.edit',compact('recent','ideas'));\n }",
"function lb_show_edit_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'edit',\n\t\t\t'this_cafe' => lb_get_this_cafe_from_cafe( $_GET['edit-id'] ),\n\t\t)\n\t);\n}",
"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}",
"public function getName()\n {\n return 'vlad_bugtracker_issue';\n }",
"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()\n\t{\n\t\t\n\t}",
"public function getCpEditUrl()\n {\n return UrlHelper::cpUrl('simple-forms/submissions/edit/'.$this->id);\n }",
"function table_row_bug_info_short($p_key, $p_value){\n\ttable_row(array($p_key, $p_value), '', array('class=\"no-border bug-header\" width=\"30%\"', 'class=\"no-border\"'));\n}",
"private function printTicketDetails()\n {\n $data = array();\n\n $ticket_id = $this->param[2];\n\n $data['ticket_status_type'] = Utils::arrayAlterKeyValue(\n $GLOBALS['TICKET_STATUS_TYPE']\n );\n \n $my_sources = array();\n foreach($_SESSION['LOGIN_USER']['sources'] as $index => $source)\n {\n $my_sources[$source->source_id] = $source->name;\n }\n $data['source_list'] = $my_sources;\n \n $sql = \"SELECT t.*, ts.source_id \n FROM \" . TICKETS_TBL . \" as t, \" . TICKET_SOURCES_TBL . \" as ts \n WHERE t.ticket_id = ts.ticket_id AND t.ticket_id = $ticket_id\";\n try\n {\n $ticket = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n\n $ticket = isset($ticket[0]) ? $ticket[0] : new stdClass();\n $ticket->status_text = $GLOBALS['TICKET_STATUS_TYPE'][$ticket->status];\n $ticket->create_date = date('l jS F Y @ h:i A (T)', \n strtotime($ticket->create_date));\n $data['ticket'] = $ticket;\n\n $sql = \"SELECT d.*, u.first_name, u.last_name \n FROM \" . TICKETS_DETAILS_TBL . \" as d, \" . USERS_TBL . \" as u \n WHERE d.user_id = u.user_id \n AND d.ticket_id = $ticket_id \n ORDER BY d.create_date desc\";\n try\n {\n $list = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n\n // if($list)\n // {\n // foreach($list as $index => $row)\n // {\n // $list[$index]->create_date = date('l jS F Y @ h:i A (T)', \n // strtotime($row->create_date));\n // }\n // }\n // \n // $first_detail_pos = count($list)-1;\n // $first_detail = $list[$first_detail_pos];\n // unset($list[$first_detail_pos]);\n // \n // $data['first_detail'] = $first_detail;\n // $data['detail_list'] = $list;\n \n if($list)\n {\n foreach($list as $index => $row)\n {\n $row->create_date = date('l jS F Y @ h:i A (T)', \n strtotime($row->create_date));\n if($row->type == 1)\n {\n $description = $row;\n }\n else\n {\n $res[] = $row;\n }\n }\n }\n $data['first_detail'] = $description;\n $data['detail_list'] = $res;\n \n $list = array();\n $sql = \"SELECT * \n FROM \" . TICKET_ATTACHMENTS_TBL . \" \n WHERE deleted = 0 AND ticket_id = $ticket_id\";\n try\n {\n $rows = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n \n if($rows)\n {\n foreach($rows as $index => $row)\n {\n $list[$row->details_id][] = $row;\n }\n }\n $data['attachments_by_details_id'] = $list;\n\n $data['ticket_status_list'] = $GLOBALS['TICKET_STATUS_TYPE'];\n $data['login_user_id'] = $_SESSION['LOGIN_USER']['userId'];\n \n $data['add_detail_dialog'] = $this->template\n ->parseTemplate(TICKET_DETAIL_DIALOG_TEMPLATE, $data);\n\n $data['add_tag_dialog'] = $this->template\n ->parseTemplate(TICKET_TAG_DIALOG_TEMPLATE, $data);\n\n $data['is_source'] = count($_SESSION['LOGIN_USER']['authorized_sources']);\n $data['is_executive'] = Utils::isExecutive($ticket->source_id);\n \n //return $this->template->parseTemplate(TICKET_DETAIL_TEMPLATE, $data);\n echo $this->template->parseTemplate(PRINT_TICKET_DETAIL_TEMPLATE, $data);\n exit;\n }",
"function getDeveloper($bugid, $patch, $revision = false)\n\t{\n\t\tif ($revision) {\n\t\t\treturn $this->_dbh->prepare('\n\t\t\t\tSELECT developer\n\t\t\t\tFROM bugdb_patchtracker\n\t\t\t\tWHERE bugdb_id = ? AND patch = ? AND revision = ?\n\t\t\t')->execute([$bugid, $patch, $revision])->fetchOne();\n\t\t}\n\t\treturn $this->_dbh->prepare('\n\t\t\tSELECT developer, revision\n\t\t\tFROM bugdb_patchtracker\n\t\t\tWHERE bugdb_id = ? AND patch = ? ORDER BY revision DESC\n\t\t')->execute([$bugid, $patch])->fetchAll(PDO::FETCH_ASSOC);\n\t}",
"function display_bug_list($utype, $uid) {\n $mysqli = $this->mysqli;\n if ($utype == \"Developer\") {\n $sql = \"SELECT * from bug_report WHERE tested_by IN (SELECT app_tester from application where app_dev='$uid');\";\n }\n else if ($utype == \"Tester\") {\n $sql = \"SELECT * from bug_report WHERE tested_by ='$uid';\";\n }\n else if ($utype == \"admin\") {\n $sql = \"SELECT * from bug_report\";\n }\n if ($result = $mysqli->query($sql)) {\n return $result;\n }\n else {\n echo $mysqli->error;\n }\n }",
"public function editForm($id)\n {\n $record = HistoryDb::findOrFail($id);\n $this->edit_id = $id;\n $this->title = $record->title;\n $this->description = $record->description;\n $this->event_date = $record->event_date;\n $this->mode = 'edit';\n $this->submit_text = \"Update\";\n\n // Util::showAlert($this,'Test content...!');\n\n }",
"public function edit(Submission $submission)\n {\n //\n }",
"function debug($bug)\n{\n echo '<pre style=\"padding: 15px; background: #000; display:block; width: 100%; color: #fff;\">';\n var_dump($bug);\n echo '</pre>';\n}"
] | [
"0.6919226",
"0.67677397",
"0.625697",
"0.6183319",
"0.6159619",
"0.6142164",
"0.608063",
"0.60436064",
"0.5992308",
"0.595144",
"0.5945361",
"0.5807392",
"0.57942796",
"0.5749806",
"0.5730146",
"0.5653799",
"0.5650548",
"0.56180835",
"0.56001145",
"0.5593354",
"0.55507857",
"0.5548629",
"0.554062",
"0.55285066",
"0.5469965",
"0.5451371",
"0.545118",
"0.5450423",
"0.5447131",
"0.5446538",
"0.54460543",
"0.5440437",
"0.54224956",
"0.541652",
"0.54097164",
"0.5396831",
"0.53953147",
"0.53779095",
"0.53580683",
"0.53560424",
"0.53532267",
"0.53491044",
"0.53380525",
"0.53272635",
"0.5317283",
"0.5315099",
"0.5310504",
"0.5288508",
"0.5286748",
"0.5278206",
"0.5275304",
"0.52668905",
"0.5265552",
"0.5263802",
"0.5262221",
"0.5253745",
"0.52535367",
"0.5252213",
"0.5249717",
"0.5249717",
"0.5249717",
"0.5249462",
"0.52470803",
"0.5246114",
"0.5235289",
"0.5232764",
"0.5231932",
"0.52241695",
"0.5214441",
"0.51912093",
"0.51902956",
"0.5190114",
"0.5182011",
"0.5177734",
"0.5177516",
"0.5175594",
"0.51751053",
"0.5166232",
"0.51645625",
"0.5160866",
"0.5157575",
"0.51503",
"0.51485693",
"0.51418954",
"0.5141782",
"0.5140892",
"0.5138766",
"0.513492",
"0.5134804",
"0.51347405",
"0.5130579",
"0.51286024",
"0.51262146",
"0.5124693",
"0.51203656",
"0.51175725",
"0.51153326",
"0.51062715",
"0.51055",
"0.5105456"
] | 0.6501748 | 2 |
Get value for given key or fallback to default. | public function get(string $key, $default = null); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get(string $key, mixed $default = null): mixed;",
"public function get(string $key, mixed $default = null): mixed;",
"public function getValueOrDefault($key) {\n return $this->values->get($key) !== NULL\n ? $this->values->get($key)\n : $this->values->get('Default'.$key);\n }",
"public function get(string $key, $default = null): mixed;",
"public function get($key, $default = null)\n\t{\n\t\tif ($option = self::where('key', $key)->first()) {\n\t\t\treturn $option->value;\n\t\t}\n\n\t\treturn $default;\n\t}",
"public function getOrDefault($key, $defaultValue);",
"public function get(string $key, $default = null)\n {\n\t\treturn array_key_exists($key, $this->values) ? $this->values[$key] : $default;\n\t}",
"public function get($key, $default = null)\r\n\t{\r\n\t\tlist($baseKey, $searchKey) = $this->fetchKey($key);\r\n\r\n\t\t$value = $this->fetchValue($baseKey, $searchKey);\r\n\r\n\t\treturn ( ! is_null($value) ) ? $value : $default;\r\n\t}",
"public function get($key, $default = null) {\n return array_key_exists($key, $this->values) ? $this->values[$key] : $default;\n }",
"public static function get($key, $default = null) {\n $segments = explode('.', $key);\n\n // Check to see if the value is already loaded.\n $value = static::lookup($segments);\n if ($value !== null) return $value;\n\n if (count($segments) < 3) return $default;\n\n // Attempt a 'lazy load' if the key has at least 3 segments.\n if (!static::load($segments)) return $default;\n\n // Recheck for the setting.\n $value = static::lookup($segments);\n return $value !== null ? $value : $default;\n }",
"function getValue($key, $default = null)\r\n {\r\n return $this->coalesce($this->container[$key], $default);\r\n }",
"public function get($key, $default = null) {\n if ($this->exists($key)) {\n return $this->data[$key];\n }\n\n return $default;\n }",
"private function get($key, $default = null)\n {\n $key = mb_strtolower($key);\n\n return isset($this->data[$key]) ? $this->data[$key] : $default;\n }",
"public function get($key, $default = null)\n {\n if(isset($this->values[$key])) {\n return $this->values[$key];\n }\n return $default;\n }",
"public static function getValue(string $key)\n {\n return optional(static::get($key))->getValue();\n }",
"function get($key, $default = null);",
"public function get(string $key, mixed $default = null): mixed\n {\n $data = $this->arrayify();\n\n return array_get($data, $key, $default);\n }",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"public function get($key, $default = null);",
"final public static function get($key, $default = FALSE) {\n if (is_num($key) OR is_false($old = static::fetch_item($key))) {\n return $default;\n }\n return $old;\n }",
"private function _get($key, $default = null) {}",
"public function get( $key, $default = null ) {\n\t\treturn data_get( $this->data, $key, $default );\n\t}",
"public function getIfExists($key, $default_value=null);",
"public function get(string $key, $default = null)\n {\n return Arr::get($this->values, $key, $default);\n }",
"public function val($key, $default = null) {\n return $this->field[$key] ?? $default;\n }",
"public function get($key, $default = null)\n {\n return (!is_null($item = $this->retrieve($key))) ? $item : $default;\n }",
"public function get($key, $default = null)\n {\n return array_key_exists($key, $this->data) ? $this->data[$key] : $default;\n }",
"public function get($key, $default = null)\n {\n $value = $this->driver->get($key);\n\n return ! is_null($value) ? $value : value($default);\n }",
"public static function get ( $key, $default = null ) {\n return self::getAdapter()->get( $key );\n }",
"public function get( $key, $default = null )\n\t\t{\n\t\t\treturn isset( $this->_data[ $key ] )? $this->_data[ $key ]: $default;\n\t\t}",
"public function getValue( $a_key, $a_default = null )\r\n\t{\r\n\t\treturn $this->_get($a_key, $a_default);\r\n\t}",
"public function getValue($key, $default = null)\n {\n if (is_array($this->kwargs) && isset($this->kwargs[$key])) {\n return $this->kwargs[$key];\n }\n return $default; // @codeCoverageIgnore\n }",
"public function value($key, $default = NULL)\n {\n return $this->get($key, $default);\n }",
"public function get($key, $defaultValue = null);",
"public function get($key = null, $default = null)\n {\n if($key == null){\n return $this->get;\n }\n else {\n if(array_key_exists($key, $this->get)){\n return $this->get[$key];\n }\n return $default;\n }\n }",
"public function get(string $key, $default = null)\n {\n return array_get($this->raw, $key, $default);\n }",
"public function get( $key = null, $default = null )\n {\n return Utils::get( $this->_original, $key, $default );\n }",
"public function get(string $key, $defaultValue = null) {}",
"public function get(string $key, $defaultValue = null) {}",
"public function get(string $key, $default = false);",
"public static function get(string $key, $default = null)\n {\n return Option::fromValue(static::getVars()->get($key))\n ->map(function ($value) {\n switch (mb_strtolower($value)) {\n case 'false':\n return false;\n case 'true':\n return true;\n case 'null':\n return null;\n }\n\n return $value;\n })\n ->getOrCall(function () use ($default) {\n return $default;\n });\n }",
"public function get ($key, $default=false) {\r\n\t\treturn !empty($this->_data[$key])\r\n\t\t\t? $this->_data[$key]\r\n\t\t\t: $default\r\n\t\t;\r\n\t}",
"public static function Get($key = '')\r\n {\r\n $result = null;\r\n if (isset(self::$Data[$key])) {\r\n $result = self::$Data[$key];\r\n } else {\r\n $defaults = self::GetAllDefaults();\r\n if (isset($defaults[$key])) {\r\n $result = $defaults[$key];\r\n }\r\n }\r\n return $result;\r\n }",
"public static function get($key, $default = null) {\n if (isset($_GET[$key])) {\n return $_GET[$key];\n }\n\n return $default;\n }",
"public function get(\n string $key,\n $default = null,\n ) {\n $this->boot();\n\n /**\n * @var Get $event\n */\n $event = $this->configuration->eventDispatcher()->dispatch(new Get($this, $key));\n $value = $event->getValue();\n\n if (null === $value) {\n return $default;\n }\n\n return $value;\n }",
"public static function get($key, $default = null)\n {\n return Arr::get(static::load(), self::buildKey($key), $default);\n }",
"public function get($key, $default = null)\n {\n if(!isset($this->item[$item = explode('.', $key)[0]])){\n $this->add($item);\n }\n return data_get($this->item, $key, $default);\n }",
"public function get(string $key)\n {\n $result = null;\n\n if ($this->has($key)) {\n $result = $this->values[$key];\n }\n\n return $result;\n }",
"public function get ($key, $default=false);",
"public function get(string $key, mixed $default = null): mixed\n {\n $value = $this->cache->get($key);\n\n if ($value === null) {\n return $default;\n }\n\n return $value;\n }",
"public function get($key, $default=false) {\n if(isset($this->_data[$key]))\n return $this->_data[$key];\n return $default;\n }",
"function get($key, $defaultValue = NULL);",
"public function __get($key, $default = null)\n\t{\n\t\tif(isset($this->data[$key])) {\n\t\t\treturn $this->data[$key];\n\t\t}\n\t\treturn $default;\n\t}",
"abstract public function Get(string $key, $default = NULL);",
"function get($key, $default=null) {\n\t\tif (isset($this->_cache[$key])) {\n\t\t\treturn $this->_cache[$key][0];\n\t\t}\n\t\t// return default if requested\n\t\tif ($default !== null) return $default;\n\n\t\tthrow new Task_Exception(\"Missing value for {$key}\");\n\t}",
"public function getValue($key, $default = NULL) {\n\t\tif(array_key_exists($key, $this->config)) {\n\t\t\treturn $this->config[$key];\n\t\t}\n\n\t\treturn $default;\n\t}",
"public function get($key, $default = null)\r\n {\r\n if ($this->offsetExists($key)) {\r\n return $this->items[$key];\r\n }\r\n\r\n return value($default);\r\n }",
"public function get( $key, $default = null )\n {\n if ( is_null( $key ) ) {\n return $this->all();\n }\n\n $this->loadSettingsIfNotLoaded();\n\n $value = array_get( $this->settings, $key, $this->randomDefaultValue );\n\n if ( $this->randomDefaultValue !== $value ) {\n\n if ( $value === false ) {\n return value( $default );\n }\n\n if ( !is_string( $value ) ) {\n return $value;\n }\n\n switch ( strtolower( $value ) ) {\n case 'true':\n case '(true)':\n return true;\n\n case 'false':\n case '(false)':\n return false;\n\n case 'empty':\n case '(empty)':\n return '';\n\n case 'null':\n case '(null)':\n return null;\n }\n\n return $value;\n }\n\n return $default;\n }",
"public function get($key, $default = null)\n {\n\n $value = $this->store->get($key);\n\n if (is_null($value)){\n $value = value($default);\n }\n\n return $value;\n }",
"public static function get( string $key ) {\n\t\t$option = static::find( $key );\n\n\t\treturn false === $option ? false : $option->value;\n\t}",
"public function get(string $key, mixed $default = null): mixed\n {\n return $this->variables[$key] ?? $default;\n }",
"public function get($key, $default = null)\n\t{\n\t\tif (isset($this->_object[$key]))\n\t\t{\n\t\t\treturn $this->_object[$key];\n\t\t}\n\t\t\n\t\treturn $default;\n\t}",
"public function get(mixed $key): mixed\n {\n return\n ($index = $this->indexOf($key)) > -1 ?\n $this->values[$index] :\n null;\n }",
"public function getOption ($key, $default = '') {\n $value = $default;\n\n # Search through sections and take the value from the first section\n foreach ($this->_sections as $section) {\n if (isset ($this->_values[$section.$key])) {\n $value = $this->_values[$section.$key];\n break;\n }\n }\n\n return $value;\n }",
"public function get($key, $default = null)\n {\n if ($this->offsetExists($key)) {\n return $this->items[$key];\n }\n\n return $default;\n }",
"public function get($key, $default = null)\n {\n return $this->has($key) ? $this->params[$key] : $default;\n }",
"public function get($key, $default_val = null)\r\n {\r\n if (isset($this->attributes[$key])) {\r\n return $this->attributes[$key];\r\n }\r\n\r\n return $default_val;\r\n }",
"abstract public function get($key, $default = false);",
"public function get(string $key, $defaultValue = false)\n\t{\n\t\treturn $this->valueMap[$key] ?? $defaultValue;\n\t}",
"public function get($key, $default = null)\n {\n return $this->query->get(\n $key,\n $this->attributes->get(\n $key,\n $this->request->get(\n $key,\n $default\n )\n )\n );\n }",
"public function get($key, $default = null)\n {\n $data = new Data(self::$configs);\n\n if ($this->has($key)) {\n return $data->get($key);\n }\n\n return $default;\n }",
"public function get( $key, $default = null ) \n\t{\n\t\tif ( !isset( $this->GET[$key] ) ) \n\t\t{\n\t\t\treturn $default;\n\t\t}\n\t\treturn $this->GET[$key];\n\t}",
"public function get($key, $default = null)\n {\n if ($this->containsKey($key)) {\n return $this->items[$key];\n }\n\n return $default;\n }",
"public function get(string $key, $default = null) {\n if ($field = Field::findByKey($key)) {\n switch ($field->getFieldValueType()) {\n case Field::FIELD_VALUE_TYPE_INTEGER:\n return (int)$field->getFieldValue();\n case Field::FIELD_VALUE_TYPE_FLOAT:\n return (float)$field->getFieldValue();\n case Field::FIELD_VALUE_TYPE_BOOLEAN:\n return $field->getFieldValue() === 'true';\n case Field::FIELD_VALUE_TPE_SERIALIZED:\n return unserialize($field->getFieldValue());\n case Field::FIELD_VALUE_TYPE_STRING:\n default:\n return strval($field->getFieldValue());\n }\n }\n return value_of($default);\n }",
"public function get ($key, $default = null): mixed\n {\n if ($this->existsInCache($key)){\n return $this->fromCache($key);\n }\n\n return $this->addToCache(\n $key, $this->extractFromConfig($key)?? $default\n );\n }",
"public static function get(?string $key = null, $default = null)\n {\n return static::getInstance()->get($key, $default);\n }",
"public function get($key, $default = null)\n {\n return DotArr::get($this->data, $key, $default);\n }",
"public function get($key, $default = null)\n {\n return array_key_exists($key, $this->parsedOptions) ? $this->parsedOptions[$key] : $default;\n }",
"public static function getValue($key, &$arr, $default = NULL)\n\t{\n\t\tif (Helper_Check::isStringEmptyOrNull($key))\n\t\t\treturn ($default !== NULL) ? $default : NULL;\n\t\t\t\n\t\tif (array_key_exists($key, $arr))\n\t\t\treturn $arr[$key];\n\t\t\t\n\t\treturn !Helper_Check::isNull($default) ? $default : NULL;\n\t}"
] | [
"0.80616677",
"0.80616677",
"0.802364",
"0.80105823",
"0.7990101",
"0.7983538",
"0.7841551",
"0.784092",
"0.7811634",
"0.776442",
"0.7735907",
"0.7730122",
"0.77077806",
"0.768114",
"0.7656249",
"0.75836086",
"0.7580555",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.75744015",
"0.7570785",
"0.75324434",
"0.75147206",
"0.7476369",
"0.74737537",
"0.74653363",
"0.7463787",
"0.7450607",
"0.74484557",
"0.7442913",
"0.74205065",
"0.7355787",
"0.7338086",
"0.7322422",
"0.7321983",
"0.731733",
"0.73041624",
"0.72943354",
"0.7293383",
"0.7293383",
"0.728749",
"0.7287349",
"0.72813755",
"0.72783244",
"0.7274897",
"0.7264242",
"0.7243739",
"0.7230481",
"0.7221415",
"0.72197926",
"0.721925",
"0.7214511",
"0.72048247",
"0.7199062",
"0.7197231",
"0.71934533",
"0.71760404",
"0.7173137",
"0.7150657",
"0.71506536",
"0.714815",
"0.7131271",
"0.71309304",
"0.71061873",
"0.71016574",
"0.7100485",
"0.70871514",
"0.7072999",
"0.7070845",
"0.70621943",
"0.70567745",
"0.70459306",
"0.7042361",
"0.7042013",
"0.7033807",
"0.7022566",
"0.7008401",
"0.70076346",
"0.6989537",
"0.698406"
] | 0.7664975 | 20 |
Constructor This is the constructor for the Spaz_Urltitle object | public function __construct($url)
{
$this->server = new Memcache();
$this->server->addServer('localhost');
$this->url = $url;
$this->url_hash = md5($url);
$this->url_key = 'urltitle_'.$this->url_hash;
$this->curl = curl_init();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct($title) {\n $this->title = $title;\n }",
"function __construct($title = \"Default\") {\n\t\t$this->_title = $title;\n\t}",
"protected function __construct($title) {\n $this->title = $title;\n }",
"public function __construct($url, $title){\r\r\n\t\tparent::__construct(self::GOOGLE_BASE_SHARE_URL, $url, $title);\r\r\n\t}",
"public function __construct($title)\n {\n $this->title = $title;\n }",
"function __construct()\r\n\t{\r\n\t\t$this->cstrTitle=\"\";\r\n\t}",
"function __construct(/*$title*/) { /*$this->title = $title;*/ }",
"function __construct($title)\n\t{\n\t\t$this->title = $$title;\n\t\t$this->name = strtolower(str_ireplace(array(' ','-'), '_', $title));\n\t\t\n\t}",
"public function __construct()\n {\n SEO::setTitle('Las mejores escort de Concepción - PlacerConce.cl');\n SEO::setDescription('Las mejores escort, escorts, prostitutas, putas y damas de compañia de concepcion te esperan');\n SEO::opengraph()->setUrl('https://www.placerconce.cl/');\n SEO::setCanonical('https://www.placerconce.cl/');\n SEOMeta::addKeyword(['escort', 'escorts', 'prostitutas' , 'damas de compañia', 'concepcion', 'escort concepcion', 'escorts en concepcion', 'postitutas en concepcion', 'damas de compañia en concepcion', 'conce']);\n\n OpenGraph::setDescription('Las mejores escort, escorts, prostitutas, putas y damas de compañia de concepcion te esperan');\n OpenGraph::setTitle('Las mejores escort de Concepción - PlacerConce.cl');\n OpenGraph::setUrl('https://www.placerconce.cl/');\n }",
"public function __construct(private string $title)\n {\n }",
"function __construct(string $title, string $url, array $postdata = NULL)\n\t{\n\t\t$this->title = $title;\n\t\t$this->url = $url;\n\t\t$this->postdata = $postdata;\n\t}",
"public function __construct($title = null) {\n $this->setTitle($title);\n }",
"public function __construct(string $title)\n {\n $this->title = $title;\n }",
"public function __construct() {\r\n\t\tparent::__construct();\r\n\t\t$this->shortner = Url_Shortner::factory();\r\n\t}",
"function __construct($rawTitle) {\n $this->rawTitle=$rawTitle;\n $this->setInfo();\n }",
"public function __construct($url, $title, $link)\n {\n $this->setUrl($url);\n $this->setTitle($title);\n $this->setLink($link);\n }",
"public function __construct($title=false)\n\t{\n\t\t$this->setTitle($title);\n\t}",
"public function __construct(string $title, $url = null, array $options = [])\n {\n $this->title = $title;\n $this->url = $url;\n $this->options = $options;\n }",
"public function __construct()\n {\n $this->buildUrl();\n }",
"public function __construct(\n $sitename = \"No Site Name\",\n $titleClass = ''\n ) {\n $this->sitename = $sitename;\n $this->titleClass = $titleClass;\n \n }",
"public function __construct($name, $url){\n $this->_id = $name;\n $this->_name = $name;\n $this->_content = $this->checkFormat($url);\n }",
"public function __construct($title = '', $type = 'about:blank')\n {\n if ($title) {\n $this->title = $title;\n }\n if ($type) {\n $this->type = $type;\n }\n }",
"public function __construct()\r\n {\r\n $this->geturl();\r\n }",
"function __construct($url)\n {\n $this->url = $url;\n }",
"public function __construct($url){\n $this->url = $url;\n }",
"function __construct($ptitle)\r\n {\r\n $this->_htmlpage = new HTMLPage($ptitle);\r\n $this->setPageDefaults();\r\n $this->setDynamicDefaults();\r\n }",
"function __construct($opt){\n $this->title = $opt;\n }",
"public function __construct()\r\n\t{\r\n\t\t// Primeiro limpamos o caminho informado na URL\r\n\t\t$this->setUrl();\r\n\r\n\t\t// Depois quebramos ela para ajudar no processo\r\n\t\t$this->setExplode();\r\n\r\n\t\t// Retiramos a Controller da URL (caso exista uma)\r\n\t\t$this->setController();\r\n\r\n\t\t// Retiramos a Action da URL (caso exista uma)\r\n\t\t$this->setAction();\r\n\r\n\t\t// Retiramos os Parâmetros da URL (caso eles existam)\r\n\t\t$this->setParams();\r\n\r\n\t\t// Organizamos a Controller e Action para buscar elas dinamicamente\r\n\t\t$this->arrangeControllerAction();\r\n\t}",
"public function __construct($url = '', $tooltip = '')\n {\n // Initialise member variables\n $this->url = $url;\n $this->tooltip = $tooltip;\n }",
"function __construct($title)\n {\n $this->title = $title;\n $this->head_tags = array();\n $this->body = '';\n if(isset($GLOBALS['BROWSCAP_CACHE']))\n {\n $this->bc = new Browscap($GLOBALS['BROWSCAP_CACHE']);\n }\n else\n {\n $this->bc = new Browscap('/var/php_cache/browser');\n }\n $this->bc->doAutoUpdate = false;\n $this->bc->lowercase = true;\n $this->browser = $this->getBrowser();\n $this->import_support = false;\n \n $browser_name = $this->getBrowserName();\n if($browser_name === 'IE' && $this->getBrowserMajorVer() <= 7)\n {\n header( 'Location: /badbrowser.php' ) ;\n }\n else if($browser_name === 'Chrome' && $this->getBrowserMajorVer() >= 36)\n {\n $this->import_support = true;\n }\n }",
"public function __construct($url) {\n\t\t$this->url = $url;\n\t}",
"public function __construct()\n {\n // Page Data\n $this->title = 'Dashboard';\n $this->url = 'dashboard';\n }",
"public function __construct($title, $value = \"\")\n {\n $this->title = $title;\n $this->value = $value;\n }",
"public function __construct($title, $uri, $params = [])\n {\n $this->title = $title;\n $this->uri = $uri;\n $this->params = $params;\n }",
"public function __construct($url)\n {\n $this->url = $url;\n }",
"public function __construct($url)\n {\n $this->url = $url;\n }",
"public function __construct($url)\n {\n $this->url = $url;\n }",
"public function __construct($url)\r\n\t{\r\n\t\t$this->url = $url;\r\n\t\t$this->id = $this->url['id'];\r\n\t\tif ($this->url['controller'] == \"\")\r\n\t\t{\r\n\t\t\t$this->controller = \"home\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->controller = $this->url['controller'];\r\n\t\t}\r\n\t\tif ($this->url['action'] == \"\") \r\n\t\t{\r\n\t\t\t$this->action = \"index\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->action = $this->url['action'];\r\n\t\t}\r\n\t}",
"function Set_Title($Title) : Page\n {\n $this->Title = filter_var($Title, FILTER_SANITIZE_STRING);\n return $this;\n }",
"public function __construct($url){\r\n $this->url = strtolower($url);\r\n\r\n if (empty($this->url)) {\r\n $this->url = $this->defaultUrl;\r\n }\r\n }",
"public function __construct()\n {\n $this->page_title = \\Request::route()->getName();\n //\\App\\System::AccessLogWrite();\n }",
"public function __construct($title, $message, $buttonText, $buttonURL)\n {\n $this->title = $title;\n $this->message = $message;\n $this->buttonText = $buttonText;\n $this->buttonURL = $buttonURL;\n }",
"public function title($title, $url = null)\n {\n $this->title = $title;\n $this->url = $url;\n\n return $this;\n }",
"public function __construct(Url $url) {\n $this->url = $url;\n }",
"public function __construct(protected string $url)\n {\n //\n }",
"function __construct() {\n\n\t\t// haven't title in any location\n\t\t$this->with_title = true;\n\n\t\tparent::__construct(\n\t\t\t'bs-social-share',\n\t\t\tsprintf( __( '%s - Social Share', 'publisher' ), publisher_white_label_get_option( 'publisher' ) ),\n\t\t\tarray( 'description' => __( 'Social Share Widget', 'publisher' ) )\n\t\t);\n\t}",
"public function __construct($url = \\null, $label = \\null)\n {\n }",
"public function __construct(string $url, string $title, string $description, string $channel)\n {\n $this->url = $url;\n $this->title = $title;\n $this->description = $description;\n $this->channel = $channel;\n }",
"public function __construct($uri, $title, $description='', $link='')\n {\n $this->setUri($uri);\n $this->setTitle($title);\n if ($description !== '')\n $this->setDescription($description);\n if ($link === '')\n $this->setLink($uri);\n else\n $this->setLink($link);\n }",
"public function __construct() {\n\n\t\t// get uri\n\t\t// remove slash\n\t\t// get first param\n\t\t// switch case\n\t\t\n\t\t$uri = self::getUri(); \n\t\t// trong truong hop $uri chi gom domain name thi array $uri van co first element va element rong\n\n\t\t$first = $uri[0];\n\t\t$first = \"first here\";\n\t\tself::$_first = $first;\n\n\t\tswitch ($first) {\n\t\t\tcase \"\":\n\t\t\t\t$this->_cPage = \"index\";\n\t\t\t\tbreak;\n\n\t\t\tcase $this->_admin:\n\t\t\t\t$this->adminProcess();\n\t\t\t\tbreak;\n\n\t\t\tcase $this->_college_Url:\n\t\t\t\t$this->_cPage = $this->_college_temp;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$this->_cPage = $this->_article_temp;\n\t\t}\n\t}",
"public function __construct(){\n\t\t$this->url = YaffmapConfig::get('url').$this->path;\n\t}",
"public function __construct($url = NULL) {\n // need to load the put/post and querystrings into the attributes array\n // need to set the type\n \n if (NULL == $url) {\n $url = $this->get('REQUEST_URI');\n }\n $this->URLParts = parse_url($url);\n }",
"public function __construct()\n\t{\n\t\t$doc = FDocument::getConfig();\n\t\t$this->base_dir = $doc->get('base_dir').$this->baseTemplate.DS.$doc->get('template');\n\t\t$this->base_url = $doc->get('base').$this->baseTemplate.DS.$doc->get('template').DS;\n\t\t$this->title\t= $doc->get('title');\n\t}",
"public function __construct()\n {\n if(!empty(filter_input(INPUT_GET, 'url', FILTER_DEFAULT))){\n $this->Url = filter_input(INPUT_GET, 'url', FILTER_DEFAULT);\n $this->limparUrl();\n $this->UrlConjunto = explode(\"/\", $this->Url);\n \n if(isset($this->UrlConjunto[0]))\n {\n $this->UrlController = $this->slugController($this->UrlConjunto[0]);\n }else{\n $this->UrlController = CONTROLER;\n }\n\n //condição dos segundo paramentro \n if(isset($this->UrlConjuto[1]))\n {\n $this->UrlParamentro = $this->UrlConjunto[1];\n }else{\n $this->UrlParamentro = null;\n }\n\n echo \"{$this->Url} <br>\";\n echo \"Controller: {$this->UrlController} <br>\";\n // caso nao tenha paramentro entra else aonde vai ter valores fixos\n }else{\n $this->UrlController = CONTROLER;\n $this->UrlParamentro= null;\n }\n \n\n }",
"public function __construct($uri, $title, $description, $name, $link='')\n {\n $this->setUri($uri);\n $this->setTitle($title);\n $this->setDescription($description);\n $this->setName($name);\n if ($link !== '')\n $this->setLink($link);\n else\n $this->setLink($uri);\n }",
"public function __construct() {\n\n\t\t$this->home_url = home_url();\n\t\t$parsed_home = wp_parse_url( $this->home_url );\n\n\t\tif ( ! empty( $parsed_home['host'] ) ) {\n\t\t\t$this->host = str_replace( 'www.', '', $parsed_home['host'] );\n\t\t}\n\n\t\tif ( ! empty( $parsed_home['scheme'] ) ) {\n\t\t\t$this->scheme = $parsed_home['scheme'];\n\t\t}\n\n\t\t$this->charset = esc_attr( get_bloginfo( 'charset' ) );\n\t}",
"public function __construct()\n {\n $this->url = isset($_GET['url']) ? filter_var(rtrim($_GET['url'], FILTER_SANITIZE_URL)) : self::LANDING_PAGE;\n }",
"public function __construct($Url,$version){\n $this->setUrl($Url);\n $this->setData($this->processParams($Url->getParams()));\n $this->exec($version);\n }",
"public function __construct()\n {\n $this->Kontroller = new Kontroller;\n $this->CurSlug = Url::First();\n }",
"public function __construct () \n {\n $this->title = 'Categories';\n $this->route = 'admin.categories.';\n $this->view = 'admin.category.';\n }",
"public function __construct($title = '', $bodyClass=\"bg-gray-100\")\n {\n $this->title = $title;\n $this->bodyClass = $bodyClass;\n }",
"public function __construct($title, $userinfo, $activationLink)\n {\n $this->title = $title;\n $this->userinfo = $userinfo;\n $this->activationLink = $activationLink;\n }",
"public function __construct() {\n\t\tparent::__construct();\n\t\t$this->title = __( 'Manual Payment Gateway 3.0', 'wpsc' );\n\t}",
"public function __construct($title)\n {\n $this->_title = $title;\n $this->createMenuBar();\n }",
"public function __construct($title = null, $searchable = null, $action = null, $pagination = null)\n {\n $this->title = $title;\n $this->searchable = $searchable;\n $this->action = $action;\n $this->pagination = $pagination;\n }",
"function __construct($title, $text, $bloggerId)\r\n {\r\n $this->title = $title;\r\n $this->text = $text;\r\n $this->wordCount = str_word_count($text);\r\n $this->bloggerId = $bloggerId;\r\n }",
"function __construct($post_obj = false) {\n if (!$post_obj) { // Se carga el que se encuentre en el loop\n global $post;\n $post_obj= $post;\n }\n\n\n $this->title_words = explode(' ', $post->post_title ); \n\n foreach ($this->title_words as $word) { $this->title_acronym .= $word[0]; } \n\n parent::__construct(\n get_post( $post_obj )\n );\n }",
"public function __construct()\n\t{\n\t\tparent::__construct('urlset');\n\t\t$this->forumModel = new XenForo_Model_Forum();\n\t}",
"public function __construct($data)\n {\n $this->url = $data;\n }",
"public function __construct() {\n $this->data['title'] = 'Category';\n }",
"public function __construct( string $title ) {\n\t\tparent::__construct( false );\n\t\t\n\t\t$this->col\t= $this->createNode( 'collection', '' );\n\t\t\n\t\t// Add collection title\n\t\t$this->title\t= $title;\n\t\t\n\t\t$telement\t= \n\t\t$this->dom->createElement( 'atom:title', $title, '' );\n\t\t$this->col->appendChild( $telement );\n\t}",
"public function __construct(\n string $url = null\n )\n {\n $this->url = $url;\n }",
"public function __construct()\n\t{\n\t\t$this->name = 'Live Streaming';\n\t\t$this->slug = 'live-streaming';\n\n\t\t$this->create_step_position = 21;\n\t\t$this->nav_item_position = 31;\n\t}",
"public function title(?string $title): static;",
"public function __construct( $url , $web )\n {\n\n $id_ = $this->analyze( explode( '/' , $url ) );\n\n \n if( empty( $id_ ) ) {\n\n $url = $this->replace( $url );\n $this->callController( $web , $url );\n \n } else {\n\n $url = $this->replace( $url ) .'id';\n $this->callController( $web , $url , $id_);\n }\n \n }",
"function __construct() {\n parent::__construct();\n // $this->load->helper('validate'); // load the helper file 'validate_helper.php'\n $this->data = array();\n $this->data['title'] = \"Northcoast Shipping Agency\"; // references the title of the entire website\n }",
"public function __construct($title,$message,$user,$header_title=\"Title\")\n {\n //\n //\n $this->header_title=Setting::where(\"name\", \"title\")->get(\"value\")->first()[\"value\"];\n $this->banner_url=\"http://hodhod-gift.ir/reset_password.png\";\n $this->title = $title;\n $this->text = $message;\n $this->user = $user;\n }",
"public function __construct() {\n\n list($null,$controller, $action, $id) = explode(\"/\", $_SERVER['PATH_INFO']);\n \n $this->urlValues['base'] = \"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n $this->urlValues['controller'] = $controller ? $controller : \"home\";\n $this->urlValues['action'] = $action;\n $this->urlValues['id'] = $id;\n\n $this->controllerName = strtolower($this->urlValues['controller']);\n $this->controllerClass = ucfirst(strtolower($this->urlValues['controller'])) . \"Controller\";\n\n if ($this->urlValues['action'] == \"\") {\n $this->action = \"index\";\n } else {\n $this->action = $this->urlValues['action'];\n }\n }",
"public function __construct(){\n\t\tparent::__construct();\n\n\t\t$this->load->helper('url');\n\n\t}",
"private function __construct() {\n $args = func_get_args();\n $this->name = $args[0];\n $this->title = $args[1];\n $this->email = $args[2];\n $this->valediction = $args[3];\n }",
"function __construct($feedUrl)\n\t{\n\t\t$this->feedUrl = $feedUrl;\n\t}",
"function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model('data_siswa');\n\t\t$this->load->helper('url');\n\t}",
"function __construct(){\n parent::__construct();\n $this->set_primitive_type('string');\n $this->set_core(true);\n $this->set_related_mapped_prop('title');\n $this->set_component('tainacan-text');\n $this->set_name( __('Core Description', 'tainacan') );\n $this->set_description( __('The \"Core Title\" is a compulsory metadata automatically created for all collections by default. It is the main metadatum of the item and where the basic research tools will do their searches.', 'tainacan') );\n }",
"public function __construct( $title ) {\r\n\t\tparent::__construct( $title );\r\n\r\n\t\tif ( ! $this->get_datastore() ) {\r\n\t\t\t$this->set_datastore( new User_Meta_Datastore() );\r\n\t\t}\r\n\t}",
"function link() {\n $this->title = \"link\";\n }",
"function List_Field($title){$this->title = $title; \n\n }",
"function __construct($URL = \"\")\n {\n // Initializations\n $this->URL = $URL;\n $this->XML = new XMLNode(\"[root]\");\n }",
"public function __construct($title, $table, $field_name='permalink', $prefix='', $suffix=''){\n\t\t$this->title\t\t= $title;\n\t\t$this->table\t\t= $table;\n\t\t$this->field_name\t= $field_name;\n\t\t$this->prefix\t\t= $prefix;\n\t\t$this->suffix\t\t= $suffix;\n\t}",
"public function __construct($title, $author, $publish_date, $publisher, $edition, $page_count, $series, $format, $category, $image, $summary) {\n $this->title = $title;\n $this->author = $author;\n $this->publish_date = $publish_date;\n $this->publisher = $publisher;\n $this->edition = $edition;\n $this->page_count = $page_count;\n $this->series = $series;\n $this->format = $format;\n $this->category = $category; \n $this->image = $image;\n $this->summary = $summary;\n }",
"public function __construct(){\n\t\t\t$this->genLink();\n\t\t}",
"public function setTitle($title)\n{\n $this->title= $title;\n}",
"public function title($title) {\n $this->title = $title;\n return $this;\n }",
"public function __construct($type, $slug, $title)\n {\n $this->type = $type;\n $this->slug = $slug;\n $this->title = $title;\n }",
"public function __construct()\n {\n $this->url = url()->current();\n $this->host = request()->getSchemeAndHttpHost();\n }",
"public function __construct($webUrl)\n {\n $this->webUrl = $webUrl;\n }",
"public function __construct(string $link, string $link_title)\n {\n //\n $this->fields = [\n 'link' => $link,\n 'link_title' => $link_title,\n ];\n }",
"function __construct($params=array())\r\n {\r\n // one of Pipl's sponsored sources.\r\n // \r\n // `category` is one of Source::$categories.\r\n parent::__construct();\r\n extract($params);\r\n \r\n if (isset($is_sponsored))\n {\n $this->is_sponsored = $is_sponsored;\n }\r\n if (!empty($name))\n {\n $this->name = $name;\n }\r\n if (!empty($category))\n {\n $this->category = $category;\n }\r\n if (!empty($url))\n {\n $this->url = $url;\n }\r\n if (!empty($domain))\n {\n $this->domain = $domain;\n }\r\n }",
"public function __construct($id, $name, $title = FALSE)\n\t{\n\t\t$title = ($title === FALSE) ? _('Herma') : $title;\n\t\tparent::__construct($id, $name, $title);\n\t\t$this->content_by = _('Sensor from');\n\t\t$this->content_item = _('Sensor');\n\t\t$this->content_items = _('Sensors');\n\t\t$this->content_list_title = _('Sensor list');\n\t\t$this->content_more_content = _('Other sensors...');\n\t\t$this->content_open_text = _('View');\n\t\t$this->content_submit = _('Register sensor');\n\t\t$this->content_submit_progress\n\t\t\t= _('Registration in progress, please wait...');\n\t\t$this->content_title = _('Herma');\n\t}",
"public function __construct($title, $resource, $header)\n {\n $this->title = $title;\n $this->header = $header;\n $this->resource = $resource;\n }",
"public function __construct()\n {\n $this->urltoparent = url(\"User\\RolePerm\");\n $this->urltoview = \"User.RolePerm\";\n }"
] | [
"0.7305493",
"0.72863674",
"0.7228181",
"0.72196484",
"0.7215191",
"0.7129741",
"0.71046036",
"0.710126",
"0.7065462",
"0.7060845",
"0.70362455",
"0.70204663",
"0.6958482",
"0.69535226",
"0.69064236",
"0.6890854",
"0.6868172",
"0.6813723",
"0.6758345",
"0.67227846",
"0.67186373",
"0.6718287",
"0.6715065",
"0.66385376",
"0.6635038",
"0.66275936",
"0.6627107",
"0.65372264",
"0.6509261",
"0.6504163",
"0.6500041",
"0.64984727",
"0.64596015",
"0.64592814",
"0.64573777",
"0.64573777",
"0.64573777",
"0.6433645",
"0.64321494",
"0.6404034",
"0.6399538",
"0.6392427",
"0.6387752",
"0.6385932",
"0.6383968",
"0.63621265",
"0.6342712",
"0.63102484",
"0.6298664",
"0.628321",
"0.62811506",
"0.62685156",
"0.62426364",
"0.62171435",
"0.62142867",
"0.62048304",
"0.62030625",
"0.61940974",
"0.61853534",
"0.61706936",
"0.6163126",
"0.61615425",
"0.615948",
"0.61556834",
"0.61476207",
"0.6144594",
"0.6142074",
"0.61419535",
"0.6130541",
"0.61279905",
"0.6119096",
"0.61190856",
"0.60991585",
"0.6095596",
"0.60717744",
"0.6059695",
"0.60558885",
"0.6045384",
"0.60438067",
"0.6036587",
"0.6035524",
"0.60283595",
"0.6014411",
"0.6012469",
"0.60118",
"0.60109514",
"0.60087323",
"0.6008581",
"0.6002989",
"0.6002545",
"0.59995896",
"0.59927356",
"0.59921575",
"0.59920233",
"0.5982835",
"0.59821606",
"0.5980804",
"0.5973755",
"0.59628993",
"0.59626544"
] | 0.62839997 | 49 |
Get URL info This method fetches info about the URL, like the HTTP response code and content type. | public function get()
{
$res = $this->server->get($this->url_key);
if ($res === false) {
curl_setopt($this->curl, CURLOPT_URL, $this->url);
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($this->curl, CURLOPT_FILETIME, true);
curl_setopt($this->curl, CURLOPT_AUTOREFERER, true);
curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($this->curl, CURLOPT_MAXREDIRS, 6);
curl_setopt($this->curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10");
$html = curl_exec($this->curl);
// print_r(htmlentities($body));
curl_close($this->curl);
$tidy_config = array(
'clean' => true,
'output-html'=>true,
'wrap' => 78,
'quiet'=>1
);
$tidy = new tidy;
$tidy->parseString($html, $tidy_config);
$tidy->cleanRepair();
$html = $tidy->html()->value;
// Buffer DOM errors rather than emitting them as warnings
$oldSetting = libxml_use_internal_errors(true);
$dom = new DOMDocument();
$dom->loadHTML($html);
$xpath = new DOMXPath($dom);
$titles = $xpath->evaluate('//*[name()="title"]');
$title = $titles->item(0)->nodeValue;
// Clear any existing errors from previous operations
libxml_clear_errors();
// Revert error buffering to its previous setting
libxml_use_internal_errors($oldSetting);
$res = array('title'=>$title);
$res = json_encode($res);
$this->server->add($this->url_key, $res, MEMCACHE_COMPRESSED, self::CACHE_LIMIT);
}
return json_decode($res, TRUE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getInfo($url);",
"public function getInfo()\n {\n return curl_getinfo($this->_handle);\n }",
"public function getInfo()\n\t{\n\t\treturn curl_getinfo($this->s);\n\t}",
"public function url() {\n return $this->info['url'];\n }",
"public function getInfo($type)\n {\n return curl_getinfo($this->curl, $type);\n }",
"protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }",
"public function getInfo()\n {\n if (array_key_exists(\"info\", $this->_propDict)) {\n if (is_a($this->_propDict[\"info\"], \"\\Beta\\Microsoft\\Graph\\Model\\InformationalUrl\") || is_null($this->_propDict[\"info\"])) {\n return $this->_propDict[\"info\"];\n } else {\n $this->_propDict[\"info\"] = new InformationalUrl($this->_propDict[\"info\"]);\n return $this->_propDict[\"info\"];\n }\n }\n return null;\n }",
"public function getinfo($type = null)\n {\n return curl_getinfo($this->curl, $type);\n }",
"public function getInfo($type)\n {\n if($this->isCurlSet()){\n return curl_getinfo($this->curl, $type);\n }else {\n throw new SdkException(\"cURL instance is not set when trying to get info from the type:\" . $type);\n }\n }",
"function getURLMetadata($url) {\n\t$protocols = '/^[hs]{0,1}[tf]{0,1}tp[s]{0,1}\\:\\/\\//i';\n\t//if not (allowed) protocol is given, assume http\n\tif(preg_match($protocols, $url) == 0) {\n\t\t$url = 'http://' . $url;\n\t}\n\t$metadata['url'] = $url;\n\n\tif (!function_exists('curl_init')) {\n\t\treturn $metadata;\n\t}\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t$page = curl_exec_follow($ch);\n\tcurl_close($ch);\n\n\t@preg_match( \"/<title>(.*)<\\/title>/sUi\", $page, $match );\n\t$metadata['title'] = htmlspecialchars_decode(@$match[1]);\n\treturn $metadata;\n}",
"public function getInfoUrl($provider, $urlToParse);",
"public static function getUrlInfo(string $url) : array\n {\n // Create cURL resource, get HTML document\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, false);\n $htmlPage = curl_exec($ch);\n\n // Parsing HTML document\n $htmlDocument = new DOMDocument();\n @$htmlDocument->loadHTML($htmlPage);\n $nodes = $htmlDocument->getElementsByTagName('title');\n\n // Get title\n $title = $nodes->item(0)->nodeValue ?? '';\n\n // Get status code\n $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE) ?? 0;\n\n return compact('title', 'statusCode');\n }",
"public function getLinkInfo()\n {\n return array(\n 'PageURL' => $this->curlInfo['url'],\n 'page_title' => $this->getPageTitle(),\n 'description' => trim((isset($this->collected['metaData']['description'])) ? $this->collected['metaData']['description'] : Standards::$default),\n 'content_language' => $this->getLanguage(),\n 'external_links' => $this->countLinks('external'),\n 'internal_links' => $this->countLinks('internal'),\n 'no_follow_links' => $this->countLinks('no-follow'),\n 'follow_links' => ($this->countLinks('external') + $this->countLinks('internal') - $this->countLinks('no-follow')),\n 'h1' => $this->collected['headingsCount']['h1'],\n 'h2' => $this->collected['headingsCount']['h2'],\n 'h3' => $this->collected['headingsCount']['h3'],\n 'h4' => $this->collected['headingsCount']['h4'],\n 'h5' => $this->collected['headingsCount']['h5'],\n 'h6' => $this->collected['headingsCount']['h6'],\n 'http_code' => $this->curlInfo['http_code'],\n 'charset' => $this->getCharset(),\n 'server_config' => implode(';', $this->getServerConfig()),\n\n // fetched by others:\n # 'load_time' => Standards::$default,\n # 'page_weight' => Standards::$default,\n # 'indexed_bing' => Standards::$default,\n # 'indexed_google' => Standards::$default,\n );\n }",
"public function info($url) \n\t{\n\t\t$this->api->parseUrl($url);\n\t\treturn $this->api->call(['command' => 'GetDomainInfo'])->response();\n\t}",
"abstract public function get_url_read();",
"function fetch_info($_url=\"\"){ \n if($_url&&$this-> fetch($_url)){\n $html = str_get_html($this-> html);\n $header = $html->find('head',0);\n $info['title'] = $header ->find('title',0)->plaintext;\n if( $keywords = $header ->find('meta[name=keywords]',0) )\n $info['keywords'] = $keywords->content;\n if( $description = $header ->find('meta[name=description]',0))\n $info['description'] = $description ->content;\n return $info;\n }\n return false;\n }",
"public function get_info()\n {\n return $this->_request('getinfo');\n }",
"public function getURL();",
"public function getURL();",
"public function info()\n {\n return curl_getinfo($this->_session);\n }",
"public function getURL ();",
"public function url_stat()\r\n {\r\n return $this->_stat;\r\n }",
"public function Info_Get()\n\t{\n\t\t$Data = $this -> HTTPRequest($this -> APIURL.'Info:Get');\n\t\treturn $this -> ParseResponse($Data);\n\t}",
"public function getInfo() {}",
"public function getInfo() {}",
"public function get($url);",
"public abstract function getURL();",
"public function info($info)\n {\n $option = constant('CURLINFO_'.strtoupper($info));\n\n return curl_getinfo($this->curl, $option);\n }",
"public function getInfo();",
"public function get_url();",
"public function fetchUrl($url)\n {\n \n $response = array();\n $start = microtime(true);\n $response[\"request_uri\"] = $url;\n $headers = get_headers($url);\n $response[\"status_code\"] = substr($headers[0], 9,3);\n if ($response[\"status_code\"] == 200){\n $response[\"body\"] = @file_get_contents($url);\n } else {\n $response[\"body\"] = false;\n }\n\n // emulate content size header\n $response[\"headers\"][\"content-type\"] = finfo_buffer($this->finfo, $response[\"body\"], FILEINFO_MIME_TYPE);\n $response[\"headers\"][\"content-length\"] = strlen($response[\"body\"]);\n $end = $response[\"elapsed_time\"] = microtime(true);\n return $response;\n }",
"public function getURL(): string\n {\n return $this->http->getURL();\n }",
"public function get_url(){\n\n\t\t\treturn $this->api_urls['giturl'];\n\n\t\t}",
"public function pageInfo( $URL, $websiteID, $title ){ return $this->APICall( array('pageInfo' => $URL, 'websiteID' => $websiteID, 'title' => $title), \"Couldn't get \" . $URL . \" information\" ); }",
"static public function getURL() {\n\t\treturn self::$url;\n\t}",
"function get_url()\n {\n }",
"public function getUrl()\n {\n return $this->parseUrl();\n }",
"public function get_url () {\r\n\t\treturn $this->url;\r\n\t}",
"public function url()\n {\n return $this->data['url'];\n }",
"public function get_info($option = 0)\n {\n return curl_getinfo($this->ch, $option); \n }",
"function get_remote_info( $url, $refresh = false ) {\n\n\t\tif ( empty( $_GET['page'] ) || $this->page_slug !== $_GET['page'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $refresh || ( $info = get_transient( '_wp_sh_plugin_browser-list-info' ) ) === false ) {\n\n\t\t\t$response = wp_remote_get( $url );\n\n\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$xml = simplexml_load_string( $response['body'], 'SimpleXMLElement', LIBXML_NOCDATA );\n\n\t\t\t$info = $xml->info;\n\n\t\t\tif ( empty( $info ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$info = self::xml2array( $info );\n\n\t\t\tset_transient( '_wp_sh_plugin_browser-list-info', $info, WEEK_IN_SECONDS );\n\t\t}\n\t\treturn $info;\n\t}",
"protected function getUrl() {\n return $this->url;\n }",
"function getUrl();",
"public function getURL() { return $this->url; }",
"public function getPathInfo(): string\r\n {\r\n return $_GET['url'] ?? '/';\r\n }",
"public function getInfo($url)\n {\n\t\t// use oembed if vimeo\n\t\tif ($this->isVimeo($url) && !$this->isOembed($url)) {\n\t\t\t$url = 'https://vimeo.com/api/oembed.json?url='.$url;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$response = Embed::create($url, [\n\t\t\t\t'choose_bigger_image' => true,\n\t\t\t\t'parameters' => [],\n\t\t\t]);\n\t\t} \n\t\tcatch (Exception $e) \n\t\t{\n\t\t\t$response = null;\n\t\t}\n\t\t\n\t\tif ($this->isVimeo($url) && $this->isOembed($url)) {\n\t\t\t$data = json_decode($response->response->getContent());\n\t\t\t$data->aspectRatio = $data->width / $data->height;\n\t\t\t$data->code = $data->html;\n\t\t\treturn $data;\n\t\t}\n\n\t\treturn $response;\n }",
"function curlGet($url){\n $ch = curl_init();\n\n //setting curl options\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_URL, $url);\n /*\n Additional curl_setopt\n CURLOPT_USERAGENT \n CURLOPT_HTTPHEADER\n */\n $result = curl_exec($ch);\n \n //$httpResponse = curl_getinfo($ch,CURLINFO_HTTP_CODE);\n //echo $httpResponse;\n\n curl_close($ch);\n return $result;\n }",
"public function GetUrl() {\n return $this->url;\n }",
"public function get_url()\n {\n }",
"function getUrlInfo()\n{\n $url = \"{$_SERVER['REQUEST_URI']}\";\n $url = htmlspecialchars( $url, ENT_QUOTES, 'UTF-8' );\n $parse = parse_url($url);\n $url = rtrim($parse['path'], '/');\n $url = strtolower($url);\n $filtered = array_filter(explode('/', $url));\n $filtered = array_values($filtered);\n return $filtered;\n}",
"protected function getUrl() {\r\n\t\treturn $this->url;\r\n\t}",
"public function get_url()\n {\n return $this->url;\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function get_url() {\n\t\treturn $this->url;\n\t}",
"public function get_url() {\n\t\treturn $this->url;\n\t}",
"function get_url_content($request)\n\t\t{\n\t\t$ch = curl_init($request);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\treturn curl_exec($ch);\n\t\t}",
"public function getUrl() {\n return $this->url;\n }",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getUrl();",
"public function getinfo()\n\t{\n\t\treturn $this->connect('getinfo');\n\t}",
"public abstract function getApiUrl($url);",
"function urlResponse($url) {\n $headers = get_headers($url);\n return substr($headers[0],9, 3);\n }",
"public function getUrl()\r\n {\r\n return $this->url;\r\n }",
"public function getUrl()\r\n {\r\n return $this->url;\r\n }",
"public function getUrl()\r\n {\r\n return $this->url;\r\n }",
"public static function wget_info($url, array $post=null, $bind_to_ip=null) {\n\n if (! self::validUrl($url)) {\n throw new Exception('Invalid URL');\n }\n\n $curl = curl_init($url);\n\n curl_setopt($curl, CURLOPT_USERAGENT, Neoform\\Web\\Config::get()->getUserAgent());\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($curl, CURLOPT_TIMEOUT, 20);\n\n curl_setopt($curl, CURLOPT_HEADER, 1); // get the header\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'HEAD');\n curl_setopt($curl, CURLOPT_NOBODY, true);\n curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);\n\n // Weird glitch causes gzipped requests to ncix.com to not be decoded if this is not set (even though it's empty)\n curl_setopt($curl, CURLOPT_ENCODING , '');\n\n if ($bind_to_ip) {\n curl_setopt($curl, CURLOPT_INTERFACE, $bind_to_ip);\n }\n\n if ($post) {\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));\n }\n\n curl_exec($curl);\n $info = curl_getinfo($curl);\n\n curl_close($curl);\n\n if ($info['http_code'] === 200) {\n return $info;\n }\n\n throw new Exception(\"Server returned HTTP/{$info['http_code']}\", (int) $info['http_code']);\n }",
"public function getInfo(int $options = null){\n if (is_null($options)) {\n return curl_getinfo($this->handler);\n }\n return curl_getinfo($this->handler, $options);\n }",
"public function getLinkInfomation() {\n header('Access-Control-Allow-Origin: *');\n header(\"Access-Control-Allow-Credentials: true\");\n header('Content-Type: application/json; charset=utf-8');\n header(\"Access-Control-Allow-Methods: POST, GET, OPTIONS\");\n header('Access-Control-Allow-Headers \"Origin, X-Requested-With, Content-Type, Accept');\n\n $sLink = $this->input->post('link');\n\n if (!filter_var($sLink, FILTER_VALIDATE_URL)) {\n $sLink = 'http://'.$sLink;\n }\n\n $urlData = parse_url($sLink);\n \n $aMeta = getUrlMeta($sLink);\n \n $aMeta['host'] = str_replace('www.', '', $urlData['host']);\n \n echo json_encode($aMeta);\n die();\n }",
"public function getUrl()\n {\n return $this->apiUrl;\n }",
"function getInfo();",
"public function get($url) {\n $request = $this->getRequest($url, HttpRequest::METH_GET);\n try {\n // this could be parametrized using optional options interface\n $options = array(\n 'useragent' => \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; MS-RTC LM 8)\",\n 'connecttimeout' => 120, // timeout in seconds on connect \n 'timeout' => 120, // timeout in seconds on response \n 'redirect' => 5, // stop after 5 redirects\n 'compress' => true, // allow compression or not\n 'referer' => \"https://www.google.com/#output=search&sclient=psy-ab&q=jachty&fp=1\",\n );\n $request->setOptions($options);\n $request->send();\n } catch (Exception $e) {\n throw new Exception('Loading failed with exception', $request->getResponseCode(), $e);\n }\n $code = $request->getResponseCode();\n $body = $request->getResponseBody();\n\n // make sure we did not fail\n if ($code >= 500) {\n throw new Exception('Error response code recieved: ' . $body, $code);\n } elseif ($code >= 400) {\n throw new Exception('Permanent failure' . $body, $code);\n } elseif (trim($body) == '') {\n throw new Exception('Empty response', $code);\n }\n\n return $body;\n }",
"public function Get( $sUrl );",
"protected function getUrl(): string\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return self::$url;\n }",
"private function Get_URL()\n {\n $url = $this->CURL->GET_SERVER_URL();\n $download_url = $url.\"/application/download/download.php\";\n $view_url = $url.\"/application/pdf/view.php\";\n $this->DOWNLOAD_URL = $download_url;\n $this->VIEW_URL = $view_url;\n }",
"function getInfo()\n {\n $info['name'] = _(\"TextMagic via HTTP\");\n $info['desc'] = _(\"This driver allows sending of messages through the TextMagic (http://api.textmagic.com) gateway, using the HTTP API\");\n\n return $info;\n }",
"public function url()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }"
] | [
"0.7892658",
"0.67621326",
"0.6746962",
"0.6628087",
"0.6596959",
"0.65889156",
"0.6572802",
"0.6541535",
"0.6326795",
"0.62641454",
"0.6256839",
"0.6238894",
"0.62298775",
"0.6204564",
"0.6144923",
"0.6135794",
"0.61211455",
"0.6108506",
"0.6108506",
"0.608345",
"0.5987276",
"0.59870255",
"0.5929247",
"0.59267706",
"0.59267706",
"0.5899903",
"0.58911425",
"0.58906853",
"0.58840966",
"0.58724195",
"0.5838386",
"0.58157825",
"0.5804831",
"0.58010584",
"0.5786004",
"0.57639056",
"0.57350624",
"0.5733554",
"0.573047",
"0.57293135",
"0.5707958",
"0.5707812",
"0.5696303",
"0.5687636",
"0.56833094",
"0.5682052",
"0.56805646",
"0.5677256",
"0.5674622",
"0.5673298",
"0.5644583",
"0.5643097",
"0.5639802",
"0.5639802",
"0.5639802",
"0.5639802",
"0.5639802",
"0.5627781",
"0.5627781",
"0.5626909",
"0.5610673",
"0.56080145",
"0.56080145",
"0.56080145",
"0.56080145",
"0.56080145",
"0.56080145",
"0.56080145",
"0.56080145",
"0.56036127",
"0.5592544",
"0.5590476",
"0.5585652",
"0.5585652",
"0.5585652",
"0.5584963",
"0.5584417",
"0.5579853",
"0.5578042",
"0.5564435",
"0.5560751",
"0.55558395",
"0.55542445",
"0.55521154",
"0.5546566",
"0.5545959",
"0.5542075",
"0.5541388",
"0.5541388",
"0.5541388",
"0.5541388",
"0.5541388",
"0.5541388",
"0.5541388",
"0.5541388",
"0.5541388",
"0.5541388",
"0.5541388",
"0.5541388",
"0.5541388",
"0.5541388"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
return view('admin.kesekretariatan.skkades.index');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function 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()
{
$model = new skKades();
return view('admin.kesekretariatan.skkades.form', compact('model'));
} | {
"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)
{
$this->validate($request,[
'nama_sk'=>'required',
'file'=>'required|mimes:pdf|max:3048',
'nomor_keputusan_kades'=>'required',
'tgl_keputusan_kades'=>'required'
]);
$file = $request->file('file');
$namafile = $file->getClientOriginalName();
$destinasi = 'ubold/filedocMail/skkadesfile';
$file->move($destinasi,$namafile);
$model = new skKades();
$model->tahun = date('Y');
$model->nama_sk = $request->nama_sk;
$model->uraian = $request->uraian;
$model->nomor_keputusan_kades = $request->nomor_keputusan_kades;
$model->tgl_keputusan_kades = $request->tgl_keputusan_kades;
$model->nomor_dilaporkan = $request->nomor_dilaporkan;
$model->tgl_dilaporkan = $request->tgl_dilaporkan;
$model->keterangan = $request->keterangan;
$model->file = $namafile;
$model->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$model = skKades::where('id',decrypt($id))->first();
return view('admin.kesekretariatan.skkades.detail', compact('model'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$model = skKades::where('id',decrypt($id))->first();
return view('admin.kesekretariatan.skkades.form', compact('model'));
} | {
"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)
{
$this->validate($request,[
'nama_sk'=>'required',
'file'=>'mimes:pdf|max:3048',
'nomor_keputusan_kades'=>'required',
'tgl_keputusan_kades'=>'required'
]);
if (!is_null($request->file)) {
$file = $request->file('file');
$namafile = $file->getClientOriginalName();
$destinasi = 'ubold/filedocMail/skkadesfile';
$file->move($destinasi,$namafile);
}
$model = skKades::where('id',$id)->first();
$model->tahun = date('Y');
$model->nama_sk = $request->nama_sk;
$model->uraian = $request->uraian;
$model->nomor_keputusan_kades = $request->nomor_keputusan_kades;
$model->tgl_keputusan_kades = $request->tgl_keputusan_kades;
$model->nomor_dilaporkan = $request->nomor_dilaporkan;
$model->tgl_dilaporkan = $request->tgl_dilaporkan;
$model->keterangan = $request->keterangan;
if (!is_null($request->file)) {
$model->file = $namafile;
} else {
$model->file = $request->tampungFile;
}
$model->save();
} | {
"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)
{
$model = skKades::where('id',decrypt($id))->first();
$model->delete();
} | {
"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 |
Loads the product from the DB, incuding product variation info | public function load($id) {
global $DB;
parent::load($id);
$productVariations = $DB->get_records(
'local_moodec_variation',
array(
'product_id' => $id,
)
);
if(!!$productVariations) {
foreach ($productVariations as $pv) {
$variationid = (int) $pv->id;
$this->_variations[$variationid] = new MoodecProductVariation($variationid, true);
}
} else {
throw new Exception('Unable to load product variation information using identifier: ' . $id);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function load($product, $productAttribute, $options, $data);",
"public function load()\n {\n $query\n = '\n select\n *\n from\n aca_product\n where\n product_id = \"' . $this->productId . '\"';\n\n $this->db->setQuery($query);\n $productObj = $this->db->loadObject();\n\n if (!empty($productObj)) {\n\n $this->name = $productObj->name;\n $this->description = $productObj->description;\n $this->image = $productObj->image;\n $this->category = $productObj->category;\n $this->price = $productObj->price;\n\n return true;\n }\n return false;\n }",
"protected function _loadProduct(Mage_Catalog_Model_Product $product) {\r\n $product->load ( $product->getId () );\r\n }",
"function load($product_id){\n\t\t$result = $this->db->get_one(\n\t\t\t'product_name, image, description, price',\n\t\t\t'tb_products',\n\t\t\t'product_id = '.$product_id\n\t\t);\n\n\t\tif(count($result)){\n\t\t\t$this->product_id = $product_id;\n\t\t\t$this->product_name = $result['product_name'];\n\t\t\t$this->image = $result['image'];\n\t\t\t$this->description = $result['description'];\n\t\t\t$this->price = $result['price'];\n\t\t}\n\n\t\treturn $result;\n\t}",
"private function load() {\n\n $db = Database::getInstance(); \n\t $con = $db->getConnection();\n \n $query = \"SELECT * FROM Products ORDER by ID DESC\";\n \n if ($result = $con->query($query)) {\n \t/* fetch object array */\n \t while ($prod = $result->fetch_object(\"Product\")) {\n\t\t\t \tarray_push($this->products, $prod);\n \t}\n \t/* free result set */\n \t$result->close();\n }\n\t}",
"public function getVariation()\n {\n return $this->db->get($this->product_variant);\n }",
"public function load($attribute, $product, $valueId);",
"function load_product_info()\n {\n if (self::get_total_number_of_courses() > 0) {\n //cycle through course(s), load productInfo if available\n foreach ($this->courses as $key => $course) {\n $this->courses[$key] = array_merge($course,$this->get_product_info($course['course_id']));\n foreach ($course['modules'] as $module){\n $course['modules'][$module['module_id']]['product_info'] = $this->get_product_info($module['module_id']);\n }\n }\n }\n }",
"public function load_products() {\n\t\t$this->get_products_posts();\n\t\tif ( $this->posts !== null ) {\n\t\t\tforeach ( $this->posts as $ps_post ) {\n\t\t\t\t$this->add( new ShowcaseProduct( $ps_post ) );\n\t\t\t}\n\t\t}\n\t}",
"public function productVendorLoad()\n\t{\n\t\t$product_id = $this->request->input('product_id');\n\t\t$locality_change_val = $this->request->input('locality_change_val');\n\t\t$selectVendorLocationIdQuery = DB::select(\"SELECT vendor_location_id\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM product_vendor_locations\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE product_id = '$product_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND id = '$locality_change_val'\");\n\n\t\t$selectVendorLocationId = $selectVendorLocationIdQuery[0]->vendor_location_id;\n\t\techo '<input type=\"hidden\" id=\"locality_val\" value=\"'.$selectVendorLocationId.'\">';\n\t}",
"public function load($id){\n\t\tglobal $DB;\n\n\t\t$query = sprintf(\n\t\t\t'SELECT \n\t\t\t\tlmp.id, \n\t\t\t\tc.id as course_id,\n\t\t\t\tfullname,\n\t\t\t\tshortname,\n\t\t\t\tis_enabled,\n\t\t\t\tcategory,\n\t\t\t\tsummary,\n\t\t\t\tc.summaryformat as summary_format,\n\t\t\t\ttype,\n\t\t\t\tdescription,\n\t\t\t\ttags,\n\t\t\t\ttimecreated\n\t\t\tFROM {local_moodec_product} lmp, {course} c\n\t\t\tWHERE lmp.course_id = c.id\n\t\t\tAND lmp.id = %d',\n\t\t\t$id\n\t\t);\n\n\t\t// run the query\n\t\t$product = $DB->get_record_sql($query);\n\n\t\t// return the products\n\t\tif (!!$product) {\n\t\t\t$this->_id = (int) $product->id;\n\t\t\t$this->_courseid = (int) $product->course_id;\n\t\t\t$this->_enabled = (bool) $product->is_enabled;\n\t\t\t$this->_fullname = $product->fullname;\n\t\t\t$this->_shortname = $product->shortname;\n\t\t\t$this->_type = $product->type;\n\t\t\t$this->_categoryid = (int) $product->category;\n\t\t\t$this->_summary = $product->summary;\n\t\t\t$this->_summaryFormat = (int) $product->summary_format;\n\t\t\t$this->_description = $product->description;\n\t\t\t$this->_tags = explode(',', $product->tags);\n\t\t} else {\n \tthrow new Exception('Unable to load product using identifier: ' . $id);\n \t\t}\n\t}",
"public function getProductData()\n {\n // use\n //$this->request->getParams(); // all params\n $id= $this->request->getParam('param');\n $product = $this->_product->create()->load($id);\n return $product;\n\n }",
"function LoadProduct($orderid) {\n\t$proids = array();\n\t$factory = \\woo\\mapper\\PersistenceFactory::getFactory(\"orderproduct\",array('id','orderid','proid','number','price','returnnow','modlcharge'));\n\t$finder = new \\woo\\mapper\\DomainObjectAssembler($factory);\n\t$idobj = $factory->getIdentityObject()->field('orderid')->eq($orderid);\n\t$order_pro = $finder->find($idobj);\n\n\t$factory = \\woo\\mapper\\PersistenceFactory::getFactory(\"product\",array('id','classid','length','width','think','unitlen','unitwid','unitthi','unit','sharp','note'));\n\t$finder = new \\woo\\mapper\\DomainObjectAssembler($factory);\n\t$pro = $order_pro->next();\n\t$i = 0;\n\t$data = array();\n\twhile($pro){\n\t\t$data[$i][0] = $i+1;\n\t\t$idobj = $factory->getIdentityObject()->field('id')->eq($pro->getProid());\n\t\t$collection = $finder->find($idobj);\n\t\t$product = $collection->current();\n\t\t$data[$i][1] = $product->getSize();\n\t\t$data[$i][2] = $pro->getNumber();\n\t\t$price = $pro->getPrice()-$pro->getReturnnow();\n\t\t$data[$i][3] = sprintf(\"%.2f\",$price);\n\t\t$data[$i][4] = sprintf(\"%.2f\",$price*$data[$i][2]);\n\t\t$i++;\n\t\t$pro = $order_pro->next();\n\t}\n\treturn $data;\n}",
"public function loadProducts()\n {\n if (!isset($this->mix_id)) {\n return false;\n }\n\n $this->products = array();\n $query = \"SELECT mg.*, sup.*, p.product_id, p.product_nr, p.name, p.paint_chemical, coat.coat_desc as coatDesc \" .\n \"FROM \" . TB_MIXGROUP . \" mg \" .\n \"JOIN \" . TB_PRODUCT . \" p ON p.product_id = mg.product_id \" .\n \"JOIN \" . TB_SUPPLIER . \" sup ON p.supplier_id = sup.supplier_id \" .\n \"JOIN \" . TB_COAT . \" coat ON coat.coat_id = coating_id \" .\n \"WHERE mg.mix_id = {$this->db->sqltext($this->mix_id)}\";\n\n $this->db->query($query);\n if ($this->db->num_rows() == 0) {\n return false;\n }\n\n $productsData = $this->db->fetch_all();\n\n $unittype = new Unittype($this->db);\n //get pfp if exist\n $pfp = $this->getPfp();\n $pfpProduct = array();\n if ($pfp) {\n $pfpProducts = $pfp->getProducts();\n }\n\n foreach ($productsData as $productData) {\n $mixProduct = new MixProduct($this->db);\n foreach ($productData as $property => $value) {\n if (property_exists($mixProduct, $property)) {\n $mixProduct->$property = $productData->$property;\n }\n }\n //\tTODO: add userfriendly records to product properties\n $mixProduct->initializeByID($mixProduct->product_id);\n\n //\tif there is a primary product then this is an pfp-based mix\n if ($mixProduct->is_primary) {\n $this->isPfp = true;\n }\n\n if ($productData->ratio) {\n $mixProduct->ratio_to_save = $productData->ratio;\n }\n\n $mixProduct->unittypeDetails = $unittype->getUnittypeDetails($mixProduct->unit_type);\n $unittypeClass = $unittype->getUnittypeClass($mixProduct->unit_type);\n\n $mixProduct->unittypeDetails['unittypeClass'] = $unittypeClass;\n $mixProduct->initUnittypeList($unittype);\n\n $mixProduct->json = json_encode($mixProduct);\n //get is Ratio \n foreach ($pfpProducts as $pfpProduct) {\n if ($pfpProduct->getProductId() == $productData->product_id) {\n if (!is_null($pfpProduct->getRatioFromOriginal()) && !is_null($pfpProduct->getRatioToOriginal())) {\n $mixProduct->isRange = true;\n $mixProduct->range_ratio = trim($pfpProduct->getRatioFromOriginal()) . '-' . trim($pfpProduct->getRatioToOriginal());\n } else {\n $mixProduct->isRange = false;\n }\n break;\n }\n }\n //\tpush to mix products\n array_push($this->products, $mixProduct);\n }\n\n return $this->products;\n }",
"public function loadStockData(){\n if (JeproshopTools::isLoadedObject($this, 'product_id')){\n // By default, the product quantity correspond to the available quantity to sell in the current shop\n $this->quantity = JeproshopStockAvailableModelStockAvailable::getQuantityAvailableByProduct($this->product_id, 0);\n $this->out_of_stock = JeproshopStockAvailableModelStockAvailable::outOfStock($this->product_id);\n $this->depends_on_stock = JeproshopStockAvailableModelStockAvailable::dependsOnStock($this->product_id);\n if (JeproshopContext::getContext()->shop->getShopContext() == JeproshopShopModelShop::CONTEXT_GROUP && JeproshopContext::getContext()->shop->getContextShopGroup()->share_stock == 1){\n $this->advanced_stock_management = $this->useAdvancedStockManagement();\n }\n }\n }",
"public function loadVariantInformation()\n {\n if ($this->_aVariantList === null) {\n $oProduct = $this->getProduct();\n\n //if we are child and do not have any variants then let's load all parent variants as ours\n if ($oParent = $oProduct->getParentArticle()) {\n $myConfig = $this->getConfig();\n\n $oParent->setNoVariantLoading(false);\n $this->_aVariantList = $oParent->getFullVariants(false);\n\n //lets additionally add parent article if it is sellable\n if (count($this->_aVariantList) && $myConfig->getConfigParam('blVariantParentBuyable')) {\n //#1104S if parent is buyable load select lists too\n $oParent->enablePriceLoad();\n $oParent->aSelectlist = $oParent->getSelectLists();\n $this->_aVariantList = array_merge(array($oParent), $this->_aVariantList->getArray());\n }\n } else {\n //loading full list of variants\n $this->_aVariantList = $oProduct->getFullVariants(false);\n }\n\n // setting link type for variants ..\n foreach ($this->_aVariantList as $oVariant) {\n $this->_processProduct($oVariant);\n }\n\n }\n\n return $this->_aVariantList;\n }",
"public function onVariationAlter(ProductVariationEvent $event) {\n /** @var \\Drupal\\commerce_product\\Entity\\ProductVariationInterface $variation */\n $variation = $event->getProductVariation();\n\n\n }",
"protected function _initProduct()\n {\n Mage::dispatchEvent('review_controller_product_init_before', array('controller_action' => $this));\n\n $productId = (int) $this->getRequest()->getParam('id');\n $product = $this->_loadProduct($productId);\n\n try {\n Mage::dispatchEvent('review_controller_product_init', array('product' => $product));\n Mage::dispatchEvent('review_controller_product_init_after', array(\n 'product' => $product,\n 'controller_action' => $this\n ));\n } catch (Mage_Core_Exception $e) {\n Mage::logException($e);\n return false;\n }\n\n return $product;\n }",
"public function variation()\n {\n return $this->belongsTo(ProductVariation::class);\n }",
"public function load_product_page() {\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\n\t\t\t}\n\n\t\t\t// Render the settings template\n\t\t\trequire_once( dirname( __FILE__ ) . '/pages/product.php' );\n\t\t\twp_enqueue_script( 'amz-commons', '/wp-content/plugins/amz-affiliate/js/commons.js', 'jquery' );\n\t\t\twp_enqueue_script( 'amz-product', '/wp-content/plugins/amz-affiliate/js/product.js', 'jquery' );\n\n\t\t}",
"function _loadProductAttributesInfo()\n {\n global $zone;\n\n if ($this->_fBaseProductInfo == null)\n {\n $this->_loadBaseProductInfo();\n }\n $display_product_price_including_taxes = modApiFunc('Settings', 'getParamValue', 'TAXES_PARAMS', \"DISPLAY_PRICES_W_INCLUDED_TAXES\");\n\n $a = (int)$this->_fProductID;\n $b = (int)$this->_fBaseProductInfo[0]['p_type_id'];\n $c = $display_product_price_including_taxes == DB_TRUE ? 1 : 0;\n if (isset(self::$_cache_attr[$a][$b][$c])) {\n $this->_fProductAttributesInfo = self::$_cache_attr[$a][$b][$c];\n return;\n }\n\n $params = array('product_id' => (int)$this->_fProductID,\n 'product_type_id' => (int)$this->_fBaseProductInfo[0]['p_type_id']);\n $this->_fProductAttributesInfo = execQuery('SELECT_PRODUCT_ATTRIBUTES_INFO', $params);\n // SalePrice,\n // TaxClass.\n $tax_class_id = NULL;\n foreach ($this->_fProductAttributesInfo as $index => $attribute)\n {\n if ( strtolower($attribute['a_view_tag']) == 'taxclass' )\n {\n $tax_class_id = $attribute['pa_value'];\n break;\n }\n }\n\n $price_including_included_taxes_if_any = NULL;\n foreach ($this->_fProductAttributesInfo as $index => $attribute)\n {\n if ( strtolower($attribute['a_view_tag']) == 'saleprice' )\n {\n if($zone == 'CustomerZone')\n {\n $membership = modApiFunc('Customer_Account','getCurrentSignedCustomerGroupID');\n $attribute['pa_value'] = modApiFunc('Quantity_Discounts','getFixedPrice',$this->_fProductID,1,$attribute['pa_value'],$membership);\n }\n\n $price_including_included_taxes_if_any = $attribute['pa_value'];\n $this->_fProductAttributesInfo['salepriceexcludingtaxes'] = $this->_fProductAttributesInfo[$index];\n $this->_fProductAttributesInfo['salepriceexcludingtaxes']['pa_id'] = NULL;\n $this->_fProductAttributesInfo['salepriceexcludingtaxes']['a_view_tag'] = NULL;\n\n // TaxClass - , .\n if($tax_class_id !== NULL)\n {\n // .\n $price_excluding_taxes = modApiFunc(\"Catalog\", \"computePriceExcludingTaxes\", $attribute['pa_value'], $tax_class_id);\n $this->_fProductAttributesInfo[$index]['pa_value'] = $price_excluding_taxes;\n\n // _ _ 'salepriceexcludingtaxes':\n $this->_fProductAttributesInfo['salepriceexcludingtaxes']['pa_value'] = $price_excluding_taxes;\n }\n\n $this->_fProductAttributesInfo['salepriceincludingtaxes'] = $this->_fProductAttributesInfo[$index];\n $this->_fProductAttributesInfo['salepriceincludingtaxes']['pa_id'] = NULL;\n $this->_fProductAttributesInfo['salepriceincludingtaxes']['a_view_tag'] = NULL;\n\n if($tax_class_id !== NULL)\n {\n // .\n // _c_ 'salepriceexcludingtaxes':\n $price_including_taxes = $price_including_included_taxes_if_any;\n // ,\n // , \" \"\n //modApiFunc(\"Catalog\", \"computePriceIncludingTaxes\", $attribute['pa_value'], $tax_class_id);\n\n $this->_fProductAttributesInfo['salepriceincludingtaxes']['pa_value'] = $price_including_taxes;\n\n if($display_product_price_including_taxes == DB_TRUE)\n {\n $this->_fProductAttributesInfo[$index]['pa_value'] = $price_including_taxes;\n }\n }\n\n break;\n }\n }\n self::$_cache_attr[$a][$b][$c] = $this->_fProductAttributesInfo;\n }",
"function apptivo_ecommerce_product( $id) {\n\t\t\n\t\t$this->id = (int)$id;\t\t\n\t\t$app_item_id = get_post_meta($this->id,'_apptivo_item_id',true); \n\t\t$app_item_uom_id = get_post_meta($this->id,'_apptivo_item_uom_id',true);\n\t\t$app_item_manufactured_id = get_post_meta($this->id,'_apptivo_item_manufactured_id',true); \n\t\t$this->product_custom_fields = get_post_custom( $this->id );\t\t\n\t\t$this->exists = (sizeof($this->product_custom_fields)>0) ? true : false;\n\t\t// Define the data we're going to load: Key => Default value\n\t\t$load_data = array(\n\t\t\t'_apptivo_item_code'\t\t\t=> $this->id,\n\t\t '_apptivo_track_color' => '',\n\t\t '_apptivo_track_size' => '',\t\n\t\t\t'_apptivo_sale_price'\t=> '',\n\t\t\t'_apptivo_regular_price' => '',\t\t\t\n\t\t '_apptivo_item_id' => $awpItemId,//$app_item_id,\n\t\t '_apptivo_item_uom_id' => $awpItem_UOMId,//$_apptivo_item_uom_id\n\t\t\t'_apptivo_item_manufactured_id' => $app_item_manufactured_id\t \n\t\t);\n\t\t\n\t\t// Load the data from the custom fields\n\t\tforeach ($load_data as $key => $default) :\n\t\t\t$this->$key = (isset($this->product_custom_fields[$key][0]) && $this->product_custom_fields[$key][0]!=='') ? $this->product_custom_fields[$key][0] : $default;\n\t\tendforeach;\n\t\t\n\t\t// Load serialised data, unserialise twice to fix WP bug\n\t\tif (isset($this->product_custom_fields['product_attributes'][0])) $this->attributes = maybe_unserialize( maybe_unserialize( $this->product_custom_fields['product_attributes'][0] )); else $this->attributes = array();\t\t\n\t\t\t\t\t\t\n\t\t\n\t}",
"public function loadProduct($value, $productAttr = 'entity_id') {\n\t\treturn Mage::getModel('catalog/product')->load($value, $productAttr);\n\t}",
"function ciniki_merchandise_web_productLoad($ciniki, $tnid, $args) {\n \n $strsql = \"SELECT ciniki_merchandise.id, \"\n . \"ciniki_merchandise.uuid, \"\n . \"ciniki_merchandise.name, \"\n . \"ciniki_merchandise.permalink, \"\n . \"ciniki_merchandise.flags, \"\n . \"ciniki_merchandise.primary_image_id, \"\n . \"'' AS primary_image_caption, \"\n . \"ciniki_merchandise.synopsis, \"\n . \"ciniki_merchandise.description \"\n . \"FROM ciniki_merchandise \"\n . \"WHERE ciniki_merchandise.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n if( isset($args['permalink']) && $args['permalink'] != '' ) {\n $strsql .= \"AND ciniki_merchandise.permalink = '\" . ciniki_core_dbQuote($ciniki, $args['permalink']) . \"' \";\n } elseif( isset($args['id']) && $args['id'] > 0 ) {\n $strsql .= \"AND ciniki_merchandise.id = '\" . ciniki_core_dbQuote($ciniki, $args['id']) . \"' \";\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.merchandise.27', 'msg'=>'No product specified'));\n }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.merchandise', 'product');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.merchandise.28', 'msg'=>'Product not found', 'err'=>$rc['err']));\n }\n if( !isset($rc['product']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.merchandise.29', 'msg'=>'Unable to find Product'));\n }\n $product = $rc['product'];\n\n //\n // Get the images\n //\n if( isset($args['images']) && $args['images'] == 'yes' ) {\n $strsql = \"SELECT id, \"\n . \"name AS title, \"\n . \"permalink, \"\n . \"flags, \"\n . \"image_id, \"\n . \"description \"\n . \"FROM ciniki_merchandise_images \"\n . \"WHERE product_id = '\" . ciniki_core_dbQuote($ciniki, $product['id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.merchandise', array(\n array('container'=>'images', 'fname'=>'id', 'fields'=>array('id', 'title', 'permalink', 'flags', 'image_id', 'description')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['images']) ) {\n $product['images'] = $rc['images'];\n } else {\n $product['images'] = array();\n }\n if( $product['primary_image_id'] > 0 ) {\n $found = 'no';\n foreach($product['images'] as $image) {\n if( $image['image_id'] == $product['primary_image_id'] ) {\n $found = 'yes';\n }\n }\n if( $found == 'no' ) {\n array_unshift($product['images'], array('title'=>'', 'flags'=>1, 'permalink'=>$product['uuid'], 'image_id'=>$product['primary_image_id'], 'description'=>''));\n }\n }\n }\n\n return array('stat'=>'ok', 'product'=>$product);\n}",
"function product( )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $ret = new eZProduct( $this->ProductID );\n \n return $ret;\n }",
"public function getProduct();",
"public static function loadProductByProId($p_proId)\n {\n $sql = \"select * from products where ProID = $p_proId\";\n $list = DataProviderMain::execQuery($sql);\n if ($row = mysqli_fetch_array($list)) {\n\n //$proId = $row[\"ProID\"];\n //$proId = $p_proId;\n $proName = $row[\"ProName\"];\n $tinyDes = $row[\"TinyDes\"];\n $fullDes = $row[\"FullDes\"];\n $price = $row[\"Price\"];\n $quantity = $row[\"Quantity\"];\n $catId = $row[\"CatID\"];\n $view = $row[\"NView\"];\n $dayAdd = $row[\"DayAdd\"];\n $classify = $row[\"Classify\"];\n\n $p = new Products($p_proId, $proName, $tinyDes, $fullDes, $price, $quantity, $catId, $view, $dayAdd, $classify);\n return $p;\n }\n\n return NULL;\n }",
"protected function getProductLoadId()\n {\n $product = $this->locator->getProduct();\n if (method_exists($product, 'getData')) {\n return $product->getData($this->getProductLinkField());\n }\n }",
"public function product()\n {\n return $this->belongsTo(config('inventory.models.product-variant'), 'product_variant_id');\n }",
"public function getVariantByProduct($id){\n $this->db->select('*');\n $this->db->where('id_product', $id);\n $this->db->from($this->product_variant); \n return $this->db->get();\n }",
"public function getProduct() {\n return Mage::registry('product');\n }",
"protected function process()\n {\n\n // query whether or not we've found a configurable product\n if ($this->getValue(ColumnKeys::PRODUCT_TYPE) !== ProductTypes::CONFIGURABLE) {\n return;\n }\n\n // query whether or not, we've configurables\n if ($configurableVariations = $this->getValue(ColumnKeys::CONFIGURABLE_VARIATIONS)) {\n // load the variation labels, if available\n $configurableVariationLabels = $this->getValue(ColumnKeys::CONFIGURABLE_VARIATION_LABELS);\n\n // create an array with the variation labels (attribute code as key)\n $varLabels = array();\n\n // explode the variations labels\n if ($variationLabels = $this->explode($configurableVariationLabels)) {\n foreach ($variationLabels as $variationLabel) {\n if (strstr($variationLabel, '=')) {\n list ($key, $value) = $this->explode($variationLabel, '=');\n $varLabels[$key] = $value;\n }\n }\n }\n\n // load the variation positions, if available\n $configurableVariationsPosition = $this->getValue(ColumnKeys::CONFIGURABLE_VARIATIONS_POSITION);\n\n // create an array with the variation labels (attribute code as key)\n $varPositions = array();\n\n // explode the variations labels\n if ($variationPositions = $this->explode($configurableVariationsPosition)) {\n foreach ($variationPositions as $variationPosition) {\n if (strstr($variationPosition, '=')) {\n list ($key, $value) = $this->explode($variationPosition, '=');\n $varPositions[$key] = $value;\n }\n }\n }\n\n // intialize the array for the variations\n $artefacts = array();\n\n // load the parent SKU, the store view code and the attribute set code from the row\n $parentSku = $this->getValue(ColumnKeys::SKU);\n $storeViewCode = $this->getValue(ColumnKeys::STORE_VIEW_CODE);\n $attributeSetCode = $this->getValue(ColumnKeys::ATTRIBUTE_SET_CODE);\n\n // iterate over all variations and import them, e. g. the complete value will look like\n // sku=sku-0-black-55 cm,color=Black,size=55 cm| \\\n // sku=sku-01-black-xs,color=Black,size=XS| \\\n // sku=sku-02-blue-xs,color=Blue,size=XS| \\\n // sku=02-blue-55 cm,color=Blue,size=55 cm\n foreach ($this->explode($configurableVariations, '|') as $variation) {\n // explode the SKU and the configurable attribute values, e. g.\n // sku=sku-0-black-55 cm,color=Black,size=55 cm\n $explodedVariation = $this->explode($variation);\n\n // explode the variations child SKU\n list (, $childSku) = $this->explode(array_shift($explodedVariation), '=');\n\n // iterate over the configurable attribute configuration\n foreach ($explodedVariation as $option) {\n // explode the attributes option code and value\n list ($optionCode, $optionValue) = $this->explode($option, '=');\n\n // load the apropriate variation label\n $varLabel = '';\n if (isset($varLabels[$optionCode])) {\n $varLabel = $varLabels[$optionCode];\n }\n\n // load the apropriate variation position\n $varPosition = null;\n if (isset($varPositions[$optionCode])) {\n $varPosition = $varPositions[$optionCode];\n }\n\n // initialize the product variation itself\n $variation = $this->newArtefact(\n array(\n ColumnKeys::STORE_VIEW_CODE => $storeViewCode,\n ColumnKeys::ATTRIBUTE_SET_CODE => $attributeSetCode,\n ColumnKeys::VARIANT_PARENT_SKU => $parentSku,\n ColumnKeys::VARIANT_CHILD_SKU => $childSku,\n ColumnKeys::VARIANT_ATTRIBUTE_CODE => $optionCode,\n ColumnKeys::VARIANT_OPTION_VALUE => $optionValue,\n ColumnKeys::VARIANT_VARIATION_LABEL => $varLabel,\n ColumnKeys::VARIANT_VARIATION_POSITION => $varPosition\n ),\n array(\n ColumnKeys::STORE_VIEW_CODE => ColumnKeys::STORE_VIEW_CODE,\n ColumnKeys::ATTRIBUTE_SET_CODE => ColumnKeys::ATTRIBUTE_SET_CODE,\n ColumnKeys::VARIANT_PARENT_SKU => ColumnKeys::SKU,\n ColumnKeys::VARIANT_CHILD_SKU => ColumnKeys::CONFIGURABLE_VARIATIONS,\n ColumnKeys::VARIANT_ATTRIBUTE_CODE => ColumnKeys::CONFIGURABLE_VARIATIONS,\n ColumnKeys::VARIANT_OPTION_VALUE => ColumnKeys::CONFIGURABLE_VARIATIONS,\n ColumnKeys::VARIANT_VARIATION_LABEL => ColumnKeys::CONFIGURABLE_VARIATION_LABELS,\n ColumnKeys::VARIANT_VARIATION_POSITION => ColumnKeys::CONFIGURABLE_VARIATIONS_POSITION\n )\n );\n\n // append the product variation\n $artefacts[] = $variation;\n }\n }\n\n // append the variations to the subject\n $this->addArtefacts($artefacts);\n }\n }",
"private function loadProducts(ObjectManager $manager)\n {\n // First get and parse the yaml file\n $products = Yaml::parse(file_get_contents(__DIR__ . '/datas/yml/Products.yaml'));\n\n // Loop on every index\n foreach ($products as $k => $v) {\n\n // Find the Model Object from given name\n $model = $manager->getRepository('AppBundle:Product\\Model')\n ->findOneBy(['name' => $v['model_name']]);\n\n // Create a new product and assign first datas\n $product = new Product();\n $product->setTitle($k);\n $product->setModel($model);\n $product->hydrate($v);\n\n // If Notices are given, loop assign and persist them\n if (isset($v['notices'])) {\n foreach ($v['notices'] as $nk => $nv) {\n // Create, hydrate and persist new Notice Object\n $notice = new Notice();\n $notice->setType($nk);\n $notice->setProduct($product);\n $notice->setMessage($nv);\n $manager->persist($notice);\n }\n }\n\n // If Guarantees are given, loop assign and persist them\n if (isset($v['guarantees'])) {\n foreach ($v['guarantees'] as $gk => $gv) {\n // Check if guarantee is link to product or feature\n if ($gk === 'global') {\n // If ProductGuarantee, create new Object\n $guarantee = new ProductGlobal();\n } else {\n // If FeatureGuarantee, first find related feature\n $feature = $manager->getRepository('AppBundle:Feature\\Feature')\n ->findOneBy(['name' => $gk]);\n // Then create & hydrate ProductSpecific Object\n $guarantee = new ProductSpecific();\n $guarantee->setFeature($feature);\n $guarantee->setProduct($product);\n }\n\n // Then hydrate guarantee whatever it's type\n $guarantee->hydrate($gv);\n\n // If is GlobalGuarantee, link product to it\n if ($gk === 'global') {\n $product->setGlobalGuarantee($guarantee);\n }\n\n // Persist the guarantee\n $manager->persist($guarantee);\n }\n }\n\n // Persist product at end of loop\n $manager->persist($product);\n }\n\n // Flush all persisted datas\n $manager->flush();\n }",
"public function product_detail() {\n global $product;\n WC_Gokeep_JS::get_instance()->product_detail( $product );\n }",
"private function getProductsData($products_id)\n\t{\n \t$currency = Shopware()->Db()->fetchOne(\"SELECT c.currency FROM s_core_currencies c INNER JOIN s_core_shops s ON c.id = s.currency_id\"); \n\n $product = Shopware()->Modules()->Articles()->sGetArticleById($products_id);\n \n if (is_array($product[sConfigurator]))\n\t\t{\n $variants = Shopware()->Db()->fetchAll(\"SELECT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\taa.id as articledetail, acg.name as groupname, aco.name as valuename, acor.option_id as optionid\n \t\t\t\t\t\t\t\tFROM s_article_configurator_option_relations acor\n \t\t\t\t\t\t\t\tINNER JOIN s_articles_details aa ON acor.article_id = aa.id\n \t\t\t\t\t\t\t\tINNER JOIN s_article_configurator_options aco ON aco.id = acor.option_id\n \t\t\t\t\t\t\t\tINNER JOIN s_article_configurator_groups acg ON acg.id = aco.group_id\n \t\t\t\t\t\t\t\tWHERE aa.articleID =\".$products_id);\n $variant_prods = array();\n\n foreach ($variants as $variantkey => $variantval)\n\t\t\t{\n $variant_prods[$variantval['articledetail']][$variantval['groupname']]=$variantval['valuename'];\n\n $images = Shopware()->Db()->fetchAll(\"SELECT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tm.* \n \t\t\t\t\t\t\t\tFROM s_articles_img ai\n \t\t\t\t\t\t\t\tINNER JOIN s_media m ON m.id = ai.media_id\n \t\t\t\t\t\t\t\tWHERE ai.id IN (\n \t\t\t\t\t\t\t\tSELECT ai2.parent_id\n \t\t\t\t\t\t\t\tFROM s_articles_img ai2 \n \t\t\t\t\t\t\t\tWHERE ai2.article_detail_id = \".$variantval['articledetail'].\"\n \t\t\t\t\t\t\t)\");\n\t\t\t\t\n if (count($images) > 0)\n\t\t\t\t{\n foreach($images as $imagekey=>$imageval)\n\t\t\t\t\t{\n $imagepath = 'http://'.Shopware()->Shop()->getHost();\n $imagepath .= Shopware()->Shop()->getBaseUrl().'/';\n $variant_prods[$variantval['articledetail']]['image_url'] = $imagepath.$imageval['path'];\n }\n } else {\n $variant_prods[$variantval['articledetail']]['image_url'] = $product['image']['src']['original'];\n }\n }\n\n ksort($variant_prods);\n $variant_prods_array=array();\n\n foreach($variant_prods as $variantprodskey => $variantprodsval)\n\t\t\t{\n foreach($variantprodsval as $ikey => $ival)\n\t\t\t\t{\n if ($ikey != 'image_url')\n\t\t\t\t\t{\n $variant_prods_array_inner[$ikey] = $ival;\n }\n }\n $variant_prods_array_inner['image_url'] = $variantprodsval['image_url'];\n $variant_prods_array[] = $variant_prods_array_inner;\n }\n }\n\n $rewrite_path = Shopware()->Db()->fetchOne(\"SELECT path FROM s_core_rewrite_urls WHERE org_path = 'sViewport=detail&sArticle=\".$products_id.\"'\");\n \n $rewrite_url = $this->Front()->Router()->assemble(array('module' => 'frontend', 'controller' => 'index'));\n $rewrite_url .= $rewrite_path;\n\n if ($product['sUpcoming'] == 0)\n\t\t{\n if ($product['laststock'] == 1)\n\t\t\t{\n if ($product['instock'] <= 0)\n\t\t\t\t{\n $availibility = 'out of stock';\n } elseif($product['instock'] > 0) {\n $availibility = 'in stock';\n }\n\n } else {\n if ($product['instock'] <= 0)\n\t\t\t\t{\n $availibility = 'available for order';\n } elseif($product['instock'] > 0) {\n $availibility = 'in stock';\n }\n }\n } else {\n $availibility = 'preorder';\n }\n\n $prod_cats = Shopware()->Db()->fetchAll(\"SELECT categoryID FROM s_articles_categories WHERE articleID = \".$products_id);\n $prod2cats = array();\n\t\t\n foreach ($prod_cats as $catkey => $catval)\n\t\t{\n $prod2cats[] = $catval['categoryID'];\n }\n\t\t\n\t\t$price = floatval(str_replace(',','.',$product['price']));\n\t\t$pseudoprice = (isset($product['pseudoprice']) && $product['pseudoprice'] > 0) ? floatval(str_replace(',','.',$product['pseudoprice'])) : $price;\n\t\t$discout_absolute = ($pseudoprice > $price) ? ($pseudoprice - $price) : 0;\n\n $prod_shipping_array = $this->getShippingArray($product);\n $jsonproductarray = array(\n 'id' => $product['articleID'],\n 'name' => $product['articleName'],\n 'image_url' => $product['image']['src']['original'],\n 'condition' => 'new',\n 'categories' => $prod2cats,\n 'availability' => $availibility,\n 'price' => $price,\n\t\t\t'rrp' => floatval($pseudoprice),\n\t\t\t'discount_absolute' => $discout_absolute, \n 'url' => $rewrite_url,\n 'description' => $product['description_long'],\n 'currency' => $currency,\n 'shipping' => $prod_shipping_array,\n 'margin' => 0.56,\n 'gtin' => $product['ean'],\n\t\t\t'brand' => $product['supplierName'],\n\t\t\t'mpn' => $product['ordernumber']\n );\n\t\t\n if (count($variant_prods_array) > 0)\n\t\t{\n $jsonproductarray['variants'] = $variant_prods_array;\n }\n\t\t\n $products_data = $jsonproductarray;\n return $products_data;\n }",
"function Products() {\n\t\t$this->log =LoggerManager::getLogger('product');\n\t\t$this->log->debug(\"Entering Products() method ...\");\n\t\t$this->db = & getSingleDBInstance();\n\t\t$this->column_fields = getColumnFields('Products');\n\t\t$this->log->debug(\"Exiting Product method ...\");\n\t}",
"public function getProduct() {\r\n\t\t$id = $this->getRequest()->getParam('id');\r\n\t\t$products = Mage::getModel('catalog/product')->load($id);\r\n\t\treturn $products;\r\n\t}",
"function addVariation($data,$form){\r\n\t\tif(isset($data['ProductAttributes'])){\r\n\t\t\t$data['ProductAttributes'] = Convert::raw2sql($data['ProductAttributes']);\r\n\t\t\t$variation = $this->owner->getVariationByAttributes($data['ProductAttributes']);\r\n\t\t\tif($variation) {\r\n\t\t\t\tif($variation->canPurchase()) {\r\n\t\t\t\t\t$quantity = round($data['Quantity'], $variation->QuantityDecimals());\r\n\t\t\t\t\tif(!$quantity) {\r\n\t\t\t\t\t\t$quantity = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tShoppingCart::singleton()->addBuyable($variation,$quantity);\r\n\t\t\t\t\tif($variation->IsInCart()) {\r\n\t\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.SUCCESSFULLYADDED\",\"Added to cart.\");\r\n\t\t\t\t\t\t$status = \"good\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.NOTSUCCESSFULLYADDED\",\"Not added to cart.\");\r\n\t\t\t\t\t\t$status = \"bad\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTAVAILABLE\",\"That option is not available.\");\r\n\t\t\t\t\t$status = \"bad\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTAVAILABLE\",\"That option is not available.\");\r\n\t\t\t\t$status = \"bad\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTFOUND\",\"The item(s) you are looking for are not available.\");\r\n\t\t\t$status = \"bad\";\r\n\t\t}\r\n\t\tif(Director::is_ajax()){\r\n\t\t\treturn ShoppingCart::singleton()->setMessageAndReturn($msg, $status);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$form->sessionMessage($msg,$status);\r\n\t\t\tDirector::redirectBack();\r\n\t\t}\r\n\t}",
"public function setProduct()\n {\n // get the existing products array\n $products = $this->getProducts();\n // push the new product to the array\n array_push($products, $this);\n $file = fopen($_SERVER['DOCUMENT_ROOT'] . \"/mpm_challenge/problem4/db/db.json\", \"w+\") or die(\"not opened\");\n fwrite($file, json_encode($products));\n fclose($file);\n }",
"public function fetch($id)\n\t{\n\t\t$product = WooProduct::fetch( $id );\n\n\t\tif ( !$product )\n\t\t\t$product = WooProduct::fetchById( $id );\n\n\t\tabi_r($product, true);\n\t}",
"public function show(Productvariant $id)\n {\n //\n }",
"private function prepareExternalProduct() {\n if ($this->getSaverData()->isFirstPage()) {\n $this->setPrice();\n $this->setSKU();\n $this->setEnableReviews();\n $this->setMenuOrder();\n $this->setExternalProductDetails();\n }\n\n $this->setTags();\n $this->setAttributes();\n }",
"protected function _initProduct()\n {\n $this->_title($this->__('Catalog'))\n ->_title($this->__('Manage Products'));\n\n $productId = (int) $this->getRequest()->getParam('id');\n $product = Mage::getModel('catalog/product')\n ->setStoreId($this->getRequest()->getParam('store', 0));\n\n // Hack\n\n $this->getRequest()->setParam('set',4);\n $this->getRequest()->setParam('type','simple');\n if (!$productId) {\n if ($setId = (int) $this->getRequest()->getParam('set')) {\n $product->setAttributeSetId($setId);\n }\n\n if ($typeId = $this->getRequest()->getParam('type')) {\n $product->setTypeId($typeId);\n }\n }\n\n $product->setData('_edit_mode', true);\n if ($productId) {\n try {\n $product->load($productId);\n\n } catch (Exception $e) {\n $product->setTypeId(Mage_Catalog_Model_Product_Type::DEFAULT_TYPE);\n Mage::logException($e);\n }\n }\n\n $attributes = $this->getRequest()->getParam('attributes');\n if ($attributes && $product->isConfigurable() &&\n (!$productId || !$product->getTypeInstance()->getUsedProductAttributeIds())) {\n $product->getTypeInstance()->setUsedProductAttributeIds(\n explode(\",\", base64_decode(urldecode($attributes)))\n );\n }\n\n // Required attributes of simple product for configurable creation\n if ($this->getRequest()->getParam('popup')\n && $requiredAttributes = $this->getRequest()->getParam('required')) {\n $requiredAttributes = explode(\",\", $requiredAttributes);\n foreach ($product->getAttributes() as $attribute) {\n if (in_array($attribute->getId(), $requiredAttributes)) {\n $attribute->setIsRequired(1);\n }\n }\n }\n\n if ($this->getRequest()->getParam('popup')\n && $this->getRequest()->getParam('product')\n && !is_array($this->getRequest()->getParam('product'))\n && $this->getRequest()->getParam('id', false) === false) {\n\n $configProduct = Mage::getModel('catalog/product')\n ->setStoreId(0)\n ->load($this->getRequest()->getParam('product'))\n ->setTypeId($this->getRequest()->getParam('type'));\n\n /* @var $configProduct Mage_Catalog_Model_Product */\n $data = array();\n foreach ($configProduct->getTypeInstance()->getEditableAttributes() as $attribute) {\n\n /* @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */\n if(!$attribute->getIsUnique()\n && $attribute->getFrontend()->getInputType()!='gallery'\n && $attribute->getAttributeCode() != 'required_options'\n && $attribute->getAttributeCode() != 'has_options'\n && $attribute->getAttributeCode() != $configProduct->getIdFieldName()) {\n $data[$attribute->getAttributeCode()] = $configProduct->getData($attribute->getAttributeCode());\n }\n }\n\n $product->addData($data)\n ->setWebsiteIds($configProduct->getWebsiteIds());\n }\n\n Mage::register('product', $product);\n Mage::register('current_product', $product);\n Mage::getSingleton('cms/wysiwyg_config')->setStoreId($this->getRequest()->getParam('store'));\n return $product;\n }",
"protected function _getProduct()\n {\n if (!$this->_product) {\n $this->_product = $this->_objectManager->create(\\Magento\\Catalog\\Model\\Product::class);\n $productId = (int)$this->getRequest()->getParam('product', 0);\n $urlRewrite = $this->_getUrlRewrite();\n if (!$productId && $urlRewrite->getId() && $urlRewrite->getEntityType() === self::ENTITY_TYPE_PRODUCT) {\n $productId = $this->_getUrlRewrite()->getEntityId();\n }\n if ($productId) {\n $this->_product->load($productId);\n }\n }\n return $this->_product;\n }",
"public function getProduct()\n {\n return Mage::registry('product');\n }",
"public function getProduct()\n {\n return Mage::registry('product');\n }",
"public function getProduct()\n {\n return Mage::registry('product');\n }",
"public function getProductById(int $id);",
"function load($manager)\n {\n $feature1 = new Feature();\n $feature1->setType('size');\n $feature1->setName('20x20');\n $feature1->setSearchTerm('size');\n\n $feature2 = new Feature();\n $feature2->setType('weight');\n $feature2->setName('31');\n $feature2->setSearchTerm('weight');\n\n $feature3 = new Feature();\n $feature3->setType('pages');\n $feature3->setName('230');\n $feature3->setSearchTerm('pages');\n\n $o_gr = new OptionGroup();\n $o_gr->setName(\"color\");\n $o_gr->setRequired(1);\n $o_gr->setDisplay('my');\n\n\n $opt = new Option();\n $opt->setType('color');\n $opt->setValue('white');\n\n $opt2 = new Option();\n $opt2->setType('color');\n $opt2->setValue('green');\n\n\n $o_gr->addOption($opt);\n $o_gr->addOption($opt2);\n\n /** @var $pm \\Jeka\\ShopBundle\\Document\\ProductManager */\n $pm = $this->container->get('vespolina.product_manager');\n\n $prod = $pm->createProduct();\n $prod->setPrice(110.2);\n $prod->setName('Test product');\n $prod->setDescription('Test product\\'s description');\n $prod->addCategories($this->getReference('cat_1_1_1'));\n $prod->addImages($this->getReference('image_1'));\n $prod->addImages($this->getReference('image_2'));\n $prod->addImages($this->getReference('image_3'));\n $prod->setSlug('test-product');\n $prod->setType(Product::PHYSICAL);\n\n $prod->addOptionGroup($o_gr);\n\n $prod->addFeature($feature1);\n $prod->addFeature($feature2);\n $prod->addFeature($feature3);\n\n $manager->persist($prod);\n\n $feature1->setName('23x10');\n $feature2->setName('9');\n $feature3->setName('114');\n\n $prod1 = $pm->createProduct();\n $prod1->setPrice(55.99);\n $prod1->setName('Бутылка пива');\n $prod1->setSlug('butilka-piva');\n\n $prod1->setDescription('Описание товара');\n $prod1->addCategories($this->getReference('cat_1_1_1'));\n $prod1->addImages($this->getReference('image_2'));\n $prod1->addImages($this->getReference('image_3'));\n $prod1->addImages($this->getReference('image_4'));\n $prod1->setType(Product::PHYSICAL);\n// $prod1->addFeature($feature1);\n// $prod1->addFeature($feature2);\n// $prod1->addFeature($feature3);\n\n $manager->persist($prod1);\n\n\n $feature1->setName('30x50');\n $feature2->setName('19');\n $feature3->setName('184');\n\n $prod2 = $pm->createProduct();\n $prod2->setPrice(1250);\n $prod2->setName('Фотоальбом');\n $prod2->setSlug('fotoalbom');\n $prod2->setDescription('Описание товара2');\n $prod2->addCategories($this->getReference('cat_1_1_1'));\n $prod2->addCategories($this->getReference('cat_1_1_2'));\n $prod2->addImages($this->getReference('image_3'));\n $prod2->addImages($this->getReference('image_4'));\n $prod2->addImages($this->getReference('image_5'));\n $prod2->setType(Product::PHYSICAL);\n\n// $prod2->addFeature($feature1);\n// $prod2->addFeature($feature2);\n// $prod2->addFeature($feature3);\n\n $manager->persist($prod2);\n\n\n $prod3 = $pm->createProduct();\n $prod3->setName('Доставка курьером');\n $prod3->setSlug('courier-delivery');\n $prod3->setType(Product::SERVICE|Product::UNIQUE);\n $prod3->setPrice('200');\n $prod3->addCategories($this->getReference('cat_1_2'));\n// $prod->addImages($this->getReference('image_5'));\n// $prod->addImages($this->getReference('image_6'));\n// $prod->addImages($this->getReference('image_7'));\n $manager->persist($prod3);\n\n $manager->flush();\n }",
"public static function loadProductFixtures(): void\n {\n include __DIR__ . '/../../../_files/productFixtures.php';\n }",
"protected function _loadProduct($productId)\n {\n if (!$productId) {\n return false;\n }\n\n $product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($productId);\n /** @var $product Mage_Catalog_Model_Product */\n if (!$product->getId() || !$product->isVisibleInCatalog() || !$product->isVisibleInSiteVisibility()) {\n return false;\n }\n\n Mage::register('current_product', $product);\n Mage::register('product', $product);\n\n return $product;\n }",
"private function setup_products() {\n\t\tglobal $wpdb;\n\n\t\t$ids = [];\n\t\t$d = $wpdb->get_results( \"SELECT distinct `products` FROM `{$wpdb->prefix}thespa_data`\", ARRAY_A );\n\t\tforeach ( $d as $datum ) {\n\t\t\t$prs = explode( \",\", $datum['products'] );\n\t\t\tforeach ( $prs as $pr ) {\n\t\t\t\tif ( !isset( $ids[$pr] ) ) {\n\t\t\t\t\tarray_push($ids, $pr );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$i = 0;\n\t\tforeach ( $ids as $id ) {\n\t\t\t$product = wc_get_product( $id );\n\t\t\tif ( is_object( $product ) ) {\n\t\t\t\t$this->products[$i] = [\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'name' => $product->get_title(),\n\t\t\t\t\t'url' => $product->get_permalink(),\n\t\t\t\t\t'img' => wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'medium', true )[0],\n\t\t\t\t\t'cost' => $product->get_price_html(),\n\t\t\t\t];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}",
"public function __construct(Product $product = null)\n {\n $this->locale = Locale::workingLocale();\n $this->productEntity = $product;\n $this->specification_values = new ArrayCollection();\n $this->remove_specification_values = new ArrayCollection();\n $this->specials = new ArrayCollection();\n $this->remove_specials = new ArrayCollection();\n $this->dimensions = new ArrayCollection();\n $this->remove_dimensions = new ArrayCollection();\n $this->dimension_notifications = new ArrayCollection();\n $this->remove_dimension_notifications = new ArrayCollection();\n $this->related_products = new ArrayCollection();\n $this->up_sell_products = new ArrayCollection();\n $this->remove_up_sell_products = new ArrayCollection();\n $this->remove_related_products = new ArrayCollection();\n $this->images = MediaGroup::create(MediaGroupType::fromString(Type::IMAGE));\n $this->downloads = MediaGroup::create(MediaGroupType::fromString(Type::FILE));\n $this->weight = (float)0.00;\n $this->sequence = $this->getProductRepository()->getNextSequence($this->locale, $this->category);\n\n if (!$this->hasExistingProduct()) {\n return;\n }\n\n $this->id = $product->getId();\n $this->meta = $product->getMeta();\n $this->category = $product->getCategory();\n $this->brand = $product->getBrand();\n $this->vat = $product->getVat();\n $this->stock_status = $product->getStockStatus();\n $this->hidden = $product->isHidden();\n $this->type = $product->getType();\n $this->min_width = $product->getMinWidth();\n $this->min_height = $product->getMinHeight();\n $this->max_width = $product->getMaxWidth();\n $this->max_height = $product->getMaxHeight();\n $this->extra_production_width = $product->getExtraProductionWidth();\n $this->extra_production_height = $product->getExtraProductionHeight();\n $this->title = $product->getTitle();\n $this->summary = $product->getSummary();\n $this->text = $product->getText();\n $this->dimension_instructions = $product->getDimensionInstructions();\n $this->locale = $product->getLocale();\n $this->weight = $product->getWeight();\n $this->price = $product->getPrice();\n $this->stock = $product->getStock();\n $this->order_quantity = $product->getOrderQuantity();\n $this->from_stock = $product->isFromStock();\n $this->sku = $product->getSku();\n $this->ean13 = $product->getEan13();\n $this->isbn = $product->getIsbn();\n $this->sequence = $product->getSequence();\n $this->specification_values = $product->getSpecificationValues();\n $this->specials = $product->getSpecials();\n $this->dimensions = $product->getDimensions();\n $this->dimension_notifications = $product->getDimensionNotifications();\n $this->images = $product->getImages();\n $this->downloads = $product->getDownloads();\n $this->related_products = $product->getRelatedProducts();\n $this->up_sell_products = $product->getUpSellProducts();\n\n // just a fallback\n if (!$this->images instanceof MediaGroup) {\n $this->images = MediaGroup::create(MediaGroupType::fromString(Type::IMAGE));\n }\n\n // just a fallback\n if (!$this->downloads instanceof MediaGroup) {\n $this->downloads = MediaGroup::create(MediaGroupType::fromString(Type::FILE));\n }\n }",
"private function loadMetadata() {\n\t\t$this->pMeta = $this->em->getClassMetadata('OcProduct');\n\t\t$this->pdMeta = $this->em->getClassMetadata('OcProductDescription');\n\t}",
"public static function product($product)\n {\n static::$product = $product;\n }",
"public function getproductinfoAction() {\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\t$product = Doctrine::getTable ( 'Products' )->find ( $id )->toArray ();\n\t\tdie ( json_encode ( $product ) );\n\t}",
"public function read( $id=NULL ){\n\t\tif( is_null( $id ) ){\n\t\t\treturn $this->productNotFound();\t\n\t\t}\n\t\t\n\t\t//\tload model\n\t\t$this->contentData['product'] = $this->product_model->getProduct( $id );\n\t\tif( !$this->contentData['product'] ){\n\t\t\treturn $this->productNotFound();\n\t\t}\n\t\t\n\t\t//\tview separate elements will be loaded into\n\t\t$aggregated_view = 'product/product_view';\n\t\t\n\t\t//\tcollect separate elements\n\t\t$this->contentData['controls'] = $this->techniart->loadControls($aggregated_view);\n\n\t\t//\tload main template\n\t\t$data['title'] = 'Product';\n\t\t$data['content'] = $this->load->view($aggregated_view, $this->contentData, TRUE);\n\t\t$this->techniart->load( $data );\n\t}",
"public function find($id = 0)\n {\n\n $sql = 'SELECT products.id , product_name, categories.category_name, product_sku FROM `products`\n INNER JOIN product_properties_values on product_properties_values.id_product = products.id\n INNER JOIN categories on categories.id = product_properties_values.property_value\n WHERE products.id = ?';\n\n $sqlData = [(int)$id];\n $app = Application::instance();\n $product['header'] = $this->catalog = $app->db()->getArrayBySqlQuery($sql,$sqlData);\n\n /*$sql = 'SELECT products.product_name, products.product_price, products.product_sku FROM products\n WHERE products.id_parent_product ='. (int)$id\n ;*/\n\n\n $sql = 'SET @SQL = NULL';\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'SELECT\n GROUP_CONCAT(DISTINCT\n CONCAT(\\'GROUP_CONCAT(IF(pr.product_property_name = \\\"\\', pr.`product_property_name`, \\'\\\", pp.property_value, NULL)) AS \\', pr.`product_property_name`)\n ) INTO @SQL\n FROM product_properties AS pr';\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'SET @SQL = CONCAT(\\'SELECT p .*, \\', @SQL, \\'\n FROM products AS p\n LEFT JOIN product_properties_values AS pp ON (p.id = pp.id_product)\n LEFT JOIN product_properties AS pr ON (pr.id = pp.id_property)\n WHERE p.id_parent_product =' . (int)$id . '\n AND deleted is NULL\n GROUP BY p.id ;\\')';\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'PREPARE stmt FROM @SQL';\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'EXECUTE stmt';\n $product['list'] = $app->db()->getArrayBySqlQuery($sql);\n $sql = 'DEALLOCATE PREPARE stmt';\n $app->db()->getArrayBySqlQuery($sql);\n\n foreach ($product['list'] as $key => $good) {\n $product['list'][$key]['Photo'] = explode(',', $product['list'][$key]['Photo']);\n }\n\n\n $this->product = $product;\n\n\n return $this->product;\n }",
"public function get_all_product_information () {\n $this->json_source_file = file_get_contents(\"products.json\");\n $this->json_source_array = json_decode($this->json_source_file,true);\n\n }",
"function product($title, $id)\n {\n $aliURL = \"{$this->model->productURLBase}{$title}/{$id}.html\";\n $productBaseRoute = \"/{$this->siteslug}/product\";\n $aliexpressApi = new AliexpressAPI($aliURL);\n $similar_products = $this->model->getSimilarProduct($id);\n $similar_products_ali = json_decode($similar_products);\n $cache = true;\n $getImages = true;\n if ($cache) {\n if (Cache::get(\"product_$id\") == null) {\n Cache::put(\"product_$id\",\n $aliexpressApi->getTotalProductData($getImages),\n Config::get(\"cache.storeAliSingleProduct\")\n );\n }\n $aliData = Cache::get(\"product_$id\");\n } else {\n $aliData = $aliexpressApi->getTotalProductData($getImages);\n }\n\n $aliData = $this->model->parseProductData($aliData);\n\n $feedback_link = Util::checkHTTPS($aliData['feedback']);\n\n $stars = $aliData['percentNum'] / 5 * 100;\n\n $breadCramb = $this->model->getBreadCramb(Input::get('categoryID'));\n// dd($breadCramb);\n $jsData = Util::includeJsWithData(\"ProductData\", [\n 'totalSkuNum' => count($aliData['productSKU']),\n 'priceRange' => $aliData['mainPrice'],\n 'skuVariations' => $aliData['productSkuJSON'],\n 'skuData' => $aliData['skuArrayJSON'],\n 'image' => $aliData['mainImages'][0],\n 'shipping' => $aliData['shipping']\n ]);\n\n\n $this->title = \"עליאקספרס בעברית צ'יפי קניות ברשת\" . $aliData['productName'];\n if (isset($similar_products_ali->result)) {\n foreach ($similar_products_ali->result->products as $product) {\n $price = Util::replacePrices($product->salePrice);\n $product->salePrice = $price;\n $url_html = $productBaseRoute . \"/\" . explode(\"/\", $product->productUrl)[4] . \"/\" . explode(\"?\", explode(\"/\", $product->productUrl)[5])[0];\n $new_url = str_replace('.html', \"\", $url_html);\n $product->productUrl = $new_url;\n }\n }\n\n return view(\"aliexpress.product\", [\n 'timerTime' => $this->timerTime,\n 'stars' => $stars,\n 'productData' => $jsData,\n 'aliData' => $aliData,\n 'categories' => $this->categories,\n 'siteslug' => $this->siteslug,\n 'breadCramb' => $breadCramb,\n 'productID' => $id,\n 'title' => $title,\n 'title' => $this->title,\n 'description' => $this->description,\n 'similar_products' => $similar_products_ali,\n 'productBase' => $productBaseRoute,\n 'feedback_link' => $feedback_link\n ]);\n }",
"public function getProduct($id)\n {\n $lims_product_warehouse_data = Product::join('product_warehouse', 'products.id', '=', 'product_warehouse.product_id')\n ->where([\n ['products.is_active', true],\n ['product_warehouse.warehouse_id', $id],\n ])->whereNull('product_warehouse.variant_id')->select('product_warehouse.*')->get();\n //retrieve data of product with variant\n $lims_product_with_variant_warehouse_data = Product::join('product_warehouse', 'products.id', '=', 'product_warehouse.product_id')\n ->where([\n ['products.is_active', true],\n ['product_warehouse.warehouse_id', $id],\n ])->whereNotNull('product_warehouse.variant_id')->select('product_warehouse.*')->get();\n\n $product_code = [];\n $product_name = [];\n $product_qty = [];\n $product_price = [];\n $product_data = [];\n foreach ($lims_product_warehouse_data as $product_warehouse) \n {\n $product_qty[] = $product_warehouse->qty;\n $product_price[] = $product_warehouse->price;\n $lims_product_data = Product::select('code', 'name', 'type')->find($product_warehouse->product_id);\n $product_code[] = $lims_product_data->code;\n $product_name[] = htmlspecialchars($lims_product_data->name);\n $product_type[] = $lims_product_data->type;\n }\n foreach ($lims_product_with_variant_warehouse_data as $product_warehouse) \n {\n $product_qty[] = $product_warehouse->qty;\n $lims_product_data = Product::select('name', 'type')->find($product_warehouse->product_id);\n $lims_product_variant_data = ProductVariant::select('item_code')->FindExactProduct($product_warehouse->product_id, $product_warehouse->variant_id)->first();\n $product_code[] = $lims_product_variant_data->item_code;\n $product_name[] = htmlspecialchars($lims_product_data->name);\n $product_type[] = $lims_product_data->type;\n }\n $lims_product_data = Product::select('code', 'name', 'type')->where('is_active', true)->whereNotIn('type', ['standard'])->get();\n foreach ($lims_product_data as $product) \n {\n $product_qty[] = $product->qty;\n $product_code[] = $product->code;\n $product_name[] = htmlspecialchars($product->name);\n $product_type[] = $product->type;\n }\n $product_data[] = $product_code;\n $product_data[] = $product_name;\n $product_data[] = $product_qty;\n $product_data[] = $product_type;\n $product_data[] = $product_price;\n return $product_data;\n }",
"public function loadByProductAndAttribute($product, $attribute)\n {\n $metadata = $this->metadataPool->getMetadata(ProductInterface::class);\n $id = $this->_getResource()->getIdByProductIdAndAttributeId(\n $this,\n $product->getData($metadata->getLinkField()),\n $attribute->getId()\n );\n if ($id) {\n $this->load($id);\n }\n }",
"function getProduct()\n {\n $sql = \"SELECT * FROM \" . DB_NAME . \".`products`\";\n //echo $sql;exit();\n try {\n $result = $this->connexion->prepare($sql);\n $var = $result->execute();\n $products = [];\n\n while ($data = $result->fetch(PDO::FETCH_OBJ)) {\n $product = new ProductEntity();\n $product->setIdProduct($data->id);\n $product->setName($data->name);\n $product->setDomaine_realise($data->domaine_realise);\n $product->setTache_realisee($data->tache_realisee);\n $product->setImage($data->image);\n $product->setCreatedAt($data->createdat);\n\n $products[] = $product;\n }\n\n if ($products) {\n return $products;\n } else {\n return FALSE;\n }\n } catch (PDOException $th) {\n return NULL;\n }\n }",
"function get_variation( $variation_id, $product ) {\n\n\t\tif ( isset( $this->variations_cache[ $variation_id ] ) )\n\t\t\treturn $this->variations_cache[ $variation_id ];\n\n\t\t$variation = $product->get_child( $variation_id, array(\n\t\t\t'parent_id' => $product->id,\n\t\t\t'parent' \t=> $product\n\t\t) );\n\n\t\t$this->variations_cache[ $variation_id ] = $variation;\n\n\t\treturn $variation;\n\t}",
"private function ml_load_prev()\n\t{\n\t\tif ($this->prod_nums)\n\t\t{\n\t\t\t$prods = array();\n\t\t\tfor ($new_prod_num = 0, $prod_count = count($this->prod_nums); $new_prod_num < $prod_count; ++$new_prod_num)\n\t\t\t{\n\t\t\t\t$old_prod_num = $this->prod_nums[$new_prod_num];\n\t\t\t\t$account = product::create_from_post($old_prod_num);\n\t\t\t\t$prods[] = $account;\n\t\t\t}\n\t\t\tcgi::add_js_var('prods', $prods);\n\t\t}\n\t}",
"public function _getProduct() {\n \n // get website id from request\n $websiteId = ( int ) $this->getRequest ()->getParam ( static::WEBSITE_ID );\n if ($websiteId <= 0) {\n $websiteId = Mage::app ()->getWebsite ( 'base' )->getId ();\n }\n \n // get store id from request\n $storeId = ( int ) $this->getRequest ()->getParam ( static::STORE_ID );\n if ($storeId <= 0) {\n $storeId = Mage::app ()->getWebsite ( $websiteId )->getDefaultGroup ()->getDefaultStoreId ();\n }\n if (is_null ( $this->_product )) {\n $productId = $this->getRequest ()->getParam ( 'id' );\n /**\n *\n * @var $productHelper Mage_Catalog_Helper_Product\n */\n $productHelper = Mage::helper ( 'catalog/product' );\n $product = $productHelper->getProduct ( $productId, $storeId );\n if (! ($product->getId ())) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n // check if product belongs to website current\n if ($this->_getStore ()->getId ()) {\n $isValidWebsite = in_array ( $websiteId, $product->getWebsiteIds () );\n if (! $isValidWebsite) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n }\n // Check display settings for customers & guests\n if ($this->getApiUser ()->getType () != Mage_Api2_Model_Auth_User_Admin::USER_TYPE) {\n // check if product assigned to any website and can be shown\n if ((! Mage::app ()->isSingleStoreMode () && ! count ( $product->getWebsiteIds () )) || ! $productHelper->canShow ( $product )) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n }\n $this->_product = $product;\n }\n return $this->_product;\n }",
"private function load($id = null) {\n\n if (!is_null($id)) {\n\n return $this->search->getProduct($id);\n\n }\n\n return $this->search->getProducts($this->filters);\n\n }",
"function load() {\n $statement = $this->db->prepare('SELECT * FROM favs WHERE id = :id');\n $statement->execute(array(':id' => $this->get('id')));\n $data = $statement->fetch(PDO::FETCH_ASSOC);\n $this->setMultiple($data);\n }",
"protected function getProduct() {\n return $this->registry->registry('product');\n }",
"function ProductQuery() {\n\t $csvilog = JRequest::getVar('csvilog');\n\t \n\t /* Bind the initial data */\n\t $this->_vm_product->bind($this);\n\t \n\t /* Set some initial values */\n\t /* Set the modified date as we are modifying the product */\n\t $this->_vm_product->mdate = time();\n\t \n\t /* We have a succesful save, get the product_id */\n\t if ($this->_vm_product->store()) {\n\t\t $csvilog->AddMessage('debug', JText::_('DEBUG_STORE_PRODUCT'), true);\n\t\t if (substr($this->_vm_product->_db->getQuery(), 0, strpos($this->_vm_product->_db->getQuery(),' ')) == 'UPDATE') {\n\t\t\t $langtype = 'UPDATE_PRODUCT_SKU';\n\t\t\t $sqltype = 'updated';\n\t\t }\n\t\t else {\n\t\t\t $langtype = 'ADD_PRODUCT_SKU';\n\t\t\t $sqltype = 'added';\n\t\t }\n\t\t $csvilog->AddStats($sqltype, str_ireplace('{product_sku}', $this->record_identity, JText::_($langtype)), true);\n\t\t return true;\n\t }\n\t else {\n\t\t $csvilog->AddMessage('debug', JText::_('DEBUG_STORE_PRODUCT'), true);\n\t\t return false;\n\t }\n }",
"public function GetProduct($product_id) {\n\n //set up the query\n $this->sql = \"SELECT *\n FROM products\n WHERE productID = :product_id\";\n \n //execute the query\n $this->RunAdvancedQuery([\n ':product_id' => $product_id,\n ]);\n }",
"protected function _initProduct($id=0)\n {\n if($id==0){\n $productId = (int) $this->getRequest()->getParam('product');\n }else{\n $productId = $id;\n }\n if ($productId) {\n $product = Mage::getModel('catalog/product')\n ->setStoreId(Mage::app()->getStore()->getId())\n ->load($productId);\n if ($product->getId()) {\n return $product;\n }\n }\n return false;\n }",
"public function UpdateProductImport( $product_id, $data ) {\n $product_id = $product_id['row'];\n $load_without_img = (boolean)$this->getSetting( 'foks_img' );\n $languages = $this->getLanguages();\n\n $sql_q = \"UPDATE \" . DB_PREFIX . \"product SET model = '\" . $this->db->escape( $data['model'] ) . \"', \";\n $sql_q .= \"sku = '\" . $this->db->escape( $data['sku'] ) . \"', \";\n $sql_q .= \"quantity = '\" . (int)$data['quantity'] . \"', \";\n $sql_q .= \"minimum = 1, subtract = 1, stock_status_id = 7, \";\n $sql_q .= \"date_available = '\" . $this->db->escape( $data['date_available'] ) . \"', manufacturer_id = '\" . (int)$data['manufacturer_id'] . \"', \";\n $sql_q .= \"shipping = 1, price = '\" . (float)$data['price'] . \"', \";\n $sql_q .= \"status = {$data['status']}, \";\n $sql_q .= \"sort_order = 1, date_modified = NOW() WHERE product_id = '\" . (int)$product_id . \"'\";\n\n $this->db->query( $sql_q );\n\n if ( isset( $data['image'] ) && !empty($data['image'] && !$load_without_img) ) {\n $thumb = $this->imgUrlUpload($data['image'], (int)$product_id);\n\n $this->db->query( \"UPDATE \" . DB_PREFIX . \"product SET image = '\" . $thumb . \"' WHERE product_id = '\" . (int)$product_id . \"'\" );\n }\n\n $this->db->query( \"DELETE FROM \" . DB_PREFIX . \"product_description WHERE product_id = '\" . (int)$product_id . \"'\" );\n $this->db->query( \"DELETE FROM \" . DB_PREFIX . \"product_attribute WHERE product_id = '\" . (int)$product_id . \"'\" );\n\n if ( isset( $data['attributes'] ) && !empty($data['attributes']) ) {\n\n foreach ( $data['attributes'] as $attr_id => $attr_id_val ) {\n\n foreach ( $languages as $lang ) {\n $this->db->query( \"DELETE FROM \" . DB_PREFIX . \"product_attribute WHERE product_id = '\" . (int)$product_id . \"' AND attribute_id = '\" . (int)$attr_id . \"' AND language_id = '\" . (int)$lang . \"'\" );\n }\n\n foreach ( $languages as $lang ) {\n $this->db->query( \"INSERT INTO \" . DB_PREFIX . \"product_attribute SET product_id = '\" . (int)$product_id . \"', attribute_id = '\" . (int)$attr_id . \"', language_id = '\" . (int)$lang . \"', text = '\" . $this->db->escape( $attr_id_val ) . \"'\" );\n }\n\n }\n\n }\n\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_image WHERE product_id = '\" . (int)$product_id . \"'\");\n\n if ( !empty( $data['images'] ) && !$load_without_img ) {\n $im = 1;\n\n foreach ( $data['images'] as $product_image ) {\n $img = $this->imgUrlUpload($product_image, (int)$product_id, true, $im);\n $this->db->query( \"INSERT INTO \" . DB_PREFIX . \"product_image SET product_id = '\" . (int)$product_id . \"', image = '\" . $img. \"', sort_order = '\" . $im . \"'\" );\n $im++;\n }\n }\n\n foreach ( $languages as $lang ) {\n $this->db->query( \"INSERT INTO \" . DB_PREFIX . \"product_description SET product_id = '\" . (int)$product_id . \"', language_id = '\" . (int)$lang . \"', name = '\" . $this->db->escape( $data['name'] ) . \"', description = '\" . $this->db->escape( $data['description'] ) . \"', meta_title = '\" . $this->db->escape( $data['name'] ) . \"', meta_description = '\" . $this->db->escape( $data['description'] ) . \"', meta_keyword = ''\" );\n }\n\n $this->db->query( \"DELETE FROM \" . DB_PREFIX . \"product_to_category WHERE product_id = '\" . (int)$product_id . \"'\" );\n\n if ( isset( $data['category_id'] ) ) {\n $this->db->query( \"INSERT INTO \" . DB_PREFIX . \"product_to_category SET product_id = '\" . (int)$product_id . \"', category_id = '\" . (int)$data['category_id'] . \"'\" );\n }\n\n $this->cache->delete( 'product' );\n\n if ( $this->config->get( 'config_seo_pro' ) ) {\n $this->cache->delete( 'seopro' );\n }\n }",
"public function onProductAlter(ProductEvent $event) {\n /** @var \\Drupal\\commerce_product\\Entity\\ProductInterface $product */\n $product = $event->getProduct();\n\n\n }",
"public function read($id) {\n return $this->product->find($id);\n\t}",
"protected function _saveProducts()\n {\n $priceIsGlobal = $this->_catalogData->isPriceGlobal();\n $productLimit = null;\n $productsQty = null;\n $entityLinkField = $this->getProductEntityLinkField();\n\n while ($bunch = $this->_dataSourceModel->getNextBunch()) {\n $entityRowsIn = [];\n $entityRowsUp = [];\n $attributes = [];\n $this->websitesCache = [];\n $this->categoriesCache = [];\n $tierPrices = [];\n $mediaGallery = [];\n $labelsForUpdate = [];\n $imagesForChangeVisibility = [];\n $uploadedImages = [];\n $previousType = null;\n $prevAttributeSet = null;\n $existingImages = $this->getExistingImages($bunch);\n\n foreach ($bunch as $rowNum => $rowData) {\n // reset category processor's failed categories array\n $this->categoryProcessor->clearFailedCategories();\n\n if (!$this->validateRow($rowData, $rowNum)) {\n continue;\n }\n if ($this->getErrorAggregator()->hasToBeTerminated()) {\n $this->getErrorAggregator()->addRowToSkip($rowNum);\n continue;\n }\n $rowScope = $this->getRowScope($rowData);\n\n $rowData[self::URL_KEY] = $this->getUrlKey($rowData);\n\n $rowSku = $rowData[self::COL_SKU];\n\n if (null === $rowSku) {\n $this->getErrorAggregator()->addRowToSkip($rowNum);\n continue;\n } elseif (self::SCOPE_STORE == $rowScope) {\n // set necessary data from SCOPE_DEFAULT row\n $rowData[self::COL_TYPE] = $this->skuProcessor->getNewSku($rowSku)['type_id'];\n $rowData['attribute_set_id'] = $this->skuProcessor->getNewSku($rowSku)['attr_set_id'];\n $rowData[self::COL_ATTR_SET] = $this->skuProcessor->getNewSku($rowSku)['attr_set_code'];\n }\n\n // 1. Entity phase\n if ($this->isSkuExist($rowSku)) {\n // existing row\n if (isset($rowData['attribute_set_code'])) {\n $attributeSetId = $this->catalogConfig->getAttributeSetId(\n $this->getEntityTypeId(),\n $rowData['attribute_set_code']\n );\n\n // wrong attribute_set_code was received\n if (!$attributeSetId) {\n throw new LocalizedException(\n __(\n 'Wrong attribute set code \"%1\", please correct it and try again.',\n $rowData['attribute_set_code']\n )\n );\n }\n } else {\n $attributeSetId = $this->skuProcessor->getNewSku($rowSku)['attr_set_id'];\n }\n\n $entityRowsUp[] = [\n 'updated_at' => (new \\DateTime())->format(DateTime::DATETIME_PHP_FORMAT),\n 'attribute_set_id' => $attributeSetId,\n $entityLinkField => $this->getExistingSku($rowSku)[$entityLinkField]\n ];\n } else {\n if (!$productLimit || $productsQty < $productLimit) {\n $entityRowsIn[strtolower($rowSku)] = [\n 'attribute_set_id' => $this->skuProcessor->getNewSku($rowSku)['attr_set_id'],\n 'type_id' => $this->skuProcessor->getNewSku($rowSku)['type_id'],\n 'sku' => $rowSku,\n 'has_options' => isset($rowData['has_options']) ? $rowData['has_options'] : 0,\n 'created_at' => (new \\DateTime())->format(DateTime::DATETIME_PHP_FORMAT),\n 'updated_at' => (new \\DateTime())->format(DateTime::DATETIME_PHP_FORMAT),\n ];\n $productsQty++;\n } else {\n $rowSku = null;\n // sign for child rows to be skipped\n $this->getErrorAggregator()->addRowToSkip($rowNum);\n continue;\n }\n }\n\n if (!array_key_exists($rowSku, $this->websitesCache)) {\n $this->websitesCache[$rowSku] = [];\n }\n // 2. Product-to-Website phase\n if (!empty($rowData[self::COL_PRODUCT_WEBSITES])) {\n $websiteCodes = explode($this->getMultipleValueSeparator(), $rowData[self::COL_PRODUCT_WEBSITES]);\n foreach ($websiteCodes as $websiteCode) {\n $websiteId = $this->storeResolver->getWebsiteCodeToId($websiteCode);\n $this->websitesCache[$rowSku][$websiteId] = true;\n }\n }\n\n // 3. Categories phase\n if (!array_key_exists($rowSku, $this->categoriesCache)) {\n $this->categoriesCache[$rowSku] = [];\n }\n $rowData['rowNum'] = $rowNum;\n $categoryIds = $this->processRowCategories($rowData);\n foreach ($categoryIds as $id) {\n $this->categoriesCache[$rowSku][$id] = true;\n }\n unset($rowData['rowNum']);\n\n // 4.1. Tier prices phase\n if (!empty($rowData['_tier_price_website'])) {\n $tierPrices[$rowSku][] = [\n 'all_groups' => $rowData['_tier_price_customer_group'] == self::VALUE_ALL,\n 'customer_group_id' => $rowData['_tier_price_customer_group'] ==\n self::VALUE_ALL ? 0 : $rowData['_tier_price_customer_group'],\n 'qty' => $rowData['_tier_price_qty'],\n 'value' => $rowData['_tier_price_price'],\n 'website_id' => self::VALUE_ALL == $rowData['_tier_price_website'] ||\n $priceIsGlobal ? 0 : $this->storeResolver->getWebsiteCodeToId($rowData['_tier_price_website']),\n ];\n }\n\n if (!$this->validateRow($rowData, $rowNum)) {\n continue;\n }\n\n // 5. Media gallery phase\n list($rowImages, $rowLabels) = $this->getImagesFromRow($rowData);\n $storeId = !empty($rowData[self::COL_STORE])\n ? $this->getStoreIdByCode($rowData[self::COL_STORE])\n : Store::DEFAULT_STORE_ID;\n $imageHiddenStates = $this->getImagesHiddenStates($rowData);\n foreach (array_keys($imageHiddenStates) as $image) {\n if (array_key_exists($rowSku, $existingImages)\n && array_key_exists($image, $existingImages[$rowSku])\n ) {\n $rowImages[self::COL_MEDIA_IMAGE][] = $image;\n $uploadedImages[$image] = $image;\n }\n\n if (empty($rowImages)) {\n $rowImages[self::COL_MEDIA_IMAGE][] = $image;\n }\n }\n\n $rowData[self::COL_MEDIA_IMAGE] = [];\n\n /*\n * Note: to avoid problems with undefined sorting, the value of media gallery items positions\n * must be unique in scope of one product.\n */\n $position = 0;\n foreach ($rowImages as $column => $columnImages) {\n foreach ($columnImages as $columnImageKey => $columnImage) {\n if (!isset($uploadedImages[$columnImage])) {\n $uploadedFile = $this->uploadMediaFiles($columnImage);\n $uploadedFile = $uploadedFile ?: $this->getSystemFile($columnImage);\n if ($uploadedFile) {\n $uploadedImages[$columnImage] = $uploadedFile;\n } else {\n $this->addRowError(\n ValidatorInterface::ERROR_MEDIA_URL_NOT_ACCESSIBLE,\n $rowNum,\n null,\n null,\n ProcessingError::ERROR_LEVEL_NOT_CRITICAL\n );\n }\n } else {\n $uploadedFile = $uploadedImages[$columnImage];\n }\n\n if ($uploadedFile && $column !== self::COL_MEDIA_IMAGE) {\n $rowData[$column] = $uploadedFile;\n }\n\n if ($uploadedFile && !isset($mediaGallery[$storeId][$rowSku][$uploadedFile])) {\n if (isset($existingImages[$rowSku][$uploadedFile])) {\n $currentFileData = $existingImages[$rowSku][$uploadedFile];\n if (isset($rowLabels[$column][$columnImageKey])\n && $rowLabels[$column][$columnImageKey] !=\n $currentFileData['label']\n ) {\n $labelsForUpdate[] = [\n 'label' => $rowLabels[$column][$columnImageKey],\n 'imageData' => $currentFileData\n ];\n }\n\n if (array_key_exists($uploadedFile, $imageHiddenStates)\n && $currentFileData['disabled'] != $imageHiddenStates[$uploadedFile]\n ) {\n $imagesForChangeVisibility[] = [\n 'disabled' => $imageHiddenStates[$uploadedFile],\n 'imageData' => $currentFileData\n ];\n }\n } else {\n if ($column == self::COL_MEDIA_IMAGE) {\n $rowData[$column][] = $uploadedFile;\n }\n $mediaGallery[$storeId][$rowSku][$uploadedFile] = [\n 'attribute_id' => $this->getMediaGalleryAttributeId(),\n 'label' => isset($rowLabels[$column][$columnImageKey])\n ? $rowLabels[$column][$columnImageKey]\n : '',\n 'position' => ++$position,\n 'disabled' => isset($imageHiddenStates[$columnImage])\n ? $imageHiddenStates[$columnImage] : '0',\n 'value' => $uploadedFile,\n ];\n }\n }\n }\n }\n\n // 6. Attributes phase\n $rowStore = (self::SCOPE_STORE == $rowScope)\n ? $this->storeResolver->getStoreCodeToId($rowData[self::COL_STORE])\n : 0;\n $productType = isset($rowData[self::COL_TYPE]) ? $rowData[self::COL_TYPE] : null;\n if ($productType !== null) {\n $previousType = $productType;\n }\n if (isset($rowData[self::COL_ATTR_SET])) {\n $prevAttributeSet = $rowData[self::COL_ATTR_SET];\n }\n if (self::SCOPE_NULL == $rowScope) {\n // for multiselect attributes only\n if ($prevAttributeSet !== null) {\n $rowData[self::COL_ATTR_SET] = $prevAttributeSet;\n }\n if ($productType === null && $previousType !== null) {\n $productType = $previousType;\n }\n if ($productType === null) {\n continue;\n }\n }\n\n $productTypeModel = $this->_productTypeModels[$productType];\n if (!empty($rowData['tax_class_name'])) {\n $rowData['tax_class_id'] =\n $this->taxClassProcessor->upsertTaxClass($rowData['tax_class_name'], $productTypeModel);\n }\n\n if ($this->getBehavior() == Import::BEHAVIOR_APPEND ||\n empty($rowData[self::COL_SKU])\n ) {\n $rowData = $productTypeModel->clearEmptyData($rowData);\n }\n\n $rowData = $productTypeModel->prepareAttributesWithDefaultValueForSave(\n $rowData,\n !$this->isSkuExist($rowSku)\n );\n $product = $this->_proxyProdFactory->create(['data' => $rowData]);\n\n foreach ($rowData as $attrCode => $attrValue) {\n $attribute = $this->retrieveAttributeByCode($attrCode);\n\n if ('multiselect' != $attribute->getFrontendInput() && self::SCOPE_NULL == $rowScope) {\n // skip attribute processing for SCOPE_NULL rows\n continue;\n }\n $attrId = $attribute->getId();\n $backModel = $attribute->getBackendModel();\n $attrTable = $attribute->getBackend()->getTable();\n $storeIds = [0];\n\n if ('datetime' == $attribute->getBackendType()\n && (\n in_array($attribute->getAttributeCode(), $this->dateAttrCodes)\n || $attribute->getIsUserDefined()\n )\n ) {\n $attrValue = $this->dateTime->formatDate($attrValue, false);\n } elseif ('datetime' == $attribute->getBackendType() && strtotime($attrValue)) {\n $attrValue = gmdate(\n 'Y-m-d H:i:s',\n $this->_localeDate->date($attrValue)->getTimestamp()\n );\n } elseif ($backModel) {\n $attribute->getBackend()->beforeSave($product);\n $attrValue = $product->getData($attribute->getAttributeCode());\n }\n if (self::SCOPE_STORE == $rowScope) {\n if (self::SCOPE_WEBSITE == $attribute->getIsGlobal()) {\n // check website defaults already set\n if (!isset($attributes[$attrTable][$rowSku][$attrId][$rowStore])) {\n $storeIds = $this->storeResolver->getStoreIdToWebsiteStoreIds($rowStore);\n }\n } elseif (self::SCOPE_STORE == $attribute->getIsGlobal()) {\n $storeIds = [$rowStore];\n }\n if (!$this->isSkuExist($rowSku)) {\n $storeIds[] = 0;\n }\n }\n foreach ($storeIds as $storeId) {\n if (!isset($attributes[$attrTable][$rowSku][$attrId][$storeId])) {\n $attributes[$attrTable][$rowSku][$attrId][$storeId] = $attrValue;\n }\n }\n // restore 'backend_model' to avoid 'default' setting\n $attribute->setBackendModel($backModel);\n }\n }\n\n foreach ($bunch as $rowNum => $rowData) {\n if ($this->getErrorAggregator()->isRowInvalid($rowNum)) {\n unset($bunch[$rowNum]);\n }\n }\n\n $this->saveProductEntity(\n $entityRowsIn,\n $entityRowsUp\n )->_saveProductWebsites(\n $this->websitesCache\n )->_saveProductCategories(\n $this->categoriesCache\n )->_saveProductTierPrices(\n $tierPrices\n )->_saveMediaGallery(\n $mediaGallery\n )->_saveProductAttributes(\n $attributes\n )->updateMediaGalleryVisibility(\n $imagesForChangeVisibility\n )->updateMediaGalleryLabels(\n $labelsForUpdate\n );\n\n $this->_eventManager->dispatch(\n 'catalog_product_import_bunch_save_after',\n ['adapter' => $this, 'bunch' => $bunch]\n );\n }\n\n return $this;\n }",
"function fn_product_variations_generate($product_id, $combinations, array $options_ids)\n{\n $languages = Languages::getAll();\n $product_row = db_get_row('SELECT * FROM ?:products WHERE product_id = ?i', $product_id);\n\n $product_variation_ids = db_get_fields('SELECT product_id FROM ?:products WHERE parent_product_id = ?i', $product_id);\n\n foreach ($product_variation_ids as $product_variation_id) {\n fn_delete_product($product_variation_id);\n }\n\n foreach ($combinations as $variation_code => $combination) {\n fn_product_variations_save_variation($product_row, $combination, $languages);\n }\n\n db_query(\n 'UPDATE ?:products SET product_type = ?s, variation_options = ?s WHERE product_id = ?i',\n ProductManager::PRODUCT_TYPE_CONFIGURABLE, json_encode(array_values($options_ids)), $product_id\n );\n}",
"function fn_product_variations_convert_to_configurable_product($product_id)\n{\n $auth = array();\n\n $product = fn_get_product_data($product_id, $auth);\n $languages = Languages::getAll();\n $product_options = fn_get_product_options($product_id, CART_LANGUAGE, true);\n $product_row = db_get_row('SELECT * FROM ?:products WHERE product_id = ?i', $product_id);\n $product_variation_ids = db_get_fields('SELECT product_id FROM ?:products WHERE parent_product_id = ?i', $product_id);\n $product_exceptions = fn_get_product_exceptions($product_id);\n\n foreach ($product_variation_ids as $product_variation_id) {\n fn_delete_product($product_variation_id);\n }\n\n $options_ids = array();\n $inventory_combinations = db_get_array('SELECT * FROM ?:product_options_inventory WHERE product_id = ?i', $product_id);\n $index = 0;\n\n foreach ($inventory_combinations as $item) {\n $index++;\n $selected_options = array();\n $parts = array_chunk(explode('_', $item['combination']), 2);\n\n foreach ($parts as $part) {\n $selected_options[$part[0]] = $part[1];\n }\n\n $combination = fn_product_variations_get_variation_by_selected_options(\n $product,\n $product_options,\n $selected_options,\n $index\n );\n\n if (!empty($item['product_code'])) {\n $combination['code'] = $item['product_code'];\n }\n\n if (!empty($item['amount'])) {\n $combination['amount'] = $item['amount'];\n }\n\n $is_allow = true;\n\n if ($product_row['exceptions_type'] == 'F') {\n foreach ($product_exceptions as $exception) {\n\n foreach ($exception['combination'] as $option_id => &$variant_id) {\n if ($variant_id == OPTION_EXCEPTION_VARIANT_ANY || $variant_id == OPTION_EXCEPTION_VARIANT_NOTHING) {\n $variant_id = isset($combination['selected_options'][$option_id]) ? $combination['selected_options'][$option_id] : null;\n }\n }\n unset($variant_id);\n\n if ($exception['combination'] == $combination['selected_options']) {\n $is_allow = false;\n break;\n }\n }\n } elseif ($product_row['exceptions_type'] == 'A') {\n $is_allow = false;\n\n foreach ($product_exceptions as $exception) {\n\n foreach ($exception['combination'] as $option_id => &$variant_id) {\n if ($variant_id == OPTION_EXCEPTION_VARIANT_ANY) {\n $variant_id = isset($combination['selected_options'][$option_id]) ? $combination['selected_options'][$option_id] : null;\n }\n }\n unset($variant_id);\n\n if ($exception['combination'] == $combination['selected_options']) {\n $is_allow = true;\n break;\n }\n }\n }\n\n if (!$is_allow) {\n continue;\n }\n\n $variation_id = fn_product_variations_save_variation($product_row, $combination, $languages);\n\n $image = fn_get_image_pairs($item['combination_hash'], 'product_option', 'M', true, true);\n\n if ($image) {\n $detailed = $icons = array();\n $pair_data = array(\n 'type' => 'M'\n );\n\n if (!empty($image['icon'])) {\n $tmp_name = fn_create_temp_file();\n Storage::instance('images')->export($image['icon']['relative_path'], $tmp_name);\n $name = fn_basename($image['icon']['image_path']);\n\n $icons[$image['pair_id']] = array(\n 'path' => $tmp_name,\n 'size' => filesize($tmp_name),\n 'error' => 0,\n 'name' => $name\n );\n\n $pair_data['image_alt'] = empty($image['icon']['alt']) ? '' : $image['icon']['alt'];\n }\n\n if (!empty($image['detailed'])) {\n $tmp_name = fn_create_temp_file();\n Storage::instance('images')->export($image['detailed']['relative_path'], $tmp_name);\n $name = fn_basename($image['detailed']['image_path']);\n\n $detailed[$image['pair_id']] = array(\n 'path' => $tmp_name,\n 'size' => filesize($tmp_name),\n 'error' => 0,\n 'name' => $name\n );\n\n $pair_data['detailed_alt'] = empty($image['detailed']['alt']) ? '' : $image['detailed']['alt'];\n }\n\n $pairs_data = array(\n $image['pair_id'] => $pair_data\n );\n\n fn_update_image_pairs($icons, $detailed, $pairs_data, $variation_id, 'product');\n }\n }\n\n if (!empty($selected_options)) {\n $options_ids = array_keys($selected_options);\n }\n\n db_query(\n 'UPDATE ?:products SET product_type = ?s, variation_options = ?s WHERE product_id = ?i',\n ProductManager::PRODUCT_TYPE_CONFIGURABLE, json_encode(array_values($options_ids)), $product_id\n );\n\n fn_delete_product_option_combinations($product_id);\n db_query('DELETE FROM ?:product_options_exceptions WHERE product_id = ?i', $product_id);\n}",
"public function testProductGetVariants()\n {\n $product = $this->find('product', 1);\n \n $variants = $product->getVariants();\n \n $productColor = $this->find('productColor', 1);\n $productSize = $this->find('productSize', 1);\n \n $this->assertTrue(\n $variants[$productSize->getId()][$productColor->getId()]\n );\n }",
"public function getUpdateProductData();",
"public function getProduct()\n {\n return $this->coreRegistry->registry('product');\n }",
"public function loadProductList()\n {\n $selectQuery = $this->DBH->query(\"SELECT pr_name, pr_id, pcat_name, psub_name, sup_name FROM product JOIN product_subcategory ON psub_id = pr_subcategory JOIN product_category ON psub_category = pcat_id JOIN supplier ON pr_supplier = sup_id\");\n\n echo \"<table class=\\\"information\\\">\";\n echo \"<tr>\";\n echo \"<th>#</th>\";\n echo \"<th>Název produktu</th>\";\n echo \"<th>Název kategorie</th>\";\n echo \"<th>Název podkategorie</th>\";\n echo \"<th>Název dodavatele</th>\";\n echo \"<th></th>\";\n echo \"<th></th>\";\n echo \"</tr>\";\n\n $i = 1;\n while($r = mysql_fetch_assoc($selectQuery))\n {\n ?>\n\n <tr>\n <td><?php echo $i;?></td>\n <td><?php echo $this->FILTER->prepareText($r[\"pr_name\"]);?></td>\n <td><?php echo $this->FILTER->prepareText($r[\"pcat_name\"]);?></td>\n <td><?php echo $this->FILTER->prepareText($r[\"psub_name\"]);?></td>\n <td><?php echo $this->FILTER->prepareTExt($r[\"sup_name\"]);?></td>\n <td class=\"buttons\"><form method=\"post\" action=\"\"><input type=\"hidden\" name=\"deleteProduct\" value=\"<?php echo $this->FILTER->prepareInputForSQL($r[\"pr_id\"]); ?>\"><input onclick=\"return confirm('Opravdu chcete smazat tento produkt?');\" type=\"submit\" value=\"Smazat\" class=\"button\"></form></td>\n <td class=\"buttons\"><a href=\"Admin.php?action=Show&edittype=product&edit=<?php echo $this->FILTER->prepareText($r[\"pr_id\"]); ?>\">Editovat</a></td>\n </tr>\n\n <?php\n $i++;\n }\n\n echo \"</table>\";\n\n }",
"public function getProduct()\r\n {\r\n return $this->product;\r\n }",
"public function getProduct() {\n return $this->getValueOrDefault('Product');\n }",
"public function getProductInfo($getProductId) {\r\n return Mage::getModel ( 'catalog/product' )->load ( $getProductId );\r\n }",
"protected function fetchProduct($mProductId) {\n global $currencies, $currency;\n\n require_once(DIR_WS_CLASSES . 'language.php');\n $lng = new language();\n\n if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {\n $lng->set_language($HTTP_GET_VARS['language']);\n } else {\n $lng->get_browser_language();\n }\n\n $language = $lng->language['directory'];\n $languages_id = $lng->language['id'];\n\n $product_info_query = tep_db_query(\"select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from \" . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_DESCRIPTION . \" pd where p.products_status = '1' and p.products_id = '\" . (int)$mProductId . \"' and pd.products_id = p.products_id and pd.language_id = '\" . (int)$languages_id . \"'\");\n $aProduct_info = tep_db_fetch_array($product_info_query);\n\n $sArtNo = (MODULE_PAYMENT_KLARNA_ARTNO == 'id' || MODULE_PAYMENT_KLARNA_ARTNO == '' ? $aProduct_info['id'] : $aProduct_info['name']);\n\n $iTax = tep_get_tax_rate($aProduct_info['products_tax_class_id']);\n\n if(DISPLAY_PRICE_WITH_TAX == 'true') {\n $iPrice_with_tax = $currencies->get_value($currency) * $aProduct_info['products_price'];\n } else {\n $iPrice_with_tax = $currencies->get_value($currency) * $aProduct_info['products_price'] * (($iTax/100)+1);\n }\n\n // Add goods\n $this->oKlarna->addArticle(\n 1, //Quantity\n $sArtNo, //Article number\n $aProduct_info['products_name'], //Article name/title\n $iPrice_with_tax, // Price\n $iTax, //25% VAT\n 0, // Discount\n KlarnaFlags::INC_VAT // Flag incl. excl vat\n );\n\n $this->iSum += $iPrice_with_tax;\n }",
"public function paramsAction() {\n\n$product_collection = Mage::getModel('catalog/category')->load(3)->getProductCollection();\n\n// Now let's loop through the product collection and print the ID of every product \nforeach($product_collection as $product) {\n // Get the product ID\n\n$product_id = $product->getId();\n\n // Load the full product model based on the product ID\n\n$full_product = Mage::getModel('catalog/product')->load($product_id);\n\n // Now that we loaded the full product model, let's access all of it's data\n\n // Let's get the Product Name\n\n $product_name = $full_product->getName();\n\n // Let's get the Product URL path\n\n $product_url = $full_product->getProductUrl();\n\n // Let's get the Product Image URL\n\n $product_image_url = $full_product->getImageUrl();\n\n // Let's print the product information we gathered and continue onto the next one\n\n echo $product_name;\n\n echo $product_image_url;\n}\n }",
"public function get_product()\n {\n return $this->_product;\n }",
"function addproductvariantgot($id)\n\t{\n\t\t$variantaddproduct=\"SELECT * from product_variant where \tptd_sub_catgry_id = $id\";\n\t\t$variantaddproductdata = $this->get_results( $variantaddproduct );\n\t\treturn $variantaddproductdata;\n\t}",
"public function run()\n {\n \\App\\Variation::create([\n \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i1.rozetka.ua/goods/4381047/adidas_4059323881564_images_4381047304.jpg\",\n \"product_id\" => 1,\n \"price\" => 2500,\n \"in_stock\" => 15\n ]);\n\n// \\App\\Variation::create([\n// \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i2.rozetka.ua/goods/1528038/nike_812654_001_11_5_images_1528038611.jpg\",\n// \"product_id\" => 1,\n// \"price\" => 2000,\n// \"in_stock\" => 8\n// ]);\n//\n// \\App\\Variation::create([\n// \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i2.rozetka.ua/goods/5032905/nike_886737447079_images_5032905456.jpg\",\n// \"product_id\" => 1,\n// \"price\" => 1300,\n// \"in_stock\" => 5\n// ]);\n\n \\App\\Variation::create([\n \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i1.rozetka.ua/goods/2286747/adidas_aq1625_4.5_images_2286747890.jpg\",\n \"product_id\" => 1,\n \"price\" => 1300,\n \"in_stock\" => 5\n ]);\n }",
"public function productDetailsAction()\n {\n $vars['productId'] = $this->route['id'];\n $vars['product'] = $this->model->getById($vars['productId']);\n $vars['colors'] = $this->model->getAvailableColors($vars['productId']);\n $this->view->render('Riding Gear', $vars);\n }",
"public function getProductById($id){\n $prodDB=$this->promodel->getProductById($id);\n // create a new product\n $product = new Product();\n $product->id=$prodDB->id;\n $product->name=$prodDB->name;\n $product->category=$prodDB->category;\n $product->price=$prodDB->price;\n $product->qty=0;\n return $product;\n }",
"function product_get()\n {\n $product_id = $this->uri->segment(3);\n\n $product = $this->api_model->get_product($product_id);\n\n if(!empty($product))\n {\n $this->response(array('status' => 'success', 'message' => $product));\n }\n else\n {\n $this->response(array('status' => 'failure', 'message' => 'The specified product could not be found'), REST_CONTROLLER::HTTP_NOT_FOUND);\n }\n\n\t}",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"function create_product_variation( $product_id, $variation_data ){\n // Get the Variable product object (parent)\n $product = wc_get_product($product_id);\n\n $variation_post = array(\n 'post_title' => $product->get_title(),\n 'post_name' => 'product-'.$product_id.'-variation',\n 'post_status' => 'publish',\n 'post_parent' => $product_id,\n 'post_type' => 'product_variation',\n 'guid' => $product->get_permalink()\n );\n\n // Creating the product variation\n $variation_id = wp_insert_post( $variation_post );\n\n // Get an instance of the WC_Product_Variation object\n $variation = new WC_Product_Variation( $variation_id );\n\n // Iterating through the variations attributes\n foreach ($variation_data['attributes'] as $attribute => $term_name )\n {\n $taxonomy = 'pa_'.$attribute; // The attribute taxonomy\n\n // Check if the Term name exist and if not we create it.\n if( ! term_exists( $term_name, $taxonomy ) )\n wp_insert_term( $term_name, $taxonomy ); // Create the term\n\n $term_slug = get_term_by('name', $term_name, $taxonomy )->slug; // Get the term slug\n\n // Get the post Terms names from the parent variable product.\n $post_term_names = wp_get_post_terms( $product_id, $taxonomy, array('fields' => 'names') );\n\n // Check if the post term exist and if not we set it in the parent variable product.\n if( ! in_array( $term_name, $post_term_names ) )\n wp_set_post_terms( $product_id, $term_name, $taxonomy, true );\n\n // Set/save the attribute data in the product variation\n update_post_meta( $variation_id, 'attribute_'.$taxonomy, $term_slug );\n\n }\n\n ## Set/save all other data\n\n // SKU\n if( ! empty( $variation_data['sku'] ) )\n $variation->set_sku( $variation_data['sku'] );\n\n // Prices\n if( empty( $variation_data['sale_price'] ) ){\n $variation->set_price( $variation_data['regular_price'] );\n } else {\n $variation->set_price( $variation_data['sale_price'] );\n $variation->set_sale_price( $variation_data['sale_price'] );\n }\n $variation->set_regular_price( $variation_data['regular_price'] );\n\n // Stock\n if( ! empty($variation_data['stock_qty']) ){\n $variation->set_stock_quantity( $variation_data['stock_qty'] );\n $variation->set_manage_stock(true);\n $variation->set_stock_status('');\n } else {\n $variation->set_manage_stock(false);\n }\n\n $variation->set_weight(''); // weight (resetting)\n\n $variation->save(); // Save the data\n }"
] | [
"0.6955738",
"0.6884401",
"0.68206215",
"0.6680621",
"0.640358",
"0.6381325",
"0.6380651",
"0.63370186",
"0.63091284",
"0.62851",
"0.62492704",
"0.62274253",
"0.6206193",
"0.6196525",
"0.6160851",
"0.6158004",
"0.61410207",
"0.60924953",
"0.604175",
"0.6021404",
"0.5966728",
"0.5960123",
"0.5949161",
"0.5942481",
"0.5937136",
"0.5919644",
"0.590328",
"0.58569473",
"0.58503014",
"0.5835241",
"0.5832979",
"0.58206344",
"0.5818587",
"0.5808116",
"0.5807482",
"0.5802765",
"0.5788044",
"0.57814395",
"0.57662594",
"0.5759115",
"0.5749652",
"0.5743078",
"0.5739859",
"0.5725464",
"0.5721401",
"0.5721401",
"0.5721401",
"0.5696958",
"0.5696069",
"0.56750154",
"0.5656846",
"0.56459844",
"0.5644147",
"0.5643088",
"0.5641128",
"0.5636918",
"0.56349",
"0.56303144",
"0.5624337",
"0.5622112",
"0.5621698",
"0.56199276",
"0.56185144",
"0.56090456",
"0.5608522",
"0.56081814",
"0.5606378",
"0.5605322",
"0.5596202",
"0.55888903",
"0.5582386",
"0.5560006",
"0.5557408",
"0.5545643",
"0.5545516",
"0.5540091",
"0.5525512",
"0.55170393",
"0.55047196",
"0.5499334",
"0.5496933",
"0.5496779",
"0.54959947",
"0.54934347",
"0.54854965",
"0.54849887",
"0.5481321",
"0.54810625",
"0.5479428",
"0.5477929",
"0.5475706",
"0.54747784",
"0.5473249",
"0.5470339",
"0.5470339",
"0.5470339",
"0.5470339",
"0.5470339",
"0.5470339",
"0.5467694"
] | 0.72337687 | 0 |
Retrieves the product variation | public function get_variation($id = null, $returnDisabled = false){
// Check if there is a variation matching that ID
if( array_key_exists($id, $this->_variations) ) {
if( $this->_variations[$id]->is_enabled() || $returnDisabled ) {
return $this->_variations[$id];
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getVariation()\n {\n return $this->db->get($this->product_variant);\n }",
"function get_variation( $variation_id, $product ) {\n\n\t\tif ( isset( $this->variations_cache[ $variation_id ] ) )\n\t\t\treturn $this->variations_cache[ $variation_id ];\n\n\t\t$variation = $product->get_child( $variation_id, array(\n\t\t\t'parent_id' => $product->id,\n\t\t\t'parent' \t=> $product\n\t\t) );\n\n\t\t$this->variations_cache[ $variation_id ] = $variation;\n\n\t\treturn $variation;\n\t}",
"public function getVariationValue()\n {\n return $this->variationValue;\n }",
"public function variation()\n {\n return $this->belongsTo(ProductVariation::class);\n }",
"public function onVariationAlter(ProductVariationEvent $event) {\n /** @var \\Drupal\\commerce_product\\Entity\\ProductVariationInterface $variation */\n $variation = $event->getProductVariation();\n\n\n }",
"public function get_variation_by_common_id($common_id)\n {\n $this->db->where('common_id', $common_id);\n $query = $this->db->get('product_variations');\n return $query->result();\n }",
"public function get_variation( $variation_id ) {\n\t\treturn $this->request( array(\n\t\t\t'function' => 'variations/' . abs( intval( $variation_id ) ),\n\t\t\t'method' => 'GET',\n\t\t) );\n\t}",
"public function single_product_product_variations_custom_output() {\n\t\t\tif ( ! defined( 'CFVSW_VER' ) && class_exists( 'woocommerce' ) && is_product() && astra_get_option( 'single-product-select-variations' ) ) {\n\t\t\t\tadd_filter( 'woocommerce_dropdown_variation_attribute_options_html', array( $this, 'single_product_variations_custom_html' ), 999, 2 );\n\t\t\t}\n\t\t}",
"public function getProduct() {\n return $this->getValueOrDefault('Product');\n }",
"public function variations()\n {\n return $this->hasMany(ProductVariation::class);\n }",
"public function getVariationKey()\n {\n return $this->variationKey;\n }",
"function fn_product_variations_get_variation_by_selected_options($product, $product_options, $selected_options, $index = 0)\n{\n /** @var ProductManager $product_manager */\n $product_manager = Tygh::$app['addons.product_variations.product.manager'];\n\n $name_part = array($product['product']);\n $variation_code = $product_manager->getVariationCode($product['product_id'], $selected_options);\n $options = array();\n\n foreach ($selected_options as $option_id => $variant_id) {\n $option_id = (int) $option_id;\n $variant_id = (int) $variant_id;\n\n $option = $product_options[$option_id];\n $option['value'] = $variant_id;\n\n $variant = $product_options[$option_id]['variants'][$variant_id];\n\n $name_part[] = $option['option_name'] . ': ' .$variant['variant_name'];\n $options[$option_id] = $option;\n }\n\n $combination = array(\n 'name' => implode(', ', $name_part),\n 'price' => $product['price'],\n 'list_price' => $product['list_price'],\n 'weight' => $product['weight'],\n 'amount' => empty($product['amount']) ? 1 : $product['amount'],\n 'code' => !empty($product['product_code']) ? $product['product_code'] . $index : '',\n 'options' => $options,\n 'selected_options' => $selected_options,\n 'variation' => $variation_code\n );\n\n return $combination;\n}",
"public function get_product()\n {\n return $this->_product;\n }",
"public function get_variation_attributes() {\n\t\treturn $this->variation_data; // @todo: This returns blank if its set to catch all, how would we deal with that?\n\t}",
"public function getVariation()\r\n {\r\n return array();\r\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function product()\n {\n return $this->belongsTo(config('inventory.models.product-variant'), 'product_variant_id');\n }",
"function get_variation_by_cat_id($cat_id)\r\n{\r\n\t$sql = \"SELECT * FROM `category_variation` cv, variation v where cv.`cv_variation_id`=v.variation_id and variation_status = 1 and cv.`cv_category_id` = \".$cat_id.\"\";\r\n\t//op variation_name,variation_id,cv_id\r\n\t$results = get_results($sql);\r\n\treturn $results;\r\n}",
"public function getProduct()\r\n {\r\n return $this->product;\r\n }",
"public function product()\n {\n return $this->m_product;\n }",
"public function getProduct()\r\n {\r\n return $this->_params['product'];\r\n }",
"public function get_full_width_product_variations($product_id, $lang_id)\n {\n $product_id = clean_number($product_id);\n $lang_id = clean_number($lang_id);\n $this->db->where('product_id', $product_id);\n $this->db->where('lang_id', $lang_id);\n $this->db->where('visible', 1);\n $this->db->group_start();\n $this->db->where('variation_type', 'checkbox');\n $this->db->or_where('variation_type', 'radio_button');\n $this->db->group_end();\n $query = $this->db->get('product_variations');\n return $query->result();\n }",
"public function get_variation_by_user_id($user_id)\n {\n $user_id = clean_number($user_id);\n $this->db->where('user_id', $user_id);\n $query = $this->db->get('product_variations');\n return $query->result();\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct()\n {\n return $this->product;\n }",
"public function getProduct() {\r\n return $this->_product;\r\n }",
"function getVariant() { return $this->_variant; }",
"public function getProductVariant()\n {\n if (is_null($this->productVariant)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_PRODUCT_VARIANT);\n if (is_null($data)) {\n return null;\n }\n\n $this->productVariant = ProductVariantKeyReferenceModel::of($data);\n }\n\n return $this->productVariant;\n }",
"public function getVariant()\n {\n return $this->variant;\n }",
"function getProductVariations( $post_id ) {\n\n // update cache if required\n if ( $this->last_product_var_id != $post_id ) {\n $this->last_product_variations = WPLA_ProductWrapper::getVariations( $post_id );\n $this->last_product_var_id = $post_id;\n }\n\n return $this->last_product_variations;\n }",
"public function getVariationSpecifics()\n {\n return $this->variationSpecifics;\n }",
"public function getProduct()\n\t{\n\t\treturn $this->getKeyValue('product'); \n\n\t}",
"public function getVariantByProduct($id){\n $this->db->select('*');\n $this->db->where('id_product', $id);\n $this->db->from($this->product_variant); \n return $this->db->get();\n }",
"public function getProduct()\n {\n return $this->coreRegistry->registry('product');\n }",
"public function get_half_width_product_variations($product_id, $lang_id)\n {\n $product_id = clean_number($product_id);\n $lang_id = clean_number($lang_id);\n $this->db->where('product_id', $product_id);\n $this->db->where('lang_id', $lang_id);\n $this->db->where('visible', 1);\n $this->db->group_start();\n $this->db->where('variation_type', 'text');\n $this->db->or_where('variation_type', 'number');\n $this->db->or_where('variation_type', 'dropdown');\n $this->db->group_end();\n $query = $this->db->get('product_variations');\n return $query->result();\n }",
"public function get_product_variations_by_lang($product_id, $lang_id)\n {\n $product_id = clean_number($product_id);\n $lang_id = clean_number($lang_id);\n $this->db->where('product_id', $product_id);\n $this->db->where('lang_id', $lang_id);\n $this->db->where('visible', 1);\n $query = $this->db->get('product_variations');\n return $query->result();\n }",
"public function getProduct()\n {\n return isset($this->product) ? $this->product : null;\n }",
"public function available_variation( $data, $product, $variation ) {\r\n\r\n\t\t$is_nyp = WC_Name_Your_Price_Helpers::is_nyp( $variation );\r\n\r\n\t\t$nyp_data = array( 'is_nyp' => $is_nyp );\r\n\r\n\t\tif ( $is_nyp ) {\r\n\t\t\t$nyp_data['minimum_price'] = WC_Name_Your_Price_Helpers::get_minimum_price( $variation );\r\n\t\t\t$nyp_data['maximum_price'] = WC_Name_Your_Price_Helpers::get_maximum_price( $variation );\r\n\t\t\t$nyp_data['initial_price'] = WC_Name_Your_Price_Helpers::get_initial_price( $variation );\r\n\t\t\t$nyp_data['price_label'] = WC_Name_Your_Price_Helpers::get_price_input_label_text( $variation );\r\n\t\t\t$nyp_data['posted_price'] = WC_Name_Your_Price_Helpers::get_posted_price( $variation );\r\n\t\t\t$nyp_data['display_price'] = WC_Name_Your_Price_Helpers::get_price_value_attr( $variation );\r\n\t\t\t$nyp_data['display_regular_price'] = $nyp_data['display_price'];\r\n\t\t\t$nyp_data['price_html'] = apply_filters( 'woocommerce_show_variation_price', true, $product, $variation ) ? '<span class=\"price\">' . WC_Name_Your_Price_Helpers::get_suggested_price_html( $variation ) . '</span>' : '';\r\n\t\t\t$nyp_data['minimum_price_html'] = WC_Name_Your_Price_Helpers::get_minimum_price_html( $variation );\r\n\t\t\t$nyp_data['hide_minimum'] = WC_Name_Your_Price_Helpers::is_minimum_hidden( $variation );\r\n\t\t\t$nyp_data['add_to_cart_text'] = $variation->single_add_to_cart_text();\r\n\r\n\t\t}\r\n\r\n\t\treturn array_merge( $data, $nyp_data );\r\n\r\n\t}",
"public function variationValuesSelector()\n {\n //Function to get the variation values based on the selected variation type\n $variation_template = Input::get('variation_template');\n\n $variation_values = VariationValues::getVariationValues($variation_template);\n\n return response()->json($variation_values);\n }",
"function create_product_variation( $product_id, $variation_data ){\n // Get the Variable product object (parent)\n $product = wc_get_product($product_id);\n\n $variation_post = array(\n 'post_title' => $product->get_title(),\n 'post_name' => 'product-'.$product_id.'-variation',\n 'post_status' => 'publish',\n 'post_parent' => $product_id,\n 'post_type' => 'product_variation',\n 'guid' => $product->get_permalink()\n );\n\n // Creating the product variation\n $variation_id = wp_insert_post( $variation_post );\n\n // Get an instance of the WC_Product_Variation object\n $variation = new WC_Product_Variation( $variation_id );\n\n // Iterating through the variations attributes\n foreach ($variation_data['attributes'] as $attribute => $term_name )\n {\n $taxonomy = 'pa_'.$attribute; // The attribute taxonomy\n\n // Check if the Term name exist and if not we create it.\n if( ! term_exists( $term_name, $taxonomy ) )\n wp_insert_term( $term_name, $taxonomy ); // Create the term\n\n $term_slug = get_term_by('name', $term_name, $taxonomy )->slug; // Get the term slug\n\n // Get the post Terms names from the parent variable product.\n $post_term_names = wp_get_post_terms( $product_id, $taxonomy, array('fields' => 'names') );\n\n // Check if the post term exist and if not we set it in the parent variable product.\n if( ! in_array( $term_name, $post_term_names ) )\n wp_set_post_terms( $product_id, $term_name, $taxonomy, true );\n\n // Set/save the attribute data in the product variation\n update_post_meta( $variation_id, 'attribute_'.$taxonomy, $term_slug );\n\n }\n\n ## Set/save all other data\n\n // SKU\n if( ! empty( $variation_data['sku'] ) )\n $variation->set_sku( $variation_data['sku'] );\n\n // Prices\n if( empty( $variation_data['sale_price'] ) ){\n $variation->set_price( $variation_data['regular_price'] );\n } else {\n $variation->set_price( $variation_data['sale_price'] );\n $variation->set_sale_price( $variation_data['sale_price'] );\n }\n $variation->set_regular_price( $variation_data['regular_price'] );\n\n // Stock\n if( ! empty($variation_data['stock_qty']) ){\n $variation->set_stock_quantity( $variation_data['stock_qty'] );\n $variation->set_manage_stock(true);\n $variation->set_stock_status('');\n } else {\n $variation->set_manage_stock(false);\n }\n\n $variation->set_weight(''); // weight (resetting)\n\n $variation->save(); // Save the data\n }",
"public function get_product_variations() : array {\n\t\tpreg_match( '/skuProducts=\\[(.*?)\\];/si', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn [ 'variations' => [] ];\n\t\t}\n\n\t\treturn [ 'variations' => json_decode( sprintf( '[%s]', $matches[1] ), true ) ];\n\t}",
"function elex_bep_create_product_variation( $product_id, $variation_data ) {\n //Get varaible product object parent\n $product = wc_get_product( $product_id );\n //\n $variation_post = array(\n 'post_title' => $product->get_name(),\n 'post_name' => 'product-'.$product_id.'-varation',\n 'post_status' => 'publish',\n 'post_parent' => $product_id,\n 'post_type' => 'product_variation',\n 'guid' => $product->get_permalink()\n );\n\n $variation_id = wp_insert_post( $variation_post );\n $variation = new WC_Product_Variation( $variation_id );\n error_log( $variation_id );\n\n foreach ($variation_data['attributes'] as $attribute => $term_names )\n {\n $taxonomy = 'pa_'.$attribute; // The attribute taxonomy\n\n // If taxonomy doesn't exists we create it (Thanks to Carl F. Corneil)\n if( ! taxonomy_exists( $taxonomy ) ){ \n register_taxonomy(\n $taxonomy, 'product_variation',\n array(\n 'hierarchical' => false,\n 'label' => ucfirst( $attribute ),\n 'query_var' => true,\n 'rewrite' => array( 'slug' => sanitize_title($attribute) ), // The base slug\n )\n );\n }\n foreach( $term_names as $key=> $term_name ){\n error_log( $key. ' '. $term_name );\n // Check if the Term name exist and if not we create it.\n if( ! term_exists( $term_name, $taxonomy ) ){\n wp_insert_term( $term_name, $taxonomy ); // Create the term\n }\n $term_slug = get_term_by('name', $term_name, $taxonomy )->slug; // Get the term slug\n error_log( print_r($term_slug, TRUE ));\n\n // // Get the post Terms names from the parent variable product.\n $post_term_names = wp_get_post_terms( $product_id, $taxonomy, array('fields' => 'names') );\n\n // // Check if the post term exist and if not we set it in the parent variable product.\n if( ! in_array( $term_name, $post_term_names ) )\n wp_set_post_terms( $product_id, $term_name, $taxonomy, true );\n\n // // Set/save the attribute data in the product variation\n update_post_meta( $variation_id, 'attribute_'.$taxonomy, $term_slug );\n }\n }\n if( ! empty( $variation_data['sku'] ) )\n $variation->set_sku( $variation_data['sku'] );\n\n // Prices\n if( empty( $variation_data['sale_price'] ) ){\n $variation->set_price( $variation_data['regular_price'] );\n } else {\n $variation->set_price( $variation_data['sale_price'] );\n $variation->set_sale_price( $variation_data['sale_price'] );\n }\n $variation->set_regular_price( $variation_data['regular_price'] );\n\n // Stock\n if( ! empty($variation_data['stock_qty']) ){\n $variation->set_stock_quantity( $variation_data['stock_qty'] );\n $variation->set_manage_stock(true);\n $variation->set_stock_status('');\n } else {\n $variation->set_manage_stock(false);\n }\n $variation->set_weight(''); // weight (reseting)\n error_log( print_r( $variation, TRUE ));\n $variation->save(); \n}",
"public function getProduct()\n {\n return $this->getSubscription()->getProduct();\n }",
"public function getProduct();",
"protected function getProduct() {\n return $this->registry->registry('product');\n }",
"public static function product_by_variant_id($id)\n {\n $products = self::get_products();\n $products = array_combine(array_column($products, 'variant_id'), $products);\n return $products[$id];\n }",
"public function getProduct() {\n\n if (!$this->product) {\n $this->product = $this->productPublicRepository->getById($this->getCartItem()->product_id);\n }\n return $this->product;\n }",
"public function getPicturesProduct()\n {\n $aVariantSelections = $this->getVariantSelections();\n if ($aVariantSelections && $aVariantSelections['oActiveVariant'] && !$aVariantSelections['blPerfectFit']) {\n return $aVariantSelections['oActiveVariant'];\n }\n\n return $this->getProduct();\n }",
"public function getProductOption();",
"public function getProduct(): Product\n {\n return $this->product;\n }",
"function get_woocommerce_product_list() {\n\t$full_product_list = array();\n\t$products = new WP_Query( array(\n\t\t'post_type' => array( 'product', 'product_variation' ),\n\t\t'posts_per_page' => - 1,\n\t\t'product_cat' => 'learn',\n\t) );\n\n\t$products = $products->posts;\n\n\tforeach ( $products as $index => $product ) {\n\t\t$theid = $product->ID;\n\n\t\t// its a variable product\n\t\tif ( $product->post_type == 'product_variation' ) {\n\t\t\t$parent_id = wp_get_post_parent_id( $theid );\n\t\t\t$sku = get_post_meta( $theid, '_sku', true );\n\t\t\t$thetitle = get_the_title( $parent_id );\n\n\t\t\t// ****** Some error checking for product database *******\n\t\t\t// check if variation sku is set\n\t\t\tif ( $sku == '' ) {\n\t\t\t\tif ( $parent_id == 0 ) {\n\t\t\t\t\t// Remove unexpected orphaned variations.. set to auto-draft\n\t\t\t\t} else {\n\t\t\t\t\t// there's no sku for this variation > copy parent sku to variation sku\n\t\t\t\t\t// & remove the parent sku so the parent check below triggers\n\t\t\t\t\t$sku = get_post_meta( $parent_id, '_sku', true );\n\t\t\t\t\tif ( function_exists( 'add_to_debug' ) ) {\n\t\t\t\t\t\tadd_to_debug( 'empty sku id=' . $theid . 'parent=' . $parent_id . 'setting sku to ' . $sku );\n\t\t\t\t\t}\n\t\t\t\t\tupdate_post_meta( $theid, '_sku', $sku );\n\t\t\t\t\tupdate_post_meta( $parent_id, '_sku', '' );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// ****************** end error checking *****************\n\n\t\t\t// its a simple product\n\t\t} else {\n\t\t\t$thetitle = $product->post_title;\n\t\t}\n\t\t// add product to array but don't add the parent of product variations\n\t\t$full_product_list[ $theid ] = $thetitle;\n\t}\n\n\treturn $full_product_list;\n}",
"public function product() {\n $slug = $this->param('slug');\n\n return Products::where('slug', '=', $slug)->first();\n }",
"function addVariation($data,$form){\r\n\t\tif(isset($data['ProductAttributes'])){\r\n\t\t\t$data['ProductAttributes'] = Convert::raw2sql($data['ProductAttributes']);\r\n\t\t\t$variation = $this->owner->getVariationByAttributes($data['ProductAttributes']);\r\n\t\t\tif($variation) {\r\n\t\t\t\tif($variation->canPurchase()) {\r\n\t\t\t\t\t$quantity = round($data['Quantity'], $variation->QuantityDecimals());\r\n\t\t\t\t\tif(!$quantity) {\r\n\t\t\t\t\t\t$quantity = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tShoppingCart::singleton()->addBuyable($variation,$quantity);\r\n\t\t\t\t\tif($variation->IsInCart()) {\r\n\t\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.SUCCESSFULLYADDED\",\"Added to cart.\");\r\n\t\t\t\t\t\t$status = \"good\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.NOTSUCCESSFULLYADDED\",\"Not added to cart.\");\r\n\t\t\t\t\t\t$status = \"bad\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTAVAILABLE\",\"That option is not available.\");\r\n\t\t\t\t\t$status = \"bad\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTAVAILABLE\",\"That option is not available.\");\r\n\t\t\t\t$status = \"bad\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTFOUND\",\"The item(s) you are looking for are not available.\");\r\n\t\t\t$status = \"bad\";\r\n\t\t}\r\n\t\tif(Director::is_ajax()){\r\n\t\t\treturn ShoppingCart::singleton()->setMessageAndReturn($msg, $status);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$form->sessionMessage($msg,$status);\r\n\t\t\tDirector::redirectBack();\r\n\t\t}\r\n\t}",
"public function getProduct()\n {\n return Mage::registry('product');\n }",
"public function getProduct()\n {\n return Mage::registry('product');\n }",
"public function getProduct()\n {\n return Mage::registry('product');\n }",
"public function getVariations() {\n return $this->variations;\n }",
"function addproductvariantgot($id)\n\t{\n\t\t$variantaddproduct=\"SELECT * from product_variant where \tptd_sub_catgry_id = $id\";\n\t\t$variantaddproductdata = $this->get_results( $variantaddproduct );\n\t\treturn $variantaddproductdata;\n\t}",
"public function show(Productvariant $id)\n {\n //\n }",
"function fn_product_variations_convert_to_configurable_product($product_id)\n{\n $auth = array();\n\n $product = fn_get_product_data($product_id, $auth);\n $languages = Languages::getAll();\n $product_options = fn_get_product_options($product_id, CART_LANGUAGE, true);\n $product_row = db_get_row('SELECT * FROM ?:products WHERE product_id = ?i', $product_id);\n $product_variation_ids = db_get_fields('SELECT product_id FROM ?:products WHERE parent_product_id = ?i', $product_id);\n $product_exceptions = fn_get_product_exceptions($product_id);\n\n foreach ($product_variation_ids as $product_variation_id) {\n fn_delete_product($product_variation_id);\n }\n\n $options_ids = array();\n $inventory_combinations = db_get_array('SELECT * FROM ?:product_options_inventory WHERE product_id = ?i', $product_id);\n $index = 0;\n\n foreach ($inventory_combinations as $item) {\n $index++;\n $selected_options = array();\n $parts = array_chunk(explode('_', $item['combination']), 2);\n\n foreach ($parts as $part) {\n $selected_options[$part[0]] = $part[1];\n }\n\n $combination = fn_product_variations_get_variation_by_selected_options(\n $product,\n $product_options,\n $selected_options,\n $index\n );\n\n if (!empty($item['product_code'])) {\n $combination['code'] = $item['product_code'];\n }\n\n if (!empty($item['amount'])) {\n $combination['amount'] = $item['amount'];\n }\n\n $is_allow = true;\n\n if ($product_row['exceptions_type'] == 'F') {\n foreach ($product_exceptions as $exception) {\n\n foreach ($exception['combination'] as $option_id => &$variant_id) {\n if ($variant_id == OPTION_EXCEPTION_VARIANT_ANY || $variant_id == OPTION_EXCEPTION_VARIANT_NOTHING) {\n $variant_id = isset($combination['selected_options'][$option_id]) ? $combination['selected_options'][$option_id] : null;\n }\n }\n unset($variant_id);\n\n if ($exception['combination'] == $combination['selected_options']) {\n $is_allow = false;\n break;\n }\n }\n } elseif ($product_row['exceptions_type'] == 'A') {\n $is_allow = false;\n\n foreach ($product_exceptions as $exception) {\n\n foreach ($exception['combination'] as $option_id => &$variant_id) {\n if ($variant_id == OPTION_EXCEPTION_VARIANT_ANY) {\n $variant_id = isset($combination['selected_options'][$option_id]) ? $combination['selected_options'][$option_id] : null;\n }\n }\n unset($variant_id);\n\n if ($exception['combination'] == $combination['selected_options']) {\n $is_allow = true;\n break;\n }\n }\n }\n\n if (!$is_allow) {\n continue;\n }\n\n $variation_id = fn_product_variations_save_variation($product_row, $combination, $languages);\n\n $image = fn_get_image_pairs($item['combination_hash'], 'product_option', 'M', true, true);\n\n if ($image) {\n $detailed = $icons = array();\n $pair_data = array(\n 'type' => 'M'\n );\n\n if (!empty($image['icon'])) {\n $tmp_name = fn_create_temp_file();\n Storage::instance('images')->export($image['icon']['relative_path'], $tmp_name);\n $name = fn_basename($image['icon']['image_path']);\n\n $icons[$image['pair_id']] = array(\n 'path' => $tmp_name,\n 'size' => filesize($tmp_name),\n 'error' => 0,\n 'name' => $name\n );\n\n $pair_data['image_alt'] = empty($image['icon']['alt']) ? '' : $image['icon']['alt'];\n }\n\n if (!empty($image['detailed'])) {\n $tmp_name = fn_create_temp_file();\n Storage::instance('images')->export($image['detailed']['relative_path'], $tmp_name);\n $name = fn_basename($image['detailed']['image_path']);\n\n $detailed[$image['pair_id']] = array(\n 'path' => $tmp_name,\n 'size' => filesize($tmp_name),\n 'error' => 0,\n 'name' => $name\n );\n\n $pair_data['detailed_alt'] = empty($image['detailed']['alt']) ? '' : $image['detailed']['alt'];\n }\n\n $pairs_data = array(\n $image['pair_id'] => $pair_data\n );\n\n fn_update_image_pairs($icons, $detailed, $pairs_data, $variation_id, 'product');\n }\n }\n\n if (!empty($selected_options)) {\n $options_ids = array_keys($selected_options);\n }\n\n db_query(\n 'UPDATE ?:products SET product_type = ?s, variation_options = ?s WHERE product_id = ?i',\n ProductManager::PRODUCT_TYPE_CONFIGURABLE, json_encode(array_values($options_ids)), $product_id\n );\n\n fn_delete_product_option_combinations($product_id);\n db_query('DELETE FROM ?:product_options_exceptions WHERE product_id = ?i', $product_id);\n}",
"function getVariationByAttributes(array $attributes){\r\n\t\tif(!is_array($attributes) || !count($attributes)) {\r\n\t\t\tuser_error(\"attributes must be provided as an array of numeric keys and values IDs...\", E_USER_NOTICE);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t$keyattributes = array_keys($attributes);\r\n\t\t$id = $keyattributes[0];\r\n\t\t$where = \"\\\"ProductID\\\" = \".$this->owner->ID;\r\n\t\t$join = \"\";\r\n\t\tforeach($attributes as $typeid => $valueid){\r\n\t\t\tif(!is_numeric($typeid) || !is_numeric($valueid)) {\r\n\t\t\t\tuser_error(\"key and value ID must be numeric\", E_USER_NOTICE);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t$alias = \"A$typeid\";\r\n\t\t\t$where .= \" AND \\\"$alias\\\".\\\"ProductAttributeValueID\\\" = $valueid\";\r\n\t\t\t$join .= \" INNER JOIN \\\"ProductVariation_AttributeValues\\\" AS \\\"$alias\\\" ON \\\"ProductVariation\\\".\\\"ID\\\" = \\\"$alias\\\".\\\"ProductVariationID\\\" \";\r\n\t\t}\r\n\t\t$variations = DataObject::get('ProductVariation',$where, $sort = null, $join, $limit = \"1\");\r\n\t\tif($variations) {\r\n\t\t\t$variation = $variations->First();\r\n\t\t\treturn $variation;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public function getProduct()\r\n {\r\n return $this->item->getParentObject()->getProduct();\r\n }",
"public function getProduct() {\n return Mage::registry('product');\n }",
"public function getProduct() {\r\n\t\t$id = $this->getRequest()->getParam('id');\r\n\t\t$products = Mage::getModel('catalog/product')->load($id);\r\n\t\treturn $products;\r\n\t}",
"function particularvariant($id)\n\t{\n\t\t$getvariant=\"SELECT * from product_variant where ptdvar_id = $id\";\n\t\t$getvariantdata = $this->get_results( $getvariant );\n\n\t\t$getvariant1=\"SELECT * from product_variant_cost where ptdvar_id = $id\";\n\t\t$getvariantdata1 = $this->get_results( $getvariant1 );\n\n\t\t$c = array('variant' => $getvariantdata,'variantcost' => $getvariantdata1);\n\t\treturn $c;\n\n\t}",
"public function findValueProd($id){\n return Product::where('id',$id)->first()->value;\n }",
"function display_equalprice_variable_pro( $available_variations, \\WC_Product_Variable $variable, \\WC_Product_Variation $variation ) {\n if ( empty( $available_variations['price_html'] ) ) {\n $available_variations['price_html'] = '<p class=\"price\">' . $variation->get_price_html() . '</p>';\n }\n return $available_variations;\n}",
"function get_product($product_id){\n\t\t\n\t\treturn $this->_make_api_call($product_id,'products');\n\t}",
"public static function getProductColorVariations($productID) {\n Db_Actions::DbSelect(\"SELECT * FROM cscart_product_color_variations WHERE product_id=$productID ORDER BY id DESC\");\n $data = Db_Actions::DbGetResults();\n if (!isset($data->empty_result)) {\n $counter = 1;\n $product_data = array();\n foreach ($data as $product) {\n if ($counter <= 3) {\n\n $product_data[] = array('product_id' => $product->color_product_id,\n 'product_name' => self::getProductName($product->color_product_id),\n 'product_image_url' => $root_url . self::getProductImage($product->color_product_id),\n 'product_price' => self::getProductPrice($product->color_product_id),\n 'category_dress_type_id' => self::getCategoryDressTypeID($product->color_product_id),\n 'subcategory_dress_type_id' => self::getSubCategoryDressTypeID($product->color_product_id),\n 'color' => $product->color_variation\n );\n }\n $counter++;\n }\n\n foreach ($product_data as $variation) {\n ?><a href=\"#\" class=\"cs-varr <?php echo $variation['color'] ?>\" product_id=\"<?php echo $variation['product_id'] ?>\" product_title=\"<?php echo $variation['product_name'] ?>\" product_price=\"<?php echo $variation['product_price'] ?>\" category_dress_type_id=\"<?php echo $variation['category_dress_type_id'] ?>\" subcategory_dress_type_id=\"<?php echo $variation['subcategory_dress_type_id'] ?>\" img_url=\"<?php echo $variation['product_image_url'] ?>\" ><img src=\"img/product-images/variation-<?php echo $variation['color'] ?>.png\" width=\"14\" height=\"13\" /></a><?php\n }\n }\n }",
"public function getVariant() : string\n {\n return $this->variant;\n }",
"public static function get($product_id)\n {\n\n // Check Cache system\n if (self::$enable_cache) {\n $data = wp_cache_get($product_id, self::$cache_key);\n if ($data != false) {\n return $data;\n }\n }\n\n // Get Data\n $product = wc_get_product($product_id);\n\n // Data\n // Also We Can Use WC()->api->WC_API_Products->get_product( $product->get_id() );\n $product_data = self::get_product_data($product);\n\n // add variations to variable products\n if ($product->is_type('variable') && $product->has_child()) {\n $product_data['variations'] = self::get_variation_data($product);\n }\n\n // add the parent product data to an individual variation\n if ($product->is_type('variation') && $product->get_parent_id()) {\n $product_data['parent'] = self::get_product_data($product->get_parent_id());\n }\n\n // Add grouped products data\n if ($product->is_type('grouped') && $product->has_child()) {\n $product_data['grouped_products'] = self::get_grouped_products_data($product);\n }\n\n if ($product->is_type('simple')) {\n $parent_id = $product->get_parent_id();\n if (!empty($parent_id)) {\n $_product = wc_get_product($parent_id);\n $product_data['parent'] = self::get_product_data($_product);\n }\n }\n\n // Result\n if (self::$enable_cache) {\n wp_cache_set($product_id, $product_data, self::$cache_key);\n }\n\n // Return Data\n return $product_data;\n }",
"public function getProduct()\n {\n return Mage::registry('current_product');\n }",
"public function getPriceProduct()\n {\n return $this->priceProduct;\n }",
"public function testProductGetVariants()\n {\n $product = $this->find('product', 1);\n \n $variants = $product->getVariants();\n \n $productColor = $this->find('productColor', 1);\n $productSize = $this->find('productSize', 1);\n \n $this->assertTrue(\n $variants[$productSize->getId()][$productColor->getId()]\n );\n }",
"public function getProduct() {\n return $this->_registry->registry ( 'current_product' );\n }",
"function cart_variation_description( $name, $cart_item, $cart_item_key ) {\n $product_item = $cart_item['data'];\n if(!empty($product_item) && $product_item->is_type( 'variation' ) ) {\n // WC 3+ compatibility\n $descrition = version_compare( WC_VERSION, '3.0', '<' ) ? $product_item->get_variation_description() : $product_item->get_description();\n $result = __( '', 'woocommerce' ) . mb_strtolower($descrition);\n return $result;\n } else\n return $name;\n}",
"public function getDefaultVariationId()\n {\n return $this->_defaultPriceVariationId;\n }",
"function viewNormal(){\n $sql = \"select * from goods where gd_variation=:gd_variation order by gd_id ASC limit $this->start, $this->limit\";\n $args = [':gd_variation'=>$this->gd_variation];\n return $this->run($sql, $args);\n }",
"public function load($id) {\n \tglobal $DB;\n\n \tparent::load($id);\n\n \t$productVariations = $DB->get_records(\n \t\t'local_moodec_variation', \n \t\tarray(\n \t\t\t'product_id' => $id,\n\t\t\t)\n\t\t);\n\n \tif(!!$productVariations) {\n\t \tforeach ($productVariations as $pv) {\n\t \t\t$variationid = (int) $pv->id;\n\t \t\t$this->_variations[$variationid] = new MoodecProductVariation($variationid, true);\n\t \t}\n\t } else {\n \tthrow new Exception('Unable to load product variation information using identifier: ' . $id);\n \t\t}\n }",
"public static function getAllVariations()\n {\n $query = DB::table('variations')\n ->select('*')\n ->orderBy('variation_id', 'DESC');\n\n return $query->get();\n }",
"public function get_first_variation_image( $retProd ) {\n\n $images = array( 'large' => array(), 'small' => array() );\n\n if ( isset($retProd['Variations'], $retProd['Variations']['TotalVariations'], $retProd['Variations']['Item']) ) {\n $total = (int)$retProd['Variations']['TotalVariations'];\n \n $variations = array();\n if ($total <= 1 || isset($retProd['Variations']['Item']['ASIN'])) { // --fix 2015.03.19\n $variations[] = $retProd['Variations']['Item'];\n } else {\n $variations = (array) $retProd['Variations']['Item'];\n }\n \n // Loop through the variation\n foreach ($variations as $variation_item) {\n \n $images = $this->build_images_data( $variation_item );\n if ( !empty($images['large']) ) {\n return $images;\n }\n } // end foreach\n }\n return $images;\n }",
"public function getProductValueById()\n\t{\n\t\t$product_id = $this->input->post('product_id');\n\t\tif ($product_id) {\n\t\t\t$product_data = $this->model_products->getProductData($product_id);\n\t\t\techo json_encode($product_data);\n\t\t}\n\t}",
"public function getJsCustomProduct()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_presentation/js_product', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }",
"public function getProducte()\n {\n return $this->producte;\n }",
"public function get_variation_price( $price, $product, $min_or_max, $display ) {\r\n\r\n\t\tif ( WC_Name_Your_Price_Helpers::has_nyp( $product ) && 'min' === $min_or_max ) {\r\n\r\n\t\t\t$prices = $product->get_variation_prices();\r\n\r\n\t\t\tif ( is_array( $prices ) && isset( $prices['price'] ) ) {\r\n\r\n\t\t\t\t// Get the ID of the variation with the minimum price.\r\n\t\t\t\treset( $prices['price'] );\r\n\t\t\t\t$min_id = key( $prices['price'] );\r\n\r\n\t\t\t\t// If the minimum variation is an NYP variation then get the minimum price. This lets you distinguish between 0 and null.\r\n\t\t\t\tif ( WC_Name_Your_Price_Helpers::is_nyp( $min_id ) ) {\r\n\t\t\t\t\t$price = WC_Name_Your_Price_Helpers::get_minimum_price( $min_id );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $price;\r\n\t}",
"public function getProductData()\n {\n // use\n //$this->request->getParams(); // all params\n $id= $this->request->getParam('param');\n $product = $this->_product->create()->load($id);\n return $product;\n\n }",
"public function getJsCustomProduct()\n {\n return Mage::getStoreConfig('splitprice/split_price_presentation/js_product');\n }",
"public function single_product_variations_custom_html( $html, $args ) {\n\t\t\techo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t?>\n\t\t\t<div class=\"ast-variation-button-group\">\n\t\t\t\t<?php\n\t\t\t\t\t$options = isset( $args['options'] ) ? $args['options'] : array();\n\t\t\t\t\t$product = isset( $args['product'] ) ? $args['product'] : array();\n\t\t\t\t\t$attribute = isset( $args['attribute'] ) ? $args['attribute'] : array();\n\n\t\t\t\tif ( empty( $options ) && ! empty( $product ) && ! empty( $attribute ) ) {\n\t\t\t\t\t$attributes = $product->get_variation_attributes();\n\t\t\t\t\t$options = $attributes[ $attribute ];\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $options ) ) {\n\t\t\t\t\tif ( $product && taxonomy_exists( $attribute ) ) {\n\t\t\t\t\t\t// Get terms if this is a taxonomy - ordered. We need the names too.\n\t\t\t\t\t\t$terms = wc_get_product_terms(\n\t\t\t\t\t\t\t$product->get_id(),\n\t\t\t\t\t\t\t$attribute,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'fields' => 'all',\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tforeach ( $terms as $term ) {\n\t\t\t\t\t\t\tif ( in_array( $term->slug, $options, true ) ) {\n\n\t\t\t\t\t\t\t\t$default_value = $product->get_default_attributes();\n\t\t\t\t\t\t\t\t$active_class = ( isset( $default_value[ $term->taxonomy ] ) && $term->slug === $default_value[ $term->taxonomy ] ) ? 'active' : '';\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<div class=\"ast-single-variation <?php echo esc_attr( $active_class ); ?>\" data-slug=\"<?php echo esc_attr( $term->slug ); ?>\" >\n\t\t\t\t\t\t\t\t\t\t<?php echo esc_html( apply_filters( 'astra_variation_option_name', $term->name, $term, $attribute, $product ) ); ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tforeach ( $options as $option ) {\n\t\t\t\t\t\t\t// This handles < 2.4.0 bw compatibility where text attributes were not sanitized.\n\t\t\t\t\t\t\t$default_value = $product->get_default_attributes();\n\t\t\t\t\t\t\t$active_class = ( isset( $default_value[ strtolower( $attribute ) ] ) && $option === $default_value[ strtolower( $attribute ) ] ) ? 'active' : '';\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<div class=\"ast-single-variation <?php echo esc_attr( $active_class ); ?>\" data-slug=\"<?php echo esc_attr( $option ); ?>\" >\n\t\t\t\t\t\t\t\t\t<?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute, $product ) ); ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"public function getProdAlt3()\n {\n return $this->prod_alt3;\n }",
"public function get_price() {\n\n\t\t$price = null;\n\t\tif ( $this->is_on_sale() ) {\n\t\t\tif ( strstr($this->sale_price,'%') ) {\n\t\t\t\t$price = round($this->regular_price * ( (100 - str_replace('%','',$this->sale_price) ) / 100 ), 4);\n\t\t\t} else if ( $this->sale_price ) {\n\t\t\t\t$price = $this->sale_price;\n\t\t\t}\n\t\t} else {\n\t\t\t$price = apply_filters('jigoshop_product_get_regular_price', $this->regular_price, $this->variation_id);\n\t\t}\n\t\treturn apply_filters( 'jigoshop_product_get_price', $price, $this->variation_id );\n\n\t}",
"public function variant(){\n return $this->hasOne('Salesfly\\Salesfly\\Entities\\Variant');\n }",
"public function getProductPrice(){\n return $this->product_price;\n }",
"public function _getProduct() {\n \n // get website id from request\n $websiteId = ( int ) $this->getRequest ()->getParam ( static::WEBSITE_ID );\n if ($websiteId <= 0) {\n $websiteId = Mage::app ()->getWebsite ( 'base' )->getId ();\n }\n \n // get store id from request\n $storeId = ( int ) $this->getRequest ()->getParam ( static::STORE_ID );\n if ($storeId <= 0) {\n $storeId = Mage::app ()->getWebsite ( $websiteId )->getDefaultGroup ()->getDefaultStoreId ();\n }\n if (is_null ( $this->_product )) {\n $productId = $this->getRequest ()->getParam ( 'id' );\n /**\n *\n * @var $productHelper Mage_Catalog_Helper_Product\n */\n $productHelper = Mage::helper ( 'catalog/product' );\n $product = $productHelper->getProduct ( $productId, $storeId );\n if (! ($product->getId ())) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n // check if product belongs to website current\n if ($this->_getStore ()->getId ()) {\n $isValidWebsite = in_array ( $websiteId, $product->getWebsiteIds () );\n if (! $isValidWebsite) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n }\n // Check display settings for customers & guests\n if ($this->getApiUser ()->getType () != Mage_Api2_Model_Auth_User_Admin::USER_TYPE) {\n // check if product assigned to any website and can be shown\n if ((! Mage::app ()->isSingleStoreMode () && ! count ( $product->getWebsiteIds () )) || ! $productHelper->canShow ( $product )) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n }\n $this->_product = $product;\n }\n return $this->_product;\n }",
"public function getProduct(){\r\n return Mage::registry('current_product');\r\n }",
"public function product_detail() {\n global $product;\n WC_Gokeep_JS::get_instance()->product_detail( $product );\n }"
] | [
"0.8370942",
"0.7373479",
"0.72611874",
"0.72476953",
"0.6889464",
"0.68786544",
"0.6845588",
"0.65703034",
"0.65638375",
"0.6562082",
"0.652585",
"0.65065014",
"0.65053344",
"0.64728487",
"0.64709586",
"0.6431143",
"0.6431143",
"0.6431143",
"0.6431143",
"0.6431143",
"0.6431143",
"0.6403907",
"0.63905096",
"0.6378458",
"0.6370318",
"0.6354871",
"0.6334404",
"0.6333259",
"0.6275234",
"0.6275234",
"0.6225856",
"0.621117",
"0.62085694",
"0.62059253",
"0.62021595",
"0.6198284",
"0.6187244",
"0.6184801",
"0.61847734",
"0.6184738",
"0.6183403",
"0.61787367",
"0.6168489",
"0.61625236",
"0.61485",
"0.6132875",
"0.61042356",
"0.60971934",
"0.60694605",
"0.60623056",
"0.6056655",
"0.6051759",
"0.604812",
"0.6042768",
"0.6020138",
"0.60167384",
"0.5984905",
"0.5983249",
"0.597961",
"0.597961",
"0.597961",
"0.59771115",
"0.5973395",
"0.59474385",
"0.59380054",
"0.5936835",
"0.5933786",
"0.5915587",
"0.59063077",
"0.5904347",
"0.58973825",
"0.58838576",
"0.58546454",
"0.5849037",
"0.58254445",
"0.5817296",
"0.5811636",
"0.58027667",
"0.5800567",
"0.5783367",
"0.5777703",
"0.5767954",
"0.5761224",
"0.57515043",
"0.57453877",
"0.5743034",
"0.57381886",
"0.57195574",
"0.571207",
"0.570582",
"0.5696466",
"0.5696464",
"0.5692487",
"0.5681794",
"0.5680127",
"0.5677985",
"0.5677524",
"0.5655419",
"0.56481236",
"0.5647522"
] | 0.6207671 | 33 |
Returns the product variations | public function get_variations($returnAll = false) {
if( $returnAll ) {
return $this->_variations;
}
$enabledVariations = array();
// We only want to return variations which are enabled
foreach ($this->_variations as $id => $v) {
if( $v->is_enabled() ) {
$enabledVariations[$id] = $v;
}
}
return $enabledVariations;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function variations()\n {\n return $this->hasMany(ProductVariation::class);\n }",
"public function getVariation()\n {\n return $this->db->get($this->product_variant);\n }",
"public function get_product_variations() : array {\n\t\tpreg_match( '/skuProducts=\\[(.*?)\\];/si', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn [ 'variations' => [] ];\n\t\t}\n\n\t\treturn [ 'variations' => json_decode( sprintf( '[%s]', $matches[1] ), true ) ];\n\t}",
"public function getVariations() {\n return $this->variations;\n }",
"public function getVariation()\r\n {\r\n return array();\r\n }",
"public static function getAllVariations()\n {\n $query = DB::table('variations')\n ->select('*')\n ->orderBy('variation_id', 'DESC');\n\n return $query->get();\n }",
"public function getVariationSpecifics()\n {\n return $this->variationSpecifics;\n }",
"function get_woocommerce_product_list() {\n\t$full_product_list = array();\n\t$products = new WP_Query( array(\n\t\t'post_type' => array( 'product', 'product_variation' ),\n\t\t'posts_per_page' => - 1,\n\t\t'product_cat' => 'learn',\n\t) );\n\n\t$products = $products->posts;\n\n\tforeach ( $products as $index => $product ) {\n\t\t$theid = $product->ID;\n\n\t\t// its a variable product\n\t\tif ( $product->post_type == 'product_variation' ) {\n\t\t\t$parent_id = wp_get_post_parent_id( $theid );\n\t\t\t$sku = get_post_meta( $theid, '_sku', true );\n\t\t\t$thetitle = get_the_title( $parent_id );\n\n\t\t\t// ****** Some error checking for product database *******\n\t\t\t// check if variation sku is set\n\t\t\tif ( $sku == '' ) {\n\t\t\t\tif ( $parent_id == 0 ) {\n\t\t\t\t\t// Remove unexpected orphaned variations.. set to auto-draft\n\t\t\t\t} else {\n\t\t\t\t\t// there's no sku for this variation > copy parent sku to variation sku\n\t\t\t\t\t// & remove the parent sku so the parent check below triggers\n\t\t\t\t\t$sku = get_post_meta( $parent_id, '_sku', true );\n\t\t\t\t\tif ( function_exists( 'add_to_debug' ) ) {\n\t\t\t\t\t\tadd_to_debug( 'empty sku id=' . $theid . 'parent=' . $parent_id . 'setting sku to ' . $sku );\n\t\t\t\t\t}\n\t\t\t\t\tupdate_post_meta( $theid, '_sku', $sku );\n\t\t\t\t\tupdate_post_meta( $parent_id, '_sku', '' );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// ****************** end error checking *****************\n\n\t\t\t// its a simple product\n\t\t} else {\n\t\t\t$thetitle = $product->post_title;\n\t\t}\n\t\t// add product to array but don't add the parent of product variations\n\t\t$full_product_list[ $theid ] = $thetitle;\n\t}\n\n\treturn $full_product_list;\n}",
"private function _getProductvariantsList($product) {\n\n $productvariantsList = array();\n $linkHelper = new Helper\\HtmlLinkHelper();\n $spanHelper = new Helper\\HtmlSpanHelper();\n\n /* @var $productvariant Entity\\ProductEntity */\n foreach ($product->getChilderen() as $productvariant) {\n\n $categoryId = $productvariant->getProductCategories()->first()->getCategory()->getId();\n\n $name = $productvariant->getCurrentTranslation()->getName();\n\n // render link\n $liString = $linkHelper->getHtml(\n $name,\n $this->url()->fromRoute('home/default', array(\n 'controller' => 'product',\n 'action' => 'form',\n 'param' => 'product',\n 'value' => $productvariant->getId(),\n 'param2' => 'category',\n 'value2' => $categoryId\n )),\n $name,\n 'pane-navi-link productvariant',\n array(\n 'data-pane-title' => '',\n 'data-delete-url' => $this->url()->fromRoute('home/default', array(\n 'controller' => 'product',\n 'action' => 'delete',\n 'param' => 'product',\n 'value' => $productvariant->getId()\n ))\n ),\n null\n );\n\n// $liString .= $spanHelper->getHtml(\n// '',\n// 'edit',\n// array(\n// 'data-form-url' => $this->url()->fromRoute('home/default', array(\n// 'controller' => 'product',\n// 'action' => 'form',\n// 'param' => 'product',\n// 'value' => $productvariant->getId()\n// ))\n// )\n// );\n\n $productvariantsList[] = $liString;\n }\n\n return $productvariantsList;\n }",
"function fn_product_variations_convert_to_configurable_product($product_id)\n{\n $auth = array();\n\n $product = fn_get_product_data($product_id, $auth);\n $languages = Languages::getAll();\n $product_options = fn_get_product_options($product_id, CART_LANGUAGE, true);\n $product_row = db_get_row('SELECT * FROM ?:products WHERE product_id = ?i', $product_id);\n $product_variation_ids = db_get_fields('SELECT product_id FROM ?:products WHERE parent_product_id = ?i', $product_id);\n $product_exceptions = fn_get_product_exceptions($product_id);\n\n foreach ($product_variation_ids as $product_variation_id) {\n fn_delete_product($product_variation_id);\n }\n\n $options_ids = array();\n $inventory_combinations = db_get_array('SELECT * FROM ?:product_options_inventory WHERE product_id = ?i', $product_id);\n $index = 0;\n\n foreach ($inventory_combinations as $item) {\n $index++;\n $selected_options = array();\n $parts = array_chunk(explode('_', $item['combination']), 2);\n\n foreach ($parts as $part) {\n $selected_options[$part[0]] = $part[1];\n }\n\n $combination = fn_product_variations_get_variation_by_selected_options(\n $product,\n $product_options,\n $selected_options,\n $index\n );\n\n if (!empty($item['product_code'])) {\n $combination['code'] = $item['product_code'];\n }\n\n if (!empty($item['amount'])) {\n $combination['amount'] = $item['amount'];\n }\n\n $is_allow = true;\n\n if ($product_row['exceptions_type'] == 'F') {\n foreach ($product_exceptions as $exception) {\n\n foreach ($exception['combination'] as $option_id => &$variant_id) {\n if ($variant_id == OPTION_EXCEPTION_VARIANT_ANY || $variant_id == OPTION_EXCEPTION_VARIANT_NOTHING) {\n $variant_id = isset($combination['selected_options'][$option_id]) ? $combination['selected_options'][$option_id] : null;\n }\n }\n unset($variant_id);\n\n if ($exception['combination'] == $combination['selected_options']) {\n $is_allow = false;\n break;\n }\n }\n } elseif ($product_row['exceptions_type'] == 'A') {\n $is_allow = false;\n\n foreach ($product_exceptions as $exception) {\n\n foreach ($exception['combination'] as $option_id => &$variant_id) {\n if ($variant_id == OPTION_EXCEPTION_VARIANT_ANY) {\n $variant_id = isset($combination['selected_options'][$option_id]) ? $combination['selected_options'][$option_id] : null;\n }\n }\n unset($variant_id);\n\n if ($exception['combination'] == $combination['selected_options']) {\n $is_allow = true;\n break;\n }\n }\n }\n\n if (!$is_allow) {\n continue;\n }\n\n $variation_id = fn_product_variations_save_variation($product_row, $combination, $languages);\n\n $image = fn_get_image_pairs($item['combination_hash'], 'product_option', 'M', true, true);\n\n if ($image) {\n $detailed = $icons = array();\n $pair_data = array(\n 'type' => 'M'\n );\n\n if (!empty($image['icon'])) {\n $tmp_name = fn_create_temp_file();\n Storage::instance('images')->export($image['icon']['relative_path'], $tmp_name);\n $name = fn_basename($image['icon']['image_path']);\n\n $icons[$image['pair_id']] = array(\n 'path' => $tmp_name,\n 'size' => filesize($tmp_name),\n 'error' => 0,\n 'name' => $name\n );\n\n $pair_data['image_alt'] = empty($image['icon']['alt']) ? '' : $image['icon']['alt'];\n }\n\n if (!empty($image['detailed'])) {\n $tmp_name = fn_create_temp_file();\n Storage::instance('images')->export($image['detailed']['relative_path'], $tmp_name);\n $name = fn_basename($image['detailed']['image_path']);\n\n $detailed[$image['pair_id']] = array(\n 'path' => $tmp_name,\n 'size' => filesize($tmp_name),\n 'error' => 0,\n 'name' => $name\n );\n\n $pair_data['detailed_alt'] = empty($image['detailed']['alt']) ? '' : $image['detailed']['alt'];\n }\n\n $pairs_data = array(\n $image['pair_id'] => $pair_data\n );\n\n fn_update_image_pairs($icons, $detailed, $pairs_data, $variation_id, 'product');\n }\n }\n\n if (!empty($selected_options)) {\n $options_ids = array_keys($selected_options);\n }\n\n db_query(\n 'UPDATE ?:products SET product_type = ?s, variation_options = ?s WHERE product_id = ?i',\n ProductManager::PRODUCT_TYPE_CONFIGURABLE, json_encode(array_values($options_ids)), $product_id\n );\n\n fn_delete_product_option_combinations($product_id);\n db_query('DELETE FROM ?:product_options_exceptions WHERE product_id = ?i', $product_id);\n}",
"public function variants()\n {\n return $this->hasMany(Variant::class, 'product_id', 'id');\n }",
"function getVariations() : IUniqueModelIterator;",
"public function getVariants()\n {\n return $this->variants;\n }",
"function fn_product_variations_get_variation_by_selected_options($product, $product_options, $selected_options, $index = 0)\n{\n /** @var ProductManager $product_manager */\n $product_manager = Tygh::$app['addons.product_variations.product.manager'];\n\n $name_part = array($product['product']);\n $variation_code = $product_manager->getVariationCode($product['product_id'], $selected_options);\n $options = array();\n\n foreach ($selected_options as $option_id => $variant_id) {\n $option_id = (int) $option_id;\n $variant_id = (int) $variant_id;\n\n $option = $product_options[$option_id];\n $option['value'] = $variant_id;\n\n $variant = $product_options[$option_id]['variants'][$variant_id];\n\n $name_part[] = $option['option_name'] . ': ' .$variant['variant_name'];\n $options[$option_id] = $option;\n }\n\n $combination = array(\n 'name' => implode(', ', $name_part),\n 'price' => $product['price'],\n 'list_price' => $product['list_price'],\n 'weight' => $product['weight'],\n 'amount' => empty($product['amount']) ? 1 : $product['amount'],\n 'code' => !empty($product['product_code']) ? $product['product_code'] . $index : '',\n 'options' => $options,\n 'selected_options' => $selected_options,\n 'variation' => $variation_code\n );\n\n return $combination;\n}",
"function fn_product_variations_generate($product_id, $combinations, array $options_ids)\n{\n $languages = Languages::getAll();\n $product_row = db_get_row('SELECT * FROM ?:products WHERE product_id = ?i', $product_id);\n\n $product_variation_ids = db_get_fields('SELECT product_id FROM ?:products WHERE parent_product_id = ?i', $product_id);\n\n foreach ($product_variation_ids as $product_variation_id) {\n fn_delete_product($product_variation_id);\n }\n\n foreach ($combinations as $variation_code => $combination) {\n fn_product_variations_save_variation($product_row, $combination, $languages);\n }\n\n db_query(\n 'UPDATE ?:products SET product_type = ?s, variation_options = ?s WHERE product_id = ?i',\n ProductManager::PRODUCT_TYPE_CONFIGURABLE, json_encode(array_values($options_ids)), $product_id\n );\n}",
"public function productAssets()\n {\n $variations = ProductVariation::with('stocks')->get();\n $assets = $variations->sum(function ($variant) {\n return $variant->stockCount() * $variant->base_price;\n });\n\n $opAssets = $variations->sum(function ($variant) {\n return $variant->stockCount() * $variant->price;\n });\n\n return [\n 'assets' => $assets,\n 'op_asset' => $opAssets\n ];\n }",
"public function testProductGetVariants()\n {\n $product = $this->find('product', 1);\n \n $variants = $product->getVariants();\n \n $productColor = $this->find('productColor', 1);\n $productSize = $this->find('productSize', 1);\n \n $this->assertTrue(\n $variants[$productSize->getId()][$productColor->getId()]\n );\n }",
"public function getEnabledVariations(ProductInterface $product);",
"public function single_product_product_variations_custom_output() {\n\t\t\tif ( ! defined( 'CFVSW_VER' ) && class_exists( 'woocommerce' ) && is_product() && astra_get_option( 'single-product-select-variations' ) ) {\n\t\t\t\tadd_filter( 'woocommerce_dropdown_variation_attribute_options_html', array( $this, 'single_product_variations_custom_html' ), 999, 2 );\n\t\t\t}\n\t\t}",
"public function test_get_style_variations_returns_all_variations() {\n\t\t// Switch to a child theme.\n\t\tswitch_theme( 'block-theme-child' );\n\t\twp_set_current_user( self::$administrator_id );\n\n\t\t$actual_settings = WP_Theme_JSON_Resolver::get_style_variations();\n\t\t$expected_settings = array(\n\t\t\tarray(\n\t\t\t\t'version' => 2,\n\t\t\t\t'title' => 'variation-b',\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'blocks' => array(\n\t\t\t\t\t\t'core/post-title' => array(\n\t\t\t\t\t\t\t'color' => array(\n\t\t\t\t\t\t\t\t'palette' => array(\n\t\t\t\t\t\t\t\t\t'theme' => array(\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t'slug' => 'dark',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'Dark',\n\t\t\t\t\t\t\t\t\t\t\t'color' => '#010101',\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'version' => 2,\n\t\t\t\t'title' => 'Block theme variation',\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'color' => array(\n\t\t\t\t\t\t'palette' => array(\n\t\t\t\t\t\t\t'theme' => array(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'slug' => 'foreground',\n\t\t\t\t\t\t\t\t\t'name' => 'Foreground',\n\t\t\t\t\t\t\t\t\t'color' => '#3F67C6',\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\t'styles' => array(\n\t\t\t\t\t'blocks' => array(\n\t\t\t\t\t\t'core/post-title' => array(\n\t\t\t\t\t\t\t'typography' => array(\n\t\t\t\t\t\t\t\t'fontWeight' => '700',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\twp_recursive_ksort( $actual_settings );\n\t\twp_recursive_ksort( $expected_settings );\n\n\t\t$this->assertSame(\n\t\t\t$expected_settings,\n\t\t\t$actual_settings\n\t\t);\n\t}",
"function generateVariationsFromAttributeValues(array $values) {\r\n\t\t$cpt = 0;\r\n\t\t$variations = array();\r\n\t\tforeach($values as $typeID => $typeValues) {\r\n\t\t\t$this->owner->addAttributeType($typeID);\r\n\t\t\t$copyVariations = $variations;\r\n\t\t\t$variations = array();\r\n\t\t\tforeach($typeValues as $value) {\r\n\t\t\t\t$value = array($value);\r\n\t\t\t\tif(count($copyVariations) > 0) {\r\n\t\t\t\t\tforeach($copyVariations as $variation) {\r\n\t\t\t\t\t\t$variations[] = array_merge($variation, $value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$variations[] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($variations as $variation) {\r\n\t\t\tsort($variation);\r\n\t\t\t$str = implode(',', $variation);\r\n\t\t\t$add = true;\r\n\t\t\t$productVariationIDs = DB::query(\"SELECT \\\"ID\\\" FROM \\\"ProductVariation\\\" WHERE \\\"ProductID\\\" = '{$this->owner->ID}'\")->column();\r\n\t\t\tif(count($productVariationIDs) > 0) {\r\n\t\t\t\t$productVariationIDs = implode(',', $productVariationIDs);\r\n\t\t\t\t$variationValues = DB::query(\"SELECT GROUP_CONCAT(\\\"ProductAttributeValueID\\\" ORDER BY \\\"ProductAttributeValueID\\\" SEPARATOR ',') FROM \\\"ProductVariation_AttributeValues\\\" WHERE \\\"ProductVariationID\\\" IN ($productVariationIDs) GROUP BY \\\"ProductVariationID\\\"\")->column();\r\n\t\t\t\tif(in_array($str, $variationValues)) $add = false;\r\n\t\t\t}\r\n\t\t\tif($add) {\r\n\t\t\t\t$cpt++;\r\n\t\t\t\t$newVariation = new ProductVariation(array(\r\n\t\t\t\t\t'ProductID' => $this->owner->ID,\r\n\t\t\t\t\t'Price' => $this->owner->Price\r\n\t\t\t\t));\r\n\t\t\t\t$newVariation->write();\r\n\t\t\t\t$newVariation->AttributeValues()->addMany($variation);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $cpt;\r\n\t}",
"public function AlternativesPerProduct()\n {\n $dos = ArrayList::create();\n $altCount = Config::inst()->get('RepeatOrderForm', 'number_of_product_alternatives');\n for ($i = 1; $i <= $altCount; $i++) {\n $alternativeField = \"Alternative\".$i.\"ID\";\n if ($this->$alternativeField) {\n $product = Product::get()->filter(['ID' => $this->$alternativeField])->first();\n if ($product) {\n $dos->push($product);\n }\n }\n }\n if ($dos && $dos->count()) {\n return $dos;\n }\n return null;\n }",
"public function GetVariants()\r\n\t{\r\n\t\treturn $this->variant_model->GetAllBy(array(\"test_id\"=>$this->id));\r\n\t}",
"public function getVariants()\n {\n return array();\n }",
"public function variantsList($productId)\n\t{\n\t\treturn $this->client->sendRequest(sprintf(self::ENDPOINT_VARIANTS, $productId, null, null), 'GET');\n\t}",
"function HTMLCartVariationValues($name=null, $results, $product, $product_variations, $product_variation_values, $variation_values, $quantitys) {\n //エラー判定\n if (isset($results)) {\n $err_quantity = $results->errors['quantity'];\n }\n\n if (is_array($product_variations)) {\n //選択済み規格でループ\n foreach ($product_variations as $key=>$val) {\n if (is_array($variation_values[$key])) {\n //規格詳細でループ\n foreach ($variation_values[$key] as $k=>$v) {\n //自身を抹消(再帰用)\n unset($product_variations[$key]);\n //配列がなくなった(出力処理)\n if (count($product_variations)==0) {\n $name_lbl = '';\n $id = '';\n //規格1つの場合\n if (count($name)==0) {\n $name_lbl = '<strong>' . $v['name'] . '</strong>';\n }\n //規格組合せの場合\n else {\n //規格詳細を連結\n $nm = '';\n foreach ($name as $n) {\n if ($nm=='') {\n $id = $n['id'];\n $nm = '<strong>' . $n['name'] . '</strong>';\n }\n else {\n $id = $id . '_' . $n['id'];\n $nm = $nm . ', <strong>' . $n['name'] . '</strong>';\n }\n }\n $name_lbl = $nm . ', <strong>' . $v['name'] . '</strong>';\n }\n //IDを作成する\n if ($id=='') {\n $id = $v['id'];\n }\n else {\n $id = $id . '_' . $v['id'];\n }\n $price = $product['price'];\n if (isset($product_variation_values[$id])) {\n $dl_pub = $product_variation_values[$id]['download_publish'];\n if ($dl_pub==0) {\n $price = $product_variation_values[$id]['price'] - $product['off'];\n }\n else {\n $price = $product_variation_values[$id]['price'] - $product['download_off'];\n }\n $stock = $product_variation_values[$id]['stock'];\n $pricestock_id = $product_variation_values[$id]['pricestock_id'];\n }\n $quantity = 1;\n if (!is_null($quantitys[$id]) && $quantitys[$id]!='') {\n $quantity = $quantitys[$id];\n }\n\n echo '<div class=\"pd_buy_row\">';\n echo '<div class=\"pd_buy_lbl\">';\n echo $name_lbl;\n echo '</div>';\n echo '<div class=\"pd_buy_price\">';\n _e(SCLNG_PUBLIC_PRODUCT_DETAIL_VARIATION_PRICE, SC_DOMAIN);\n echo SimpleCartFunctions::MoneyFormat($price);\n if ($product['stock_manage']=='1'&& $dl_pub==0 ) {\n echo '<br/>';\n _e(sprintf(SCLNG_PUBLIC_PRODUCT_DETAIL_VARIATION_STOCK, $stock), SC_DOMAIN);\n }\n echo '</div>';\n echo '<div class=\"pd_buy_quantity\">';\n\n if ($product['stock_manage']=='1' && $dl_pub==0 && $stock==0) {\n echo _e(SCLNG_PUBLIC_PRODUCT_DETAIL_LACK_STOCK, SC_DOMAIN);\n }\n else {\n echo SimpleCartFunctions::HTMLInput(array('id'=>'quantity_'.$dl_pub.'_'.$id, 'name'=>'quantitys_'.$dl_pub.'['.$id.']', 'value'=>$quantity, 'class'=>'input_40'));\n echo SimpleCartFunctions::HTMLSubmit(array('id'=>'buy_delivery_'.$dl_pub.'_'.$id, 'onclick'=>\"\n Javascript:\n document.getElementById('download').value = \".$dl_pub.\";\n document.getElementById('pricestock_id').value = \".$pricestock_id.\";\n document.getElementById('quantity').value = document.getElementById('quantity_\".$dl_pub.\"_\".$id.\"').value;\n document.getElementById('error_id').value = '\".$dl_pub.\"_\".$id.\"';\n \", 'class'=>'button_buy', 'value'=>__(SCLNG_BUY_NOW, SC_DOMAIN)));\n echo SimpleCartFunctions::HTMLError($err_quantity[$dl_pub.\"_\".$id]);\n }\n echo '</div>';\n echo '</div>';\n }\n //配列がまだある(再帰するぜ)\n else {\n if (is_null($name)) {\n $name = array();\n $name[$key]['id'] = $v['id'];\n $name[$key]['name'] = $v['name'];\n }\n else {\n $name[$key]['id'] = $v['id'];\n $name[$key]['name'] = $v['name'];\n }\n SimpleCartFunctions::HTMLCartVariationValues($name, $results, $product, $product_variations, $product_variation_values, $variation_values, $quantitys);\n }\n }\n }\n return;\n }\n }\n }",
"public function getVariants(): Collection\n {\n return $this->paginate([\n 'query' => 'query getVariants($cursor: String) {\n results: productVariants(first:250, after:$cursor) {\n edges {\n node {\n title\n sku\n product {\n title\n handle\n status\n publishedOnCurrentPublication\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }'\n ])\n\n // Remove variants that are missing a sku\n ->filter(function($variant) {\n return !empty($variant['sku']);\n })\n\n // Remove variants that weren't published to the Sales Channel of the\n // Custom App whose credentials are being used to query the API. This\n // can be used to filter out products not intended for the public store,\n // like wholesale only products.\n ->when(!$this->disablePublishedCheck, function($variants) {\n return $variants->filter(function($variant) {\n return $variant['product']['publishedOnCurrentPublication'];\n });\n })\n\n // Dedupe by SKU, prefering active variants. Shopify allows you to\n // re-use SKUs between multiple product variants but this is used in\n // Feed Me as the unique identifier for importing.\n ->reduce(function($variants, $variant) {\n\n // Check if this variant has already been added\n $existingIndex = $variants->search(\n function($existing) use ($variant) {\n return $existing['sku'] == $variant['sku'];\n }\n );\n\n // If this sku is already in the list, replace it if the previous\n // instance was not an active product\n // https://shopify.dev/api/admin-graphql/2022-04/enums/ProductStatus\n if ($existingIndex !== false) {\n $existing = $variants->get($existingIndex);\n if ($existing['product']['status'] != 'ACTIVE') {\n $variants = $variants->replace([\n $existingIndex => $variant\n ]);\n }\n\n // ... else the variant didn't exist, so add it\n } else $variants->push($variant);\n\n // Keep working...\n return $variants;\n }, new Collection)\n\n // Make a title that is more useful for displaying in the CMS.\n ->map(function($variant) {\n $variant['dashboardTitle'] = $variant['product']['title']\n .' - '.$variant['title']\n .(($sku = $variant['sku']) ? ' ('.$sku.')' : null);\n return $variant;\n })\n\n // Remove fields that we're used to pre-filter\n ->map(function($variant) {\n unset(\n $variant['product']['status'],\n $variant['product']['publishedOnCurrentPublication']\n );\n return $variant;\n })\n\n // Use integer keys\n ->values();\n }",
"public function run()\n {\n $productVariants = [\n \t1 => [\n \t\t'product_id' => 1,\n \t\t'variant_type' => 2,\n \t\t'product_type_id' => 1,\n \t\t'name' => 'Everything Seasoning',\n \t\t'internal_sku' => '811207024269',\n \t\t'sku' => '804879447856',\n \t\t'upc' => '811207024269',\n 'download_link' => '', \t\n \t\t'free_product_tier_id' => 0,\n \t\t'quantity' => 1,\n \t\t'hide_options_from_display_name' => 0,\n \t\t'customer_service_can_add' => 1, \t\t\n \t\t'enabled' => 1 \n ],\n 2 => [\n 'product_id' => 1,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Everything Seasoning - 3 Bottles',\n 'internal_sku' => '813327020398-3B',\n 'sku' => '804879447856-3B',\n 'upc' => '813327020398',\n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1 \n ],\n 3 => [\n 'product_id' => 2,\n 'variant_type' => 2,\n 'product_type_id' => 1,\n 'name' => 'Spicy Everything Seasoning',\n 'internal_sku' => '811207024320',\n 'sku' => '804879447863',\n 'upc' => '811207024320',\n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1 \n ],\n 4 => [\n 'product_id' => 2,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Spicy Everything Seasoning - 3 Bottles',\n 'internal_sku' => '813327020374-3B',\n 'sku' => '804879447863-3B',\n 'upc' => '813327020374',\n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1 \n ],\n 5 => [\n 'product_id' => 3,\n 'variant_type' => 2,\n 'product_type_id' => 1,\n 'name' => 'Garlic Lover\\'s Seasoning',\n 'internal_sku' => '811207024306',\n 'sku' => '804879389859',\n 'upc' => '811207024306', \n 'download_link' => '', \n 'free_product_tier_id' => 1,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1 \n ],\n 6 => [\n 'product_id' => 3,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Garlic Lover\\'s Seasoning - 3 Bottles',\n 'internal_sku' => '811207024306-3B',\n 'sku' => '804879389859-3B',\n 'upc' => '811207024306', \n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1 \n ],\n 7 => [\n 'product_id' => 4,\n 'variant_type' => 2,\n 'product_type_id' => 1,\n 'name' => 'Lemon & Garlic Seasoning',\n 'internal_sku' => '811207024283',\n 'sku' => '804879153375',\n 'upc' => '811207024283',\n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1,\n \n ],\n 8 => [\n 'product_id' => 4,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Lemon & Garlic Seasoning - 3 Bottles',\n 'internal_sku' => '811207024283-3B',\n 'sku' => '804879153375-3B',\n 'upc' => '811207024283',\n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1,\n \n ],\n 9 => [\n 'product_id' => 5,\n 'variant_type' => 2,\n 'product_type_id' => 1,\n 'name' => 'Chipotle Seasoning',\n 'internal_sku' => '811207026720',\n 'sku' => '811207026720', \n 'upc' => '811207026720', \n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1,\n 'enabled' => 1 \n ],\n 10 => [\n 'product_id' => 5,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Chipotle Seasoning - 3 Bottles',\n 'internal_sku' => '',\n 'sku' => '811207026720-3B', \n 'upc' => '811207026720',\n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 0,\n 'enabled' => 1 \n ],\n 11 => [\n 'product_id' => 6,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Pizza Seasoning',\n 'internal_sku' => '813327020299',\n 'sku' => '813327020299', \n 'upc' => '813327020299',\n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1,\n 'enabled' => 1 \n ],\n 12 => [\n 'product_id' => 6,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Pizza Seasoning - 3 Bottles',\n 'internal_sku' => '',\n 'sku' => '813327020299-3B', \n 'upc' => '813327020299',\n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1\n \n ],\n 13 => [\n 'product_id' => 6,\n 'variant_type' => 2,\n 'product_type_id' => 1,\n 'name' => 'Pizza Seasoning',\n 'internal_sku' => 'PZA',\n 'sku' => 'PZA', \n 'upc' => '813327020299',\n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 0, \n 'enabled' => 0\n \n ],\n 14 => [\n 'product_id' => 7,\n 'variant_type' => 4,\n 'product_type_id' => 4,\n 'name' => 'Flavor God Paleo Recipe Book',\n 'internal_sku' => '',\n 'sku' => 'FG-RECIPE01',\n 'upc' => '', \n 'download_link' => 'http://download.flavorgod.com/flavorpurchase/flavorgodpaleoandglutenfreerecipebook.pdf', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1\n \n ],\n 15 => [\n 'product_id' => 8,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Classic Combo Set',\n 'internal_sku' => '811207024245',\n 'sku' => 'COMBOPACK',\n 'upc' => '811207024245', \n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1\n \n ],\n 16 => [\n 'product_id' => 8,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Classic Combo Set w/ Flavor God Paleo Recipe Book',\n 'internal_sku' => '813327020244',\n 'sku' => 'FGCOMBOBOOK-1',\n 'upc' => '813327020244', \n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1\n \n ],\n 17 => [\n 'product_id' => 8,\n 'variant_type' => 3,\n 'product_type_id' => 5,\n 'name' => 'Classic Combo Set w/ Apron (Grey) - 50% OFF',\n 'internal_sku' => 'CLSCMB-GRAP-50',\n 'sku' => 'CLSCMB-GRAP-50',\n 'upc' => 'CLSCMB-GRAP-50', \n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 1, \n 'enabled' => 1\n \n ],\n 18 => [\n 'product_id' => 9,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Chipotle Combo Set',\n 'internal_sku' => '811207026713',\n 'sku' => 'COMBO-CHIP',\n 'upc' => '811207026713', \n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 0, \n 'enabled' => 0\n \n ],\n 19 => [\n 'product_id' => 9,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Chipotle Combo Set w/ Flavor God Paleo Recipe Book',\n 'internal_sku' => '811207026706',\n 'sku' => 'COMBO-CHIP-EB',\n 'upc' => '811207026706', \n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 0, \n 'enabled' => 0 \n ],\n 20 => [\n 'product_id' => 10,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Pizza Combo Set',\n 'internal_sku' => '813327020176',\n 'sku' => 'COMBO-PZA',\n 'upc' => '813327020176', \n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 0,\n 'customer_service_can_add' => 0, \n 'enabled' => 0 \n ],\n 21 => [\n 'product_id' => 10,\n 'variant_type' => 3,\n 'product_type_id' => 1,\n 'name' => 'Pizza Combo Set w/ Flavor God Paleo Recipe Book',\n 'internal_sku' => '813327020145',\n 'sku' => 'COMBO-PZA-EB',\n 'upc' => '813327020145', \n 'download_link' => '', \n 'free_product_tier_id' => 0,\n 'quantity' => 1,\n 'hide_options_from_display_name' => 1,\n 'customer_service_can_add' => 0, \n 'enabled' => 0 \n ]\n];\n \n foreach ($productVariants as $key => $value) {\n \\DB::insert('insert into product_variants(product_id, variant_type, product_type_id, name, internal_sku, sku,\n upc, download_link, free_product_tier_id, quantity, hide_options_from_display_name, customer_service_can_add, enabled)values(\n ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', [\n $value['product_id'], \n $value['variant_type'],\n $value['product_type_id'],\n $value['name'],\n $value['internal_sku'],\n $value['sku'],\n $value['upc'],\n $value['download_link'],\n $value['free_product_tier_id'],\n $value['quantity'],\n $value['hide_options_from_display_name'],\n $value['customer_service_can_add'], \n $value['enabled']\n ]);\n }\n }",
"public function get_full_width_product_variations($product_id, $lang_id)\n {\n $product_id = clean_number($product_id);\n $lang_id = clean_number($lang_id);\n $this->db->where('product_id', $product_id);\n $this->db->where('lang_id', $lang_id);\n $this->db->where('visible', 1);\n $this->db->group_start();\n $this->db->where('variation_type', 'checkbox');\n $this->db->or_where('variation_type', 'radio_button');\n $this->db->group_end();\n $query = $this->db->get('product_variations');\n return $query->result();\n }",
"public function product()\n {\n return array_product($this->data());\n }",
"public function run()\n {\n \\App\\Variation::create([\n \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i1.rozetka.ua/goods/4381047/adidas_4059323881564_images_4381047304.jpg\",\n \"product_id\" => 1,\n \"price\" => 2500,\n \"in_stock\" => 15\n ]);\n\n// \\App\\Variation::create([\n// \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i2.rozetka.ua/goods/1528038/nike_812654_001_11_5_images_1528038611.jpg\",\n// \"product_id\" => 1,\n// \"price\" => 2000,\n// \"in_stock\" => 8\n// ]);\n//\n// \\App\\Variation::create([\n// \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i2.rozetka.ua/goods/5032905/nike_886737447079_images_5032905456.jpg\",\n// \"product_id\" => 1,\n// \"price\" => 1300,\n// \"in_stock\" => 5\n// ]);\n\n \\App\\Variation::create([\n \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i1.rozetka.ua/goods/2286747/adidas_aq1625_4.5_images_2286747890.jpg\",\n \"product_id\" => 1,\n \"price\" => 1300,\n \"in_stock\" => 5\n ]);\n }",
"public static function getProductOptions()\n {\n return self::get('product') ?: [];\n }",
"function getAllProductVariantOptions(Request $request) {\n $collectionName = $request->query->get('collectionName');\n $arr = [];\n $em = $this->getDoctrine()->getManager();\n $products = [];\n if(strpos($collectionName, ';') !== false) {\n $collectionArray = explode(';', $collectionName);\n foreach ($collectionArray as $collectionName) {\n $collection = $em->getRepository('App:ProductTypes')->findOneBy(['name' => $collectionName]);\n $products[] = $em->getRepository('App:Products')->findBy(['type' => $collection]);\n }\n } else {\n $collection = $em->getRepository('App:ProductTypes')->findOneBy(['name' => $collectionName]);\n $products = $em->getRepository('App:Products')->findBy(['type' => $collection]);\n\n if (!$collection) {\n $brand = $em->getRepository('App:Brands')->findOneBy(['name' => $collectionName]);\n $products = $em->getRepository('App:Products')->findBy(['brand' => $brand]);\n }\n }\n\n $colorsArr = [];\n $sizeArr = [];\n $brandArr = [];\n\n foreach ($products as $product) {\n if(is_array($product)) {\n foreach ($product as $item) {\n if ($item->getSize()) {\n $sizeArr[] = $item->getSize()->getSize();\n }\n\n if($item->getColor()) {\n $colorsArr[] = $item->getColor()->getName();\n }\n\n if ($item->getBrand()) {\n $brandArr[] = $item->getBrand()->getName();\n }\n }\n } else {\n if ($product->getSize()) {\n $sizeArr[] = $product->getSize()->getSize();\n }\n\n if($product->getColor()) {\n $colorsArr[] = $product->getColor()->getName();\n }\n\n if ($product->getBrand()) {\n $brandArr[] = $product->getBrand()->getName();\n }\n }\n }\n\n $arr['colors'] = array_unique($colorsArr);\n $arr['sizes'] = array_unique($sizeArr);\n $arr['brands'] = array_unique($brandArr);\n\n return new JsonResponse($arr);\n }",
"public function variation()\n {\n return $this->belongsTo(ProductVariation::class);\n }",
"function generateVariationsFromAttributes(ProductAttributeType $attributetype, array $values){\r\n\r\n\t\t//TODO: introduce transactions here, in case objects get half made etc\r\n\r\n\t\t//if product has variation attribute types\r\n\t\tif(is_array($values)){\r\n\t\t\t//TODO: get values dataobject set\r\n\t\t\t$avalues = $attributetype->convertArrayToValues($values);\r\n\t\t\t$existingvariations = $this->owner->Variations();\r\n\t\t\tif($existingvariations->exists()){\r\n\t\t\t\t//delete old variation, and create new ones - to prevent modification of exising variations\r\n\t\t\t\tforeach($existingvariations as $oldvariation){\r\n\t\t\t\t\t$oldvalues = $oldvariation->AttributeValues();\r\n\t\t\t\t\tif($oldvalues) {\r\n\t\t\t\t\t\tforeach($avalues as $value){\r\n\t\t\t\t\t\t\t$newvariation = $oldvariation->duplicate();\r\n\t\t\t\t\t\t\t$newvariation->InternalItemID = $this->owner->InternalItemID.'-'.$newvariation->ID;\r\n\t\t\t\t\t\t\t$newvariation->AttributeValues()->addMany($oldvalues);\r\n\t\t\t\t\t\t\t$newvariation->AttributeValues()->add($value);\r\n\t\t\t\t\t\t\t$newvariation->write();\r\n\t\t\t\t\t\t\t$existingvariations->add($newvariation);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$existingvariations->remove($oldvariation);\r\n\t\t\t\t\t$oldvariation->AttributeValues()->removeAll();\r\n\t\t\t\t\t$oldvariation->delete();\r\n\t\t\t\t\t$oldvariation->destroy();\r\n\t\t\t\t\t//TODO: check that old variations actually stick around, as they will be needed for past orders etc\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif($avalues) {\r\n\t\t\t\t\tforeach($avalues as $value){\r\n\t\t\t\t\t\t$variation = new ProductVariation();\r\n\t\t\t\t\t\t$variation->ProductID = $this->owner->ID;\r\n\t\t\t\t\t\t$variation->Price = $this->owner->Price;\r\n\t\t\t\t\t\t$variation->write();\r\n\t\t\t\t\t\t$variation->InternalItemID = $this->owner->InternalItemID.'-'.$variation->ID;\r\n\t\t\t\t\t\t$variation->AttributeValues()->add($value); //TODO: find or create actual value\r\n\t\t\t\t\t\t$variation->write();\r\n\t\t\t\t\t\t$existingvariations->add($variation);\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}",
"protected function getProductVariants(Product $product, $attributes)\n {\n $variants = [];\n\n if ($product->getVariants()->count() > 0) {\n $variantAttrIds = array_map(function ($v) {\n return $v->getAttribute()->getId();\n }, $product->getVariants()->first()->getValues());\n\n $commonAttrs = array_filter($attributes, function ($attr) use ($variantAttrIds) {\n return !in_array($attr['id'], $variantAttrIds);\n });\n\n /** @var ProductVariant $variant */\n foreach ($product->getVariants() as $variant) {\n if ($variant->isOutOfStock()) {\n continue;\n }\n\n $variantData = [\n 'id' => $variant->getId(),\n 'price' => $variant->getDisplayPrice(),\n 'attributes' => [],\n ];\n\n /** @var AttributeValueSelect $value */\n foreach ($variant->getValues() as $value) {\n /** @var Attribute $attribute */\n $attribute = $value->getAttribute();\n\n $variantData['attributes'][] = [\n 'id' => $attribute->getId(),\n 'name' => htmlspecialchars_decode($attribute->getName()),\n 'values' => [(string) $value->asString()],\n ];\n }\n\n $variantData['attributes'] = array_merge($variantData['attributes'], $commonAttrs);\n\n $variants[] = $variantData;\n }\n\n if (empty($variants)) {\n // Return a fake variant if all existing variants are out of stock to allow filtering on regular (non-variant) attributes. This keeps behavior consistent with regular products.\n\n return parent::getProductVariants($product, $commonAttrs);\n }\n\n } else {\n return parent::getProductVariants($product, $attributes);\n }\n\n return $variants;\n }",
"public function get_half_width_product_variations($product_id, $lang_id)\n {\n $product_id = clean_number($product_id);\n $lang_id = clean_number($lang_id);\n $this->db->where('product_id', $product_id);\n $this->db->where('lang_id', $lang_id);\n $this->db->where('visible', 1);\n $this->db->group_start();\n $this->db->where('variation_type', 'text');\n $this->db->or_where('variation_type', 'number');\n $this->db->or_where('variation_type', 'dropdown');\n $this->db->group_end();\n $query = $this->db->get('product_variations');\n return $query->result();\n }",
"public function index()\n {\n $products=Productvariation::where(['deleted'=>0])->paginate(5);\n return view('productvariations',compact('products'))->with('no', 1);\n }",
"function elex_bep_create_product_variation( $product_id, $variation_data ) {\n //Get varaible product object parent\n $product = wc_get_product( $product_id );\n //\n $variation_post = array(\n 'post_title' => $product->get_name(),\n 'post_name' => 'product-'.$product_id.'-varation',\n 'post_status' => 'publish',\n 'post_parent' => $product_id,\n 'post_type' => 'product_variation',\n 'guid' => $product->get_permalink()\n );\n\n $variation_id = wp_insert_post( $variation_post );\n $variation = new WC_Product_Variation( $variation_id );\n error_log( $variation_id );\n\n foreach ($variation_data['attributes'] as $attribute => $term_names )\n {\n $taxonomy = 'pa_'.$attribute; // The attribute taxonomy\n\n // If taxonomy doesn't exists we create it (Thanks to Carl F. Corneil)\n if( ! taxonomy_exists( $taxonomy ) ){ \n register_taxonomy(\n $taxonomy, 'product_variation',\n array(\n 'hierarchical' => false,\n 'label' => ucfirst( $attribute ),\n 'query_var' => true,\n 'rewrite' => array( 'slug' => sanitize_title($attribute) ), // The base slug\n )\n );\n }\n foreach( $term_names as $key=> $term_name ){\n error_log( $key. ' '. $term_name );\n // Check if the Term name exist and if not we create it.\n if( ! term_exists( $term_name, $taxonomy ) ){\n wp_insert_term( $term_name, $taxonomy ); // Create the term\n }\n $term_slug = get_term_by('name', $term_name, $taxonomy )->slug; // Get the term slug\n error_log( print_r($term_slug, TRUE ));\n\n // // Get the post Terms names from the parent variable product.\n $post_term_names = wp_get_post_terms( $product_id, $taxonomy, array('fields' => 'names') );\n\n // // Check if the post term exist and if not we set it in the parent variable product.\n if( ! in_array( $term_name, $post_term_names ) )\n wp_set_post_terms( $product_id, $term_name, $taxonomy, true );\n\n // // Set/save the attribute data in the product variation\n update_post_meta( $variation_id, 'attribute_'.$taxonomy, $term_slug );\n }\n }\n if( ! empty( $variation_data['sku'] ) )\n $variation->set_sku( $variation_data['sku'] );\n\n // Prices\n if( empty( $variation_data['sale_price'] ) ){\n $variation->set_price( $variation_data['regular_price'] );\n } else {\n $variation->set_price( $variation_data['sale_price'] );\n $variation->set_sale_price( $variation_data['sale_price'] );\n }\n $variation->set_regular_price( $variation_data['regular_price'] );\n\n // Stock\n if( ! empty($variation_data['stock_qty']) ){\n $variation->set_stock_quantity( $variation_data['stock_qty'] );\n $variation->set_manage_stock(true);\n $variation->set_stock_status('');\n } else {\n $variation->set_manage_stock(false);\n }\n $variation->set_weight(''); // weight (reseting)\n error_log( print_r( $variation, TRUE ));\n $variation->save(); \n}",
"public function getSimilarProducts()\n {\n return $this->similar_products;\n }",
"public function products()\n {\n return $this->belongsToMany('App\\models\\Product', 'product_variants');\n }",
"function get_variant_options($id_product, $variant_options=array())\n{\n\tglobal $mysqli, $id_cart_discount;\n\t\n\t$output='';\n\t\n\t$groups=get_variant_groups($id_product);\n\t\n\t// build sql \n\t// get all groups for this product\n\tif (sizeof($groups)) {\t\t\n\t\tend($groups); \n\t\t$id_product_variant_group = key($groups); \n\t\n\t\tif (isset($variant_options[$id_product_variant_group]) && $variant_options[$id_product_variant_group]) return false;\n\t\n\t\t$joins = array();\t\n\t\t$where = array();\t\t\n\t\t$group_by = array();\t\n\t\t\n\t\t$i=1;\n\t\tforeach ($groups as $id_product_variant_group => $row_group) {\t\n\t\t\t$where_str = array();\n\t\t\t\n\t\t\t$joins[] = 'INNER JOIN\n\t\t\t(product_variant_option AS pvo'.$i.' CROSS JOIN product_variant_group_option AS pvgo'.$i.' CROSS JOIN product_variant_group_option_description AS pvo'.$i.'_desc)\n\t\t\tON\n\t\t\t(product_variant.id = pvo'.$i.'.id_product_variant AND pvo'.$i.'.id_product_variant_group_option = pvgo'.$i.'.id AND pvgo'.$i.'.id = pvo'.$i.'_desc.id_product_variant_group_option AND pvo'.$i.'_desc.language_code = \"'.$mysqli->escape_string($_SESSION['customer']['language']).'\")';\n\t\t\n\t\t\t$where_str[] = 'pvo'.$i.'.id_product_variant_group = \"'.$mysqli->escape_string($id_product_variant_group).'\"';\n\t\t\t\n\t\t\t$stop=0;\n\t\t\tif (isset($variant_options[$id_product_variant_group]) && $variant_options[$id_product_variant_group]) {\n\t\t\t\t$id_product_variant_group_option = $variant_options[$id_product_variant_group];\n\t\t\t\t\n\t\t\t\t$where_str[] = 'pvo'.$i.'.id_product_variant_group_option = \"'.$mysqli->escape_string($id_product_variant_group_option).'\"';\n\t\t\t} else { \n\t\t\t\t$stop=1;\n\t\t\t}\n\t\t\t\n\t\t\tif ($id_cart_discount) {\n\t\t\t\t$joins[] = 'LEFT JOIN\n\t\t\t\t(rebate_coupon_product AS rcp'.$i.' CROSS JOIN rebate_coupon AS rcpr'.$i.' CROSS JOIN cart_discount AS rcd'.$i.') \n\t\t\t\tON\n\t\t\t\t(product_variant.id_product = rcp'.$i.'.id_product AND rcp'.$i.'.id_rebate_coupon = rcpr'.$i.'.id ANd rcpr'.$i.'.id = rcd'.$i.'.id_rebate_coupon AND rcd'.$i.'.id = \"'.$mysqli->escape_string($id_cart_discount).'\")';\n\t\t\t\t\n\t\t\t\t$joins[] = 'LEFT JOIN\n\t\t\t\t(product_category AS pc'.$i.' CROSS JOIN rebate_coupon_category AS rcc'.$i.' CROSS JOIN rebate_coupon AS rccr'.$i.' CROSS JOIN cart_discount AS rccd'.$i.') \n\t\t\t\tON\n\t\t\t\t(product_variant.id_product = pc'.$i.'.id_product AND pc'.$i.'.id_category = rcc'.$i.'.id_category AND rcc'.$i.'.id_rebate_coupon = rccr'.$i.'.id ANd rccr'.$i.'.id = rcd'.$i.'.id_rebate_coupon AND rcd'.$i.'.id = \"'.$mysqli->escape_string($id_cart_discount).'\")';\n\t\t\t\t\n\t\t\t\t$where_str[] = '(rcp'.$i.'.id_rebate_coupon IS NOT NULL OR rcc'.$i.'.id_rebate_coupon IS NOT NULL)';\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t$select = 'pvo'.$i.'.id_product_variant_group_option,\n\t\t\tpvo'.$i.'.id_product_variant_group,\n\t\t\tpvo'.$i.'_desc.name,\n\t\t\tpvgo'.$i.'.swatch_type,\n\t\t\tpvgo'.$i.'.color,\n\t\t\tpvgo'.$i.'.color2,\n\t\t\tpvgo'.$i.'.color3,\n\t\t\tpvgo'.$i.'.filename';\n\t\t\t\n\t\t\t$where[] = implode(' AND ',$where_str);\n\t\t\t\n\t\t\t$group_by[] = 'pvo'.$i.'.id_product_variant_group_option';\n\t\t\t\n\t\t\t$order_by = 'pvgo'.$i.'.sort_order ASC';\n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\tif ($stop) break;\n\t\t}\n\t\t\n\t\t$joins = implode(\"\\r\\n\",$joins);\n\t\t$where = implode(' AND ',$where);\n\t\t$group_by = implode(',',$group_by);\n\t\t\t\t\t\n\t\tif ($result_options = $mysqli->query('SELECT\n\t\t'.$select.'\n\t\tFROM\t\t\n\t\tproduct_variant\n\t\t\n\t\t'.$joins.'\n\t\t\n\t\tWHERE\n\t\tproduct_variant.active = 1 \n\t\tAND\n\t\tproduct_variant.id_product = \"'.$mysqli->escape_string($id_product).'\"\n\t\tAND\n\t\t'.$where.'\n\t\tGROUP BY '.\n\t\t$group_by.'\n\t\tORDER BY '.\n\t\t$order_by)) {\t\t\t\n\t\t\tif ($result_options->num_rows) {\n\t\t\t\t$input_type = $groups[$id_product_variant_group]['input_type'];\n\t\n\t\t\t\t$output .= '<div style=\"margin-top:10px; margin-bottom:10px;\" id=\"variant_group_'.$id_product_variant_group.'\">\n\t\t\t\t<div style=\"margin-bottom:5px;\"><strong>'.$groups[$id_product_variant_group]['name'].'</strong></div>';\n\t\n\t\t\t\tif (!$input_type) {\n\t\t\t\t\t$output .= '<select name=\"variant_options['.$id_product_variant_group.']\">\n\t\t\t\t\t<option value=\"0\">--</option>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$i=0;\n\t\t\t\twhile ($row_option = $result_options->fetch_assoc()) {\n\t\t\t\t\t$id_product_variant_group_option = $row_option['id_product_variant_group_option'];\n\t\t\t\t\t\n\t\t\t\t\tswitch ($input_type) {\n\t\t\t\t\t\t// dropdown\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t$output .= '<option value=\"'.$id_product_variant_group_option.'\">'.$row_option['name'].'</option>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// radio\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t$output .= '<div><input type=\"radio\" name=\"variant_options['.$id_product_variant_group.']\" id=\"product_variant_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" value=\"'.$id_product_variant_group_option.'\"> <label for=\"product_variant_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\">'.$row_option['name'].'</label></div>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// swatch\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t$swatch_type = $row_option['swatch_type'];\n\t\t\t\t\t\t\t$color = $row_option['color'];\n\t\t\t\t\t\t\t$color2 = $row_option['color2'];\n\t\t\t\t\t\t\t$color3 = $row_option['color3'];\n\t\t\t\t\t\t\t$filename = $row_option['filename'];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($i==8) { $output .= '<div class=\"cb\"></div>'; $i=0; }\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tswitch ($swatch_type) {\n\t\t\t\t\t\t\t\t// 1 color\n\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border\"><input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" /><div class=\"variant_color_inner_border\"><div style=\"background-color: '.$color.';\" class=\"variant_color\"></div></div></a>';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t// 2 color\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border\">\n\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" />\n\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\n\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:10px; height:20px; background-color: '.$color.';\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:10px; height:20px; background-color: '.$color2.';\"></div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"cb\"></div>\n\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t// 3 color\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border\">\n\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" />\t\n\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:7px; height:20px; background-color: '.$color.';\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:6px; height:20px; background-color: '.$color2.';\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:7px; height:20px; background-color: '.$color3.';\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"cb\"></div>\n\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t// file\n\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border\">\n\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" />\t\n\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\t\t\n\t\t\t\t\t\t\t\t\t<img src=\"/images/products/swatch/'.$filename.'\" width=\"20\" height=\"20\" border=\"0\" hspace=\"0\" vspace=\"0\" />\n\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t++$i;\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tswitch ($input_type) {\n\t\t\t\t\t// dropdown\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\t$output .= '</select>\n\t\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\t/* <![CDATA[ */\n\t\n\t\n\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\tjQuery(\"select[name=\\'variant_options['.$id_product_variant_group.']\\']\").change(function(){\n\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(this).val());\n\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* ]]> */\n\t\t\t\t\t\t</script>';\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// radio\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t$output .= '<script type=\"text/javascript\">\n\t\t\t\t\t\t/* <![CDATA[ */\n\t\n\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\tjQuery(\"input[name=\\'variant_options['.$id_product_variant_group.']\\']\").change(function(){\n\t\n\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(this).val());\n\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t\t/* ]]> */\n\t\t\t\t\t\t</script>';\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// swatch\n\t\t\t\t\tcase 2:\t\t\t\t\n\t\t\t\t\t\t$output .= '<script type=\"text/javascript\">\n\t\t\t\t\t\t/* <![CDATA[ */\n\t\n\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\tjQuery(\"a.variant_color_outer_border\").click(function(){\n\t\t\t\t\t\t\t\tif (!jQuery(\"input[id^=\\'variant_color_\\']:checked\",this).length) { \n\t\t\t\t\t\t\t\t\tjQuery(\"input[id^=\\'variant_color_\\']\",this).attr(\"checked\",true);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tjQuery(\"a.variant_color_outer_border\").removeClass(\"selected\");\n\t\t\t\t\t\t\t\t\tjQuery(this).addClass(\"selected\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(\"input[id^=\\'variant_color_\\']\",this).val());\n\t\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t\t/* ]]> */\n\t\t\t\t\t\t</script>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$output .= '<div class=\"cb\"></div></div>';\n\t\t\t} else {\n\t\t\t\t$output .= 'No options found.';\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Exception('An error occured while trying to get variant group options.'.\"\\r\\n\\r\\n\".$mysqli->error);\t\t\n\t\t}\n\t}\n\t\n\treturn $output;\n}",
"public static function getProductsOptions()\n {\n return self::get('products') ?: [];\n }",
"function HTMLVariationValues($name=null, $results, $product, $product_variations, $product_variation_values, $variation_values) {\n //エラー判定\n if (isset($results)) {\n $err_price = $results->errors['price'];\n $err_stock = $results->errors['stock'];\n }\n\n if (is_array($product_variations)) {\n //選択済み規格でループ\n foreach ($product_variations as $key=>$val) {\n if (is_array($variation_values[$key])) {\n //規格詳細でループ\n foreach ($variation_values[$key] as $k=>$v) {\n //自身を抹消(再帰用)\n unset($product_variations[$key]);\n //配列がなくなった(出力処理)\n if (count($product_variations)==0) {\n $name_td = '';\n $id = '';\n //規格1つの場合\n if (count($name)==0) {\n $name_td = '<td class=\"wd200\">' . $v['name'] . '</td>';\n }\n //規格組合せの場合\n else {\n //規格詳細を連結\n $nm = '';\n foreach ($name as $n) {\n if ($nm=='') {\n $id = $n['id'];\n $nm = $n['name'];\n }\n else {\n $id = $id . '_' . $n['id'];\n $nm = $nm . ', ' . $n['name'];\n }\n }\n $name_td = '<td class=\"wd200\">' . $nm . ', ' . $v['name'] . '</td>';\n }\n //IDを作成する\n if ($id=='') {\n $id = $v['id'];\n }\n else {\n $id = $id . '_' . $v['id'];\n }\n $check_val = array();\n $check_val['type'] = 'checkbox';\n $check_val['id'] = 'values_visible['.$id.']';\n $check_val['value'] = $id;\n if (!isset($product_variation_values[$id])) {\n $check_val['checked'] = '\"checked\"';\n }\n else if (isset($product_variation_values[$id]['visible']) && $product_variation_values[$id]['visible']=='1') {\n $check_val['checked'] = '\"checked\"';\n }\n $price = $product['price'];\n $stock = 0;\n if (isset($product_variation_values[$id])) {\n $price = $product_variation_values[$id]['price'];\n $stock = $product_variation_values[$id]['stock'];\n }\n echo '<div style=\"display:none;\">';\n echo SimpleCartFunctions::HTMLInput($check_val);\n echo '</div>';\n echo '<tr>';\n echo $name_td;\n if ($product['stock_manage']=='1') {\n echo '<td>' . SimpleCartFunctions::HTMLInput(array('id'=>'values_stock['.$id.']', 'value'=>$stock, 'class'=>'input_80')) . SimpleCartFunctions::HTMLError($err_stock[$id]) . '</td>';\n }\n echo '<td>' . SimpleCartFunctions::HTMLInput(array('id'=>'values_price['.$id.']', 'value'=>$price, 'class'=>'input_80')) . SimpleCartFunctions::HTMLError($err_price[$id]) . '</td>';\n echo SimpleCartFunctions::HTMLInput(array('type'=>'hidden', 'id'=>'values_ids['.$id.']', 'value'=>$id, 'class'=>'input_40'));\n echo '</tr>';\n }\n //配列がまだある(再帰するぜ)\n else {\n if (is_null($name)) {\n $name = array();\n $name[$key]['id'] = $v['id'];\n $name[$key]['name'] = $v['name'];\n }\n else {\n $name[$key]['id'] = $v['id'];\n $name[$key]['name'] = $v['name'];\n }\n SimpleCartFunctions::HTMLVariationValues($name, $results, $product, $product_variations, $product_variation_values, $variation_values);\n }\n }\n }\n return;\n }\n }\n }",
"public function products()\n {\n return $this->morphedByMany(Product::class, 'categorables');\n }",
"public function getProductSelections();",
"public function products()\n {\n return $this->morphedByMany(Product::class, 'bundleable');\n }",
"public function getCheckoutProducts()\r\n\t{\r\n\t\t$products = array();\r\n\t\t\r\n\t\tforeach (Mage::getSingleton('checkout/session')->getQuote()->getAllVisibleItems() as $item)\r\n\t\t{\r\n\t\t\t$args = $this->getDefaultProductIdentifiers($item);\r\n\t\t\t\r\n\t\t\t$variant = array();\r\n\t\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Handle configurable products\r\n\t\t\t */\r\n\t\t\tif ($item->getProduct()->isConfigurable())\r\n\t\t\t{\r\n\t\t\t\t$parent = Mage::getModel('catalog/product')->load\r\n\t\t\t\t(\r\n\t\t\t\t\t$item->getProductId()\r\n\t\t\t\t);\r\n\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t * Swap configurable data\r\n\t\t\t\t * \r\n\t\t\t\t * @var stdClass\r\n\t\t\t\t */\r\n\t\t\t\t$args = $this->getConfigurableProductIdentifiers($args, $parent);\r\n\t\t\t\t\r\n\t\t\t\tif ($item instanceof Mage_Sales_Model_Quote_Item)\r\n\t\t\t\t{\r\n\t\t\t\t\t$request = new Varien_Object(unserialize($item->getOptionByCode('info_buyRequest')->getValue()));\r\n\t\t\t\t}\r\n\t\t\t\telse if ($item instanceof Mage_Sales_Model_Order_Item)\r\n\t\t\t\t{\r\n\t\t\t\t\t$request = new Varien_Object($item->getProductOptions());\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t$options = $request->getData();\r\n\t\t\t\r\n\t\t\t\tif (isset($options['super_attribute']) && is_array($options['super_attribute']))\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach ($options['super_attribute'] as $id => $option)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$attribute = Mage::getModel('catalog/resource_eav_attribute')->load($id);\r\n\t\t\t\r\n\t\t\t\t\t\tif ($attribute->usesSource())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$variant[] = join(':', array\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t$this->jsQuoteEscape($attribute->getFrontendLabel()),\r\n\t\t\t\t\t\t\t\t$this->jsQuoteEscape($attribute->getSource()->getOptionText($option))\r\n\t\t\t\t\t\t\t));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Handle products with custom options\r\n\t\t\t */\r\n\t\t\tif (1 === (int) $item->getProduct()->getHasOptions())\r\n\t\t\t{\r\n\t\t\t\tif ($item instanceof Mage_Sales_Model_Quote_Item)\r\n\t\t\t\t{\r\n\t\t\t\t\t$request = new Varien_Object(unserialize($item->getOptionByCode('info_buyRequest')->getValue()));\r\n\t\t\t\t}\r\n\t\t\t\telse if ($item instanceof Mage_Sales_Model_Order_Item)\r\n\t\t\t\t{\r\n\t\t\t\t\t$request = new Varien_Object($item->getProductOptions());\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tif ((int) $request->getProduct() > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$parent = Mage::getModel('catalog/product')->load\r\n\t\t\t\t\t(\r\n\t\t\t\t\t\t$request->getProduct()\r\n\t\t\t\t\t);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ($this->useConfigurableParent())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$args->id \t= $parent->getSku();\t\t\t\t\t\r\n\t\t\t\t\t\t$args->name = $parent->getName();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * Get field to use for variants\r\n\t\t\t\t\t *\r\n\t\t\t\t\t * @var string\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t$field = Mage::helper('ec')->getOptionUseField();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tforeach ($parent->getProductOptionsCollection() as $option)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$data = $parent->getOptionById($option['option_id']);\r\n\t\t\t\r\n\t\t\t\t\t\tswitch($data->getType())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase 'drop_down':\r\n\t\t\t\t\t\t\t\tforeach ($data->getValues() as $value)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$options[] = array\r\n\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t'id' \t=> $value->getOptionTypeId(),\r\n\t\t\t\t\t\t\t\t\t\t'value' => $value->getData($field),\r\n\t\t\t\t\t\t\t\t\t\t'title' => $data->getTitle()\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'field':\r\n\t\t\t\t\t\t\t\t$options[] = array\r\n\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t'value' => (string) $data->getData($field)\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ($request->getOptions() && is_array($request->getOptions()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tforeach ($options as $option)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tforeach ($request->getOptions() as $current)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif (is_array($option) && isset($option['id']) && (int) $current === (int) $option['id'])\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$variant[] = join(':',array\r\n\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t$this->jsQuoteEscape($option['title']),\r\n\t\t\t\t\t\t\t\t\t\t$this->jsQuoteEscape($option['value'])\r\n\t\t\t\t\t\t\t\t\t));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$category = $this->getCategory\r\n\t\t\t(\r\n\t\t\t\tMage::helper('ec/session')->getTrace()->get($item->getProduct())\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$data = (object) array\r\n\t\t\t(\r\n\t\t\t\t'id' \t\t=> $this->jsQuoteEscape($args->id),\r\n\t\t\t\t'name' \t\t=> $this->jsQuoteEscape($args->name),\r\n\t\t\t\t'category' \t=> $this->jsQuoteEscape($category),\r\n\t\t\t\t'brand' \t=> $this->jsQuoteEscape($this->getBrandBySku($args->id)),\r\n\t\t\t\t'price' \t=> Mage::helper('ec/price')->getPrice($item->getProduct()),\r\n\t\t\t\t'quantity' \t=> $item->getQty(),\r\n\t\t\t\t'variant' \t=> join('-', $variant),\r\n\t\t\t\t'coupon'\t=> ''\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$products[] = $data;\r\n\t\t}\r\n\t\t\r\n\t\treturn $products;\r\n\t}",
"private function get_convention_product_ids() : array {\n\t\t$all_convention_ids = get_transient( 'ghc-all-convention-variation-ids' );\n\t\tif ( false === $all_convention_ids ) {\n\t\t\t$all_convention_ids = $this->set_convention_variation_ids_transient();\n\t\t}\n\n\t\treturn $all_convention_ids;\n\t}",
"public static function getProductColorVariations($productID) {\n Db_Actions::DbSelect(\"SELECT * FROM cscart_product_color_variations WHERE product_id=$productID ORDER BY id DESC\");\n $data = Db_Actions::DbGetResults();\n if (!isset($data->empty_result)) {\n $counter = 1;\n $product_data = array();\n foreach ($data as $product) {\n if ($counter <= 3) {\n\n $product_data[] = array('product_id' => $product->color_product_id,\n 'product_name' => self::getProductName($product->color_product_id),\n 'product_image_url' => $root_url . self::getProductImage($product->color_product_id),\n 'product_price' => self::getProductPrice($product->color_product_id),\n 'category_dress_type_id' => self::getCategoryDressTypeID($product->color_product_id),\n 'subcategory_dress_type_id' => self::getSubCategoryDressTypeID($product->color_product_id),\n 'color' => $product->color_variation\n );\n }\n $counter++;\n }\n\n foreach ($product_data as $variation) {\n ?><a href=\"#\" class=\"cs-varr <?php echo $variation['color'] ?>\" product_id=\"<?php echo $variation['product_id'] ?>\" product_title=\"<?php echo $variation['product_name'] ?>\" product_price=\"<?php echo $variation['product_price'] ?>\" category_dress_type_id=\"<?php echo $variation['category_dress_type_id'] ?>\" subcategory_dress_type_id=\"<?php echo $variation['subcategory_dress_type_id'] ?>\" img_url=\"<?php echo $variation['product_image_url'] ?>\" ><img src=\"img/product-images/variation-<?php echo $variation['color'] ?>.png\" width=\"14\" height=\"13\" /></a><?php\n }\n }\n }",
"public function variants()\n {\n return $this->hasMany(self::class, 'parent_id');\n }",
"public function variants()\n {\n return $this->hasMany(self::class, 'parent_id');\n }",
"private function getProducts(): array\n {\n return $this->_type === 'price'\n ? $this->_priceProducts\n : $this->_stockProducts;\n }",
"function fn_look_through_variants($product_id, $amount, $options, $variants)\n{\n\t\n\n\t$position = 0;\n\t$hashes = array();\n\t$combinations = fn_get_options_combinations($options, $variants);\n\n\tif (!empty($combinations)) {\n\t\tforeach ($combinations as $combination) {\n\n\t\t\t$_data = array();\n\t\t\t$_data['product_id'] = $product_id;\n\n\t\t\t$_data['combination_hash'] = fn_generate_cart_id($product_id, array('product_options' => $combination));\n\n\t\t\tif (array_search($_data['combination_hash'], $hashes) === false) {\n\t\t\t\t$hashes[] = $_data['combination_hash'];\n\t\t\t\t$_data['combination'] = fn_get_options_combination($combination);\n\t\t\t\t$_data['position'] = $position++;\n\n\t\t\t\t$old_data = db_get_row(\n\t\t\t\t\t\"SELECT combination_hash, amount, product_code \"\n\t\t\t\t\t. \"FROM ?:product_options_inventory \"\n\t\t\t\t\t. \"WHERE product_id = ?i AND combination_hash = ?i AND temp = 'Y'\", \n\t\t\t\t\t$product_id, $_data['combination_hash']\n\t\t\t\t);\n\n\t\t\t\t$_data['amount'] = isset($old_data['amount']) ? $old_data['amount'] : $amount;\n\t\t\t\t$_data['product_code'] = isset($old_data['product_code']) ? $old_data['product_code'] : '';\n\n\t\t\t\tdb_query(\"REPLACE INTO ?:product_options_inventory ?e\", $_data);\n\t\t\t\t$combinations[] = $combination;\n\t\t\t}\n\t\t\techo str_repeat('. ', count($combination));\n\t\t}\n\t}\n\t\n\t\n\n\treturn $combinations;\n}",
"public static function get_product_variants($product_db, &$results)\n {\n $product = $product_db->get_metadata();\n\n // Get a dictionary of images (will be necessary for mapping variant images\n $images = array_combine(array_column($product['images'], 'id'), $product['images']);\n $default_image = $product['image'];\n $vendor = $product['vendor'];\n $name = $product['title'];\n\n // Flatten all variants as if they were individual products\n foreach ($product['variants'] as $variant) {\n $variant_id = $variant['id'];\n $variant_name = $variant['title'];\n $price = $variant['price'];\n if (!is_null($variant['image_id']))\n $image = $images[$variant['image_id']]['src'];\n else\n $image = $default_image['src'];\n\n $metadata = [\n 'id' => $product['id'],\n 'product_id' => $product['id'],\n 'variant_id' => $variant_id,\n 'vendor' => $vendor,\n 'name' => $name,\n 'variant_name' => $variant_name,\n 'price' => $price,\n 'image' => $image\n ];\n\n self::get_product_variant_from_db($product_db, $product['id'], $variant_id, $metadata, $image, $price);\n\n $results[] = $metadata;\n }\n }",
"public static function getVariants($_pID) {\n global $lC_Database, $lC_Language;\n \n $Qvariant = $lC_Database->query('select pvg.id as group_id, pvg.title as group_title, pvg.module, pvv.id as value_id, pvv.title as value_title from :table_products_variants pv, :table_products_variants_values pvv, :table_products_variants_groups pvg where pv.products_id = :products_id and pv.products_variants_values_id = pvv.id and pvv.languages_id = :languages_id and pvv.products_variants_groups_id = pvg.id and pvg.languages_id = :languages_id');\n $Qvariant->bindTable(':table_products_variants', TABLE_PRODUCTS_VARIANTS);\n $Qvariant->bindTable(':table_products_variants_values', TABLE_PRODUCTS_VARIANTS_VALUES);\n $Qvariant->bindTable(':table_products_variants_groups', TABLE_PRODUCTS_VARIANTS_GROUPS);\n $Qvariant->bindInt(':products_id', $_pID);\n $Qvariant->bindInt(':languages_id', $lC_Language->getID());\n $Qvariant->bindInt(':languages_id', $lC_Language->getID());\n $Qvariant->execute();\n \n if ( $Qvariant->numberOfRows() > 0 ) {\n while ( $Qvariant->next() ) {\n $variants_array[] = array('group_id' => $Qvariant->valueInt('group_id'),\n 'value_id' => $Qvariant->valueInt('value_id'),\n 'group_title' => $Qvariant->value('group_title'),\n 'value_title' => $Qvariant->value('value_title'));\n }\n }\n \n $vArray = $variants_array;\n\n $Qvariant->freeResult();\n \n return $vArray;\n }",
"public function variants()\n {\n return view('variants');\n }",
"public function get_variation_attributes() {\n\t\treturn $this->variation_data; // @todo: This returns blank if its set to catch all, how would we deal with that?\n\t}",
"function getProductVariations( $post_id ) {\n\n // update cache if required\n if ( $this->last_product_var_id != $post_id ) {\n $this->last_product_variations = WPLA_ProductWrapper::getVariations( $post_id );\n $this->last_product_var_id = $post_id;\n }\n\n return $this->last_product_variations;\n }",
"public function getProducts() {\n\t\t$baseUrl = 'https://'.$this->apiKey.':'.$this->password.'@'.$this->domain.'.myshopify.com';\n\t\t$request = '/admin/products.json';\n\t\t$method = 'GET';\n\n\t\t$result = $this->curl($baseUrl.$request, $method);\n\n\t\t$products = array();\n\t\tforeach($result->products as $shopify) {\n\t\t\tforeach($shopify->variants as $variant) {\n\t\t\t\t// need to make a class Product in this folder?\n\t\t\t\t$product = new stdClass;\n\t\t\t\t$product->id \t\t= $shopify->id;\n\t\t\t\t$product->sku \t\t= $variant->sku;\n\t\t\t\t$product->name \t\t= $shopify->title;\n\t\t\t\t$product->price \t= $variant->price;\n\t\t\t\t$product->quantity \t= $variant->inventory_quantity;\t\n\t\t\t\tarray_push($products, $product);\n\t\t\t}\n\t\t}\n\n\t\treturn $products;\n\t}",
"function display_equalprice_variable_pro( $available_variations, \\WC_Product_Variable $variable, \\WC_Product_Variation $variation ) {\n if ( empty( $available_variations['price_html'] ) ) {\n $available_variations['price_html'] = '<p class=\"price\">' . $variation->get_price_html() . '</p>';\n }\n return $available_variations;\n}",
"public function product() {\n\t\treturn array_product($this->_value);\n\t}",
"public static function getAll() {\n $result = lC_Product_variants_Admin::getAll();\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n\n echo json_encode($result);\n }",
"function get_variant_options_selected($id_product, $variant_options=array())\n{\n\tglobal $mysqli, $id_cart_discount;\n\t\t\n\t$output='';\n\t\t\n\t$groups=get_variant_groups($id_product);\n\t\n\t// build sql \n\t// get all groups for this product\n\tif (sizeof($groups)) {\t\n\t\t$id_product_variant_group = key($groups);\n\t\t\n\t\t$stop = 0;\n\t\t$i=1;\n\t\tforeach ($groups as $id_product_variant_group => $row_group) {\t\t\t\n\t\t\t$joins = array();\t\n\t\t\t$where = array();\t\t\n\t\t\t$group_by = array();\t\n\t\t\t\n\t\t\t$i=1;\n\t\t\tforeach ($groups as $id_product_variant_group2 => $row_group2) {\t\n\t\t\t\t$where_str = array();\n\t\t\t\t\n\t\t\t\t$joins[] = 'INNER JOIN\n\t\t\t\t(product_variant_option AS pvo'.$i.' CROSS JOIN product_variant_group_option AS pvgo'.$i.' CROSS JOIN product_variant_group_option_description AS pvo'.$i.'_desc)\n\t\t\t\tON\n\t\t\t\t(product_variant.id = pvo'.$i.'.id_product_variant AND pvo'.$i.'.id_product_variant_group_option = pvgo'.$i.'.id AND pvgo'.$i.'.id = pvo'.$i.'_desc.id_product_variant_group_option AND pvo'.$i.'_desc.language_code = \"'.$mysqli->escape_string($_SESSION['customer']['language']).'\")';\n\t\t\t\n\t\t\t\t$where_str[] = 'pvo'.$i.'.id_product_variant_group = \"'.$mysqli->escape_string($id_product_variant_group2).'\"';\n\t\t\t\t\n\t\t\t\t$stop=0;\n\t\t\t\tif ($id_product_variant_group != $id_product_variant_group2 && isset($variant_options[$id_product_variant_group2]) && $variant_options[$id_product_variant_group2]) {\n\t\t\t\t\t$id_product_variant_group_option = $variant_options[$id_product_variant_group2];\n\t\t\t\t\t\n\t\t\t\t\t$where_str[] = 'pvo'.$i.'.id_product_variant_group_option = \"'.$mysqli->escape_string($id_product_variant_group_option).'\"';\n\t\t\t\t} else { \n\t\t\t\t\t$stop=1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tif ($id_cart_discount) {\n\t\t\t\t\t$joins[] = 'LEFT JOIN\n\t\t\t\t\t(rebate_coupon_product AS rcp'.$i.' CROSS JOIN rebate_coupon AS rcpr'.$i.' CROSS JOIN cart_discount AS rcd'.$i.') \n\t\t\t\t\tON\n\t\t\t\t\t(product_variant.id_product = rcp'.$i.'.id_product AND rcp'.$i.'.id_rebate_coupon = rcpr'.$i.'.id ANd rcpr'.$i.'.id = rcd'.$i.'.id_rebate_coupon AND rcd'.$i.'.id = \"'.$mysqli->escape_string($id_cart_discount).'\")';\n\t\t\t\t\t\n\t\t\t\t\t$joins[] = 'LEFT JOIN\n\t\t\t\t\t(product_category AS pc'.$i.' CROSS JOIN rebate_coupon_category AS rcc'.$i.' CROSS JOIN rebate_coupon AS rccr'.$i.' CROSS JOIN cart_discount AS rccd'.$i.') \n\t\t\t\t\tON\n\t\t\t\t\t(product_variant.id_product = pc'.$i.'.id_product AND pc'.$i.'.id_category = rcc'.$i.'.id_category AND rcc'.$i.'.id_rebate_coupon = rccr'.$i.'.id ANd rccr'.$i.'.id = rcd'.$i.'.id_rebate_coupon AND rcd'.$i.'.id = \"'.$mysqli->escape_string($id_cart_discount).'\")';\n\t\t\t\t\t\n\t\t\t\t\t$where_str[] = '(rcp'.$i.'.id_rebate_coupon IS NOT NULL OR rcc'.$i.'.id_rebate_coupon IS NOT NULL)';\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\t$select = 'pvo'.$i.'.id_product_variant_group_option,\n\t\t\t\tpvo'.$i.'.id_product_variant_group,\n\t\t\t\tpvo'.$i.'_desc.name,\n\t\t\t\tpvgo'.$i.'.swatch_type,\n\t\t\t\tpvgo'.$i.'.color,\n\t\t\t\tpvgo'.$i.'.color2,\n\t\t\t\tpvgo'.$i.'.color3,\n\t\t\t\tpvgo'.$i.'.filename';\n\t\t\t\t\n\t\t\t\t$where[] = implode(' AND ',$where_str);\n\t\t\t\t\n\t\t\t\t$group_by[] = 'pvo'.$i.'.id_product_variant_group_option';\n\t\t\t\t\n\t\t\t\t$order_by = 'pvgo'.$i.'.sort_order ASC';\n\t\t\t\t\n\t\t\t\t$i++;\n\t\t\t\t\n\t\t\t\tif ($stop) break;\n\t\t\t}\n\t\t\t\n\t\t\t$joins = implode(\"\\r\\n\",$joins);\n\t\t\t$where = implode(' AND ',$where);\n\t\t\t$group_by = implode(',',$group_by);\n\t\t\n\t\t\n\t\t\t// we need to list all main group options\n\t\t\tif ($result_group_option = $mysqli->query('SELECT\n\t\t\t'.$select.'\n\t\t\tFROM\n\t\t\tproduct_variant\n\t\t\t\n\t\t\t'.$joins.'\n\t\t\t\n\t\t\tWHERE\n\t\t\tproduct_variant.active = 1\n\t\t\tAND\n\t\t\tproduct_variant.id_product = \"'.$mysqli->escape_string($id_product).'\"\n\t\t\tAND\n\t\t\t'.$where.'\n\t\t\tGROUP BY '.\n\t\t\t$group_by.'\n\t\t\tORDER BY '.\n\t\t\t$order_by)) {\n\t\t\t\tif ($result_group_option->num_rows) {\n\t\t\t\t\t$input_type = $groups[$id_product_variant_group]['input_type'];\n\t\t\t\t\t\n\t\t\t\t\t$output .= '<div style=\"margin-top:10px; margin-bottom:10px;\" id=\"variant_group_'.$id_product_variant_group.'\">\n\t\t\t\t\t<div style=\"margin-bottom:5px;\"><strong>'.$row_group['name'].'</strong></div>';\n\t\t\n\t\t\t\t\tif (!$input_type) {\n\t\t\t\t\t\t$output .= '<select name=\"variant_options['.$id_product_variant_group.']\">\n\t\t\t\t\t\t<option value=\"\">--</option>';\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$current_selected = isset($variant_options[$id_product_variant_group]) ? $variant_options[$id_product_variant_group]:0;\n\t\t\t\t\t\n\t\t\t\t\t$i=0;\n\t\t\t\t\twhile ($row_group_option = $result_group_option->fetch_assoc()) {\n\t\t\t\t\t\t$id_product_variant_group_option = $row_group_option['id_product_variant_group_option'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch ($input_type) {\n\t\t\t\t\t\t\t// dropdown\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t$output .= '<option value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'selected=\"selected\"':'').'>'.$row_group_option['name'].'</option>';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t// radio\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t$output .= '<div>\n\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"variant_options['.$id_product_variant_group.']\" id=\"product_variant_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'checked=\"checked\"':'').'> <label for=\"product_variant_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\">'.$row_group_option['name'].'</label>\n\t\t\t\t\t\t\t\t</div>';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t// swatch\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t$swatch_type = $row_group_option['swatch_type'];\n\t\t\t\t\t\t\t\t$color = $row_group_option['color'];\n\t\t\t\t\t\t\t\t$color2 = $row_group_option['color2'];\n\t\t\t\t\t\t\t\t$color3 = $row_group_option['color3'];\n\t\t\t\t\t\t\t\t$filename = $row_group_option['filename'];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ($i==8) { $output .= '<div class=\"cb\"></div>'; $i=0; }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tswitch ($swatch_type) {\n\t\t\t\t\t\t\t\t\t// 1 color\n\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border '.(($current_selected == $id_product_variant_group_option) ? 'selected':'').'\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'checked=\"checked\"':'').' />\n\t\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\">\n\t\t\t\t\t\t\t\t\t\t<div style=\"background-color: '.$color.';\" class=\"variant_color\"></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t// 2 color\n\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border '.(($current_selected == $id_product_variant_group_option) ? 'selected':'').'\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'checked=\"checked\"':'').' />\n\t\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:10px; height:20px; background-color: '.$color.';\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:10px; height:20px; background-color: '.$color2.';\"></div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"cb\"></div>\n\t\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t// 3 color\n\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border '.(($current_selected == $id_product_variant_group_option) ? 'selected':'').'\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'checked=\"checked\"':'').' />\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:7px; height:20px; background-color: '.$color.';\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:6px; height:20px; background-color: '.$color2.';\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:7px; height:20px; background-color: '.$color3.';\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"cb\"></div>\n\t\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t// file\n\t\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border '.(($current_selected == $id_product_variant_group_option) ? 'selected':'').'\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'checked=\"checked\"':'').' />\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\t\t\n\t\t\t\t\t\t\t\t\t\t<img src=\"/images/products/swatch/'.$filename.'\" width=\"20\" height=\"20\" border=\"0\" hspace=\"0\" vspace=\"0\" />\n\t\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\t++$i;\t\t\t\t\t\n\t\t\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tswitch ($input_type) {\n\t\t\t\t\t\t// dropdown\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t$output .= '</select>\n\t\t\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\t\t/* <![CDATA[ */\n\t\t\n\t\t\n\t\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\t\tjQuery(\"select[name=\\'variant_options['.$id_product_variant_group.']\\']\").change(function(){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(this).val());\n\t\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* ]]> */\n\t\t\t\t\t\t\t</script>';\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// radio\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t$output .= '<script type=\"text/javascript\">\n\t\t\t\t\t\t\t/* <![CDATA[ */\n\t\t\n\t\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\t\tjQuery(\"input[name=\\'variant_options['.$id_product_variant_group.']\\']\").change(function(){\n\t\t\n\t\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(this).val());\n\t\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t/* ]]> */\n\t\t\t\t\t\t\t</script>';\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// swatch\n\t\t\t\t\t\tcase 2:\t\t\t\t\n\t\t\t\t\t\t\t$output .= '<script type=\"text/javascript\">\n\t\t\t\t\t\t\t/* <![CDATA[ */\n\t\t\n\t\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\t\tjQuery(\"a.variant_color_outer_border\").click(function(){\n\t\t\t\t\t\t\t\t\tif (!jQuery(\"input[id^=\\'variant_color_\\']:checked\",this).length) { \n\t\t\t\t\t\t\t\t\t\tjQuery(\"input[id^=\\'variant_color_\\']\",this).attr(\"checked\",true);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tjQuery(\"a.variant_color_outer_border\").removeClass(\"selected\");\n\t\t\t\t\t\t\t\t\t\tjQuery(this).addClass(\"selected\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(\"input[id^=\\'variant_color_\\']\",this).val());\t\n\t\t\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t/* ]]> */\n\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$output .= '<div class=\"cb\"></div></div>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result_group_option->free();\n\t\t\t} else {\n\t\t\t\tthrow new Exception('An error occured while trying to get variant group options.'.\"\\r\\n\\r\\n\".$mysqli->error);\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($variant_options[$id_product_variant_group]) && $variant_options[$id_product_variant_group] == 0) break;\n\t\t}\t\n\t}\n\t\n\treturn $output;\t\n}",
"public function onVariationAlter(ProductVariationEvent $event) {\n /** @var \\Drupal\\commerce_product\\Entity\\ProductVariationInterface $variation */\n $variation = $event->getProductVariation();\n\n\n }",
"private function generateProductVariants($product, $params) // .. 2\n {\n $configurableAttributes = $this->_attributeRepository->getConfigurableAttributes();\n $variantAttributes = [];\n\n foreach ($configurableAttributes as $attribute) {\n $variantAttributes[$attribute->code] = $params[$attribute->code];\n }\n\n // dd($variantAttributes);\n\n $variants = $this->generateAttributeCombinations($variantAttributes); // .. 3\n\n // echo '<pre>';\n // print_r($variants);\n // exit;\n\n if ($variants) {\n foreach ($variants as $variant) {\n $variantParams = [\n 'parent_id' => $product->id,\n 'user_id' => $params['user_id'],\n 'sku' => $product->sku . '-' . implode('-', array_values($variant)),\n 'type' => 'simple',\n 'name' => $product->name . $this->convertVariantAsName($variant),\n ];\n\n $variantParams['slug'] = Str::slug($variantParams['name']);\n\n $newProductVariant = Product::create($variantParams);\n\n $categoryIds = !empty($params['category_ids']) ? $params['category_ids'] : [];\n $newProductVariant->categories()->sync($categoryIds);\n\n // dd($variantParams);\n\n $this->saveProductAttributeValues($newProductVariant, $variant);\n }\n }\n }",
"protected function process()\n {\n\n // query whether or not we've found a configurable product\n if ($this->getValue(ColumnKeys::PRODUCT_TYPE) !== ProductTypes::CONFIGURABLE) {\n return;\n }\n\n // query whether or not, we've configurables\n if ($configurableVariations = $this->getValue(ColumnKeys::CONFIGURABLE_VARIATIONS)) {\n // load the variation labels, if available\n $configurableVariationLabels = $this->getValue(ColumnKeys::CONFIGURABLE_VARIATION_LABELS);\n\n // create an array with the variation labels (attribute code as key)\n $varLabels = array();\n\n // explode the variations labels\n if ($variationLabels = $this->explode($configurableVariationLabels)) {\n foreach ($variationLabels as $variationLabel) {\n if (strstr($variationLabel, '=')) {\n list ($key, $value) = $this->explode($variationLabel, '=');\n $varLabels[$key] = $value;\n }\n }\n }\n\n // load the variation positions, if available\n $configurableVariationsPosition = $this->getValue(ColumnKeys::CONFIGURABLE_VARIATIONS_POSITION);\n\n // create an array with the variation labels (attribute code as key)\n $varPositions = array();\n\n // explode the variations labels\n if ($variationPositions = $this->explode($configurableVariationsPosition)) {\n foreach ($variationPositions as $variationPosition) {\n if (strstr($variationPosition, '=')) {\n list ($key, $value) = $this->explode($variationPosition, '=');\n $varPositions[$key] = $value;\n }\n }\n }\n\n // intialize the array for the variations\n $artefacts = array();\n\n // load the parent SKU, the store view code and the attribute set code from the row\n $parentSku = $this->getValue(ColumnKeys::SKU);\n $storeViewCode = $this->getValue(ColumnKeys::STORE_VIEW_CODE);\n $attributeSetCode = $this->getValue(ColumnKeys::ATTRIBUTE_SET_CODE);\n\n // iterate over all variations and import them, e. g. the complete value will look like\n // sku=sku-0-black-55 cm,color=Black,size=55 cm| \\\n // sku=sku-01-black-xs,color=Black,size=XS| \\\n // sku=sku-02-blue-xs,color=Blue,size=XS| \\\n // sku=02-blue-55 cm,color=Blue,size=55 cm\n foreach ($this->explode($configurableVariations, '|') as $variation) {\n // explode the SKU and the configurable attribute values, e. g.\n // sku=sku-0-black-55 cm,color=Black,size=55 cm\n $explodedVariation = $this->explode($variation);\n\n // explode the variations child SKU\n list (, $childSku) = $this->explode(array_shift($explodedVariation), '=');\n\n // iterate over the configurable attribute configuration\n foreach ($explodedVariation as $option) {\n // explode the attributes option code and value\n list ($optionCode, $optionValue) = $this->explode($option, '=');\n\n // load the apropriate variation label\n $varLabel = '';\n if (isset($varLabels[$optionCode])) {\n $varLabel = $varLabels[$optionCode];\n }\n\n // load the apropriate variation position\n $varPosition = null;\n if (isset($varPositions[$optionCode])) {\n $varPosition = $varPositions[$optionCode];\n }\n\n // initialize the product variation itself\n $variation = $this->newArtefact(\n array(\n ColumnKeys::STORE_VIEW_CODE => $storeViewCode,\n ColumnKeys::ATTRIBUTE_SET_CODE => $attributeSetCode,\n ColumnKeys::VARIANT_PARENT_SKU => $parentSku,\n ColumnKeys::VARIANT_CHILD_SKU => $childSku,\n ColumnKeys::VARIANT_ATTRIBUTE_CODE => $optionCode,\n ColumnKeys::VARIANT_OPTION_VALUE => $optionValue,\n ColumnKeys::VARIANT_VARIATION_LABEL => $varLabel,\n ColumnKeys::VARIANT_VARIATION_POSITION => $varPosition\n ),\n array(\n ColumnKeys::STORE_VIEW_CODE => ColumnKeys::STORE_VIEW_CODE,\n ColumnKeys::ATTRIBUTE_SET_CODE => ColumnKeys::ATTRIBUTE_SET_CODE,\n ColumnKeys::VARIANT_PARENT_SKU => ColumnKeys::SKU,\n ColumnKeys::VARIANT_CHILD_SKU => ColumnKeys::CONFIGURABLE_VARIATIONS,\n ColumnKeys::VARIANT_ATTRIBUTE_CODE => ColumnKeys::CONFIGURABLE_VARIATIONS,\n ColumnKeys::VARIANT_OPTION_VALUE => ColumnKeys::CONFIGURABLE_VARIATIONS,\n ColumnKeys::VARIANT_VARIATION_LABEL => ColumnKeys::CONFIGURABLE_VARIATION_LABELS,\n ColumnKeys::VARIANT_VARIATION_POSITION => ColumnKeys::CONFIGURABLE_VARIATIONS_POSITION\n )\n );\n\n // append the product variation\n $artefacts[] = $variation;\n }\n }\n\n // append the variations to the subject\n $this->addArtefacts($artefacts);\n }\n }",
"public function getProducts_options() {\n\t\treturn $this->products_options;\n\t}",
"public static function addVariations(Product $product, Collection $variations)\n {\n $variations->each(function ($variation) use ($product) {\n if(!empty($variation['size'])&& !empty($variation['price']) && !empty($variation['quantity'])) {\n $product->variations()->create([\n 'name' => strtoupper($variation['size']),\n 'price' => $variation['price'],\n 'quantity' => $variation['quantity']\n ]);\n }\n });\n }",
"public function getProductAndVariantAttributes()\n\t{\n\t\treturn array_unique(array_merge($this->arrAttributes, $this->arrVariantAttributes));\n\t}",
"public function getProducts()\n {\n return $this->products;\n }",
"public function getProducts()\n {\n return $this->products;\n }",
"public function getProducts()\n {\n return $this->products;\n }",
"public function getProducts()\n {\n return $this->products;\n }",
"function _acf_apply_hook_variations()\n{\n}",
"public function build_product_variations_selector($_class, $_active = \"\", $_prod_id = 0) { error_log(\"Active : \". $_active); \t\r\n \t$html = \"\";\r\n \t// for variation product list\r\n \t$ptypes = wcff()->dao->load_variable_products();\r\n \t\r\n \tif ($_prod_id == 0 && $_active != \"\") {\r\n \t /* Find out the parent product id */\r\n \t $variable_product = wc_get_product(absint($_active));\r\n \t $_prod_id = $variable_product->get_parent_id();\r\n \t}\r\n \t\r\n \t$html .= '<select class=\"variation_product_list\">';\r\n \t$html .= '<option value=\"0\">'. __(\"All Products\", \"wc-fields-factory\") .'</option>';\r\n \tif (count($ptypes) > 0) {\r\n \t\tforeach ($ptypes as $ptype) {\r\n \t\t\t$selected = ($ptype[\"id\"] == $_prod_id) ? 'selected=\"selected\"' : '';\r\n \t\t\t$html .= '<option value=\"' . esc_attr($ptype[\"id\"]) . '\" ' . $selected . '>' . esc_html($ptype[\"title\"]) . '</option>';\r\n \t\t}\r\n \t}\r\n \t$html .= '</select>';\r\n \t// for variation list\r\n \t$ptypes = wcff()->dao->load_product_variations($_prod_id);\r\n \t$html .= '<select class=\"' . esc_attr($_class) . ' select\">';\r\n \t$html .= '<option value=\"-1\">'. __(\"All Variations\", \"wc-fields-factory\") .'</option>';\r\n \tif (count($ptypes) > 0) {\r\n \t\tforeach ($ptypes as $ptype) {\r\n \t\t\t$selected = ($ptype[\"id\"] == $_active) ? 'selected=\"selected\"' : '';\r\n \t\t\t$html .= '<option value=\"' . esc_attr($ptype[\"id\"]) . '\" ' . $selected . '>' . esc_html($ptype[\"title\"]) . '</option>';\r\n \t\t}\r\n \t}\r\n \t$html .= '</select>';\r\n \treturn $html;\r\n }",
"public function extractOptions()\n {\n if ($this->hasMultipleItems()) {\n $items = [];\n foreach ($this->productOptions as $productOption) {\n $id = $productOption->id;\n $text = $productOption->description;\n\n $item = [];\n $item[\"Variation\"] = new \\stdClass();\n $item[\"Variation\"]->text = $text;\n $item[\"Variation\"]->value = $id;\n $items[] = $item;\n }\n $this->options = $items;\n return true;\n } else {\n return false;\n }\n }",
"public function getProducts() \n {\n return $this->_products;\n }",
"public function getProducts()\n {\n return $this->products;\n }",
"public function getProducts()\n {\n $products = [\n [\"name\" => \"Sledgehammer\", \"price\" => 125.75],\n [\"name\" => \"Axe\", \"price\" => 190.50],\n [\"name\" => \"Bandsaw\", \"price\" => 562.131],\n [\"name\" => \"Chisel\", \"price\" => 12.9],\n [\"name\" => \"Hacksaw\", \"price\" => 18.45],\n ];\n return $products;\n }",
"public function index()\n {\t\n $this->variation();\n }",
"protected function cleaningUpVariationData() {\r\n\t\t//removing non-existing Product_VariationAttributes (Type does not exist)\r\n\t\t$sql = \"\r\n\t\t\tSelect \\\"ProductAttributeTypeID\\\"\r\n\t\t\tFROM \\\"Product_VariationAttributes\\\"\r\n\t\t\tWHERE \\\"ProductID\\\" = \".$this->owner->ID;\r\n\t\t$data = DB::query($sql);\r\n\t\t$array = $data->keyedColumn();\r\n\t\tif(is_array($array) && count($array) ) {\r\n\t\t\tforeach($array as $key => $productAttributeTypeID) {\r\n\t\t\t\tif(!DataObject::get_by_id(\"ProductAttributeType\", $productAttributeTypeID)) {\r\n\t\t\t\t\tDB::query(\"DELETE FROM \\\"Product_VariationAttributes\\\" WHERE \\\"ProductAttributeTypeID\\\" = $productAttributeTypeID\");\r\n\t\t\t\t\tDB::query(\"DELETE FROM \\\"ProductVariation_AttributeValues\\\" WHERE \\\"ProductAttributeTypeID\\\" = $productAttributeTypeID\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//removing non-existing ProductVariation_AttributeValues (Value does not exist)\r\n\t\t$sql = \"\r\n\t\t\tSelect \\\"ProductAttributeValueID\\\"\r\n\t\t\tFROM \\\"ProductVariation\\\"\r\n\t\t\t\tINNER JOIN \\\"ProductVariation_AttributeValues\\\"\r\n\t\t\t\t\tON \\\"ProductVariation_AttributeValues\\\".\\\"ProductVariationID\\\" = \\\"ProductVariation\\\".\\\"ID\\\"\r\n\t\t\tWHERE \\\"ProductVariation\\\".\\\"ProductID\\\" = \".$this->owner->ID;\r\n\t\t$data = DB::query($sql);\r\n\t\t$array = $data->keyedColumn();\r\n\t\treturn $array;\r\n\t\tif(is_array($array) && count($array) ) {\r\n\t\t\tforeach($array as $key => $productAttributeValueID) {\r\n\t\t\t\tif(!DataObject::get_by_id(\"ProductAttributeType\", $productAttributeValueID)) {\r\n\t\t\t\t\tDB::query(\"DELETE FROM \\\"ProductVariation_AttributeValues\\\" WHERE \\\"ProductAttributeValueID\\\" = $productAttributeValueID\");\r\n\t\t\t\t\t//unset($array[$key]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//removing non-existing Product_VariationAttributes (Type does not exist)\r\n\t\t$sql = \"\r\n\t\t\tSELECT \\\"ProductID\\\"\r\n\t\t\tFROM \\\"Product_VariationAttributes\\\"\r\n\t\t\t\tLEFT JOIN \\\"Product_Live\\\"\r\n\t\t\t\t\tON \\\"Product_VariationAttributes\\\".\\\"ProductID\\\" = \\\"Product_Live\\\".\\\"ID\\\"\r\n\t\t\t\tLEFT JOIN \\\"Product\\\"\r\n\t\t\t\t\tON \\\"Product_VariationAttributes\\\".\\\"ProductID\\\" = \\\"Product\\\".\\\"ID\\\"\r\n\t\t\tWHERE\r\n\t\t\t\t\\\"Product_Live\\\".\\\"ID\\\" IS NULL AND\r\n\t\t\t\t\\\"Product\\\".\\\"ID\\\" IS NULL\r\n\t\t\";\r\n\t\t$data = DB::query($sql);\r\n\t\t$array = $data->keyedColumn();\r\n\t\tif(is_array($array) && count($array) ) {\r\n\t\t\tforeach($array as $key => $productID) {\r\n\t\t\t\tif(!DataObject::get_by_id(\"ProductAttributeType\", $productID)) {\r\n\t\t\t\t\tDB::query(\"DELETE FROM \\\"Product_VariationAttributes\\\" WHERE \\\"ProductID\\\" = $productID\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static function get_variation_ids($product)\n {\n $ids = array();\n if (isset($product['variations']) and !empty($product['variations'])) {\n foreach ($product['variations'] as $item) {\n $ids[] = $item['id'];\n }\n }\n\n return $ids;\n }",
"public function getVariantByProduct($id){\n $this->db->select('*');\n $this->db->where('id_product', $id);\n $this->db->from($this->product_variant); \n return $this->db->get();\n }",
"function getProducts()\n {\n $ret = array();\n foreach ($this->getItems() as $item)\n if ($item->item_type == 'product')\n if ($pr = $item->tryLoadProduct())\n $ret[] = $pr;\n return $ret;\n }",
"public function getAllProducts() {\n $searchCondition .= \"searchCriteria[filter_groups][0][filters][0][field]=category_id&\";\n $searchCondition .= \"searchCriteria[filter_groups][0][filters][0][value]=25&\";\n $searchCondition .= \"searchCriteria[filter_groups][0][filters][0][condition_type]=eq&\";\n $searchCondition .= \"searchCriteria[filter_groups][1][filters][0][field]=sku&\";\n $searchCondition .= \"searchCriteria[filter_groups][1][filters][0][value]=%25case%25&\";\n $searchCondition .= \"searchCriteria[filter_groups][1][filters][0][condition_type]=nlike\";\n\n $this->products = $this->cUrlRequest($this->url . '/rest/V1/products?fields=items[name,price,custom_attributes,sku]&'.$searchCondition.'&searchCriteria[pageSize]=' . $this->items, $this->getToken());\n\n return $this->products;\n }",
"private function setup_products() {\n\t\tglobal $wpdb;\n\n\t\t$ids = [];\n\t\t$d = $wpdb->get_results( \"SELECT distinct `products` FROM `{$wpdb->prefix}thespa_data`\", ARRAY_A );\n\t\tforeach ( $d as $datum ) {\n\t\t\t$prs = explode( \",\", $datum['products'] );\n\t\t\tforeach ( $prs as $pr ) {\n\t\t\t\tif ( !isset( $ids[$pr] ) ) {\n\t\t\t\t\tarray_push($ids, $pr );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$i = 0;\n\t\tforeach ( $ids as $id ) {\n\t\t\t$product = wc_get_product( $id );\n\t\t\tif ( is_object( $product ) ) {\n\t\t\t\t$this->products[$i] = [\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'name' => $product->get_title(),\n\t\t\t\t\t'url' => $product->get_permalink(),\n\t\t\t\t\t'img' => wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'medium', true )[0],\n\t\t\t\t\t'cost' => $product->get_price_html(),\n\t\t\t\t];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}",
"public function products()\n {\n //$products = $api->getAllProducts();\n //var_dump($products);\n // TODO save products to database\n }",
"public function getProducts_options_values() {\n\t\treturn $this->products_options_values;\n\t}",
"public static function get_attribution_product_fields($product)\n {\n $list = array();\n if ($product['type'] == \"variable\" and count($product['variations']) > 0) {\n foreach ($product['attributes'] as $attribute) {\n\n // If Attribute Not User For Variation\n if ($attribute['variation'] === false) {\n continue;\n }\n\n // Get Basic Detail\n $list[wc_attribute_taxonomy_name($attribute['slug'])] = array(\n 'name' => $attribute['name'],\n 'options' => array()\n );\n $options = array();\n foreach ($attribute['terms'] as $term_key => $term) {\n\n // Check Term in Variables Product\n $exist = false;\n foreach ($product['variations'] as $variations_product) {\n $in_stock = $variations_product['in_stock'];\n $stock_quantity = $variations_product['stock_quantity'];\n if ($in_stock === true) {\n foreach ($variations_product['attributes'] as $variations_product_attribute) {\n if ($term['slug'] == $variations_product_attribute['option']) {\n $exist = true;\n break;\n }\n }\n }\n }\n if ($exist === true) {\n $options[$term['slug']] = $term['name'];\n }\n }\n $list[wc_attribute_taxonomy_name($attribute['slug'])]['options'] = $options;\n }\n }\n\n /**\n * [pa_color] => Array\n * (\n * [name] => رنگ\n * [options] => Array\n * (\n * [blue] => آبی\n * [red] => قرمز\n * )\n * )\n * [pa_size] => Array\n * (\n * [name] => سایز\n * [options] => Array\n * (\n * [l] => L\n */\n return $list;\n }",
"public function variants()\n {\n return $this->hasMany('App\\Variant');\n }",
"public static function get_style_variations()\n {\n }",
"public function getAllVariants($productId)\n {\n $this->queryUrl = $this->baseUrl . \"products/\" . $productId . \"/variants.json\";\n /** @var Response $response */\n $response = $this->getData();\n if($this->responseObj){\n //Return response obj if set to true\n return $response;\n } else {\n return json_decode($response->getBody(), true);\n }\n }",
"public function single_product_variations_custom_html( $html, $args ) {\n\t\t\techo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t?>\n\t\t\t<div class=\"ast-variation-button-group\">\n\t\t\t\t<?php\n\t\t\t\t\t$options = isset( $args['options'] ) ? $args['options'] : array();\n\t\t\t\t\t$product = isset( $args['product'] ) ? $args['product'] : array();\n\t\t\t\t\t$attribute = isset( $args['attribute'] ) ? $args['attribute'] : array();\n\n\t\t\t\tif ( empty( $options ) && ! empty( $product ) && ! empty( $attribute ) ) {\n\t\t\t\t\t$attributes = $product->get_variation_attributes();\n\t\t\t\t\t$options = $attributes[ $attribute ];\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $options ) ) {\n\t\t\t\t\tif ( $product && taxonomy_exists( $attribute ) ) {\n\t\t\t\t\t\t// Get terms if this is a taxonomy - ordered. We need the names too.\n\t\t\t\t\t\t$terms = wc_get_product_terms(\n\t\t\t\t\t\t\t$product->get_id(),\n\t\t\t\t\t\t\t$attribute,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'fields' => 'all',\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tforeach ( $terms as $term ) {\n\t\t\t\t\t\t\tif ( in_array( $term->slug, $options, true ) ) {\n\n\t\t\t\t\t\t\t\t$default_value = $product->get_default_attributes();\n\t\t\t\t\t\t\t\t$active_class = ( isset( $default_value[ $term->taxonomy ] ) && $term->slug === $default_value[ $term->taxonomy ] ) ? 'active' : '';\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<div class=\"ast-single-variation <?php echo esc_attr( $active_class ); ?>\" data-slug=\"<?php echo esc_attr( $term->slug ); ?>\" >\n\t\t\t\t\t\t\t\t\t\t<?php echo esc_html( apply_filters( 'astra_variation_option_name', $term->name, $term, $attribute, $product ) ); ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tforeach ( $options as $option ) {\n\t\t\t\t\t\t\t// This handles < 2.4.0 bw compatibility where text attributes were not sanitized.\n\t\t\t\t\t\t\t$default_value = $product->get_default_attributes();\n\t\t\t\t\t\t\t$active_class = ( isset( $default_value[ strtolower( $attribute ) ] ) && $option === $default_value[ strtolower( $attribute ) ] ) ? 'active' : '';\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<div class=\"ast-single-variation <?php echo esc_attr( $active_class ); ?>\" data-slug=\"<?php echo esc_attr( $option ); ?>\" >\n\t\t\t\t\t\t\t\t\t<?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute, $product ) ); ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"protected function getProductResultCollection()\n {\n $collection = Mage::registry('recommendation_collection');\n\n if (empty($collection)) {\n $collection = array();\n }\n\n return $collection;\n }",
"public function getProducts()\n {\n return $this->_products;\n }",
"function addVariation($data,$form){\r\n\t\tif(isset($data['ProductAttributes'])){\r\n\t\t\t$data['ProductAttributes'] = Convert::raw2sql($data['ProductAttributes']);\r\n\t\t\t$variation = $this->owner->getVariationByAttributes($data['ProductAttributes']);\r\n\t\t\tif($variation) {\r\n\t\t\t\tif($variation->canPurchase()) {\r\n\t\t\t\t\t$quantity = round($data['Quantity'], $variation->QuantityDecimals());\r\n\t\t\t\t\tif(!$quantity) {\r\n\t\t\t\t\t\t$quantity = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tShoppingCart::singleton()->addBuyable($variation,$quantity);\r\n\t\t\t\t\tif($variation->IsInCart()) {\r\n\t\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.SUCCESSFULLYADDED\",\"Added to cart.\");\r\n\t\t\t\t\t\t$status = \"good\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.NOTSUCCESSFULLYADDED\",\"Not added to cart.\");\r\n\t\t\t\t\t\t$status = \"bad\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTAVAILABLE\",\"That option is not available.\");\r\n\t\t\t\t\t$status = \"bad\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTAVAILABLE\",\"That option is not available.\");\r\n\t\t\t\t$status = \"bad\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTFOUND\",\"The item(s) you are looking for are not available.\");\r\n\t\t\t$status = \"bad\";\r\n\t\t}\r\n\t\tif(Director::is_ajax()){\r\n\t\t\treturn ShoppingCart::singleton()->setMessageAndReturn($msg, $status);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$form->sessionMessage($msg,$status);\r\n\t\t\tDirector::redirectBack();\r\n\t\t}\r\n\t}",
"public function products()\n {\n return $this->morphedByMany('App\\Models\\Product', 'taggable');\n }",
"function productList() {\n\t$categoryIds = array_merge ( [ \n\t\t\t$this->id \n\t], $this->subcategoryIds () );\n\tprint_r ( $categoryIds );\n\t// Find all products that match the retrieved category IDs\n\treturn Product::whereIn ( 'cate_id', $categoryIds )->get ();\n}",
"function cb_product_result($items)\r\n\t{\r\n\t\t$ret = array();\r\n\r\n\t\tforeach ($items as $i)\r\n\t\t{\r\n\t\t\t# Create a single copy of this product for return.\r\n\r\n\t\t\tif (empty($ret[$i['prod_id']])) $ret[$i['prod_id']] = $i;\r\n\r\n\t\t\tif (empty($ret[$i['prod_id']]['atrs'][$i['atr_id']]))\r\n\t\t\t\t$ret[$i['prod_id']]['atrs'][$i['atr_id']] = $i;\r\n\r\n\t\t\tif (empty($ret[$i['prod_id']]['atrs'][$i['atr_id']]['opts'][$i['opt_id']]))\r\n\t\t\t\t$ret[$i['prod_id']]['atrs'][$i['atr_id']]['opts'][$i['opt_id']] = $i;\r\n\t\t}\r\n\r\n\t\tforeach ($ret as &$v)\r\n\t\t\t$v = $this->product_props($v);\r\n\r\n\t\treturn $ret;\r\n\t}"
] | [
"0.79466677",
"0.76460606",
"0.7625203",
"0.73682",
"0.713566",
"0.7074928",
"0.69126153",
"0.68476933",
"0.68169487",
"0.67912775",
"0.67758983",
"0.67715305",
"0.676726",
"0.6758203",
"0.67469615",
"0.6732361",
"0.67214406",
"0.6696025",
"0.6684171",
"0.6668452",
"0.65642655",
"0.6515166",
"0.6515093",
"0.6506238",
"0.648911",
"0.64664954",
"0.645635",
"0.6455301",
"0.6427451",
"0.63959575",
"0.6393873",
"0.63585424",
"0.6297343",
"0.6282418",
"0.62806374",
"0.6241031",
"0.6208589",
"0.62014735",
"0.6191746",
"0.6191302",
"0.61573255",
"0.6149914",
"0.61297655",
"0.6120547",
"0.6118393",
"0.6116127",
"0.6110044",
"0.6100166",
"0.60886383",
"0.60558903",
"0.60508716",
"0.60508716",
"0.60371256",
"0.602777",
"0.602526",
"0.60135466",
"0.5995684",
"0.5994336",
"0.5991939",
"0.5991593",
"0.59725237",
"0.59724635",
"0.5970922",
"0.5963146",
"0.5960208",
"0.5958245",
"0.5954869",
"0.5946676",
"0.59446126",
"0.5936856",
"0.59354967",
"0.59354967",
"0.59354967",
"0.59354967",
"0.5931453",
"0.5925273",
"0.5923969",
"0.5919845",
"0.5913653",
"0.59045833",
"0.5904531",
"0.59040314",
"0.5902477",
"0.5897297",
"0.5893762",
"0.58915627",
"0.5890131",
"0.588879",
"0.58858955",
"0.58852",
"0.58838856",
"0.588365",
"0.58809227",
"0.5874092",
"0.5873692",
"0.5861302",
"0.58530366",
"0.58522886",
"0.5848583",
"0.5842884"
] | 0.62958395 | 33 |
Prepares the environment before running a test. | protected function setUp()
{
parent::setUp();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function prepareRealTestEnvironment() {}",
"protected function setUp () : void {\n\n $_ENV['foo'] = \"bar\";\n $_SERVER['foo'] = \"baz\";\n\n $_ENV['bar'] = \"lorem\";\n $_SERVER['baz'] = \"ipsum\";\n\n // And quux isn't defined.\n }",
"protected function _before()\n {\n parent::_before();\n\n $this->setUpEnvironment();\n }",
"protected function setUp(): void\n {\n $this->setUpTheTestEnvironment();\n }",
"public function setUp()\n {\n $this->initTestEnvironment('htpasswd_crypt');\n }",
"public function setUp()\n {\n putenv(\"{$this->name}={$this->value}\");\n \n return;\n }",
"public function setUp()\n {\n $this->loadEnv();\n\n require_once(__DIR__ . '/functions.php');\n\n // Allows for persistence of array cache to improve test performance,\n // e.g. by caching the LWA token to minimize OAuth requests. If this\n // is not desireable, see implementation of tearDown method below.\n if (!static::$arrayCache instanceof ArrayCache) {\n static::$arrayCache = new ArrayCache();\n }\n }",
"protected function prepareEnvironment()\n {\n if ($this -> debug) {\n error_reporting(-1);\n ini_set('display_errors', 1);\n } else {\n error_reporting(0);\n ini_set('display_errors', 0);\n }\n \n mb_internal_encoding('UTF-8');\n \n if ($locale = $this -> config -> get('locale')) {\n setlocale(LC_ALL, $locale);\n }\n \n date_default_timezone_set($this -> config -> get('timezone', 'Europe/London'));\n }",
"public static function setup()\n {\n try {\n $env = \\Dotenv\\Dotenv::create(__DIR__ . '/../../private/');\n $env->load();\n $env->required([\n 'ENVIRONMENT',\n ]);\n } catch (\\Exception $e) {\n echo $e;\n }\n }",
"protected function setUp()\n\t{\n\t\t$this->username = getenv('DBUSER') ? getenv('DBUSER') : NULL;\n\t\t$this->password = getenv('DBPASS') ? getenv('DBPASS') : NULL;\n\t\tparent::setUp();\n\t}",
"protected function setUp()\n {\n $container = include 'config/container.php';\n InsideConstruct::setContainer($container);\n }",
"protected function setUp()\n {\n $this->preSetup();\n parent::setUp();\n }",
"protected function setUp()\n {\n $this->api_key = getenv('API_KEY');\n $this->api = new Api($this->api_key);\n }",
"protected function setUp(): void\n {\n $this->dbSetUp();\n $this->prepareObjects();\n $this->createDummyData();\n }",
"function quickSetUp()\n {\n $this->setUp(null, null, null, null, null);\n }",
"public function setUp()\n {\n parent::setUp();\n $this->prepareForTests();\n }",
"public static function setUpBeforeClass(): void\n {\n // Credentials are only required when the\n // client is used. Save them to restore them after.\n self::$values = [\n 'env_id' => getenv('ALGOLIA_APP_ID'),\n 'env_key' => getenv('ALGOLIA_API_KEY'),\n '_env' => $_ENV,\n '_server' => $_SERVER,\n ];\n\n putenv('ALGOLIA_APP_ID');\n putenv('ALGOLIA_API_KEY');\n unset($_ENV['ALGOLIA_APP_ID']);\n unset($_ENV['ALGOLIA_API_KEY']);\n unset($_SERVER['ALGOLIA_APP_ID']);\n unset($_SERVER['ALGOLIA_API_KEY']);\n }",
"protected function setUp()\n {\n // Prepare the playground.\n $zip = new ZipArchive();\n $zip->open(__DIR__.'/resources.zip');\n $zip->extractTo(__DIR__.'/playground');\n }",
"protected function prepare(): void\n {\n config(['dluwang-auth.entities.permission' => \\Dluwang\\Auth\\Tests\\Permission::class]);\n $gate = $this->app->make(Gate::class);\n\n $gate->define('permission-test', function($user){\n return true;\n });\n\n $gate->policy(\\Dluwang\\Auth\\Tests\\User::class, UserPolicy::class);\n $this->artisan('dluwang-auth:install');\n $this->artisan('migrate');\n }",
"protected function setUpBasicFrontendEnvironment() {}",
"public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }",
"private function initEnvironment() {\n\t\t$env = getenv('APP_ENV');\n\n\t\t$this->_env = ($env !== FALSE) ? $env : 'development';\n\t}",
"public function prepare()\n {\n static::startPhantomDriver();\n }",
"protected function setUp()\n {\n // base directory for a .env file, and load it if it exists.\n $dotenvDir = __DIR__;\n for ($i = 0; $i < 4; $i++) {\n if (file_exists($dotenvDir.'/.env')) {\n $dotenv = new Dotenv($dotenvDir);\n $dotenv->load();\n break;\n }\n $dotenvDir = dirname($dotenvDir);\n }\n\n $this->memberclicks = new MemberClicks(getenv('MEMBERCLICKS_ORG_ID'), getenv('MEMBERCLICKS_CLIENT_ID'), getenv('MEMBERCLICKS_CLIENT_SECRET'));\n $this->memberclicks->auth();\n }",
"public function setUp()\n {\n $this->createApplication();\n parent::setUp();\n //$this->resolveApplicationConsoleKernel($this->app);\n //$this->resolveApplicationHttpKernel($this->app);\n $this->getEnvironmentSetUp($this->app);\n\n $this->migrateUp();\n }",
"public static function setUpBeforeClass()\n {\n // Backup the current value to be restored after the tests\n self::$homeLocationBackup = getenv('HOME');\n\n // Get the location of the test Application\n $kernel = new TestKernel('test', true);\n $kernel->boot();\n self::$testHomeLocation = $kernel->getRootDir().DIRECTORY_SEPARATOR.'externals'.DIRECTORY_SEPARATOR.'home';\n\n // Override the current value\n putenv('HOME='.self::getTestHomeLocation());\n }",
"public function setUp(): void\n {\n $container = Robo::createDefaultContainer(null, new NullOutput());\n $this->setContainer($container);\n $this->setConfig(Robo::config());\n }",
"protected function setupEnvironment()\n {\n Dotenv::create(project_root())->load();\n\n if (!in_array($_SERVER['APP_ENV'], [self::ENV_DEV, self::ENV_PRODUCTION, self::ENV_STAGING, self::ENV_TEST])) {\n throw new RuntimeException(\"Unrecognized application environment\");\n }\n\n $this->debug = (bool) (\n $_SERVER['APP_DEBUG']\n ?? $_SERVER['APP_ENV'] == self::ENV_DEV\n );\n }",
"protected function setUp()\n {\n $tempDir = tempnam(sys_get_temp_dir(),'');\n if (file_exists($tempDir)) {\n unlink($tempDir);\n }\n mkdir($tempDir);\n chdir($tempDir);\n exec('unzip '.__DIR__.'/gitRepo.zip');\n exec('git checkout .');\n $this->testDir = $tempDir;\n \n $this->gitFlow = new GitFlow();\n $this->gitFlow->setDryRun(true);\n }",
"protected function setUp() {\n\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}",
"protected function setUp() {\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}",
"protected function setUp() {\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}",
"public function setUp ( )\n {\n $this->bootstrap = new Zend_Application(\n APPLICATION_ENV, ROOT_PATH . '/etc/application.ini'\n );\n\n parent::setUp();\n }",
"public function setUp ( )\n {\n $this->bootstrap = new Zend_Application(\n APPLICATION_ENV, ROOT_PATH . '/etc/application.ini'\n );\n\n parent::setUp();\n }",
"protected function setUp()\n {\n if ($this->bootstrap) require $this->bootstrap;\n $this->dispatcher->dispatch('test.before', new \\Codeception\\Event\\Test($this));\n $this->codeGuy = new CodeGuy($scenario = new \\Codeception\\Scenario($this));\n $scenario->run();\n }",
"public function setUp()\n\t{\n\t\tif ( ! $this->app)\n\t\t{\n\t\t\t$this->refreshApplication();\n\t\t}\n\t}",
"protected function setUp(): void\n {\n $publicPath = __DIR__ . '/../../src/Provider/public/';\n\n $this->processRunner = new ProcessRunner('php', ['-S', 'localhost:7202', '-t', $publicPath]);\n\n $this->processRunner->run();\n }",
"protected function setUp()\n {\n $tempDir = tempnam(sys_get_temp_dir(),'');\n if (file_exists($tempDir)) {\n unlink($tempDir);\n }\n mkdir($tempDir);\n chdir($tempDir);\n exec('unzip '.__DIR__.'/gitRepo.zip');\n exec('git checkout .');\n $this->testDir = $tempDir;\n }",
"protected function setUp() : void\n {\n parent::setUp();\n\n PreParser::reset();\n }",
"public function setUp() {\n $this->setUpSiteAuditTestEnvironment();\n }",
"public function setUp() {\n\t\tparent::setUp();\n\n\t\t$_GET = array();\n\t\t$_POST = array();\n\t}",
"protected function setUp()\n {\n parent::setUp();\n\n $this->checkExtension('phalcon');\n\n // Creating the application\n $this->bootstrap = new Bootstrap(self::getConfig());\n $this->app = $this->bootstrap->make($this->kernel());\n $this->app->boot();\n }",
"public function before()\n\t\t{\n\t\t\t$this->config\t\t= Kohana::$environment;\n\t\t}",
"public static function setUpBeforeClass() {\n global $app;\n\n Debug::enable();\n\n $app = new \\Silex\\Application();\n\n require 'config/test.php'; /* seperate config for the test db */\n require 'src/app.php';\n\n self::createSchema();\n\n $app['session.test'] = true;\n\n }",
"protected function setUp()\n {\n parent::setUp();\n\n $run = dirname(__FILE__) . '/_run';\n if (file_exists($run) === false) {\n mkdir($run, 0755);\n }\n\n $this->_clearRunResources($run);\n\n include_once 'PHP/Depend.php';\n include_once 'PHP/Depend/StorageRegistry.php';\n include_once 'PHP/Depend/Storage/MemoryEngine.php';\n\n PHP_Depend_StorageRegistry::set(\n PHP_Depend::TOKEN_STORAGE,\n new PHP_Depend_Storage_MemoryEngine()\n );\n PHP_Depend_StorageRegistry::set(\n PHP_Depend::PARSER_STORAGE,\n new PHP_Depend_Storage_MemoryEngine()\n );\n\n if (defined('STDERR') === false) {\n define('STDERR', fopen('php://stderr', true));\n }\n }",
"public function setup_environment() {\n\n define( 'IWJ_TEMPLATE_PATH', $this->template_path() );\n\n //$this->add_thumbnail_support();\n //$this->add_image_sizes();\n }",
"protected function setup(): void\n {\n $kernel = self::bootKernel();\n $application = new Application($kernel);\n\n // get entity manager\n $this->em = $kernel->getContainer()->get('doctrine')->getManager();\n\n // get serializer\n $this->serializer = $kernel->getContainer()->get('serializer');\n\n // init command\n $application->add(\n new ImportCommand(\n $this->em,\n $this->serializer\n )\n );\n\n $command = $application->find('app:import');\n $this->commandTester = new CommandTester($command);\n }",
"protected function doSetup(): void\n {\n }",
"protected function setUp() {\n parent::setUp();\n Monkey\\setUp();\n }",
"public function preTesting() {}",
"protected function setUp() {\n $this->stack = new Stack();\n }",
"function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// i18n needs to be set to the defaults or tests fail\n\t\ti18n::set_locale(i18n::default_locale());\n\t\ti18n::set_date_format(null);\n\t\ti18n::set_time_format(null);\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\t\t\n\t\tif(class_exists('RootURLController')) RootURLController::reset();\n\t\tif(class_exists('Translatable')) Translatable::reset();\n\t\tVersioned::reset();\n\t\tDataObject::reset();\n\t\tif(class_exists('SiteTree')) SiteTree::reset();\n\t\tHierarchy::reset();\n\t\tif(Controller::has_curr()) Controller::curr()->setSession(new Session(array()));\n\t\t\n\t\t$this->originalTheme = SSViewer::current_theme();\n\t\t\n\t\tif(class_exists('SiteTree')) {\n\t\t\t// Save nested_urls state, so we can restore it later\n\t\t\t$this->originalNestedURLsState = SiteTree::nested_urls();\n\t\t}\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\n\t\t// Set up fixture\n\t\tif($fixtureFile || $this->usesDatabase || !self::using_temp_db()) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(), 0, strlen($prefix) + 5) != strtolower(sprintf('%stmpdb', $prefix))) {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\tsingleton('DataObject')->flushCache();\n\t\t\t\n\t\t\tself::empty_temp_db();\n\t\t\t\n\t\t\tforeach($this->requireDefaultRecordsFrom as $className) {\n\t\t\t\t$instance = singleton($className);\n\t\t\t\tif (method_exists($instance, 'requireDefaultRecords')) $instance->requireDefaultRecords();\n\t\t\t\tif (method_exists($instance, 'augmentDefaultRecords')) $instance->augmentDefaultRecords();\n\t\t\t}\n\n\t\t\tif($fixtureFile) {\n\t\t\t\t$pathForClass = $this->getCurrentAbsolutePath();\n\t\t\t\t$fixtureFiles = (is_array($fixtureFile)) ? $fixtureFile : array($fixtureFile);\n\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($fixtureFiles as $fixtureFilePath) {\n\t\t\t\t\t// Support fixture paths relative to the test class, rather than relative to webroot\n\t\t\t\t\t// String checking is faster than file_exists() calls.\n\t\t\t\t\t$isRelativeToFile = (strpos('/', $fixtureFilePath) === false || preg_match('/^\\.\\./', $fixtureFilePath));\n\t\t\t\t\tif($isRelativeToFile) {\n\t\t\t\t\t\t$resolvedPath = realpath($pathForClass . '/' . $fixtureFilePath);\n\t\t\t\t\t\tif($resolvedPath) $fixtureFilePath = $resolvedPath;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$fixture = new YamlFixture($fixtureFilePath);\n\t\t\t\t\t$fixture->saveIntoDatabase();\n\t\t\t\t\t$this->fixtures[] = $fixture;\n\n\t\t\t\t\t// backwards compatibility: Load first fixture into $this->fixture\n\t\t\t\t\tif($i == 0) $this->fixture = $fixture;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->logInWithPermission(\"ADMIN\");\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t\tEmail::send_all_emails_to(null);\n\t\t\n\t\t// Preserve memory settings\n\t\t$this->originalMemoryLimit = ini_get('memory_limit');\n\t}",
"protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }",
"protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }",
"public function setUp()\n {\n $this->bootstrap = new Zend_Application(\n APPLICATION_ENV,\n APPLICATION_PATH . '/configs/application.ini'\n );\n parent::setUp();\n }",
"public function setUp()\n {\n require_once 'Zend/Application.php';\n\n // Create application, bootstrap, and run\n $application = new \\Zend_Application(\n APPLICATION_ENV,\n GEMS_ROOT_DIR . '/configs/application.example.ini'\n );\n\n $this->bootstrap = $application;\n\n parent::setUp();\n }",
"function initializer() {\n init_env();\n }",
"public function setup()\n {\n $this->app = new Application(BASE_PATH, Environment::testing());\n\n // Create a test double for our User entity\n $user = m::mock('OpenCFP\\Domain]Entity\\User');\n $user->shouldReceive('hasPermission')->with('admin')->andReturn(1);\n $user->shouldReceive('getId')->andReturn(1);\n $user->shouldReceive('hasAccess')->with('admin')->andReturn(true);\n\n // Create a test double for our Sentry object\n $sentry = m::mock('Cartalyst\\Sentry\\Sentry');\n $sentry->shouldReceive('check')->andReturn(true);\n $sentry->shouldReceive('getUser')->andReturn($user);\n $this->app['sentry'] = $sentry;\n $this->app['user'] = $user;\n }",
"#[Before]\n public function setUp() {\n $this->environment= new Environment([\n 'http_proxy' => null,\n 'HTTP_PROXY' => null,\n 'https_proxy' => null,\n 'HTTPS_PROXY' => null,\n 'no_proxy' => null,\n 'NO_PROXY' => null,\n 'all_proxy' => null,\n 'ALL_PROXY' => null\n ]);\n }",
"protected function setUp(): void\n {\n $this->request = new CreateDomain();\n }",
"public function setUp()\n {\n if ( ! $this->app)\n {\n $this->refreshApplication();\n }\n }",
"protected function setUp()\n {\n Kohana::config('database')->default = Kohana::config('database')\n ->unit_testing;\n Auth::instance()->login(TEST_USERNAME, TEST_PASSWORD);\n\n // Index data and start up the search daemon\n exec('indexer --all --config ' . SPHINX_CONF);\n exec('searchd --config ' . SPHINX_CONF);\n }",
"protected function SetUp(): void\n {\n parent::setUp();\n $user = factory(User::class)->create();\n $this->be($user);\n }",
"public static function setupBeforeClass()\n\t// @codingStandardsIgnoreEnd\n\t{\n\t\tself::$old_modules = Kohana::modules();\n\n\t\t$new_modules = self::$old_modules+[\n\t\t\t'test_views' => realpath(dirname(__FILE__).'/../test_data/')\n\t\t];\n\t\tKohana::modules($new_modules);\n\t}",
"public function setUp(): void\n {\n // https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials_environment.html\n putenv('AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE');\n putenv('AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY');\n }",
"protected function setUp() {\n\n $this->client = new Client(['base_uri' => getenv('API_ADDR')]);\n $this->locIDs = $this->insertTestLocations();\n reuse_generateXML();\n }",
"protected function setUp(): void\n\t{\n\t\t$this->object = new SmartyAdapter;\n\t}",
"private function setup()\n {\n $home = getenv('PHLEXGET_HOME');\n $cacheDir = getenv('PHLEXGET_CACHE_DIR');\n if (!$home) {\n if (defined('PHP_WINDOWS_VERSION_MAJOR')) {\n $home = strtr(getenv('APPDATA'), '\\\\', '/') . '/Phlexget';\n } else {\n $home = rtrim(getenv('HOME'), '/') . '/.phlexget';\n }\n }\n if (!$cacheDir) {\n if (defined('PHP_WINDOWS_VERSION_MAJOR')) {\n if ($cacheDir = getenv('LOCALAPPDATA')) {\n $cacheDir .= '/Phlexget';\n } else {\n $cacheDir = getenv('APPDATA') . '/Phlexget/cache';\n }\n $cacheDir = strtr($cacheDir, '\\\\', '/');\n } else {\n $cacheDir = $home.'/cache';\n }\n }\n\n // Protect directory against web access. Since HOME could be\n // the www-data's user home and be web-accessible it is a\n // potential security risk\n foreach (array($home, $cacheDir) as $dir) {\n if (!file_exists($dir . '/.htaccess')) {\n if (!is_dir($dir)) {\n @mkdir($dir, 0777, true);\n }\n @file_put_contents($dir . '/.htaccess', 'Deny from all');\n }\n }\n\n $this->homeDir = $home;\n $this->cacheDir = $cacheDir;\n }",
"public function setUp()\n\t{\n\t\t$this->prepare_tables(\n\t\t\t'Model_User', \n\t\t\t'Model_Role', \n\t\t\t'Model_Roles_Users', \n\t\t\t'Model_User_Token'\n\t\t\t);\n\t}",
"public function setUp(): void\n {\n parent::setUp();\n $this->setupTestDatabase();\n\n if ($this->usingInMemoryDatabase()) {\n\n // Setup database, then setup User & default role\n $this->refreshDatabase();\n $this->setupUser();\n } elseif (!static::$initialized) {\n\n // Only refresh db once\n $this->refreshDatabase();\n static::$initialized = true;\n }\n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->setUpToolsAliases(true);\n $this->setUpToolsModels();\n $this->setUpToolsDB();\n }",
"private function setupApplicationEnvironment(){\n\n // TODO: MAKE MORE EFFICENT WITH CACHING\n if($this->version == null)\n $this->version = env('PAYPAL_VERSION', 'dev-2.0-beta');\n\n if($this->endpoint == null)\n $this->endpoint = env('PAYPAL_ENDPOINT');\n \n if($this->username == null)\n $this->username = env('PAYPAL_USERNAME');\n\n if($this->password == null)\n $this->password = env('PAYPAL_PASSWORD');\n\n if($this->signature == null)\n $this->signature = env('PAYPAL_SIGNATURE');\n\n if($this->isDirect == null)\n $this->isDirect = env('PAYPAL_DIRECT', true);\n\n if($this->payment_method == null) \n $this->payment_method = ($this->isDirect) ? Objects::CREDIT_CARD : env('PAYMENT_METHOD');\n\n // Set our enviornment based on production or development\n $this->environment = (!$this->isDevelopment) ? new ProductionEnvironment() : new SandboxEnvironment();\n\n $this->client = new PayPalHttpClient($this->environment);\n\n }",
"protected function setUp(): void\n {\n $this->container = new Container();\n }",
"public function init()\n {\n $this->setEnv();\n }",
"public final function setUp() {\n\t\t// run the default setUp() method first\n\t\tparent::setUp();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp()\n {\n $this->fs = new Filesystem();\n $this->cacheDir = __DIR__ . '/cache';\n if ($this->fs->exists($this->cacheDir)) {\n $this->fs->remove($this->cacheDir);\n }\n\n $this->cache = new ConfigFileScriptCache($this->cacheDir, true);\n }",
"public function setUp(): void\n\t{\n\t\t$this->auth = new Arifrh\\Auth\\Auth();\n\t\t$this->auth->testMode();\n\t}",
"public function setUp() : void\n {\n Config::setCategory('paths', [\n 'configs' => realpath(__DIR__ . '/../../configs'),\n 'root' => realpath(__DIR__ . '/../../../../../..'),\n 'src' => realpath(__DIR__ . '/../../../../../../src')\n ]);\n // Purposely set this to a weird value so we can test that it gets overwritten with the \"test\" environment\n $this->environment = new Environment();\n $this->container = new Container();\n $this->container->bindInstance(Environment::class, $this->environment);\n $this->container->bindInstance(BootstrapperCache::class, $this->createMock(BootstrapperCache::class));\n $this->container->bindInstance(RouteCache::class, $this->createMock(RouteCache::class));\n $this->container->bindInstance(ViewCache::class, $this->createMock(ViewCache::class));\n $this->container->bindInstance(IMigrator::class, $this->createMock(IMigrator::class));\n $this->container->bindInstance(FixMigrationsCommand::class, $this->createMock(FixMigrationsCommand::class));\n $this->container->bindInstance(IContainer::class, $this->container);\n\n // Setup the bootstrappers\n $bootstrapperRegistry = new BootstrapperRegistry();\n $bootstrapperDispatcher = new BootstrapperDispatcher(\n $this->container,\n $bootstrapperRegistry,\n new BootstrapperResolver()\n );\n $bootstrapperRegistry->registerEagerBootstrapper(self::$bootstrappers);\n $bootstrapperDispatcher->dispatch(false);\n\n parent::setUp();\n }",
"public function setUp()\n {\n\n $this->XMLtools = GeneralUtility::makeInstance(XmlTools::class);\n }",
"protected function setUp(): void\n {\n if (!$this->slim) {\n $this->refreshApplication();\n }\n\n Facade::clearResolvedInstances();\n }",
"function setUp() {\n\t\t\n\t}",
"function setUp() {\n\t\t\n\t}",
"protected function setUp(): void\n {\n\n parent::setUp();\n\n // Code after application created.\n $this->withoutExceptionHandling();\n }",
"protected function setUp(): void {\n\t\trequire_once( dirname( __FILE__ ) . '/../vendor/aliasapi/frame/client/create_client.php' );\n\t\trequire_once( dirname( __FILE__ ) . '/TestHelpers.php' );\n\t\trequire_once( dirname( __FILE__ ) . '/TestParameters.php' );\n\n\t\tTestHelpers::prepareDatabaseConfigs();\n\t\tClient\\create_client( 'money' );\n\n\t\t$this->http_client = new GuzzleHttp\\Client( [ 'base_uri' => 'http://money/' ] );\n\t\t$this->process_tag = 'refund_purchase_from';\n\t\t$this->tag = 'refund_purchase_to';\n\t}",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->setUpToolsAliases(true);\n $this->setUpToolsRoutes();\n $this->setUpToolsModels();\n }",
"protected function setUp()\n {\n parent::setUp();\n $this->prepareContextApiMock();\n }",
"protected function setup() {\n $this->state[\"user\"] = $this->env->get_test_user();\n $this->env->log_user_in($this->state[\"user\"]->username);\n $this->state[\"fields\"] = array(\n \"token\" => str_repeat(\"0\", 64),\n \"uuid\" => str_repeat(\"0\", 36)\n );\n }",
"public final function setUp() {\n\t\t//run the default setUp() method first\n\t\tparent::setUp();\n\t}",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->setPaths();\n\n $this->files = new Filesystem();\n\n if (!is_dir(env_path())) {\n mkdir(env_path());\n }\n\n copy(__DIR__ . '/../.env.example',env_path('.env'));\n\n $this->artisan('vendor:publish',['--provider' => 'Gecche\\Multidomain\\Foundation\\Providers\\DomainConsoleServiceProvider']);\n\n\n }",
"public function setup() {}",
"public static function setUpBeforeClass(): void\n {\n // boot kernel, so we have access to self::$kernel\n self::bootKernel();\n }",
"private function _initEnvironment()\n {\n App_Utf8::clean_globals();\n App_Input::instance();\n ini_set('log_errors', true);\n if('development' === APPLICATION_ENV){\n ini_set('display_errors', true);\n error_reporting(E_ALL | E_STRICT);\n }\n else{\n ini_set('display_errors', false);\n error_reporting(E_COMPILE_ERROR | E_RECOVERABLE_ERROR | E_ERROR | E_CORE_ERROR);\n }\n umask(0);\n }",
"function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t\n\t\t// Set up fixture\n\t\tif($fixtureFile) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(),0,5) != 'tmpdb') {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\t// This code is a bit misplaced; we want some way of the whole session being reinitialised...\n\t\t\tVersioned::reading_stage(null);\n\n\t\t\tsingleton('DataObject')->flushCache();\n\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// We have to disable validation while we import the fixtures, as the order in\n\t\t\t// which they are imported doesnt guarantee valid relations until after the\n\t\t\t// import is complete.\n\t\t\t$validationenabled = DataObject::get_validation_enabled();\n\t\t\tDataObject::set_validation_enabled(false);\n\t\t\t$this->fixture = new YamlFixture($fixtureFile);\n\t\t\t$this->fixture->saveIntoDatabase();\n\t\t\tDataObject::set_validation_enabled($validationenabled);\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t}",
"protected function setUp(): void\n {\n // store current error_reporting value as we may change it\n // in a test\n $this->currentErrorReporting = error_reporting();\n $this->statement = new Statement();\n }",
"public function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$this->user = \\Orchestra\\Model\\User::find(1);\n\t\t$this->stub = \\Orchestra\\Memory::make('user');\n\t}",
"public function setUp()\n {\n $_SERVER['REQUEST_URI'] = 'testing';\n $_SERVER['HTTP_REFERER'] = 'https://beta.gac.edu/billy/concert/newPage.php?concert=edit';\n TestBase::$pdo = $this->getDBH();\n\n\n if (!is_dir(self::$testFileDir . 'drafts')) {\n mkdir(self::$testFileDir . 'drafts');\n }\n if (!is_dir(self::$testFileDir . 'staged')) {\n mkdir(self::$testFileDir . 'staged');\n }\n if (!is_dir(self::$testFileDir . 'editableDrafts')) {\n mkdir(self::$testFileDir . 'editableDrafts');\n }\n parent::setUp();\n }"
] | [
"0.82813984",
"0.74528134",
"0.7089828",
"0.70875514",
"0.70170575",
"0.6992361",
"0.69501555",
"0.69016063",
"0.68578815",
"0.68517196",
"0.67532045",
"0.6745241",
"0.66899645",
"0.66775244",
"0.66723675",
"0.66720474",
"0.66672695",
"0.6664573",
"0.66530484",
"0.6621275",
"0.66052294",
"0.6586838",
"0.6569927",
"0.6564797",
"0.65580237",
"0.6549625",
"0.6537021",
"0.6533253",
"0.6523322",
"0.6517705",
"0.6516456",
"0.6516456",
"0.65087736",
"0.65087736",
"0.6503033",
"0.6499309",
"0.6494563",
"0.64781415",
"0.64701045",
"0.64662117",
"0.64657897",
"0.64611566",
"0.64486873",
"0.6448322",
"0.6445888",
"0.6434634",
"0.6411992",
"0.64073044",
"0.6399699",
"0.6392837",
"0.63891983",
"0.63878137",
"0.63824016",
"0.63824016",
"0.63777095",
"0.6377384",
"0.6368583",
"0.63553196",
"0.6354186",
"0.63517594",
"0.6349203",
"0.633755",
"0.6335843",
"0.63342345",
"0.63243425",
"0.6323792",
"0.6319844",
"0.63151294",
"0.6313283",
"0.6312168",
"0.63091224",
"0.63077986",
"0.63036865",
"0.62940365",
"0.62847257",
"0.62820375",
"0.62820375",
"0.62820375",
"0.62820375",
"0.62820375",
"0.6281775",
"0.62817514",
"0.62791175",
"0.62747574",
"0.62742716",
"0.6271401",
"0.6271401",
"0.62703717",
"0.62697256",
"0.62681496",
"0.6267704",
"0.6265818",
"0.626359",
"0.62584144",
"0.6257126",
"0.62564975",
"0.62553483",
"0.6250126",
"0.625009",
"0.6250073",
"0.62484694"
] | 0.0 | -1 |
Cleans up the environment after running a test. | protected function tearDown()
{
parent::tearDown();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function tearDown(): void\n {\n unset($_SERVER['foo'], $_ENV['foo']);\n }",
"public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }",
"protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }",
"public function tearDown()\n {\n $this->flushModelEventListeners();\n parent::tearDown();\n unset($this->app);\n\n /*\n * Restore environment\n */\n if (file_exists(base_path($this->envTestingFile())) && file_exists(base_path('.env.backup'))) {\n $this->restoreEnvironment();\n }\n }",
"public function tearDown()\n {\n $this->app = null;\n }",
"public function tearDown(): void {\n // Remove any temporary directories that were created.\n $filesystem = new Filesystem();\n foreach ($this->tmpDirs as $dir) {\n $filesystem->remove($dir);\n }\n // Clear out variables from the previous pass.\n $this->tmpDirs = [];\n $this->io = NULL;\n // Clear the composer cache dir, if it was set\n putenv('COMPOSER_CACHE_DIR=');\n }",
"protected function tearDown(): void {\n unset($this->integration);\n unset($this->ccm);\n unset($this->session);\n }",
"protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test data\n\t\tunset($modSettings);\n\t}",
"public function tearDown()\n {\n unset($this->psrContextFactory);\n }",
"protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }",
"protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }",
"public function tearDown()\n {\n unset($this->_standardLib);\n unset($this->_daughter);\n }",
"function __destruct() {\n if ($this->testDir) {\n $this->eraseTempDir();\n }\n $this->unsetMockSession();\n }",
"protected function tearDown() {\n $this->stack = null;\n }",
"protected function tearDown(): void\n {\n $this->tearDownTheTestEnvironment();\n }",
"public function tearDown() {\n $this->container = null;\n $this->model = null;\n $this->request = null;\n $this->response = null;\n $this->responseHeaders = null;\n $this->responseWriter = null;\n }",
"public function tearDown(): void\n {\n parent::tearDown();\n unset($this->filesystem);\n unset($this->diskSpace);\n unset($this->commandTester);\n }",
"public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }",
"public function tearDown(): void\n {\n parent::tearDown();\n unset($this->purifier);\n unset($this->em);\n unset($this->objectiveManager);\n unset($this->learningMaterialManager);\n unset($this->courseLearningMaterialManager);\n unset($this->sessionLearningMaterialManager);\n unset($this->sessionDescriptionManager);\n unset($this->commandTester);\n }",
"protected function setUp()\n {\n parent::setUp();\n\n $this->cleanup();\n }",
"public function tearDown() {\n $this->container = null;\n }",
"protected function tearDown() {\n\t\t$this->Application = null;\n\t\tparent::tearDown ();\n\t}",
"public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function teardown()\n {\n //\n }",
"protected function tearDown(): void\n {\n $this->provider = null;\n $this->response = null;\n }",
"public function teardown()\n {\n }",
"protected function tearDown()\n {\n session_destroy(); //req'd because Kml class sets a cookie\n $this->clearRequest();\n $this->clearTmpFiles();\n }",
"public function tearDown()\n {\n parent::tearDown();\n\n if ((bool) getenv('CLEANUP_TEST_DOCKER_SECRETS')) {\n DockerSecretFile::cleanup();\n }\n }",
"public function tearDown()\n {\n $fs = new SymfonyFileSystem();\n $fs->remove($this->fakeTestFileDir);\n\n unset($this->builder);\n unset($this->builder);\n unset($this->fs);\n m::close();\n }",
"protected function tearDown()\n {\n \\RPI\\Foundation\\Helpers\\FileUtils::delTree(__DIR__.\"/LESSPHPTest/ROOT\");\n }",
"protected function tearDown()\n {\n if ($this->app) {\n foreach ($this->beforeApplicationDestroyedCallbacks as $callback) {\n call_user_func($callback);\n }\n }\n\n $this->setUpHasRun = false;\n\n if (property_exists($this, 'serverVariables')) {\n $this->serverVariables = [];\n }\n\n if (class_exists('Mockery')) {\n Mockery::close();\n }\n\n $this->afterApplicationCreatedCallbacks = [];\n $this->beforeApplicationDestroyedCallbacks = [];\n }",
"protected function tearDown()\n {\n self::delTree(__DIR__.'/playground');\n }",
"protected function tearDown()\n {\n $this->compilerPass = null;\n $this->container = null;\n parent::tearDown();\n }",
"protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }",
"protected function tearDown()\n {\n $this->kernel->shutdown();\n $this->kernel = null;\n parent::tearDown();\n }",
"protected function tearDown() {\r\n\t\tunset ( $this->configReader );\r\n\t}",
"public function tearDown() {\n $this->command = null;\n }",
"protected function tearDown() {\n\n $this->client = null;\n $this->deleteTestLocations();\n $this->locIDs = null;\n reuse_generateXML();\n }",
"public function tearDown()\n {\n unset(\n $this->plugins,\n $this->events,\n $this->connection,\n $this->config\n );\n }",
"protected function tearDown()\n {\n $this->calculator = NULL;\n }",
"public function tearDown() {\n $this->resource = null;\n $this->response = null;\n $this->database = null;\n $this->storage = null;\n $this->event = null;\n $this->manager = null;\n }",
"public static function tearDownAfterClass()\n {\n if (null !== static::$kernel) {\n static::$kernel->shutdown();\n }\n }",
"public function tearDown(): void\n {\n parent::tearDown();\n\n Mockery::close();\n\n unset($this->faker, $this->waqi);\n }",
"public function tearDown()\n {\n unset($this->filterRepositoryMock);\n unset($this->notificationContextManagerMock);\n unset($this->notificationTranslatorMock);\n unset($this->filterManager);\n }",
"public static function tearDownAfterClass() {\n \t\tApp::build();\n \t}",
"protected function tearDown() {\n\t\tparent::tearDown();\n\n\t\t$this->cleanupTestDirectory();\n\t}",
"protected function tearDown(): void\n {\n Storage::disk('work_dir')->delete('containers');\n parent::tearDown();\n }",
"protected function tearDown()\n {\n Phlash::clear();\n }",
"public function tearDown() {\n\t\tFixtures::clear('db');\n\t\tGalleries::reset();\n\t\tImages::reset();\n\t}",
"public static function tearDown()\n {\n self::init();\n\n // Handle current_user placing on the end since there are some things\n // that need current user for the clean up\n if (isset(self::$registeredVars['current_user'])) {\n $cu = self::$registeredVars['current_user'];\n unset(self::$registeredVars['current_user']);\n self::$registeredVars['current_user'] = $cu;\n }\n\n // unregister variables in reverse order in order to have dependencies unregistered after dependants\n $unregisterVars = array_reverse(self::$registeredVars);\n foreach ($unregisterVars as $varName => $isCalled) {\n if ($isCalled) {\n unset(self::$registeredVars[$varName]);\n if (method_exists(__CLASS__, 'tearDown_' . $varName)) {\n call_user_func(__CLASS__ . '::tearDown_' . $varName, array());\n } elseif (isset($GLOBALS[$varName])) {\n unset($GLOBALS[$varName]);\n }\n }\n }\n\n // Restoring of system variables\n foreach (self::$initVars as $scope => $vars) {\n foreach ($vars as $name => $value) {\n $GLOBALS[$name] = $value;\n }\n }\n\n // Restore the activity stream.\n Activity::enable();\n\n // Restoring of theme\n SugarThemeRegistry::set(self::$systemVars['SugarThemeRegistry']->dirName);\n SugarCache::$isCacheReset = false;\n\n return true;\n }",
"public function tearDown()\n\t{\n\t\tunset($this->target);\n\t}",
"protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\r\n\t\tparent::tearDown ();\r\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}",
"public function cleanUp();",
"public function cleanUp();"
] | [
"0.7499918",
"0.7465399",
"0.7313867",
"0.7240087",
"0.72257245",
"0.72239214",
"0.71817493",
"0.71759856",
"0.7174705",
"0.71517044",
"0.71517044",
"0.715084",
"0.71412283",
"0.7115216",
"0.71096313",
"0.7072444",
"0.70685935",
"0.7056217",
"0.7027916",
"0.7005705",
"0.70002717",
"0.6995618",
"0.69926155",
"0.69753027",
"0.69753027",
"0.69753027",
"0.69753027",
"0.69753027",
"0.69753027",
"0.69753027",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69742393",
"0.69742393",
"0.69742393",
"0.69742393",
"0.69742393",
"0.69742393",
"0.6961158",
"0.69544494",
"0.69416827",
"0.69331",
"0.69323254",
"0.6930772",
"0.6916635",
"0.6914887",
"0.6910421",
"0.6900625",
"0.6870975",
"0.6865799",
"0.6861332",
"0.686042",
"0.68589056",
"0.68566346",
"0.68304664",
"0.68121403",
"0.6803723",
"0.67923385",
"0.6791619",
"0.67826396",
"0.6782222",
"0.6779438",
"0.6772402",
"0.67696434",
"0.6767691",
"0.67665786",
"0.67603624",
"0.67598873",
"0.67574733",
"0.67574733"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$admins = User::orderBy('id', 'asc')->get();
return view('adminLayouts.manageLayouts.index', compact('admins'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('adminLayouts.manageLayouts.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)
{
$request->validate([
'name' => 'required|string|max:255|min:3',
'username' => 'required|string|max:50|min:3|unique:users',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:8|confirmed'
]);
User::create([
'role_id' => $request->input('role'),
'name' => $request->input('name'),
'username' => $request->input('username'),
'email' => $request->input('email'),
'password' => Hash::make($request->input('password')),
]);
$admins = User::orderBy('id', 'asc')->get();
return view('adminLayouts.manageLayouts.index', compact('admins'));
die();
} | {
"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 |
Show the form for editing the specified resource. | public function edit($id)
{
$id = request()->segment(5);
$admin = User::find($id);
return view('adminLayouts.manageLayouts.edit', compact('admin'));
} | {
"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)
{
User::where('id', $id)->update([
'role_id' => $request->input('role'),
'name' => $request->input('name'),
'username' => $request->input('username'),
'email' => $request->input('email'),
]);
$admins = User::orderBy('id', 'asc')->get();
return redirect()->route('admin.manage', [
'locale' => app()->getLocale(),
'admins' => $admins,
]);
die();
} | {
"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)
{
$admin = User::find($id);
$adminCountBeforeDelete = User::count();
$admin->delete();
$adminCountAfterDelete = User::count();
if ($adminCountAfterDelete < $adminCountBeforeDelete) {
return redirect()->back();
} else {
abort(404);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Get the value of id | public function getId()
{
return $this->id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getId(){\n\t\t\treturn $this->$id;\n\t\t}",
"public function getId()\n {\n return $this->getValue('id');\n }",
"public function getId() {\n\t\treturn $this -> data['id'];\n\t}",
"function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}",
"function getID() {\n\t\treturn $this->data_array['id'];\n\t}",
"public function getId(){\n return $this->_data['id'];\n }",
"public function get_id();",
"public function get_id();",
"public function getId() {\r\n\t\treturn $this->data['id'];\r\n\t}",
"function getId() {\n\t\treturn $this->getData('id');\n\t}",
"function getId() {\n\t\treturn $this->getData('id');\n\t}",
"public function getid(){\n\t\t\treturn $this->id;\n\t\t}",
"public function value($id)\n\t{\n\t\treturn $this->connection()->get(\"element/$id/value\");\n\t}",
"public function get_id(){\n\t\treturn $this->id;\n\t}",
"public function getId() : string{\n return $this->id;\n }",
"public function getId() : string{\n return $this->id;\n }",
"public function getId() : string\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }",
"function get_id() {\n\t\treturn $this->id;\n\t}",
"public function getID();",
"public function getID();",
"public function getID();",
"function get_id() {\n return $this->get_mapped_property('id');\n }",
"public static function id(){\n return self::info('id');\n }",
"public function getid() {\n\t\treturn $this->id;\n\t}",
"public function getID()\n { return $this->get('id'); }",
"function get_id() {\n\t\treturn $this->id;\n\n\t}",
"public function getid()\n {\n return $this->id;\n }",
"public function getid()\n {\n return $this->id;\n }",
"public function get_id(){\n return $this->id;\n }",
"function get_id() {\n return $this->id;\n }",
"public function getId(){\n\t\t\treturn $this->id;\n\t\t}",
"public function getId(){\n\t\t\treturn $this->id;\n\t\t}",
"public function getId(){\n\t\t\treturn $this->id;\n\t\t}",
"public function getId(){\n\t\t\treturn $this->id;\n\t\t}",
"static function id()\n\t{\n\t\treturn self::data('id');\n\t}",
"public function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId(){\r\n\t\t\treturn $this->id;\r\n\t\t}",
"public function getId(){\r\n\t\treturn $this->id;\r\n\t}",
"public function getIdVit(){\n\t\treturn ($this->id);\n\t}",
"public static function get()\n {\n return self::$id;\n }",
"public function getId()\n {\n $value = $this->get(self::ID);\n return $value === null ? (string)$value : $value;\n }",
"function getId() {\n\t\treturn $this->id;\n\t}",
"function getId();",
"public function getValueId()\n {\n return $this->valueId;\n }",
"function get_id()\n {\n return $this->id;\n }",
"function get_id()\r\n {\r\n return $this->id;\r\n }",
"function getId(){\n\t\treturn $this->id;\n\t}",
"function getId(){\n\t\treturn $this->id;\n\t}",
"function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId() ;",
"public function get_id () {\r\n\t\treturn $this->id;\r\n\t}",
"public function getId() {\n return @$this->attributes['id'];\n }",
"public function getId() {\n return @$this->attributes['id'];\n }",
"function get() {\n if (!empty($this->_id)) {\n return $this->_id;\n }\n return '';\n }",
"abstract public function get_id();",
"function get_id(){\n return $this -> id;\n }",
"function get_id(){\n return $this -> id;\n }",
"public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}",
"public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}",
"public function getID(){\n \treturn $this->id;\n }",
"public function get($id) {\n return $this->currentValues[$id];\n }",
"public function getId()\n { return $this->getAttribute('id'); }",
"public function getID(): string;",
"function get_id()\n\t{\n\t\treturn $this->id;\n\t}",
"public function getId(): mixed;",
"public function getId()\n { // getter ID\n return $this->id;\n }",
"public function getId()\n {\n return $this['id'];\n }",
"public function id() {\n return $this->id;\n }",
"public function getId() {}",
"public function getId() {}",
"public function getid()\n {\n return $this->Id;\n }",
"public function getId()\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }",
"public function getID() : string;",
"public function getId()\n\t{\n\t\treturn $this->id; \n\n\t}",
"public function getId()\n {\n return $this->getData(self::ID);\n }",
"public function id(): string\n {\n return $this->getAttribute('id');\n }",
"function id():string {return $this->_p['_id'];}",
"public function get_id() {\n return $this->id;\n }",
"public function get_id() {\n return $this->id;\n }",
"public function get_id() {\n return $this->id;\n }",
"public function id()\n {\n return $this->id;\n }",
"public function id()\n {\n return $this->id;\n }",
"public function id()\n {\n return $this->id;\n }",
"public function id()\n {\n return $this->id;\n }",
"private function getId() {\n return Xss::filter($this->request->get('id'));\n }",
"public function getId() : string {\n return $this->id;\n }",
"public function getID()\n {\n return $this->formattedData['id'];\n }",
"function getId()\r\n\t\t{\r\n\t\t\treturn $this->id;\r\n\t\t\t\r\n\t\t}",
"public function getId():string {\n return $this->id;\n }",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}"
] | [
"0.77531433",
"0.75790346",
"0.7551146",
"0.74920887",
"0.7472376",
"0.7445116",
"0.7433321",
"0.7433321",
"0.74298936",
"0.7415067",
"0.7415067",
"0.732741",
"0.7291388",
"0.72722006",
"0.7259057",
"0.7259057",
"0.7255057",
"0.7253809",
"0.72535557",
"0.72535557",
"0.72535557",
"0.72478676",
"0.7239034",
"0.7214735",
"0.7207342",
"0.72061116",
"0.7202167",
"0.7202167",
"0.7191623",
"0.7179009",
"0.7162689",
"0.7162689",
"0.7162689",
"0.7162689",
"0.7156056",
"0.7142556",
"0.7142556",
"0.7142556",
"0.7142556",
"0.7142556",
"0.7142064",
"0.71383333",
"0.71373826",
"0.7133959",
"0.71320766",
"0.712474",
"0.711623",
"0.7115175",
"0.7114791",
"0.71101403",
"0.7102386",
"0.7102386",
"0.7102386",
"0.7091067",
"0.70898867",
"0.708427",
"0.708427",
"0.7076914",
"0.7074607",
"0.7059175",
"0.7059175",
"0.705889",
"0.705889",
"0.7057164",
"0.7053134",
"0.705276",
"0.70520186",
"0.7050234",
"0.7041468",
"0.7041224",
"0.7039091",
"0.7035577",
"0.70308214",
"0.70308214",
"0.7025611",
"0.70220804",
"0.7018659",
"0.7014001",
"0.7010808",
"0.7003174",
"0.70012575",
"0.69916296",
"0.69916296",
"0.69916296",
"0.69893074",
"0.69893074",
"0.69893074",
"0.69893074",
"0.69839543",
"0.6982348",
"0.69735116",
"0.6972415",
"0.6970156",
"0.69687396",
"0.69687396",
"0.69687396",
"0.69687396",
"0.69687396",
"0.69687396",
"0.69687396",
"0.69687396"
] | 0.0 | -1 |
Get the value of userId | public function getUserId()
{
return $this->userId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getUserId() {\n\t\treturn $this->getData('userId');\n\t}",
"public function getUserId ()\n {\n return $this->storage->get(self::$prefix . 'userId');\n }",
"public function getUserId()\n {\n return parent::getValue('user_id');\n }",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getuserId()\n {\n return $this->userId;\n }",
"public function getUserId(): string;",
"public function getUserId() {\n return($this->userId);\n }",
"public function getUserId () {\n\t\treturn ($this->userId);\n\t}",
"public function getUserId()\r\n {\r\n return $this->userId;\r\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"protected function getUserId() {}",
"protected function getUserId() {}",
"public function getUserId() {\n return $this->userId;\n }",
"public function getUserId() {\n return $this->userId;\n }",
"public function getUserId()\n {\n $this->checkIfKeyExistsAndIsInteger('user_id');\n\n return $this->data['user_id'];\n }",
"public function getUserId(){\n return $this->UserId;\n }",
"public function getUserId() {\n\t\treturn ($this->userId);\n\t}",
"public function getUserId() {\n\t\treturn($this->userId);\n\t}",
"public function getUserId()\n {\n return $this->userid;\n }",
"public function getUserId()\n {\n return $this->userid;\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return($this->userId);\n }",
"public function get_userId()\n {\n return $this->_userId;\n }",
"public function getUserId() {\n\t\treturn $this->userId;\n\t}",
"public function getUserId()\n {\n return $this->_userId;\n }",
"public function getUserId()\n {\n return $this->_userId;\n }",
"public function getUserId()\n {\n return $this->_userId;\n }",
"public function getUserId()\n {\n return $this->UserId;\n }",
"public function getUserId()\n\t{\n\t\treturn $this->evaluateExpression($this->getUserIdExpression);\n\t}",
"public function getUserId()\n {\n return $this->getValue('nb_user_id');\n }",
"public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }",
"public function getUserId() {\n return $this->user_id;\n }",
"public function getUserId() {\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 }",
"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->userId;\n }",
"public function getUserId()\n {\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 }",
"public function getUserId() {\n\t\treturn $this->user_id;\n\t}",
"public function getuserId()\n {\n return $this->_UserId;\n }",
"function get_userid() {\n return $this->userid;\n }",
"public function getUserId()\n {\n return $this->id;\n }",
"public function getUserId()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_ID);\n }",
"abstract protected function getUserId() ;",
"public function getUserID(){\n return($this->userID);\n }",
"public function getUserId(): int\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return (int) $this->_getVar('user_id');\n }",
"public function getUserId(){\n return $this->u_id;\n }",
"public function getUserId()\n {\n return $this->idTokenClaims[$this->userIdKey] ?? null;\n }",
"protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }",
"public function getUserId() \n {\n if (!$this->hasUserId()) \n {\n $this->userId = 0;\n }\n\n return $this->userId;\n }",
"public function getUserId(): ?string;",
"public function get_user_id();",
"public function getUserId() : int\n {\n return $this->userId;\n }",
"Public Function UserId() {\n\t\treturn $this->userId;\n\t\n\t}",
"public function getUserId()\n\t{\n\t\t$column = self::COL_USER_ID;\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}"
] | [
"0.84530276",
"0.83761144",
"0.8282258",
"0.8251538",
"0.8251538",
"0.8251538",
"0.8251538",
"0.8251538",
"0.8251538",
"0.8251538",
"0.8251538",
"0.8251538",
"0.81998295",
"0.8192698",
"0.8164337",
"0.81628764",
"0.8160796",
"0.81497985",
"0.81081927",
"0.81081927",
"0.80874896",
"0.80874896",
"0.80872315",
"0.80843484",
"0.808227",
"0.80372393",
"0.8027102",
"0.8027102",
"0.8025086",
"0.8025086",
"0.8025086",
"0.8025018",
"0.8017665",
"0.8002581",
"0.79964983",
"0.79935956",
"0.79430205",
"0.79430205",
"0.79430205",
"0.7933814",
"0.7932695",
"0.79264736",
"0.79224795",
"0.79214525",
"0.79214525",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.7920589",
"0.79116553",
"0.78979445",
"0.78702027",
"0.78672343",
"0.78615975",
"0.785049",
"0.784308",
"0.7842817",
"0.7833404",
"0.78323525",
"0.78105813",
"0.780332",
"0.7793087",
"0.77842444",
"0.7764888",
"0.77509576",
"0.771234",
"0.7700137",
"0.76878685",
"0.76813865",
"0.76692057"
] | 0.81289697 | 28 |
Get the value of title | public function getTitle()
{
return $this->title;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTitle()\n {\n return $this->getValue('title');\n }",
"public function getTitle()\n {\n return $this->getValue();\n }",
"public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}",
"public function title()\n {\n return $this->{static::$title};\n }",
"public function getTitle() {\n\t\treturn $this->title;\t\n\t}",
"public function get_title(){\n\t\treturn $this->title;\n\t}",
"public function get_title(){\n\t\treturn $this->title;\n\t}",
"public function title() { \n $title = $this->content()->get('title');\n if($title != '') {\n return $title;\n } else {\n $title->value = $this->uid();\n return $title;\n }\n }",
"public function getTitle(){\r\n\t\treturn $this->title;\r\n\t}",
"public function getTitle()\n {\n return $this->getData(self::TITLE);\n }",
"public function getTitle(){\r\n\t\t\treturn $this->title;\r\n\t\t}",
"public function getTitle(){\n\t\t\treturn $this->title;\n\t\t}",
"public function get_title()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle() {\r\n\t\treturn $this->title;\r\n\t}",
"function getTitle() {\n\t\treturn $this->title;\n\t}",
"public function gettitle()\n {\n return $this->title;\n }",
"public function getTitle() {\n\t\treturn $this->title;\n\t}",
"public function getTitle() {\n\t\treturn $this->title;\n\t}",
"public function getTitle() {\n\t\treturn $this->title;\n\t}",
"public function getTitle() {\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n {\n return $this->getData('title');\n }",
"public function getTitle()\n {\n return $this['title'];\n }",
"public function getTitle()\n {\n return $this->data['fields']['title'];\n }",
"public function getTitle()\n {\n return $this->get(self::_TITLE);\n }",
"public function getTitle()\n {\n return $this->get(self::_TITLE);\n }",
"public function getTitle() {\r\n\t\treturn $this->_title;\r\n\t}",
"public function get_title() { return $this->title; }",
"public function getTitle() {\n\t\treturn $this->_title;\n\t}",
"public function title()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\r\n {\r\n return $this->title;\r\n }",
"public function getTitle()\r\n {\r\n return $this->m_title;\r\n }",
"public function getTitle() {\n\t\t$field = $this->getTitleField();\n\t\treturn $field ? $field->getValue() : '';\n\t}",
"public function getTitle()\n {\n\t\treturn $this->title;\n\t}",
"function getTitle() {\n\t\treturn $this->_title;\n\t}",
"public function getTitle() {\r\n return $this->_title;\r\n }",
"public function get_title();",
"function get_title() {\n\t\treturn $this->settings['title'];\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getTitle() {\n return $this->title;\n }",
"public function getTitle() {\n return $this->title;\n }",
"public function getTitle() {\n return $this->title;\n }",
"public function getTitle() {\n return $this->title;\n }",
"public function getTitle() {\n return $this->title;\n }",
"public function getTitle() {\n return $this->title;\n }",
"public function getTitle() {\n return $this->title;\n }",
"public function getTitle() {\n return $this->title;\n }",
"public static function getTitle()\n {\n return self::$title;\n }",
"public function getTitleText()\n {\n return $this->title->nodeValue;\n }",
"public function getTitle() {\n\t\t\n\t\t\treturn $this->_title;\n\t\t\n\t\t}",
"public function getTitle() {\n\t\t\treturn $this->title;\n\t\t}",
"public function getTitle() {\n return $this->title;\n }",
"public function getTitle()\r\n\t{\r\n\t\treturn $this->_title;\r\n\t}"
] | [
"0.82995707",
"0.8291306",
"0.82038474",
"0.8115967",
"0.8109889",
"0.8095531",
"0.8095531",
"0.8092283",
"0.80683935",
"0.8064733",
"0.806069",
"0.8040775",
"0.8038859",
"0.8023465",
"0.8017808",
"0.8012197",
"0.8009827",
"0.8009827",
"0.8009827",
"0.8009827",
"0.8009409",
"0.80041426",
"0.79947495",
"0.79896724",
"0.79896724",
"0.7976416",
"0.79580367",
"0.79549575",
"0.79472804",
"0.79345775",
"0.7928978",
"0.7928309",
"0.79272246",
"0.792529",
"0.7917547",
"0.79104215",
"0.7906417",
"0.79031056",
"0.79031056",
"0.79031056",
"0.79031056",
"0.79031056",
"0.79031056",
"0.79031056",
"0.79031056",
"0.79031056",
"0.79031056",
"0.79031056",
"0.79031056",
"0.79021156",
"0.79021156",
"0.79021156",
"0.79021156",
"0.79021156",
"0.79021156",
"0.79021156",
"0.79021156",
"0.7894034",
"0.78935957",
"0.7890482",
"0.78864443",
"0.7880377",
"0.78543437"
] | 0.0 | -1 |
Set the value of title | public function setTitle($title)
{
$this->title = $title;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setTitle($value)\n {\n $this->_title = $value;\n }",
"public function setTitle($value)\n {\n $this->title = $value;\n }",
"function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}",
"function setTitle($title)\n {\n $this->m_title = $title;\n }",
"function setTitle( &$value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Title = $value;\n }",
"function setTitle($title) {\r\n $this->_title = $title;\r\n }",
"function setTitle($title) {\r\n $this->_title = $title;\r\n }",
"function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"public function set_title($title)\n {\n $this->title = $title;\n }",
"public function setTitle($value);",
"function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }",
"public function setTitle($title){\n $this->title = $title;\n }",
"public function setTitle($title) {\r\n $this->title = $title;\r\n }",
"public function setTitle($title) {\n $this->title = $title ;\n }",
"function setTitle($title) {\n\t\t$this->_title = $title;\n\t}",
"public function setTitle($title) {\r\n $this->_title = $title;\r\n }",
"public function setTitle($title){\n $this->title = $title;\n }",
"function setTitle($title)\r\n\t{\r\n\t\t$this->title = $title;\r\n\t}",
"public function setTitle($title){\n \t$this->title = $title;\n }",
"public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }",
"public function setTitle($title) {\n $this->_title = $title;\n }",
"function setTitle($title)\n {\n $this->title = $title;\n }",
"function setTitle($title)\n {\n $this->title = $title;\n }",
"function setTitle($title)\n {\n $this->title = $title;\n }",
"public function set_title($text){\n $this->title=$text;\n }",
"public function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"public function setTitle($newTitle) { $this->Title = $newTitle; }",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($val){ return $this->setField('title',$val); }",
"public function setTitle($title){\n $this->p_title = $title;\n }",
"public function setTitle($title)\r\n\t\t{\r\n\t\t\t$this->_title = $title;\r\n\t\t}",
"public function setTitle($title)\n {\n $this->setValue('title', $title);\n }",
"public function setTitle($title = '')\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title) {\n $this->title = $title;\n }",
"public function setTitle($title) {\n $this->title = $title;\n }",
"public function setTitle(string $value)\n {\n $this->title = $value;\n }",
"public function setTitle($title) {\n\t\t\n\t\t\t$this->_title = $title;\n\t\t\n\t\t}",
"public function setTitle($title) {\n $this->_title = $title;\n }",
"public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title)\n {\n $this->_title = $title;\n }",
"public function setTitle($title)\n {\n $this->_title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($var)\n {\n $this->_title = $var;\n }",
"public function set_title($title)\n {\n $this->set_default_property(self::PROPERTY_TITLE, $title);\n }",
"function setTitle( $title )\n {\n $title = trim( $title );\n $this->properties['TITLE'] = $title;\n }",
"public function setTitle($title = ''){\n $this->setVar('TITLE', $title);\n }",
"public function setTitle($title)\n {\n $this->title = (string) $title;\n }",
"public function setTitle($value)\n {\n if (!array_key_exists('title', $this->fieldsModified)) {\n $this->fieldsModified['title'] = $this->data['fields']['title'];\n } elseif ($value === $this->fieldsModified['title']) {\n unset($this->fieldsModified['title']);\n }\n\n $this->data['fields']['title'] = $value;\n }",
"public function setTitle(string $title);",
"function set_title($title) \r\n\t{\r\n\t\t//$this->title = $title;\r\n\t\t$this->data['title_for_layout'] = $title;\r\n\t\t$this;\r\n\t}",
"public function set_title($title){\n\t\t$this->set_channel_element('title', $title);\n\t}",
"public static function setTitle(string $title) {}",
"function setTitle($a_title)\n\t{\n\t\t$this->title = $a_title;\n\t}",
"public function setTitle(string $title) {\n\t\t$this->title = $title;\n\t}",
"public function setTitle( $newTitle )\n {\n\t\t$this->title = $newTitle;\n\t}",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($title)\n\t{\n\t\tif (!empty($title)) {\n\t\t\t$this->title = $title;\n\t\t}\n\t}",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($value)\n {\n return $this->set('Title', $value);\n }",
"public function setTitle($newTitle) {\n\t\t$this->title = $newTitle;\n\t}",
"function set_the_title($title) {\n\n md_set_the_title($title);\n \n }",
"public function setPageTitle($title);",
"function setHeaderTitle($value) {\n $this->header_title = $value;\n}",
"public function setTitle($title) {\n\t\t$title = str_replace(\"\\r\\n\", \"|\", $title);\n\t\t$title = str_replace(\" \", \"+\", $title);\n\t\t$this -> setProperty('chtt', $title);\n\t}",
"public function setTitle($value)\n {\n if (!is_string($value))\n throw new CException(Yii::t('EWebFeed', 'title must be a string'));\n $this->title = $value;\n }",
"public function setTitle(string $title): void {\n\t\t$this->m_title = $title;\n\t}",
"public function setTitle($val)\n {\n $this->_propDict[\"title\"] = $val;\n return $this;\n }",
"public function setTitle($val)\n {\n $this->_propDict[\"title\"] = $val;\n return $this;\n }",
"public function setTitle($val)\n {\n $this->_propDict[\"title\"] = $val;\n return $this;\n }",
"protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}",
"private function setTitle(\\Scrivo\\Str $title) {\n\t\t$this->title = $title;\n\t}",
"function SetTitle($title, $isUTF8 = false) {\n parent::SetTitle($title, $isUTF8);\n $this->title = ($isUTF8 ? utf8_encode($title) : $title);\n }",
"public function setTitle(string $title)\n {\n $this->title = $title;\n }",
"public function setTitle(string $title)\n {\n $this->title = $title;\n }"
] | [
"0.8617192",
"0.8556605",
"0.8322929",
"0.8255466",
"0.82530844",
"0.82464516",
"0.82464516",
"0.82444715",
"0.82316023",
"0.821708",
"0.8215294",
"0.82145464",
"0.8211219",
"0.82073224",
"0.8198277",
"0.81962633",
"0.8189961",
"0.81880856",
"0.8186093",
"0.8182676",
"0.8170643",
"0.8166512",
"0.8166512",
"0.8166512",
"0.81651485",
"0.8156611",
"0.8156611",
"0.8156611",
"0.81516427",
"0.81369233",
"0.81369233",
"0.81369233",
"0.81369233",
"0.81369233",
"0.81369233",
"0.81369233",
"0.8134668",
"0.8133517",
"0.811955",
"0.811565",
"0.8104054",
"0.810314",
"0.80992836",
"0.80992836",
"0.80854756",
"0.8073542",
"0.80717725",
"0.8071767",
"0.8071767",
"0.8060058",
"0.8060058",
"0.8057122",
"0.8057122",
"0.8057122",
"0.8057122",
"0.8057122",
"0.8057122",
"0.8046781",
"0.7977441",
"0.7960554",
"0.7952455",
"0.7926471",
"0.7899014",
"0.78969336",
"0.7892897",
"0.7890633",
"0.7889876",
"0.7839399",
"0.7832187",
"0.7822835",
"0.77970827",
"0.77970827",
"0.77970827",
"0.77970827",
"0.77970827",
"0.77970827",
"0.77970827",
"0.7795332",
"0.7794743",
"0.7794743",
"0.77939105",
"0.77939105",
"0.77939105",
"0.77939105",
"0.77939105",
"0.77939105",
"0.77800715",
"0.77780366",
"0.77482545",
"0.7727901",
"0.77045727",
"0.76989627",
"0.76851976",
"0.767327",
"0.767327",
"0.767327",
"0.76522905",
"0.76448977",
"0.76226556",
"0.7619858",
"0.7619858"
] | 0.0 | -1 |
Get the value of content | public function getContent()
{
return $this->content;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getValue(){\n return $this->_content;\n }",
"function getContent()\n {\n return $this->getAttribute(\"content\");\n }",
"function get_content() {\r\n\t\treturn $this->content;\r\n\t}",
"function getValue() { return $this->readText(); }",
"public function getContent(){\n\t\treturn $this->content;\n\t}",
"public function getContent()\n {\n return $this->data['fields']['content'];\n }",
"public function get_content() {\n return $this->content;\n }",
"public function getContent () {\r\n\t\treturn $this->content;\r\n\t}",
"function getValue() { return $this->readText(); }",
"public function get_content() {\n $event = Event::factory('response.get_content', array('content' => $this->_content))->notify_all();\n $data = $event->get_data();\n return $data['content'];\n }",
"function getContent()\n {\n return $this->content;\n }",
"function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n\t{\n\t\treturn $this->content_;\n\t}",
"public function getContent(): string\n {\n return strval($this->content);\n }",
"public function getContent()\r\n {\r\n return $this->content;\r\n }",
"function getContent()\n {\n return $this->content;\n\n }",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"public function content()\n {\n return $this->content;\n }",
"public function content()\n {\n return $this->content;\n }",
"public function content()\n {\n return $this->content;\n }",
"public function getContent() { return $this->content; }",
"public function getContent() {\r\n\t\treturn $this->content;\r\n\t}",
"public function getContent() {\n\t\treturn $this->current_content;\n\t}",
"protected function getContent() {\n return $this->content;\n }",
"public function getContent()\r\n {\r\n return $this->_content;\r\n }",
"public function getContent()\n\t{\n\t\treturn $this->content;\n\t}",
"public function getContent()\n\t{\n\t\treturn $this->content;\n\t}",
"public function getContent()\n\t{\n\t\treturn $this->content;\n\t}",
"public static function getContent() {\n\t\treturn self::$_content;\n\t}",
"public function getContent() {\n return $this->content;\n }",
"public function getContent()\n\t{\n\t\treturn $this->_content;\n\t}",
"public function getContent()\n\t{\n\t\treturn $this->_content;\n\t}",
"public function getContent(): string\n {\n return $this->content;\n }",
"public function getContent(): string\n {\n return $this->content;\n }",
"public function getContent(): string\n {\n return $this->content;\n }",
"public function getContent(): string\n {\n return $this->_content;\n }",
"public function Content()\n {\n return $this->content;\n }",
"public function getContent() : string {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->_content;\n }",
"public function getContent()\n {\n \t$content = $this->content;\n return $content;\n }",
"public static function get_content_returns() {\n return new external_value(PARAM_RAW, 'The course element content');\n }",
"public function content()\n {\n return $this->cache->get('content');\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function content(): string\n {\n return $this->content;\n }",
"public function getContent(): string\n {\n return $this->content->content();\n }",
"function get_contents(){\n return $this->input_content;\n }",
"public function getParsedContentAttribute()\n {\n return $this->attributes['content'];\n }",
"public function getText() {\n\t\t$text = $this->get('text', '');\n\t\treturn empty($text) ? $this->get('value', '') : $text;\n\t}",
"public function get()\n {\n return $this->contents;\n }",
"public function getContent() : string\n {\n return $this->content;\n }",
"public function getContent() : string\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->data;\n }",
"public function getContent(): string;",
"public function getContent(): string;",
"public function getValue() {\n\t\treturn $this->data[\"value\"];\n\t}",
"public function getContent()\n {\n return $this->get(self::_CONTENT);\n }",
"public function getContent()\n {\n return $this->get(self::_CONTENT);\n }",
"public function getContent()\n {\n return $this->get(self::_CONTENT);\n }",
"public static function getContent(): ?string\n {\n return self::$Content;\n }",
"public function getTextContent()\n\t{\n\t\treturn $this->text_content;\n\t}",
"function getTextContent() {\n\t\treturn $this->lobSub->lobText;\n\t}",
"public function content() {\n try {\n $r= '';\n while ($this->stream->available()) {\n $r.= $this->stream->read();\n }\n return $r;\n } finally {\n $this->stream->close();\n }\n }",
"public function getPageContent(): string {\n\t\treturn $this->m_pageContent;\n\t}",
"public function get_content() {\n\t\treturn $this->_post->post_content;\n\t}",
"function get_content() {\n\t\treturn $this->get_data( 'comment_content' );\n\t}",
"public function get_text_content() {\n\t\treturn $this->text_content;\n\t}",
"public function getTextContent()\n {\n return $this->content;\n }",
"public function getValue()\n\t{\n\t\treturn $this->data['value'];\n\t}",
"public function getData()\n\t{\n\t\ttry\n\t\t{\n\n\t\t\treturn $content;\n\t\t}\n\t\tcatch (RuntimeException $e)\n\t\t{\n\t\t\t\t$content = '';\n\t\t\treturn $content;\n\n\t\t}\n\n\t}",
"public function getContent()\n {\n // Look for value only if not already set\n if(!isset($this->content)) {\n $us = SemanticScuttle_Service_Factory::get('User');\n $user = $us->getUser($this->id);\n $this->content = $user['uContent'];\n }\n return $this->content;\n }",
"public function getTextContent();",
"public function getArticleContent(): string {\n\t\treturn ($this->articleContent);\n\t}",
"public function content() { return $this->post->post_content; }",
"public function value(): string\n {\n return $this->get('value');\n }",
"public function content()\n\t{\n\t\tif ($this->_content === null)\n\t\t\t$this->_content = file_get_contents('php://input');\n\n\t\treturn $this->_content;\n\t}",
"public function getContent($key) {\r\n\t\tif(isset($this->_content[$key])) {\r\n\t\t\treturn $this->_content[$key];\r\n\t\t} else {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}",
"public function getText(){\n\t\treturn $this->_text;\n\t}"
] | [
"0.85331315",
"0.74687165",
"0.73241013",
"0.7278748",
"0.72559625",
"0.7208305",
"0.71906906",
"0.71874195",
"0.7178343",
"0.71637803",
"0.71446687",
"0.71446687",
"0.7136236",
"0.7113005",
"0.70963526",
"0.7089355",
"0.70798546",
"0.70798546",
"0.70798546",
"0.7056765",
"0.7056765",
"0.7056765",
"0.7052786",
"0.7050183",
"0.7041994",
"0.7041198",
"0.70090175",
"0.700762",
"0.700762",
"0.700762",
"0.7005697",
"0.69694674",
"0.69584787",
"0.69584787",
"0.6941253",
"0.6941253",
"0.6941253",
"0.69322044",
"0.6926375",
"0.6922615",
"0.6918941",
"0.6907356",
"0.69041604",
"0.6900708",
"0.68934715",
"0.6888976",
"0.6882955",
"0.6839366",
"0.68088824",
"0.6804054",
"0.6790858",
"0.67898375",
"0.67898375",
"0.6748094",
"0.6724835",
"0.6724835",
"0.6717405",
"0.6709329",
"0.6709329",
"0.6709329",
"0.66936374",
"0.6680662",
"0.6672242",
"0.6665406",
"0.6661563",
"0.6654748",
"0.66380036",
"0.6634149",
"0.6617551",
"0.6583579",
"0.65747845",
"0.65701735",
"0.65661913",
"0.65523916",
"0.6547972",
"0.65394145",
"0.65349555",
"0.65199405",
"0.65191156"
] | 0.69578254 | 55 |
Set the value of content | public function setContent($content)
{
$this->content = $content;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract function setContent();",
"protected function setContent() {}",
"public function setContent( string $content );",
"public function setContent($content){\n $this->_content = $content;\n }",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent ($content) {\r\n\t\t$this->content = (string)$content;\r\n\t}",
"public function setContent($content)\r\n {\r\n $this->_content = $content;\r\n }",
"public function setContent()\n {\n }",
"public function setContent($content)\r\n {\r\n $this->content = $content;\r\n }",
"public function setContent($content)\n {\n $this->_content = $content;\n }",
"public function set_content ($content) {\n $this->content = $content;\n }",
"public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}",
"public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}",
"public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}",
"public function setContent($content) {\n\t\t$this->buffer['content'] = $content;\n\t}",
"public function setContent($value)\n {\n if (!array_key_exists('content', $this->fieldsModified)) {\n $this->fieldsModified['content'] = $this->data['fields']['content'];\n } elseif ($value === $this->fieldsModified['content']) {\n unset($this->fieldsModified['content']);\n }\n\n $this->data['fields']['content'] = $value;\n }",
"public function setContent(?string $value): void {\n $this->getBackingStore()->set('content', $value);\n }",
"public function setContent($content){\n $this->_content = $this->checkFormat($content);\n }",
"public function setContent($content) {\n $this->content = $content;\n }",
"public function setContent($content)\n {\n $this->content = $content;\n }",
"public function setContent($content)\n {\n $this->content = $content;\n }",
"public function setContent($content)\n {\n $this->content = $content;\n }",
"public function setContent($content) {\n\n $this->content = $content;\n }",
"public function setContent($content) {\n\n $this->content = $content;\n }",
"public function setContent( string $content ) : void\n {\n $this->content = $content;\n }",
"public function setContent(string $content): void\n {\n $this->_content = $content;\n }",
"function setContent($value)\n {\n $this->setAttribute(\"content\", $value);\n return $this;\n }",
"public function setContent(string $content): void\n {\n $this->content = $content;\n }",
"public function set_content(string $content) {\n $this->content = $content;\n }",
"function setContent($c) {\n\t\t$this->set(\"content\",$c);\n\t}",
"function setContent($content){\n\t\t\tglobal $tableContent;\n\t\t\t\n\t\t\t$tableContent = $content;\n\t\t}",
"function setContent($content){\n\t\t\tglobal $tableContent;\n\t\t\t\n\t\t\t$tableContent = $content;\n\t\t}",
"public function setContent($value)\n {\n return $this->set('Content', $value);\n }",
"public function setContent($value)\n {\n return $this->set('Content', $value);\n }",
"public function setSugarContent($value)\n {\n $this->sugarContent = $value;\n }",
"public function setContent($newContent) {\n\t\t$this->content = $newContent; \n\t}",
"function setContent(string $content_html): void\n {\n $this->data['content'] = $content_html;\n }",
"public function setParsedContentAttribute($value)\n {\n $this->attributes['content'] = $value;\n }",
"public function setContent($value) {\n\t\tif(strlen($value) < 1)\n\t\t\tthrow new \\Exception('Comment::setContent() failed: value must be longer than 0');\n\n\t\t$this->content = \\common\\Filter::sanitize($value);\n\t}",
"public function setEncapsulateContent($value)\n {\n $this->_encapsulateContent = $value;\n }",
"protected function setPlainContent() {}",
"public function set_content($content) {\n if (!is_string($content)) { return false; }\n $this->_content = $content;\n return true;\n }",
"public function setContent($subst)\n\t{\n\t\t$this->vars['content'] = $subst;\n\t}",
"public function setSodiumContent($value)\n {\n $this->sodiumContent = $value;\n }",
"public function setContent($content) {\n\t\tif(!empty($content)){\n\t\t\t$this->content = trim($content);\n\t\t} elseif(!empty($_POST['content'])) {\n\t\t\t$this->content = trim($_POST['content']);\n\t\t}\n\t}",
"public function setContent($content)\n {\n $this->original = $content;\n\n // If the content is \"JSONable\" we will set the appropriate header and convert the content to JSON, This is\n // useful when returning something like models from routes that will be automatically transformed to their\n // JSON form.\n if ($this->shouldBeJson($content)) {\n $this->header('Content-Type', 'application/json');\n\n $content = $this->morphToJson($content);\n }\n // If this content implements the \"Renderable\" interface then we will call the render method on the object so\n // we will avoid any \"__toString\" exceptions that might be thrown and have their errors obscured(使模糊,费解)\n // by PHP's handling.\n elseif ($content instanceof Renderable) {\n $content = $content->render();\n }\n\n parent::setContent($content);\n\n return $this;\n }",
"function setTextContent(&$content) {\n\t\t$this->lobSub->lobText =& $content;\n\t\t$this->repoObj->lobSubType = 'text';\n\t\t$this->repoObj->lobBytes = strlen($content);\n\t\t$this->lobSub->lobBinary = null;\n\t}",
"public function setContent($content, $data=null){\n\n\t\t$this->content = $content;\n\n\t\t$this->page_data = $data;\n\n\t\t$this->index();\n\n\t\t\n\n\t}",
"abstract public function setContentFromString($string);",
"private function setContent()\n {\n $this->setTag();\n $this->openRoot();\n $this->setParam(ModulesInterface::KEY_NAME, ApiInterface::RAML_TYPE_STRING, ucfirst($this->generator->version));\n $this->setParam(ConfigInterface::ATTRIBUTES_CASE, ApiInterface::RAML_TYPE_STRING, ConfigInterface::DEFAULT_CASE);\n $this->setQueryParams();\n $this->setTrees();\n $this->setJwtContent();\n $this->setConfigEntities();\n $this->closeRoot();\n }",
"public function setContent($content){\n //asign the content\n $this->contentObject = $content;\n\n //save to disk as serialized\n $json = json_encode($this->contentObject);\n if($this->exists()){\n file_put_contents($this->getPath(), $json);\n }\n\t}",
"public function setContent($value)\n {\n return $this->set(self::_CONTENT, $value);\n }",
"public function setContent($value)\n {\n return $this->set(self::_CONTENT, $value);\n }",
"public function setRawContent($content);",
"public function set_content( $content )\r\n\t {\r\n\t \t$this->_content_to_load = $con;\r\n\t }",
"public function setContentAttribute($value)\n {\n $data = [\n 'raw' => $value,\n 'html' => (new Markdowner)->convertMarkdownToHtml($value)\n ];\n\n $this->attributes['content'] = json_encode($data);\n }",
"public function content($value) {\n return $this->setProperty('content', $value);\n }",
"public function setContent(string $content)\n {\n if (strlen($content) > 5) {\n $this->content = $content;\n }\n }",
"public function setContent($content)\n {\n return $this->setData(self::CONTENT, $content);\n }",
"protected function setElementContent($node, $value)\n\t{\n\t\tif ($node->tagName == 'input') {\n\t\t\t$node->setAttribute('value', $value);\n\t\t} else if ($node->tagName == 'img') {\n\t\t\t$node->setAttribute('src', $value);\n\t\t} else if ($node->tagName == 'a') {\n\t\t\t$node->setAttribute('href', $value);\n\t\t} else if ($node->tagName == 'meta') {\n\t\t\t$node->setAttribute('content', $value);\n\t\t} else {\n\t\t\t$node->nodeValue = htmlentities($value);\n\t\t}\n\t}",
"public function SetContent(Content $content)\n {\n $this->texts = array();\n $wordings = ContentWording::Schema()->FetchByContent(false, $content);\n foreach($wordings as $wording)\n {\n $prefix = Str::Replace('-', '.', $content->GetType());\n $this->texts[$prefix . '.' . $wording->GetPlaceholder()] = $wording->GetText();\n }\n }",
"public function setContent(?StreamInterface $value): void {\n $this->getBackingStore()->set('content', $value);\n }",
"protected function setHtmlContent() {}",
"public function set_content() {\n\n\t\t$this->content = get_the_term_list( $this->data, $this->taxonomy, $this->prepend, $this->delimiter, $this->append );\n\t}",
"public function setContents($contents) {\n $this->_contents = $contents;\n }",
"public function Set_Content($Content=NULL)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(!in_array(gettype($Content), UniCAT::ShowOptions_Scalars()))\n\t\t\t{\n\t\t\t\tthrow new UniCAT_Exception(UniCAT::UNICAT_XCPT_MAIN_CLS, UniCAT::UNICAT_XCPT_MAIN_FNC, UniCAT::UNICAT_XCPT_MAIN_PRM, UniCAT::UNICAT_XCPT_SEC_PRM_WRONGVALTYPE);\n\t\t\t}\n\t\t}\n\t\tcatch(UniCAT_Exception $Exception)\n\t\t{\n\t\t\t$Exception -> ExceptionWarning(__CLASS__, __FUNCTION__, MethodScope::Get_ParameterName(__CLASS__, __FUNCTION__), gettype($Content), UniCAT::ShowOptions_Scalars());\n\t\t}\n\t\t\n\t\t$this -> Content = $Content;\n\t}",
"static function set($name,$content){\n\t\tif(! self::$enable )\n\t\t\treturn $content;\n\t\tself::init();\n\t\t$i = cacheItem::getInstance($name);\n\t\t$i->content = $content;\n\t\tself::$backend->saveItem($i);\n\t\treturn $content;\n\t}",
"public function setScriptContent(?string $value): void {\n $this->getBackingStore()->set('scriptContent', $value);\n }",
"public function setFiberContent($value)\n {\n $this->fiberContent = $value;\n }",
"public function setText(?AccessPackageLocalizedContent $value): void {\n $this->getBackingStore()->set('text', $value);\n }",
"public function setPageContent(string $content): void {\n\t\t$this->m_pageContent = $content;\n\t}",
"public function setFatContent($value)\n {\n $this->fatContent = $value;\n }",
"public function setDataContent($content)\n {\n if (is_array($content)) {\n $this->headers->set('Content-Type', 'application/json');\n $content = json_encode($content);\n }\n\n $this->setContent($content);\n }",
"public function setRawContent(mixed $content = null): void\n {\n $this->content = $content;\n }",
"protected function setContent($content = null)\n {\n if (!is_null($content)) {\n if (is_array($content)) {\n $this->innerContent = [];\n foreach ($content as $key => $cnt) {\n if (is_a($cnt, self::class) || is_string($cnt) || is_numeric($cnt)) {\n $this->innerContent[] = $cnt;\n }\n }\n } else {\n $this->innerContent = [$content];\n }\n }\n }",
"public function setCholesterolContent($value)\n {\n $this->cholesterolContent = $value;\n }",
"function onSetContent( $editor, $html ) {\n\t\treturn \"document.getElementById( '$editor' ).value = $html;\\n\";\n\t}",
"public function setBodyContent($data)\n\t{\n\t\t$this->_pageData['data']['content'] = $data;\n\t}",
"public function setContent($content)\n\t{\n\t\tif ($content instanceof Zend_View) {\n\t\t\t$this->_content = $content;\n\t\t\treturn $this;\n\t\t}\n\n\t\tif (is_scalar($content)) {\n\t\t\t$this->_content = (string) $content;\n\t\t\treturn $this;\n\t\t}\n\n\t\tthrow new Scil_Services_Form_Wizard_Exception(__METHOD__.' content type not recognised : '.gettype($content).', must be Zend_View or scalar.');\n\t}",
"public function setContent($content){\n\t\t$this->content = $content;\n\t\t\n\t\treturn $this;\n\t}",
"function setContentElement($content_element) {\r\n\t\t// Set ref_table\r\n\t\t$this->_content_element = $content_element;\r\n\t}",
"public function setContent($data)\n {\n\n if ($this->_content != $data) {\n $this->_logChange('content');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_content = $data;\n\n } else if (!is_null($data)) {\n $this->_content = (string) $data;\n\n } else {\n $this->_content = $data;\n }\n return $this;\n }",
"function setContentAttribute(array $value) {\n\t\t$xml = new \\DOMDocument('1.0', 'UTF-8');\n\t\t$rootElement = $xml->createElement('content');\n\t\t$xml->appendChild($rootElement);\n\n\t\tforeach ($value['block'] as $block) {\n\t\t\t$cmsBlock = CmsBlock::create($block['type']);\n\n\t\t\t$blockToSeed = $block instanceof CmsBlock ? $block->toArray() : $block;\n\n\t\t\t$cmsBlock->seed($blockToSeed);\n\t\t\t$blockNode = $cmsBlock->toXml();\n\n\t\t\t$rootElement->appendChild($xml->importNode($blockNode, true));\n\t\t}\n\n\t\t$this->attributes['content'] = $xml->saveXML();\n\t}",
"public function setContent(string $content): self\n {\n $this->content = $content;\n return $this;\n }",
"public function setTextContent($text)\n {\n $this->textContent = $text;\n }",
"public function setTransFatContent($value)\n {\n $this->transFatContent = $value;\n }",
"abstract public function setContentFromUrl($url);",
"public function setContentAttribute( $value )\n\t{\n\t\t$value = cleanupHTML( $value );\n\n\t\t// Comment are only allowed to have specific html tags\n\t\t// We will whitelist them in advance\n\t\t$this->attributes['content'] = strip_tags($value,'<a><br><p><b><i><em><strong>');\n\n\t\t\n\t}",
"public function setContent(?string $content) {\n\t\t$this->content = $content;\n\n\t\treturn $this;\n\t}",
"public function setCarbohydrateContent($value)\n {\n $this->carbohydrateContent = $value;\n }",
"protected function setResourceContents( $path, $content )\n {\n $this->content[$path] = $content;\n }",
"public function setContentAttribute($value, User $actor = null)\n {\n $this->attributes['content'] = $value ? static::$formatter->parse($value, $this, $actor ?? $this->user) : null;\n }"
] | [
"0.85002345",
"0.83700746",
"0.8131375",
"0.8093801",
"0.8076925",
"0.8076925",
"0.8076925",
"0.8076925",
"0.8076925",
"0.8076925",
"0.8076925",
"0.8076925",
"0.8076925",
"0.8076925",
"0.797122",
"0.7876089",
"0.7843392",
"0.77945745",
"0.7776669",
"0.7770874",
"0.7743636",
"0.7743636",
"0.7743636",
"0.7707566",
"0.76740515",
"0.7666918",
"0.7655759",
"0.76547396",
"0.7650261",
"0.7650261",
"0.7650261",
"0.76089406",
"0.76089406",
"0.7607087",
"0.7580358",
"0.75674057",
"0.7526492",
"0.7514056",
"0.7441394",
"0.7369683",
"0.7369683",
"0.73423874",
"0.73423874",
"0.7327717",
"0.72921944",
"0.7198798",
"0.7147437",
"0.71282023",
"0.7122503",
"0.70809",
"0.70802665",
"0.7074919",
"0.706745",
"0.7025297",
"0.7013407",
"0.7010186",
"0.70031226",
"0.6988712",
"0.6976036",
"0.6975625",
"0.6970854",
"0.6970854",
"0.6957013",
"0.6956253",
"0.69078565",
"0.6905378",
"0.69000703",
"0.6875364",
"0.6874146",
"0.68060094",
"0.679961",
"0.67915285",
"0.6761001",
"0.6727339",
"0.6722485",
"0.67091566",
"0.66937476",
"0.6665624",
"0.66425616",
"0.659715",
"0.65819263",
"0.65541273",
"0.6541892",
"0.65320146",
"0.65317476",
"0.6519608",
"0.65045726",
"0.6502162",
"0.6486116",
"0.6475672",
"0.6428118",
"0.64219636",
"0.6416894",
"0.6385789",
"0.6378832",
"0.6370081",
"0.63686454",
"0.6361297",
"0.63476485",
"0.6325609",
"0.6319774"
] | 0.0 | -1 |
Get the value of date | public function getDate()
{
return $this->date;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDate();",
"public function getDate();",
"public function getDate()\n {\n if ( $this->value != null ) {\n $date = strtotime( $this->value );\n return date( 'd m Y', $date );\n }\n return null;\n }",
"public function getDate()\r\n {\r\n return $this->date;\r\n }",
"public function getDate() {\n return @$this->attributes['date'];\n }",
"public function getDate(){\n\t\treturn $this->_date;\n\t}",
"public function getDate() { return $this->date; }",
"public function getDate()\n {\n return $this->date;\n }",
"public function getDate() {\n return $this->date;\n }",
"public function getDate()\n\t{\n\t\treturn $this->date;\n\t}",
"public function getDate()\n\t{\n\t\treturn $this->date;\n\t}",
"public function getDate()\n\t{\n\t\treturn $this->date;\n\t}",
"public function get()\n {\n return $this->date;\n }",
"function getDate( )\r\n\t{\r\n\t\treturn $this->date;\r\n\t}",
"function create_date_value($date) {\n\t\t// Since no calendar is specified, should we always convert to gregorian?\n\t\t$date=$date->convert_to_cal('gregorian');\n\t\treturn\n\t\t\t($date->y==0 ? '????' : $date->Format('Y')) .'-'.\n\t\t\t($date->m==0 ? '??' : $date->Format('m')) .'-'.\n\t\t\t($date->d==0 ? '??' : $date->Format('d'));\n\t}",
"function getDate() {\n return $this->date;\n }",
"public function getDate()\n {\n return $this->date;\n }",
"public function getDate()\n {\n return $this->date;\n }",
"public function getDate() {\n\t\treturn $this->_date;\n\t}",
"function getDate() {\n\t\treturn $this->data_array['adddate'];\n\t}",
"public function getDate()\n {\n return $this->_date;\n }",
"public function getValue()\n {\n return $this->date->getValue() . 'T' . $this->time->getValue();\n }",
"public function getDateEn() {\n return $this->date;\n }",
"public function getDate(){\n\t\treturn $this->laDate;\n\t}",
"function getData()\n {\n return $this->date;\n }",
"public function getDate()\n {\n if ($this->hasModel()) {\n $value = Html::getAttributeValue($this->model, $this->attribute);\n } else {\n $value = $this->value;\n }\n\n return $value;\n }",
"public function get_value($value)\n {\n if (is_null($value))\n return null;\n else\n return date($this->date_format, strtotime($value));\n }",
"public function getDate(): string;",
"public function getDate(){\n return $this->getParameter('date');\n }",
"public function getDate()\n {\n $yearconst = $this->getValue(self::XPATH_YEAR);\n $monthconst = $this->getValue(self::XPATH_MONTH);\n $dayconst = $this->getValue(self::XPATH_DAY);\n\n return $this->formateDate($yearconst, $monthconst, $dayconst);\n }",
"public function date();",
"public function date();",
"public function getValueDateTime()\n {\n\n return $this->valueDateTime;\n }",
"public function getDateDebut();",
"public function getCarStatusDate(){\r\n\t\t$this->car_statusdate = getValue(\"SELECT CAST(status_date AS DATE) AS DATEONLY FROM tbl_car WHERE car_id=\".$this->car_id);\r\n\t\treturn $this->car_statusdate;\r\n\t}",
"public function getDate()\n\t{\n\t\treturn $this->datetime;\n\t}",
"private function getAssetArrivalDateValue() {\n return date('m/d/Y', strtotime($this->attributes['asset_arrival_date']));\n }",
"public function datevs($date) {\n\t\n\t\n\t\n\t\treturn $date;\n\t\n\t}",
"public function getDate()\n {\n if ($this->date)\n {\n return $this->date;\n }\n else\n {\n $this->date = time();\n }\n return $this->date;\n }",
"public function getDate() : ?string ;",
"public function getDate()\n {\n return $this->date = new \\DateTime($this->get()->post_date);\n }",
"function get_date() {\n\t\treturn $this->get_data( 'comment_date' );\n\t}",
"public function getDate()\n {\n if (!isset($this->_date)) {\n throw new \\LogicException('Missing property _date');\n }\n return $this->_date;\n }",
"public function getEventDate() \n {\n return $this->_fields['EventDate']['FieldValue'];\n }",
"public function getDate() : ?int \n {\n if ( ! $this->hasDate()) {\n $this->setDate($this->getDefaultDate());\n }\n return $this->date;\n }",
"public function getDate($date=null){\n\t\treturn date_format($this->createDate($date),\"d\");\n\t}",
"public function getDatenaissance()\n {\n return $this->date_naissance;\n }",
"private function date()\n {\n $pubDate = $this->article->Journal->JournalIssue->PubDate;\n \n if (isset($pubDate->MedlineDate)) {\n $date = (string)$pubDate->MedlineDate;\n } else {\n $date = implode(' ', (array)$pubDate);\n }\n \n return $date;\n }",
"public function getDoDate()\n {\n return $this->data['fields']['do_date'];\n }",
"function getFecha(){\n\t\treturn $this->fecha;\n\t}",
"public function getDateI(){\n return $this->dateI;\n }",
"protected function _getValueForDate($data = null, $returnTableRow = true) {\n\t\treturn $this->_getValueForDateTimeBase($data, $returnTableRow, '%x');\n\t}",
"public function getDate() : string\r\n {\r\n return $this->format('Y-m-d');\r\n }",
"function getOpenDate() {\n\t\treturn $this->data_array['open_date'];\n\t}",
"public function getDate($key)\n {\n\n $value = trim($this->getParam($key));\n $unixTimeStamp = strtotime($value);\n if(!$unixTimeStamp){\n return \"\";\n }\n\n return date(\"Y-m-d\", $unixTimeStamp);\n }",
"public static function getDate() {\r\n\t\treturn date('Y-m-d H:i:s');\r\n\t}",
"public function getDateIn() {\n $retVal = CommonProcess::convertDateTime($this->date_in, DomainConst::DATE_FORMAT_4, DomainConst::DATE_FORMAT_BACK_END);\n if (empty($retVal)) {\n return $this->date_in;\n }\n return $retVal;\n }",
"public function getDataWithTypeDate() {}",
"public function getDate()\n {\n return $this->getNodeText('/p:package/p:date');\n }",
"public function getStartDate();",
"public function getStartDate();",
"public function getDate(): ?string\r\n {\r\n return $this->date;\r\n }",
"public function getDate()\n {\n return new \\DateTime($this->date);\n }",
"function getDay()\r\n {\r\n return $this->dia;\r\n }",
"public function getRecDate()\n {\n return $this->rec_date;\n }",
"function getDateFilterSelectedDate() {\n $on = $this->getAdditionalProperty('date_filter_on');\n \n return $on ? new DateValue($on) : null;\n }",
"public function getPaymentDate();",
"public function getRecordDate()\n {\n return $this->record_date;\n }",
"public function getDateOnSet()\n {\n $result = null;\n\n if (isset($this->effectiveTime->low['value'])) {\n $resultRaw = (string)$this->effectiveTime->low['value'];\n\n $result = Convert::optimalFormatDate($resultRaw);\n }\n\n return $result;\n }",
"public function getMaturityDate()\n {\n $maturityDates = $this->collectData();\n\n return $maturityDates[0];\n }",
"public function getDate()\n {\n $date = new DateTime($this->date);\n $date->setTimezone(new DateTimeZone('Europe/London'));\n return $date->format('d/m/Y');\n }",
"public function getDateCom()\n {\n return $this->Date_com;\n }"
] | [
"0.73365295",
"0.73365295",
"0.7282412",
"0.7201814",
"0.7152258",
"0.7143704",
"0.7143586",
"0.71411586",
"0.7135938",
"0.71044344",
"0.71044344",
"0.71044344",
"0.71039176",
"0.7101078",
"0.70954573",
"0.7092461",
"0.7089096",
"0.7089096",
"0.7067405",
"0.7046301",
"0.70416707",
"0.7037117",
"0.7030653",
"0.7029211",
"0.6995683",
"0.6988562",
"0.69396216",
"0.6864244",
"0.6808432",
"0.6788214",
"0.6762687",
"0.6762687",
"0.6760907",
"0.6685923",
"0.66254324",
"0.65827316",
"0.65122914",
"0.65092856",
"0.6504405",
"0.6470537",
"0.64653784",
"0.6458213",
"0.6447576",
"0.64350915",
"0.6418543",
"0.6407027",
"0.6384432",
"0.63750476",
"0.6364647",
"0.6361073",
"0.6353103",
"0.63475376",
"0.63466495",
"0.6340542",
"0.63380504",
"0.63225526",
"0.632121",
"0.62974095",
"0.6288867",
"0.62850535",
"0.62850535",
"0.62674505",
"0.6266533",
"0.6266017",
"0.6253048",
"0.6242673",
"0.62409884",
"0.622996",
"0.6223239",
"0.622042",
"0.62195355",
"0.6213732"
] | 0.713308 | 35 |
Set the value of date | public function setDate($date)
{
$this->date = $date;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setDate($value) {\n\t\t$this->_date = $value;\n\t}",
"public function setDate($date);",
"public function setDate($date){\n\t\t$this->date = $date;\n\t}",
"public function setDate($date)\n {\n $this->date = $date;\n }",
"public function setDate($date)\n {\n $this->date = $date;\n }",
"public function setDate($date) {\n $this->date = $date;\n }",
"public function setDate($date)\n\t{\n\t\t$this->date = $date;\n\t}",
"private function set_date()\r\n\t{\r\n\t\tif ($this->month > 12)\r\n\t\t{\r\n\t\t\t$this->month=1;\r\n\t\t\t$this->year++;\r\n\t\t}\r\n\r\n\t\tif ($this->month < 1)\r\n\t\t{\r\n\t\t\t$this->month=12;\r\n\t\t\t$this->year--;\r\n\t\t}\r\n\r\n\t\tif ($this->year > 2037) $this->year = 2037;\r\n\t\tif ($this->year < 1971) $this->year = 1971;\r\n\t}",
"function setData($data)\n {\n $this->date=$data;\n }",
"private function _setDate(){\n\t\tif($this->_year>=1970&&$this->_year<=2038){\n\t\t\t$this->_day = date('d', $this->_timestamp);\n\t\t\t$this->_month = date('m', $this->_timestamp);\n\t\t\t$this->_year = date('Y', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, true);\n\t\t\t$this->_day = sprintf('%02s', $dateParts['mday']);\n\t\t\t$this->_month = sprintf('%02s', $dateParts['mon']);\n\t\t\t$this->_year = $dateParts['year'];\n\t\t}\n\t\t$this->_date = $this->_year.'-'.$this->_month.'-'.$this->_day;\n\t}",
"function setDate($date = null)\r\n\t{\t\r\n\t\t$day = substr($date ,8, 2);\r\n\t\t$month = substr($date ,5, 2);\r\n\t\t$year = substr($date ,0, 4);\r\n\t\t\r\n\t\t$newDate = $day.'-'.$month.'-'.$year;\r\n\t\t\r\n\t\treturn $newDate;\r\n\t}",
"public function setDateAttribute($value)\n {\n $this->attributes['date'] = Carbon::parse($value)->format('Y-m-d');\n }",
"public function set_date($date) \n\t{\n\t\tif(! is_numeric($date))\n\t\t{\n\t\t\t$date = strtotime($date);\n\t\t}\n\t\t\n\t\tif($this->version == ATOM)\n\t\t{\n\t\t\t$tag = 'updated';\n\t\t\t$value = date(DATE_ATOM, $date);\n\t\t} \n\t\telseif($this->version == RSS2) \n\t\t{\n\t\t\t$tag = 'pubDate';\n\t\t\t$value = date(DATE_RSS, $date);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$tag = 'dc:date';\n\t\t\t$value = date(\"Y-m-d\", $date);\n\t\t}\n\t\t\n\t\t$this->add_element($tag, $value); \n\t}",
"public function setDateAttribute($value)\n {\n $this->attributes['date'] = Carbon::parse($value)->format(self::DATE_FORMAT_SET);\n }",
"public function setDateAttribute($value)\n {\n $this->attributes['date'] = Carbon::createFromFormat('d/m/Y', $value);\n }",
"public function setDateAttribute($value)\n {\n $this->attributes['date'] = Carbon::parse($value)->toDateTimeString();\n }",
"public function setDate($value){\n return $this->setParameter('date', $value);\n }",
"public function setTransactionDate($value) {\n\t\tself::$_transactionDate = $value;\n\t}",
"private function setDate(){\n\t// Validate incoming parameters\n\t\t$this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\tif (isset($_GET['month'])) {\n\t\tis_numeric($_GET['month']) or die('month has to be numeric');\n\t}\n\tif (isset($_GET['year'])) {\n\t\tis_numeric($_GET['year']) or die('year has to be numeric');\n\t}\n\n\t// Set new date\n\t$this->newMonth = isset($_GET['month']) ? ($_GET['month']) : $this->currentMonth;\n\t$this->newYear = isset($_GET['year']) ? ($_GET['year']) : $this->currentYear;\n\n\tif ($this->newMonth > 12) {\n\t\t$this->newYear = $this->newYear +1;\n\t\t$this->newMonth = 1;\n\t\t$_GET['month'] = 1;\n\n\t}\n\telse if ($this->newMonth < 1) {\n\t\t$this->newYear = $this->newYear -1;\n\t\t$this->newMonth = 12;\n\t\t$_GET['month'] = 12;\n\t}\n\t\n\t}",
"public function setDoDate($value)\n {\n if (!array_key_exists('do_date', $this->fieldsModified)) {\n $this->fieldsModified['do_date'] = $this->data['fields']['do_date'];\n } elseif ($value === $this->fieldsModified['do_date']) {\n unset($this->fieldsModified['do_date']);\n }\n\n $this->data['fields']['do_date'] = $value;\n }",
"public function setDate($date_string = null)\n {\n\n if ($this->is_date() == 1) {\n $this->now = getdate(strtotime($date_string));\n } else {\n $this->now = getdate();\n }\n }",
"public function setDate($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"public function setStartDate(?Date $value): void {\n $this->getBackingStore()->set('startDate', $value);\n }",
"public function setValue($date = null)\r\n {\r\n if ($date instanceof \\Type\\DateTime)\r\n {\r\n $this->setDay($date->getDay());\r\n $this->setMonth($date->getMonth());\r\n $this->setYear($date->getYear());\r\n $this->setTime($date->getHour(), $date->getMinute(), $date->getSecond());\r\n\r\n return $this;\r\n }\r\n\r\n $this->clean();\r\n\r\n if (!is_null($date))\r\n {\r\n $this->explodeDate($date);\r\n }\r\n\r\n return $this;\r\n }",
"function setDueDate( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->DueDate = $value;\n }",
"protected function set_date_prop( $date_type, $value ) {\n\t\t$datetime = wcs_get_datetime_from( $value );\n\t\t$date = ! is_null( $datetime ) ? wcs_get_datetime_utc_string( $datetime ) : 0;\n\n\t\t$this->set_prop( $this->get_date_prop_key( $date_type ), $date );\n\t\t$this->schedule->{$date_type} = $date;\n\t}",
"public function setDateDuJour()\n{\n$this->setDateSysteme(date(\"Y-m-d\"));\n$this->setDateUtilisateur(date(\"d/m/Y\"));\n}",
"public function setDateAttribute($date)\n {\n \t$this->attributes['date'] = Carbon::parse($date);\n }",
"public function setDate($date){\r\n\t\t$this->wishDate = $date;\r\n\t}",
"public function setDate( $date ) {\n\t\tif ( !preg_match( self::DATERE, $date ) ) {\n\t\t\tthrow new InvalidArgumentException( \"Not a valid date: \".$date );\n\t\t}\n\t\t$this->setParameter( \"dtreviewed\", $date );\n\t}",
"public function setDate($date)\n {\n $this->date = $date;\n \n return $this;\n }",
"public function setModDate($date) {}",
"public function setDate($date = null): object\n\t{\n\t\tif (null !== $date && !($date instanceof FHIRDateTime)) {\n\t\t\t$date = new FHIRDateTime($date);\n\t\t}\n\t\t$this->_trackValueSet($this->date, $date);\n\t\t$this->date = $date;\n\t\treturn $this;\n\t}",
"public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}",
"public function setDate($value)\n {\n if ($value instanceof \\IntlCalendar)\n $value = $value->toDateTime();\n\n if (is_string($value))\n $value = new \\DateTime($value);\n\n if (is_int($value))\n {\n $lower_bound = time() - self::ALLOWABLE_DATE_WINDOW;\n $upper_bound = time() + self::ALLOWABLE_DATE_WINDOW;\n if ($value >= $lower_bound && $value <= $upper_bound)\n $value = new \\DateTime('@' . $value);\n }\n\n // Validate\n if (!($value instanceof \\DateTimeInterface))\n throw new \\InvalidArgumentException(\"Date must be DateTime, IntlCalendar, date string or valid Unix timestamp\");\n\n $this->header_fields['Date'] = $value;\n return $this;\n }",
"public function setinvoiceDateAttribute($value)\n {\n\n $this->attributes['invoice_date'] = UserHelper::parseDateFromString($value);\n }",
"public function setDate($date)\n {\n $this->values['Date'] = $date;\n return $this;\n }",
"function setValue($val) {\n\t\tif(empty($val)) {\n\t\t\t$this->value = null;\n\t\t\t$this->valueObj = null;\n\t\t} else {\n\t\t\t// Quick fix for overzealous Zend validation, its case sensitive on month names (see #5990)\n\t\t\tif(is_string($val)) $val = ucwords(strtolower($val));\n\t\t\t\n\t\t\tif($this->getConfig('dmyfields')) {\n\t\t\t\t// Setting in correct locale\n\t\t\t\tif(is_array($val) && $this->validateArrayValue($val)) {\n\t\t\t\t\t// set() gets confused with custom date formats when using array notation\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, null, $this->locale);\n\t\t\t\t\t$this->value = $this->valueObj->toArray();\n\t\t\t\t}\n\t\t\t\t// load ISO date from database (usually through Form->loadDataForm())\n\t\t\t\telse if(!empty($val) && Zend_Date::isDate($val, $this->getConfig('datavalueformat'), $this->locale)) {\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, $this->getConfig('datavalueformat'), $this->locale);\n\t\t\t\t\t$this->value = $this->valueObj->toArray();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->value = $val;\n\t\t\t\t\t$this->valueObj = null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Setting in corect locale.\n\t\t\t\t// Caution: Its important to have this check *before* the ISO date fallback,\n\t\t\t\t// as some dates are falsely detected as ISO by isDate(), e.g. '03/04/03'\n\t\t\t\t// (en_NZ for 3rd of April, definetly not yyyy-MM-dd)\n\t\t\t\tif(!empty($val) && Zend_Date::isDate($val, $this->getConfig('dateformat'), $this->locale)) {\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, $this->getConfig('dateformat'), $this->locale);\n\t\t\t\t\t$this->value = $this->valueObj->get($this->getConfig('dateformat'), $this->locale);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// load ISO date from database (usually through Form->loadDataForm())\n\t\t\t\telse if(!empty($val) && Zend_Date::isDate($val, $this->getConfig('datavalueformat'))) {\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, $this->getConfig('datavalueformat'));\n\t\t\t\t\t$this->value = $this->valueObj->get($this->getConfig('dateformat'), $this->locale);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->value = $val;\n\t\t\t\t\t$this->valueObj = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected function setDateUtilisateur($date)\n{\n$this->dateUtilisateur = $date;\t\n}",
"public function setStartDate($value)\n {\n $this->startDate = $value;\n }",
"public function setDate($date = null): object\n {\n if (null !== $date && !($date instanceof FHIRDate)) {\n $date = new FHIRDate($date);\n }\n $this->_trackValueSet($this->date, $date);\n $this->date = $date;\n return $this;\n }",
"public function date($value): self\n {\n $this->date = $value;\n \n return $this;\n }",
"public function setDate(Carbon $date) {\n\t\t$this->setDateRange($date, $to);\n\t}",
"public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}",
"public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}",
"public function setDueDateAttribute($value)\n {\n $this->attributes['due_date'] = $value;\n }",
"function set($value){\n if(!$value)return parent::set($value);\n list($d,$m,$y)=explode('/',$value);\n if($y)$value=join('/',array($m,$d,$y));\n elseif($m)$value=join('/',array($m,$d));\n $value=date('Y-m-d',strtotime($value));\n return parent::set($value);\n }",
"public function setDate($date = false)\n {\n $date = explode('-', $date);\n\n $day = @$date[2] ? : date('d');\n $month = @$date[1] ? : date('m');\n $year = @$date[0] ? : date('Y');\n\n $this->day = @$day;\n $this->month = @$month;\n $this->year = @$year;\n # return Calendar instance\n return $this;\n }",
"function SetInitialDate ($date)\r\n {\r\n if ($date)\r\n {\r\n $this->_dti = $date; \r\n }\r\n }",
"public function setdueDateAttribute($value)\n {\n\n $this->attributes['due_date'] = UserHelper::parseDateFromString($value);\n }",
"public function setDate( $sDate ) {\n\t\t$this->sDate = $sDate;\n\t}",
"public function setUseDate($use_date) \n \t{\n \t\t$this->use_date = $use_date;\n \t}",
"public function setContactDate($date) {\n $this->date = $date;\n }",
"public function setExpirationDate(?Date $value): void {\n $this->getBackingStore()->set('expirationDate', $value);\n }",
"public function setDate($date) {\n $this->date = $date;\n $this->updateData();\n return $this;\n }",
"public function setStartDate(string $date);",
"public function setFilingDate($value) {\n\t\t$value = date('d-M-Y', strtotime($value));\n\t\tself::$_filingDate = $value;\n\t}",
"public function setDay($day){\n\t\t$this->_day = (int) $day;\n\t\t$monthDays = self::$_monthTable[$this->_month-1];\n\t\tif($this->isLeapYear()==true&&$this->_month==2){\n\t\t\t++$monthDays;\n\t\t}\n\t\tif($this->_day>$monthDays){\n\t\t\t$this->_day = self::$_monthTable[$this->_month-1];\n\t\t}\n\t\t$this->_mktime();\n\t\t$this->_setDate();\n\t}",
"function setDatePosted($val) {\n $this->identifier = $this->updateDB('identifier', $val);\n }",
"public function setDateOfBirth()\n {\n $dateOfBirth = request('dob_year') . '-' . request('dob_month') . '-' . request('dob_day');\n\n $this->date_of_birth = $dateOfBirth;\n $this->save();\n }",
"function set_change_sale_date_enable() {\n $this->sale_lib->set_change_sale_date_enable($this->input->post('change_sale_date_enable'));\n if (!$this->sale_lib->get_change_sale_date()) {\n $this->sale_lib->set_change_sale_date(date(get_date_format()));\n }\n }",
"public static function setDateFormatDay()\n {\n self::$settings[0] = 'Y-m-d';\n }",
"public function setPropertyDate($date=true)\n {\n if($date === false)\n {\n $this->date =false;\n }\n elseif($date !== true)\n {\n $this->date =$date;\n }\n }",
"public function setPublishDateAttribute($value)\n {\n $this->attributes['publish_date'] = date(\"Y-m-d H:i:s\", strtotime($value));\n }",
"public\n\tfunction setPostDate($newPostDate = null): void {\n\t\t// base case: if the date is null, use the current date and time\n\t\tif($newPostDate === null) {\n\t\t\t$this->postDate = new \\DateTime();\n\t\t\treturn;\n\t\t}\n\n\n\n\t//store the like date using the ValidateDate trait\n\ttry {\n\t\t$newPostDate = self::validateDateTime($newPostDate);\n\t} catch(\\InvalidArgumentException |\\RangeException $exception) {\n\t\t$exceptionType = get_class($exception);\n\t\tthrow(new $exceptionType($exception->getMessage(), 0, $exception));\n\t}\n\t$this->postDate = $newPostDate;\n\n}",
"public function setDateOfBirth($value)\n {\n $this->_date_of_birth = $value;\n }",
"public function updateDate( Inx_Api_Recipient_Attribute $attr, $sValue );",
"public function setGoliveDateAttribute($value)\n {\n $this->attributes['golive_date'] = Carbon::createFromFormat('d/m/Y', $value)->toDateString();\n }",
"public function setStartDateAttribute($value)\n {\n $this->attributes['start_date'] = Carbon::parse($value);\n }",
"private function setDate($data, $key, $currentDate, callable $setCallback)\n {\n if (($date = $this->getProperty($data, $key, $currentDate)) !== null) {\n if (is_string($date)) {\n $date = new \\DateTime($data[$key]);\n }\n } else {\n $date = null;\n }\n\n call_user_func($setCallback, $date);\n }",
"function setFecha($fecha) {\r\n $this->fecha = $fecha;\r\n }",
"public function setToDate($toDate)\n {\n // $this->toDate = $newDate->format('c');\n $this->toDate = $toDate;\n }",
"public function setDateAttribute($input)\n {\n if ($input != null && $input != '') {\n $this->attributes['date'] = Carbon::createFromFormat(config('app.date_format'), $input)->format('Y-m-d');\n } else {\n $this->attributes['date'] = null;\n }\n }",
"public function setDateAttribute($input)\n {\n if ($input != null && $input != '') {\n $this->attributes['date'] = Carbon::createFromFormat(config('app.date_format'), $input)->format('Y-m-d');\n } else {\n $this->attributes['date'] = null;\n }\n }",
"public function setEndDate(?Date $value): void {\n $this->getBackingStore()->set('endDate', $value);\n }",
"protected function setDate($type, $date)\n\t{\n\t\t$this->{'date' . $type} = AdFox::convertDate($date);\n\n\t\treturn $this;\n\t}",
"public function setDateFormat(?string $value): void {\n $this->getBackingStore()->set('dateFormat', $value);\n }",
"public function setDate(Carbon $date) {\n\n\t\t$this->date = new Carbon($date);\n\t\t$this->page = 0;\n\t}",
"public function setRequesteDateAttribute($date)\n {\n $this->attributes['request_date'] = Carbon::parse($date);\n }",
"public function testSetDate()\n {\n $month = new Month();\n\n $date = date_create('now');\n $month->setDate($date);\n\n $this->assertEquals($date, $month->getDate());\n }",
"private function _init_date()\n\t{\n\t\t$this->date->init($this->EE->TMPL->fetch_param('date'));\n\t\t$this->_log(sprintf(\"Working date set to %s %s\", $this->date->date(), $this->date->time()));\n\t}",
"public function setModifiedDate($value) {\n if (is_string($value)) {\n try {\n $this->modifiedDate = new \\DateTime($value);\n } catch (\\Exception $ex) {\n $this->modifiedDate = null;\n }\n } elseif (is_a($value, '\\\\DateTime')) {\n $this->modifiedDate = $value;\n } else {\n $this->modifiedDate = null;\n }\n }",
"function setDay($d)\r\n {\r\n if($d > 31 || $d < 1) {\r\n $this->dia = 1;\r\n } else {\r\n $this->dia = $d;\r\n }\r\n }",
"public function setDate($year, $month, $day)\r\n\t{\r\n\t\t// Perform the numeric check\r\n\t\tif (!is_numeric($year) || !is_numeric($month) || !is_numeric($day))\r\n\t\t{\r\n\t\t\tthrow new Exception('setDate() expects three numbers in this order: year, month, day');\r\n\t\t}\r\n\t\t\r\n\t\t// Perform the date validation check\r\n\t\tif (!checkdate($month, $day, $year))\r\n\t\t{\r\n\t\t\tthrow new Exception('Non-existent date');\r\n\t\t}\r\n\t\t\r\n\t\t// Set the date\r\n\t\tparent::setDate($year, $month, $day);\r\n\r\n\t\t// Set the internal variables\r\n\t\t$this->_year = $year;\r\n\t\t$this->_month = $month;\r\n\t\t$this->_day = $day; \r\n\t}",
"public function setBlockDateAttribute($value) {\n $this->attributes['block_date'] = Carbon::parse($value);\n }",
"public function setDate($p)\n {\n if ($p !== null && trim($p) !== \"\") {\n $this->appendCommandArgument(\"-D\");\n $this->appendCommandArgument($p);\n }\n }",
"protected function setDateProperty($property, $typoscript, $submittedValues) {\n\n\t\tif (!isset($submittedValues[$typoscript['field']])) {\n\t\t\treturn;\n\t\t}\n\n\t\t$value = $submittedValues[$typoscript['field']];\n\t\t$outputFormat;\n\n\t\tif ($property == 'Birthday') {\n\t\t\t$outputFormat = self::BDAY_FORMAT;\n\t\t} else {\n\t\t\t$outputFormat = self::REV_FORMAT;\n\t\t}\n\n\t\t$format = $typoscript['format'];\n\t\tif ($format !== NULL) {\n\t\t\tif ($property == 'Birthday') {\n\t\t\t\t$format = self::DEFAULT_BDAY_INPUT_FORMAT;\n\t\t\t} else {\n\t\t\t\t$format = self::DEFAULT_REV_INPUT_FORMAT;\n\t\t\t}\n\t\t}\n\n\t\t$date = DateTime::createFromFormat($format, $value);\n\n\t\t$this->vcard->{'set' . $property}($date->format($outputFormat));\n\t}",
"public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }",
"public function setDateFormat($value)\n\t{\n\t\t$this->setViewState('DateFormat',$value,'dd-MM-yyyy');\n\t}",
"public function set_next_bill_date( $value ) {\n\t\t$this->set_prop( 'next_bill_date', $value ) ;\n\t}",
"public function set_approved_date( $date ) {\n\t\t$this->set_prop( 'approved_date', $date ) ;\n\t}",
"public function setDateTime($value)\n {\n $this->createdAt=$value;\n }",
"public function setDate($date)\n {\n $this->date = $date;\n return $this;\n }",
"public function setDate($date)\n {\n $this->date = $date;\n return $this;\n }",
"public function setPublishedAtAttribute($date){ //guarda el campo published_at como si fuera una instancia de Carbon para que se guarde con hora\n \t$this->attributes['published_at']=Carbon::parse($date); \n }",
"public function setEventDate($value) \n {\n $this->_fields['EventDate']['FieldValue'] = $value;\n return $this;\n }",
"public function setDateCreated($value)\n {\n $this->validateDate('DateCreated', $value);\n $this->validateNotNull('DateCreated', $value);\n\n if ($this->data['date_created'] === $value) {\n return;\n }\n\n $this->data['date_created'] = $value;\n $this->setModified('date_created');\n }",
"public function setValue( $value )\n {\n $date = UTIL_DateTime::parseDate($value, $this->dateFormat);\n\n if ( isset($date) )\n {\n $this->setDefaultDate($date['year'], $date['month'], $date['day']);\n $this->value = $value;\n }\n\n return $this;\n }",
"public function setDateTime(\\DateTimeInterface $dt)\n {\n $this->value = $dt->format('Ymd');\n }",
"public function setDate(string $date)\r\n {\r\n $this->date = $date;\r\n\r\n return $this;\r\n }",
"public function setDateUpdated($value)\n {\n $this->validateDate('DateUpdated', $value);\n $this->validateNotNull('DateUpdated', $value);\n\n if ($this->data['date_updated'] === $value) {\n return;\n }\n\n $this->data['date_updated'] = $value;\n $this->setModified('date_updated');\n }"
] | [
"0.8595994",
"0.8144333",
"0.7925046",
"0.7790953",
"0.7790953",
"0.7787397",
"0.7771945",
"0.7639952",
"0.75454897",
"0.73710495",
"0.73293585",
"0.73129904",
"0.72541124",
"0.7214808",
"0.7174494",
"0.71497524",
"0.7071404",
"0.7051499",
"0.70395744",
"0.6980755",
"0.6947516",
"0.69345295",
"0.69258463",
"0.69208145",
"0.69182384",
"0.69143224",
"0.6886118",
"0.6876919",
"0.6863685",
"0.6846067",
"0.6809334",
"0.6788924",
"0.6784301",
"0.6783085",
"0.67720187",
"0.6769106",
"0.6756103",
"0.674457",
"0.6742475",
"0.6727084",
"0.67141306",
"0.67091465",
"0.6701639",
"0.6697725",
"0.6697725",
"0.6690064",
"0.6680027",
"0.66080713",
"0.6589076",
"0.6588525",
"0.6586361",
"0.6578832",
"0.6572404",
"0.65714",
"0.65669507",
"0.65473425",
"0.65438765",
"0.6533205",
"0.65295917",
"0.65217507",
"0.6517755",
"0.6497635",
"0.64944136",
"0.6482166",
"0.647639",
"0.64760244",
"0.6474958",
"0.64743704",
"0.64703006",
"0.6457714",
"0.64489675",
"0.6443947",
"0.6443207",
"0.6443207",
"0.6439407",
"0.64235365",
"0.64154696",
"0.6410938",
"0.6410631",
"0.6408376",
"0.64058703",
"0.64034903",
"0.639495",
"0.63773406",
"0.6374871",
"0.6360633",
"0.6360485",
"0.6360083",
"0.6354793",
"0.63524103",
"0.6342629",
"0.6331208",
"0.6325307",
"0.6325307",
"0.63152283",
"0.6292798",
"0.6289997",
"0.6288284",
"0.6285959",
"0.62790155",
"0.62758714"
] | 0.0 | -1 |
Set the value of id | public function setId($id)
{
$this->id = $id;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function SetId($value) { $this->id=$value; }",
"function setId($value) {\n $this->_id = intval($value);\n }",
"public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }",
"function set_id($id) {\n\t\t$this->id = $id;\n\t}",
"private function setID($id) {\r\n\t\t$this->id = $id;\r\n\t}",
"private function SetID($value)\n\t\t{\n\t\t\t$this->id = $value;\n\t\t}",
"function setId($id) {\n\t\t$this->setData('id', $id);\n\t}",
"function setId($id){\r\n\t\t$this->id = $id;\r\n\t}",
"function setId($id){\n\t\t$this->id = $id;\n\t}",
"function set_id($id)\n {\n $this->id = $id;\n }",
"function setId($id) {\n\t\t$this->_id = $id;\n\t}",
"public function set_id($id){\n $this->id = $id;\n }",
"function setId($id) {\r\n $this->_id = $id;\r\n }",
"public function set_id( $id ) {\n\t\t$this->id = absint( $id );\n\t}",
"public function setId($id){\n $this->_id = $id;\n }",
"public function SetId ($id);",
"function setId($id) {\n $this->id = $id;\n }",
"function setId($id) {\n $this->id = $id;\n }",
"public function setID($id) {\n $this->id = $id; \n }",
"public function setID($id){\n $this->id = $id;\n }",
"function setId($id)\n {\n $this->id = $id;\n }",
"private function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id) { $this->id = $id; }",
"public function setId($id){\n\t\t$this->id = $id;\n\t}",
"public function setId($id)\n {\n $this->id = $id;\n\n \n }",
"public function setID($id);",
"public function setId($id){\n $this->id = $id;\n }",
"public function setId($id){\n $this->id = $id;\n }",
"public function setId($id){\n $this->id = $id;\n }",
"public function set_id( $id ) {\n\t\t\t$this->id = $id;\n\t\t}",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId( $id ) {\n\t\t$this->id = $id;\n\t}",
"public function setId( $id ) {\n\t\t$this->id = $id;\n\t}",
"public function setId($id){\n\t\t\t$this->id = $id;\n\t\t}",
"public function setId($id) {\n\t\t$this->id = (integer)$id;\n\t}",
"function setId($value){\n\t\t//echo \"setting ID to \".$value;\n\t\t$this->_id=$value;\n\t\t//echo \"ID set to \".$this->_id;\n\t\treturn $this;\n\t}",
"public function setID($id){\n $this->id=$id;\n }",
"public function setId($id) \n {\n $this->id = $id;\n }",
"public function setId( $id )\n {\n $this->id = $id;\n }",
"public function setId($id){\n $this->id = $id;\n }",
"public function setId($x) { $this->id = $x; }",
"public function set($id, $value);",
"public function set($id, $value);",
"public function setId($value)\n {\n $this->setDataField('id', $value);\n }",
"public function setId($id){\n\t\tself::$_id[get_class($this)] = $id;\n\t}",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setId($id) {\n\t\t$this->id = $id;\n\t}",
"public function setId($id) {\n\t\t$this->id = $id;\n\t}",
"public function setId($id) {\n\t\t$this->id = $id;\n\t}",
"public function setId($id) {\n\t\t$this->id = $id;\n\t}",
"public function setId($id) {\n\t\t$this->id = $id;\n\t}",
"public function setid($id)\n\t\t{\n\t\t\t$this->id = $id;\n\t\t}",
"public function setId($id) {\r\n $this->_id = $id;\r\n }",
"public function set(string $id, $value);",
"public function setId($id)\n {\n $this->_id = (int) $id;\n }",
"public function setId($id)\n {\n $this->_id = (int) $id;\n }",
"public function setId($id) {\r\n $this->id = $id;\r\n }",
"public function setId($id) {\r\n $this->id = $id;\r\n }",
"public function setId($id)\n {\n $id = (int) $id;\n \n if ($id > 0)\n {\n $this->_id = $id;\n }\n }",
"public function setId($id){\n $this->id = (string) $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\r\n\t\t{\r\n\t\t\t$this->_id = $id;\r\n\t\t}",
"public function setId($id)\r\n\t{\r\n\t\t$this->id = $id;\r\n\t}",
"public function setID($id) {\n\t\t$this->id = $id;\n\t}",
"function setId($id)\n\t{\n\t\t// Set id\n\t\t$this->_id\t = $id;\n\t}",
"public static function set($id)\n {\n self::$id = $id;\n }",
"public function setId($var){\n\t\t$this->id=$var;\n\t}",
"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 function setId($id){\n $this->id=$id;\n }",
"function setId($id) {\n\t\treturn $this->setData('id', $id);\n\t}",
"public function setId($id)\n {\n $this->_id = $id;\n }",
"public function setId($id)\r\n {\r\n $this->_id = (int) $id;\r\n }",
"public function setId($id)\n\t{\n\t\t$this->id = (int) $id;\n\t}",
"public function setId($id)\n\t\t{\n\t\t\t$this->id = $id;\n\t\t}",
"public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}",
"public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}",
"public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}",
"public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}",
"public function setId($id)\n {\n $this->_id = (int)$id;\n }",
"function setId($id) {\r\n\t\t// Set id and wipe data\r\n\t\t$this->_id = $id;\r\n\t}",
"function set_id($id)\r\n {\r\n $this->set_default_property(self :: PROPERTY_ID, $id);\r\n }",
"public function setID($_id) \n \t{\n \t\t$this->_id = $_id;\n \t}",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setID($id){\n $this->ID = $id;\n }",
"public function setId($id){\n\t\t\t\t$this->id=$id;\n\t\t\t}",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }"
] | [
"0.88871074",
"0.843179",
"0.8386374",
"0.82243615",
"0.8207132",
"0.8197505",
"0.8139511",
"0.81316125",
"0.8130276",
"0.81274986",
"0.8092258",
"0.80916125",
"0.807949",
"0.80521345",
"0.80423075",
"0.8040586",
"0.8028681",
"0.8028681",
"0.80261153",
"0.8006119",
"0.8002501",
"0.80008864",
"0.79958093",
"0.79923487",
"0.79879093",
"0.79750544",
"0.7966122",
"0.7966122",
"0.7966122",
"0.7961761",
"0.79594445",
"0.7944638",
"0.7944638",
"0.7937812",
"0.79355067",
"0.79330397",
"0.792408",
"0.79183996",
"0.790568",
"0.79031277",
"0.7896356",
"0.7891149",
"0.7891149",
"0.78905076",
"0.7888843",
"0.78869873",
"0.7884865",
"0.7884865",
"0.7884865",
"0.7884865",
"0.7884865",
"0.7882667",
"0.78793806",
"0.787181",
"0.78704524",
"0.7868695",
"0.78657496",
"0.78657496",
"0.78600323",
"0.78554225",
"0.7837032",
"0.7824912",
"0.782488",
"0.78234637",
"0.7819974",
"0.7815607",
"0.7811229",
"0.78052753",
"0.7797653",
"0.7787404",
"0.77867395",
"0.7781688",
"0.7772302",
"0.7768127",
"0.7766342",
"0.7766342",
"0.7766342",
"0.7766342",
"0.7764087",
"0.7759395",
"0.7751634",
"0.77469563",
"0.7746471",
"0.7746471",
"0.7746471",
"0.7746471",
"0.77461237",
"0.7740466",
"0.77401155",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116"
] | 0.0 | -1 |
Get the value of personId Set the value of personId | public function setUserId($userId)
{
$this->userId = $userId;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setPersonID($personID) \n {\n $this->setValueByFieldName('person_id',$personID);\n //return $this->getValueByFieldName( 'applicant_codename' );\n }",
"public function setPersonId($personId)\n {\n $this->personId = $personId;\n }",
"function setPersonID( $personID )\n {\n $this->setValueByFieldName( 'person_id', $personID );\n }",
"public function getPersonId()\n {\n return $this->personId;\n }",
"public function setIdPerson($idPerson)\n {\n $this->idPerson = $idPerson;\n return $this;\n }",
"function getPersonID()\n {\n return $this->getValueByFieldName('person_id');\n }",
"public function getIdPerson()\n {\n return $this->idPerson;\n }",
"public function setPersonIdProxy($personIdProxy)\n {\n $this->personIdProxy = $personIdProxy;\n }",
"public function getPersonIdProxy()\n {\n return $this->personIdProxy;\n }",
"public function setPersona_id($persona_id){\n $this->persona_id = $persona_id;\n }",
"public function setPersona_id($persona_id){\n $this->persona_id = $persona_id;\n }",
"public function getPersonID() {\n\t\t$session_id = $this->getCurrentID();\n\t\t$this->load($session_id);\n\t\treturn $this->contactid;\n }",
"public function setPerson(\\Entities\\Person $person = null) {\n $this->person = $person;\n }",
"function update_person($person_id,$params)\n {\n $this->db->where('person_id',$person_id);\n return $this->db->update('person',$params);\n }",
"public function setSalesPersonId($var)\n {\n GPBUtil::checkString($var, True);\n $this->sales_person_id = $var;\n }",
"public function setIdSexoPeople( $idSexoPeople ){\n\t\t$this->idSexoPeople = $idSexoPeople;\n\t}",
"public function loadPersonForEdit($projectId,$personId)\n {\n $qb = $this->createQueryBuilder();\n \n $qb->addSelect('person');\n $qb->addSelect('personReg');\n $qb->addSelect('personRegOrg');\n $qb->addSelect('projectPerson');\n \n $qb->from('ZaysoCoreBundle:Person','person');\n \n $qb->leftJoin('person.registeredPersons','personReg');\n $qb->leftJoin('personReg.org','personRegOrg');\n \n $qb->leftJoin('person.projectPersons','projectPerson', \n Expr\\Join::WITH, $qb->expr()->eq('projectPerson.project', $projectId));\n \n $qb->andWhere($qb->expr()->eq('person.id',$qb->expr()->literal($personId)));\n \n return $qb->getQuery()->getOneOrNullResult(); \n \n }",
"public function getPersona_id(){\n return $this->persona_id;\n }",
"public function getPersona_id(){\n return $this->persona_id;\n }",
"public function setmodifyPersonId($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->modifyperson_id !== $v) {\n $this->modifyperson_id = $v;\n $this->modifiedColumns[] = ActionTypePeer::MODIFYPERSON_ID;\n }\n\n\n return $this;\n }",
"public function getPersonGuid();",
"public function getmodifyPersonId()\n {\n return $this->modifyperson_id;\n }",
"public function getSalesPersonId()\n {\n return $this->sales_person_id;\n }",
"public function setPersonaIdPers($personaIdPers) {\n $this->personaIdPers = $personaIdPers;\n }",
"public function update(PersonRequest $request, $id) {\n\t\t//\n\t\t$data = $request->all();\n\t\t//var_dump($data);var_dump('update');die;\n\t\t$res = $this->person->update($id, $data, 'manager'); //修改用户信息\n\n\t\tif (isset($data['operaId']) && $data['operaId'] > 0) {\n\t\t\t$this->opera->update($data['operaId'], array('uid' => $data['uid']), 'manager');\n\t\t}\n\t\techo $res;\n\t}",
"public function setIdPersonal($idPersonal)\n {\n $this->idPersonal = $idPersonal;\n\n return $this;\n }",
"public function setPersonContext(Person $person)\n\t{\n\t\t$this->person_context = $person;\n\t}",
"function loadByPersonID( $personID )\n {\n $condition = 'person_id='.$personID;\n return $this->loadByCondition( $condition );\n }",
"public function setPerson($person) {\n $this->person = $person;\n return $this;\n }",
"public function getSharedByPersonId()\n {\n return $this->sharedByPersonId;\n }",
"public function testUpdatePerson()\n {\n }",
"public function input_WbfsysPersonDuplicateSuspicion_IdPerson( $params )\n {\n $i18n = $this->view->i18n;\n\n if( !Webfrap::classLoadable( 'CorePerson_Entity' ) )\n {\n if(DEBUG)\n Debug::console( 'Entity CorePerson not exists' );\n\n Log::warn( 'Looks like the Entity: CorePerson is missing' );\n\n return;\n }\n\n\n //p: Window\n $objidCorePerson = $this->entity->getData( 'id_person' ) ;\n\n // entity ids can never be 0 so thats ok\n if\n (\n !$objidCorePerson\n || !$entityCorePerson = $this->db->orm->get\n (\n 'CorePerson',\n $objidCorePerson\n )\n )\n {\n $entityCorePerson = $this->db->orm->newEntity( 'CorePerson' );\n }\n\n $inputIdPerson = $this->view->newInput( 'inputWbfsysPersonDuplicateSuspicionIdPerson', 'Window' );\n $this->items['wbfsys_person_duplicate_suspicion-id_person'] = $inputIdPerson;\n $inputIdPerson->addAttributes(array\n (\n 'readonly' => 'readonly',\n 'name' => 'wbfsys_person_duplicate_suspicion[id_person]',\n 'id' => 'wgt-input-wbfsys_person_duplicate_suspicion_id_person'.($this->suffix?'-'.$this->suffix:''),\n 'class' => 'wcm wcm_ui_tip medium'.($this->assignedForm?' asgd-'.$this->assignedForm:''),\n 'title' => $i18n->l( 'Insert value for {@attr@} ({@src@})', 'wbf.label', array( 'attr' => 'Person', 'src' => 'Person Duplicate Suspicion' ) ),\n ));\n\n if( $this->assignedForm )\n $inputIdPerson->assignedForm = $this->assignedForm;\n\n $inputIdPerson->setWidth( 'medium' );\n\n $inputIdPerson->setData( $this->entity->getData( 'id_person' ) );\n $inputIdPerson->setReadonly( $this->fieldReadOnly( 'wbfsys_person_duplicate_suspicion', 'id_person' ) );\n $inputIdPerson->setRequired( $this->fieldRequired( 'wbfsys_person_duplicate_suspicion', 'id_person' ) );\n $inputIdPerson->setLabel( $i18n->l( 'Person', 'wbfsys.person_duplicate_suspicion.label' ) );\n\n\n $listUrl = 'modal.php?c=Core.Person.selection'\n .'&suffix='.$this->suffix.'&input=wbfsys_person_duplicate_suspicion_id_person'.($this->suffix?'-'.$this->suffix:'');\n\n $inputIdPerson->setListUrl ( $listUrl );\n $inputIdPerson->setListIcon( 'control/connect.png' );\n $inputIdPerson->setEntityUrl( 'maintab.php?c=Core.Person.edit' );\n $inputIdPerson->conEntity = $entityCorePerson;\n $inputIdPerson->refresh = $this->refresh;\n $inputIdPerson->serializeElement = $this->sendElement;\n\n\n\n $inputIdPerson->view = $this->view;\n $inputIdPerson->buildJavascript( 'wgt-input-wbfsys_person_duplicate_suspicion_id_person'.($this->suffix?'-'.$this->suffix:'') );\n $this->view->addJsCode( $inputIdPerson );\n\n // activate the category\n $this->view->addVar\n (\n 'showCat'.$this->namespace.'_Default' ,\n true\n );\n\n }",
"public function setNotifiedPerson(Lpa $lpa, NotifiedPerson $notifiedPerson, $notifiedPersonId)\n {\n $result = $this->executePut(sprintf('/v2/user/%s/applications/%s/notified-people/%s', $this->getUserId(), $lpa->id, $notifiedPersonId), $notifiedPerson->toArray());\n\n if (is_array($result)) {\n // Marshall the data into the required data object and set it in the LPA\n\n // Insert the updated attorney at the correct ID\n foreach ($lpa->document->peopleToNotify as $idx => $personToNotify) {\n if ($personToNotify->id == $notifiedPersonId) {\n $lpa->document->peopleToNotify[$idx] = new NotifiedPerson($result);\n\n break;\n }\n }\n\n return true;\n }\n\n return false;\n }",
"function updateObject(&$person) {\n\t\t$returner = $this->update(\n\t\t\t'UPDATE object_for_review_persons\n\t\t\t\tSET\n\t\t\t\t\tseq = ?,\n\t\t\t\t\trole = ?,\n\t\t\t\t\tfirst_name = ?,\n\t\t\t\t\tmiddle_name = ?,\n\t\t\t\t\tlast_name = ?\n\t\t\t\tWHERE person_id = ?',\n\t\t\tarray(\n\t\t\t\t(float) $person->getSequence(),\n\t\t\t\t$person->getRole(),\n\t\t\t\t$person->getFirstName(),\n\t\t\t\t$person->getMiddleName() . '', // make non-null\n\t\t\t\t$person->getLastName(),\n\t\t\t\t(int) $person->getId()\n\t\t\t)\n\t\t);\n\t\treturn $returner;\n\t}",
"public function getIdPersonal()\n {\n return $this->idPersonal;\n }",
"public function edit($id = null)\n\t{\n\t\tif($id == null){\n\t\t\t$this->Session->setFlash('Please select a person to edit.');\n\t\t\t$this->redirect(array('controller' => 'sga_people', 'action' => 'index'));\n\t\t}\n\t\t\n\t\t// TODO\n\t\t// if(user has permissions){}\n\t\t\n\t\tif (!$this -> SgaPerson -> exists($id))\n\t\t{\n\t\t\t$this->Session->setFlash('Please select a person to edit.');\n\t\t\t$this->redirect(array('controller' => 'sga_people', 'action' => 'index'));\n\t\t}\n\t\t\n\t\t// if form submited\n\t\tif (!$this -> request -> is('get'))\n\t\t{\n\t\t\t// use saveAll to create a transactional update for the belongsTo\n\t\t\t\n\t\t\t$this->loadModel('User');\n\t\t\t// get the associated user id and level\n\t\t\t$user = $this -> User -> find('first', array(\n\t\t\t\t'fields' => array('User.id', 'User.level'),\n\t\t\t\t'joins' => array(array(\n\t\t\t\t\t\t'table' => 'sga_people',\n\t\t\t\t\t\t'conditions' => array('sga_people.user_id = User.id')\n\t\t\t\t)),\n\t\t\t\t'conditions' => array('sga_people.id' => $id)\n\t\t\t));\n\t\t\t\n\t\t\t$this -> request -> data['SgaPerson']['id'] = $id;// needed for saveAll\n\t\t\t\n\t\t\t// if their status will be Inactive\n\t\t\tif($this->request->data['SgaPerson']['status'] === 'Inactive'){\n\t\t\t\t// if they had sga_ level\n\t\t\t\tif($user['User']['level'] === 'sga_exec' ||\n\t\t\t\t $user['User']['level'] === 'sga_user' ||\n\t\t\t\t $user['User']['level'] === 'sga_admin')\n\t\t\t\t{\n\t\t\t\t\t$this -> request -> data['User']['id'] = $user['User']['id'];\n\t\t\t\t\t$this -> request -> data['User']['level'] = 'gt_member';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if($this->request->data['SgaPerson']['status'] === 'Active'){\n\t\t\t\t// status will be Active\n\t\t\t\t\n\t\t\t\t// if the user is not already an sga_ level\n\t\t\t\tif($user['User']['level'] !== 'sga_exec' &&\n\t\t\t\t $user['User']['level'] !== 'sga_user' &&\n\t\t\t\t $user['User']['level'] !== 'sga_admin')\n\t\t\t\t{\n\t\t\t\t\t$this -> request -> data['User']['id'] = $user['User']['id'];\n\t\t\t\t\t$this -> request -> data['User']['level'] = 'sga_user';\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tif ($this -> SgaPerson -> saveAll($this -> request -> data))\n\t\t\t{\n\t\t\t\t$this -> Session -> setFlash(__('The user has been edited.', true));\n\t\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> Session -> setFlash(__('Error. Please try again.', true));\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this -> SgaPerson -> id = $id;\n\t\t$sgaPerson = $this -> SgaPerson -> read();\n\t\t\n\t\t$this -> request -> data = $sgaPerson;\n\t\t$this -> set('sgaPerson', $sgaPerson);\n\t}",
"public function setPersonn($personn)\n {\n $personn = (int) $personn;\n $this->_personn = $personn;\n }",
"public function set($new_id);",
"public function setIdPersonaje($idPersonaje)\n {\n $this->idPersonaje = $idPersonaje;\n\n return $this;\n }",
"function &getById($personId, $objectId = null) {\n\t\t$params = array((int) $personId);\n\t\tif ($objectId) $params[] = (int) $objectId;\n\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT * FROM object_for_review_persons WHERE person_id = ?'. ($objectId ? ' AND object_id = ?' : ''),\n\t\t\t$params\n\t\t);\n\n\t\t$returner = null;\n\t\tif ($result->RecordCount() != 0) {\n\t\t\t$returner =& $this->_fromRow($result->GetRowAssoc(false));\n\t\t}\n\t\t$result->Close();\n\t\treturn $returner;\n\t}",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"function assignSingle()\n {\n /* If id == 0, we shall create a new record. */\n if ($this->id)\n {\n /* Query data of this person. */\n $this->dbQuerySingle();\n }\n else\n {\n /* Initialize default values. */\n $this->_setDefaults();\n /* Find out the first non-standard candidate id, that is, an id lower than 50000. */\n $rs = $this->dbQuery(\"SELECT max(id)+1 AS id FROM student WHERE id<50000\");\n if (!empty($rs))\n {\n $this->id = $this->rs['id'] = $rs[0]['id'];\n }\n }\n $this->assign_rs();\n }",
"public function update_person_form($person_id) {\n $data['person_id'] = $person_id;\n $data['admin_id'] = $this->admin_lib->admin_id;\n $data['person'] = $this->person_db->get_person_by_person_id_admin_id($person_id, $this->admin_lib->admin_id);\n $this->load->view(\"layout/header\", $data);\n $this->load->view(\"p_list/update_person_form\", $data);\n $this->load->view(\"layout/footer\");\n }",
"function SetId($value) { $this->id=$value; }",
"public function setSharedByPersonId($sharedByPersonId)\n {\n $this->sharedByPersonId = $sharedByPersonId;\n }",
"public static function cacheKey(int $personId): string\n {\n return 'person-role-' . $personId;\n }",
"public function setcreatePersonId($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->createperson_id !== $v) {\n $this->createperson_id = $v;\n $this->modifiedColumns[] = ActionTypePeer::CREATEPERSON_ID;\n }\n\n\n return $this;\n }",
"public function getByPersonId( $personId ) {\n\t\treturn $this->get( array( \"meta_query\" => array( array( \"key\" => \"walletPersonId\", \"value\" => $personId ) ) ) );\n\t}",
"public function savePerson($person)\n {\n // Deal with new ayso record\n // One type at a time for now since getRPs will not work for new records\n // Need to deal with the case of adding a new person with an existing ayso record\n $personRegs = array($person->getRegAYSOV(),$person->getRegUSSF());\n foreach($personRegs as $personReg)\n {\n if ($personReg->getRegKey()) \n {\n // See if one already exists\n // Move to a validator?\n $personRegx = $this->loadPersonRegForKey($personReg->getRegKey());\n \n // Nothng existing means to just go ahead and create\n if (!$personRegx) $this->persist($personReg);\n else\n {\n // No change is okay\n if ($personReg->getId() == $personRegx->getId()) {}\n else\n {\n // Punt for now\n die('Trying to change to existing reg key');\n }\n }\n }\n else\n {\n if ($personReg->getId())\n {\n $this->remove($personReg);\n }\n }\n }\n // If no project then remove from flush\n $currentProjectPerson = $person->getCurrentProjectPerson();\n if (!$currentProjectPerson->getProject())\n {\n // This allows removeing a person from a project\n $this->remove($currentProjectPerson);// die('detached');\n \n // Need this otherwise an entity always gets added even with remove/detach\n // The cascade=persist was causing this when addProjectPerson was called by the form\n // $person->clearProjectPersons();\n }\n else $this->persist($currentProjectPerson); // Only persist if have a project\n \n // Deal with new persons\n if (!$person->getId()) $this->persist($person);\n \n $this->flush();\n }",
"abstract public function getByGooglePersonId($googlePersonId);",
"public function getIdPersonnage()\n {\n return $this->idPersonnage;\n }",
"public function setPeople(?int $value): void {\n $this->getBackingStore()->set('people', $value);\n }",
"public function setRespondent($id) {\n\t\tif (0) deb(\"survey1.setRespondent(): id:\", $id);\n\t\t$this->person = new Person($id);\n\t\tif (0) deb(\"survey1.setRespondent(): Person data:\", $this->person);\n\t}",
"public function set($identifier, $participation);",
"public function hent(Int $personID, Int $innslagID=null) {\r\n if( $innslagID !== null ) {\r\n $innslag = $this->hentInnslag( $innslagID );\r\n $person = $innslag->getPersoner()->get( $personID );\r\n } else {\r\n $person = Person::loadFromId( $personID );\r\n }\r\n \r\n return $person;\r\n }",
"public function getIdPersonaje()\n {\n return $this->idPersonaje;\n }",
"public function action_personEdit() {\r\n // 1. walidacja id osoby do edycji\r\n if ($this->validateEdit()) {\r\n try {\r\n // 2. odczyt z bazy danych osoby o podanym ID (tylko jednego rekordu)\r\n $record = App::getDB()->get(\"person\", \"*\", [\r\n \"id\" => $this->form->id\r\n ]);\r\n // 2.1 jeśli osoba istnieje to wpisz dane do obiektu formularza\r\n $this->form->id = $record['id'];\r\n $this->form->name = $record['name'];\r\n $this->form->surname = $record['surname'];\r\n $this->form->birthdate = $record['birthdate'];\r\n $this->form->jobTitle = $record['job_title'];\r\n $this->form->jobPlace = $record['job_place'];\r\n $this->form->userName = $record['user_name'];\r\n $this->form->role = $record['role'];\r\n } catch (\\PDOException $e) {\r\n Utils::addErrorMessage('Wystąpił błąd podczas odczytu rekordu');\r\n if (App::getConf()->debug)\r\n Utils::addErrorMessage($e->getMessage());\r\n }\r\n }\r\n\r\n // 3. Wygenerowanie widoku\r\n $this->generateView();\r\n }",
"public function update($persona);",
"function imdb_person ($id) {\n $this->imdb_base($id);\n }",
"function getPersonId()\n {\n if($this->isLogin())\n { \n return $this->ci->session->userdata('personId');\n }\n else\n {\n return false;\n } \n }",
"public function findByPersonId($personId)\n {\n return $this->createStandardQueryBuilder()\n ->field('people.people._id')->equals(new \\MongoId($personId))->getQuery()\n ->execute();\n }",
"public function set($id, $value);",
"public function set($id, $value);",
"public function edit(Person $person)\n {\n //\n }",
"public function testSetAndGetID()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the ID\r\n $testObj->setID(99);\r\n\r\n // Assert that a change occurred in the test object\r\n $this->assertNotEquals($testObj, $baseObj);\r\n\r\n // Assert that ID field was updated\r\n $this->assertEquals(99, $testObj->getID());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'ID');\r\n }",
"public function getIdPersonnage() {\n return intval($this->idPersonnage);\n }",
"public function getIdPersonnage() {\n return intval($this->idPersonnage);\n }",
"public function updatePerson($person,$flush = false)\n {\n // Do we have a primary person person?\n $slave = $person->getPerson($person);\n if (!$slave)\n {\n $this->createPersonPersonPrimary($person,$person);\n }\n /* ===========================================================\n * Not sure if like this or not, don't really know which identifier to use\n \n // Transfer identifiers to cert if necessary, should always have a league\n $leagues = $person->getLeagues();\n $identifier = $leagues[0]->getIdentifier();\n \n $certs = $person->getCerts();\n foreach($certs as $cert)\n {\n if (!$cert->getIdentifier()) $cert->setidentifier($identifier);\n }\n */\n \n // Persist\n if (!$flush) return;\n $this->persist($person);\n $this->flush();\n }",
"function getJoinOnPersonID()\n { \n return $this->getJoinOnFieldX('person_id');\n }",
"function getJoinOnPersonID()\n { \n return $this->getJoinOnFieldX('person_id');\n }",
"function getJoinOnPersonID()\n { \n return $this->getJoinOnFieldX('person_id');\n }",
"public function setId($x) { $this->id = $x; }",
"public function getPerson($id=null)\n {\n $app = \\Cobalt\\Container::get('app');\n $id = $id ? $id : $app->input->get('id');\n\n if ($id > 0) {\n\n $db = JFactory::getDBO();\n //generate query\n //\n $query = $db->getQuery(true);\n $query->select('p.*,c.name as company_name,stat.name as status_name,\n source.name as source_name, owner.name as owner_name, crmery_user.first_name AS owner_first_name, crmery_user.last_name AS owner_last_name');\n $query->from('#__people AS p');\n $query->leftJoin('#__companies AS c ON c.id = p.company_id AND c.published>0');\n $query->leftJoin('#__people_status AS stat ON stat.id = p.status_id');\n $query->leftJoin('#__sources AS source ON source.id = p.source_id');\n $query->leftJoin('#__users AS owner ON p.owner_id = owner.id');\n $query->leftJoin(\"#__users AS crmery_user ON crmery_user.id = p.owner_id\");\n\n //searching for specific person\n $query->where(\"p.published=\".$this->published);\n $query->where(\"p.id='\".$id.\"'\");\n\n //run query and grab results\n $db->setQuery($query);\n $person = $db->loadAssoc();\n\n /* Deals */\n $dealModel = new CobaltModelDeal();\n $dealModel->set('person_id',$person['id']);\n $person['deals'] = $dealModel->getDeals();;\n\n /* Notes */\n $notesModel = new CobaltModelNote();\n $person['notes'] = $notesModel->getNotes($person['id'],'person');\n\n /* Docs */\n $docsModel = new CobaltModelDocument();\n $docsModel->set('person_id',$person['id']);\n $person['documents'] = $docsModel->getDocuments();\n\n /* Tweets */\n if ($person['twitter_user']!=\"\" && $person['twitter_user']!=\" \") {\n $person['tweets'] = TweetsHelper::getTweets($person['twitter_user']);\n }\n\n $this->person = $person;\n\n } else {\n\n //TODO update things to OBJECTS\n $person = (array) new PeopleTable;\n $this->person = $person;\n\n }\n\n $app->triggerEvent('onPersonLoad', array(&$person));\n\n return $person;\n }",
"public function setNameAndId() {}",
"public function setID($id);",
"public function getPersonne()\n {\n return $this->id_personne;\n }",
"public function setEditPersona($data){\r\n\t\t\tif(!empty($data['id'])){\r\n\t\t\t\t$query =\"UPDATE persona SET nombres='\".$data['nombres'].\"', apellidos='\".$data['apellidos'].\"', curp='\".$data['curp'].\"', tel='\".$data['tel'].\"', email='\".$data['email'].\"', pass='\".$data['pass'].\"', estado='\".$data['estado'].\"', ciudad='\".$data['ciudad'].\"' WHERE id=\".$data['id'];\r\n\t\t\t\t$result =mysqli_query($this->link,$query);\r\n\t\t\t\tif($result){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}",
"public function set(string $id, $value);",
"public function getcreatePersonId()\n {\n return $this->createperson_id;\n }",
"public function update(PersonRequest $request, $id)\n {\n $person = Person::with('personalData')->findOrFail($id);\n $personalData = $person->personalData;\n $person->update([\n 'nombre' => $request->nombre,\n 'apaterno' => $request->apaterno,\n 'amaterno' => $request->amaterno,\n 'fec_nac' => $request->fec_nac,\n 'tipo' => $request->tipo,\n 'sexo' => $request->sexo,\n ]);\n $personalData->update([\n 'estado_civil' => $request->estado_civil,\n 'religion' => $request->religion,\n 'email' => $request->email,\n 'telefono' => $request->telefono,\n 'escolaridad' => $request->escolaridad,\n 'carrera_id' => $request->carrera_id,\n 'domicilio' => $request->domicilio,\n 'actividad_economica' => $request->actividad_economica,\n 'lug_nac' => $request->lug_nac,\n 'lug_res' => $request->lug_res,\n ]);\n\n toast('Actualizado correctamente.', 'success', 'top');\n return redirect()->route('student.show', compact('id'));\n }",
"public function setRecipientUserId(?string $value): void {\n $this->getBackingStore()->set('recipientUserId', $value);\n }",
"public function update_put(){\n $response = $this->PersonM->update_person(\n $this->put('id'),\n $this->put('name'),\n $this->put('hp'),\n $this->put('email'),\n $this->put('message')\n );\n $this->response($response);\n }",
"public function getRecipientId();",
"public function getRecipientId();",
"public function setIdpersona($idpersona)\n {\n $this->idpersona = $idpersona;\n\n return $this;\n }",
"public function uniqueId(): string\n {\n return $this->person->id;\n }",
"function setSwimMeetId($id)\r\n {\r\n $this->_swimmeetid = $id ;\r\n }",
"public function testSetAndGetUserID()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the User ID\r\n $testObj->setUserID(99);\r\n\r\n // Assert that a change occurred in the test object\r\n $this->assertNotEquals($testObj, $baseObj);\r\n\r\n // Assert that User ID field was updated\r\n $this->assertEquals(99, $testObj->getUserID());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'UserID');\r\n }",
"static function from_id($id){\r\n $db = new Database();\r\n $sql = \"select * from \" . Person::PERSON_TABLE . \" where id=:person_id\";\r\n $stm = $db->pdo->prepare($sql);\r\n $stm->bindParam(':person_id', $id);\r\n $stm->execute();\r\n $row = $stm->fetch();\r\n $person = new Person();\r\n $person->id = $id;\r\n //to pass validation, interests are loaded separately\r\n $row[\"interests\"] = array();\r\n\r\n //mysql datetime to right format conversion\r\n $db_date = DateTime::createfromformat(\"Y-m-d H:i:s\", $row[\"admission_date\"]);\r\n $row[\"admission_date\"] = $db_date->format(\"Y-m-d g:iA\");\r\n $row[\"admission_time\"] = $db_date->format(\"g:iA\");\r\n\r\n //load values into person properties\r\n $person->from_array($row);\r\n $person->load_interests();\r\n return $person;\r\n }",
"public function person () {\n\t\treturn $this->belongsTo(\n\t\t\t'App\\Models\\Person',\n\t\t\t'person_id',\n\t\t\t'person_id'\n\t\t);\n\t}",
"function insertObject(&$person) {\n\t\t$this->update(\n\t\t\t'INSERT INTO object_for_review_persons\n\t\t\t\t(object_id, seq, role, first_name, middle_name, last_name)\n\t\t\t\tVALUES\n\t\t\t\t(?, ?, ?, ?, ?, ?)',\n\t\t\tarray(\n\t\t\t\t(int) $person->getObjectId(),\n\t\t\t\t(float) $person->getSequence(),\n\t\t\t\t$person->getRole(),\n\t\t\t\t$person->getFirstName(),\n\t\t\t\t$person->getMiddleName() . '', // make non-null\n\t\t\t\t$person->getLastName()\n\t\t\t)\n\t\t);\n\t\t$person->setId($this->getInsertId());\n\t\treturn $person->getId();\n\t}",
"public function edit(Int $id){\n $fields = request()->validate([\n 'name' => 'string|min:3|required',\n 'sex' => 'string|required|in:M,F',\n 'cellphone' => 'required|regex:/^9[0-9]{8}+$/',\n 'first_lastname' => 'string|required',\n 'second_lastname' => 'string|required',\n 'birthday' => 'date|required',\n 'address' => 'required|string',\n 'type_people_id' => 'numeric|required|min:2|max:3',\n 'business_name' => 'required_if:type_people_id,2|string'\n ]);\n\n //Actualizando persona\n $person = Person::where('id',$id)->first();\n $person->update($fields);\n\n\n return response()->json([\n 'res' => true,\n 'message' => \"el cliente {$person->name} ha sido actualizado correctamente\"\n ]);\n }",
"public function assignUserId(int $userId, int $socialIdentityId)\n {\n return $this->model()\n ->where('id', $socialIdentityId)\n ->update([\n 'user_id' => $userId\n ]);\n }",
"public function getUserPeopleByIdAction()\n {\n /** @var Object_People $people */\n $data = $this->getRequestData();\n if (isset($data['people_id'])) {\n $people = Object_People::getById($data['people_id']);\n if (!$people) {\n $this->setErrorResponse('no People with this people_id!');\n } elseif ($this->getDeviceSession()->getUserId() != $people->getCreator()->getId()) {\n $this->setErrorResponse('no People for this user with current people_id!');\n }\n }\n\n $this->_helper->json($people);\n }",
"function get_id($id){\n\t\t$this->id = $id;\n\t}",
"function get_person($person_id)\n {\n return $this->db->get_where('person',array('person_id'=>$person_id))->row_array();\n }",
"function get_id($user_id){\n\t\t$this->id = $user_id;\n\t}",
"public static function KeyPeopleById($people) {\n\t\t\tif (empty($people)) {\n\t\t\t\treturn $people;\n\t\t\t}\n\t\t\tforeach ($people as $person) {\n\t\t\t\t$aOut[$person->intId] = $person;\n\t\t\t}\n\t\t\treturn $aOut;\n\t\t}",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:people,email,'.$id.',id,deleted_at,NULL',\n 'jabatan' => 'required',\n 'status' => 'required',\n ]);\n\n if ($validator->fails()) {\n return redirect('persons/edit/'.$id)\n ->withErrors($validator)\n ->withInput();\n }\n\n $Person = Person::findOrFail($id);\n $this->authorize('update', $Person);\n $Person->institution_id = Institution::getIdForCurrentUser($request->input('institution_id'));\n $Person->name = $request->input('name');\n $Person->email = $request->input('email');\n $Person->jabatan = $request->input('jabatan');\n $Person->status = $request->input('status');\n if ($request->has('nip')) {\n $Person->nip = $request->input('nip');\n }\n if ($request->has('expertises')) {\n $Person->expertises = $request->input('expertises');\n }\n $Person->user_id = Auth::user()->id;\n if ($Person->update()) {\n Log::info('User: '.Auth::user()->id. '->Update Person: '. $Person->id);\n flash()->overlay('Berhasil diubah', 'Notification');\n return redirect('persons');\n }\n }",
"public function SetId ($id);",
"public function setId($pId) {\n\t\t$this->Id = $pId;\n\t}"
] | [
"0.725484",
"0.7241983",
"0.7214347",
"0.70860344",
"0.7013466",
"0.6850949",
"0.64999497",
"0.62236404",
"0.6220824",
"0.6200126",
"0.6200126",
"0.61595035",
"0.5970711",
"0.5876493",
"0.58482337",
"0.583861",
"0.581785",
"0.5807853",
"0.5807853",
"0.5805777",
"0.57709986",
"0.57553005",
"0.573336",
"0.572424",
"0.56925654",
"0.568704",
"0.56631505",
"0.5623673",
"0.561911",
"0.5591161",
"0.55886394",
"0.5572299",
"0.5569969",
"0.55693895",
"0.55475944",
"0.55468786",
"0.5540136",
"0.55296046",
"0.5520838",
"0.55204266",
"0.55114305",
"0.5506458",
"0.5501517",
"0.5495864",
"0.548763",
"0.5483711",
"0.54792076",
"0.54752994",
"0.54721487",
"0.5464477",
"0.54496086",
"0.5434281",
"0.53814024",
"0.53671986",
"0.53536487",
"0.532648",
"0.53146154",
"0.5313463",
"0.52721757",
"0.5258824",
"0.5255286",
"0.5254277",
"0.5254277",
"0.52515215",
"0.5246836",
"0.5236027",
"0.5236027",
"0.5235179",
"0.5228079",
"0.5228079",
"0.5228079",
"0.52267295",
"0.5218985",
"0.5212295",
"0.52098066",
"0.5208079",
"0.518982",
"0.5185871",
"0.51814693",
"0.5175912",
"0.51757425",
"0.5167637",
"0.51650465",
"0.51650465",
"0.51484644",
"0.5146992",
"0.51429313",
"0.5119844",
"0.51144534",
"0.51122004",
"0.5110405",
"0.5109537",
"0.5089484",
"0.50827837",
"0.50764143",
"0.5072654",
"0.506174",
"0.5058834",
"0.505762",
"0.50574285",
"0.5051611"
] | 0.0 | -1 |
Verifica que los datos para iniciar session sean validos | function validarLogin ($usuario, $clave, $validacion = true, $callback = null) {
$clave = md5($clave);
$result = $this->consulta()->filtro(
['clave_usuario' => $clave,
'nombre_usuario' => $usuario,
'validacion' => 1
])->fila();
if ((is_array($result) or (is_object($result) and $result instanceof \Countable)) and count($result) > 0) {
$this->establecerAtributos($result);
$this->__obtConsultaInstancia($this->id_usuario);
$this->obtenerDataRelaciones();
$this->registrarSesion();
$this->activo = 1;
$this->salvar();
$this->obtenerPerfiles();
return $result;
}
else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function validar_sessao() {\n if (!$this->session->userdata('LOGADO')) {\n redirect('admin/acesso');\n }\n return true;\n }",
"function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }",
"public function sessionIsValid()\n {\n return $this->authClient->sessionIsValid();\n }",
"public function valida(){\n if(isset($_GET['consulta'])){\n $arraydata = array(\n 'nombre' => $_POST['nombre'],\n 'email' => $_POST['email'],\n 'ip' => $this->get_ip(),\n 'fecha_acceso' => date('Y-m-d h:i:s'),\n 'rol' => 'Consulta'\n );\n if($this->AM->guardar_varios('accesos_externos',$arraydata)){\n $this->session->set_userdata($arraydata);\n header(\"Location: \".base_url().'inicio');\n }\n }\n else{\n $usuario = $_POST['usuario'];\n $password = md5($_POST['password']);\n $result = json_decode($this->AM->consulta_condicionada('vw_usuarios','usuario=\"'.$usuario.'\" AND password=\"'.$password.'\" AND activo = 1 '));\n if(count($result) == 1){\n echo \"hay resultado\";\n $arraydata = array(\n 'nombre' => $result[0]->nombre,\n 'email' => $result[0]->email,\n 'ip' => $this->get_ip(),\n 'fecha_acceso' => date('Y-m-d h:i:s'),\n 'rol' => $result[0]->rol\n );\n \n $array_acceso = array(\n 'ip' => $this->get_ip(),\n 'fecha_acceso' => date('Y-m-d h:i:s'),\n 'usuario_id' => $result[0]->id\n );\n \n if($this->AM->guardar_varios('accesos',$array_acceso)){\n $this->session->set_userdata($arraydata);\n header(\"Location: \".base_url().'inicio');\n }\n }\n else{\n header(\"Location: \".base_url().'?error=1');\n }\n }\n }",
"protected function isValidSession()\n {\n //Login check\n $this->_consumidor = Extra_UserSession::getUserLogged();\n if ($this->_consumidor === null) {\n Extra_ErrorREST::setUserNotLoggedIn($this->getResponse());\n return false;\n }\n return true;\n }",
"function CheckSession(){\n if(isset($_SESSION[\"userSession\"]->id)){\n // VALIDA SI TIENE CREDENCIALES PARA LA URL CONSULTADA\n $_SESSION['userSession']->status= userSessionStatus::nocredencial;\n $_SESSION['userSession']->url = $_POST[\"url\"];\n $urlarr = explode('/', $_SESSION['userSession']->url);\n $myUrl = end($urlarr)==''?'index.html':end($urlarr);\n foreach ($_SESSION['userSession']->eventos as $evento) {\n if(strtolower($myUrl) == strtolower($evento->url)){\n $_SESSION['userSession']->status= userSessionStatus::login;\n break;\n }\n }\n }\n else {\n $this->status= userSessionStatus::invalido;\n $this->url = $_POST[\"url\"];\n $_SESSION[\"userSession\"]= $this;\n }\n }",
"public function sessionValidator(){\n if($_POST['userName'] != '' && $_POST['password'] != ''){\n $users = new Users();\n $sessionUsers = $users -> query(\n 'SELECT id, userName, password, profileImg FROM users WHERE userName= :userName',\n [\n ':userName' => $_POST['userName']\n ]\n );\n //=======control si existe o no el usuario que esta tratando de iniciar session=======\n if($sessionUsers -> rowCount()){\n foreach($sessionUsers as $row){\n $user = $row;\n }\n // veficando la validez de la contraseña\n // echo $_POST['password'] + 'contraseña';\n if( password_verify(htmlentities(addslashes($_POST['password'])),$user['password'])){\n // ==================== Acciones si la session fue exitosa ====================\n $this->sessionStart($user); // llamando a la funcion encargado de iniciar session\n echo 'continue';\n }else{\n // ==================== Accion que se ejecuta cuando la contraseña es incorrecta ====================\n echo 'errorPass';\n }\n }else{\n // ====================Accion a ejecutar si el usuario no existe====================\n echo 'errorUser';\n }\n }\n }",
"protected function valid()\r\n {\r\n return isset($_SESSION['user']['user_id']) ? true : false;\r\n }",
"public function session_validate(){\n\t\tif(!empty($this->data['Leave']['leave_from']) && !empty($this->data['Leave']['leave_to'])){\n\t\t\t$leave_from = $this->format_date_save($this->data['Leave']['leave_from']);\n\t\t\t$leave_to = $this->format_date_save($this->data['Leave']['leave_to']);\n\t\t\t$diff = $this->diff_date($leave_from, $leave_to);\t\t\t\n\t\t\tif($diff > 0 && $this->data['Leave']['session'] != 'D'){\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}",
"public function validate() {\n \n $session_id = 0;\n\t\t$session_hash = '';\n\t\n if (isset($GLOBALS[\"_COOKIE\"][\"sessionid\"])) { \n \t $cookie_array = explode('|', $GLOBALS[\"_COOKIE\"][\"sessionid\"]);\n\t\t\tif ($cookie_array[0]) {\n\t\t\t\t$session_id = $cookie_array[0];\n\t\t\t\t$session_hash = $cookie_array[1];\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\n if (!($session_id && $session_hash)) { return false; }\n\n /* Pull the information for the SessionID out of the database. */\n\n $this->load($session_id);\n\t\tif ($this->sessionid == 0 || $this->expired == 1) {\n\t\t\treturn false;\n\t\t}\n\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n $session_string = $this->session;\n\n if ($session_hash == md5($session_string . $ipaddress . 'scfgshatfk')) {\n return true;\n } elseif ($session_hash == md5($session_string . 'scfgshatfk')) {\n return true; \n } else {\n\t\t\t$this->clear();\n\t\t\treturn false;\n\t\t}\n }",
"public function check() {\n return (isset($_SESSION['usuario']));\n }",
"public function validaDadosLogin()\n {\n $errors = '';\n\n $errors .= $this->validaEmail();\n $errors .= $this->validaSenha();\n\n $userDb = $this->getUserEmail();\n\n if (!strlen($errors)) {\n if (!$userDb instanceof $this) {\n $errors .= 'Usuário não cadastrado!';\n } else {\n //Verifica se a senha informada é a mesma salva no banco\n if (!password_verify($this->senha, $userDb->senha)) {\n $errors .= 'Senha inválida!';\n }\n }\n }\n\n $errors = $this->getMsgFormat($errors, 'alert-danger');\n\n //Se o login deu certo, cria uma sessão com alguns dados\n if (!strlen($errors)) {\n $_SESSION['ADM'] = strtoupper($userDb->administrador) === 'S';\n $_SESSION['CLIENTE'] = strtoupper($userDb->cliente) === 'S';\n $_SESSION['USER_ID'] = $userDb->id;\n $_SESSION['lOGADO'] = true;\n }\n\n return $errors;\n }",
"public function loginValidated()\n\t\t{\n\t\t\t$campos = array('*');\n\t\t\t\n\t\t\t$pw = $this->_objCrypt->encrypt($this->_password);\n\n\t\t\t# Campos que se incluyen en la validacion WHERE DE LA SQL\n\t\t\t$field['userName'] = $this->_userName;\n\t\t\t$register = Usuario::findCustom($campos, $field);\n\n\t\t\t# Validación nombre usuario en BD\n\t\t\tif (empty($register)) {\n\t\t\t\t$json_error = array('success' => 'error', 'error' => 'error1');\n\t\t\t\t$success = json_encode($json_error);\n\t\t\t\tsetcookie(\"success\", $success, time() + 60, \"/\"); \n\t\t\t\theader('location:../views/users/login.php');\n\t\t\t}else{\n\t\t\t\t# pw que se obtiene de BD\n\t\t\t\t$pw_DB = $register[0]->getPassword();\n\n\t\t\t\t# Validacion coincidencia de contraseñas\n\t\t\t\tif ($pw !== $pw_DB) {\n\t\t\t\t\t$json_error = array('success' => 'error', 'error' => 'error2');\n\t\t\t\t\t$success = json_encode($json_error);\n\t\t\t\t\tsetcookie(\"success\", $success, time() + 60, \"/\"); \n\t\t\t\t\theader('location:../views/users/login.php');\n\t\t\t\t}else{\n\t\t\t\t\t$data_session['id_user'] \t= $register[0]->getId();\t\t\t\t\t\n\t\t\t\t\t$data_session['nombre'] \t= $register[0]->getNombre();\t\t\t\n\t\t\t\t\t$data_session['apellido'] \t\t= $register[0]->getApellido();\t\t\t\n\t\t\t\t\t$data_session['tipoUsuario']\t= $register[0]->getTipoUsuario();\t\t\t\n\t\t\t\t\t$data_session['userName'] \t\t= $register[0]->getUserName();\t\t\t\n\t\t\t\t\t$data_session['email'] \t\t = $register[0]->getEmail();\t\t\t\n\t\t\t\t\t$data_session['telFijo'] \t\t= $register[0]->getTelFijo();\t\t\t\n\t\t\t\t\t$data_session['telMovil'] \t\t= $register[0]->getTelMovil();\t\t\t\n\t\t\t\t\t$data_session['estado'] \t\t= $register[0]->getEstado();\n\t\t\t\t\t$data_session['lan']\t\t\t= $_COOKIE['lan'];\n\t\t\t\t\t\n\t\t\t\t\t$obj_Session = new Simple_sessions();\n\t\t\t\t\t$obj_Session->add_sess($data_session);\n\n\t\t\t\t\theader('location:../views/users/crearUsuario.php');\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"protected function validateSession()\n {\n if (empty(session()->get('user'))) {\n return false;\n }\n return true;\n }",
"public function valid() {\n\t\t$key = key($this->session);\n\n\t\treturn ($key == null || $key == false) ? false : true;\n\t}",
"public function verifySessionIntegrity() {\n if (!$this->isValidSession()) {\n $this->end();\n $this->restart();\n }\n }",
"private function check_isvalidated() \n\t{\n\t\t\n if(! $this->session->userdata('validated') || $this->session->userdata('arole')!='1')\n {\n redirect('superadmin/login');\n //redirect('registration/logout');\n }\n }",
"public function loginUsers($data) {\n try {\n $sql = \"SELECT usua_cedula, usua_contrasena FROM usuario WHERE usua_cedula = ?\";\n $query = $this->pdo->prepare($sql);\n $valid = $query->execute(array($data[0]));\n $valid= $query->fetch();\n\n if (password_verify($data[1], $valid[1])) { // Condicional para validar contrasena si es igual\n $sql1 = \"SELECT u.usua_id, CONCAT(UPPER(LEFT(u.usua_nombre1, 1)), LOWER(SUBSTRING(u.usua_nombre1,2))) AS usua_nombre1, u.usua_nombre2, CONCAT(UPPER(LEFT(u.usua_apellido1, 1)), LOWER(SUBSTRING(u.usua_apellido1,2))) AS usua_apellido1, u.usua_apellido2, u.usua_cedula, u.carg_id,\n u.usua_contrasena, u.clien_id, u.usua_estado, u.usua_modifica, u.usua_ingreso, u.sed_id, u.area_id\n FROM usuario AS u\n WHERE usua_cedula = ? \";\n $query = $this->pdo->prepare($sql1);\n $const= $query->execute(array($data[0]));\n $const= $query->fetch();\n\n if ($const[9] === \"1\" && $const[11] === \"1\") {\n session_start(); // Variables para iniciar session\n $_SESSION[\"validar\"] = true;\n $_SESSION[\"nombre\"] = $const[1];\n $_SESSION[\"apellido\"] = $const[3];\n $_SESSION[\"idusuario\"] = $const[0];\n $_SESSION[\"cargo\"] = $const[6];\n $_SESSION[\"idcliente\"] = $const[8];\n $_SESSION[\"sede\"] = $const[12];\n return true;\n }else if ($const[11] === \"0\" && $const[9] === \"1\"){\n session_start(); // Variables para iniciar session\n $_SESSION[\"cedula\"] = $const[5];\n return \"successpassword\";\n }\n }else {\n return \"authentication\";\n }\n\n } catch (Exception $e) {\n die($e->getMessage());\n }\n\n }",
"public function checkLogin(){\n $dbQuery = new DBQuery(\"\", \"\", \"\");\n $this->email = $dbQuery->clearSQLInjection($this->email);\n $this->senha = $dbQuery->clearSQLInjection($this->senha);\n \n // Verificar quantas linhas um Select por Email e Senha realiza \n $resultSet = $this->usuarioDAO->select(\" email='\".$this->email.\"' and senha='\".$this->senha.\"' \");\n $qtdLines = mysqli_num_rows($resultSet);\n \n // Pegar o idUsuario da 1ª linha retornada do banco\n $lines = mysqli_fetch_assoc($resultSet);\n $idUsuario = $lines[\"idUsuario\"];\n \n\n \n // retorna aonde a função foi chamada TRUE ou FALSE para se tem mais de 0 linhas\n if ( $qtdLines > 0 ){\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n $_SESSION[\"idUsuario\"] = $idUsuario;\n $_SESSION[\"email\"] = $this->email;\n return(true);\n }else{\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n unset($_SESSION[\"idUsuario\"]);\n unset($_SESSION[\"email\"]);\n return(false);\n }\n }",
"private function check_isvalidated()\n \t{\n\n \t\t// if user has login session return true\n\t\tif(isset($_SESSION['admin_name']))\n\t\t{\n\t\t\treturn true;\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t\t\n\t\t\n\t}",
"public function checkUsersSession(){\n\t}",
"private function verifySession()\n {\n if ((isset($this->session['id']))\n && (is_numeric($this->session['id']))\n && (isset($this->session['legit']))\n && ($this->session['legit'] === $this->sessionHash())\n ) {\n return true;\n }\n return false;\n }",
"function validarDatosRegistro() {\r\n // Recuperar datos Enviados desde formulario_nuevo_equipo.php\r\n $datos = Array();\r\n $datos[0] = (isset($_REQUEST['marca']))?\r\n $_REQUEST['marca']:\"\";\r\n $datos[1] = (isset($_REQUEST['modelo']))?\r\n $_REQUEST['modelo']:\"\";\r\n $datos[2] = (isset($_REQUEST['matricula']))?\r\n $_REQUEST['matricula']:\"\";\r\n \r\n //-----validar ---- //\r\n $errores = Array();\r\n $errores[0] = !validarMarca($datos[0]);\r\n $errores[1] = !validarModelo($datos[1]);\r\n $errores[2] = !validarMatricula($datos[2]);\r\n \r\n // ----- Asignar a variables de Sesión ----//\r\n $_SESSION['datos'] = $datos;\r\n $_SESSION['errores'] = $errores; \r\n $_SESSION['hayErrores'] = \r\n ($errores[0] || $errores[1] ||\r\n $errores[2]);\r\n \r\n}",
"public function validarCredenciales() {\n try {\n $host = $this->dataPost->getServer('HTTP_HOST');\n $dr = $this->dataPost->getServer('DOCUMENT_ROOT');\n if (!isset($this->dataSession->logged)) {\n header('HTTP/1.0 401 Unauthorized');\n header(\"Location: http://$host/comun/Security/Header/401.html\");\n exit();\n } else {\n if (isset($this->dataSession->lastAccess)) {\n $lastAccessed = $this->dataSession->lastAccess;\n $currentAccessed = $this->dataSession->currentAccess;\n $passedTime = (strtotime($currentAccessed) - strtotime($lastAccessed));\n $fileConfigSystem = $dr . \"/comun/comun/xml/system.xml\";\n $xmlConfigSystem = simplexml_load_file($fileConfigSystem);\n $sessiontime = ($xmlConfigSystem != false) ? (int) $xmlConfigSystem->environment->sessiontime : 900;\n if ($passedTime >= $sessiontime) {\n $this->dataSession->destroy();\n header(\"Location: http://$host/app/index/index.php/index/expired\");\n exit();\n } else {\n $this->dataSession->lastAccess = date(\"Y-n-j H:i:s\");\n }\n } else {\n $this->dataSession->lastAccess = date(\"Y-n-j H:i:s\");\n }\n }\n } catch (Exception $exc) {\n throw $exc;\n }\n }",
"public function validarDatos()\n\t\t{\n\t\t\treturn true;\n\t\t}",
"public function validarDatos()\n\t\t{\n\t\t\treturn true;\n\t\t}",
"private function checkValidUser() {\n return;\n if(!($this->getData('key') == $this->sessionId && isset($_SESSION['user']) && isset($_SESSION['valid']) && $_SESSION['valid'] === true)) {\n $this->output = array(\n 'success' => false,\n 'key' => 'kMIvl'\n );\n\n // Terminate the call now, user isn't allowed to perform this action\n $this->renderOutput(true);\n }\n }",
"public function validate_database_login_session() {\n $user_id = $this->auth->session_data[$this->auth->session_name['user_id']];\n $session_token = $this->auth->session_data[$this->auth->session_name['login_session_token']];\n\n $sql_where = array(\n $this->auth->tbl_col_user_account['id'] => $user_id,\n $this->auth->tbl_col_user_account['suspend'] => 0,\n $this->auth->tbl_col_user_session['token'] => $session_token\n );\n\n // If a session expire time is defined, check its valid.\n if ($this->auth->auth_security['login_session_expire'] > 0)\n {\n $sql_where[$this->auth->tbl_col_user_session['date'].' > '] = $this->database_date_time(-$this->auth->auth_security['login_session_expire']);\n }\n\n $query = $this->db->from($this->auth->tbl_user_account)\n ->join($this->auth->tbl_user_session, $this->auth->tbl_join_user_account.' = '.$this->auth->tbl_join_user_session)\n ->where($sql_where)\n ->get();\n\n ###+++++++++++++++++++++++++++++++++###\n\n // User login credentials are valid, continue as normal.\n if ($query->num_rows() == 1)\n {\n // Get database session token and hash it to try and match hashed cookie token if required for the 'logout_user_onclose' or 'login_via_password_token' features.\n $session_token = $query->row()->{$this->auth->database_config['user_sess']['columns']['token']};\n $hash_session_token = $this->hash_cookie_token($session_token);\n\n // Validate if user has closed their browser since login (Defined by config file).\n if ($this->auth->auth_security['logout_user_onclose'])\n {\n if (get_cookie($this->auth->cookie_name['login_session_token']) != $hash_session_token)\n {\n $this->set_error_message('login_session_expired', 'config');\n $this->logout(FALSE);\n return FALSE;\n }\n }\n // Check whether to unset the users 'Logged in via password' status if they closed their browser since login (Defined by config file).\n else if ($this->auth->auth_security['unset_password_status_onclose'])\n {\n if (get_cookie($this->auth->cookie_name['login_via_password_token']) != $hash_session_token)\n {\n $this->delete_logged_in_via_password_session();\n return FALSE;\n }\n }\n\n // Extend users login time if defined by config file.\n if ($this->auth->auth_security['extend_login_session'])\n {\n // Set extension time.\n $sql_update[$this->auth->tbl_col_user_session['date']] = $this->database_date_time();\n\n $sql_where = array(\n $this->auth->tbl_col_user_session['user_id'] => $user_id,\n $this->auth->tbl_col_user_session['token'] => $session_token\n );\n\n $this->db->update($this->auth->tbl_user_session, $sql_update, $sql_where);\n }\n\n // If loading the 'complete' library, it extends the 'lite' library with additional functions,\n // however, this would also runs the __construct twice, causing the user to wastefully be verified twice.\n // To counter this, the 'auth_verified' var is set to indicate the user has already been verified for this page load.\n return $this->auth_verified = TRUE;\n }\n // The users login session token has either expired, is invalid (Not found in database), or their account has been deactivated since login.\n // Attempt to log the user in via any defined 'Remember Me' cookies.\n // If the \"Remember me' cookies are valid, the user will have 'logged_in' credentials, but will have no 'logged_in_via_password' credentials.\n // If the user cannot be logged in via a 'Remember me' cookie, the user will be stripped of any login session credentials.\n // Note: If the user is also logged in on another computer using the same identity, those sessions are not deleted as they will be authenticated when they next login.\n else\n {\n $this->delete_logged_in_via_password_session();\n return FALSE;\n }\n }",
"function _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}",
"public function validacion(){\n\t\t$this->inicializa();\n\t\t$client=Cliente::find(1);\n\t\t$id=$client->transaccion.\"\";\n\t\t// si en la transaccion aparece el id del cliente que esta en la base de datos entonces la transaccion le pertenece\n\t\t// y por tanto es valida\n\t\t$transaction = $this->pasarela->transaction()->find(\"{$id}\");\n\t\t\n\t\tif($client->token==$transaction->customer['id'])\n\t\t\treturn true;\n\t\treturn false;\n\t\t//return response()->json($transaction);\n\t}",
"function inicie_sesion(){\n return (isset($_SESSION['usuario'])&&$_SESSION['usuario']!=''&&isset($_SESSION['session_key']));\n}",
"public function validaEstoque(): bool\n {\n echo \"Registro de retirada efetuado com sucesso\";\n return true;\n }",
"public function validar_usuario($usuario, $clave) {\n $result = false;\n \n $sql = \"SELECT TO_CHAR(AU.FECHA_CREACION, 'DD/MM/YYYY') FECHAC, TO_CHAR(AU.FECHA_EXPIRACION, 'DD/MM/YYYY') FECHAE, AU.* \n FROM LEA_ADMIN_USUARIOS AU \n WHERE AU.ID_ESTADO_USUA = 1 \";\n //pr($sql); exit;\n $query = $this->db->query($sql);\n while ($row = $query->unbuffered_row('array')) {\n if($row[\"USUARIO\"] == $usuario && strcmp($row[\"CLAVE\"], $clave) === 0) {\n $sessionData = array(\n \"auth\" => \"OK\",\n \"id\" => $row[\"ID_USUARIO\"],\n \"usuario\" => $row[\"USUARIO\"],\n //\"clave\" => $row[\"CLAVE\"],\n \"tipo_usuario\" => $row[\"ID_TIPO_USUARIO\"],\n \"estado\" => $row[\"ID_ESTADO_USUA\"],\n \"fecha_creacion\" => $row[\"FECHAC\"],\n \"fecha_expiracion\" => $row[\"FECHAE\"]\n );\n $this->session->set_userdata($sessionData);\n $result = true;\n break;\n }\n }\n $this->db->close();\n return $result;\n }",
"function getSessionExiste()\n{\n $sessionEstValide=false;\n \n setSessionOn();\n\n if (isset($_SESSION['AuthInformation']) && !empty($_SESSION['AuthInformation']))\n {\n $ValidSession = true;\n } \n return $ValidSession;\n}",
"public final function verifySetData(){\n\n foreach($this->data as $k => $v){\n $this->verifyData($k);\n }//foreach\n\n if(count($this->errors)){\n return false;\n }//if\n\n return true;\n\n }",
"public function formIsValid()\n {\n $data = array();\n foreach ($this->getSessionNamespace() as $key => $info) {\n $data[$key] = $info;\n }\n \n return $this->getForm()->isValid($data);\n }",
"private function verificar_cookie_sesion()\n\t{\n\t\t$session = \\Config\\Services::session();\n\t\t//verificar cookies\n\t\tif (isset($_COOKIE['ivafacil_admin_nick']) && isset($_COOKIE['ivafacil_admin_pa']) ) {\n\n\t\t\t$nick= $_COOKIE['ivafacil_admin_nick'];\n\t\t\t$pass=$_COOKIE['ivafacil_admin_pa'];\n\t\t\t//comparar passw hasheadas\n\t\t\t$usuarioCookie = new Admin_model();\n\t\t\t$result_pass_comparison =\n\t\t\t$usuarioCookie->where(\"nick\", $nick) \n\t\t\t->where(\"session_id\", $pass)->first();\n\n\t\t\tif (is_null($result_pass_comparison)) {\n\t\t\t\t//MOSTRAR FORM\n\n\t\t\t\treturn view(\"admin/login\");\n\t\t\t} else {\n\n\t\t\t\t//Se pidio recordar password?\n\t\t\t\tif ($result_pass_comparison->remember == \"S\") {\n\t\t\t\t\t//recuperar sesion si es valida\n\t\t\t\t\t$hoy = strtotime(date(\"Y-m-d H:i:s\"));\n\t\t\t\t\t$expir = strtotime($result_pass_comparison->session_expire);\n\t\t\t\t\tif ($hoy > $expir) return view(\"admin/login\");\n\n\t\t\t\t\t//crear sesion \n\t\t\t\t\t$newdata = [\n\t\t\t\t\t\t'nick' => $nick, \n\t\t\t\t\t\t'pass_alt' => $pass,\n\t\t\t\t\t\t'remember'=> \"S\"\n\t\t\t\t\t];\n\t\t\t\t\treturn view(\"admin/login\", $newdata);\n\t\t\t\t} else {\n\t\t\t\t\treturn view(\"admin/login\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//MOSTRAR FORM\n\t\treturn view(\"admin/login\");\n\t}",
"public function session_valid()\n\t{\n\t\t$ip_address = $_SERVER['REMOTE_ADDR'];\n\t\t$user_agent = $_SERVER['HTTP_USER_AGENT'];\n\n\t\t$ip_blacklist = [\n\t\t\t'0.0.0.0',\n\t\t\t'127.0.0.1'\n\t\t];\n\n\t\t$ua_blacklist = [\n\t\t\t'false',\n\t\t\tFALSE,\n\t\t\t'',\n\t\t\t'PHPUnit'\n\t\t];\n\n\t\tif (in_array($ip_address, $ip_blacklist) || in_array($user_agent, $ua_blacklist))\n\t\t{\n\t\t\t$this->sess_destroy();\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}",
"public function verifySession() {\n\t\t$this->reload();\n\t\tif ($this->getSession() == session_id())\n\t\t\treturn true;\n\t\telse {\n\t\t\tif($_SESSION[\"loginUser\"])\n\t\t\t\tunset($_SESSION[\"loginUser\"]);\n\t\t\treturn false;\n\t\t}\n\t}",
"public static function validateAll()\n {\n\n foreach ($_SESSION as $key => $value) {\n\n if (strpos($key, \"form_\") !== false) {\n\n $id = $value[\"form_id\"];\n\n if (!empty($_POST[\"check\"])) {\n\n self::validate($id);\n }\n }\n }\n }",
"private function checkSignIn () {\n\n if (!empty($_POST)) {\n if (!isset($_POST['nickname']) || empty($_POST['nickname'])) {\n $_SESSION['errors']['nickname'] = \"Veuillez remplir le champ 'nickname' pour finaliser votre inscription.\";\n }\n else {\n $this->nickname = htmlentities($_POST['nickname']);\n }\n\n if (!isset($_POST['birthdate']) || empty($_POST['birthdate'])) {\n $_SESSION['errors']['birthdate'] = \"Veuillez indiquez votre dâte de naissance pour finaliser votre inscription.\";\n }\n else {\n $this->birthdate = htmlentities($_POST['birthdate']);\n }\n\n if (!isset($_POST['email']) || empty($_POST['email'])) {\n $_SESSION['errors']['email'] = \"Veuillez indiquez une adresse e-mail pour finaliser votre inscription.\";\n }\n else if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {\n $_SESSION['errors']['validateMail'] = \"Veuillez indiquez une adresse e-mail au format e-mail tel que : '[email protected]' pour finaliser votre inscription.\";\n }\n else if ($this->checkMail($_POST['email'])) {\n $_SESSION['errors']['email'] = \"L'adresse e-mail indiquée est déjà utilisé par un autre utilisateur. Veuillez en choisir une autre pour finaliser votre inscription.\";\n }\n else if (empty($_POST['validateMail'])) {\n $_SESSION['errors']['validateMail'] = \"Veuillez indiquez votre adresse e-mail une seconde fois pour finaliser votre inscription.\";\n }\n else if ($_POST['email'] !== $_POST['validateMail']) {\n $_SESSION['errors']['validateMail'] = \"Veuillez indiquez deux adresse e-mail identiques pour finaliser votre inscription.\";\n }\n else {\n $this->email = htmlentities($_POST['email']);\n }\n\n if (empty($_POST['location'])) {\n $_SESSION['errors']['location'] = \"Veuillez indiquez votre adresse pour finaliser l'inscription.\";\n } else {\n $this->location = htmlentities($_POST['location']);\n }\n\n if (empty($_POST['phone'])) {\n $_SESSION['errors']['phone'] = \"Veuillez indiquez votre numero de phone pour finaliser l'inscription.\";\n }\n else {\n $this->phone = htmlentities($_POST['phone']);\n }\n\n if (empty($_POST['password'])) {\n $_SESSION['errors']['password'] = \"Veuillez indiquez un mot de passe pour finaliser votre inscription\";\n }\n else if (strlen($_POST['password']) < 8) {\n $_SESSION['errors']['password'] = \"Votre mot de passe doit contenir au minimum 8 caractères pour finaliser votre inscription.\";\n }\n else if (empty($_POST['passwordConfirm'])) {\n $_SESSION['errors']['passwordConfirm'] = \"Veuillez indiquez un mot de passe pour finaliser votre inscription\";\n }\n else if ($_POST['password'] != $_POST['passwordConfirm']) {\n $_SESSION['errors']['password'] = \"Veuillez indiquez deux mots de passes identiques pour finaliser votre inscription.\";\n }\n else {\n $this->password = UtilsClass::hash($_POST['password']);\n }\n\n if (empty($_POST['username'])) {\n $_SESSION['errors']['username'] = \"Veuillez remplir le champs login pour poursuivre votre inscription\";\n }\n else if (UsersClass::checkLogin($_POST['username'])) {\n $_SESSION['errors']['username'] = \"Le login indiqué est déjà utilisé par un autre utilisateur. Veuillez en choisir un autre pour finaliser votre inscription.\";\n }\n else {\n $this->username = htmlentities($_POST['username']);\n }\n }\n }",
"public function valid()\n {\n if ($this->container['call_session_history_id'] === null) {\n return false;\n }\n if ($this->container['account_id'] === null) {\n return false;\n }\n if ($this->container['application_id'] === null) {\n return false;\n }\n if ($this->container['user_id'] === null) {\n return false;\n }\n if ($this->container['start_date'] === null) {\n return false;\n }\n if ($this->container['initiator_address'] === null) {\n return false;\n }\n if ($this->container['media_server_address'] === null) {\n return false;\n }\n if ($this->container['log_file_url'] === null) {\n return false;\n }\n return true;\n }",
"private function check_login(){\n if (isset($_SESSION['email'])){\n $this->email=$_SESSION['email'];\n\t\t\t$this->role=$_SESSION['role'];\n\t\t\t$this->id=$_SESSION['id'];\n $this->signed_in=true;\n }\n else{\n unset($this->email);\n $this->signed_in=false;\n }\n }",
"function login_check() {\n\t$exp_time = $_SESSION[\"expires_by\"];\n\t\n\t//jika waktu sistem lebih kecil dari nilai waktu session\n\tif (time() < $exp_time) {\n\t\t//panggil fungsi dan tambah waktu session\n\t\tlogin_validate();\n\t\treturn true; \n\t}else{\n\t\t//jika waktu session lebih kecil dari waktu session atau lewat batas\n\t\t//maka akan dilakukan unset session\n\t\tunset($_SESSION[\"expires_by\"]);\n\t\treturn false; \n\t}\n}",
"public static function validate() {\n\t\t\tself::initialize();\n\t\t\tif (isset(self::$customer['user']['id']) && self::$customer['user']['id']) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tself::$customer = array();\n\t\t\t\tself::$customer['loginPage'] = $_SERVER['REQUEST_URI'];\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"function estaLogueado() {\n return isset($_SESSION[\"email\"]);\n }",
"public function verify_user_data()\n {\n\n if(isset($_SESSION['id']) AND $_SESSION['id'] == $_GET['id'])\n {\n\n $this->user_data_check = true;\n\n }else{\n\n $this->user_data_check = false;\n\n }\n\n return $this->user_data_check;\n\n }",
"function EstoyLogueado()\n\t{\n\t\tif (!isset($_SESSION['clientecod']) || $_SESSION['clientecod']==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public function updateData(){\n\n // Declaro el array 'valid', para almacenar los campos validados: \n $valid = [];\n\n //Se asigna la sesion 'registrar' en la varaible:\n $data = $_SESSION['registrar'];\n\n //Se instancia la clase 'Validate', para validar los datos de las propiedades:\n $validate = new Validate;\n\n //Se validan que los campos no estén vacios\n if (!empty($data)) {\n \n if ($validate->validateString($data->cedula)) {\n \n //Agregamos el campo validado :D\n $valid['cedula'] = true;\n\n }else{\n\n //Retornamos el error :/ ):\n die('{ \"registrar\":false, \"error\":\"Campo nueva_cedula erroneo\" }');\n\n }\n\n }\n\n //Se validan que los campos no estén vacios\n if (!empty($data->password) && !empty($data->confirm_password)) {\n\n //Se valida que el campo sea un String:\n if ($validate->validatePassword($data->confirm_password, $data->password)) {\n\n //Agregamos el campo validado :D\n $valid['password'] = true;\n\n }else{\n\n //Retornamos el error :/ :\n die('{ \"registrar\":false, \"error\":\"El campo nueva_password debe ser un numero\" }');\n }\n }else{\n\n //Retornamos el error :/ ):\n die('{\"registrar\":false, \"error\":\"El campo password no debe estar vacio\"}');\n }\n\n //Retornamos la respuesta: \n return ['registrar' => true, 'campos' => $valid];\n\n }",
"private function sesion_iniciada()\n\t{\n\t\t$this->load->library(\"session\");\n\t\tif($this->session->userdata(\"isess\")){\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}",
"protected final function is_still_valid($session)\n {\n }",
"public function verify() {\n // Compare session_id as a binary safe string.\n if (strcmp($this->session_id, '0') !== 0) {\n // Session id cookie is set, build the SQL to validate the session id.\n $sql = \"SELECT A.id FROM Users U INNER JOIN Administrators A ON U.id = A.id WHERE session_id = '$this->session_id'\";\n } else {\n // Session id cookie is not set, build the SQL to check the email and password.\n $sql = \"SELECT A.id FROM Users U INNER JOIN Administrators A ON U.id = A.id WHERE email = '$this->email' AND password = '$this->password'\";\n }\n\n // Query the database.\n $results = parent::queryDatabase($sql);\n\n // There should only be one result to the query. If there are any more,\n // something else has failed, default to to fail status - do not grant\n // user access.\n if ($results->num_rows === 1) {\n return True;\n } else {\n return False;\n }\n }",
"public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }",
"function revisar_usuario() {\n return isset($_SESSION['nombre']); //valida que exista un nombre en session\n}",
"function isDataValid() \n {\n return true;\n }",
"function validarDatosRegistro() {\r\n // Recuperar datos Enviados desde formulario_nuevo_equipo.php\r\n $datos = Array();\r\n $datos[0] = (isset($_REQUEST['titulo']))?\r\n $_REQUEST['titulo']:\"\";\r\n $datos[0] = limpiar($datos[0]);\r\n $datos[1] = (isset($_REQUEST['url']))?\r\n $_REQUEST['url']:\"\";\r\n\r\n //-----validar ---- //\r\n $errores = Array();\r\n $errores[0] = !validarTitulo($datos[0]);\r\n $errores[1] = !validarURL($datos[1]);\r\n\r\n // ----- Asignar a variables de Sesión ----//\r\n $_SESSION['datos'] = $datos;\r\n $_SESSION['errores'] = $errores; \r\n $_SESSION['hayErrores'] = \r\n ($errores[0] || $errores[1]);\r\n \r\n}",
"public function Validar_Acceso ($controlador =\"\", $modelo = \"\") {\r\n\t\tif($controlador == \"login\")\r\n\t\t\treturn true;\r\n\t\treturn isset($_SESSION['__token']);\r\n\t}",
"private function validateData()\n {\n if (empty($this->nome)) {\n $this->errors->addMessage(\"O nome é obrigatório\");\n }\n\n if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $this->errors->addMessage(\"O e-mail é inválido\");\n }\n\n if (strlen($this->senha) < 6) {\n $this->errors->addMessage(\"A senha deve ter no minímo 6 caracteres!\");\n }\n if ($this->emailExiste($this->email, 'email')) {\n $this->errors->addMessage(\"Esse e-mail já está cadastrado\");\n }\n if ($this->emailExiste($this->usuario, 'usuario')) {\n $this->errors->addMessage(\"Esse usuário já está cadastrado\");\n }\n\n return $this->errors->hasError();\n }",
"public function registerData(){\n\n // Declaro el array 'valid', para almacenar los campos validados: \n $valid = [];\n\n //Se asigna la sesion 'registrar' en la varaible:\n $data = $_SESSION['registrar'];\n\n //Se instancia la clase 'Validate', para validar los datos de las propiedades:\n $validate = new Validate;\n\n //Se validan que los campos no estén vacios\n if (!empty($data)) {\n \n if ($validate->validateString($data->cedula)) {\n \n //Agregamos el campo validado :D\n $valid['cedula'] = true;\n\n }else{\n\n //Retornamos el error :/ ):\n die('{ \"registrar\":false, \"error\":\"Campo cedula erroneo\" }');\n\n }\n\n }\n\n //Se validan que los campos no estén vacios\n if (!empty($data->password) && !empty($data->confirm_password)) {\n\n //Se valida que el campo sea un String:\n if ($validate->validatePassword($data->confirm_password, $data->password)) {\n\n //Agregamos el campo validado :D\n $valid['password'] = true;\n\n }else{\n\n //Retornamos el error :/ :\n die('{ \"registrar\":false, \"error\":\"El campo password debe ser un numero\" }');\n }\n }else{\n\n //Retornamos el error :/ ):\n die('{\"registrar\":false, \"error\":\"El campo password no debe estar vacio\"}');\n }\n\n //Retornamos la respuesta: \n return ['registrar' => true, 'campos' => $valid];\n\n }",
"function evt__validar_datos()\r\n\t{}",
"public function verificar_sessao() {\n if ($this->session->userdata('logado') == false)\n redirect('dashboard/login');\n }",
"public function fill_fields() {\n if (!parent::fill_fields()) {\n return false;\n }\n $stmt = $this->pdo->prepare('select valid from user where id = :id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n if (count($res) != 1) {\n return false;\n }\n $this->valid = $res[0][0];\n return true;\n }",
"public function verifySession()\n\t{\n\t\t$userData = array(\n\t\t\t'email' \t=> $this->input->post('email'),\n\t\t\t'password' \t=> sha1($this->input->post('password'))\n \t\t);\n\n\t\treturn $this->assistant_model->verifySession($userData);\n\t}",
"private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }",
"function validate() {\n\t\t$this->_validationErrors = array();\n\t\tif (null === $this->getsession_id()) {\n\t\t\t$this->_validationErrors[] = 'session_id must not be null';\n\t\t}\n\t\tif (null === $this->getclassroom_id()) {\n\t\t\t$this->_validationErrors[] = 'classroom_id must not be null';\n\t\t}\n\t\tif (null === $this->getname()) {\n\t\t\t$this->_validationErrors[] = 'name must not be null';\n\t\t}\n\t\treturn 0 === count($this->_validationErrors);\n\t}",
"public function check(){ \r\n $username = $this->validate($_POST['username']);\r\n $password = md5($this->validate($_POST['password']));\r\n \r\n $query = $this->admin->selectWhere(array('username'=>$username, 'password'=>$password));\r\n \r\n $data = $this->admin->getResult($query);\r\n $jml = $this->admin->getRows($query);\r\n \r\n if($jml>0){\r\n $data = $data[0];\r\n $_SESSION['username'] = $data['username'];\r\n $_SESSION['password'] = $data['password'];\r\n \r\n $this->redirect('admin');\r\n }else{\r\n $view = $this->view('admin/login');\r\n $view->bind('msg', 'Username atau Password salah!');\r\n }\r\n \r\n }",
"function _validate( $restart = false )\n\t{\n\t\t// allow to restsart a session\n\t\tif( $restart ) {\n\t\t\t$this->_state\t=\t'active';\n\t\t}\n\n\t\t// check if session has expired\n\t\tif( $this->_expire )\n\t\t{\n\t\t\t$curTime =\t$this->get( 'session.timer.now' , 0 );\n\t\t\t$maxTime =\t$this->get( 'session.timer.last', 0 ) + (60 * $this->_expire);\n\n\t\t\t// empty session variables\n\t\t\tif( $maxTime < $curTime ) {\n\t\t\t\t$this->_state\t=\t'expired';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"protected function isSessionValid() {\n if(empty($this->metadata)) {\n throw new \\RuntimeException(\n \"Session metadata key is missing from SESSION superglobal.\"\n );\n }\n return (\n $this->isValidFingerprint() === true &&\n (\n $this->metadata->isActive === true ||\n $this->isForwardedSession()\n )\n );\n }",
"public function validar(){\n\t\t// Crea instancia de libreria Validacion\n\t\trequire_once RUTA_APP .'/librerias/Validacion_login.php';\n\t\t$validacion = new Validacion_login;\n\n\t\t// Regresa TRUE o arreglo con errores\n\t\t$estado_login = $validacion->validar_login();\n\n\t\t// Caso login exitoso\n\t\tif($estado_login === TRUE){\n\t\t\techo \"true\";\n\t\t}\n\n\t\t// Caso login fallido\n\t\telse{\n\t\t\techo (json_encode($estado_login));\n\t\t}\n\t}",
"function validar_datos() {\n\t\t\tglobal $nombre, $mail, $apellido, $psw, $psw1, $telefono, $desc;\n\n\t\t\t$errores = 0;\n $msj = \"\"; \n\t\t\n\t\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t\t{\t\t\t\t\n\t\t\t\t if ($nombre == null || trim($nombre)==\"\")\n\t\t\t\t {\n\t\t\t\t\t$msj .= \"Debe ingresar un nombre\" . '\\n';\n\t\t\t\t\t$errores++;\n\t\t\t\t }\n\t\t\t\t if ($errores == 0)\n \t\treturn true;\n \t\t else\n\t\t\t\t\techo \"<script language='javascript'>alert('$msj');window.location.href='abm_marcas.php'</script>\";\n\t\t\t\t\texit; \t\t\n\t\t\t}\t\t\n\t\t}",
"function checkLogin() {\n /* Check if user has been remembered */\n if (isset($_COOKIE['cook_VenusetP_UserEmail']) && isset($_COOKIE['cook_Venueset_UserPassword'])) {\n $varUserEmail = $_COOKIE['cook_VenusetP_UserEmail'];\n $varUserPassword = $_COOKIE['cook_Venueset_UserPassword'];\n /* Confirm that username and password are valid */\n $arrUserFlds = array('pkUserID', 'UserEmail', 'UserPassword', 'UserFirstName');\n $varUserWhere = ' 1 AND UserEmail = \\'' . $varUserEmail . '\\' AND UserPassword = \\'' . md5(trim($varUserPassword)) . '\\'';\n //echo '<pre>';print_r($varUserWhere);exit;\n $arrUserList = $this->select(TABLE_USERS, $arrUserFlds, $varUserWhere);\n if (count($arrUserList) > 0) {\n /* $_SESSION['VenusetP_UserEmail'] = $arrUserList[0]['UserEmail'];\n $_SESSION['VenusetP_UserID'] = $arrUserList[0]['pkUserID'];\n $_SESSION['VenusetP_UserName'] = $arrUserList[0]['UserFirstName']; */\n }\n return true;\n } else {\n return false;\n }\n }",
"function validate_login() {\n\t\t$id= $this->input->post('id');\n\t\t$dname= $this->input->post('dname');\n if (!empty($id) && !empty($dname)) {\n\t\t //$this->session->sess_destroy();\n\t\t $this->session->set_userdata('receptionist_login', '0');\n $this->session->set_userdata('doctor_login', '1');\n $this->session->set_userdata('login_user_id', $id);\n $this->session->set_userdata('name', $dname);\n $this->session->set_userdata('login_type', 'doctor');\n echo 1;\n }\n\t\telse{\n\t\t\techo 0;\n\t\t}\n \n }",
"static public function sessionIsValid()\n {\n try {\n $ret = false;\n\n session_start();\n\n // TODO: Make sure this is correct\n if (isset($_SESSION) && $_SESSION['sessionkey']) {\n $ret = true;\n\n // Update last activity time stamp\n $_SESSION['LAST_ACTIVITY'] = time();\n } else {\n session_unset();\n session_destroy();\n }\n\n return $ret;\n } catch (Exception $e) {\n return false;\n }\n }",
"public function valid()\n {\n\n if ($this->container['username'] === null) {\n return false;\n }\n return true;\n }",
"public function isDataValid() {\n if ($this->userExists())\n $this->_errors[] = 'username already taken';\n // username and password must match pattern\n else if (empty($this->_username) || !preg_match('/^[a-zA-Z0-9]{5,16}$/', $this->_username))\n $this->_errors[] = 'invalid username must be between 5 and 16 characters';\n else if (empty($this->_password) || !preg_match('/^[a-zA-Z0-9]{6,18}$/', $this->_password))\n $this->_errors[] = 'invalid password must be between 6 and 18 characters';\n\t\t else if (empty($this->_password) || $this->_password != $this->_password_confirm)\n $this->_errors[] = \"Password didn't match X\";\n // names must be between 2 and 22 characters\n else if (empty($this->_first_name) || !preg_match('/^[a-zA-Z0-9]{2,22}$/', $this->_first_name))\n $this->_errors[] = 'invalid first name must be between 2 and 22 characters';\n else if (empty($this->_last_name) || !preg_match('/^[a-zA-Z0-9]{2,22}$/', $this->_last_name))\n $this->_errors[] = 'invalid last name must be between 2 and 22 characters';\n //restricts day to 01-31, month to 01-12 and year to 1900-2099 (also allowing / - or . between the parts of the date) \n else if (empty($this->_dob) || !preg_match('/^(0?[1-9]|[12][0-9]|3[01])[\\/\\ ](0?[1-9]|1[0-2])[\\/\\ ](19|20)\\d{2}$/', $this->_dob))\n $this->_errors[] = 'invalid dod | must be DD/MM/YYYY format';\n else if (empty($this->_address))\n $this->_errors[] = 'invalid address';\n // checks if valid postal code\n else if (empty($this->_postcode) || !preg_match('/^(([A-PR-UW-Z]{1}[A-IK-Y]?)([0-9]?[A-HJKS-UW]?[ABEHMNPRVWXY]?|[0-9]?[0-9]?))\\s?([0-9]{1}[ABD-HJLNP-UW-Z]{2})$/', $this->_postcode))\n $this->_errors[] = 'invalid postcode | must be AA11 9AA format';\n // checks is valid email using regular expression\n else if (empty($this->_email) || !preg_match('/^[_\\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\\.)+[a-zA-Z]{2,6}$/', $this->_email))\n $this->_errors[] = 'invalid email';\n\n\n // return true or false \n return count($this->_errors) ? 0 : 1;\n }",
"public function isDataValid(): bool;",
"public function validasi()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->username,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"public function validateLogin() {\n $email = valOr($_REQUEST,'email','');\n $password = valOr($_REQUEST,'pwd','');\n\n $stmt = $this->hcatServer->dbh->prepare(\"select * from hcat.user where email=:email\");\n $stmt->bindValue(':email', $email, PDO::PARAM_STR);\n $stmt->execute();\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n $_SESSION['email']='';\n $_SESSION['uid']=0;\n\n $message = '';\n if (sizeof($rows)==1) {\n $hash = $rows[0]['pwdhash'];\n if ( password_verify ( $password , $hash )) {\n $_SESSION['email']=$email;\n $_SESSION['uid']=$rows[0]['uid'];\n $this->hcatServer->setLogin();\n\n } else {\n $message = 'Bad password';\n }\n\n } else {\n $message = 'Bad email';\n }\n\n\n $_SESSION['message']=$message;\n return ($_SESSION['email']!='');\n }",
"private function checkSession()\n\t\t{\n\t\t\tif(!empty($_SESSION['auth_username']) && !empty($_SESSION['auth_password']))\n\t\t\t\treturn $this->check($_SESSION['auth_username'], $_SESSION['auth_password']);\n\t\t}",
"function SESSION_Validate($id){\n require(\"../body/config.php\");\n $sql = \"select count(*) as n from sessiones \n where id='\".$id.\"'\n and cierre_fecha = '0000-00-00'\" ;\n echo $sql; \n $r= $conexion -> query($sql); \n if($f = $r -> fetch_array()){\n \n\t\t\tif ($f['n']==0)\t{\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\treturn TRUE; //<-- Sesion abierta\n\t\t\t}\n\t\t\n }else{\n return FALSE;\n }\n \n\n}",
"function validate()\n\t{\n\t\t$isValid = false;\n\t\t\n\t\tif(empty($this->data['username']))\n\t\t{\n\t\t\t\t$this->errors['username'] = \"Please enter a Username\";\n\t\t}\n\t\t\n\t\tif(empty($this->data['password']))\n\t\t{\n\t\t\t\t$this->errors['password'] = \"Please enter a password\";\n\t\t}\n\t\t\n\t\tif(empty($this->data['description']))\n\t\t{\n\t\t\t\t$this->errors['description'] = \"Please enter a description of yourself\";\n\t\t}\n\t\t\n\t\t\n\t\t//validate data elements in userData property\n\t\t//if an error exists, store to errors using column name as key\n\t\t\n\t\t if(empty($this->errors))\n\t\t{\n\t\t\t$isValid = true;\n\t\t}\n\t\t\n\t\treturn $isValid;\n\t}",
"function verificar_login()\n {\n if (!isset($_SESSION['usuario'])) {\n $this->sign_out();\n }\n }",
"public function session_has_errors()\n {\n\n // Check if the errors cookie is set\n if (isset($_SESSION['errors']) && !empty($_SESSION['errors'])) {\n return true;\n } else {\n return false;\n }\n\n }",
"public function verify()\n {\n $userName = $_POST['usuario'];\n $password = $_POST['password'];\n if(!empty($userName) && !empty($password)){\n $user = $this->model->getUser($userName);\n if((!empty($user)) && password_verify($password, $user[0]['password'])) {\n session_start();\n $_SESSION['usuario'] = $user[0]['nombre'];\n $_SESSION['LAST_ACTIVITY'] = time();\n $_SESSION['superAdmin']=$user[0]['superAdmin'];\n header('Location: '.HOME);\n die();\n // $this->controllerProduct->comparativa();\n }\n else{\n echo(\"User pass error\");\n }\n }\n }",
"function check() {\n\t\tif (isset($_SESSION['id_user']) and isset($_SESSION['login_user'])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//~ Verify the existence of cookies\n\t\t\tif (isset($_COOKIE['id_user']) and isset($_COOKIE['code_user'])) {\n\t\t\t\t//~ cookies exist. Verified with a table sessions.\n\t\t\t\t$id_user=mysql::screening($_COOKIE['id_user']);\n\t\t\t\t$code_user=mysql::screening($_COOKIE['code_user']);\n\t\t\t\t$query=mysql::query(\"SELECT `session`.*, `users`.`login_user` FROM `session` INNER JOIN `users` ON `users`.`id_user`=`session`.`id_user` WHERE `session`.`id_user`=\".$id_user.\";\");\n\t\t\t\tif ($query and mysql_num_rows($query)!=0) {\n\t\t\t\t\t//~ Cookies are found in the database\n\t\t\t\t\t$user_agent=mysql::screening($_SERVER['HTTP_USER_AGENT']);\n\t\t\t\t\twhile ($row=mysql_fetch_assoc($query)) {\n\t\t\t\t\t\tif ($row['code_sess']==$code_user and $row['user_agent_sess']==$user_agent) {\n\t\t\t\t\t\t\t//~ found record\n\t\t\t\t\t\t\tmysql::query(\"UPDATE `session` SET `used_sess` = `used_sess`+1 WHERE `id_sess` = \".$row['id_sess'].\";\");\n\t\t\t\t\t\t\t//~ start session and update cookie\n\t\t\t\t\t\t\t$_SESSION['id_user']=$row['id_user'];\n\t\t\t\t\t\t\t$_SESSION['login_user']=$row['login_user'];\n\t\t\t\t\t\t\tsetcookie(\"id_user\", $row['id_user'], time()+3600*24*30);\n\t\t\t\t\t\t\tsetcookie(\"code_user\", $row['code_sess'], time()+3600*24*30);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//~ No records with this pair of matching cookies/user agent\n\t\t\t\t\t$this->destroy_cookie();\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t//~ No records for this user\n\t\t\t\t\t$this->destroy_cookie();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//~ cookies nit exist\n\t\t\t\t$this->destroy_cookie();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"function check_login($dbProvider, $_login, $_motdepasse) {\n $sql = mysqli_query($dbProvider, \"SELECT * FROM utilisateursformulaires WHERE login='$_login'\");\n $infos = mysqli_fetch_array($sql);\n mysqli_close($dbProvider);\n $motdepasse_utilisateur = $infos['motdepasse'];\n $email = $infos['email'];\n $nom = $infos['nom'];\n $prenom = $infos['prenom'];\n $usertype = $infos['usertype'];\n $md5motdepasse = md5($_motdepasse);\n\n if ($md5motdepasse == $motdepasse_utilisateur) {\n session_start(); // on démarre une session\n $_SESSION[\"login_utilisateurformulaires\"] = $_login;\n $_SESSION[\"email_utilisateurformulaires\"] = $email;\n $_SESSION[\"nom_utilisateurformulaires\"] = $nom;\n $_SESSION[\"prenom_utilisateurformulaires\"] = $prenom;\n $_SESSION[\"usertype_utilisateurformulaires\"] = $usertype;\n\n return(true);\n } else {\n return(false);\n }\n}",
"public function generateSession()\n\t{\n\t\t$name = $_POST['name'];\n\t\t$password = $_POST['password'];\n\t\t//validación de Usuario con un name y password ya definido\n\t\t$this->validaUsuario($name,$password);\n\n\t\t//validacion de un Usuario a Nivel Base de Datos cargar la base de datos y en la clase de la conexion poner los datos de la base de datos\n\t\t//$this->validaUsuarioDB($name,$password);\n\n\n\t}",
"public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }",
"public function ctrIngresoUsuario(){\n\t\tif(isset($_POST[\"ingUsuario\"])){\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/',$_POST[\"ingUsuario\"]) && \n\t\t\t\tpreg_match('/^[a-zA-Z0-9]+$/',$_POST[\"ingPassword\"])){\n\n\t\t\t\t$tabla=\"usuarios\";\n\t\t\t$item=\"usuario\";\n\t\t\t$valor=$_POST[\"ingUsuario\"];\n\t\t\t$respuesta=ModeloUsuarios::MdlMostrarUsuarios($tabla,$item,$valor);\t\n\t\t\t //var_dump($respuesta[\"usuario\"]);\n\t\t\tif($respuesta[\"usuario\"]==$_POST[\"ingUsuario\"] && $respuesta[\"password\"]==$_POST[\"ingPassword\"]){\n\t\t\t\t$_SESSION[\"iniciarSesion\"]=\"ok\";\n\t\t\t\techo '<script>\n\t\t\t\twindow.location=\"inicio\";\n\t\t\t\t</script>';\n\t\t\t}else{\n\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelva a intentarlo</div>';\n\t\t\t}\n\t\t}\n\t}\n }",
"function checkSession()\r\n {\r\n if (!$this->Session->check('User'))\r\n {\r\n \t// Force the user to login\r\n $this->redirect('/user/login');\r\n exit();\r\n }\r\n }",
"function sessionExists() {\n\t\tif ((isset($_SESSION['valid_user'])) && (($_SESSION['valid_user']) != null)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function checkSessionLab() {\n if (!isset($_SESSION['labuser_id'])) {\n header(\"Location:\" . DEFAULT_URL . \"/home?msg=Please login First\");\n } else {\n $obj_labuser = new labuserModel();\n //$_SESSION = $objUser->cleanArray($_SESSION);\n $getlabUser = $obj_labuser->selectByPk($_SESSION['labuser_id']);\n if (count($getlabUser) == 0) {\n @session_start();\n unset($_SESSION['LoggedIn']);\n unset($_SESSION['name']);\n unset($_SESSION['labuser_id']);\n unset($_SESSION['welcome']);\n unset($_SESSION['email_id']);\n unset($_SESSION['password']);\n header(\"Location:\" . DEFAULT_URL . \"/home?msg=Please login First\");\n }\n }\n }",
"public function validateData(){\n if(substr($this->user_id,0,5)!=$this->office_id){\n return false;\n }\n if(in_array($this->email,$this->getEmails())){\n return false;\n }\n return true; \n }",
"function read() {\r\n // Creamos la consulta con los valores que tenemos actualmente\r\n /**\r\n * La consulta SQL es esta\r\n * INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...);\r\n */\r\n $query = \"INSERT INTO\" . $this->table_name . \"(idSession, idUser, token, expirateDate) VALUES (\".$this->idSession.\",\".$this->idUser.\",\".$this->token.\",\".$this->expireDate.\");\";\r\n echo \"LOG > Class Session > Method Create > esta es la consulta que estoy enviando al SQL --> \".$query;\r\n // declarar la query\r\n $stmt = $this->conn->prepare($query);\r\n\r\n // ejecutar consulta\r\n if ($stmt->execute()) {\r\n echo \"LOG > Class Session > Method execute > Consulta correcta\";\r\n return true;\r\n }else {\r\n echo \"LOG > Class Session > Method execute > Consulta correcta\";\r\n return false; \r\n }\r\n }",
"function validaSession(){\n\tif(!isset($_COOKIE['id'])){\n\t\t//@header(\"location:login\");\n\t\treturn false;\n\t}else{\n\t\t\n\t\treturn true;\n\t}\n}",
"public static function verifyLogin():bool\n\t{\n\n\t\tif (\n\t\t\t!isset($_SESSION[User::SESSION])\n\t\t\t||\n\t\t\t!$_SESSION[User::SESSION]\n\t\t\t||\n\t\t\t!(int)$_SESSION[User::SESSION]['iduser'] > 0\n\t\t)\n\t\t{\n\t\t\n\t\t\treturn false;\n\t\t\n\t\t} else {\n\n\t\t\treturn true;\n\n\t\t} \n\n\t}",
"public function isValid()\n {\n // Initialize\n $bReturn = false;\n\n // Session should be started\n if (($this->_pStorage->status() == PHP_SESSION_ACTIVE )) {\n // Get stored UID\n $uidSaved = $this->_pStorage->getOffset(self::UID, APPLICATION_NAME);\n\n // Compare with the client uid\n $bReturn = ( $this->_iCRC == $uidSaved );\n } else {\n throw new \\Foundation\\Exception\\BadMethodCallException('The session was not successfully started.');\n }//if(...\n\n return $bReturn;\n }",
"public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }",
"public function validateData(){\n return true;\n }",
"public function verifysession(){\n if(isset($_SESSION['email'],$_SESSION['datekey'],$_SESSION['privkey'])){\n if($_SESSION['datekey'] == md5(date(\"Y-M-D\"))){\n $email = $this->clean($_SESSION['email']);\n $sql = mysqli_query($this->db, \"SELECT privkey FROM members WHERE email='$email' LIMIT 1\");\n $count = mysqli_num_rows($sql);\n if($count == 1){\n $row = mysqli_fetch_assoc($sql);\n $privkey = $row[\"privkey\"];\n if($privkey == $_SESSION['privkey']){\n return true;\n }else{\n return false;\n }\n }else{\n return false;\n }\n }else{\n return false;\n }\n }else{\n return false;\n }\n }",
"function validateLogin($data) {\r\n\t\t$sessionAdmin = $this->query('SELECT * FROM \r\n\t\t\t\t\t\t\t admins WHERE username=\"'. $data['username'] . '\" AND password=md5(\"'. $data['password'] .'\");' );\r\n\t\tif(empty($sessionAdmin) == false) //If the $sessionAdmin array isn't empty return the results\r\n\t\t return $sessionAdmin;\r\n\t\treturn false;\r\n\t}"
] | [
"0.6899414",
"0.68961394",
"0.68505645",
"0.6806266",
"0.67897844",
"0.67871016",
"0.67592096",
"0.671046",
"0.6702791",
"0.66686136",
"0.66679984",
"0.6645442",
"0.66319704",
"0.660578",
"0.65980417",
"0.6551364",
"0.6520535",
"0.64912266",
"0.643308",
"0.64293957",
"0.6424265",
"0.642312",
"0.6421056",
"0.64050454",
"0.63703996",
"0.63703996",
"0.6349792",
"0.6349428",
"0.6340631",
"0.6326326",
"0.6315288",
"0.6274735",
"0.62470335",
"0.6242138",
"0.62327343",
"0.62286747",
"0.6214872",
"0.62033683",
"0.619822",
"0.6185795",
"0.61737937",
"0.6163254",
"0.61620665",
"0.6157647",
"0.61524117",
"0.61472017",
"0.6144486",
"0.6109664",
"0.6108684",
"0.6102702",
"0.60981363",
"0.60792375",
"0.6078779",
"0.606853",
"0.6064581",
"0.60526025",
"0.60416913",
"0.6039408",
"0.6038979",
"0.60296357",
"0.6027219",
"0.6026088",
"0.60255235",
"0.60210013",
"0.60202885",
"0.5998624",
"0.59969616",
"0.59892225",
"0.5978578",
"0.5963426",
"0.59595555",
"0.5952325",
"0.5944393",
"0.5937508",
"0.5937164",
"0.5933913",
"0.5911241",
"0.5906309",
"0.59024435",
"0.5899314",
"0.5898121",
"0.5897092",
"0.58917475",
"0.588858",
"0.58881134",
"0.58863735",
"0.58846855",
"0.5881102",
"0.5856805",
"0.58553475",
"0.58412",
"0.5840758",
"0.5838689",
"0.58336836",
"0.58281755",
"0.5823765",
"0.58228564",
"0.58205897",
"0.5819648",
"0.58176666",
"0.5807189"
] | 0.0 | -1 |
Obtiene los perfiles asociados a un usuario de base de datos | private function obtenerPerfiles ($idUser = "") {
if ($idUser != "") {
$this->id_usuario = $idUser;
}
if (count($this->perfiles) < 1) {
$query = $this->stringConsulta() . " where a.id_usuario=$this->id_usuario";
$data = $this->bd->ejecutarQuery($query);
if ($data instanceof \Countable and count($data) > 1) {
throw new Exception("No se han obtenido los perfiles del usuario", 1);
}
while ($perfil = $this->bd->obtenerArrayAsociativo($data)) {
$this->perfiles[$perfil['clave_perfil']] = $perfil['clave_perfil'];
}
}
else {
$this->perfiles[] = 'UsuarioPublico';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getPerfiles($idUser){\n\t\t/*\n\t\tDeben obtenerse de control_perfil_usuario los id de perfiles a los que pertenece el \n\t\tusuario para poder desplegarlos en el formulario de edición de datos\n\t\t*/\n\t\t$array=array();\n\t\t$oPerfilUsuario=new Perfil_usuario($this->oDBM);\n\t\t$arrayPerfilUsuario=$oPerfilUsuario->getPerfilesUsuario($idUser);\n\t\t\n\t\tforeach ($arrayPerfilUsuario as $item){\n\t\t\t$array[]=$item['id_perfil'];\n\t\t}\n\t\treturn $array;\n\t\t\n\t}",
"public function GetAllPerfiles()\n {\n \t$perfiles = Perfil::all();\n \treturn $perfiles;\n }",
"function asociarPerfiles ($perfiles) {\n\n $insert = \"insert into s_usuarios_perfiles (id_usuario_perfil, id_usuario, id_perfil) values \";\n $i = 0;\n foreach ($perfiles as $key => $idPerfil) {\n\n if ($i > 0)\n $insert .= \",\";\n\n $insert .= \"(null,$this->id_usuario,$idPerfil)\";\n $i++;\n }\n\n $delete = \"delete from s_usuarios_perfiles where id_usuario=$this->id_usuario;\";\n\n $this->bd->ejecutarQuery($delete . $insert, 2);\n\n return ['ejecutado' => 1];\n }",
"public function getPerfiles()\n {\n $dql = \"SELECT p.id, p.perPerfil, p.perEstado\n FROM sgiiBundle:TblPerfil p\n WHERE p.perEstado = 1\";\n $query = $this->em->createQuery($dql);\n return $query->getResult();\n }",
"public function getPerfilesArray()\n {\n $perfiles = $this->getPerfiles();\n $ArrayPer = Array();\n if ($perfiles) {\n foreach ($perfiles as $per){\n $ArrayPer[$per['id']] = $per['perPerfil'];\n }\n }\n return $ArrayPer;\n }",
"private function getAllProfils() {\n\t\tif (isset($this->profils)) {\n\t\t\treturn $this->profils;\n\t\t}\n\t\t$this->profils = array();\n\t\t$query = \"SELECT p.*, date_format(u.last_login, '%Y-%m-%d') as last_login\n\t\t\tFROM \".DB_PREFIX.\"profil p, \".DB_PREFIX.\"user u\n\t\t\tWHERE u.braldahim_id = p.idBraldun\n\t\t\tORDER BY idBraldun ASC;\";\n\t\t$res = mysql_query($query, $this->db);\n\t\twhile ($row = mysql_fetch_assoc($res)) {\n\t\t\t$this->profils[] = $row;\n\t\t}\n\t\tmysql_free_result($res);\n\t}",
"public function lCargartablaPerfiles() {\n $oDLaboratorio = new DLaboratorio();\n $rs = $oDLaboratorio->dCargartablaPerfiles();\n foreach ($rs as $key => $value) {\n array_push($rs[$key], \"../../../../fastmedical_front/imagen/icono/smile9.gif ^ Seleccionar\");\n }\n return $rs;\n }",
"private function iniciar_perfil(){\n\t\t// if(!isset($_SESSION['id_user'])){\n\t\t// \theader('location : index.php');\n\t\t// }\n\n\t\trequire_once 'inc/clases/procesos/fechas.class.php';\n\t\trequire_once 'inc/clases/perfil/usuarios.class.php';\t\t\t//clase usuarios\n\t\t$this->Modulos = new Modulos();\t\n\t\t$this->Usuario = new Usuarios();\t\t\t\n\t}",
"public function get_rol_usuario(){\n\t\t$rol_user=$_SESSION[\"sesion_perfil\"];\n\t\t$sql=mysqli_query(Conecta::conx(),\"SELECT PERFIL FROM perfiles WHERE ID_PERFIL='$rol_user'\") or die('Error en la consulta del perfil de usuario:' . $sql . mysqli_errno(Conecta::conx()));\n\t\tif($reg=mysqli_fetch_assoc($sql)){\n\t\t\t$this->perfil[]=$reg;\n\t\t}\n\t\treturn $this->perfil;\n\t\t\n\t}",
"function perfiles($acceso){\n\t$acceso->objeto->ejecutarSql(sql(\"modulo ORDER BY nombremodulo\"));\t\n\treturn seguridadPerfil($acceso);\n}",
"public function list_owned_files() {\n $stmt = $this->pdo->prepare('select filename from file where user_id = :id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, $f['filename']);\n }\n return $result;\n }",
"private function iniciar_perfil_mda(){\n\t\trequire_once 'inc/clases/procesos/fechas.class.php';\n\t\trequire_once 'inc/clases/procesos/sql_anuncios.class.php';\n\t\trequire_once 'inc/clases/mda/show_master.class.php';\n\t\trequire_once 'inc/clases/mda/pedidos.class.php';\n\t\trequire_once 'inc/clases/config/perfil_config.class.php';\n\n\t\t$this->Modulos = new Modulos();\n\t}",
"public function Perfil(){\n $pvd = new alumno();\n\n //Se obtienen los datos del alumno.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Alumno/perfil-alumno.php';\n\t}",
"private function usrprfget() {\n $q = \"SELECT * FROM ass_usuario_has_mzt_perfiles WHERE mzt_usuario_usr_id = $this->id ORDER BY mzt_perfiles_prf_id ASC\";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $arrassigned = array();\n $arravailable = array();\n while ($obj = mysql_fetch_object($con)) {\n $arrassigned[] = array('id' => $obj->mzt_perfiles_prf_id);\n }\n //se consultan los perfiles disponibles\n $q = \"SELECT * FROM ass_perfiles ORDER BY prf_nombre ASC\";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n while ($obj = mysql_fetch_object($con)) {\n $arravailable[] = array(\n 'id' => ($obj->prf_id),\n 'nombre' => ($obj->prf_nombre),\n 'descripcion' => ($obj->prf_descripcion));\n }\n\n $arrjson = array('output' => array('valid' => true, 'available' => $arravailable, 'assigned' => $arrassigned));\n $this->response = ($arrjson);\n }",
"public function Perfil(){\n $pvd = new tutoria();\n\n //Se obtienen los datos del tutoria.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Tutoria/perfil-tutoria.php';\n\t}",
"public function getUserFiles()\n {\n $user_files = Helper::getUserFiles();\n return $user_files;\n }",
"public function configurar()\n {\n //\n $count = Perfiles::select()->get()->count();\n if ($count == 0) {\n $permisos = Funcionalidades::select()->get();\n Perfiles::create(['nombre' => 'Super Su','usuario'=>1]);\n foreach ($permisos as $value) {\n Permisos::create(['id_perfil' => 1, 'id_funcionalidad' => $value->id]);\n }\n User::create(['name' => 'Admin', 'email' => 'Admin', 'password' => 'Admin', 'id_perfil' => 1,'usuario'=>1]);\n }\n }",
"function getPermisos($idUser){\n\t\t$sql=\"\n\t\tSELECT DISTINCT\n\t\tcontrol_objeto.clave as 'objeto',\n\t\tcontrol_permiso.tipo as 'tipo'\n\t\tFROM\n\t\tcontrol_perfil_usuario\n\t\tINNER JOIN control_perfil_permiso ON control_perfil_usuario.id_perfil=control_perfil_permiso.id_perfil\n\t\tINNER JOIN control_permiso ON control_perfil_permiso.id_permiso=control_permiso.id_permiso\n\t\tINNER JOIN control_objeto ON control_permiso.id_objeto=control_objeto.id_objeto\n\t\tWHERE control_perfil_usuario.id_usuario=$idUser\";\n\t\treturn $this->toArray($sql);\n\t}",
"public function permisos()\n {\n\n $conectar = parent::conexion();\n\n $sql = \"select * from permisos;\";\n\n $sql = $conectar->prepare($sql);\n $sql->execute();\n return $resultado = $sql->fetchAll();\n }",
"public function getPerfils()\n {\n return $this->hasMany(Perfil::className(), ['modulo_cod_fk' => 'modulo_cod_pk']);\n }",
"function loadPerfil(){\n\t\t$r = $this->dper->getPerfilById($this->id);\n\t\tif($r != -1){\n\t\t\t$this->nombre = $r[\"nombre\"];\n\t\t}else{\n\t\t\t$this->nombre = \"\";\n\t\t}\n\t}",
"function opcion__compilar_perfiles()\n {\n $param = $this->get_parametros();\n $id = isset($param[\"-p\"]) ? $param[\"-p\"] : $this->get_id_proyecto_actual(true);\n\n try {\n $proyecto = $this->get_proyecto($id);\n $path = $proyecto->get_dir_generales_compilados();\n if (!\\file_exists($path) || !\\is_writable($path)) {\n $this->consola->error('ATENCION!!: Considere ejecutar el comando compilar para abarcar todos los metadatos'. PHP_EOL);\n throw new toba_error('No existe o no es accesible la carpeta de metadatos compilados!!'. PHP_EOL);\n }\n toba_manejador_archivos::crear_arbol_directorios($path);\n $proyecto->compilar_metadatos_generales_grupos_acceso(true);\n } catch ( toba_error $e ) {\n\t\t$this->consola->error( \"PROYECTO $id: Ha ocurrido un error durante la compilacion:\\n\".$e->getMessage());\n exit(-1);\n }\n }",
"public static function getAll_files() {\n $db = DBInit::getInstance();\n\n $statement = $db->prepare(\"SELECT id, file_name, uploaded, user FROM files\");\n $statement->execute();\n\n return $statement->fetchAll();\n }",
"public function perfil() {\n require_once 'views/usuarios/perfil.php';\n }",
"function getPerfiles () {\n\n $this->obtenerPerfiles();\n\n return $this->perfiles;\n }",
"function perfil (){\n \t $dato=$_SESSION['Usuarios'];\n\t\t $datos = Usuario::mostrar($dato);\n \t require \"app/Views/Perfil.php\";\n }",
"function loadPerfilOpciones(){\n\t\t$r = $this->dper->loadPerfilOpciones($this->id);\n\t\t$opc = null;\n\t\twhile($row = mysql_fetch_array($r)){\n\t\t\tif($row['per_id'] == $this->id) $indicador = 1; else $indicador = 0;\n\t\t\t$opc[count($opc)]=array('id'=>$row['opc_id'],\n\t\t\t\t\t \t'nombre'=>$row['opc_nombre'],\n\t\t\t\t\t\t'nivel'=>$row['opn_id'],\n \t\t\t\t\t\t'indicador'=>$indicador,\n \t\t\t\t\t\t'acceso'=>$row['pxo_nivel']);\n\t\t}\n\t\treturn $opc;\n\t}",
"function perfil($acceso){\n\t$cad=opcion('',\"Selecciones...\");\n\t$acceso->objeto->ejecutarSql(sql(\"perfil\"));\n\twhile ($row=row($acceso))\n\t{\n\t\t$cad=$cad.opcion(trim($row[\"codigoperfil\"]),trim($row[\"nombreperfil\"]));\t\t\n\t}\t\t\t\t\t\t\t\t\n\treturn $cad;\t\n}",
"function actualizarPerfilesUsuario($arrayPerfil,$idUsuario){\n\t\t/* Debe tomar los perfiles que se marcaron como pertenecientes en un formulario\n\t\ty actualizar en la tabla control_perfil_usuario\n\t\tLo ideal es eliminar primero todos los perfiles, y volver a escribirlos\n\t\t*/\n\t\t\n\t\t$oPerfilUsu=new Perfil_usuario($this->oDBM);\n\t\t$okDelete=$oPerfilUsu->deleteUsuario($idUsuario);\n\t\tforeach ($arrayPerfil as $item){\n\t\t\t$okInsert=$oPerfilUsu->insertUsuario($idUsuario,$item);\n\t\t}\n\t\treturn true;\n\t}",
"function cargar_informacion_reducida()\n\t{\n\t\t// Cabecera del proyecto\n\t\t$this->manejador_interface->mensaje('Cargando datos globales', false);\n\t\t$archivo = $this->get_dir_tablas() . '/apex_proyecto.sql';\n\t\t$this->db->ejecutar_archivo( $archivo );\n\t\t$this->manejador_interface->mensaje('.OK');\n\t\t// Grupos de acceso y permisos\n\t\t$this->cargar_perfiles();\n\t}",
"private function actualizarPermisos(){\n\t $stmt = Conexion::conectar()->prepare(\"select PERMISO from permiso_asigna where perfil = :id;\");\n\t $stmt->bindParam(\":id\", $this->id, PDO::PARAM_STR);\n\t \n\t if($stmt->execute()){\n\t $i = 0;\n\t $res = $stmt->fetchAll();\n\t \n\t foreach ($res as $valor => $obj)\n\t {\n\t $this->permisos[$i] = $obj[\"PERMISO\"];\n\t $i++;\n\t }\n\t \n\t } else {\n\t LogController::error(\"Perfil::actualizarPermisos() - \".$stmt->errorCode().\" - \". $stmt->errorInfo(),LOG_DB);\n\t $stmt = null;\n\t return false;\n\t }\n\t \t\n\t\n\t\t\n\t}",
"public function DatosUsuarios() {\n $users = Usuarios::join('Perfiles', 'Usuarios.IdPerfil', '=', 'Perfiles.ID')->get();\n $datos = array();\n foreach ($users->toArray() as $user) {\n $groupDes = Grupos::where('ID', '=', $user['IdGrupo']) ->select('Descripcion')->first();\n $user['Grupo'] = $groupDes->Descripcion;\n if (Session::get('idPeril') == 3) {\n $user['Perfil'] = \"{$user['Perfil']}<a href='#' title='Editar Perfil' class='editar' alt='{$user['IdUsuario']}'>\"\n . \"<span style='color:#FACC2E; padding-left:15px' class='glyphicon glyphicon-edit'></span>\"\n . \"</a>\";\n }\n $datos[] = $user;\n }\n\n return $datos = json_encode($datos);\n }",
"public function getAllFilesRobot() {\n $sql = \"SELECT * FROM archivo_organizado\";\n $result = $this->_db->prepare($sql);\n $result->execute();\n\n if(!is_null($result->errorInfo()[2]))\n return array('error' => $result->errorInfo()[2]);\n else\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function getGroupFilesFromDatabase() {\n $db = \\Helper::getDB();\n $db->where('g.groupId', $db->escape($this->getId()));\n $db->join('documents d', 'd.id = g.documentId', 'LEFT');\n $db->join('users u', 'u.id = d.ownerId', 'LEFT');\n $results = $db->get('group_documents g', NULL, 'd.*, u.*, d.id AS fileId, u.id AS userId');\n // Process all files and their owners\n foreach($results as $result) {\n $user = new \\Models\\User($result['userId'], $result['username'], $result['email'], $result['firstName'], $result['lastName'], $result['lastLogin']);\n $file = new \\Models\\File($result['fileId'], $result['type'], $result['title'], $user, $result['creationDate'], $result['modificationDate'], $result['file']);\n $this->addFile($file);\n }\n }",
"static public function mdlAltaPerfil($tabla, $datos){\r\n\r\n\t\t$sh = Conexion::conectar()->prepare(\"SELECT SEC_ADMINISTRADORES.NEXTVAL FROM DUAL\");\r\n\t\t$sh -> execute();\r\n\t\t$id = $sh -> fetchColumn(0);\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(IDADMINISTRADOR, NOMBRE, APELLIDO, DNI, TELEFONO, DOMICILIO, EMAIL, PASS, FECHANACIMIENTO, FOTO, PERFIL) VALUES ($id, :nombre, :apellido, :dni, :telefono, :domicilio, :email, :pass, :fechanacimiento, :foto, :perfil)\");\r\n\t\t$ff = date(\"d/m/Y\", strtotime($datos[\"fechanacimiento\"]));\r\n\r\n\t\t$stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":apellido\", $datos[\"apellido\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":dni\", $datos[\"dni\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":telefono\", $datos[\"telefono\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":domicilio\", $datos[\"domicilio\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":pass\", $datos[\"pass\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechanacimiento\", $ff);\r\n\t\t$stmt->bindParam(\":foto\", $datos[\"foto\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":perfil\", $datos[\"perfil\"], PDO::PARAM_STR);\r\n\r\n\t\t$valor = array(\r\n\t\t\t\t\t\t\"id\" => $id,\r\n\t\t\t\t\t\t\"ruta\" => $datos[\"foto\"]\r\n\t\t\t\t\t );\r\n\r\n\t\tif($stmt->execute()){\r\n\r\n\t\t\treturn $valor;\t\r\n\r\n\t\t}else{\r\n\r\n\t\t\treturn \"error\";\r\n\t\t\r\n\t\t}\r\n\r\n\t}",
"function getPerfil() {\n return $this->perfil;\n }",
"public function getFiles($uid) {\n\n\t\t$uid = $_SESSION['userid'];\n\t\t$this->pdo = config_db::getConnected();\n\n\t\t$statement = $this->pdo->prepare(\"SELECT * FROM files f\n INNER JOIN user_files uf ON (uf.fileid = f.id)\n INNER JOIN users u ON (uf.uid = u.id)\n WHERE uf.uid = :uid\");\n\t\t$result = $statement->execute(array('uid' => $uid));\n\t\t$rows = $statement->fetchAll(PDO::FETCH_ASSOC);\n \n\t\t$fileinfo = array();\n\t\tforeach($rows as $row) {\n\t $fileinfo[] = $row;\n }\n\n\t\treturn $fileinfo;\n\t}",
"function getAllUsers(){\n //Recuperation des Donnees du Fichier sous forme de Chaine\n $file_content=file_get_contents(FILE_NAME);\n //Convertion de la chaine en Tableau\n $arr_users=json_decode($file_content,true);\n return $arr_users;\n }",
"public function usuarios(){\n return $this->belongsToMany('App\\Usuarios','perfiles_usuarios','perfil_fk_pu', 'usuario_fk_pu');\n }",
"public function dataProfil()\n {\n $user = $this->session->userdata('IdPerusahaan');\n\n $this->db->select('*');\n $this->db->from('tb_user as tu');\n $this->db->join('tb_perusahaan as tp', 'tu.IdPerusahaan = tp.IdPerusahaan');\n $this->db->where('tu.IdPerusahaan', $user);\n\n $query = $this->db->get();\n return $query;\n }",
"public function getUploadsData()\n {\n $em = $this->getEntityManager();\n $query = $em->createQuery('SELECT ur.userName,u.id,u.fileName,u.uniqueId,u.uploadedDate\n FROM Vlreleases\\UserBundle\\Entity\\Uploads u\n JOIN Vlreleases\\UserBundle\\Entity\\User ur\n WHERE ur.id=u.userId\n ORDER BY u.id desc');\n $result = $query->getResult();\n return $result;\n }",
"public function list_shared_files_with() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.user_id = :id and s.owner_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }",
"public function usrget() {\n $q = \"SELECT * FROM ass_usuario WHERE usr_contacto='no' ORDER BY usr_nombre ASC\";\n if ($this->id > 0) {\n $q = \"SELECT * FROM ass_usuario WHERE usr_contacto='no' AND usr_id = \" . $this->id;\n }\n //if ($this->sdid > 0) {\n // $q = \"SELECT * FROM fir_usuario WHERE fir_sede_sde_id = \" . $this->sdid;\n //}\n //if ($this->euid > 0) {\n // $q = \"SELECT * FROM fir_usuario WHERE fir_empresa_emp_id = \" . $this->euid;\n //}\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $resultado = mysql_num_rows($con);\n $arr = array();\n while ($obj = mysql_fetch_object($con)) {\n $arr[] = array(\n 'id' => $obj->usr_id,\n 'idcli' => $obj->mzt_cliente_cli_id,\n 'idprov' => $obj->mzt_proveedor_pro_id,\n 'nombre' => ($obj->usr_nombre),\n 'apellido' => ($obj->usr_apellido),\n 'cargo' => ($obj->usr_cargo),\n 'email' => ($obj->usr_email),\n 'identificacion' => ($obj->usr_identificacion),\n 'celular' => ($obj->usr_celular),\n 'telefono' => ($obj->usr_telefono),\n 'habilitado' => ($obj->usr_habilitado),\n 'dtcreate' => ($obj->usr_dtcreate));\n }\n//PEDIR ARCHIVOS\n $qa = \"SELECT arc_nombre FROM ass_archivos WHERE mzt_usuario_usr_id= \" . $this->id;\n if ($qa != \"\") {\n $cona = mysql_query($qa, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $qa);\n $resultadoa = mysql_num_rows($cona);\n $arra = array();\n while ($obja = mysql_fetch_object($cona)) {\n $arra[] = array(\n 'ref_imagen' => ($obja->arc_nombre));\n }\n }\n if ($resultado > 0) {\n $arrjson = array('output' => array('valid' => true, 'response' => $arr, 'response2' => $arra));\n } else {\n $arrjson = $this->UTILITY->error_no_result();\n }\n $this->response = ($arrjson);\n }",
"function get_all_persona_perfil()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('persona_perfil')->result_array();\n }",
"public function list_shared_files() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.owner_id = :id and s.user_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }",
"public function listaPerfiles($cn) {\n $sql = \"select g.ID_GRUPO,g.DESCRIPCION,g.ID_DEPENDENCIA,d.DEPENDENCIA\n from db_general.dbo.grupo g\n inner join DB_GENERAL.jcardenas.H_DEPENDENCIA d on d.CODIGO_DEPENDENCIA = g.ID_DEPENDENCIA\n where ID_DEPENDENCIA=22 and ID_APLICACION=1\n ORDER BY DESCRIPCION\";\n $query = $cn->prepare($sql);\n $query->execute();\n $result_query = $query->fetchAll();\n\n return $result_query; \n }",
"function user_dir_list($user_dir){\r\n\t\t\t\tif($resource = @opendir(\"../cloud/\".$_SESSION['SESS_USER_ID'].\"/\".$user_dir)){\r\n\t\t\t\t\t$list=array();\r\n\t\t\t\t\twhile (($entry = readdir($resource)) !==FALSE) {\r\n\t\t\t\t\t\tif($entry != '.' && $entry != '..'){\r\n\t\t\t\t\t\t\t$list[]= \"\".$entry.\"\".\"%0A\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\treturn $list;\r\n\t\t\t}",
"function _getFotoPerfil($usuario) {\n $foto = null;\n if($usuario['foto_persona'] != null) {\n $foto = RUTA_SMILEDU.$usuario['foto_persona'];\n } else if($usuario['google_foto'] != null) {\n $foto = $usuario['google_foto'];\n } else if($usuario['foto_persona'] == null && $usuario['google_foto'] == null) {\n $foto = RUTA_SMILEDU.FOTO_DEFECTO;\n }\n return $foto;\n }",
"public function getPerfilList()\n {\n $option = '';\n $query = $this->db->query(\"SELECT * FROM perfil\");\n while ($rdata = mysqli_fetch_assoc($query)) {\n $option .= '<option value=\"' . $rdata['idPerfil'] . '\">' . mb_strtoupper(\n $rdata['nombre']\n ) . '</option>';\n }\n\n return $option;\n }",
"function Array_Get_Listado_Perfiles($perfil)\n{\n\tif($perfil!=3)\n\t{\n\t\t$perfiles = consultar(\"SELECT * FROM `tb_perfiles` WHERE id_perfiles!=3 ORDER BY nivel\");\n\t}\n\telse\n\t{\n\t\t$perfiles = consultar(\"SELECT * FROM `tb_perfiles` ORDER BY nivel\");\t\n\t}\n\n\t$datos = array();\n\twhile ($valor = mysqli_fetch_array($perfiles)) {\n\t\t$id_perfiles = $valor['id_perfiles'];\n\t\t$nombre = $valor['nombre'];\n\t\t$descripcion = $valor['descripcion'];\n\t\t$nivel = $valor['nivel'];\n\t\t$vector = array(\n\t\t\t'id_perfiles'=>\"$id_perfiles\",\n\t\t\t'nombre' => \"$nombre\",\n\t\t\t'descripcion' => \"$descripcion\",\n\t\t\t'nivel' => \"$nivel\"\n\t\t\t);\n\t\tarray_push($datos, $vector);\n\t}\n\n\treturn $datos;\t\n}",
"public function listProById()\n {\n\n // obtener el perfil por id\n $id = 3985390143818633;\n print_r($this->getProfile($id)); \n\n }",
"public static function TraerTodos(): array\n {\n $tablaUno = 'usuarios';\n $tablaDos = 'perfiles';\n\n $listaUsuarios = array();\n\n $objetoAccesoDatos = AccesoDatos::RetornarObjetoAcceso();\n\n $consulta = $objetoAccesoDatos->RetornarConsulta(\"SELECT $tablaUno.id, $tablaUno.nombre, $tablaUno.correo,\n $tablaUno.clave,$tablaDos.descripcion AS perfil,$tablaUno.id_perfil \n FROM $tablaUno \n INNER JOIN $tablaDos \n ON $tablaUno.id_perfil = $tablaDos.id\");\n\n $consulta->execute();\n\n while($fila = $consulta->fetch(PDO::FETCH_OBJ)){\n $empleado = new Usuario($fila->id,\n $fila->nombre,\n $fila->correo,\n $fila->clave,\n $fila->id_perfil,\n $fila->perfil);\n\n array_push($listaUsuarios,$empleado);\n }\n\n \n\n return $listaUsuarios;\n }",
"public function getPerfil()\n {\n return User::find(Auth::user()->id);\n }",
"public function getPermisos(){\n\t\t$sql = \"SELECT id_permiso, permiso FROM permisos WHERE id_permiso >1 ORDER BY id_permiso\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}",
"public function getPerfilId()\n\t{\n\t\treturn $this->perfil_id;\n\t}",
"function listarPerfilPrivilegios($url, $id = 0){\n\t\t$s = 'SELECT p.oid,p.nomb,prv.oid AS oidp,prv.id, prv.nomb AS bnom, COALESCE(upp.visi,0) AS visi\n\t\t\t\tFROM space.privilegio prv\n\t\t\t\tJOIN space.menu_accion ma ON prv.para=ma.url\n\t\t\t\tJOIN space.perfil_privilegio pp ON pp.oidpr=prv.oid\n\t\t\t\tJOIN space.perfil p ON p.oid=pp.oidp\n\t\t\t\tLEFT JOIN space.usuario_perfil up on p.oid=up.oidp\n\t\t\t\tLEFT JOIN space.usuario u ON u.id=up.oidu\n\t\t\t\tLEFT JOIN space.usuario_perfil_privilegio upp ON \n\t\t\t\tupp.oidu = u.id AND\n\t\t\t\tupp.oidp = p.oid AND\n\t\t\t\tupp.oidpr = prv.oid\n\t\t\t\tWHERE ma.url=\\'' . $url . '\\' AND u.id=' . $id;\n\n\t\t\n\t\t//echo $s;\n\t\t$obj = $this->DBSpace->consultar($s);\n\n\t\t$lst = array();\n\t\t$lstp = array();\n\t\tif($obj->cant == 0 ){\n\t\t\t$s = 'SELECT p.oid,p.nomb,prv.oid AS oidp,prv.id, prv.nomb AS bnom, prv.visi\n\t\t\t\tFROM space.privilegio prv\n\t\t\t\tJOIN space.menu_accion ma ON prv.para=ma.url\n\t\t\t\tJOIN space.perfil_privilegio pp ON pp.oidpr=prv.oid\n\t\t\t\tJOIN space.perfil p ON p.oid=pp.oidp\n\t\t\t\tWHERE ma.url=\\'' . $url . '\\'';\n\t\t\t$obj = $this->DBSpace->consultar($s);\n\t\t\tif($obj->cant == 0 )return $lst;\n\t\t}\n\t\t\n\t\t$perfil = $obj->rs[0]->nomb;\n\t\tforeach ($obj->rs as $clv => $v) {\n\t\t\tif($perfil != $v->nomb){\n\t\t\t\t$lst[$perfil] = $lstp;\n\t\t\t\t$perfil = $v->nomb;\n\t\t\t\t$lstp = null;\n\t\t\t}\n\t\t\t$lstp[] = array(\n\t\t\t\t'oidp' => $v->oid,\n\t\t\t\t'cod'=> $v->oidp,\n\t\t\t\t'nomb' => $v->bnom,\n\t\t\t\t'visi' => $v->visi\n\t\t\t);\n\t\t}\n\t\t$lst[$perfil] = $lstp;\n\t\t\n\t\treturn $lst;\n\t}",
"public function verperfil (){\n extract($_REQUEST);\n\n $db=new clasedb();//instanciando clasedb\n $conex=$db->conectar();//conectando con la base de datos\n\n \n \t$sql=\"SELECT avatar,nombre, correo, pregunta, respuesta FROM usuarios WHERE usuarios.id=\".$_SESSION['id_usuario'];;//query\n \n\t\t\t\n\n //ejecutando query\n if ($res=mysqli_query($conex,$sql)) {\n //echo \"entro\";\n $campos=mysqli_num_fields($res);//cuantos campos trae la consulta \n $filas=mysqli_num_rows($res);//cuantos registro trae la consulta\n $i=0;\n $datos[]=array();//inicializando array\n //extrayendo datos\n while($data=mysqli_fetch_array($res)){\n for ($j=0; $j <$campos ; $j++) { \n $datos[$i][$j]=$data[$j];\n }\n $i++;\n }\n \n header(\"Location: ../Vistas/config/perfil.php?filas=\".$filas.\"&campos=\".$campos.\"&data=\".serialize($datos));\n\n } else {\n echo \"Error en la BD....\";\n }\n \n}",
"function conf(){\n $this->s__perfil = toba::manejador_sesiones()->get_perfiles_funcionales();\n // print_r($this->s__perfil); \n \n $p = array_search('autoridad_mesa', $this->s__perfil);\n if($p !== false){//Es autoridad de mesa\n //Cargar datos del usuario especifico\n //obtengo el nombre de usuario logueado\n $usr = toba::manejador_sesiones()->get_id_usuario_instancia();\n \n $id_mesa = $this->dep('datos')->tabla('mesa')->get_de_usr($usr);\n if(sizeof($id_mesa)>0){\n $this->s__id_mesa = $id_mesa[0]['id_mesa'];\n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \n if($this->s__mesa['estado'] >= 2){//Ya fue validado por la secretaria\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else//No se encuentra mesa asociada al usuario logueado\n toba::notificacion()->agregar(\"No se encuentra el usuario ingresado\",\"info\");\n }\n else{\n $this->s__id_mesa = toba::memoria()->get_parametro('c');//el parametro c tiene el id mesa\n \n $this->s__retorno = toba::memoria()->get_parametro('k');//el parametro k tiene la dir de retorno\n $this->s__retorno_estado = toba::memoria()->get_parametro('f');\n \n \n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \t\n $p = array_search('junta_electoral', $this->s__perfil);\n if($p !== false){//Es junta electoral\n $this->controlador()->evento('procesar')->set_etiqueta('Confirmar');\n $this->controlador()->evento('enviar')->ocultar();\n\n if($this->s__mesa['estado'] > 3){//Ya fue validado por la secretaria\n// $this->dep('form_ml_directivo')->set_solo_lectura('votos');\n// $this->dep('form_ml_superior')->set_solo_lectura('votos');\n// $this->dep('form_ml_extra')->set_solo_lectura('votos');\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else{\n $p = array_search('secretaria', $this->s__perfil);//print_r(isset($p)?'no es false':'es false');\n if($p !== false){//Es secretaria\n $this->controlador()->evento('procesar')->set_etiqueta('Validar');\n $this->controlador()->evento('enviar')->ocultar();\n\n }\n \n }\n }\n \n if(isset($this->s__id_mesa)){//Si el pedido viene de la operacion Confirmar/Cargar// \n $this->s__claustro = $this->s__mesa['id_claustro'];\n $this->s__id_nro_ue = $this->dep('datos')->tabla('sede')->get_unidad($this->s__mesa['id_sede']);\n $this->s__id_sede = $this->s__mesa['id_sede'];\n }\n }",
"public function accionPerfilRestaurante(){\n // (si es que hay alguno logueado)\n $sw = false;\n $codRole = 0;\n \n if(Sistema::app()->Acceso()->hayUsuario()){\n $sw = true;\n \n $nick = Sistema::app()->Acceso()->getNick();\n $codRole = Sistema::app()->ACL()->getUsuarioRole($nick);\n \n }\n \n // Si el usuario que intenta acceder es un artista, administrador\n // o simplemente no hay usuario validado, lo mando a una página de\n // error. Los restaurantes tienen el rol 6\n if(!$sw || $codRole != 6){\n Sistema::app()->paginaError(403, \"No tiene permiso para acceder a esta página.\");\n exit();\n }\n \n // Una vez comprobado que está accediendo un restaurante, procedo a\n // obtener los datos del restaurante\n $res = new Restaurantes();\n \n // El nick del usuario es el correo electrónico. Es un valor\n // único, por lo que puedo buscar el restaurante por\n // su dirección de correo\n if(!$res->buscarPor([\"where\"=>\"correo='$nick'\"])){\n \n Sistema::app()->paginaError(300,\"Ha habido un problema al encontrar tu perfil.\");\n return;\n \n }\n \n $imagenAntigua = $res->imagen;\n $nombre=$res->getNombre();\n \n // Si se modifican los datos del restaurante, esta variable\n // pasará a true para notificar a la vista\n $resModificado = false;\n if (isset($_POST[$nombre]))\n {\n $hayImagen = true;\n // Si ha subido una nueva imagen, recojo su nombre\n if($_FILES[$nombre][\"name\"][\"imagen\"]!=\"\"){\n $_POST[$nombre][\"imagen\"] = $_FILES[$nombre][\"name\"][\"imagen\"];\n }\n else{\n $hayImagen = false;\n $_POST[\"nombre\"][\"imagen\"] = $res->imagen;\n }\n \n // El coreo es una clave foránea, así que tengo\n // que cambiar el correo en la tabla ACLUsuarios\n Sistema::app()->ACL()->setNick($nick, $_POST[\"nombre\"][\"correo\"]);\n \n $res->setValores($_POST[$nombre]);\n \n if ($res->validar())\n {\n // Si se ha guardado correctamente, actualizo la imagen de perfil\n // e inicio sesión con el nuevo correo automáticamente\n if ($res->guardar()){\n $resModificado = true;\n if($hayImagen){\n // Obtengo la carpeta destino de la imagen\n $carpetaDestino = $_SERVER['DOCUMENT_ROOT'].\"/imagenes/restaurantes/\";\n // Elimino la imagen antigua\n unlink($carpetaDestino.$imagenAntigua);\n \n // Y guardo la nueva\n move_uploaded_file($_FILES['nombre']['tmp_name']['imagen'], $carpetaDestino.$_POST[\"nombre\"][\"imagen\"]);\n }\n Sistema::app()->Acceso()->registrarUsuario(\n $_POST[\"nombre\"][\"correo\"],\n mb_strtolower($res->nombre),\n 0,\n 0,\n [0,0,0,0,0,1,1,1,1,1]);\n }\n \n }\n }\n \n $this->dibujaVista(\"perfilRestaurante\",\n [\"res\"=>$res, \"resModificado\"=>$resModificado],\n \"Perfil\");\n \n }",
"function index_usuarios() {\n\t\t$conditions = array('Administrativo.perfil >' => '0'); \n\t\t$order = array('Administrativo.nombre' => 'ASC');\n\t\t$administrativos=$this->Administrativo->find('all', array ('conditions' => $conditions, 'order' => $order));\t\t\n\t\t$perfil=$this->Perfil->find('all');\n\t\tforeach ($perfil as $p){\n\t\t\t$perfiles[$p['Perfil']['id']]=$p['Perfil']['perfil'];\n\t\t}\n\t\t$perfiles[0]='SuperAdministrador';\n\t\t$this->set('perfiles', $perfiles);\n\t\t$this->set('administrativos', $administrativos);\n\t}",
"public function getFileList(): array\n {\n return [\n app_path('User.php'),\n app_path('Http/Controllers/Auth/RegisterController.php'),\n config_path('auth.php'),\n config_path('services.php'),\n base_path('database/factories/UserFactory.php'),\n ];\n }",
"public function getAllUserpreferences()\n {\n $dbHandler = Lib\\DbHandler::getDbHandler();\n $restaurantID = array();\n $userlist = $dbHandler->getUsers();\n $numberOfUsers = count($userlist);\n foreach ($userlist as $user) {\n $restaurants = $user->getPreferedRestaurantIds();\n\n foreach ($restaurants as $restaurant) {\n $restaurantID[] .= $restaurant[ID];\n\n }\n\n }\n $this->getMostlikedRestaurants($restaurantID);\n }",
"public function accionPerfilArtista(){\n // (si es que hay alguno logueado)\n $sw = false;\n $codRole = 0;\n \n if(Sistema::app()->Acceso()->hayUsuario()){\n $sw = true;\n \n $nick = Sistema::app()->Acceso()->getNick();\n $codRole = Sistema::app()->ACL()->getUsuarioRole($nick);\n \n }\n \n // Si el usuario que intenta acceder es un restaurante, administrador\n // o simplemente no hay usuario validado, lo mando a una página de\n // error. Los artistas tienen el rol 5\n if(!$sw || $codRole != 5){\n Sistema::app()->paginaError(403, \"No tiene permiso para acceder a esta página.\");\n exit();\n }\n \n // Una vez comprobado que está accediendo un artista, procedo a\n // obtener los datos del artista\n $art = new Artistas();\n \n // El nick del usuario es el correo electrónico. Es un valor\n // único, por lo que puedo buscar al artista por\n // su dirección de correo\n if(!$art->buscarPor([\"where\"=>\"correo='$nick'\"])){\n \n Sistema::app()->paginaError(300,\"Ha habido un problema al encontrar tu perfil.\");\n return;\n \n }\n \n $imagenAntigua = $art->imagen;\n $nombre=$art->getNombre();\n \n // Si se modifican los datos del artista, esta variable\n // pasará a true para notificar a la vista\n $artistaModificado = false;\n if (isset($_POST[$nombre]))\n {\n $hayImagen = true;\n // Si ha subido una nueva imagen, recojo su nombre\n if($_FILES[\"nombre\"][\"name\"][\"imagen\"]!=\"\"){\n $_POST[\"nombre\"][\"imagen\"] = $_FILES[\"nombre\"][\"name\"][\"imagen\"];\n }\n else{\n $hayImagen = false;\n $_POST[\"nombre\"][\"imagen\"] = $art->imagen;\n }\n // El coreo es una clave foránea, así que tengo\n // que cambiar el correo en la tabla ACLUsuarios\n Sistema::app()->ACL()->setNick($nick, $_POST[\"nombre\"][\"correo\"]);\n \n $art->setValores($_POST[$nombre]);\n \n if ($art->validar())\n {\n // Si se ha guardado correctamente, actualizo la imagen de perfil\n // e inicio sesión con el nuevo correo automáticamente\n if ($art->guardar()){\n $artistaModificado = true;\n if($hayImagen){\n // Obtengo la carpeta destino de la imagen\n $carpetaDestino = $_SERVER['DOCUMENT_ROOT'].\"/imagenes/artistas/\";\n // Elimino la imagen antigua\n unlink($carpetaDestino.$imagenAntigua);\n \n // Y guardo la nueva\n move_uploaded_file($_FILES['nombre']['tmp_name']['imagen'], $carpetaDestino.$_POST[\"nombre\"][\"imagen\"]);\n }\n Sistema::app()->Acceso()->registrarUsuario(\n $_POST[\"nombre\"][\"correo\"],\n mb_strtolower($art->nombre),\n 0,\n 0,\n [1,1,1,1,1,0,0,0,0,0]);\n }\n \n }\n }\n \n $this->dibujaVista(\"perfilArtista\",\n [\"art\"=>$art, \"artistaModificado\"=>$artistaModificado],\n \"Perfil\");\n \n }",
"function getUsers(){\n\t\t$this->users = $this->fileHandler->parseRows($this->userFile, '^', '|');\n\t\t$this->logMsg(SUCCESS, 'users generated');\n\t}",
"function usuario($usuario) {\r\n $u = $this->consultar($usuario);\r\n $p = $this->perfil($u[\"perfil\"]);\r\n return(array_merge($u, $p));\r\n }",
"function getAllUser_Privilage() {\n\t\t$SQL=\"SELECT * FROM user_privilage_tab\";\n\t\t$this->db->executeQuery($SQL);\n\n\t\t$result = array();\n\t\t$count = 0;\n\n\t\twhile($rs = $this->db->nextRecord())\n\t\t{\n\t\t\t$user_privilage = new User_Privilage();\n\t\t\t$user_privilage->setId($rs['id']);\n\t\t\t$user_privilage->setOrder_no($rs['order_no']);\n\t\t\t$user_privilage->setCode($rs['code']);\n\t\t\t$user_privilage->setUser_id($rs['user_id']);\n\t\t\t$user_privilage->setPrivilage_id($rs['privilage_id']);\n\t\t\t$user_privilage->setIs_view($rs['is_view']);\n\t\t\t$user_privilage->setIs_save($rs['is_save']);\n\t\t\t$user_privilage->setIs_edit($rs['is_edit']);\n\t\t\t$user_privilage->setIs_delete($rs['is_delete']);\n\t\t\t$user_privilage->setData_date($rs['data_date']);\n\t\t\t$user_privilage->setStatus($rs['status']);\n\t\t\t$user_privilage->setDate_($rs['date_']);\n\t\t\t$result[$count++] = $user_privilage;\n\t\t}\n\n\t\t$this->db->closeRs();\n\t\treturn $result;\n\n\t}",
"public function permisos(){\n \n $permisos =config('installer.folder_permissions');\n \n foreach ($permisos as $path => $perm) {\n $formData[] = [\n 'label' => 'Carpeta '.$path.' Permiso: '.$perm,\n 'check' => $this->checkFolderPermission($path,$perm)\n ];\n }\n \n return view('installer::permisos', compact('formData'));\n }",
"public function listar_permisos_por_usuario($id_usuario)\n {\n $conectar = parent::conexion();\n $sql = \"select * from usuario_permiso where id_usuario=?\";\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $id_usuario);\n $sql->execute();\n return $resultado = $sql->fetchAll();\n }",
"function user_files($userid,$conn){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t//$dhandle = opendir('./cloud/'.$_SESSION['SESS_USER_ID'].'/');\r\n\t\t\t\t// define an array to hold the folders in the user's directory\r\n\t\t\t\t\t$files = array();\r\n\t\t\t\t\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\t\t\t\tif (is_dir($path)) {\r\n\t\t\t\t\tif ($dh = opendir($path)) {\r\n\t\t\t\t \twhile (($file = readdir($dh)) !== false) {\r\n\t\t\t\t \t\tif(is_file($path . $file)){\r\n\t\t\t\t $files[]=$file;\r\n\t\t\t\t \t\t}\r\n\t\t\t\t }\r\n\t\t\t\t \tclosedir($dh);\r\n\t\t\t\t \t}\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t// Now loop through the folders, echoing out a new select option for each one\r\n\t\t\t\t\tforeach( $files as $fname )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$extension=$ext = pathinfo($fname, PATHINFO_EXTENSION);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tswitch ($extension) {\r\n\t\t\t\t\t\t\tcase 'txt':\r\n\t\t\t\t\t\t\tcase 'doc':\r\n\t\t\t\t\t\t\t\t$file_icon=\"description\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase 'jpg':\r\n\t\t\t\t\t\t\tcase 'jpeg':\r\n\t\t\t\t\t\t\tcase 'png':\r\n\t\t\t\t\t\t\t\t$file_icon=\"image\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'mp3':\r\n\t\t\t\t\t\t\tcase 'flac':\r\n\t\t\t\t\t\t\tcase 'wav':\r\n\t\t\t\t\t\t\t\t$file_icon=\"audiotrack\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tcase 'mp4':\r\n\t\t\t\t\t\t\tcase 'avi':\r\n\t\t\t\t\t\t\tcase 'flv':\r\n\t\t\t\t\t\t\tcase 'ts':\r\n\t\t\t\t\t\t\tcase 'mkv':\r\n\t\t\t\t\t\t\tcase 'mov':\r\n\t\t\t\t\t\t\tcase 'mpeg':\r\n\t\t\t\t\t\t\t\t$file_icon=\"videocam\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t$file_icon=\"insert_drive_file\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}//dir.php?folder='.$fname.'\r\n\t\t\t\t\t \tprintf('\r\n\t\t\t\t\t \t\t<div class=\"col-lg-2 col-md-3 col-sm-3 col-xs-3\">\r\n\t\t\t\t\t\t\t\t<a id=\"ufi\" href=\"#'.$file_icon.'\" data-toggle=\"modal\" data-whatever=\"./cloud/'.$_SESSION['SESS_USER_ID'].'/'.$fname.'\" data-name=\"'.$fname.'\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"card btn waves-attach\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"card-main\">\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"card-inner text-center\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<i id=\"ufic\" class=\"icon icon-3x text-center\">'.$file_icon.'</i>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"\">'.$this->truncateFilename($fname, $max = 15).'</p>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t</div>'\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t}",
"public function GetPerfilId($id){\n \t$perfiles = Perfil::find($id);\n \treturn $perfiles;\n }",
"function maneja_perfiles_produccion()\n\t{\n\t\treturn $this->get_instalacion()->es_produccion() && $this->instancia->get_proyecto_usar_perfiles_propios($this->identificador);\n\t}",
"public function getFilePermissionsReturnsCorrectPermissionsForFilesNotOwnedByCurrentUser_dataProvider() {}",
"private function getPermisos()\n {\n $user = Zend_Auth::getInstance()->getIdentity();\n $roles = $user->getRoles();\n $permisos = array();\n \n foreach ($roles as $rol) {\n $permisos = array_merge($permisos, $this->permisosPorUC[$rol]);\n }\n \n return $permisos;\n }",
"public function showPerfil(){\n\n $idUsuario = Auth::id();\n $OTasignadas=ot_orden_trabajo::where('OT_USER_ENCARGADO',$idUsuario)->paginate(5);\n $OTcreadas=ot_orden_trabajo::where('OT_USER_ID_CREADOR',$idUsuario)->paginate(5);\n // $buscarReporte=rep_reporte::where('REP_USER_ID', $idUsuario)->get();\n // $imagenes=ft_fotos::all();\n $fotoPerfil=user::where('id',$idUsuario)->get();\n // dd($fotoPerfil);\n // $ordenDeTrabajo = DB::table('OT_ORDEN_TRABAJO')->get();\n\n return view('PERFIL.inicioPerfil', compact('OTasignadas','OTcreadas','fotoPerfil' ));\n }",
"public function files() :array\n {\n $files = DB::query(\"SELECT `ft_filename` AS 'filename', `ft_size` AS 'size' FROM `file_table` WHERE `ft_ut_id` = :u_id ORDER BY `ft_filename` ASC\", array(':u_id'=>$_SESSION['user_id']));\n\n $list = [];\n $i = 0;\n\n foreach($files as $file){\n $list[$i] = array($file['filename'], round($file['size']/1024, 2));\n $i++;\n }\n return $list;\n }",
"public function perfiles(){\n return $this->belongsToMany('App\\Perfil', 'cliente_perfil', 'cliente_id', 'perfil_id' );\n }",
"public function get_all_image_uploaded(){\n if($this->username && $this->id){\n if(file_exists($this->image_path . DS . $this->username)){\n $images = scandir($this->image_path . DS . $this->username);\n if(!empty($images)){\n $images = array_diff($images,array('.','..'));\n $allowed_ex = array(\"jpg\",\"jpeg\",\"png\"); \n foreach($images as $image){\n $exArr = explode('.',$image);\n $ex = end($exArr);\n $ex = strtolower($ex);\n if(!in_array($ex,$allowed_ex)){\n $images = array_diff($images,array($image));\n }\n }\n sort($images);\n return $images;\n }else{\n return false;\n }\n }\n }else{\n return false;\n }\n }",
"function get_persona_perfil($id)\n {\n return $this->db->get_where('persona_perfil',array('id'=>$id))->row_array();\n }",
"public static function getUsuarios()\n {\n $query = \"SELECT id,nombre,email,usuario,privilegio,fecha_registro FROM users\";\n\n self::getConexion();\n\n $resultado = self::$cnx->prepare($query);\n\n $resultado->execute();\n\n $filas = $resultado->fetchAll();\n\n return $filas;\n }",
"function getAllDatas() {\n if (isset($_GET['application'])) {\n $application=htmlentities($_GET['application']);\n $path = \"../data/\".$application;\n }\n //liste les fichiers dans les dossiers de donnees\n $nb_fichier = 0;\n if($dossier = opendir($path)) {\n while(false !== ($fichier = readdir($dossier))){\n if($fichier != '.' && $fichier != '..' && $fichier != 'index.php' && $fichier != '.DS_Store' && $fichier != 'template.csv'){ \n $nb_fichier++;\n $nomFichier = substr($fichier, 0, -4);\n echo '<option value=\"'. $nomFichier .'\">'. $nomFichier .'</option>';\n } \n } \n closedir($dossier);\n } else {\n \t\techo'<option value=\"erreur\">erreur</option>';\n\t}\n}",
"function Array_Get_Perfiles($perfil)\n{\n\tif($perfil=='3')\n\t{\n\t\t$perfiles = consultar(\"SELECT * FROM `tb_perfiles`\");\n\t}\n\telse\n\t{\n\t\t$perfiles = consultar(\"SELECT * FROM `tb_perfiles` WHERE id_perfiles!=3\");\n\t}\n\t$datos = array();\n\twhile ($valor = mysqli_fetch_array($perfiles)) {\n\t\t$id_perfiles = $valor['id_perfiles'];\n\t\t$nombre = $valor['nombre'];\n\t\t$descripcion = $valor['descripcion'];\n\t\t$nivel = $valor['nivel'];\n\t\t$vector = array(\n\t\t\t'id_perfiles'=>\"$id_perfiles\",\n\t\t\t'nombre' => \"$nombre\",\n\t\t\t'descripcion' => \"$descripcion\",\n\t\t\t'nivel' => \"$nivel\"\n\t\t\t);\n\t\tarray_push($datos, $vector);\n\t}\n\n\treturn $datos;\t\n\n}",
"public function ListarPermisos() {\n $query = sprintf(\"select ID,NOMBRE FROM permisos\");\n $this->bd->DoQuery($query);\n\n return $this->bd->GetCount();\n }",
"function permisos_usuario($id_usuario) {\n\t\t$query = \"SELECT colaboradores.*, colaboradores_permisos.* \n\t\tFROM colaboradores, colaboradores_permisos\n\t\tWHERE colaboradores.id_colaborador='$id_usuario' \n\t\tAND colaboradores.id_colaborador=colaboradores_permisos.id_colaborador\n\t\tAND colaboradores.estado=1\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $row;\n\t}",
"public function getPerfilById($id)\r\n\t{\r\n \t$sql = new Sql($this->dbAdapter);\r\n\t\t$select = $sql->select();\r\n\t\t$select->from('users');\r\n\t\t$select->columns(array('id','email','password'));\r\n\t\r\n\t\t$select->join(array('i_u'=>'users_details'),'users.id = i_u.id_user',array('id_user','name','surname', 'campus', 'phone', 'addres','image','pin','key_inventory'), 'Left');\r\n\t\t$select->where(array('users.id' =>$id ));\r\n\r\n\t\t$selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result=$execute->toArray(); \r\n\r\n\t\t//echo \"<pre>\";print_r($result);exit;\r\n\t\treturn $result;\r\n\r\n\t}",
"function getUSPageFiles() {\n\t$directory = \"../users/\";\n\t$pages = glob($directory . \"*.php\");\n\tforeach ($pages as $page){\n\t\t$fixed = str_replace('../users/','/'.$us_url_root.'users/',$page);\n\t\t$row[$fixed] = $fixed;\n\t}\n\treturn $row;\n}",
"public function getPermissionsFromFiles() : array\n {\n $path = base_path();\n $keys = [];\n $functions = [\n 'userCan',\n ];\n $pattern = // See http://regexr.com/392hu\n \"[^\\w|>]\" . // Must not have an alphanum or _ or > before real method\n \"(\" . implode('|', $functions) . \")\" . // Must start with one of the functions\n \"\\(\" . // Match opening parenthese\n \"[\\'\\\"]\" . // Match \" or '\n \"(\" . // Start a new group to match:\n // \"[a-zA-Z0-9_-]+\". // Must start with group\n \"([^\\1)]+)+\" . // Be followed by one or more items/keys\n \")\" . // Close group\n \"[\\'\\\"]\" . // Closing quote\n \"[\\),]\"; // Close parentheses or new parameter\n\n // Find all PHP + Twig files in the app folder, except for storage\n $finder = new Finder();\n $finder->in($path)->exclude('storage')->name('*.php')->name('*.twig')->files();\n\n /** @var \\Symfony\\Component\\Finder\\SplFileInfo $file */\n foreach ($finder as $file) {\n // Search the current file for the pattern\n if (preg_match_all(\"/$pattern/siU\", $file->getContents(), $matches)) {\n // Get all matches\n foreach ($matches[2] as $key) {\n $keys[] = $key;\n }\n }\n }\n\n // Remove duplicates\n $keys = array_unique($keys);\n\n $base_permissions = array_filter(explode(',', \\File::get(base_path('permissions.txt'))));\n\n return array_map('trim', array_merge($keys, $base_permissions));\n }",
"public function usuarios()\n {\n \treturn $this->hasMany(reciclausers::class, 'perfilId', 'id');\n \t// nombre del modelo con el que se relaciona, llave foranea, llave de la tabla.\n }",
"public function profilUser() \n {\n require_once('Models/userMdl.php');\n //juste pour le test nous mettons \n $id = 1;\n $data = userMdl::profilUser($id);\n \n require_once(\"./Views/profilView.php\");\n }",
"public function runShowPerfil($request)\n {\n $dataJson = $this->hoSegUsuariosModel->reCargarPerfiles();\n $this->json($dataJson);\n }",
"public function profil()\n {\n\n $pseudo = $_SESSION['user_profil']['pseudo'];\n $datas = $this->userManager->getUserInformation($pseudo);\n $data_page = [\n \"page_description\" => \"Page de profil\",\n \"page_title\" => \"Page de profil\",\n \"userInfo\" => $datas,\n \"view\" => \"views/users/profil.view.php\",\n \"template\" => \"views/common/template.php\"\n ];\n $this->generatePage($data_page);\n }",
"function pnUserGetAll()\r\n{\r\n list($dbconn) = pnDBGetConn();\r\n $pntable = pnDBGetTables();\r\n\r\n $userstable = $pntable['users'];\r\n $userscolumn = &$pntable['users_column'];\r\n $sql = \"SELECT $userscolumn[uname],\r\n $userscolumn[uid],\r\n $userscolumn[name],\r\n $userscolumn[email],\r\n $userscolumn[url],\r\n $userscolumn[user_avatar]\r\n FROM $userstable\";\r\n $result = $dbconn->Execute($sql);\r\n\r\n if($dbconn->ErrorNo() != 0) {\r\n return;\r\n }\r\n\r\n if ($result->EOF) {\r\n return false;\r\n }\r\n\r\n $resarray = array();\r\n while(!$result->EOF) {\r\n list($uname, $uid, $name, $email, $url, $user_avatar) = $result->fields;\r\n $result->MoveNext();\r\n $resarray[$uid] = array('uname' => $uname,\r\n 'uid' => $uid,\r\n 'name' => $name,\r\n 'email' => $email,\r\n 'url' => $url,\r\n 'avatar' => $user_avatar);\r\n }\r\n $result->Close();\r\n\r\n return $resarray;\r\n}",
"public function index()\n {\n $user = Auth::user();\n\n if(!$user == null)\n {\n\n $id_opcion = 9010;\n $idperfil = auth()->user()->id_perfil;\n $emailclien = auth()->user()->email;\n $perfiles = Opcperfil::where('id_perfil', '=', $idperfil)\n ->where('id_opcion','=', $id_opcion)->get();\n \n $operfiles = Perfil::orderBy('id_perfil')\n ->paginate(5);\n // ->get();\n return view('perfiles.t_perfiles', compact('perfiles', 'operfiles'));\n } else {\n return Redirect::to('home'); \n }\n\n }",
"function cargarDatostxt(){\n // Si no existe lo creo\n $tabla=[]; \n if (!is_readable(FILEUSER) ){\n // El directorio donde se crea tiene que tener permisos adecuados\n $fich = @fopen(FILEUSER,\"w\") or die (\"Error al crear el fichero.\");\n fclose($fich);\n }\n $fich = @fopen(FILEUSER, 'r') or die(\"ERROR al abrir fichero de usuarios\"); // abrimos el fichero para lectura\n \n while ($linea = fgets($fich)) {\n $partes = explode('|', trim($linea));\n // Escribimos la correspondiente fila en tabla\n $tabla[]= [ $partes[0],$partes[1],$partes[2],$partes[3]];\n }\n fclose($fich);\n return $tabla;\n}",
"function getPhotosOfUser($idUser){\r\n\t\t$connectService = new ConnectionBDD();\r\n\t\t$connect = $connectService->connect();\r\n\t\t$tab = new Data();\r\n\t\t$r = mysql_query(\"select login from Utilisateur where id_user = \" . $idUser);\r\n\r\n\t\tif(mysql_num_rows($r) == 0){\r\n\t\t\treturn $tab;\r\n\t\t}\r\n\t\t$name = mysql_result($r,0,0);\r\n\t\t$connectService->close();\r\n\t\tif(!is_dir(\"../v2.0/espace/\" . $name . \"/photos/sd\")){\r\n\t\t\treturn $tab;\r\n\t\t}\r\n\r\n\t\t$tab->addInfo(\"root\",\"../v2.0/espace/\" . $name . \"/photos\");\r\n\t\t$tab->addInfo(\"photos\",$this->getPhotosOfDir($tab->getInfo(\"root\")));\r\n\t\t$tab->addInfo(\"type\",\"scan\");\r\n\r\n\t\treturn $tab;\r\n\t}",
"public function checkProfil()\n\t{\n\t\t$query = 'SELECT * FROM users WHERE id_users='.$_SESSION['id_users'].';';\n\t\t$resultat = $this->db->get($query);\n\t\treturn $resultat;\n\t}",
"public function listUserPaths(): array\n {\n $path = storage_path('keys');\n if (\\is_dir($path)) {\n $directory = glob($path.'/*', GLOB_ONLYDIR);\n $usersPaths = [];\n foreach ($directory as $userPath) {\n $pathSlices = explode('/', $userPath);\n $usersPaths[] = end($pathSlices);\n }\n }\n\n return $usersPaths;\n }",
"function array_codproduto_foto($con){\r\n\t$param_cadastro_dirfotoprod = param(\"CADASTRO\", \"DIRFOTOPROD\", $con);\r\n\t$arr_codproduto = array();\r\n\tif(is_dir($param_cadastro_dirfotoprod)){\r\n\t\t$dir = opendir($param_cadastro_dirfotoprod);\r\n\t\twhile($file = readdir($dir)){\r\n\t\t\t$file = strtolower($file);\r\n\t\t\tif(strpos($file, \".jpg\") !== FALSE){\r\n\t\t\t\t$arr_codproduto[] = str_replace(\".jpg\", \"\", $file);\r\n\t\t\t}\r\n\t\t\tif(is_dir($file)){\r\n\t\t\t\tif(is_numeric($file)){\r\n\t\t\t\t\t$arr_codproduto[] = $file;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $arr_codproduto;\r\n}",
"public function getPermisosaf($id_usuario,$id_modulo)\n {\n $query = \"select permisos.* FROM `permisos`\n INNER JOIN persona on persona.fkID_cargo = permisos.fkID_cargo\n INNER JOIN usuario on usuario.fkID_persona = persona.id_persona\n WHERE usuario.id_usuario='\" . $id_usuario . \"' and fkID_modulo ='\" . $id_modulo . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }",
"function listar_usuarios() {\n\t\t$query = \"SELECT colaboradores.*, colaboradores_permisos.*\n\t\tFROM colaboradores, colaboradores_permisos\n\t\tWHERE colaboradores.id_colaborador=colaboradores_permisos.id_colaborador\n\t\tAND colaboradores.estado=1\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}",
"private function usuarios(){\n\t\tif ($_SERVER['REQUEST_METHOD'] != \"GET\") {\n\t\t\t# no se envian los usuarios, se envia un error\n\t\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405);\n\t\t}//es una petición GET\n\t\t//se realiza la consulta a la bd\n\t\t$query = $this->_conn->query(\n\t\t\t\"SELECT id, nombre, email \n\t\t\t FROM usuario\");\n\t\t//cantidad de usuarios\n\t\t$filas = $query->fetchAll(PDO::FETCH_ASSOC); \n \t$num = count($filas);\n \t//si devolvio un resultado, se envia al cliente\n \tif ($num > 0) { \n\t $respuesta['estado'] = 'correcto'; \n\t $respuesta['usuarios'] = $filas; \n\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t } //se envia un error \n\t $this->mostrarRespuesta($this->devolverError(2), 204);\n\t}"
] | [
"0.6968639",
"0.68458104",
"0.66054463",
"0.64045686",
"0.62305546",
"0.6122248",
"0.60863817",
"0.6086165",
"0.60755014",
"0.60463136",
"0.5945213",
"0.5937028",
"0.59190816",
"0.5898024",
"0.58893895",
"0.5883103",
"0.5865218",
"0.58140594",
"0.58000606",
"0.57975334",
"0.5788889",
"0.5775118",
"0.57741874",
"0.5773045",
"0.5730238",
"0.57277143",
"0.5674877",
"0.5673979",
"0.56621313",
"0.56614316",
"0.56463623",
"0.5637753",
"0.56149036",
"0.5602073",
"0.55787385",
"0.556365",
"0.5553023",
"0.554965",
"0.5549574",
"0.55313677",
"0.5519742",
"0.55166775",
"0.55046505",
"0.5499073",
"0.5497826",
"0.54929173",
"0.5486179",
"0.54680586",
"0.54643494",
"0.5462763",
"0.5461483",
"0.5460011",
"0.54449743",
"0.5443532",
"0.5439615",
"0.5435701",
"0.5434833",
"0.5431386",
"0.5426424",
"0.54135835",
"0.53953815",
"0.5394715",
"0.5392228",
"0.5387159",
"0.5364849",
"0.53642184",
"0.5356493",
"0.53533465",
"0.535331",
"0.5344167",
"0.5339099",
"0.53313863",
"0.5310774",
"0.5310133",
"0.5307385",
"0.5303614",
"0.53033006",
"0.52972484",
"0.52960944",
"0.5293704",
"0.5292837",
"0.52924424",
"0.5285317",
"0.5282957",
"0.5272377",
"0.527016",
"0.52673686",
"0.5246866",
"0.52285093",
"0.5227836",
"0.5221578",
"0.5215937",
"0.5205168",
"0.51779497",
"0.5175918",
"0.5170769",
"0.5167239",
"0.5166768",
"0.5165142",
"0.5164278"
] | 0.6981998 | 0 |
Retorna los perfiles asociados al usuario inicializado | function getPerfiles () {
$this->obtenerPerfiles();
return $this->perfiles;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function GetAllPerfiles()\n {\n \t$perfiles = Perfil::all();\n \treturn $perfiles;\n }",
"function getPerfiles($idUser){\n\t\t/*\n\t\tDeben obtenerse de control_perfil_usuario los id de perfiles a los que pertenece el \n\t\tusuario para poder desplegarlos en el formulario de edición de datos\n\t\t*/\n\t\t$array=array();\n\t\t$oPerfilUsuario=new Perfil_usuario($this->oDBM);\n\t\t$arrayPerfilUsuario=$oPerfilUsuario->getPerfilesUsuario($idUser);\n\t\t\n\t\tforeach ($arrayPerfilUsuario as $item){\n\t\t\t$array[]=$item['id_perfil'];\n\t\t}\n\t\treturn $array;\n\t\t\n\t}",
"public function getUserFiles()\n {\n $user_files = Helper::getUserFiles();\n return $user_files;\n }",
"public function getPerfilesArray()\n {\n $perfiles = $this->getPerfiles();\n $ArrayPer = Array();\n if ($perfiles) {\n foreach ($perfiles as $per){\n $ArrayPer[$per['id']] = $per['perPerfil'];\n }\n }\n return $ArrayPer;\n }",
"public function getPerfiles()\n {\n $dql = \"SELECT p.id, p.perPerfil, p.perEstado\n FROM sgiiBundle:TblPerfil p\n WHERE p.perEstado = 1\";\n $query = $this->em->createQuery($dql);\n return $query->getResult();\n }",
"private function obtenerPerfiles ($idUser = \"\") {\n\n if ($idUser != \"\") {\n $this->id_usuario = $idUser;\n }\n\n if (count($this->perfiles) < 1) {\n $query = $this->stringConsulta() . \" where a.id_usuario=$this->id_usuario\";\n $data = $this->bd->ejecutarQuery($query);\n\n if ($data instanceof \\Countable and count($data) > 1) {\n throw new Exception(\"No se han obtenido los perfiles del usuario\", 1);\n }\n\n while ($perfil = $this->bd->obtenerArrayAsociativo($data)) {\n $this->perfiles[$perfil['clave_perfil']] = $perfil['clave_perfil'];\n }\n\n }\n else {\n $this->perfiles[] = 'UsuarioPublico';\n }\n\n }",
"public function list_owned_files() {\n $stmt = $this->pdo->prepare('select filename from file where user_id = :id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, $f['filename']);\n }\n return $result;\n }",
"public function get_rol_usuario(){\n\t\t$rol_user=$_SESSION[\"sesion_perfil\"];\n\t\t$sql=mysqli_query(Conecta::conx(),\"SELECT PERFIL FROM perfiles WHERE ID_PERFIL='$rol_user'\") or die('Error en la consulta del perfil de usuario:' . $sql . mysqli_errno(Conecta::conx()));\n\t\tif($reg=mysqli_fetch_assoc($sql)){\n\t\t\t$this->perfil[]=$reg;\n\t\t}\n\t\treturn $this->perfil;\n\t\t\n\t}",
"private function getAllProfils() {\n\t\tif (isset($this->profils)) {\n\t\t\treturn $this->profils;\n\t\t}\n\t\t$this->profils = array();\n\t\t$query = \"SELECT p.*, date_format(u.last_login, '%Y-%m-%d') as last_login\n\t\t\tFROM \".DB_PREFIX.\"profil p, \".DB_PREFIX.\"user u\n\t\t\tWHERE u.braldahim_id = p.idBraldun\n\t\t\tORDER BY idBraldun ASC;\";\n\t\t$res = mysql_query($query, $this->db);\n\t\twhile ($row = mysql_fetch_assoc($res)) {\n\t\t\t$this->profils[] = $row;\n\t\t}\n\t\tmysql_free_result($res);\n\t}",
"public function lCargartablaPerfiles() {\n $oDLaboratorio = new DLaboratorio();\n $rs = $oDLaboratorio->dCargartablaPerfiles();\n foreach ($rs as $key => $value) {\n array_push($rs[$key], \"../../../../fastmedical_front/imagen/icono/smile9.gif ^ Seleccionar\");\n }\n return $rs;\n }",
"private function iniciar_perfil(){\n\t\t// if(!isset($_SESSION['id_user'])){\n\t\t// \theader('location : index.php');\n\t\t// }\n\n\t\trequire_once 'inc/clases/procesos/fechas.class.php';\n\t\trequire_once 'inc/clases/perfil/usuarios.class.php';\t\t\t//clase usuarios\n\t\t$this->Modulos = new Modulos();\t\n\t\t$this->Usuario = new Usuarios();\t\t\t\n\t}",
"function getPerfil() {\n return $this->perfil;\n }",
"public function Perfil(){\n $pvd = new tutoria();\n\n //Se obtienen los datos del tutoria.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Tutoria/perfil-tutoria.php';\n\t}",
"private function usrprfget() {\n $q = \"SELECT * FROM ass_usuario_has_mzt_perfiles WHERE mzt_usuario_usr_id = $this->id ORDER BY mzt_perfiles_prf_id ASC\";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $arrassigned = array();\n $arravailable = array();\n while ($obj = mysql_fetch_object($con)) {\n $arrassigned[] = array('id' => $obj->mzt_perfiles_prf_id);\n }\n //se consultan los perfiles disponibles\n $q = \"SELECT * FROM ass_perfiles ORDER BY prf_nombre ASC\";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n while ($obj = mysql_fetch_object($con)) {\n $arravailable[] = array(\n 'id' => ($obj->prf_id),\n 'nombre' => ($obj->prf_nombre),\n 'descripcion' => ($obj->prf_descripcion));\n }\n\n $arrjson = array('output' => array('valid' => true, 'available' => $arravailable, 'assigned' => $arrassigned));\n $this->response = ($arrjson);\n }",
"function maneja_perfiles_produccion()\n\t{\n\t\treturn $this->get_instalacion()->es_produccion() && $this->instancia->get_proyecto_usar_perfiles_propios($this->identificador);\n\t}",
"function user_dir_list($user_dir){\r\n\t\t\t\tif($resource = @opendir(\"../cloud/\".$_SESSION['SESS_USER_ID'].\"/\".$user_dir)){\r\n\t\t\t\t\t$list=array();\r\n\t\t\t\t\twhile (($entry = readdir($resource)) !==FALSE) {\r\n\t\t\t\t\t\tif($entry != '.' && $entry != '..'){\r\n\t\t\t\t\t\t\t$list[]= \"\".$entry.\"\".\"%0A\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\treturn $list;\r\n\t\t\t}",
"private function iniciar_perfil_mda(){\n\t\trequire_once 'inc/clases/procesos/fechas.class.php';\n\t\trequire_once 'inc/clases/procesos/sql_anuncios.class.php';\n\t\trequire_once 'inc/clases/mda/show_master.class.php';\n\t\trequire_once 'inc/clases/mda/pedidos.class.php';\n\t\trequire_once 'inc/clases/config/perfil_config.class.php';\n\n\t\t$this->Modulos = new Modulos();\n\t}",
"public function getFileList(): array\n {\n return [\n app_path('User.php'),\n app_path('Http/Controllers/Auth/RegisterController.php'),\n config_path('auth.php'),\n config_path('services.php'),\n base_path('database/factories/UserFactory.php'),\n ];\n }",
"private function getPermisos()\n {\n $user = Zend_Auth::getInstance()->getIdentity();\n $roles = $user->getRoles();\n $permisos = array();\n \n foreach ($roles as $rol) {\n $permisos = array_merge($permisos, $this->permisosPorUC[$rol]);\n }\n \n return $permisos;\n }",
"public function getPerfilList()\n {\n $option = '';\n $query = $this->db->query(\"SELECT * FROM perfil\");\n while ($rdata = mysqli_fetch_assoc($query)) {\n $option .= '<option value=\"' . $rdata['idPerfil'] . '\">' . mb_strtoupper(\n $rdata['nombre']\n ) . '</option>';\n }\n\n return $option;\n }",
"function loadPerfil(){\n\t\t$r = $this->dper->getPerfilById($this->id);\n\t\tif($r != -1){\n\t\t\t$this->nombre = $r[\"nombre\"];\n\t\t}else{\n\t\t\t$this->nombre = \"\";\n\t\t}\n\t}",
"public function perfil() {\n require_once 'views/usuarios/perfil.php';\n }",
"public function files()\n {\n if(isset($_GET['img']) || isset($_GET['js']) || isset($_GET['css']) || isset($_GET['pdf'])){\n if(isset($_GET['img'])){\n return $this->filesManager($_GET['img'], false, 'img');\n }\n if(isset($_GET['js'])){\n return $this->filesManager($this->nombreModulo, $_GET['js'], 'js');\n }\n if(isset($_GET['css'])){\n return $this->filesManager($this->nombreModulo, $_GET['css'], 'css');\n }\n if(isset($_GET['pdf'])){\n\n }\n }else{\n exit('Método no disponible');\n\n }\n }",
"function perfiles($acceso){\n\t$acceso->objeto->ejecutarSql(sql(\"modulo ORDER BY nombremodulo\"));\t\n\treturn seguridadPerfil($acceso);\n}",
"public function getPdfFiles()\n {\n return $this->getValue('pdf_files');\n }",
"function perfil (){\n \t $dato=$_SESSION['Usuarios'];\n\t\t $datos = Usuario::mostrar($dato);\n \t require \"app/Views/Perfil.php\";\n }",
"public function getPerfils()\n {\n return $this->hasMany(Perfil::className(), ['modulo_cod_fk' => 'modulo_cod_pk']);\n }",
"public function files() :array\n {\n $files = DB::query(\"SELECT `ft_filename` AS 'filename', `ft_size` AS 'size' FROM `file_table` WHERE `ft_ut_id` = :u_id ORDER BY `ft_filename` ASC\", array(':u_id'=>$_SESSION['user_id']));\n\n $list = [];\n $i = 0;\n\n foreach($files as $file){\n $list[$i] = array($file['filename'], round($file['size']/1024, 2));\n $i++;\n }\n return $list;\n }",
"function opcion__compilar_perfiles()\n {\n $param = $this->get_parametros();\n $id = isset($param[\"-p\"]) ? $param[\"-p\"] : $this->get_id_proyecto_actual(true);\n\n try {\n $proyecto = $this->get_proyecto($id);\n $path = $proyecto->get_dir_generales_compilados();\n if (!\\file_exists($path) || !\\is_writable($path)) {\n $this->consola->error('ATENCION!!: Considere ejecutar el comando compilar para abarcar todos los metadatos'. PHP_EOL);\n throw new toba_error('No existe o no es accesible la carpeta de metadatos compilados!!'. PHP_EOL);\n }\n toba_manejador_archivos::crear_arbol_directorios($path);\n $proyecto->compilar_metadatos_generales_grupos_acceso(true);\n } catch ( toba_error $e ) {\n\t\t$this->consola->error( \"PROYECTO $id: Ha ocurrido un error durante la compilacion:\\n\".$e->getMessage());\n exit(-1);\n }\n }",
"public function getPerfil()\n {\n return User::find(Auth::user()->id);\n }",
"public function get_all_image_uploaded(){\n if($this->username && $this->id){\n if(file_exists($this->image_path . DS . $this->username)){\n $images = scandir($this->image_path . DS . $this->username);\n if(!empty($images)){\n $images = array_diff($images,array('.','..'));\n $allowed_ex = array(\"jpg\",\"jpeg\",\"png\"); \n foreach($images as $image){\n $exArr = explode('.',$image);\n $ex = end($exArr);\n $ex = strtolower($ex);\n if(!in_array($ex,$allowed_ex)){\n $images = array_diff($images,array($image));\n }\n }\n sort($images);\n return $images;\n }else{\n return false;\n }\n }\n }else{\n return false;\n }\n }",
"public static function getAll_files() {\n $db = DBInit::getInstance();\n\n $statement = $db->prepare(\"SELECT id, file_name, uploaded, user FROM files\");\n $statement->execute();\n\n return $statement->fetchAll();\n }",
"function get_all_persona_perfil()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('persona_perfil')->result_array();\n }",
"public function all()\n {\n $dir = public_path() . '/uploads/temp/' . Session::getId() . '/';\n $data = [];\n $mimetypes = new Mimetype;\n if(file_exists($dir)) {\n foreach(scandir($dir) as $file) {\n if(in_array($file, ['.', '..'])) continue;\n $filedata = [];\n $filedata['name'] = $file;\n $filedata['url'] = url('/uploads/temp/' .Session::getId() . '/' .$file);\n $filedata['size'] = File::size($dir . $file);\n $filedata['type'] = $mimetypes->detectByFileExtension(File::extension($file));\n $data[] = $filedata;\n }\n return $data;\n }\n }",
"public function listProById()\n {\n\n // obtener el perfil por id\n $id = 3985390143818633;\n print_r($this->getProfile($id)); \n\n }",
"function asociarPerfiles ($perfiles) {\n\n $insert = \"insert into s_usuarios_perfiles (id_usuario_perfil, id_usuario, id_perfil) values \";\n $i = 0;\n foreach ($perfiles as $key => $idPerfil) {\n\n if ($i > 0)\n $insert .= \",\";\n\n $insert .= \"(null,$this->id_usuario,$idPerfil)\";\n $i++;\n }\n\n $delete = \"delete from s_usuarios_perfiles where id_usuario=$this->id_usuario;\";\n\n $this->bd->ejecutarQuery($delete . $insert, 2);\n\n return ['ejecutado' => 1];\n }",
"public function Perfil(){\n $pvd = new alumno();\n\n //Se obtienen los datos del alumno.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Alumno/perfil-alumno.php';\n\t}",
"public function GetPerfilId($id){\n \t$perfiles = Perfil::find($id);\n \treturn $perfiles;\n }",
"function loadPerfilOpciones(){\n\t\t$r = $this->dper->loadPerfilOpciones($this->id);\n\t\t$opc = null;\n\t\twhile($row = mysql_fetch_array($r)){\n\t\t\tif($row['per_id'] == $this->id) $indicador = 1; else $indicador = 0;\n\t\t\t$opc[count($opc)]=array('id'=>$row['opc_id'],\n\t\t\t\t\t \t'nombre'=>$row['opc_nombre'],\n\t\t\t\t\t\t'nivel'=>$row['opn_id'],\n \t\t\t\t\t\t'indicador'=>$indicador,\n \t\t\t\t\t\t'acceso'=>$row['pxo_nivel']);\n\t\t}\n\t\treturn $opc;\n\t}",
"public function list_shared_files() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.owner_id = :id and s.user_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }",
"public function getFiles($uid) {\n\n\t\t$uid = $_SESSION['userid'];\n\t\t$this->pdo = config_db::getConnected();\n\n\t\t$statement = $this->pdo->prepare(\"SELECT * FROM files f\n INNER JOIN user_files uf ON (uf.fileid = f.id)\n INNER JOIN users u ON (uf.uid = u.id)\n WHERE uf.uid = :uid\");\n\t\t$result = $statement->execute(array('uid' => $uid));\n\t\t$rows = $statement->fetchAll(PDO::FETCH_ASSOC);\n \n\t\t$fileinfo = array();\n\t\tforeach($rows as $row) {\n\t $fileinfo[] = $row;\n }\n\n\t\treturn $fileinfo;\n\t}",
"public function getFiles() {\r\n\r\n $files = array();\r\n\r\n $userId= $this->userId;\r\n $trackingId = $this->trackingFormId;\r\n $dir = FILEPATH . $userId. '/' . $trackingId;\r\n\r\n if (is_dir($dir)) {\r\n if ($dh = opendir($dir)) {\r\n while (($file = readdir($dh)) !== false) {\r\n if($file != '.' && $file != '..') {\r\n $size = $this->Size($dir . '/' . $file);\r\n array_push($files, array('name'=>$file,\r\n 'urlfilename'=>urlencode($file),\r\n 'size'=>$size));\r\n }\r\n }\r\n closedir($dh);\r\n }\r\n }\r\n\r\n return $files;\r\n }",
"public function permisos(){\n \n $permisos =config('installer.folder_permissions');\n \n foreach ($permisos as $path => $perm) {\n $formData[] = [\n 'label' => 'Carpeta '.$path.' Permiso: '.$perm,\n 'check' => $this->checkFolderPermission($path,$perm)\n ];\n }\n \n return view('installer::permisos', compact('formData'));\n }",
"public function list_shared_files_with() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.user_id = :id and s.owner_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }",
"function getPermisos($idUser){\n\t\t$sql=\"\n\t\tSELECT DISTINCT\n\t\tcontrol_objeto.clave as 'objeto',\n\t\tcontrol_permiso.tipo as 'tipo'\n\t\tFROM\n\t\tcontrol_perfil_usuario\n\t\tINNER JOIN control_perfil_permiso ON control_perfil_usuario.id_perfil=control_perfil_permiso.id_perfil\n\t\tINNER JOIN control_permiso ON control_perfil_permiso.id_permiso=control_permiso.id_permiso\n\t\tINNER JOIN control_objeto ON control_permiso.id_objeto=control_objeto.id_objeto\n\t\tWHERE control_perfil_usuario.id_usuario=$idUser\";\n\t\treturn $this->toArray($sql);\n\t}",
"function _getFotoPerfil($usuario) {\n $foto = null;\n if($usuario['foto_persona'] != null) {\n $foto = RUTA_SMILEDU.$usuario['foto_persona'];\n } else if($usuario['google_foto'] != null) {\n $foto = $usuario['google_foto'];\n } else if($usuario['foto_persona'] == null && $usuario['google_foto'] == null) {\n $foto = RUTA_SMILEDU.FOTO_DEFECTO;\n }\n return $foto;\n }",
"static function profiles() {\n global $LANG;\n\n $a_profil = array();\n $a_profil[] = array('profil' => 'agent',\n 'name' => $LANG['plugin_fusioninventory']['profile'][2]);\n $a_profil[] = array('profil' => 'remotecontrol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][3]);\n $a_profil[] = array('profil' => 'configuration',\n 'name' => $LANG['plugin_fusioninventory']['profile'][4]);\n $a_profil[] = array('profil' => 'wol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][5]);\n $a_profil[] = array('profil' => 'unknowndevice',\n 'name' => $LANG['plugin_fusioninventory']['profile'][6]);\n $a_profil[] = array('profil' => 'task',\n 'name' => $LANG['plugin_fusioninventory']['profile'][7]);\n\n return $a_profil;\n }",
"function getUsers()\n\t{\n\t\t// Lets load the files if it doesn't already exist\n\t\tif (empty($this->_users))\n\t\t{\n\t\t\t$query = $this->_buildQueryUsers();\n\t\t\t$this->_users = $query === false\n\t\t\t\t? array()\n\t\t\t\t: $this->_getList($query);\n\t\t}\n\n\t\treturn $this->_users;\n\t}",
"public function configurar()\n {\n //\n $count = Perfiles::select()->get()->count();\n if ($count == 0) {\n $permisos = Funcionalidades::select()->get();\n Perfiles::create(['nombre' => 'Super Su','usuario'=>1]);\n foreach ($permisos as $value) {\n Permisos::create(['id_perfil' => 1, 'id_funcionalidad' => $value->id]);\n }\n User::create(['name' => 'Admin', 'email' => 'Admin', 'password' => 'Admin', 'id_perfil' => 1,'usuario'=>1]);\n }\n }",
"protected function action_getUserMainDir() {}",
"function listarPerfilPrivilegios($url, $id = 0){\n\t\t$s = 'SELECT p.oid,p.nomb,prv.oid AS oidp,prv.id, prv.nomb AS bnom, COALESCE(upp.visi,0) AS visi\n\t\t\t\tFROM space.privilegio prv\n\t\t\t\tJOIN space.menu_accion ma ON prv.para=ma.url\n\t\t\t\tJOIN space.perfil_privilegio pp ON pp.oidpr=prv.oid\n\t\t\t\tJOIN space.perfil p ON p.oid=pp.oidp\n\t\t\t\tLEFT JOIN space.usuario_perfil up on p.oid=up.oidp\n\t\t\t\tLEFT JOIN space.usuario u ON u.id=up.oidu\n\t\t\t\tLEFT JOIN space.usuario_perfil_privilegio upp ON \n\t\t\t\tupp.oidu = u.id AND\n\t\t\t\tupp.oidp = p.oid AND\n\t\t\t\tupp.oidpr = prv.oid\n\t\t\t\tWHERE ma.url=\\'' . $url . '\\' AND u.id=' . $id;\n\n\t\t\n\t\t//echo $s;\n\t\t$obj = $this->DBSpace->consultar($s);\n\n\t\t$lst = array();\n\t\t$lstp = array();\n\t\tif($obj->cant == 0 ){\n\t\t\t$s = 'SELECT p.oid,p.nomb,prv.oid AS oidp,prv.id, prv.nomb AS bnom, prv.visi\n\t\t\t\tFROM space.privilegio prv\n\t\t\t\tJOIN space.menu_accion ma ON prv.para=ma.url\n\t\t\t\tJOIN space.perfil_privilegio pp ON pp.oidpr=prv.oid\n\t\t\t\tJOIN space.perfil p ON p.oid=pp.oidp\n\t\t\t\tWHERE ma.url=\\'' . $url . '\\'';\n\t\t\t$obj = $this->DBSpace->consultar($s);\n\t\t\tif($obj->cant == 0 )return $lst;\n\t\t}\n\t\t\n\t\t$perfil = $obj->rs[0]->nomb;\n\t\tforeach ($obj->rs as $clv => $v) {\n\t\t\tif($perfil != $v->nomb){\n\t\t\t\t$lst[$perfil] = $lstp;\n\t\t\t\t$perfil = $v->nomb;\n\t\t\t\t$lstp = null;\n\t\t\t}\n\t\t\t$lstp[] = array(\n\t\t\t\t'oidp' => $v->oid,\n\t\t\t\t'cod'=> $v->oidp,\n\t\t\t\t'nomb' => $v->bnom,\n\t\t\t\t'visi' => $v->visi\n\t\t\t);\n\t\t}\n\t\t$lst[$perfil] = $lstp;\n\t\t\n\t\treturn $lst;\n\t}",
"public function index()\n {\n $perfiles = Perfil::with('modulos')->get(); \n return $perfiles;\n }",
"public function getFiles() {}",
"public function getPermisos(){\n\t\t$sql = \"SELECT id_permiso, permiso FROM permisos WHERE id_permiso >1 ORDER BY id_permiso\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}",
"function getFiles(){\n\t\treturn $this->used_files;\n\t}",
"function &getFiles() {\n\t\tif (!isset($this->files)) {\n\t\t\t$res = db_query_params ('SELECT id,artifact_id,description,filename,filesize,' .\n\t\t\t\t\t'filetype,adddate,submitted_by,user_name,realname\n\t\t\t\t\t FROM artifact_file_user_vw WHERE artifact_id=$1',\n\t\t\t\t\t\tarray ($this->getID())) ;\n\t\t\t$rows=db_numrows($res);\n\t\t\tif ($rows > 0) {\n\t\t\t\tfor ($i=0; $i < $rows; $i++) {\n\t\t\t\t\t$this->files[$i]=new ArtifactFile($this,db_fetch_array($res));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->files=array();\n\t\t\t}\n\t\t}\n\t\treturn $this->files;\n\t}",
"public function getPermissionsFromFiles() : array\n {\n $path = base_path();\n $keys = [];\n $functions = [\n 'userCan',\n ];\n $pattern = // See http://regexr.com/392hu\n \"[^\\w|>]\" . // Must not have an alphanum or _ or > before real method\n \"(\" . implode('|', $functions) . \")\" . // Must start with one of the functions\n \"\\(\" . // Match opening parenthese\n \"[\\'\\\"]\" . // Match \" or '\n \"(\" . // Start a new group to match:\n // \"[a-zA-Z0-9_-]+\". // Must start with group\n \"([^\\1)]+)+\" . // Be followed by one or more items/keys\n \")\" . // Close group\n \"[\\'\\\"]\" . // Closing quote\n \"[\\),]\"; // Close parentheses or new parameter\n\n // Find all PHP + Twig files in the app folder, except for storage\n $finder = new Finder();\n $finder->in($path)->exclude('storage')->name('*.php')->name('*.twig')->files();\n\n /** @var \\Symfony\\Component\\Finder\\SplFileInfo $file */\n foreach ($finder as $file) {\n // Search the current file for the pattern\n if (preg_match_all(\"/$pattern/siU\", $file->getContents(), $matches)) {\n // Get all matches\n foreach ($matches[2] as $key) {\n $keys[] = $key;\n }\n }\n }\n\n // Remove duplicates\n $keys = array_unique($keys);\n\n $base_permissions = array_filter(explode(',', \\File::get(base_path('permissions.txt'))));\n\n return array_map('trim', array_merge($keys, $base_permissions));\n }",
"function _generateFilesList() {\n return array();\n }",
"public function getPerfilId()\n\t{\n\t\treturn $this->perfil_id;\n\t}",
"function perfil($acceso){\n\t$cad=opcion('',\"Selecciones...\");\n\t$acceso->objeto->ejecutarSql(sql(\"perfil\"));\n\twhile ($row=row($acceso))\n\t{\n\t\t$cad=$cad.opcion(trim($row[\"codigoperfil\"]),trim($row[\"nombreperfil\"]));\t\t\n\t}\t\t\t\t\t\t\t\t\n\treturn $cad;\t\n}",
"function getUSPageFiles() {\n\t$directory = \"../users/\";\n\t$pages = glob($directory . \"*.php\");\n\tforeach ($pages as $page){\n\t\t$fixed = str_replace('../users/','/'.$us_url_root.'users/',$page);\n\t\t$row[$fixed] = $fixed;\n\t}\n\treturn $row;\n}",
"function get_persona_perfil($id)\n {\n return $this->db->get_where('persona_perfil',array('id'=>$id))->row_array();\n }",
"function Array_Get_Listado_Perfiles($perfil)\n{\n\tif($perfil!=3)\n\t{\n\t\t$perfiles = consultar(\"SELECT * FROM `tb_perfiles` WHERE id_perfiles!=3 ORDER BY nivel\");\n\t}\n\telse\n\t{\n\t\t$perfiles = consultar(\"SELECT * FROM `tb_perfiles` ORDER BY nivel\");\t\n\t}\n\n\t$datos = array();\n\twhile ($valor = mysqli_fetch_array($perfiles)) {\n\t\t$id_perfiles = $valor['id_perfiles'];\n\t\t$nombre = $valor['nombre'];\n\t\t$descripcion = $valor['descripcion'];\n\t\t$nivel = $valor['nivel'];\n\t\t$vector = array(\n\t\t\t'id_perfiles'=>\"$id_perfiles\",\n\t\t\t'nombre' => \"$nombre\",\n\t\t\t'descripcion' => \"$descripcion\",\n\t\t\t'nivel' => \"$nivel\"\n\t\t\t);\n\t\tarray_push($datos, $vector);\n\t}\n\n\treturn $datos;\t\n}",
"public function showPerfil(){\n\n $idUsuario = Auth::id();\n $OTasignadas=ot_orden_trabajo::where('OT_USER_ENCARGADO',$idUsuario)->paginate(5);\n $OTcreadas=ot_orden_trabajo::where('OT_USER_ID_CREADOR',$idUsuario)->paginate(5);\n // $buscarReporte=rep_reporte::where('REP_USER_ID', $idUsuario)->get();\n // $imagenes=ft_fotos::all();\n $fotoPerfil=user::where('id',$idUsuario)->get();\n // dd($fotoPerfil);\n // $ordenDeTrabajo = DB::table('OT_ORDEN_TRABAJO')->get();\n\n return view('PERFIL.inicioPerfil', compact('OTasignadas','OTcreadas','fotoPerfil' ));\n }",
"function getUsers(){\n\t\t$this->users = $this->fileHandler->parseRows($this->userFile, '^', '|');\n\t\t$this->logMsg(SUCCESS, 'users generated');\n\t}",
"protected function getFiles(): array\n {\n return [];\n }",
"private function creaOptionPerfil(){\n $sql = \"SELECT id_perfil, nombre\n FROM sistema_integrado.core.perfil\n ORDER BY nombre;\";\n $respuesta = $this->ejecutarSelect($sql);\n $option = '';\n foreach ($respuesta as $temp) {\n $option .= '<option value=\"'.$temp['id_perfil'].'\">'.$temp['nombre'].'</option>';\n }\n return $option;\n\n }",
"public function files();",
"public function files();",
"public function files();",
"function array_codproduto_foto($con){\r\n\t$param_cadastro_dirfotoprod = param(\"CADASTRO\", \"DIRFOTOPROD\", $con);\r\n\t$arr_codproduto = array();\r\n\tif(is_dir($param_cadastro_dirfotoprod)){\r\n\t\t$dir = opendir($param_cadastro_dirfotoprod);\r\n\t\twhile($file = readdir($dir)){\r\n\t\t\t$file = strtolower($file);\r\n\t\t\tif(strpos($file, \".jpg\") !== FALSE){\r\n\t\t\t\t$arr_codproduto[] = str_replace(\".jpg\", \"\", $file);\r\n\t\t\t}\r\n\t\t\tif(is_dir($file)){\r\n\t\t\t\tif(is_numeric($file)){\r\n\t\t\t\t\t$arr_codproduto[] = $file;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $arr_codproduto;\r\n}",
"public function listUserPaths(): array\n {\n $path = storage_path('keys');\n if (\\is_dir($path)) {\n $directory = glob($path.'/*', GLOB_ONLYDIR);\n $usersPaths = [];\n foreach ($directory as $userPath) {\n $pathSlices = explode('/', $userPath);\n $usersPaths[] = end($pathSlices);\n }\n }\n\n return $usersPaths;\n }",
"public function getFileParams()\n {\n return [];\n }",
"public function permisos()\n {\n\n $conectar = parent::conexion();\n\n $sql = \"select * from permisos;\";\n\n $sql = $conectar->prepare($sql);\n $sql->execute();\n return $resultado = $sql->fetchAll();\n }",
"public function get_files()\n {\n }",
"public function asignar()\n {\n if (!file_exists($this->rutaBase)) {\n return null;\n }\n\n $archivos = scandir($this->rutaBase);\n\n if($archivos === false) {\n return null;\n }\n\n $archivosReales = array();\n\n foreach ($archivos as $indice => $valor) {\n if ($valor !== '.' && $valor !== '..') {\n $archivosReales[] = $valor;\n }\n }\n\n return $archivosReales;\n }",
"public function getPerfilByUserId($id)\n {\n return Perfil::where('user_id', $id)->first();\n }",
"function _file() {\n\t\t$path = implode('/', $this->params['pass']);\n\t\tif ( !empty($this->params['url']['ext']) ) {\n\t\t\t$path .= '.' . $this->params['url']['ext'];\n\t\t}\n\t\treturn array(MEDIA . $path, $path);\n\t}",
"public function getUploadedFiles() {}",
"public function index()\n {\n $user = Auth::user();\n\n if(!$user == null)\n {\n\n $id_opcion = 9010;\n $idperfil = auth()->user()->id_perfil;\n $emailclien = auth()->user()->email;\n $perfiles = Opcperfil::where('id_perfil', '=', $idperfil)\n ->where('id_opcion','=', $id_opcion)->get();\n \n $operfiles = Perfil::orderBy('id_perfil')\n ->paginate(5);\n // ->get();\n return view('perfiles.t_perfiles', compact('perfiles', 'operfiles'));\n } else {\n return Redirect::to('home'); \n }\n\n }",
"public function runShowPerfil($request)\n {\n $dataJson = $this->hoSegUsuariosModel->reCargarPerfiles();\n $this->json($dataJson);\n }",
"private function getPageFiles($p) {\n $files = array();\n $i=0;\n $p_of = $p->of();\n $p->of(false);\n foreach($p as $field => $item) {\n $f = $this->wire('fields')->get($field);\n // this is for nested repeaters\n if($item && $f && $f->type instanceof FieldTypeRepeater) {\n $repeaterValue = $p->{$f->name};\n if($repeaterValue) {\n if($repeaterValue instanceof Page) $repeaterValue = array($repeaterValue);\n foreach($repeaterValue as $subpage) {\n $files += $this->getPageFiles($subpage);\n }\n }\n }\n elseif($item && $f && $f->type instanceof FieldTypeFile) {\n foreach($item as $file) {\n $files[$p->id][$i]['filename'] = $file->filename;\n $files[$p->id][$i]['field'] = $f->name;\n if($file->isTemp()) $this->tempFiles[$i] = $file->filename;\n $i++;\n if($file instanceof Pageimage) {\n if($file->webp && file_exists($file->webp->filename)) {\n $files[$p->id][$i]['filename'] = $file->webp->filename;\n $files[$p->id][$i]['field'] = $f->name;\n $i++;\n }\n foreach($file->getVariations() as $var) {\n $files[$p->id][$i]['filename'] = $var->filename;\n $files[$p->id][$i]['field'] = $f->name;\n if($var->isTemp()) $this->tempFiles[$i] = $var->filename;\n $i++;\n\n if($var->webp && file_exists($var->webp->filename)) {\n $files[$p->id][$i]['filename'] = $var->webp->filename;\n $files[$p->id][$i]['field'] = $f->name;\n $i++;\n }\n }\n }\n }\n }\n }\n $p->of($p_of);\n return $files;\n }",
"public function getAllFilesRobot() {\n $sql = \"SELECT * FROM archivo_organizado\";\n $result = $this->_db->prepare($sql);\n $result->execute();\n\n if(!is_null($result->errorInfo()[2]))\n return array('error' => $result->errorInfo()[2]);\n else\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function getFilesCurrentUser(User $user)\n {\n }",
"protected function getFileList()\n\t\t{\n\t\t\t$dirname=opendir($this->ruta);\n\t\t\t$files=scandir($this->ruta);\n\t\t\tclosedir ($dirname);\t\n\t\t\t\n\t\t\treturn $files;\t\t\n\t\t}",
"function getFiles()\r\n\t{\r\n\t\treturn $this->files;\r\n\t}",
"public function getUserUploads() {\n\t\tif (!self::COOKIES_ENABLED) {\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t/* load form database */\n\t\t$uploads = array();\n\t\t$delete_code = $this->getDeleteCode();\n\t\t$result = $this->db->query('\n\t\t\tSELECT *\n\t\t\tFROM image\n\t\t\tWHERE delete_code = \"'.SQLite3::escapeString($delete_code).'\"\n\t\t\t\tAND gallery_id = \"\"\n\t\t\tORDER BY ROWID DESC');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_ASSOC)) {\n\t\t\t\t$uploads[$entry['id']] = $entry;\n\t\t\t}\n\t\t}\n\t\treturn $uploads;\n\t}",
"public function getUploadedFiles()\n {\n }",
"public function getFilePermissionsReturnsCorrectPermissionsForFilesNotOwnedByCurrentUser_dataProvider() {}",
"public function getFiles ();",
"private function set_files()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}",
"function getAllUsers(){\n //Recuperation des Donnees du Fichier sous forme de Chaine\n $file_content=file_get_contents(FILE_NAME);\n //Convertion de la chaine en Tableau\n $arr_users=json_decode($file_content,true);\n return $arr_users;\n }",
"public function getFiles(): array\n {\n return [$this->file];\n }",
"public function ListarPermisos() {\n $query = sprintf(\"select ID,NOMBRE FROM permisos\");\n $this->bd->DoQuery($query);\n\n return $this->bd->GetCount();\n }",
"public function files()\r\n {\r\n return $this->files;\r\n }",
"public function getUFs();",
"protected function getFiles() {\n\t\tif ($this->_files === null) {\n\t\t\t$files = array(\n\t\t\t\t\"test.txt\" => uniqid(),\n\t\t\t\t\"test2.txt\" => uniqid(),\n\t\t\t\t\"test3.txt\" => uniqid(),\n\t\t\t);\n\t\t\tforeach($files as $file => $content) {\n\t\t\t\tfile_put_contents($this->path.\"/\".$file,$content);\n\t\t\t\t$this->assertTrue(file_exists($this->path.\"/\".$file));\n\t\t\t}\n\t\t\t$this->_files = array_keys($files);\n\t\t}\n\t\treturn $this->_files;\n\t}",
"function getUsers(){\r\n\t\t// Reading names from file\r\n\t\t$newUserlist = array();\r\n\r\n\t\t$file=fopen($this->fPasswd,\"r\");\r\n\t\t$x=0;\r\n\t\tfor ($i=0; $line=fgets($file,4096); $i++) {\r\n\t\t\t$lineArr = explode(\":\",$line);\r\n\t\t\t$newUserlist[] = $lineArr[0];\r\n\t\t\t$x++;\r\n\t\t}\r\n\r\n\t\treturn $newUserlist;\r\n\t}",
"public function getResultsPublicFiles() {\n if ($this->results_public_files === null) {\n $this->loadTestcases();\n }\n return $this->results_public_files;\n }",
"private function getPersonalPhotos()\n {\n if (!isset($this->personalPhotos)) {\n $individual = $this->getIndividual();\n $immediateFamily = $this->getImmediateFamily();\n $individuals = array_merge(array($individual), $immediateFamily);\n $this->personalPhotos = $this->getCommonUtility()->getIndividualsPersonalPhotos($individuals);\n }\n \n return $this->personalPhotos;\n }"
] | [
"0.725103",
"0.69314086",
"0.67408234",
"0.6612475",
"0.6587419",
"0.6564555",
"0.6185635",
"0.616599",
"0.61365926",
"0.60886085",
"0.60865104",
"0.5995152",
"0.5976353",
"0.59704477",
"0.594228",
"0.59020215",
"0.58871555",
"0.58761585",
"0.58587563",
"0.5837018",
"0.58352435",
"0.58088416",
"0.5805694",
"0.58036476",
"0.5780599",
"0.5780319",
"0.5778879",
"0.5777682",
"0.5745569",
"0.5723826",
"0.5721322",
"0.5701499",
"0.5680048",
"0.5678294",
"0.56738937",
"0.56731784",
"0.5668962",
"0.5667356",
"0.566335",
"0.5662063",
"0.565611",
"0.5641842",
"0.56327426",
"0.5630189",
"0.5625589",
"0.5623614",
"0.5618345",
"0.56122446",
"0.56042916",
"0.5585303",
"0.55621564",
"0.55604815",
"0.5558371",
"0.5552641",
"0.5547737",
"0.5544241",
"0.55359495",
"0.553301",
"0.552824",
"0.55165845",
"0.5506195",
"0.5489358",
"0.5484367",
"0.54825234",
"0.54682624",
"0.5461694",
"0.5460893",
"0.5460023",
"0.5460023",
"0.5460023",
"0.54577565",
"0.54470336",
"0.5443525",
"0.54419535",
"0.5441445",
"0.54401004",
"0.5434245",
"0.5431864",
"0.54305166",
"0.5426702",
"0.5426629",
"0.5420543",
"0.5420526",
"0.5410742",
"0.5403023",
"0.5399125",
"0.53952146",
"0.5388856",
"0.5386513",
"0.53698033",
"0.53498924",
"0.5341403",
"0.53389555",
"0.53336585",
"0.5332153",
"0.5331656",
"0.5318197",
"0.53141093",
"0.5311252",
"0.53109396"
] | 0.6502526 | 6 |
Registra la sesion del usuario | function registrarSesion () {
if (!empty($this->id_usuario)) {
$this->salvar(['ultima_session' => 'current_timestamp',
'activo' => 1
]);
Helpers\Sesion::sessionLogin();
}
else return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function register(): void\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n }",
"public function register () : void\n {\n $this->getHttpReferer();\n\n // if the user is already logged in,\n // redirection to the previous page\n if ($this->session->exist(\"auth\")) {\n $url = $this->router->url(\"admin\");\n Url::redirect(301, $url);\n }\n\n $errors = []; // form errors\n $flash = null; // flash message\n\n $tableUser = new UserTable($this->connection);\n $tableRole = new RoleTable($this->connection);\n\n // form validator\n $validator = new RegisterValidator(\"en\", $_POST, $tableUser);\n\n // check that the form is valid and add the new user\n if ($validator->isSubmit()) {\n if ($validator->isValid()) {\n $role = $tableRole->find([\"name\" => \"author\"]);\n\n $user = new User();\n $user\n ->setUsername($_POST[\"username\"])\n ->setPassword($_POST[\"password\"])\n ->setSlug(str_replace(\" \", \"-\", $_POST[\"username\"]))\n ->setRole($role);\n\n $tableUser->createUser($user, $role);\n\n $this->session->setFlash(\"Congratulations {$user->getUsername()}, you are now registered\", \"success\", \"mt-5\");\n $this->session\n ->write(\"auth\", $user->getId())\n ->write(\"role\", $user->getRole());\n\n // set the token csrf\n if (!$this->session->exist(\"token\")) {\n $csrf = new Csrf($this->session);\n $csrf->setSessionToken(175, 658, 5);\n }\n\n $url = $this->router->url(\"admin\") . \"?user=1&create=1\";\n Url::redirect(301, $url);\n } else {\n $errors = $validator->getErrors();\n $errors[\"form\"] = true;\n }\n }\n\n // form\n $form = new RegisterForm($_POST, $errors);\n\n // url of the current page\n $url = $this->router->url(\"register\");\n\n // flash message\n if (array_key_exists(\"form\", $errors)) {\n $this->session->setFlash(\"The form contains errors\", \"danger\", \"mt-5\");\n $flash = $this->session->generateFlash();\n }\n\n $title = App::getInstance()\n ->setTitle(\"Register\")\n ->getTitle();\n\n $this->render(\"security.auth.register\", $this->router, $this->session, compact(\"form\", \"url\", \"title\", \"flash\"));\n }",
"public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t$data['User']['public_key'] = uniqid();\n\t\t\t$data['User']['role'] = \"user\";\n\t\t\t$data['User']['api_key'] = md5(microtime().rand());\n\t\t\tif ($this -> User -> save($data)) {\n\t\t\t\t$this -> Session -> setFlash(__('You have succesfully registered. Now you can login.'));\n\t\t\t\t$this -> redirect('/users/login');\n\t\t\t} else {\n\t\t\t\t$this -> Session -> setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t}\n\n\t\t$this -> set('title_for_layout', 'User Registration');\n\t}",
"private function _registerSession(Users $user)\n {\n $this->session->set(\n 'auth',\n [\n 'id' => $user->id,\n 'name' => $user->username,\n ]\n );\n }",
"private function _registerSession(Users $user)\n {\n $this->session->set('auth', array(\n 'id' => $user->id_usr,\n 'name' => $user->first_usr,\n 'level' => $user->level_usr_lvl,\n ));\n }",
"public function register()\n {\n $user = new UserManager;\n $request = new Request;\n $errorMessage = '';\n $method = $request->getMethode();\n if ($method == \"POST\") {\n $mailUser = $request->getPost('mail');\n $password = $request->getPost('mdp');\n $checkPassword = $request->getPost('cmdp');\n $userName = $request->getPost('userName');\n $userData = array();\n $userData['mail'] = $mailUser;\n $userData['pass'] = $password;\n $userData['userName'] = $userName;\n $userData['role'] = 'user';\n $mailUsed = $user->checkMail($mailUser);\n $userNameUsed = $user->checkUserName($userName);\n\n //if true register user on session \n if (!$mailUsed) {\n if (!$userNameUsed) {\n if ($password == $checkPassword) {\n if (filter_var($mailUser, FILTER_VALIDATE_EMAIL)) {\n $errorMessage = 'Vous êtes connecté avec succés ';\n $request->newSession(\"user\", $userData);\n $hashPassword = hash(\"sha256\", $password);\n $user->newUser($userName, $mailUser, $hashPassword);\n } else {\n $errorMessage = 'Le format de l\\'email est incorrect ';\n }\n } else {\n $errorMessage = 'Les mots de passe ne sont pas identique ';\n }\n } else {\n $errorMessage = 'Le nom d\\'utilisateur entré n\\'est pas disponible ';\n }\n } else {\n $errorMessage = 'Cette email est déja utilisé';\n }\n return $this->render('user/register.html.twig', ['errorMessage' => $errorMessage]);\n }\n return $this->render('user/register.html.twig', ['errorMessage' => $errorMessage]);\n }",
"public function registra_sesion()\r\n {\r\n $datos_usuario = array(\r\n 'nom_usuario' => $this->session->userdata('nom_usuario'),\r\n 'id_perfil' => $this->session->userdata('id_perfil')\r\n );\r\n // $insert_id = $this->db->insert_id();\r\n // $IdSesion = $this->db->insert_id();\r\n $this->db->insert('sesiones',$datos_usuario);\r\n // $this->db->insert(userdata($IdSesion));\r\n }",
"private static function register() {\n if ( !self::validatePost() ) {\n return;\n }\n\n if ( !self::validEmail($_POST['email']) ) {\n self::setError('E-Mail Adresse ist nicht gültig!<br>');\n return;\n }\n \n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $verified = md5($_POST['email'].$password.microtime(true));\n \n $result = Database::createUser($_POST['email'],$password,$verified);\n \n if ( $result === false || !is_numeric($result) ) {\n return;\n }\n \n $_SESSION['user']['id'] = $result;\n $_SESSION['user']['email'] = $_POST['email'];\n $_SESSION['user']['verified'] = $verified;\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n \n self::registerMail($verified);\n }",
"private function _registerSession(Pessoa $user) {\r\n $this->session->set('auth', array(\r\n 'codpes' => $user->codpes,\r\n 'nompes' => $user->nompes\r\n ));\r\n }",
"public function registrar_usuario($usuario, $clave, $email, $pintor) {\n /*Creamos la instancia del objeto. ya estamos conectados*/\n $bd = Db::getInstance();\n $sql = \"INSERT INTO login (usuario, clave, email, pintor) VALUES (:usuario, :clave, :email, :pintor)\";\n $stmt = $bd->prepare($sql);\n $stmt->execute([\":usuario\" => $usuario, \":clave\" => $clave, \":email\" => $email, \":pintor\" => $pintor]);\n }",
"private function _registerSession(Users $user)\n {\n $this->session->set('auth', array(\n 'id' => $user->getId(),\n 'email' => $user->email,\n 'admin' => $user->isAdmin(),\n 'data' => array(\n 'name' => $user->name,\n 'status' => $user->status,\n )\n ));\n\n $user->last_login = date('y-m-d H:i:s');\n if ($user->save() == false) {\n $this->flash->error(\"Could not save time.\");\n\n }\n\n $this->session->admin = $user->isAdmin();\n\n $this->session->curator = ($user->isAdmin() || $user->status > 1);\n }",
"public function register_user()\n {\n \n return true;\n \n }",
"public function registerAdminAction()\n {\n if($this->passwordFieldCheck($this->httpParameters['password'],$this->httpParameters['passwordCheck'],\n '/auth/first-time'))\n {\n try\n {\n //Instantiates a User\n $admin = new User([\n 'username' => $this->httpParameters['username'],\n 'email' => $this->httpParameters['email'],\n 'password' => $this->httpParameters['password'],\n 'role' => User::ROLE_ADMIN\n ]);\n\n //Inserts admin in database\n $this->manager->insertUser($admin);\n\n //Sets to the user the last id registered\n $admin->setId($this->manager->lastId());\n\n //Sets the $_SESSION user\n $_SESSION['user'] = $admin;\n\n $this->response->redirect('/admin',HttpResponse::ADMIN_REGISTERED);\n }\n catch(EntityAttributeException $e)\n {\n //Redirects to same page in case of typing error\n $this->response->redirect('/auth/first-time',$e->getMessage());\n }\n }\n }",
"public function agregarUsuario(){\n \n }",
"function registrar(){\n\n\t\t\t\n\t\t$sql = \"INSERT INTO USUARIOS (\n\t\t\tlogin,\n\t\t\tpassword,\n\t\t\tnombre,\n\t\t\tapellidos,\n\t\t\temail,\n\t\t\tDNI,\n\t\t\ttelefono,\n\t\t\tFechaNacimiento,\n\t\t\tfotopersonal,\n\t\t\tsexo\n\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'\".$this->login.\"',\n\t\t\t\t\t'\".$this->password.\"',\n\t\t\t\t\t'\".$this->nombre.\"',\n\t\t\t\t\t'\".$this->apellidos.\"',\n\t\t\t\t\t'\".$this->email.\"',\n\t\t\t\t\t'\".$this->DNI.\"',\n\t\t\t\t\t'\".$this->telefono.\"',\n\t\t\t\t\t'\".$this->FechaNacimiento.\"',\n\t\t\t\t\t'\".$this->fotopersonal.\"',\n\t\t\t\t\t'\".$this->sexo.\"'\n\n\t\t\t\t\t)\";\n\t\t\t\t\t\t\t\t\n\t\tif (!$this->mysqli->query($sql)) { //Si la sentencia sql no devuelve información\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\t\telse{\n\t\t\treturn 'Inserción realizada con éxito'; //si es correcta\n\t\t}\t\t\n\t}",
"public function register()\n {\n // //获取登录者信息\n // $user = session('email');\n // var_dump($user);die;\n // $user_id = DB::table('users')->where('email','=',$user)->select('id')->first();\n // $day_ling = strtotime(date(\"Y-m-d\"),time());\n // $day_twofour = $day_ling+60*60*24;\n // $this->app->singleton(News_Nums::class, function ($app) {\n // $nums = DB::table('news')->where([['created_at','>',$day_ling],['created_at','<',$day_twofour],['user_id','=',$user_id]])->pluck('data_id');\n // $nums = count(json_decode(json_encode($nums),true));\n // if($nums>0)\n // {\n // return view('Admin.common._header',['nums'=>$nums]);\n // }\n // return view('Admin.common._header',['nums'=>0]);\n // });\n // var_dump(session('email'));die;\n }",
"public function registerUser()\n {\n $sql = \"INSERT INTO user (username, password, email, firstname, lastname, address, date_of_birth, id_role)\n VALUES (\\\"\" . $this->getUsername().\"\\\", \\\"\" . $this->getPassword().\"\\\", \\\"\" . $this->getEmail().\"\\\",\\\"\" . $this->getFirstname().\"\\\", \\\"\" . $this->getLastname().\"\\\", \\\"\" . $this->getAddress().\"\\\", \\\"\" . $this->getDateOfBirth().\"\\\", \\\"\" . $this->getIdRole().\"\\\")\";\n $result = mysqli_query($this->_connection, $sql);\n if (!$result) {\n print \"Error: \" . $result . \"<br>\" . mysqli_error($this->_connection);\n } else {\n print \"erfolg\";\n\n }\n }",
"public function autentificacion($username,$password){\n $userService = new UsuariosServiceImp();\n //objeto de tipo usuario\n $usuario = new Usuarios();\n //llamdo al metodo definido en la capa de servicio\n $usuario = $userService->buscarPorUsernamePassword($username,$password);\n if ( is_object($usuario)){\n /*\n variable de sesion mediante variables locales\n \n $_SESSION['nombre'] = $usuario->getNombre();\n $_SESSION['correo'] = $usuario->getEmail();\n $_SESSION['id'] = $usuario->getId();\n */\n /* variable de sesion mediante un arreglo asociado\n */\n $_SESSION['miSesion'] = array();\n $_SESSION['miSesion']['nombre'] = $usuario->getNombre();\n $_SESSION['miSesion']['correo'] = $usuario->getEmail();\n $_SESSION['miSesion']['id'] = $usuario->getId();\n \n //echo \"<br>El usuario es valido\";\n header(\"location:../view/productos.class.php\");\n }else{\n //echo \"<br>Este usuario no esta registrado en la base de datos\";\n header(\"location:../view/formLogin.html\");\n }\n }",
"public function register()\n\t{\n\t\t// validamos que existan los campos\n\t\t$errors = $this->validate( $_POST, [\n\t\t\t'name|nombre' => 'required',\n\t\t\t'username|usuario' => 'required|unique:users',\n\t\t] );\n\n\t\tif( $errors )\n\t\t{\n\t\t\techo $this->errors();\n\t\t\treturn;\n\t\t}\n\t\t// validamos que sea una peticion por post\n\t\t$this->__post();\n\t\t// validamos si existe o le definimos un valor\n\t\t$_POST['password'] = isset( $_POST['password'] ) ? $_POST['password'] : '';\n\t\t$_POST['nameE'] = isset( $_POST['nameE'] ) ? $_POST['nameE'] : '';\n\t\t// realizamos la peticion al modelo de cerrar sesion\n\t\t$login = $this->auth->register( $_POST['name'], $_POST['username'], $_POST['password'], $_POST['nameE'], $_POST['role'] );\n\t\t// explotamos el resultado\n\t\t$login = explode(\"|\", $login);\n\t\t// validamos si se logueo o no\n\t\tif( $login[0] != 'logueado' )\n\t\t{\n\t\t\t// agregamos a las variables de error la respuesta del servidor\n\t\t\tarray_push($this->errors, $login[0]);\n\t\t\t// agregamos los errores obtenidos desde la peticion hecha al model\n\t\t\techo $this->errors();\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\t// retornamos a la vista de acceso cuando se satisfatorio el logueo\n\t\t\techo \"true|\".$login[1];\n\t\t}\n\t}",
"public function register() {\n\t\tif ($this->Session->check('Auth.User')) {\n\t\t\t$this->redirect('/');\n\t\t}\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$data = $this->request->data;\n\t\t\tif ($this->User->save($data)) {\n\t\t\t\t$this->Session->setFlash(\"User has been created.\", 'default', array(), 'register');\n\t\t\t\t$this->redirect('/login');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(\"This user couldn't created. Please try again.\");\n\t\t\t}\n\t\t} else\n\t\t\t$this->Session->delete('Message.register');\n\t}",
"public function storeSessionTokenInRegistry() {}",
"public function userregisterAction(Request $request)\n {\n // 1) build the form\n $usuario = new Usuarios();\n $form = $this->createForm(UsuariosType::class, $usuario);\n \n // 2) handle the submit (will only happen on POST)\n $form->handleRequest($request);\n if ($form->isSubmitted() && $form->isValid()) {\n \n // 3) Encode the password (you could also do this via Doctrine listener)\n $password = $this->get('security.password_encoder')->encodePassword($usuario, $usuario->getPlainPassword());\n $usuario->setPassword($password);\n \n // 4) save the User!\n $roles = [\"ROLE_ADMIN\"];\n $usuario->setRoles($roles);\n $DB = $this->getDoctrine()->getManager();\n $DB->persist($usuario);\n $DB->flush();\n \n // ... do any other work - like sending them an email, etc\n // maybe set a \"flash\" success message for the user\n \n return $this->redirectToRoute('usersexamen');\n }\n \n return $this->render('restauranteBundle:examen:userregister.html.twig',array('form' => $form->createView()));\n }",
"public function register (){\n $msg=\"\";\n if (isset($_POST[\"register\"])) {\n if ($this->isValidInput($_POST)){\n $firstName = $_POST[\"firstName\"];\n $lastName = $_POST[\"lastName\"];\n $email = $_POST[\"email\"];\n $password = password_hash(trim($_POST[\"password\"]), PASSWORD_BCRYPT);\n $age = $_POST[\"age\"];\n $isAdmin = null;\n //if user is not empty - the email from input already exists\n $user = UserDao::getByEmail($email);\n if($user != null){\n $msg .= \"Вече съществува потребител с този email\";\n $this->triggerError($msg, 'register.tpl');\n }\n else {\n $newUser = new User(null, $firstName,$lastName,$email,$password,$age,$isAdmin);\n UserDao::addUser($newUser);\n $_SESSION[\"user\"] = $newUser;\n header(\"Location: \".BASE_PATH);\n }\n }\n else {\n $msg .= \"Въведени са невалидни данни\";\n $this->triggerError($msg, 'register.tpl');\n }\n }\n else {\n $GLOBALS[\"smarty\"]->assign('isLoggedIn', isset($_SESSION[\"user\"]));\n $GLOBALS[\"smarty\"]->assign('msg', $msg);\n $GLOBALS[\"smarty\"]->display('register.tpl');\n }\n }",
"public function register_with_tyk() {\n\t\ttry {\n\t\t\t$tyk = new Tyk_API();\n\t\t\t$user_id = $tyk->post('/portal/developers', array(\n\t\t\t\t'email' => $this->user->user_email,\n\t\t\t\t));\n\t\t\t$this->set_tyk_id($user_id);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\ttrigger_error(sprintf('Could not register user for API: %s', $e->getMessage()), E_USER_WARNING);\n\t\t}\n\t}",
"function registerUser()\n\t{\n\t\t$userName = $_POST['userName'];\n\n\t\t# Verify that the user doesn't exist in the database\n\t\t$result = verifyUser($userName);\n\n\t\tif ($result['status'] == 'COMPLETE')\n\t\t{\n\t\t\t$email = $_POST['email'];\n\t\t\t$userFirstName = $_POST['userFirstName'];\n\t\t\t$userLastName = $_POST['userLastName'];\n\n\t\t\t$userPassword = encryptPassword();\n\n\t\t\t# Make the insertion of the new user to the Database\n\t\t\t$result = registerNewUser($userFirstName, $userLastName, $userName, $email, $userPassword);\n\n\t\t\t# Verify that the insertion was successful\n\t\t\tif ($result['status'] == 'COMPLETE')\n\t\t\t{\n\t\t\t\t# Starting the session\n\t\t\t\tstartSession($userFirstName, $userLastName, $userName);\n\t\t\t\techo json_encode($result);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Something went wrong while inserting the new user\n\t\t\t\tdie(json_encode($result));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Username already exists\n\t\t\tdie(json_encode($result));\n\t\t}\n\t}",
"public function addUsuario($usuario){\n $_SESSION[\"usuario\"]=$usuario;\n $this->usuario=$usuario;\n }",
"public function registrarUsuario()\n {\n $datos = array();\n\n //guardamos los datos del formulario en un array \n foreach ($_POST as $clave => $valor) {\n $datos[$clave] = $valor;\n }\n\n //añadimos una clave por defecto y generamos el ciu\n $datos['clave'] = hash('sha512', \"12345678\");\n $datos['ciu'] = self::generarCiu($datos['nombre'], $datos['apellidos'], $datos['fecha_nacimiento']);\n\n //insertamos los datos y mostramos un error en funcion de si ha habido error o no\n echo $this->Usuarios_model->registrarUsuario($datos) ? 1 : 0;\n }",
"public function register()\n {\n $name = $this->loginEntry->input('uname');\n $email = $this->loginEntry->input('email');\n $password = $this->commonFunction->generateHash($this->loginEntry->input('pass'));\n $this->userDetail->makeEntry($name, $email, $password);\n \n $info = $this->userDetail->getDetail($email, $password);\n \n $this->commonFunction->setSession($info->id, $info->user_name);\n \n return redirect('/dashboard');\n }",
"public function salvar(){\n \n\t\t/*\n\t\t\tReceber dados vindos do formulario.\n\t\t*/\n\n\t\t$login = $this->post(\"login\");\n\t\t$senha = $this->post(\"senha\");\n\t\t$senha = md5($senha);\n\t\t$tipo = 2;\n\n\t\t/*\n\t\t\tInserindo dados na tabela usuário.\n\t\t*/\n\t\t$campos = \"(login,senha,tipo)\";\t\t\n\t\t$valores = \"('\".$login.\"','\".$senha.\"','\".$tipo.\"')\";\t\t\n\t\t$tabela = \"usuarios\";\n\t\t\n\t\t$this->insert( $tabela, $campos, $valores );\t\n\t\t\n\t}",
"public function register(Request $request)\n {\n\n\n\n $this->validator($request->all())->validate();\n\n event(new Registered($user = $this->create($request->all())));\n\n\n /*pegar email */\n\n $getID = DB::table('login')\n ->where('email', '=', $request->email)\n ->where('cpf', '=', $request->cpf)\n// ->orderBy('quantity', 'asc')\n ->first();\n\n\n// return $getID->id;\n\n// return $request->simulacao_id\n//\n//porrag;\n\n\n try{\n //Find the user object from model if it exists\n $simulacao= Simulacao::findOrFail($request->simulacao_id);\n\n //$request contain your post data sent from your edit from\n //$user is an object which contains the column names of your table\n\n //Set user object attributes\n $simulacao->user_id = $getID->id;\n\n\n // Save/update user.\n // This will will update your the row in ur db.\n $simulacao->save();\n\n return view('api.ativacao', ['name' => $request->email, 'params' => $request->all()]);\n }\n catch(ModelNotFoundException $err){\n //Show error page\n }\n\n\n\n\n return redirect()->intended('index');\n// return redirect()->back()->withInput();\n // pegar o id do usuario e inserir na table simulacao_id\n\n /**///simulacao_id e editar\n\n\n }",
"function crearSesion($usuario){\r\n\t\tsession_id($usuario['DNI']);\r\n\t\t//Creo la sesión.\r\n\t\tsession_start();\r\n\t\t//Almacenamos todos los datos de la sesión.\r\n\t\t$_SESSION['idUsuario'] = $usuario['idUsuario'];\r\n\t\t$_SESSION['Usuario'] = $usuario['Usuario'];\r\n\t\t$_SESSION['Password'] = $usuario['Password'];\r\n\t\t$_SESSION['Nombre'] = $usuario['Nombre'];\r\n\t\t$_SESSION['Apellido1'] = $usuario['Apellido1'];\r\n\t\t$_SESSION['Apellido2'] = $usuario['Apellido2'];\r\n\t\t$_SESSION['Telefono'] = $usuario['Telefono'];\r\n\t\t$_SESSION['Email'] = $usuario['Email'];\r\n\t\t$_SESSION['CP'] = $usuario['CP'];\r\n\t\t$_SESSION['Provincia'] = $usuario['Provincia'];\r\n\t\t$_SESSION['ComunidadAutonoma'] = $usuario['ComunidadAutonoma'];\r\n\t\t$_SESSION['Rol'] = $usuario['Rol'];\r\n\t\t$_SESSION['DNI'] = $usuario['DNI'];\r\n\t}",
"public function register() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection();\n\t\t\n $data = (\"INSERT INTO user (username,password,first_name,\n last_name,dob,address,postcode,email)\n VALUES ('{$this->_username}',\n '{$this->_sha1}',\n '{$this->_first_name}',\n '{$this->_last_name}',\n '{$this->_dob}',\n '{$this->_address}',\n '{$this->_postcode}',\n '{$this->_email}')\");\n\t\t\t\t\t\t \n\t\t\t$result = $mysqli->query($data);\n if ( $mysqli->affected_rows < 1)\n // checks if data has been succesfully inputed\n $this->_errors[] = 'could not process form';\n }",
"public function un_usuario_registrado_puede_iniciar_sesion()\n {\n //\\Artisan::call('db:seed', ['--class' => 'TestsDatabaseSeeder']);\n $user = \\App\\User::find(1);\n\n $this->browse(function (Browser $browser) use ($user) {\n $browser->visit('/')\n ->assertPathIs('/login')\n ->type('login-username', 'admin')\n ->type('login-password', '123')\n ->press('#btn-login')\n ->pause(1000)\n ->assertAuthenticated()\n ;\n });\n }",
"public function saveUsuario(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_usuario SET usuario = \"%s\" password = \"%s\" WHERE usuario_id = %d',\n $this->usuario,\n $this->password,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_usuario ( usuario, password) VALUES (\"%s\", \"%s\")',\n $this->usuario,\n $this->password );\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }",
"public function saveUser($nome,$email,$senha){\n \t$id = time();\n $nome = parent::escapeString($nome);\n $senha = md5(parent::escapeString($senha));\n $email = parent::escapeString($email);\n \t//fazer uma validação para ver se o usuario já não está cad\n \t$sql = \"insert into `usuarios` ( `id`,`nome`, `email`, `senha` ) values ('$id','$nome', '$email', '$senha')\"; \n return parent::executaQuery($sql);\n }",
"private function register()\n {\n $s = 'INSERT INTO `users` (`project`, `authService`, `authServiceID`, `vcs_login`, `email`, `anonymousIdent`, `conf`, `last_connect`) VALUES (\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\", now())';\n $params = array($this->project, $this->authService, $this->authServiceID, $this->vcsLogin, $this->email, $this->anonymousIdent, json_encode($this->defaultConf));\n\n $this->conn->query($s, $params);\n return $this->conn->insert_id();\n }",
"function agregar($nombre,$correo,$usuario,$rol,$zonah,$estado,$psw)\n {\n $Valores = \"'\".$usuario.\"','\".$psw.\"','\".$nombre.\"','\".$correo.\"',\".$estado.\",\".$zonah.\",\".$rol;\n $this->Insertar(\"usuarios\",\"usuario,password,nombre,correo,activo,zonashorarias_id,roles_id\",$Valores);\n }",
"function registrarUsuario($nombre,$apellidos,$email,$edad,$puntos,$passW)\n {\n $consulta =\"INSERT INTO usuario (nombre,apellidos,email,edad,puntos,password) VALUES ('$nombre','$apellidos','$email',$edad,$puntos,'$passW')\";\n if($this->conexion->query($consulta))\n {\n \n }else{ \n echo \"Falló la creación de la tabla: (\" . $this->conexion->errno . \")// \" . $this->conexion->error.\"<br>\";\n }\n }",
"public function registerUser(){\r\n\t\t$name = $_POST['register_name'];\r\n\t\t$email = $_POST['register_email'];\r\n\t\t$password = $_POST['register_password'];\r\n\r\n\t\t$sql = \"INSERT INTO users values (null,?,?,?)\";\r\n\t\t$query = $this->db->prepare($sql);\r\n\t\t$query->execute([$name,$email,$password]);\r\n\t\t//ako je registracija uspela pojavice se div u formu sa ispisom notifikacije!!!\r\n\t\tif ($query) {\r\n\t\t\t$this->register_result=true;\r\n\t\t}\r\n\t}",
"public function registerAction() {\n\n $user = new User();\n\n // データを保存し、エラーをチェックする\n// $success = $user->save($this->request->getPost(), array('name', 'email'));\n\n $user->findFirst($this->request->getPost());\n\n if ($success) {\n echo \"Thanks for registering!\";\n } else {\n echo \"Sorry, the following problems were generated: \";\n foreach ($user->getMessages() as $message) {\n echo $message->getMessage(), \"<br/>\";\n }\n }\n\n $this->view->disable();\n\n }",
"function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level', 16 => 'store_owner');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel, 16 => 1);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n }",
"public function registerUser()\n {\t\n\t\t/**\n\t\t * Our UserModel will return an error \n\t\t * if the email already exists, \n\t\t * or if the passwords do not match\n\t\t */\n\t\ttry{\n\t\t$user = new UserModel();\n\t\t$user->name = Input::get('name');\n\t\t$user->email = Input::get('email');\n\t\t$user->password = Input::get('password');\n\t\t$user->password_confirmation = Input::get('password_confirmation');\n\t\t$user->save();\t\n\t\t$this->setToken($user);\n\t\treturn $this->sendResponse('You have been registered and are logged in');\n\t\t}\n\t\tcatch(Exeption $e){\n\t\t\treturn $this->sendResponse(false, $e->getMessage());\n\n\t\t}\n }",
"function registerUser ($username, $email, $pass, $nik, $isuser, $isspv, $isadmin)\n\t{\n\t\tif (!$this->isUserExist($email)) {\n\t\t\t\n\t\t\t\n\t\t\t$password = md5($pass);\n\t\t\t$apikey = $this->generateApiKey();\n\t\t\t$stmt = $this->con->prepare(\"INSERT INTO users (username, email, password, nik, apikey, isuser, isspv, isadmin) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\");\n\t\t\t$stmt->bind_param(\"sssssiii\", $username, $email, $password, $nik, $apikey, $isuser, $isspv, $isadmin);\n\t\t\tif ($stmt->execute())\n\t\t\treturn USER_CREATED;\n\t\t\treturn USER_CREATION_FAILED;\n\t\t}\n\t\treturn USER_EXIST;\n\t\n\t\t\n\t}",
"public function registerUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n $password_repeat = $request->input('password_repeat');\n\n\n // Check email\n if (!$email) {\n $this->showRegisterForm(['Please enter email']);\n }\n // Check password\n if(!$password){\n $this->showRegisterForm(['Please enter password']);\n }\n if (!$password || !$password_repeat || $password != $password_repeat) {\n $this->showRegisterForm(['Passwords do not match']);\n }\n\n // Check user exist\n if ($this->getUser($email)) {\n $this->showRegisterForm(['User already isset']);\n }\n\n // Save user to DB\n $user = new User();\n $user->email = $email;\n $user->password = md5($password);\n $user->rights = 20;\n\n // Check save process\n if (!$user->save()) {\n $this->showRegisterForm(['Something goes wrong']);\n }\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_register']);\n }",
"public function registrar_usuario($nombre,$apellido,$genero,$fecha_nacimiento,$correo,$imagen,$contraseña, $type){\n \n \n $nodo_usuario = new Usuario();\n $mysql = new Conexion();\n\n $nodo_usuario->nombre = $nombre;\n $nodo_usuario->apellido = $apellido; \n $nodo_usuario->genero = $genero;\n $nodo_usuario->fecha_nacimiento = $fecha_nacimiento;\n $nodo_usuario->correo = $correo; \n $nodo_usuario->imagen = $imagen; \n $nodo_usuario->contraseña = $contraseña;\n $nodo_usuario->type = $type;\n \n /* aun no esta funcionando esto\n\t $nodo_usuario->nick = $nik;\n\t $nodo_usuario->ciudad_origen = $orig;\n\t $nodo_usuario->lugar_recidencia = $reci; \n\t $nodo_usuario->sitio_web = $web; \n\t $nodo_usuario->facebook = $face;\n\t $nodo_usuario->twitter = $twit;\n\t $nodo_usuario->youtube = $you;\n */ \n \n ModelUsuarios::crearNodoUsuario($nodo_usuario); //crea el nodo del Usuario \n\n $idneo4j = $nodo_usuario->id; //obtengo el id del nodo creado\n \n\n /*\n * Registro de usuario en Mysql\n * \"la url de facebook es importante y no se esta capturando\"\n */\n \n $sql = \"INSERT INTO usuario (\n email,\n idfacebook,\n idneo4j,\n password\n )VALUES(\n '\".$correo.\"',\n '12345678',\n '\".$idneo4j.\"',\n '\".$contraseña.\"'\n );\";\n \n return $mysql->ejecutar_query($sql); \n \n \n \n \n }",
"function registrar(){\r\n\r\n include('config.php');\r\n\r\n date_default_timezone_set('America/Cuiaba');\r\n $pdo = new PDO('mysql:host='.HOST.';dbname='.DATABASE, USUARIO, SENHA);\r\n\r\n $cursos = array('Engenharia da Computação', 'Engenharia de Controle e Automação', 'Engenharia de Minas', 'Engenharia de Trasportes', 'Engenharia Quimica');\r\n \r\n $nome = $_POST['nome'];\r\n $email = $_POST['email'];\r\n $rga = $_POST['rga'];\r\n $semestre = $_POST['semestre']; \r\n $data = date('Y-m-d H:i:s');\r\n $senha = $_POST['senha'];\r\n $confirmaSenha = $_POST['confirmaSenha'];\r\n $curso = '';\r\n \r\n for($i = 1; $i <= 5; $i++){ //verificando qual o curso pelo rga\r\n\r\n if($rga['9'] == $i)\r\n $curso = $cursos[$i];\r\n \r\n \r\n }\r\n \r\n\r\n $sql = $pdo->prepare(\"INSERT INTO `tabela_estudantes` VALUES (null,?,?,?,?,?,?,?)\"); //inserirndo na tabela vendas\r\n\r\n $sql->execute(array($nome, $senha, $data, $email, $curso, $semestre, $rga));\r\n\r\n echo '<h6 style=\"color: rgb(255, 255, 255);\">Usuario registrado com sucesso!</h6>';\r\n\r\n }",
"public function store()\n\t {\n\t\t User::register([\n\t\t\t\t'username' => 'Jefdsasfrey',\n\t\t\t\t'email' => '[email protected]',\n\t\t\t\t'password' => bcrypt('pass')\n\t\t ]);\n\n\t\t // send them a welcome email\n\n\t\t // monitor campaign for newsletter\n\n\t\t // Schedule a follow up email\n\n\t\t // update stats \n\t }",
"function register()\n\t\t{\n\n\t\t if(!empty($_POST['email']) && !empty($_POST['password'])&& !empty($_POST['nombre'])){\n\n\t\t $email=filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n\t\t $password=filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\t\t $name=filter_input(INPUT_POST, 'nombre', FILTER_SANITIZE_STRING);\n\t\t $new_user=$this->model->register($email,$password,$name);\n\n\t\t if ($new_user == TRUE){ \n\t\t // cap a la pàgina principal\n\t\t header('Location:'.APP_W.'home');\n\t\t }\n\t\t else{\n\t\t // no hi és l'usuari, cal registrar\n\t\t header('Location:'.APP_W.'register');\n\t\t }\n\t\t \t\t}\n\t\t}",
"public function register(){\n\t\t//Better to be implemented through db table\n\t\t$userRole = array('Job Seeker'=>'Job Seeker', 'Employer'=>'Employer');\n\t\t$this->set('userRole',$userRole);\n\n\t\tif($this->request->is('post')){\n\t\t\t$this->User->create();\n\t\t\t\n\t\t\tif($this->User->save($this->request->data)){\n\t\t\t\t$this->Session->setFlash(__('You are now registered and may login'));\n\t\t\t\treturn $this->redirect(array('controller'=>'jobs','action'=>'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Unable to create new user'));\n\n\t\t\t}\n\t\t}\n\t}",
"public function register()\n {\n echo 'User Registered';\n }",
"private function registrarLocalmente()\n\t{\n\t\t$conexionBd = new ConectorBaseDatos();\n\t\t$conexionBd->Sentencia = sprintf(\"INSERT UsuarioFacebook (IdFacebook, DatosFacebook, ValidadoPor, FbAccessToken) VALUES (%s, %s, NULL, %s)\",\n\t\t$conexionBd->Escapar($this->IdFacebook),\n\t\t$conexionBd->Escapar(addslashes(serialize($this->DatosFacebook))),\n\t\t$conexionBd->Escapar($this->accessToken)\n\t\t);\n\t\t$conexionBd->EjecutarComando();\n\t\t$conexionBd->Desconectar();\n\t}",
"public function registerAction(Request $request){\n\n $em = $this->getDoctrine()->getManager();\n /** @var $dispatcher \\Symfony\\Component\\EventDispatcher\\EventDispatcherInterface */\n $dispatcher = $this->get('event_dispatcher');\n\n $user = new UsuarioEntity();\n $user->setLastModified(new \\DateTime());\n \n if ($request->getMethod() == 'GET') {\n //Usar getClientIp.\n $content = @file_get_contents('http://www.geoplugin.net/php.gp?ip=212.128.152.1');\n if (isset($http_response_header) && strpos($http_response_header[0],'200')){\n $meta = unserialize($content);\n //Obtenemos el pais.\n $defaultCountry = $em->getRepository('juzzUsuariosBundle:Paises')->findOneBy(array('iso' => $meta['geoplugin_countryCode']));\n //Establecemos origen por defecto.\n $user->setOrigen($defaultCountry);\n }\n }\n \n $form = $this->createForm(new UsuarioRegistroType(), $user);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n \n $event = new RegistrationEvent($form, $user);\n $dispatcher->dispatch(UsuariosBundleEvents::REGISTRATION_SUCCESS, $event);\n\n //Necesitamos saber el algoritmo de codificación utilizado en la contraseña.\n //Para poderlo aplicar a nuestros usuarios.\n $encoder = $this->get('security.encoder_factory')->getEncoder($user);\n $password = $encoder->encodePassword($user->getPlainPassword(), $user->getSalt());\n $user->setPassword($password);\n $user->setIngreso(new \\DateTime());\n\n //Establecemos politica de comentarios por defecto.\n $policy = $em->getRepository('juzzCommentsBundle:PoliticaComentarios')->find(1);\n $user->setPoliticaComentarios($policy);\n\n if (null === $response = $event->getResponse()) {\n $user->setActivo(1);\n \n $translated = $this->get('translator')->trans('registration.flash.user_created',array(\n '%username%' => $user->getFullName()\n ),'juzzUsuariosBundle');\n // Crear un mensaje flash para notificar al usuario que se ha registrado correctamente\n $this->get('ras_flash_alert.alert_reporter')->addSuccess($translated);\n //Notificamos que la cuenta ha sido activada.\n $event = new RegistrationConfirmedEvent($user);\n $dispatcher->dispatch(UsuariosBundleEvents::REGISTRATION_CONFIRM, $event);\n if (null === $response = $event->getResponse()) {\n $response = $this->redirect($this->generateUrl('confirmed'));\n }\n }\n \n // Guardar el nuevo usuario en la base de datos\n $em->persist($user);\n $em->flush();\n \n return $response;\n\n }\n\n return $this->render('juzzUsuariosBundle:Accounts:registration/register.html.twig',array(\n 'form' => $form->createView()\n ));\n }",
"public function registerAction(Request $request){\n //for the view\n $params = array(\"title\" => _(\"Sign up\"), \"errors\" => array());\n\n $params['username'] = \"\";\n $params['email'] = \"\";\n\n //handle register form\n if ($request->isMethod('post')){\n\n $username = $request->input('username');\n $params['username'] = $username;\n $email = $request->input('email');\n $params['email'] = $email;\n $password = $request->input('password');\n $password_bis = $request->input('password_bis');\n\n //validation\n $validator = new CustomValidator();\n\n $validator->validateUsername($username);\n $validator->validateUniqueUsername($username);\n $validator->validateEmail($email);\n $validator->validateUniqueEmail($email);\n $validator->validatePassword($password);\n $validator->validatePasswordBis($password_bis, $password);\n\n if ($validator->isValid()){\n //hydrate user obj\n $securityHelper = new SH();\n $user = new User();\n \n $user->setNewUuid();\n $user->setUsername( $username );\n $user->setEmail( $email );\n $user->setEmailValidated(false);\n $user->setRole( \"user\" );\n $user->setSalt( SH::randomString() );\n $user->setToken( SH::randomString() );\n $user->setSiteLanguage( 'en' );\n $user->setActive( true );\n\n $hashedPassword = $securityHelper->hashPassword( $password, $user->getSalt() );\n \n $user->setPassword( $hashedPassword );\n// $user->setIpAtRegistration( $_SERVER['REMOTE_ADDR'] );\n $user->setIpAtRegistration($request->ip());\n $user->setDateCreated( time() );\n $user->setDateModified( time() );\n\n //save it\n $userManager = new UserManager();\n $userManager->save($user);\n// @TODO: MAILER\n// send email confirmation message\n// $mailer = new Mailer();\n//\n// $mailerResult = $mailer->sendRegistrationConfirmation($user);\n\n //log user in right now (will redirect home)\n $this->logUser($request, $user);\n// $this->logUser($request, $user);\n $json = new JsonResponse();\n $json->setData(array(\"redirectTo\" => Route('graph')));\n $json->send();\n }\n //not valid\n else {\n $errors = $validator->getErrors();\n $params[\"errors\"] = $errors;\n return response()->json([\n 'error' => $errors\n ],400);\n }\n\n }\n return view('auth.register',['params'=> $params]);\n// $view = new View(\"register.php\", $params);\n// $view->setLayout(\"../View/layouts/modal.php\");\n// $view->send(true);\n }",
"private function logInSUUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(1646);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $this->user->setOpRoles('cclavoisier01.in2p3.fr');\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }",
"public function doRegister()\n {\n\n //check if all the fields are filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));\n exit;\n }\n\n //create the user entity based on filled data\n $userEntity = new User(Request::postData());\n\n //check if the user exists and get it as entity if exists\n if ($this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username/email already exists!\", \"type\" => \"error\")));\n exit;\n }\n\n //add the user into DB\n $this->repository->addUser($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"Your account has been created!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }",
"function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n unset($DBA, $rs, $fields, $fieldvals);\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'id');\n $idfields = array(0 => 'username');\n $idvals = array(0 => $this->Username);\n $rs = $DBA->selectQuery(DBUSERTABLE, $fields, $idfields, $idvals);\n if (!isset($rs[2]))\n {\n while ($res = mysql_fetch_array($rs[0]))\n {\n $this->setUserVar('ID', $res['id']);\n }\n }\n unset($DBA, $rs, $fields, $idfields, $idvals);\n }",
"function register_user() {\n\t\tglobal $ID, $lang, $conf, $auth, $yubikey_associations;\n\n\t\tif(!$auth->canDo('addUser')) return false;\n\n\t\t$_POST['login'] = $_POST['nickname'];\n\n\t\t// clean username\n\t\t$_POST['login'] = preg_replace('/.*:/','',$_POST['login']);\n\t\t$_POST['login'] = cleanID($_POST['login']);\n\t\t// clean fullname and email\n\t\t$_POST['fullname'] = trim(preg_replace('/[\\x00-\\x1f:<>&%,;]+/','',$_POST['fullname']));\n\t\t$_POST['email'] = trim(preg_replace('/[\\x00-\\x1f:<>&%,;]+/','',$_POST['email']));\n\n\t\tif (empty($_POST['login']) || empty($_POST['fullname']) || empty($_POST['email'])) {\n\t\t\tmsg($lang['regmissing'], -1);\n\t\t\treturn false;\n\t\t} else if (!mail_isvalid($_POST['email'])) {\n\t\t\tmsg($lang['regbadmail'], -1);\n\t\t\treturn false;\n\t\t}\n\n\t\t// okay try to create the user\n\t\tif (!$auth->createUser($_POST['login'], auth_pwgen(), $_POST['fullname'], $_POST['email'])) {\n\t\t\tmsg($lang['reguexists'], -1);\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = $_POST['login'];\n\t\t$yubikey = $_SERVER['REMOTE_USER'];\n\n\t\t// if our yubikey id is based on a non-registered user, we need to chunk off the \"yubikey:\"\n\t\t// part of it\n\t\tif (preg_match('!^yubikey:!', $yubikey)) {\n\t\t\t$yubikey = substr($yubikey, 8);\n\t\t}\n\n\t\t// we update the YubiKey associations array\n\t\t$this->register_yubikey_association($user, $yubikey);\n\n\t\t$this->update_session($user);\n\n\t\t// account created, everything OK\n\t\t$this->_redirect(wl($ID));\n\t}",
"public function action_register(){\n\t\t\n\t\t$user = CurUser::get();\n\t\t\n\t\tif($user->save($_POST, User_Model::SAVE_REGISTER)){\n\t\t\t$user->login($user->{CurUser::LOGIN_FIELD}, $_POST['password']);\n\t\t\tApp::redirect('user/profile/greeting');\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\tMessenger::get()->addError('При регистрации возникли ошибки:', $user->getError());\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function Save()\r\n\t\t{\r\n\t\t\t$db = new Db();\r\n\t\t\t$sql = \"INSERT INTO tbl_users (naam, voornaam, email, wachtwoord)\r\n\t\t\tVALUES ('\".$db->conn->real_escape_string($this->m_sName).\"',\r\n\t\t\t\t\t'\".$db->conn->real_escape_string($this->m_sFirstname).\"',\r\n\t\t\t\t\t'\".$db->conn->real_escape_string($this->m_sEmail).\"',\r\n\t\t\t\t\t'\".$db->conn->real_escape_string($this->m_sPassword).\"'\r\n\t\t\t)\";\r\n\t\t\t$db->conn->query($sql);\r\n\r\n\t\t\t//user_id van de geregistreerde gebruiker in de session variabele opslaan\r\n\t\t\t$user_id = $db->conn->insert_id;\r\n\t\t\t$_SESSION['user_id'] = $user_id;\r\n\t\t}",
"public function registerUserAction() {\n\t\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\t\tif ($request->isPost()) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// get the json raw data\n\t\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t\t$http_raw_post_data = '';\n\t\t\t\t\n\t\t\t\twhile (!feof($handle)) {\n\t\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t\t}\n\t\t\t\tfclose($handle); \n\t\t\t\t\n\t\t\t\t// convert it to a php array\n\t\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\n\t\t\t\t//echo json_encode($json_data);\n\t\t\t\t\n\t\t\t\tif (is_array($json_data)) {\n\t\t\t\t\t// convert it back to json\n\t\t\t\t\t\n\t\t\t\t\t// write the user back to database\n\t\t\t\t\t$registered = Application_Model_User::registerUser($json_data);\n\t\t\t\t\t\n\t\t\t\t\tif($registered) {\n\t\t\t\t\t\techo json_encode($registered);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\techo 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t}",
"public function store()\n\t{\n\t\t$input = array_add(Input::get(), 'userId', Auth::id());\n\t\t$this->condoRegistrationValidation->validate( Input::all() );\n\t\t$this->execute(CondoRegisterCommand::class, $input);\n\t\treturn $this->sendJsonMessage('success',200);\n\t}",
"public function registerAction(Request $request)\n {\n $encoder = new MessageDigestPasswordEncoder();\n $em = $this->get('doctrine.orm.default_entity_manager');\n $previous_url = $request->headers->get('referer');\n $data = $request->request->all();\n if ($request->getMethod() === 'POST') {\n $user = $this->getDoctrine()->getRepository('iFlairLetsBonusAdminBundle:FrontUser')->findOneBy(\n ['email' => $data['email'], 'loginType' => 1]\n );\n if (null === $user) {\n $user = new FrontUser();\n $userbirthdate = $data['userBirthDate']['year'].'-'.$data['userBirthDate']['month'].'-'.$data['userBirthDate']['day'];\n $password = $encoder->encodePassword($data['password']['first'], $user->getSalt());\n $user->setName($data['name']);\n $user->setSurname($data['surname']);\n $user->setEmail($data['email']);\n $user->setUsername($data['email']);\n $user->setPassword($password);\n $user->setUserBirthDate(new \\DateTime($userbirthdate));\n $user->setUserGender($data['userGender']);\n $user->setCity($data['city']);\n $user->setIsShoppiday(1);\n $user->setApiFlag(0);\n $user->setLoginType(1);\n $user->setFacebookId(0);\n $user->setGoogleId(0);\n $user->addRole(FrontUser::ROLE_DEFAULT);\n $user->setCreated(new \\Datetime());\n $user->setModified(new \\Datetime());\n $user->setUserCreateDate(new \\Datetime());\n $user->setConfirmationToken($this->get('fos_user.util.token_generator')->generateToken());\n $em->persist($user);\n $em->flush();\n\n $message = \\Swift_Message::newInstance()\n ->setSubject('Confirma tu cuenta y empieza a ahorrar')\n ->setFrom($this->container->getParameter('from_send_email_id'))\n ->setTo($data['email'])\n ->setBody(\n $this->renderView(\n 'iFlairLetsBonusFrontBundle:Email:registere_success.html.twig',\n [\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'gender' => $data['userGender'],\n 'token' => $user->getConfirmationToken(),\n ]\n ),\n 'text/html'\n );\n\n\n $this->get('mailer')->send($message);\n $request->getSession()\n ->getFlashBag()\n ->add(\n 'success',\n '¡Bienvenido a Shoppiday! Confirma tu registro en el e-mail que te hemos enviado'\n );\n } elseif ($user->isToImport()) {\n $this->sendEmailRecoverPassword($user, $request);\n } else {\n $request->getSession()\n ->getFlashBag()\n ->add('notice', 'Este email ya ha sido registrado');\n }\n\n return $this->redirect($previous_url);\n }\n }",
"public function registerAction() {\n $user = new User();\n // Create new User Form.\n $form = $this->formFactory->create(UserType::class, $user);\n // Handle Request.\n $form->handleRequest($this->request);\n\n // Check if the information is valid, when form is submitted.\n if ($form->isSubmitted() && $form->isValid()) {\n $plainPassword = $form->get('password')->getData();\n $encoder = $this->container->get('security.password_encoder');\n $encoded = $encoder->encodePassword($user, $plainPassword);\n\n // Set encoded password.\n $user->setPassword($encoded);\n\n // Tell the database to watch for this object.\n $this->em->persist($user);\n\n // Insert object into database. (Create user row)\n $this->em->flush();\n\n\n return new RedirectResponse($this->router->generate('register_success', array(\n )));\n }\n\n return new Response($this->templating->render('security/register.html.twig', [\n 'form' => $form->createView()\n ]));\n }",
"public function addToSession() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n $s->$key = $this->getId();\n if ($s->$key === null) {\n Log::warn(\"Adding null user ID to session\");\n }\n $this->setAuthed(true);\n }",
"public static function signUp()\n {\n global $cont;\n $name = $_POST['name'];\n $email = $_POST['email'];\n $password = SHA1($_POST['password']);\n\n $signup = $cont->prepare(\"INSERT INTO users(`name`, `email`, `password` , `role`) VALUES (? , ? , ? , ?) \");\n $signup->execute([$name , $email , $password , 0]);\n\n session_start();\n $_SESSION['message'] = \"Data entering correctly\";\n header(\"location:../login.php\");\n }",
"function register() {\n global $session; \n $registered = $session->register($_POST['username'], $_POST['password']);\n \n //header('Location: page.php');\n }",
"public function store(RegisterUserRequest $request)\n {\n $user = null;\n DB::transaction(function () use ($request, &$user) {\n\n $input = $request->all();\n $input['password'] = Hash::make($request->password);\n\n $user = UsUser::create($input);\n $user->token = null;\n\n // registro en us_userlogins\n $user->us_socialnetworks()->attach(\n 1,\n ['id_social' => 'peru_'.Str::random(20), 'us_users_email' => $request->email, 'user_add' => $user->id, 'date_add' => $user->date_add]\n );\n\n // registro en us_subscribes_and_follows\n // Aqui Invocar a la Api de Sites para subscribir al usuario con su SITE (¿Como trabajo los registros transaccionales con 2 apis?)\n\n });\n\n return $this->successResponse(true, new UsUserResource($user));\n }",
"public function action_register()\n\t{\n Auth::create_user(\n 'promisemakufa',\n 'pass123',\n '[email protected]',\n 1,\n array(\n 'fullname' => 'P K systems',\n )\n );\n\n $this->template->title = \"User\";\n $this->template->content = View::forge('user/register');\n }",
"function register_user() {\n\n\t\tif ( ! class_exists( 'QuadMenu' ) ) {\n\t\t\twp_die();\n\t\t}\n\n\t\tif ( ! check_ajax_referer( 'quadmenu', 'nonce', false ) ) {\n\t\t\tQuadMenu::send_json_error( esc_html__( 'Please reload page.', 'quadmenu' ) );\n\t\t}\n\n\t\t$mail = isset( $_POST['mail'] ) ? $_POST['mail'] : false;\n\t\t$pass = isset( $_POST['pass'] ) ? $_POST['pass'] : false;\n\n\t\tif ( empty( $mail ) || ! is_email( $mail ) ) {\n\t\t\tQuadMenu::send_json_error( sprintf( '<div class=\"quadmenu-alert alert-danger\">%s</div>', esc_html__( 'Please provide a valid email address.', 'quadmenu' ) ) );\n\t\t}\n\n\t\tif ( empty( $pass ) ) {\n\t\t\tQuadMenu::send_json_error( sprintf( '<div class=\"quadmenu-alert alert-danger\">%s</div>', esc_html__( 'Please provide a password.', 'quadmenu' ) ) );\n\t\t}\n\n\t\t$userdata = array(\n\t\t\t'user_login' => $mail,\n\t\t\t'user_email' => $mail,\n\t\t\t'user_pass' => $pass,\n\t\t);\n\n\t\t$user_id = wp_insert_user( apply_filter( 'ml_qmpext_register_user_userdata', $userdata ) );\n\n\t\tif ( ! is_wp_error( $user_id ) ) {\n\n\t\t\t$user = get_user_by( 'id', $user_id );\n\n\t\t\tif ( $user ) {\n\t\t\t\twp_set_current_user( $user_id, $user->user_login );\n\t\t\t\twp_set_auth_cookie( $user_id );\n\t\t\t\tdo_action( 'wp_login', $user->user_login, $user );\n\t\t\t}\n\n\t\t\tQuadMenu::send_json_success( sprintf( '<div class=\"quadmenu-alert alert-success\">%s</div>', esc_html__( 'Welcome! Your user have been created.', 'quadmenu' ) ) );\n\t\t} else {\n\t\t\tQuadMenu::send_json_error( sprintf( '<div class=\"quadmenu-alert alert-danger\">%s</div>', $user_id->get_error_message() ) );\n\t\t}\n\t\twp_die();\n\t}",
"public function register() {\n if (isset($_SESSION['userid'])) {\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->register();\n }\n }",
"public function register()\n\t{\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\n\t\t\t// CakePHP automatically call $this->User->validates() for us before saving it.\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t// we set the id of our newly created User to the request->data params\n\t\t\t\t$this->request->data['User']['id'] = $this->User->id;\n\t\t\t\t// so we can log in directly. (We don't use $this->User because the password is now encrypted so it would not match).\n\t\t\t\t$this->Auth->login($this->request->data['User']);\n\t\t\t\treturn $this->redirect(array('controller' => 'messages', 'action' => 'index'));\n\t\t\t}\n\t\t}\n\t}",
"public function register()\n {\n if ($this->getIsNewRecord() == false) {\n throw new \\RuntimeException('Calling \"' . __CLASS__ . '::' . __METHOD__ . '\" on existing user');\n }\n\n if ($this->module->enableConfirmation == false) {\n $this->confirmed_at = time();\n }\n\n if ($this->module->enableGeneratingPassword) {\n $this->password = Password::generate(8);\n }\n\n $this->trigger(self::USER_REGISTER_INIT);\n\n if ($this->save(false)) {\n Yii::getLogger()->log($this->getErrors(), Logger::LEVEL_INFO);\n $this->trigger(self::USER_REGISTER_DONE);\n if ($this->module->enableConfirmation) {\n $token = \\Yii::createObject([\n 'class' => \\dektrium\\user\\models\\Token::className(),\n 'type' => \\dektrium\\user\\models\\Token::TYPE_CONFIRMATION,\n ]);\n $token->link('user', $this);\n $this->mailer->sendConfirmationMessage($this, $token);\n } else {\n \\Yii::$app->user->login($this);\n }\n if ($this->module->enableGeneratingPassword) {\n $this->mailer->sendWelcomeMessage($this);\n }\n \\Yii::$app->session->setFlash('info', $this->getFlashMessage());\n \\Yii::getLogger()->log('User has been registered', Logger::LEVEL_INFO);\n return true;\n }\n\n \\Yii::getLogger()->log('An error occurred while registering user account', Logger::LEVEL_ERROR);\n\n return false;\n }",
"public function register()\n {\n Auth::extend('sso', function ($app, $name, array $config) {\n // 返回一个 Illuminate\\Contracts\\Auth\\Guard 实例...\n return new OaGuard(Auth::createUserProvider($config['provider']),$app->make('request'));\n });\n\n Auth::provider('sso', function ($app, array $config) {\n return new OaUserProvider();\n });\n }",
"public function addUser(){}",
"public function register($u) {\n $this->user_id = $u; \n }",
"public function register(){\n // 2- check post submitted\n $post = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n if ($post['submit']){\n\n if ($post['name']=== \"\" || $post['email']=== \"\" ||\n $post['password']=== \"\" || $post['confirm_password']=== \"\" ){\n\n Messages::setMessage('Please Fill All Fields!', 'error');\n return;\n }\n\n // prepare query\n $this->query('INSERT INTO users (name, email, password) VALUES(:name, :email, :password)');\n\n // bind params\n $this->bind(':name',$post['name']);\n $this->bind(':email',$post['email']);\n $this->bind(':password',md5($post['password']));\n\n\n // execute\n $this->execute();\n // check if inserted\n if ($this->lastInsertId()){\n header('Location: '.'users/login');\n }\n\n }\n }",
"public function registerAction(Request $request) \n {\n $form = $this->createForm(new UserType());\n\n if ($request->getMethod() == 'POST') {\n \n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $user = $form->getData();\n \n $factory = $this->get('security.encoder_factory');\n \n $encoder = $factory->getEncoder($user);\n \n $password = $encoder->encodePassword($user->getPassword(), $user->getSalt());\n \n $user->setPassword($password);\n\n $token = $this->getToken(array($user->email, $user->created, rand()));\n \n $user->setToken($token);\n \n $saveUser = $this->baseRepository()->save($user);\n\n return $this->redirect($this->generateUrl('thankyou', array('email' => $user->getEmail())));\n }\n }\n\n return $this->render('UserBundle:User:save.html.twig', array('form' => $form->createView(), 'action' => 'Registreren'));\n }",
"function registrar_usuario($identificacion,$nombre,$apellidos,$correo,$password)\n\t{\n\t\t$respuesta= array();\n\t\t$usuario = new Usuario();\n\t\t$existe_usuario = $usuario->consultar_usuario($correo);\n\t\tif (empty($existe_usuario)) {\n\t\t\t$usuario_nuevo = $usuario->registrar_usuario($identificacion,$nombre,$apellidos,$correo,$password);\n\t\t\t$respuesta[\"usuario_nuevo\"]=$usuario_nuevo;\n\t\t\tif ($usuario_nuevo) {\n\t\t\t\t$respuesta[\"valor\"]=1; \n\t\t\t} else{\n\t\t\t\t$respuesta[\"valor\"]=0; \n\t\t\t}\n\t\t} else{\n\t\t\t$respuesta[\"valor\"]=2; \n\t\t}\n\t\techo json_encode($respuesta);\n\n\t}",
"public function _atualiza_usuario_sessao($row) {\n $session_key = $this->config['prefixo_sessao'] . '.' . $this->config['hashkey'] . '.' . $this->config['model_usuario'];\n $ses = $this->Session->read($session_key);\n $row = $row[\"{$this->config['model_usuario']}\"];\n $ses = array_merge($ses, $row);\n $this->Session->write($this->config['prefixo_sessao'] . '.' . $this->config['hashkey'] . '.' . $this->config['model_usuario'], $ses);\n }",
"public function register(string $username, string $password, string $email);",
"private function logInSUUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(1258);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }",
"public function register(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|string|max:100',\n 'surname' => 'required|string|max:255',\n 'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'required|string|min:6'\n ]);\n\n if ($validator->fails()) {\n return response()->json([\n 'code' => 'denegated',\n 'status' => 400,\n 'message' => $validator->errors(),\n ], 400);\n }\n\n $user = new User($request->all());\n $user->email = $request->email;\n $user->name = $request->name;\n $user->surname = $request->surname;\n $user->password = bcrypt($request->password);\n\n $token = JWTAuth::fromUser($user);\n\n $user->save();\n\n return response()->json([\n 'code' => 'success',\n 'status' => 201,\n 'message' => 'Usuario registrado',\n 'token' => $token,\n 'user' => $user\n ], 201);\n }",
"public function store(Request $request)\n {\n //CREA USUARIO\n $user = \\PruebaHotel\\User::create([\n //consulta variales en app/User.php\n 'name' => $request['nombres'],\n 'email' => $request['email'],\n 'password' => bcrypt($request['clave'])\n ]);\n if($user){\n Session::flash('registro-exitoso', 'Te has registrado con exito. Ahora inicia sesion.');\n return redirect('iniciar-sesion');\n }\n else{\n return 'Algo salio mal.';\n }\n }",
"function Integrar()\n\t{\n\t\t$usuario = UsuarioFacebook::ObtenerUsuarioActivo();\n\t\tif(!$usuario->TienePermiso('IntegrarUsuarios'))\n\t\tthrow new Exception('No puede integrar usuarios al club porque no tiene permisos para hacerlo');\n\t\tif($this->EsMiembroClubOrion)\n\t\tthrow new Exception('Este usuario ya está vinculado al club');\n\t\t$conexionBd = new ConectorBaseDatos();\n\t\t$conexionBd->Sentencia = sprintf(\"UPDATE UsuarioFacebook SET ValidadoPor = %s WHERE IdFacebook = %s\",\n\t\t$conexionBd->Escapar($usuario->IdFacebook),\n\t\t$conexionBd->Escapar($this->IdFacebook)\n\t\t);\n\t\t$conexionBd->EjecutarComando();\n\t\t$conexionBd->Desconectar();\n\t\t$this->validadoPorIdFacebook = $usuario->IdFacebook;\n\t\tGrupo::RegistrarEnPredeterminados($this);\n\t}",
"public function registerUser($data);",
"function setUsuario($usuario, $contraseña, $nombre, $apellidos, $telefono, $movil){\n\t\t\n\t\t$resultado = conectar()->query( \"SELECT * FROM usuarios WHERE usuario LIKE '$usuario'\");\n\t\tif($resultado->num_rows == 0){\n\t\t\tconectar()->query(\"INSERT INTO usuarios (usuario, contrasenia, nombre, apellidos, telefono, movil) VALUES ('\" . $usuario . \"','\" . $contraseña . \"','\" . $nombre . \"','\" . $apellidos .\"','\" . $telefono . \"','\" . $movil .\"')\");\n\t\t\techo \"<script>alert('Te has registrado correctamente!');document.location.reload();\";\t\n\t\t}else{\n\t\t\techo \"<script>alert('Ya existe ese nombre de usuario!');</script>\";\n\t\t}\n\t}",
"public function register_user()\n {\n if (isset($_POST['btnRegister'])) {\n $username = $_POST['username_reg'];\n $password = $_POST['password'];\n $role = 2;\n\n //check Username ton tai hay khong ton tai\n $checkUsername = $this->UserModel->checkUsername($username);\n if ($checkUsername == 'true') {\n header(\"Location:../Register\");\n } else {\n // 2.INSERT DATA EQUAL USERS\n $rs = $this->UserModel->InserNewUser($username,$password,$role);\n // 3.SHOW OK/FAILS ON SCREENS\n header(\"Location:../Login\");\n }\n }\n }",
"public function registerUser($email, array $roles);",
"public function crearUsuario() {\n\n\n if ($this->seguridad->esAdmin()) {\n $id = $this->usuario->getLastId();\n $usuario = $_REQUEST[\"usuario\"];\n $contrasenya = $_REQUEST[\"contrasenya\"];\n $email = $_REQUEST[\"email\"];\n $nombre = $_REQUEST[\"nombre\"];\n $apellido1 = $_REQUEST[\"apellido1\"];\n $apellido2 = $_REQUEST[\"apellido2\"];\n $dni = $_REQUEST[\"dni\"];\n $imagen = $_FILES[\"imagen\"];\n $borrado = 'no';\n if (isset($_REQUEST[\"roles\"])) {\n $roles = $_REQUEST[\"roles\"];\n } else {\n $roles = array(\"2\");\n }\n\n if ($this->usuario->add($id,$usuario,$contrasenya,$email,$nombre,$apellido1,$apellido2,$dni,$imagen,$borrado,$roles) > 1) {\n $this->perfil($id);\n } else {\n echo \"<script>\n i=5;\n setInterval(function() {\n if (i==0) {\n location.href='index.php';\n }\n document.body.innerHTML = 'Ha ocurrido un error. Redireccionando en ' + i;\n i--;\n },1000);\n </script>\";\n } \n } else {\n $this->gestionReservas();\n }\n \n }",
"public function registerUser()\n\t\t{\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\t$client = OrientDb::connection();\n\t\t\t\t$insert = $client->command('SELECT createUser({username: \"' . $this->email . '\", email : \"' . $this->email . '\", password: \"' . $this->password . '\", nameFirst:\"' . $this->name . '\", nameLast: \"' . $this->lastname . '\", authData : null, phone: \"' . $this->phone . '\"})');\n\t\t\t\t$response = $insert->getOData();\n\t\t\t\treturn $response;\n\n\t\t\t}catch(PhpOrientException $e){\n\t\t\t\t\n\t\t\t\treturn $e;\n\n\t\t\t}\n\t\t}",
"public function register(){\n $user = Container::getModel('User');\n $user->__set('name',$_POST['name']);\n $user->__set('email',$_POST['email']);\n if(isset($_POST['password']) && $_POST['password'] != ''){\n $user->__set('password',md5($_POST['password'])); \n }\n\n //if the fields are correct\n if($user->validateRegister()){\n //if user doesn't alredy exist\n if(count($user->getUserByEmail()) == 0){\n //success\n $user->save();\n $this->render('register');\n }else{\n //user does alredy exist\n $this->render('email_alredy_exists');\n }\n\n }else{\n //error if any of the fields are incorrect\n //this array will be use to auto-fill the fields\n $this->view->user = array(\n 'name' => $_POST['name'],\n 'email' => $_POST['email'],\n 'password' => $_POST['password']\n\n );\n $this->view->erroRegister = true;\n $this->render('inscreverse');\n }\n }",
"public function registerAction() {\n\t\t$this->setLayout('login');\n\t\t// If registrations are disabled, redirect to home\n\t\tif (!isset($this->config->registration_enabled) || $this->config->registration_enabled == false) {\n\t\t\t$this->redirect('/');\n\t\t}\n\n\t\t$form = new Website_Form_Register();\n\n\t\tif($this->getRequest()->isPost()) {\n\t\t\tif($form->isValid($this->getRequest()->getParams())) {\n\t\t\t\t$allOk = true;\n\t\t\t\t$testUser = User::getByName($this->getParam('username'));\n\t\t\t\tif ($testUser) {\n\t\t\t\t\t$allOk = false;\n\t\t\t\t\t$el = $form->getElement('username');\n\t\t\t\t\t$el->addError('Username already taken');\n\t\t\t\t}\n\n\t\t\t\tif ($this->getParam('pw') != $this->getParam('pw2')) {\n\t\t\t\t\t$allOk = false;\n\t\t\t\t\t$el = $form->getElement('pw2');\n\t\t\t\t\t$el->addError('Passwords do not match');\n\t\t\t\t}\n\n\t\t\t\tif ($allOk) {\n\t\t\t\t\t$user = User::create(array(\n\t\t\t\t\t\t\"parentId\" => 3,\n\t\t\t\t\t\t\"name\" => $this->getParam(\"username\"),\n\t\t\t\t\t\t\"password\" => Pimcore_Tool_Authentication::getPasswordHash($this->getParam(\"username\"), $this->getParam(\"pw\")),\n\t\t\t\t\t\t\"active\" => true,\n\t\t\t\t\t\t\"email\"=>$this->getParam('email'),\n\t\t\t\t\t\t'firstname'=>$this->getParam('firstname'),\n\t\t\t\t\t\t'lastname'=>$this->getParam('lastname')\n\t\t\t\t\t));\n\n // Create member\n $memberObject = new Website_Model_Members();\n $memberObject->setUserId($user->getId());\n $memberObject->save();\n\n // Login\n\t\t\t\t\t$securityService = Security_Service_Common::getInstance();\n $securityService->authenticate($form->getValues());\n\n\t\t\t\t\t$params = array(\n\t\t\t\t\t\t'name'=>$this->view->username($user),\n\t\t\t\t\t\t'url'=>$this->getAbsoluteUrl() . '/user/login',\n\t\t\t\t\t\t'username'=>$user->getName()\n\t\t\t\t\t);\n\t\t\t\t\t//sending the email\n\t\t\t\t\t$mail = new Pimcore_Mail();\n\t\t\t\t\t$mail->addTo($user->getEmail());\n\t\t\t\t\t$mail->setDocument('/_onderdelen/user_register');\n\t\t\t\t\t$mail->setParams($params);\n\t\t\t\t\t$mail->send();\n\n $this->addFlashMessage($this->view->translate('Your account was successfully created. Have fun!'));\n\t\t\t\t\t$this->redirect(\"/user\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t}",
"public function registerAction()\n {\n return $this->container\n ->get('pugx_multi_user.registration_manager')\n ->register('AdminBundle\\Entity\\Porteur');\n }",
"function registrar_usuario($nombre, $apellido, $usuario, $email, $clave){\n\n\t$nombre = escapar($nombre);\n\t$apellido = escapar($apellido);\n\t$usuario = escapar($usuario);\n\t$email = escapar($email);\n\t$clave = escapar($clave);\n\n if(email_existe($email)){\n\n \treturn false;\n }else if (usuario_existe($usuario)){\n\n return false;\n } else{\n\n \t$clave = md5($clave);\n\n \t$validacion = MD5($usuario . microtime()); //en este caso para concatenar en vez de un \".\" tb se puede usar \"+\"\n\n $sql = \"INSERT INTO usuarios(nombre, apellido, usuario, email, clave, validacion, activar) \n VALUES('$nombre','$apellido', '$usuario', '$email', '$clave','$validacion', 0)\";\n \n $resultado = query($sql);\n \n\n $sujeto = \"Activar cuenta\";\n\n $msj = \"Por favor haz click en el link para activar tu cuenta\n http://localhost/login/activate.php?email=$email&codigo=$validacion\n \";\n\n $headers= \"From: [email protected]\";\n\n enviar_email($email,$sujeto, $msj, $headers);\n\n return true;\n\n } \n\n\n}",
"public function registerAction(Request $request)\r\n {\r\n $user = new User();\r\n $form = $this->createForm(UserType::class, $user);\r\n\r\n // 2) handle the submit (will only happen on POST)\r\n $form->handleRequest($request);\r\n if ($form->isSubmitted() && $form->isValid()) {\r\n\r\n // 3) Encode the password (you could also do this via Doctrine listener)\r\n $password = $this->get('security.password_encoder')\r\n ->encodePassword($user, $user->getPlainPassword());\r\n $user->setPassword($password);\r\n\r\n // 4) save the User!\r\n $em = $this->getDoctrine()->getManager();\r\n $em->persist($user);\r\n $em->flush();\r\n\r\n // ... do any other work - like sending them an email, etc\r\n // maybe set a \"flash\" success message for the user\r\n\r\n //return $this->redirectToRoute('agencia_actors_backend_homepage');\r\n return $this->render('AgenciaActorsBackendBundle:Default:objecteAdded.html.twig', array(\r\n 'titol' => 'Usuari registrat',\r\n 'name' => $user->getUsername()));\r\n }\r\n\r\n return $this->render(\r\n 'AgenciaActorsBackendBundle:Default:register.html.twig',\r\n array('form' => $form->createView())\r\n );\r\n }",
"public function registerAction(Request $request)\n {\n $userManager = $this->get('fos_user.user_manager');\n $data = $request->request->all();\n $em = $this->getDoctrine()->getManager();\n\n $findUser = $em->getRepository('AppBundle:User')->findByUsername($data['username']);\n if ( $findUser){\n return new JsonResponse([\"msg\"=>\"Usuario Existente\"],401);\n }\n\n // Do a check for existing user with userManager->findByUsername\n\n $user = $userManager->createUser();\n $user->setUsername($data['username']);\n $user->setEmail($data['email']);\n $user->setPlainPassword($data['password']);\n $user->addRole($data[\"role\"]);\n $user->setCity($data[\"city\"]);\n $user->setDescription($data[\"description\"]);\n $user->setAddress($data[\"address\"]);\n $user->setLatitude($data[\"latitude\"]);\n $user->setLongitude($data[\"longitude\"]);\n $user->setLogo($data[\"logo\"]);\n $user->setEnabled(true);\n $userManager->updateUser($user);\n\n return $this->generateToken($user, 201);\n }",
"static public function user_registered($user)\n {\n $user->set_role(self::ROLE_KEY);\n }",
"function registerUser() {\n $username = $_POST['username'];\n $password = password_hash($_POST['password'], PASSWORD_DEFAULT);\n $firstName = $_POST['firstName'];\n $lastName = $_POST['lastName'];\n $email = $_POST['email'];\n $gender = $_POST['gender'];\n $country = $_POST['country'];\n $profilePicture = 'images/default_user_image.png';\n\n $response = attemptRegistration($username, $password, $firstName, $lastName, $email, $gender,\n $country, $profilePicture);\n\n if ($response['status'] == 'SUCCESS') {\n session_start();\n $_SESSION['firstName'] = $firstName;\n $_SESSION['lastName'] = $lastName;\n $_SESSION['username'] = $username;\n $_SESSION['profilePicture'] = $profilePicture;\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code'], 'The username provided already exists');\n }\n }",
"function ajouter_user($nom, $prenom, $email, $password, $cle_d_activation, $actif, $newsletter){\n\n\t\t$bdd=connexion_BD('projetLion');\n\n\t\t //Ajout de l'utilisateur dans la table login_users\n\t\t$req = $bdd->prepare('INSERT INTO login_users(nom, prenom, email, password, cle_d_activation, actif, newsletter) VALUES(:nom, :prenom, :email, :password, :cle_d_activation, :actif, :newsletter)');\n\t\t$req->execute(array(\n\t\t\t'nom' => $nom,\n\t\t\t'prenom' => $prenom,\n\t\t\t'email' => $email,\n\t\t\t'password' => $password,\n\t\t\t'cle_d_activation' => $cle_d_activation,\n\t\t\t'actif' => $actif,\n\t\t\t'newsletter' => $newsletter\n\t\t\t));\n\n\t\t\n\t}",
"public function register($m)\n {\n\n if (!strlen($m->email)) {\n return new Message('{\"error\": \"blank_email\", \"text\": \"Не указан email\"}');\n }\n\n // check email\n $user = new Message('{\"action\": \"load\", \"urn\": \"urn:Actor:User:System\"}');\n $user->email = $m->email;\n $r = $user->deliver();\n if (count($r)) {\n return new Message('{\"error\": \"user_exists\", \"text\": \"Пользователь с таким email существует\"}');\n }\n\n // create user\n $user = new Message('{\"action\": \"create\", \"urn\": \"urn:Actor:User:System\"}');\n $user->email = $m->email;\n\n $E = Entity::ref('Actor:User:System');\n foreach ($E->usereditfields as $fname) {\n $user->$fname = $m->$fname;\n }\n\n $user->wallet = (float) INITIAL_DEPOSIT;\n $user->bonus = (float) INITIAL_BONUS;\n\n // activate default?\n $user->active = false; // TODO CONFIGURABLE\n\n // gen pass or use provided\n if ($m->providedpassword) {\n // TODO CHECK - AND password IN $E->usereditfields\n\n if ($m->providedpassword == $m->providedpasswordcopy) {\n $user->password = $m->providedpassword;\n } else {\n return new Message('{\"error\": \"password_mismatch\", \"text\": \"Пароль в повторном введении не совпадает\"}');\n }\n } else {\n if (SIMPLEPASSWORDS === true) {\n $user->password = Security::generateSimplePassword();\n } else {\n $user->password = Security::generatePassword();\n }\n }\n $plainPassword = $user->password;\n $m->password = $plainPassword;\n $m->dynamicsalt = mt_rand(1, 2147483647);\n $user->dynamicsalt = $m->dynamicsalt;\n $hashedSaltedPassword = sha1($m->dynamicsalt . $user->password . SECURITY_SALT_STATIC);\n $user->password = $hashedSaltedPassword;\n\n if ($m->id) {\n if (ENV == 'DEVELOPMENT' || ENV == 'TEST') {\n $user->id = $m->id;\n } else {\n throw new SecurityException('Register user with provided id failed');\n }\n }\n\n\n $r = $user->deliver();\n $r->password = $plainPassword;\n unset($r->dynamicsalt);\n Broker::instance()->send($r, \"MANAGERS\", \"user.onregister\");\n\n if ($m->autologin) {\n //Log::info('autologin', 'register');\n // auto login, redirect to /account\n $l = new Message('{\"action\": \"authentificate\", \"urn\": \"urn:Actor:User:System\"}');\n $l->email = $user->email;\n $l->password = $plainPassword;\n $l->guestmode = true;\n $autologgedin = $l->deliver();\n Log::info($autologgedin, 'register');\n if ($autologgedin->error) {\n throw new Exception('Autologin failed '.$autologgedin->error);\n }\n $r->autologgedin = 'yes';\n }\n return $r;\n }"
] | [
"0.6576822",
"0.6534289",
"0.64748466",
"0.6435742",
"0.64080954",
"0.6390943",
"0.6385458",
"0.6348849",
"0.63176566",
"0.6269694",
"0.62469727",
"0.6242618",
"0.6229436",
"0.6209444",
"0.62056667",
"0.61699224",
"0.6160058",
"0.6127496",
"0.6113927",
"0.6113444",
"0.6065418",
"0.60641575",
"0.60440266",
"0.6037227",
"0.60240674",
"0.60193014",
"0.5990741",
"0.59809804",
"0.5971792",
"0.5968508",
"0.5964656",
"0.59630924",
"0.5940496",
"0.59403116",
"0.59370124",
"0.5936218",
"0.59309614",
"0.5905032",
"0.5889984",
"0.5889941",
"0.5886141",
"0.58788407",
"0.5869651",
"0.5851672",
"0.58270085",
"0.5825781",
"0.582294",
"0.5819666",
"0.58094317",
"0.58076733",
"0.58053774",
"0.5804722",
"0.5804037",
"0.5801729",
"0.5789538",
"0.57874435",
"0.5778646",
"0.57781106",
"0.57746667",
"0.57693523",
"0.57514066",
"0.573819",
"0.572767",
"0.572666",
"0.5726576",
"0.57158196",
"0.5703881",
"0.57027566",
"0.56980366",
"0.56977063",
"0.5697702",
"0.56976634",
"0.56892484",
"0.56875014",
"0.5686323",
"0.56848705",
"0.5680835",
"0.567666",
"0.5675618",
"0.5672604",
"0.56661654",
"0.5662508",
"0.5661637",
"0.56585705",
"0.56504154",
"0.56470346",
"0.56455046",
"0.5642076",
"0.563827",
"0.5637468",
"0.56368166",
"0.5634501",
"0.5633553",
"0.56316406",
"0.5630585",
"0.5624681",
"0.5618995",
"0.5612319",
"0.5609732",
"0.5607706"
] | 0.7339701 | 0 |
Registra los perfiles asociados a un usuario | function asociarPerfiles ($perfiles) {
$insert = "insert into s_usuarios_perfiles (id_usuario_perfil, id_usuario, id_perfil) values ";
$i = 0;
foreach ($perfiles as $key => $idPerfil) {
if ($i > 0)
$insert .= ",";
$insert .= "(null,$this->id_usuario,$idPerfil)";
$i++;
}
$delete = "delete from s_usuarios_perfiles where id_usuario=$this->id_usuario;";
$this->bd->ejecutarQuery($delete . $insert, 2);
return ['ejecutado' => 1];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addPerfilAction() {\n $perfil= new Perfiles();\n $perfil->setIdperfilUsuario(\"Sec\");\n $perfil->setNombrePerfil(\"Secretaria\");\n $perfil->setDescripcionPerfil(\"Perfil Agregado desde UsuariosController\");\n \n $em=$this->getDoctrine()->getEntityManager();\n $em->persist($perfil);\n $flush=$em->flush();\n \n if($flush!=null){echo \"El perfil no se ha creado correctamente\";}\n else{echo \"Perfil Creado\";}\n \n die();\n }",
"public function store(CreateUserRequest $request)\n {\n $data = $request->except('_token');\n\n $usuario = User::create($data);\n\n foreach ($data['perfiles'] as $perfil)\n {\n $usuario->perfiles()->attach($perfil);\n }\n\n return redirect()->route('usuarios.index')\n ->with('info','el usuario fue creado correctamente :)');\n }",
"private function iniciar_perfil(){\n\t\t// if(!isset($_SESSION['id_user'])){\n\t\t// \theader('location : index.php');\n\t\t// }\n\n\t\trequire_once 'inc/clases/procesos/fechas.class.php';\n\t\trequire_once 'inc/clases/perfil/usuarios.class.php';\t\t\t//clase usuarios\n\t\t$this->Modulos = new Modulos();\t\n\t\t$this->Usuario = new Usuarios();\t\t\t\n\t}",
"function opcion__compilar_perfiles()\n {\n $param = $this->get_parametros();\n $id = isset($param[\"-p\"]) ? $param[\"-p\"] : $this->get_id_proyecto_actual(true);\n\n try {\n $proyecto = $this->get_proyecto($id);\n $path = $proyecto->get_dir_generales_compilados();\n if (!\\file_exists($path) || !\\is_writable($path)) {\n $this->consola->error('ATENCION!!: Considere ejecutar el comando compilar para abarcar todos los metadatos'. PHP_EOL);\n throw new toba_error('No existe o no es accesible la carpeta de metadatos compilados!!'. PHP_EOL);\n }\n toba_manejador_archivos::crear_arbol_directorios($path);\n $proyecto->compilar_metadatos_generales_grupos_acceso(true);\n } catch ( toba_error $e ) {\n\t\t$this->consola->error( \"PROYECTO $id: Ha ocurrido un error durante la compilacion:\\n\".$e->getMessage());\n exit(-1);\n }\n }",
"public function writeUsers()\n {\n \t// delete old keys\n \texec('rm ' . $this->getGitLocalRepositoryPath() . DIRECTORY_SEPARATOR . self::GITOLITE_KEY_DIR . '*.pub');\n \t\n foreach ($this->getUsers() as $user) {\n $this->writeFile(\n $this->getGitLocalRepositoryPath() . DIRECTORY_SEPARATOR .\n self::GITOLITE_KEY_DIR .\n $user->renderKeyFileName(),\n $user->getFirstKey()\n );\n }\n }",
"public function registrar_usuario($nombre, $apellido, $cedula, $telefono, $email, $direccion, $cargo, $usuario, $password1, $password2, $estado, $permisos)\n {\n $conectar = parent::conexion();\n parent::set_names();\n $sql = \"insert into usuarios \n values(null,?,?,?,?,?,?,?,?,?,?,now(),?);\";\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $_POST[\"nombre\"]);\n $sql->bindValue(2, $_POST[\"apellido\"]);\n $sql->bindValue(3, $_POST[\"cedula\"]);\n $sql->bindValue(4, $_POST[\"telefono\"]);\n $sql->bindValue(5, $_POST[\"email\"]);\n $sql->bindValue(6, $_POST[\"direccion\"]);\n $sql->bindValue(7, $_POST[\"cargo\"]);\n $sql->bindValue(8, $_POST[\"usuario\"]);\n $sql->bindValue(9, $_POST[\"password1\"]);\n $sql->bindValue(10, $_POST[\"password2\"]);\n $sql->bindValue(11, $_POST[\"estado\"]);\n $sql->execute();\n //obtenemos el valor del id del usuario\n $id_usuario = $conectar->lastInsertId();\n //insertamos los permisos\n //almacena todos los checkbox que han sido marcados\n //este es un array tiene un name=permiso[]\n $permisos = $_POST[\"permiso\"];\n // print_r($_POST);\n $num_elementos = 0;\n while ($num_elementos < count($permisos)) {\n $sql_detalle = \"insert into usuario_permiso\n values(null,?,?)\";\n $sql_detalle = $conectar->prepare($sql_detalle);\n $sql_detalle->bindValue(1, $id_usuario);\n $sql_detalle->bindValue(2, $permisos[$num_elementos]);\n $sql_detalle->execute();\n //recorremos los permisos con este contador\n $num_elementos = $num_elementos + 1;\n }\n }",
"private function obtenerPerfiles ($idUser = \"\") {\n\n if ($idUser != \"\") {\n $this->id_usuario = $idUser;\n }\n\n if (count($this->perfiles) < 1) {\n $query = $this->stringConsulta() . \" where a.id_usuario=$this->id_usuario\";\n $data = $this->bd->ejecutarQuery($query);\n\n if ($data instanceof \\Countable and count($data) > 1) {\n throw new Exception(\"No se han obtenido los perfiles del usuario\", 1);\n }\n\n while ($perfil = $this->bd->obtenerArrayAsociativo($data)) {\n $this->perfiles[$perfil['clave_perfil']] = $perfil['clave_perfil'];\n }\n\n }\n else {\n $this->perfiles[] = 'UsuarioPublico';\n }\n\n }",
"protected function register_files()\r\n\t\t{\r\n\t\t\t// register paths\r\n\t\t\t$this->paths[ self::ROOT_INDEX ] = $this->local;\r\n\t\t\t$this->register_ini( $this->paths[ self::ROOT_INDEX ] . self::REGISTRY_FILE );\r\n\t\t\t\t\r\n\t\t\tforeach( $this->path_follow as $index => $p )\r\n\t\t\t{\r\n\t\t\t\t// put together local path names\r\n\t\t\t\t$this->paths[ $index ] = $this->local . $p . DIRECTORY_SEPARATOR;\r\n\t\t\t\t\r\n\t\t\t\t// look for registries to assign id's to\r\n\t\t\t\t$this->register_ini( $this->paths[ $index ] . self::REGISTRY_FILE, $p, $p, $index );\r\n\t\t\t}\r\n\t\t}",
"public function addFiles($idPremit,$files){\n // dd($idPremit);\n foreach ($files as $key => $value) {\n $f = new GdussFiles;\n $f->permit_id = $idPremit;\n $f->type = $key;\n $destinationPath = public_path('uploads/gduss');\n $file = $files[$key];\n $extension = $file->getClientOriginalExtension();\n $fileName = uniqid().'.'. new carbon .'.'.$extension;\n $file->move($destinationPath, $fileName);\n $f->file = $fileName;\n $f->save();\n }\n return ;\n }",
"function actualizarPerfilesUsuario($arrayPerfil,$idUsuario){\n\t\t/* Debe tomar los perfiles que se marcaron como pertenecientes en un formulario\n\t\ty actualizar en la tabla control_perfil_usuario\n\t\tLo ideal es eliminar primero todos los perfiles, y volver a escribirlos\n\t\t*/\n\t\t\n\t\t$oPerfilUsu=new Perfil_usuario($this->oDBM);\n\t\t$okDelete=$oPerfilUsu->deleteUsuario($idUsuario);\n\t\tforeach ($arrayPerfil as $item){\n\t\t\t$okInsert=$oPerfilUsu->insertUsuario($idUsuario,$item);\n\t\t}\n\t\treturn true;\n\t}",
"public function configurar()\n {\n //\n $count = Perfiles::select()->get()->count();\n if ($count == 0) {\n $permisos = Funcionalidades::select()->get();\n Perfiles::create(['nombre' => 'Super Su','usuario'=>1]);\n foreach ($permisos as $value) {\n Permisos::create(['id_perfil' => 1, 'id_funcionalidad' => $value->id]);\n }\n User::create(['name' => 'Admin', 'email' => 'Admin', 'password' => 'Admin', 'id_perfil' => 1,'usuario'=>1]);\n }\n }",
"function add_user(array $user){\n $json = file_get_contents(FILE_USERS);\n $user['id']= uniqid();\n // 2 convertir contenu en tableau\n $arrayuser = json_decode($json, true);\n // 3 ajouter new user\n $arrayuser[] = $user;\n // convertir le tableau en json\n $json =json_encode($arrayuser);\n file_put_contents(FILE_USERS, $json); \n}",
"function cot_pfs_upload($userid, $folderid='')\n{\n\tglobal $db, $cfg, $sys, $cot_extensions, $gd_supported, $maxfile, $maxtotal, $db_pfs, $db_pfs_folders, $L, $err_msg;\n\n\tif($folderid==='') $folderid = cot_import('folderid','P','INT');\n\t$ndesc = cot_import('ndesc','P','ARR');\n\t$npath = cot_pfs_folderpath($folderid);\n\n\t/* === Hook === */\n\tforeach (cot_getextplugins('pfs.upload.first') as $pl)\n\t{\n\t\tinclude $pl;\n\t}\n\t/* ===== */\n\n\tcot_die($npath===FALSE);\n\n\tfor ($ii = 0; $ii < $cfg['pfs']['pfsmaxuploads']; $ii++)\n\t{\n\t\t$disp_errors = '';\n\t\t$u_tmp_name = $_FILES['userfile']['tmp_name'][$ii];\n\t\t$u_type = $_FILES['userfile']['type'][$ii];\n\t\t$u_name = $_FILES['userfile']['name'][$ii];\n\t\t$u_size = $_FILES['userfile']['size'][$ii];\n\t\t$u_name = str_replace(\"\\'\",'',$u_name );\n\t\t$u_name = trim(str_replace(\"\\\"\",'',$u_name ));\n\n\t\tif (!empty($u_name))\n\t\t{\n\t\t\t$disp_errors .= $u_name . ' : ';\n\t\t\t$u_name = mb_strtolower($u_name);\n\t\t\t$dotpos = mb_strrpos($u_name,\".\")+1;\n\t\t\t$f_extension = mb_substr($u_name, $dotpos);\n\t\t\t$f_extension_ok = 0;\n\t\t\t$desc = $ndesc[$ii];\n\n\t\t\tif($cfg['pfs']['pfstimename'])\n\t\t\t{\n\t\t\t\t$u_name = time().'_'.$u_name;\n\t\t\t}\n\t\t\tif(!$cfg['pfs']['pfsuserfolder'])\n\t\t\t{\n\t\t\t\t$u_name = $usr['id'].'_'.$u_name;\n\t\t\t}\n\n\t\t\t$u_newname = cot_safename($u_name, true);\n\t\t\t$u_sqlname = $db->prep($u_newname);\n\n\t\t\tif ($f_extension!='php' && $f_extension!='php3' && $f_extension!='php4' && $f_extension!='php5')\n\t\t\t{\n\t\t\t\tforeach ($cot_extensions as $k => $line)\n\t\t\t\t{\n\t\t\t\t\tif (mb_strtolower($f_extension) == $line[0])\n\t\t\t\t\t{\n\t\t\t\t\t\t$f_extension_ok = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (is_uploaded_file($u_tmp_name) && $u_size>0 && $u_size<$maxfile && $f_extension_ok\n\t\t\t\t&& ($pfs_totalsize+$u_size)<$maxtotal)\n\t\t\t{\n\t\t\t\t$fcheck = cot_file_check($u_tmp_name, $u_name, $f_extension);\n\t\t\t\tif($fcheck == 1)\n\t\t\t\t{\n\t\t\t\t\t$pfs_dir_user = cot_pfs_path($userid);\n\t\t\t\t\t$thumbs_dir_user = cot_pfs_thumbpath($userid);\n\t\t\t\t\tif (!file_exists($pfs_dir_user.$npath.$u_newname))\n\t\t\t\t\t{\n\t\t\t\t\t\t$is_moved = true;\n\n\t\t\t\t\t\tif ($cfg['pfs']['pfsuserfolder'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!is_dir($pfs_dir_user))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$is_moved &= mkdir($pfs_dir_user, $cfg['dir_perms']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!is_dir($thumbs_dir_user))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$is_moved &= mkdir($thumbs_dir_user, $cfg['dir_perms']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$is_moved &= move_uploaded_file($u_tmp_name, $pfs_dir_user.$npath.$u_newname);\n\t\t\t\t\t\t$is_moved &= chmod($pfs_dir_user.$npath.$u_newname, $cfg['file_perms']);\n\n\t\t\t\t\t\t$u_size = filesize($pfs_dir_user.$npath.$u_newname);\n\n\t\t\t\t\t\tif ($is_moved && (int)$u_size > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* === Hook === */\n\t\t\t\t\t\t\tforeach (cot_getextplugins('pfs.upload.moved') as $pl)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tinclude $pl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* ===== */\n\t\t\t\t\t\t\t$db->insert($db_pfs, array(\n\t\t\t\t\t\t\t\t'pfs_userid' => (int)$userid,\n\t\t\t\t\t\t\t\t'pfs_date' => (int)$sys['now'],\n\t\t\t\t\t\t\t\t'pfs_file' => $u_sqlname,\n\t\t\t\t\t\t\t\t'pfs_extension' => $f_extension,\n\t\t\t\t\t\t\t\t'pfs_folderid' => (int)$folderid,\n\t\t\t\t\t\t\t\t'pfs_desc' => $desc,\n\t\t\t\t\t\t\t\t'pfs_size' => (int)$u_size,\n\t\t\t\t\t\t\t\t'pfs_count' => 0\n\t\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\t$db->update($db_pfs_folders, array('pff_updated' => $sys['now']), 'pff_id=\"'.$folderid.'\"');\n\n\t\t\t\t\t\t\t$disp_errors .= $L['Yes'];\n\t\t\t\t\t\t\t$pfs_totalsize += $u_size;\n\n\t\t\t\t\t\t\t/* === Hook === */\n\t\t\t\t\t\t\tforeach (cot_getextplugins('pfs.upload.done') as $pl) {\n\t\t\t\t\t\t\t\tinclude $pl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* ===== */\n\n\t\t\t\t\t\t\tif (\n in_array($f_extension, $gd_supported)\n && Cot::$cfg['pfs']['th_amode']!='Disabled'\n\t\t\t\t\t\t\t\t&& file_exists($pfs_dir_user.$u_newname)\n ) {\n\t\t\t\t\t\t\t\t@unlink($thumbs_dir_user.$npath.$u_newname);\n\t\t\t\t\t\t\t\t$th_colortext = Cot::$cfg['pfs']['th_colortext'];\n\t\t\t\t\t\t\t\t$th_colorbg = Cot::$cfg['pfs']['th_colortext'];\n\t\t\t\t\t\t\t\tcot_imageresize(\n $pfs_dir_user . $npath . $u_newname,\n\t\t\t\t\t\t\t\t\t$cfg['pfs']['thumbs_dir_user'] . $npath . $u_newname,\n Cot::$cfg['pfs']['th_x'],\n Cot:: $cfg['pfs']['th_y'],\n '',\n $th_colorbg,\n Cot::$cfg['pfs']['th_jpeg_quality'],\n true\n );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t@unlink($pfs_dir_user.$npath.$u_newname);\n\t\t\t\t\t\t\t$disp_errors .= $L['pfs_filenotmoved'];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$disp_errors .= $L['pfs_fileexists'];\n\t\t\t\t\t}\n\t\t\t\t} elseif($fcheck == 2) {\n\t\t\t\t\t$disp_errors .= sprintf($L['pfs_filemimemissing'], $f_extension);\n\t\t\t\t} else {\n\t\t\t\t\t$disp_errors .= sprintf($L['pfs_filenotvalid'], $f_extension);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$disp_errors .= $L['pfs_filetoobigorext'];\n\t\t\t}\n\n\t\t\t$err_msg[] = $disp_errors;\n\t\t}\n\t}\n\treturn $folderid;\n}",
"public function actualizarusuario($imagenperfil,$datosuser,$id){\n // NOTE: obtener los usuarios en usuarios.json, transformandolos en un array\n $usuarios = $this->buscarUsuarios();\n // NOTE: recorrer array de todos los usuarios y sobreescribir el registro que corresponda al usuario a editar\n if (!empty($usuarios)) {\n // NOTE: vacio el archivo usuarios.json para poder insertar las modificaciones sin duplicar al usuario\n file_put_contents('usuarios.json', '');\n foreach ($usuarios as $usuario) {\n // NOTE: si encuentro al usuario guardo las modificaciones\n if (strtolower($id) == strtolower($usuario['id'])) {\n $usuario['nombre'] = $datosuser['nombre'];\n $usuario['apellido'] = $datosuser['apellido'];\n $usuario['email'] = $datosuser['email'];\n if ($usuario['password'] != $datosuser['password']) {\n $usuario['password'] = password_hash($datosuser['password'],PASSWORD_DEFAULT);\n }\n if ($imagenperfil['imgperfil']['error'] === UPLOAD_ERR_OK) {\n $ext = strtolower(pathinfo($imagenperfil['imgperfil']['name'], PATHINFO_EXTENSION));\n $hasta = '/images/profileImg/'.'perf'.$id.'.'.$ext;\n $usuario['srcImagenperfil'] = $hasta;\n }\n $userjson = json_encode($usuario);\n file_put_contents('usuarios.json', $userjson . PHP_EOL, FILE_APPEND);\n $this->subirImgPerfil($imagenperfil,$id);\n }else {\n // NOTE: si no encuentro al usuario guardo a los demas sin cambios\n $userjson = json_encode($usuario);\n file_put_contents('usuarios.json', $userjson . PHP_EOL, FILE_APPEND);\n }\n }\n }\n // NOTE: volver a convertir a json y guardar archivo usuarios.json\n //$userjson = json_encode($usuarios);\n //file_put_contents('usuarios2.json', $userjson . PHP_EOL, FILE_APPEND);\n //subirImgPerfil($imagenperfil,$id);\n\n\n }",
"function register_user_options_pages(){\n \n $settings = apply_filters('acfe/options_page/prepare_register', acfe_get_settings($this->settings));\n \n if(empty($settings))\n return;\n \n foreach($settings as $name => $args){\n \n // Bail early\n if(empty($name) || acf_get_options_page($name))\n continue;\n \n // Filters\n $args = apply_filters(\"acfe/options_page/register\", $args, $name);\n $args = apply_filters(\"acfe/options_page/register/name={$name}\", $args, $name);\n \n if($args === false)\n continue;\n \n // Register\n acf_add_options_page($args);\n \n }\n \n }",
"function ins_permisos($DBcon, $idusuario, $tipousuario)\n {\n\n $query = $this->set_profile($tipousuario,$idusuario);\n\n $stmt = $DBcon->prepare($query);\n\n // check for successfull registration\n if ( $stmt->execute() ) {\n $response['status'] = 'success';\n $response['message'] = ' Registro exitoso, Gracias!';\n\n } else {\n $response['status'] = 'error'; // could not register\n $response['message'] = ' No se pudo registrar, intente nuevamente más tarde';\n }\n\n return $response;\n }",
"function getPerfiles($idUser){\n\t\t/*\n\t\tDeben obtenerse de control_perfil_usuario los id de perfiles a los que pertenece el \n\t\tusuario para poder desplegarlos en el formulario de edición de datos\n\t\t*/\n\t\t$array=array();\n\t\t$oPerfilUsuario=new Perfil_usuario($this->oDBM);\n\t\t$arrayPerfilUsuario=$oPerfilUsuario->getPerfilesUsuario($idUser);\n\t\t\n\t\tforeach ($arrayPerfilUsuario as $item){\n\t\t\t$array[]=$item['id_perfil'];\n\t\t}\n\t\treturn $array;\n\t\t\n\t}",
"public function addUsers($image_profil, $nom, $prenom, $pseudo, $email, $age, $mot_de_passe, $numero_rue, $rue, $ville, $code_postal)\n\t{\n\t\t$query = 'INSERT INTO users (image_profil, nom, prenom, pseudo, email, age, mot_de_passe, numero_rue, rue, ville, code_postal) VALUES (:image_profil, :nom, :prenom, :pseudo, :email, :age, :mot_de_passe, :numero_rue, :rue, :ville, :code_postal);';\n\t\t$table = array(\n\t\t\t\t'image_profil' => $image_profil,\n\t\t\t\t'nom' => $nom,\n\t\t\t\t'prenom' => $prenom,\n\t\t\t\t'pseudo' => $pseudo,\n\t\t\t\t'email' => $email,\n\t\t\t\t'age' => $age,\n\t\t\t\t'mot_de_passe' => $mot_de_passe,\n\t\t\t\t'numero_rue' => $numero_rue,\n\t\t\t\t'rue' => $rue,\n\t\t\t\t'ville' => $ville,\n\t\t\t\t'code_postal' => $code_postal\n\t\t\t);\n\t\t$this->db->execute($query, $table);\n\t}",
"function new_user($username, $password){\n $new_user = array(\n 'username' => $username,\n 'password' => $password\n );\n array_push($GLOBALS['users_array'], $new_user);\n //print_r(json_encode($GLOBALS['users_array']));\n file_put_contents($GLOBALS['users_file_path'], json_encode($GLOBALS['users_array']));\n}",
"function afterInsert($registro, $id)\n {\n $perfiles = $this->m_usuarios_perfiles->getRegistros();\n \n foreach ($perfiles as $row_perfil) \n {\n $registro = array(\n 'id_perfil' => $row_perfil->id_perfil,\n 'id_menu' => $id,\n 'ver' => 1,\n 'editar' => 1,\n );\n \n $this->m_usuarios_permisos->insert($registro);\n }\n }",
"public function store(Request $request)\n {\n //\n $permisos = [];\n if (!empty($request['permisos'])) {\n $permisos = explode(\",\", $request['permisos']);\n }\n try {\n $perfil = Perfiles::create($request->all());\n foreach ($permisos as $value) {\n Permisos::create(['id_perfil' => $perfil->id, 'id_funcionalidad' => $value]);\n }\n Session::flash('message-success', 'Perfil ' . $request['nombre'] . ' creado correctamente');\n } catch (Exception $e) {\n Session::flash('message-error', 'Error al crear perfil' . $request['nombre']);\n }\n\n return $this->retorno(\"perfiles\");\n }",
"function register_file($dst_id, $hash, $extension, $ofn, $owner_id)\n {\n global $result;\n $con = open_db();\n\n // Extension should be inserted into the database as lowercase\n $extension = strtolower($extension);\n \n $query = \"SELECT upload_delay FROM tdrz_users WHERE id=?\";\n $stmt = $con->prepare($query);\n $stmt->bind_param(\"i\", $owner_id);\n $stmt->bind_result($upload_delay);\n $stmt->execute();\n if(!$stmt->fetch())\n {\n $result[\"error\"] = \"Failed to get upload_delay for user\";\n return false;\n }\n $stmt->close();\n $result[\"upload_delay\"] = $upload_delay;\n \n $query = \"SELECT last_upload FROM tdrz_users WHERE id=?\";\n $stmt = $con->prepare($query);\n $stmt->bind_param(\"i\", $owner_id);\n $stmt->bind_result($last_upload);\n $stmt->execute();\n if(!$stmt->fetch())\n {\n $result[\"error\"] = \"Failed to find last_upload for user\";\n return false;\n }\n $stmt->close();\n $last_upload = strtotime($last_upload);\n\n $delta = time() - $last_upload;\n if($upload_delay > 0 && $delta < $upload_delay)\n {\n $result[\"upload_timeout\"] = ($upload_delay - $delta);\n $result[\"error\"] = \"Please wait \".($result[\"upload_timeout\"]).\" more seconds before uploading again\";\n return false;\n }\n \n // Register the file\n $query = \"INSERT INTO tdrz_files(id, hash, ofn, extension, date, owner) VALUES(?,?,?,?,NOW(),?)\";\n $stmt = $con->prepare($query);\n $stmt->bind_param(\"ssssi\", $dst_id, $hash, $ofn, $extension, $owner_id);\n $stmt->execute();\n $stmt->close();\n \n // Update upload date\n $query = \"UPDATE tdrz_users SET last_upload=NOW() WHERE id=?\";\n $stmt = $con->prepare($query);\n $stmt->bind_param(\"i\", $owner_id);\n $stmt->execute();\n $stmt->close();\n \n return true;\t\n }",
"private function setUsers($ids,$log=false){\n \t$userPermission = $this->getUserPermission();\n \tforeach ($ids as $id)\n \t\tNewDao::getInstance()->insert('user_permissions',array('user_id'=>$id,'permission_id'=>$userPermission),$log);\n }",
"public function store(Request $request){\n $users = json_decode($request->get('users'));\n $partidos = json_decode($request->get('partidos'));\n\n $owner_id = Authorizer::getResourceOwnerId();\n $porra = Porra::find($request->get('id_porra'));\n\n if ($porra->propietario != $owner_id){\n return $this->respuestaError(\"El usuario conectado no puede modificar esta porra, sólo el propietario puede\", 401);\n }\n\n foreach ($users as $user) {\n $usuario = User::find($user->id);\n foreach ($partidos as $partido) {\n if (!$usuario || !$porra){\n return $this->respuestaError(\"Error al crear los pronosticos\");\n }\n $campos['partido_id'] = $partido->id;\n $campos['user_id'] = $user->id;\n $campos['porra_id'] = $request->get('id_porra');\n $campos['cerrado'] = 0;\n $pronostico = Pronostico::create($campos);\n }\n }\n foreach ($partidos as $partido) {\n $campos['partido_id'] = $partido->id;\n $campos['user_id'] = $owner_id;\n $campos['porra_id'] = $request->get('id_porra'); \n $campos['goles_local'] = 0;\n $campos['goles_visitante'] = 0;\n $campos['cerrado'] = 0;\n $pronostico = Pronostico::create($campos);\n }\n return $this->respuestaOK($porra->getPronosticos, 200);\n }",
"public function add_registrations_details($user_id, $registration_json, $files) {\n\n\n //update first all specialization entry to 9\n $registration_array = json_decode($registration_json, true);\n\n $doctor_where = array(\n \"doctor_registration_user_id\" => $user_id,\n \"doctor_registration_status\" => 1\n );\n $update_array = array(\n 'doctor_registration_status' => 9,\n \"doctor_registration_modified_at\" => $this->utc_time_formated\n );\n $this->update(TBL_DOCTOR_REGISTRATIONS, $update_array, $doctor_where);\n\n //upload files\n $upload_path = UPLOAD_REL_PATH . \"/\" . DOCTOR_REGISTRATIONS_FOLDER . \"/\" . $user_id;\n $upload_folder = DOCTOR_REGISTRATIONS_FOLDER . \"/\" . $user_id;\n $file_names = do_upload_multiple2($upload_path, array('photo' => $files['registration_images']), $upload_folder);\n\n $insert_array = array();\n foreach ($registration_array as $key => $value) {\n $insert_array[] = array(\n \"doctor_registration_user_id\" => $user_id,\n \"doctor_registration_council_id\" => $value['reg_councel'],\n \"doctor_council_registration_number\" => $value['reg_detail'],\n \"doctor_registration_year\" => $value['reg_year_temp'],\n \"doctor_registration_image\" => $file_names[$key],\n \"doctor_registration_image_filepath\" => IMAGE_MANIPULATION_URL . DOCTOR_REGISTRATIONS_FOLDER . \"/\" . $user_id . \"/\" . $file_names[$key],\n \"doctor_registration_created_at\" => $this->utc_time_formated\n );\n }\n\n $this->insert_multiple(TBL_DOCTOR_REGISTRATIONS, $insert_array);\n }",
"private function save() {\n global $config;\n\n //Save Config\n file_put_contents($config[\"usersFile\"],json_encode($this->users,JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT));\n }",
"private function processInsertUser(){\n\t\t//Comprueba que la variable tipo exista, sino pondra 1 por defecto\n\t\tif(isset($_REQUEST[\"tipo\"]))\n\t\t\t$tipo = $_REQUEST[\"tipo\"];\n\t\telse \n\t\t\t$tipo = 1;\n\n\t\tif($_FILES[\"foto_usuario\"][\"error\"] == 0){\n\t\t\t$randNumber = rand(0, 999999);\n\t\t\t$imgName = $randNumber . $_FILES['foto_usuario']['name'];\n\t\t\t$image_upload = Config::$userDirImage . $imgName;\n\t\t\tif (move_uploaded_file($_FILES['foto_usuario']['tmp_name'], $image_upload)) {\n\t\t\t\t$result = $this->users->insertUser($tipo, $imgName); //Devuelve 1 si inserta user\n\t\t\t\tif($result){\n\t\t\t\t\tif (Seguridad::getTipo() == \"0\"){\n\t\t\t\t\t\tView::redireccion(\"user\", \"userController\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\theader('Location: index.php');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tunlink($image_upload);\n\t\t\t\t\techo \"Ocurrio un error al insertar el usuario.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo \"Ocurrio un error al guardar el archivo.\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Ocurrio un error al cargar el archivo.\";\n\t\t}\n\t}",
"public function register()\n {\n add_filter( 'upload_mimes', array( $this, 'add_custom_file_types_supprot' ) );\n\n // add svg support\n add_filter( 'wp_prepare_attachment_for_js', array( $this, 'add_svg_media_thumbnails' ), 10, 3 );\n\n // filter wordpress filetype security check\n add_filter('wp_check_filetype_and_ext', array( $this, 'wp_check_filetype_and_ext' ) , 5, 5);\n\n // Add Custom user fields to ccd_client user role\n add_action( 'show_user_profile', array( $this, 'add_custom_user_fields' ) );\n add_action( 'edit_user_profile', array( $this, 'add_custom_user_fields' ) );\n\n // handle custom user fields update / form post\n add_action( 'personal_options_update', array( $this, 'update_custom_user_fields' ) );\n add_action( 'edit_user_profile_update', array( $this, 'update_custom_user_fields' ) );\n }",
"function createUsers(){\n\n\t\t\n\t\t\n\t\t$this->copyFrom('POST');\n\t\t$this->save(); // execute\n\t}",
"function set_profile($tipo, $idusuario)\n {\n $query = '';\n if($tipo == 'B')\n {\n $query = 'INSERT INTO permisos_usr (idpermiso, idusuario, cpermis) VALUES\n (1, '.$idusuario.', 1),\n (2, '.$idusuario.', 1),\n (3, '.$idusuario.', 1),\n (4, '.$idusuario.', 1),\n (5, '.$idusuario.', 1),\n (6, '.$idusuario.', 1),\n (7, '.$idusuario.', 0),\n (8, '.$idusuario.', 0),\n (9, '.$idusuario.', 1),\n (10, '.$idusuario.', 0),\n (11, '.$idusuario.', 0),\n (12, '.$idusuario.', 0),\n (13, '.$idusuario.', 1),\n (14, '.$idusuario.', 1),\n (15, '.$idusuario.', 0),\n (16, '.$idusuario.', 1),\n (17, '.$idusuario.', 0),\n (18, '.$idusuario.', 0),\n (19, '.$idusuario.', 0),\n (20, '.$idusuario.', 0),\n (21, '.$idusuario.', 0),\n (22, '.$idusuario.', 0),\n (23, '.$idusuario.', 0),\n (24, '.$idusuario.', 1),\n (25, '.$idusuario.', 0),\n (26, '.$idusuario.', 0),\n (27, '.$idusuario.', 0);';\n }\n\n if($tipo == 'C')\n {\n $query = 'INSERT INTO permisos_usr (idpermiso, idusuario, cpermis) VALUES\n (1, '.$idusuario.', 1),\n (2, '.$idusuario.', 1),\n (3, '.$idusuario.', 1),\n (4, '.$idusuario.', 1),\n (5, '.$idusuario.', 1),\n (6, '.$idusuario.', 0),\n (7, '.$idusuario.', 1),\n (8, '.$idusuario.', 1),\n (9, '.$idusuario.', 1),\n (10, '.$idusuario.', 1),\n (11, '.$idusuario.', 0),\n (12, '.$idusuario.', 1),\n (13, '.$idusuario.', 0),\n (14, '.$idusuario.', 0),\n (15, '.$idusuario.', 1),\n (16, '.$idusuario.', 1),\n (17, '.$idusuario.', 1),\n (18, '.$idusuario.', 1),\n (19, '.$idusuario.', 0),\n (20, '.$idusuario.', 0),\n (21, '.$idusuario.', 0),\n (22, '.$idusuario.', 0),\n (23, '.$idusuario.', 0),\n (24, '.$idusuario.', 0),\n (25, '.$idusuario.', 1),\n (26, '.$idusuario.', 0),\n (27, '.$idusuario.', 0);';\n }\n\n if($tipo == 'E')\n {\n $query = 'INSERT INTO permisos_usr (idpermiso, idusuario, cpermis) VALUES\n (1, '.$idusuario.', 1),\n (2, '.$idusuario.', 1),\n (3, '.$idusuario.', 1),\n (4, '.$idusuario.', 1),\n (5, '.$idusuario.', 1),\n (6, '.$idusuario.', 1),\n (7, '.$idusuario.', 1),\n (8, '.$idusuario.', 0),\n (9, '.$idusuario.', 1),\n (10, '.$idusuario.', 1),\n (11, '.$idusuario.', 1),\n (12, '.$idusuario.', 1),\n (13, '.$idusuario.', 0),\n (14, '.$idusuario.', 0),\n (15, '.$idusuario.', 0),\n (16, '.$idusuario.', 1),\n (17, '.$idusuario.', 1),\n (18, '.$idusuario.', 1),\n (19, '.$idusuario.', 1),\n (20, '.$idusuario.', 1),\n (21, '.$idusuario.', 1),\n (22, '.$idusuario.', 1),\n (23, '.$idusuario.', 1),\n (24, '.$idusuario.', 0),\n (25, '.$idusuario.', 0),\n (26, '.$idusuario.', 0),\n (27, '.$idusuario.', 0);';\n }\n\n return $query;\n }",
"public function run()\n {\n \t$perfiles = ['nombre' => 'Admin'];\n\n \tPerfil::create($perfiles);\n }",
"function saveUsers() {\n\tglobal $users;\n\t\n\tfile_put_contents(\"users.json\",json_encode($users));\n}",
"public function PostAddPerfil(Request $request)\n {\n \t$perfiles = Perfil::create($request->all());\n \treturn $perfiles;\n }",
"public function addNewUser($cogn, $nom, $mail, $idu, $pass){\r\n $cogn = self::$conn->real_escape_string($cogn);\r\n $nom = self::$conn->real_escape_string($nom);\r\n $mail = self::$conn->real_escape_string($mail);\r\n $pass = password_hash($pass,PASSWORD_BCRYPT);\r\n $filexml = $idu.'.xml';\r\n $cogn = mb_strtoupper($cogn, 'UTF-8');\r\n $nom = mb_strtoupper($nom, 'UTF-8');\r\n $today = date('d\\/m\\/Y');\r\n $query = \"INSERT INTO `utente` (`nome`, `cognome`,`nickname`,`password`,`email`,`filexml`,`ultimoaccesso`)\".\r\n \"VALUES('$nom','$cogn','$idu','$pass','$mail','$filexml','$today')\";\r\n\t\tif(self::$conn->query($query) && mkdir($this->folderFilexmlUser .$idu)){\r\n //CREAZIONE DEL FILEXML DELL'UTENTE\r\n $file = str_replace('<utente></utente>',\"<utente>$idu</utente>\", file_get_contents('Modello/UserFile_model.xml'));\r\n $file2 = str_replace('<utente></utente>',\"<utente>$idu</utente>\", file_get_contents('Modello/lastnewsmodello.xml'));\r\n $file3 = str_replace('<utente></utente>',\"<utente>$idu</utente>\", file_get_contents('Modello/social_model.xml'));\r\n file_put_contents($this->folderFilexmlUser .\"$idu/\".$filexml, $file);\r\n file_put_contents($this->folderFilexmlUser .\"$idu/lastnews.xml\", $file2);\r\n file_put_contents($this->folderFilexmlUser .\"$idu/social.xml\", $file3);\r\n return true;\r\n }\r\n return false; \r\n }",
"public function Perfil(){\n $pvd = new tutoria();\n\n //Se obtienen los datos del tutoria.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Tutoria/perfil-tutoria.php';\n\t}",
"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 post_add_users() {\n\t}",
"function adicionaUsuario() {\n $usuarioAtual = array(\n \"usuario\"=>$this->usuario,\n \"senha\"=>$this->senha,\n \"nome\"=>$this->nome,\n \"email\"=>$this->email\n );\n\n $usuarioAtual_str = json_encode($usuarioAtual);\n\n //retira o colchete e coloca a vírgula no arquivo\n $arquivo_str = file_get_contents(\"data/usuarios.json\");\n $arquivo_str_novo = str_replace(\"]\", \",\", $arquivo_str);\n\n //abre o arquivo\n $usuarios = fopen(\"data/usuarios.json\", \"w\"); //sobreescreve\n fwrite($usuarios, $arquivo_str_novo . $usuarioAtual_str . \"]\");\n fclose($usuarios);\n }",
"function _vip_contrib_add_upload_cap() {\n\tif ( ! is_admin() && ! defined( 'XMLRPC_REQUEST' ) )\n\t\treturn;\n\n\twpcom_vip_add_role_caps( 'contributor', array( 'upload_files' ) );\n}",
"function add_prefs($galerie)\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $niveau_upload;\r\n\t\tif($user[1] >= $niveau_upload)\r\n\t\t{\r\n\t\t\t$sql = mysql_query(\"SELECT id FROM \".ESPACE_MEMBRE_GALERY_TABLE.\" WHERE user_id='\" . $user[0] . \"' \");\r\n\t\t\t$test = mysql_num_rows($sql);\r\n\t\t\tif($test == 0)\r\n\t\t\t{\r\n\t\t\t\t$add=mysql_query(\"INSERT INTO \".ESPACE_MEMBRE_GALERY_TABLE.\" VALUES ('' , '\" . $user[0] . \"' , '\" . $galerie . \"' )\");\r\n\t\t\t}else{\r\n\t\t\t\t$upd1 = mysql_query(\"UPDATE \".ESPACE_MEMBRE_GALERY_TABLE.\" SET value = '\" . $galerie . \"' WHERE user_id = '\" . $user[0] . \"' \");\r\n\t\t\t}\r\n\t\t\techo \"\t<div style=\\\"text-align: center;\\\"><br /><br />\" . _PREFUPDATED . \"<br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre&op=compte\", 2);\r\n\t\t}else{\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\" . _NOTACCES . \"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\", 3);\r\n\t\t}\r\n\t}",
"public function addMultipleUsers() {\n $this->addUser();\n\n while ( true ) {\n echo \"\\033[32m\".\"Želite li unjeti novog zaposlenika? da/ne \".\"\\033[0m\";\n if ( readline() !== 'da' ) {\n break;\n } else {\n $this->addUser();\n\n }\n\n }\n }",
"function TS_VCSC_FilesRegistrations() {\r\n\t\t\trequire_once($this->registrations_dir . 'ts_vcsc_registrations_files.php');\r\n\t\t}",
"function autoregister_install()\n {\n // read email template for new autoregister\n $content = file_get_contents( osc_plugins_path() . osc_plugin_folder(__FILE__).'autoregister_new_user_info' );\n $aContent = json_decode($content, true);\n $s_internal_name = 'autoregister_new_user_info';\n $aFields = array('s_internal_name' => $s_internal_name, 'b_indelible' => '1');\n $aFieldsDescription = array();\n\n foreach($aContent as $key => $value) {\n $aFieldsDescription[$key]['s_title'] = $value['title'];\n $aFieldsDescription[$key]['s_text'] = $value['description'];\n }\n // add page as email template\n $page = Page::newInstance()->findByInternalName($s_internal_name);\n if(!isset($page['pk_i_id'])) {\n $result = Page::newInstance()->insert($aFields, $aFieldsDescription) ;\n } else {\n osc_add_flash_error_message(_m(\"Oops! That internal name is already in use. We can't make the changes\", 'autoregister'), 'admin') ;\n }\n }",
"public function run()\n {\n Perfile::create([\n 'nombre_perfil' => 'Administrador',\n 'descripcion' => 'admin del sistema | control total',\n 'habilitado' => true,\n 'activo' => true \n ]);\n }",
"private function file_member_register( $param ) {\n global $wpdb;\n $values = $parameters = array();\n\n // get the value to be inserted and for the prepare statement\n foreach ( $param['mem_data'] as $value ) {\n $values[] = '(%d, %d, %s)';\n $parameters[] = array(\n $param['file_id']\n , $value\n , $this->dtcreate()\n );\n };\n\n // values to be inserted\n $parameters_merged = call_user_func_array( 'array_merge', $parameters );\n\n // prepared statement\n $val_prepare = implode( \", \\n\", $values );\n\n $sql = <<<__SQL\nINSERT INTO hc_file_member (file_id, member_id, dtcreate)\nVALUES {$val_prepare}\n__SQL;\n\n // prepare the sql\n $prepare = $wpdb->prepare( $sql, $parameters_merged );\n\n try {\n // start the transaction\n $wpdb->query( 'START TRANSACTION' );\n // queue the query\n $res = $wpdb->query( $prepare );\n // commit the query\n $wpdb->query( 'COMMIT' );\n\n // check if unsuccessful insert\n if ( $res === false ) {\n $wpdb->query( 'ROLLBACK' );\n return false;\n }\n\n return true;\n } catch ( \\Exception $e ) {\n return false;\n }\n\n return false;\n }",
"public function RegistrarDatosPersonales(HojaVida $data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n $tiporegistro = \"Info. Datos Personales\";\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema (HOJA VIDA) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_POST['id_usuarioR'];\n $idusuarioR = $_SESSION['idUsuario'];\n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n\n $sql = \"INSERT INTO `th_personas`(`per_id_usuario`, `per_cedula`, `per_nombres`, `per_apellidos`, `per_fecha_nacimiento`,\n `per_id_dep_nacimiento`, `per_id_ciu_nacimiento`, `per_direccion`, `per_telefono`, `per_celular`, `per_email`, `per_ruta_foto`, \n `per_id_usuarioR`) \n VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->id_usuario,\n $data->per_cedula,\n $data->per_nombres,\n $data->per_apellidos,\n $data->per_fecha_nacimiento,\n $data->per_id_departamento,\n $data->per_id_municipio,\n $data->per_direccion,\n $data->per_telefono,\n $data->per_celular,\n $data->per_email,\n $data->per_ruta_foto,\n $idusuarioR\n )\n ); \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n \n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }",
"public function add_user($id) {\n UserToPres::create_entry($id,$this->id);\n }",
"public function changeOwner($files, $user, $recursive = false);",
"function register($USER) {\n \n ## Globals\n global $USERS_FILE;\n\n// if file does not exist, create the file.\nif ( ! file_exists($USERS_FILE))\n{\n$fp = fopen($USERS_FILE, 'w') or die('Cannot open file: '.$USERS_FILE); //create file\nfclose($fp);\n// $fp = fopen($USERS_FILE, 'w');\n}\n\n## Load Users\nif ( ! file_exists($USERS_FILE) && ! $USERS = file_to_array($USERS_FILE)) {\n if ($_SESSION['DEBUG']) { echo \"[DEBUG][LOGIN] Error: file_to_array failed\".'<br />'; }\n\treturn FALSE;\n}\n\n\n## User Checks\n## username\nif(isset($USER['username']) && isset($USERS)) {\nforeach ($USERS as $u) { ## unique user check\nif (isset($u['username']) && $u['username'] == $USER['username']) {\nreturn FALSE;\n}\n}\n}\n\n## password\nif(isset($USER['password']) && isset($USER['passwordc'])) {\nif ($USER['password'] == $USER['passwordc']) { ## passwords match check\n$USER['password'] = md5($USER['passwordc']); ## [security] md5 password\nunset($USER['passwordc']);\n}\n} else {\nreturn FALSE;\n}\n\n ## Register\n $USERS[] = $USER; \n if(array_to_file($USERS, $USERS_FILE)) {\n $_SESSION['user'] = $USER;\n return TRUE; \n } else {\n return FALSE;\n }\n \n }",
"public function upload() {\n\t\t$this->load->model('clublog_model');\n\n\t\t$users = $this->clublog_model->get_clublog_users();\n\n\t\tforeach ($users as $user) {\n\t\t\t$this->uploadUser($user->user_id, $user->user_clublog_name, $user->user_clublog_password);\n\t\t}\n\t}",
"function register_user()\n\t{\n\t\t\t\n\t\t//$this->db->where('ID',1);\n\t\t$this->db->where('ID > ',154);\n\t\t$users = $this->db->get('piano_users');\n\t\t\n\t\tforeach($users->result() as $user)\n\t\t{\n\t\t\t$i=0;\n\t\t\t$this->db->where('user_id',$user->ID);\n\t\t\t$this->db->where_in('meta_key',array('first_name','last_name'));\n\t\t\t//$this->db->where('meta_key','last_name');\n\t\t\t$usermeta = $this->db->get('piano_usermeta');\n\t\t\tforeach($usermeta->result() as $um)\n\t\t\t{\t\n\t\t\t\tif($i==0)\n\t\t\t\t\t$first_name = $um->meta_value;\n\t\t\t\telse\n\t\t\t\t\t$last_name = $um->meta_value;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t$username = $user->user_login;\n\t\t\t$password = $user->user_pass;\n\t\t\t$email = $user->user_email;\n\t\t\t$additional_data = array(\n\t\t\t\t\t\t\t\t\t'first_name' => $first_name,\n\t\t\t\t\t\t\t\t\t'last_name' => $last_name\n\t\t\t\t\t\t\t\t\t);\t\t\t\t\t\t\t\t\n\t\t\t//$group = array('1'); // Sets user to admin. No need for array('1', '2') as user is always set to member by default\n\n\t\t\tif($this->ion_auth->register($username, $password, $email, $additional_data))\n\t\t\t\techo $first_name . \" \" . $last_name . \" was Successfully Registered\";\n\t\t\telse\n\t\t\t\techo \"Unfortunately, while registering \" . $first_name . \" \" . $last_name . \", an error occured\" ;\n\t\t}\n\t\t\n\t\t\t\n\t}",
"function cvs_add_user($cvs_user, $cvs_pass, $cvs_project) {\r\n global $cvs_owner;\r\n\r\n $all_cvs_users = cvs_read_passwd($cvs_project);\r\n\r\n $cvs_fields = $all_cvs_users[$cvs_user];\r\n\r\n if (is_null($cvs_fields)) {\r\n\t$cvs_fields[0] = $cvs_pass;\r\n\t$cvs_fields[1] = $cvs_owner;\r\n\t$all_cvs_users[$cvs_user] = $cvs_fields;\r\n\tcvs_write_file($all_cvs_users, $cvs_project);\r\n\tcvs_log(1, \"Added user $cvs_user\");\r\n } else {\r\n\tcvs_log(3, \"User $cvs_user already exists\");\r\n }\r\n}",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'user_id' => 'required',\n 'provincia_id' => 'required',\n 'name' => 'required',\n 'telefono' => 'required',\n 'direccion' => 'required',\n 'codigo_postal' => 'required',\n 'lenguajes' => 'required',\n 'frameworks' => 'required',\n 'descripcion' => 'required',\n ]);\n \n if(Perfil::where('user_id', '=', $request->user_id)->count() > 0)\n {\n Perfil::where('user_id', '=', $request->user_id)->update($request->all());\n } else {\n Perfil::create($request->all());\n }\n return;\n }",
"private function iniciar_perfil_mda(){\n\t\trequire_once 'inc/clases/procesos/fechas.class.php';\n\t\trequire_once 'inc/clases/procesos/sql_anuncios.class.php';\n\t\trequire_once 'inc/clases/mda/show_master.class.php';\n\t\trequire_once 'inc/clases/mda/pedidos.class.php';\n\t\trequire_once 'inc/clases/config/perfil_config.class.php';\n\n\t\t$this->Modulos = new Modulos();\n\t}",
"public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->avatar)\n {\n return;\n }\n\n //Lastname du fichier\n $file = $this->id_user.'.'.$this->avatar->guessExtension();\n // move takes the target directory and then the target filename to move to\n $this->avatar->move($this->getUploadRootDir(), $file);\n //Suppression des thumbnail déjà en cache\n @unlink(__DIR__.'/../../../../../web/imagine/thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/avatar_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/moyen_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/mini_thumbnail/avatars/'.$file);\n\n // set the path property to the filename where you'ved saved the file\n $this->avatar = $file;\n }",
"private function batch_insert_permissions($calls) {\n $type = 'user';\n $optparams = array('sendNotificationEmails' => false);\n $this->client->setUseBatch(true);\n try {\n $batch = $this->service->createBatch();\n\n foreach ($calls as $call) {\n $name = explode('@', $call->gmail);\n $newpermission = new Google_Service_Drive_Permission();\n $newpermission->setValue($call->gmail);\n $newpermission->setType($type);\n $newpermission->setRole($call->role);\n $newpermission->setEmailAddress($call->gmail);\n $newpermission->setDomain($name[1]);\n $newpermission->setName($name[0]);\n\n $request = $this->service->permissions->insert($call->fileid, $newpermission, $optparams);\n $batch->add($request);\n }\n\n $results = $batch->execute();\n\n foreach ($results as $result) {\n if ($result instanceof Google_Service_Exception) {\n debugging($result);\n }\n }\n } finally {\n $this->client->setUseBatch(false);\n }\n }",
"public function registrarPagoController()\n\t\t{\n\t\t\tif(isset($_POST[\"registrar\"])) \n\t\t\t{\n\t\t\t\tif(!empty($_POST['mama']))\n\t\t\t\t{\n\t\t\t\t\t//Funcion para cargar una imagen y ponerla en la carpeta uploads que se encuentra en la carpeta raiz\n\t\t\t\t $target_dir = \"models/uploads/\";\n\t\t\t\t //Se obtiene el nombre de la foto\n\n\t\t\t\t $micro_date = microtime();\n \t\t$date_array = explode(\" \",$micro_date);\n \t\t$date = date(\"Y-m-dH-i-s\",$date_array[1]);\n\n \t\t$oldName = basename($_FILES[\"fileToUpload\"][\"name\"]);\n \t\t$photoName = explode(\".\", $oldName);\n \t\t$newName = $photoName[0] . \"_\" . $date . \".\" .$photoName[1];\n\n \n\n \t\t\t\t$_FILES[\"fileToUpload\"][\"name\"] = $newName;\n\n\t\t\t\t $target_file = $target_dir . $newName;\n\n\t\t\t\t //Se crea una bandera para saber si la foto se cargo correctamete\n\t\t\t\t $uploadOk = 1;\n\t\t\t\t $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));\n\t\t\t\t $check = getimagesize($_FILES[\"fileToUpload\"][\"tmp_name\"]);\n\t\t\t\t //Si se cargo la imagen podemos obtener el formato de la imagen\n\t\t\t\t if($check !== false) \n\t\t\t\t {\n\t\t\t\t echo \"File is an image - \" . $check[\"mime\"] . \".\";\n\t\t\t\t $uploadOk = 1;\n\t \t\t\t } \n\t \t\t\t //Tambien podemos saber si no es una imagen\n\t \t\t\t else \n\t \t\t\t {\n\t\t\t\t echo \"File is not an image.\";\n\t\t\t\t $uploadOk = 0;\n\t \t\t\t }\n\n\t\t\t\t\t // Check if file already exists\n\t\t\t\t\t if (file_exists($target_file)) \n\t\t\t\t\t {\n\t\t\t\t\t echo \"Sorry, file already exists.\";\n\t\t\t\t\t $uploadOk = 0;\n\t \t\t\t\t }\n\t\t\t\t\t // Check file size\n\t\t\t\t\t if ($_FILES[\"fileToUpload\"][\"size\"] > 500000) \n\t\t\t\t\t {\n\t\t\t\t\t echo \"Sorry, your file is too large.\";\n\t\t\t\t\t $uploadOk = 0;\n\t \t\t\t\t }\n\t\t\t\t\t // Allow certain file formats\n\t\t\t\t\t if($imageFileType != \"jpg\" && $imageFileType != \"png\" && $imageFileType != \"jpeg\"\n\t\t\t\t\t && $imageFileType != \"gif\" )\n\t\t\t\t\t {\n\t\t\t\t\t echo \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\";\n\t\t\t\t\t $uploadOk = 0;\n\t\t\t\t\t }\n\t\t\t\t\t // Check if $uploadOk is set to 0 by an error\n\t\t\t\t\t if ($uploadOk == 0)\n\t\t\t\t\t {\n\t\t\t\t\t echo \"Sorry, your file was not uploaded.\";\n\t\t\t\t\t // if everything is ok, try to upload file\n\t\t\t\t\t } \n\t\t\t\t\t else \n\t\t\t\t\t {\n\t\t\t\t \t\n\t\t\t\t \t\t//Si la imagen se cargo correctamente\n\t\t\t\t \t\tif (move_uploaded_file($_FILES[\"fileToUpload\"][\"tmp_name\"], $target_file)) \n\t\t\t\t \t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\n \t\t\t\techo \"The file \". basename( $_FILES[\"fileToUpload\"][\"name\"]). \" has been uploaded.\";\n\n\n\t\t\t\t\t\t //Se crean las variables para el registro del pago en la base de datos\n\t\t\t\t\t\t $fileName = basename( $_FILES[\"fileToUpload\"][\"name\"]);\n\t\t\t\t\t\t $oringialDate = $_POST['fecha_pago'];\n\t\t\t\t\t\t\t $actualDate = date(\"Y-m-d\",strtotime($oringialDate));\n\t\t\t\t\t\t\t $fecha = date(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t $datosController = array(\"id_alumna\"=>$_POST['alumnas'],\n\t\t\t\t\t\t \t\t\t\t\t \"id_grupo\"=>$_POST['grupo'],\n\t\t\t\t\t\t \t\t\t\t\t \"nombreMama\"=>$_POST['mama'],\n\t\t\t\t\t\t \t\t\t\t\t \"fecha_pago\"=>$actualDate,\n\t\t\t\t\t\t \t\t\t\t\t \"fecha_envio\"=>$fecha,\n\t\t\t\t\t\t \t\t\t\t\t \"ruta\"=> $fileName,\n\t\t\t\t\t\t \t\t\t\t\t \"folio\"=>$_POST['folio']);\n\n\t\t\t\t\t\t $respuesta = Datos::registrarPagoModel($datosController,'pagos');\n\t\t\t\t\t\t if($respuesta == \"success\")\n\t\t\t\t\t\t \t {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t\n \t\t\t\t \t }\n \t\t\t\t}\n\n \t\t\t}\n\t\t}",
"private function processUpdateUser(){\n\n\t\tif($_FILES[\"foto_usuario\"][\"error\"] == 0){\n\t\t\t$randNumber = rand(0, 999999);\n\t\t\t$imgName = $randNumber . $_FILES['foto_usuario']['name'];\n\t\t\t$image_upload = Config::$userDirImage . $imgName;\n\t\t\tif (move_uploaded_file($_FILES['foto_usuario']['tmp_name'], $image_upload)) {\n\t\t\t\t$result = $this->users->updateUser($_REQUEST[\"idusuario\"], $imgName); //Devuelve 1 si inserta user\n\t\t\t\tif($result){\n\t\t\t\t\tif($_REQUEST[\"nombre_foto\"] != \"\")\n\t\t\t\t\t\tunlink(Config::$userDirImage.$_REQUEST[\"nombre_foto\"]);\n\t\t\t\t\tView::redireccion(\"user\", \"userController\");\n\t\t\t\t} else {\n\t\t\t\t\tunlink($image_upload);\n\t\t\t\t\techo \"Ocurrio un error al insertar el usuario.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo \"Ocurrio un error al guardar el archivo.\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Ocurrio un error al cargar el archivo.\";\n\t\t}\n\t}",
"function add_upload_repositorio($name,$id_directorio,$directorio,$id_usuario) {\n\t\t\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$ssql = \"INSERT INTO repositorio_archivos\n\t\t(file_name,id_directorio) \n\t\tVALUES ('$name','$id_directorio')\";\n\t\t\t\n\t\t\t//lo inserto en la base de datos\n\t\t\tif (mysql_query($ssql,$connection)){\n\t\t\t\t//recibo el último id\n\t\t\t\t$ultimo_id = mysql_insert_id($connection);\n\t\t\t\t$extension = strtolower(substr(strrchr($name, \".\"), 1));\n\t\t\t\t\n\t\t\t\t$nombre_archivo=$ultimo_id.'.'.$extension;\n\t\t\t\t$UpdateRecords = \"UPDATE repositorio_archivos SET file_name='$nombre_archivo', ruta_file='$directorio', id_usuario='$id_usuario' WHERE file_id='$ultimo_id'\";\n \t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\t\t$result = mysql_query($UpdateRecords); \t\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn $nombre_archivo;\n\t\t\t}else{\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn false;\n\t\t\t} \t\t\n\t}",
"public function guardarPerfil($data)\n {\n $id = $data['id'];\n $res = 'No se selecciono archivo';\n if (!empty($_FILES)) {\n $archivo = mysqli_real_escape_string($this->db, $_FILES['perfil']['name']);\n $targetDir = \"../data/\" . $id . \"/perfil\";\n if (!file_exists($targetDir)) {\n mkdir($targetDir, 0777, true);\n }\n $targetDir = $targetDir . \"/\";\n $file = $_FILES['perfil']['tmp_name'];\n $basename = basename($_FILES['perfil']['name']);\n move_uploaded_file($file, $targetDir . $basename);\n $query = \"\n UPDATE obras\n SET perfil='$archivo'\n WHERE id='$id'\n \";\n $res = $this->db->query($query);\n if ($res) {\n $res = \"1\";\n }\n }\n\n return $res;\n }",
"public function createAction(Request $request) {\n $this->get('session')->getFlashBag()->clear();\n $em = $this->getDoctrine()->getManager();\n $entity = new Perfil();\n $form = $this->createForm(PerfilType::class, $entity);\n // $form->submit($request);\n $form->handleRequest($request);\n \n $data = $form->getData('pac_usuariobundle_perfiltype')->getRoles()->toArray();\n if ($form->isValid()) { \n if (count($entity->getRolesArray()) == 0) {\n $this->setFlash('error', 'Debe elegir por lo menos un Rol');\n return $this->render('UsuarioBundle:Perfil:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }\n if (array_key_exists('roles', $data)) {\n $roles_seleccionados = $data['roles'];\n if (!$this->pagInicioDefaultValid($roles_seleccionados)) {\n $this->setFlash('error', 'Debe elegir una página inicio default que esté relacionada con el Rol');\n return $this->render('UsuarioBundle:Perfil:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }\n }\n $em = $this->getDoctrine()->getManager();\n $entity->setFechaAlta(new \\DateTime());\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('perfil'));\n }\n $this->setFlash('error', 'No se han realizado los siguientes cambios.');\n\n return $this->render('UsuarioBundle:Perfil:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }",
"function OnPostForm()\n {\n $this->SaveFile(\"siteCoatUser\", Array(\"extensions\" => \"gif,jpg,jpeg,png\", \"max_height\" => 139, \"max_width\" => 139, \"make_preview\" => \"N\"));\n }",
"public function usuarios(){\n return $this->belongsToMany('App\\Usuarios','perfiles_usuarios','perfil_fk_pu', 'usuario_fk_pu');\n }",
"function onlyoffice_dndupload_register(): array {\n $extensions = onlyoffice::get_accepted_types();\n $strdnd = get_string('dnduploaddocument', 'mod_onlyoffice');\n $files = [];\n\n foreach ($extensions as $extn) {\n $extn = trim($extn, '.');\n $files[] = ['extension' => $extn, 'message' => $strdnd];\n }\n\n return ['files' => $files];\n}",
"public function userCreate($user) {\n// if (!is_file('./users/users.txt')) { RAjouter tableau ou donnees seront stockees et serialize ensuite après ajout\n\n if (!is_dir('./users')) {\n mkdir('./users');\n } else {\n $tab = [];\n if (!is_file('./users/users.bin')) {\n $file = fopen('./users/users.bin', 'w+');\n array_push($tab, $user);\n fwrite($file, serialize($tab));\n fclose($file);\n } else {\n $datas = file_get_contents('./users/users.bin');\n $useruns = unserialize($datas);\n $file = fopen('./users/users.bin', 'w+');\n array_push($useruns, $user);\n fwrite($file, serialize($useruns));\n fclose($file);\n }\n }\n }",
"public function store(Request $request)\n {\n //\n try{\n $user = new User();\n $user->cedula = $request->cedula_usuario;\n $user->nombres = $request->nombres_usuario;\n $user->apellidos = $request->apellidos_usuario;\n $user->iniciales = strtoupper( $request->iniciales_usuario );\n $user->telefono = $request->telefono_usuario;\n if($request->hasFile('foto_usuario')){\n $user->foto = $request->file('foto_usuario')->store('public');\n }else{\n $user->foto = 'default-user.jpg';\n }\n $user->email = $request->email_usuario;\n $user->permisos = array([\n 'crear_clientes' => isset($request->crear_clientes) ? 'true' : 'false',\n 'ver_clientes' => isset($request->ver_clientes) ? 'true' : 'false',\n 'crear_docs' => isset($request->crear_docs) ? 'true' : 'false',\n 'asignar_metas' => isset($request->asignar_metas) ? 'true' : 'false',\n 'ver_progresos' => isset($request->ver_progresos) ? 'true' : 'false',\n 'ver_comisiones' => isset($request->ver_comisiones) ? 'true' : 'false',\n 'resumen_comisiones' => isset($request->resumen_comisiones) ? 'true' : 'false',\n 'clientes_cerrados' => isset($request->clientes_cerrados) ? 'true' : 'false',\n 'asignar_facturas' => isset($request->asignar_facturas) ? 'true' : 'false',\n 'control_pagos' => isset($request->control_pagos) ? 'true' : 'false',\n 'agendar_servicios' => isset($request->agendar_servicios) ? 'true' : 'false',\n 'horarios_tecnicos' => isset($request->horarios_tecnicos) ? 'true' : 'false',\n 'listado_servicios' => isset($request->listado_servicios) ? 'true' : 'false',\n 'recepcion_docs' => isset($request->recepcion_docs) ? 'true' : 'false',\n 'inventario_docs' => isset($request->inventario_docs) ? 'true' : 'false',\n 'reporte_docs' => isset($request->reporte_docs) ? 'true' : 'false',\n 'crear_novedades' => isset($request->crear_novedades) ? 'true' : 'false',\n 'crear_tecnicos' => isset($request->crear_tecnicos) ? 'true' : 'false',\n 'crear_usuarios' => isset($request->crear_usuarios) ? 'true' : 'false',\n 'reporte_ganancias' => isset($request->reporte_ganancias) ? 'true' : 'false',\n 'gestion_productos' => isset($request->gestion_productos) ? 'true' : 'false',\n 'gastos' => isset($request->gastos) ? 'true' : 'false'\n ]);\n \n $user->password = bcrypt($request->contrasena_user);\n $user->cargo_id = $request->cargo_usuario;\n switch ($request->cargo_usuario) {\n case '1':\n $user->area_id = '1';\n break;\n case '2':\n $user->area_id = '2';\n break;\n case '3':\n $user->area_id = '3';\n break;\n case '4':\n $user->area_id = '1';\n break;\n case '5':\n $user->area_id = '4';\n break;\n case '6':\n $user->area_id = '5';\n break;\n default:\n $user->area_id = '6';\n break;\n }\n $user->save();\n \n \\Flash::success('Usuario creado correctamente.')->important();\n return Redirect::to('/users/create');\n } catch(\\Exception $e){\n \\Flash::error('Ha ocurrido un error inesperado, intentelo nuevamente.')->important();\n return Redirect::to('/users/create');\n }\n }",
"function wp_register_user_personal_data_exporter($exporters)\n {\n }",
"public function accionPerfilRestaurante(){\n // (si es que hay alguno logueado)\n $sw = false;\n $codRole = 0;\n \n if(Sistema::app()->Acceso()->hayUsuario()){\n $sw = true;\n \n $nick = Sistema::app()->Acceso()->getNick();\n $codRole = Sistema::app()->ACL()->getUsuarioRole($nick);\n \n }\n \n // Si el usuario que intenta acceder es un artista, administrador\n // o simplemente no hay usuario validado, lo mando a una página de\n // error. Los restaurantes tienen el rol 6\n if(!$sw || $codRole != 6){\n Sistema::app()->paginaError(403, \"No tiene permiso para acceder a esta página.\");\n exit();\n }\n \n // Una vez comprobado que está accediendo un restaurante, procedo a\n // obtener los datos del restaurante\n $res = new Restaurantes();\n \n // El nick del usuario es el correo electrónico. Es un valor\n // único, por lo que puedo buscar el restaurante por\n // su dirección de correo\n if(!$res->buscarPor([\"where\"=>\"correo='$nick'\"])){\n \n Sistema::app()->paginaError(300,\"Ha habido un problema al encontrar tu perfil.\");\n return;\n \n }\n \n $imagenAntigua = $res->imagen;\n $nombre=$res->getNombre();\n \n // Si se modifican los datos del restaurante, esta variable\n // pasará a true para notificar a la vista\n $resModificado = false;\n if (isset($_POST[$nombre]))\n {\n $hayImagen = true;\n // Si ha subido una nueva imagen, recojo su nombre\n if($_FILES[$nombre][\"name\"][\"imagen\"]!=\"\"){\n $_POST[$nombre][\"imagen\"] = $_FILES[$nombre][\"name\"][\"imagen\"];\n }\n else{\n $hayImagen = false;\n $_POST[\"nombre\"][\"imagen\"] = $res->imagen;\n }\n \n // El coreo es una clave foránea, así que tengo\n // que cambiar el correo en la tabla ACLUsuarios\n Sistema::app()->ACL()->setNick($nick, $_POST[\"nombre\"][\"correo\"]);\n \n $res->setValores($_POST[$nombre]);\n \n if ($res->validar())\n {\n // Si se ha guardado correctamente, actualizo la imagen de perfil\n // e inicio sesión con el nuevo correo automáticamente\n if ($res->guardar()){\n $resModificado = true;\n if($hayImagen){\n // Obtengo la carpeta destino de la imagen\n $carpetaDestino = $_SERVER['DOCUMENT_ROOT'].\"/imagenes/restaurantes/\";\n // Elimino la imagen antigua\n unlink($carpetaDestino.$imagenAntigua);\n \n // Y guardo la nueva\n move_uploaded_file($_FILES['nombre']['tmp_name']['imagen'], $carpetaDestino.$_POST[\"nombre\"][\"imagen\"]);\n }\n Sistema::app()->Acceso()->registrarUsuario(\n $_POST[\"nombre\"][\"correo\"],\n mb_strtolower($res->nombre),\n 0,\n 0,\n [0,0,0,0,0,1,1,1,1,1]);\n }\n \n }\n }\n \n $this->dibujaVista(\"perfilRestaurante\",\n [\"res\"=>$res, \"resModificado\"=>$resModificado],\n \"Perfil\");\n \n }",
"public function RegisterRolesAndPermissions()\n {\n //create role by defined default data in config->permission.php\n //if don't exist in database\n if (Role::where('name', config('permission.default_roles')[0])->count() <1){\n foreach (config('permission.default_roles') as $role){\n Role::create([\n 'name' => $role,\n ]);\n }\n }\n\n //create permission by defined default data in config->permission.php\n //if don't exist in database\n if (Permission::where('name', config('permission.default_permission')[0])->count() <1) {\n foreach (config('permission.default_permission') as $permission) {\n Permission::create([\n 'name' => $permission,\n ]);\n }\n }\n }",
"public function SaveRegistrateAction(Request $request) {\n $peoples= new PhpposPeople();\n $employees= new PhpposEmployees(); \n $em = $this->getDoctrine()->getManager();\n if ($request->get('Clave1')==$request->get('Clave2')){\n\n //////people/////////////////////////////////\n $peoples->setFirstName($request->get('FirstName'));\n $peoples->setLastName($request->get('LastName'));\n $peoples->setEmail($request->get('Email'));\n $peoples->setPhoneNumber($request->get('PhoneNumber'));\n $peoples->setAddress1($request->get('Address1'));\n $peoples->setAddress2($request->get('Address2'));\n $peoples->setCity($request->get('City'));\n $peoples->setState($request->get('State'));\n $peoples->setZip($request->get('Zip'));\n $peoples->setCountry($request->get('Country'));\n $peoples->setComments('Cliente se registro por Alfalibros'); \n $em->persist($peoples);\n $em->flush();\n ///////employeers///////////////////////////////\n $findPeople = $this->getDoctrine()\n ->getRepository('principalBundle:PhpposPeople')\n ->findOneBy(array('email' => $request->get('Email')));\n $employees->setUsername($request->get('Email'));\n $employees->setPassword(md5($request->get('Clave1')));\n $employees->setLanguage('spanish');\n $employees->setPerson($findPeople);\n $em->persist($employees);\n $em->flush(); \n \n\n }\n return $this->redirect($this->generateUrl('inicio'));\n }",
"public function registerDirectories()\n {\n // Publish config files\n $this->publishes(\n [\n // Paths\n $this->getPublishesPath('config'.DIRECTORY_SEPARATOR.'porteiro.php') => config_path('porteiro.php'),\n ],\n ['config', 'sitec', 'sitec-config']\n );\n\n // // Publish porteiro css and js to public directory\n // $this->publishes([\n // $this->getDistPath('porteiro') => public_path('assets/porteiro')\n // ], ['public', 'sitec', 'sitec-public']);\n\n $this->loadViews();\n $this->loadTranslations();\n }",
"function XMLUserPeer() {\n global $g, $config;\n\n parent::AbstractUserPeer();\n\n if (isset($config['system']['user'])) {\n $i = 0;\n\n foreach($config['system']['user'] as $userent) {\n $this->user_index[$userent['name']] = $i;\n $this->addUserFromEnt($userent);\n $i++;\n }\n }\n }",
"public function uploadProfilePicture()\n {\n // nécessaire de le nettoyer pour éviter les problèmes de sécurité\n\n // move copie le fichier présent chez le client dans le répertoire indiqué.\n $this->file->move($this->getUploadRootDir(), $this->file->getClientOriginalName());\n\n // On sauvegarde le nom de fichier\n $this->nomImage = $this->file->getClientOriginalName();\n\n // La propriété file ne servira plus\n $this->file = null;\n }",
"function writeFile($data) {\n\t$my_file = \"users.json\";\n\t$users = [];\n\tif(file_exists($my_file)){\n\t\t$users = json_decode(file_get_contents($my_file), true);\n\t}\n\t$users[] = $data;\n\t$jsonData = json_encode($users);\n\tfile_put_contents($my_file, $jsonData);\n}",
"private function registrarLocalmente()\n\t{\n\t\t$conexionBd = new ConectorBaseDatos();\n\t\t$conexionBd->Sentencia = sprintf(\"INSERT UsuarioFacebook (IdFacebook, DatosFacebook, ValidadoPor, FbAccessToken) VALUES (%s, %s, NULL, %s)\",\n\t\t$conexionBd->Escapar($this->IdFacebook),\n\t\t$conexionBd->Escapar(addslashes(serialize($this->DatosFacebook))),\n\t\t$conexionBd->Escapar($this->accessToken)\n\t\t);\n\t\t$conexionBd->EjecutarComando();\n\t\t$conexionBd->Desconectar();\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 static function upload_id()\n\t{\n $j = 0; \n \n\t\t//if folder doesn't exist create it\n\t\tif (!file_exists(SURL_PUB . \"/userverify/\" . Session::get('user_id') . \"/\")) {\n mkdir(SURL_PUB . \"/userverify/\" . Session::get('user_id'). \"/\", 0777);\n }\n \n\t // Declaring Path for uploaded images.\n\t $target_path = SURL_PUB . \"/userverify/\" . Session::get('user_id') . \"/\"; \n \n\t\tfor ($i = 0; $i < count($_FILES['file']['name']); $i++)\n\t\t{\n // Extensions which are allowed.\n $validextensions = array(\n \"jpeg\",\n \"jpg\",\n \"png\"); \n \n\t\t\t\t// Explode file name from dot(.)\n\t\t\t\t$ext = explode('.', basename($_FILES['file']['name'][$i]));\n \n\t\t\t\t// Store extensions in the variable.\n\t\t\t\t$file_extension = end($ext); \n \n\t\t\t\t// Set the target path with a new name of image.\n\t\t\t\t$target_path = $target_path . md5(uniqid()) . \".\" . $ext[count($ext) - 1]; \n \n\t\t\t\t// Increment the number of uploaded images according to the files in array.\n\t\t\t\t$j = $j + 1; \n \n\t\t\t\t//if it's below max file size and a valid image carry on\n\t\t\t\tif (($_FILES[\"file\"][\"size\"][$i] < MAX_FILE_SIZE) && in_array($file_extension, $validextensions)) \n\t\t\t\t{\n if (move_uploaded_file($_FILES['file']['tmp_name'][$i], $target_path)) {\n \n\t\t\t\t\t\t//get the users info\n\t\t\t\t\t\t$user = UserModel::user();\n \n\t\t\t\t\t\t//all their images\n\t\t\t\t\t\t$allimgs = $verimgs->user_verifyimg . \",\" . $target_path;\n \n\t\t\t\t\t\t//run the sql\n\t\t\t\t\t\t$insert = $database->prepare(\"UPDATE user SET user_verifyimg = ? WHERE user_id = ?\");\n\t\t\t\t\t\t$insert->execute(array($allimgs, Session::get('user_id')));\n \n\t\t\t\t\t\t//update their information\n\t\t\t\t\t\t$this->model->userverifydetails(Request::post('firstname'), Request::post('lastname'), Request::post('address1'), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRequest::post('address2'), Request::post('city'), Request::post('zip'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRequest::post('state'), Request::post('country'), Request::post('dob'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSession::get('user_id'));\n \n NotificationsModel::addmessage(\"You have submitted verification details\", \"You have recently submitted information for our user \n\t\t\t\t\t\t\t\t\t\t\t\t\tverification. Our team will verify this <b><u>as soon as possible</u></b>\", Session::get('user_id'), \"System\", \"account\");\n \n\t\t\t\t\t\t//success message here\n \n } else { \n echo $j . ').<span id=\"error\">please try again!.</span><br/><br/>';\n }\n } else { \n echo $j . ').<span id=\"error\">***Invalid file Size or Type***</span><br/><br/>';\n }\n }\n }",
"static public function ctrCreateUser(){\n\t\t\tif(isset($_POST[\"nuevoUsuario\"])){\n\t\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/',$_POST[\"nuevoNombre\"]) &&\n\t\t\t\t\tpreg_match('/^[a-zA-Z0-9]+$/',$_POST[\"nuevoUsuario\"]) &&\n\t\t\t\t\tpreg_match('/^[a-zA-Z0-9]+$/',$_POST[\"nuevoPassword\"])){\n\n\t\t\t\t\t/*========================================\n\t\t\t\t\t\tV A L I D A R I M A G E N\n\t\t\t\t\t========================================*/\n\t\t\t\t\t\n\t\t\t\t\t$ruta = NULL;\n\n\t\t\t\t\tif(isset($_FILES[\"nuevaFoto\"][\"tmp_name\"]) && $_FILES[\"nuevaFoto\"][\"tmp_name\"] != \"\"){\n\t\t\t\t\t\tlist($ancho, $alto) = getimagesize($_FILES[\"nuevaFoto\"][\"tmp_name\"]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$nuevoAncho = 500;\n\t\t\t\t\t\t$nuevoAlto = 500;\n\n\t\t\t\t\t\t/*---------------------------------------------\n\t\t\t\t\t\t\tCREAR DIRECTORIO DONDE SE GUARDA LA FOTO\n\t\t\t\t\t\t---------------------------------------------*/\n\t\t\t\t\t\t$directorio = \"view/img/usuarios/\".$_POST[\"nuevoUsuario\"];\n\t\t\t\t\t\tmkdir($directorio, 0755);\n\n\t\t\t\t\t\t/*---------------------------------------------\n\t\t\t\t\t\t\tDE ACUERDO AL TIPO DE IMAGEN ACCIONES\n\t\t\t\t\t\t---------------------------------------------*/\n\t\t\t\t\t\t$rand = mt_rand(100, 999);\n\n\t\t\t\t\t\t//------------------ IMAGEN JPEG ------------------\n\t\t\t\t\t\tif($_FILES[\"nuevaFoto\"][\"type\"] == \"image/jpeg\"){\n\t\t\t\t\t\t\t//Guardamos Imagen en el Directorio\n\t\t\t\t\t\t\t$ruta = \"view/img/usuarios/\".$_POST[\"nuevoUsuario\"].\"/\".$rand.\".jpeg\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$origen = imagecreatefromjpeg($_FILES[\"nuevaFoto\"][\"tmp_name\"]);\n\t\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\t\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t\t\t\t\timagejpeg($destino, $ruta);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($_FILES[\"nuevaFoto\"][\"type\"] == \"image/png\"){\n\t\t\t\t\t\t\t//Guardamos Imagen en el Directorio\n\t\t\t\t\t\t\t$ruta = \"view/img/usuarios/\".$_POST[\"nuevoUsuario\"].\"/\".$rand.\".png\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$origen = imagecreatefrompng($_FILES[\"nuevaFoto\"][\"tmp_name\"]);\n\t\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\t\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t\t\t\t\timagepng($destino, $ruta);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tabla = \"usuarios\";\n\n\t\t\t\t\t$crPassword = crypt($_POST[\"nuevoPassword\"], '$2a$08$abb55asfrga85df8g42g8fDDAS58olf973adfacmY28n05$');\n\t\t\t\t\t$datos = array(\n\t\t\t\t\t\t\"nombre\"=>$_POST[\"nuevoNombre\"],\n\t\t\t\t\t\t\"usuario\" => $_POST[\"nuevoUsuario\"],\n\t\t\t\t\t\t\"password\" => $crPassword,\n\t\t\t\t\t\t\"perfil\" => $_POST[\"nuevoPerfil\"],\n\t\t\t\t\t\t\"ruta\" => $ruta);\n\n\t\t\t\t\t$respuesta = ModelUsers::mdlAddUser($tabla, $datos);\n\n\t\t\t\t\tif($respuesta){\n\t\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"El usuario se ha guardado correctamente\",\n\t\t\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t\t\t}).then((result=>{\n\t\t\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"users\"\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</script>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"Error al añadir usuario\",\n\t\t\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t\t\t}).then((result=>{\n\t\t\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"users\"\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</script>';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"El usuario no puede ir vacio ni llevar caracteres especiales\",\n\t\t\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t\t\t}).then((result=>{\n\t\t\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"users\"\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</script>';\n\t\t\t\t} \n\t\t\t\t\n\t\t\t}\n\t\t}",
"function ctrActualizarPerfil()\n {\n if (isset($_POST['editarNombre'])) {\n\n\n /*====================================*/\n /*VALIDAR IMAGEN QUE SUBE COMO FOTO*/\n /*====================================*/\n $ruta = \"\";\n $directorio = \"vistas/img/usuarios/{$_POST['idUsuario']}\";\n if (isset($_FILES['datosImagen']['tmp_name'])) {\n\n //primero preuntamos si existe otra imagen en la base de datos\n if (!empty($_POST['foto'])) { // valido el post oculto de foto\n unlink($_POST['foto']); //eliminamos el archivo en el hosting\n unlink($directorio);\n } else {\n // si no existe ninguna imagen, creamos el directorio\n @mkdir($directorio, 0755); // pasamos el directorio, y los permisos\n }\n\n\n $aleatorio = mt_rand(100, 999);\n $ruta = \"vistas/img/usuarios/{$_POST['idUsuario']}/\" . $aleatorio . \".jpg\"; // ruta de la foto a almcenar\n\n //Modificamos tamaño de la foto\n //capturao en un array las medidas ancho y alto\n // list (0 , 1) // indices\n list($ancho, $alto) = getimagesize($_FILES['datosImagen']['tmp_name']);\n\n $nuevoAncho = 500;\n $nuevoAlto = 500;\n\n\n /*=====================================*/\n /*SOLO SIRVE PARA IAMGEN JPG JPEG*/\n /*=====================================*/\n\n //creamos una nueva imagen\n $origen = imagecreatefromjpeg($_FILES['datosImagen']['tmp_name']);\n\n $destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n //cortamos la imagen pasando los parametros\n //(destino, origen, posicionx, posiciony, )\n imagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\n imagejpeg($destino, $ruta);\n\n\n }\n\n\n //validacion si se escibio algo en el input de contraseña\n if ($_POST['editarPassword'] != \"\") {\n $password = $_POST['passUsuario'];\n } else {\n\n $password = crypt($_POST['editarPassword'], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\n }\n\n\n $datos = [\n 'nombre' => $_POST['editarNombre'],\n 'email' => $_POST['editarEmail'],\n 'password' => $password,\n 'foto' => $ruta,\n 'id' => $_POST['idUsuario']\n ];\n\n $tabla = 'usuarios';\n $respuesta = @ModeloUsuarios::mdlActualizarPerfil($tabla, $datos);\n\n if ($respuesta == 'ok') {\n //si se ejcuto el update, actualizacmos las variables de sesion del usuario\n\n @session_start();\n $_SESSION['validarSesion'] = 'ok';\n $_SESSION['id'] = $datos['id'];\n $_SESSION['nombre'] = $datos['nombre'];\n $_SESSION['foto'] = $datos['foto'];\n $_SESSION['email'] = $datos['email'];\n $_SESSION['password'] = $datos['password'];\n $_SESSION['modo'] = $_POST['modoUsuario'];\n\n echo '<script> \n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t title: \"¡OK!\",\n\t\t\t\t\t\t\t\t text: \"¡Su cuenta ha sido actualizada correctamente\",\n\t\t\t\t\t\t\t\t type:\"success\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tfunction (isConfirm){\n\t\t\t\t\t\t\t if(isConfirm){\n\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t</script>';\n\n }\n\n }\n }",
"public function setPFP($payload){\n $user = User::getByUsername($payload['username']);\n if(!$user || $user[0][\"UID\"] != $payload[\"session_id\"]){\n throw new error(\"User does not have permission with credentials\");\n return false;\n }else{\n self::setCurrentTable(\"userdata\");\n $pfp = $payload[\"file\"];\n $cols = array(\"ProfilePic\");\n $vals = array($pfp);\n User::update($cols, $vals, base64_encode($payload['username']));\n return true;\n }\n \n }",
"private function saveMemberToFile($user) {\n $this->users[count($this->users)] = $user;\n $usersJSON = json_encode($this->users);\n if (file_put_contents(self::$storageFile, $usersJSON) == false) {\n throw new \\Exception(\"Could not save user\");\n \n }\n}",
"public function register(Request $request, UserPasswordEncoderInterface $encoder){\n $user = new User();\n $slugify = new Slugify();\n\n $manager = $this->getDoctrine()->getManager();\n\n $form = $this->createForm(RegistrationType::class, $user);\n\n $form->handleRequest($request); // gère le formulaire\n\n if($form->isSubmitted() && $form->isValid()){\n $hash = $encoder->encodePassword($user, $user->getHash());\n $user->setHash($hash);\n\n $slug = $slugify->slugify($user->getFirstName() . \" \" . $user->getLastName());\n $user->setSlug($slug);\n\n\n //on récupere les images transmises\n $image = $form->get('picture')->getData();\n //on génére un nouveau nom de fichier\n $fichier = \"uploads/\" . md5(uniqid()) . '.' . $image->guessExtension(); \n //on copier le fichier dans le dossier uploads\n $image->move(\n $this->getParameter('images_directory'),\n $fichier\n );\n\n $user->setPicture($fichier);\n\n\n\n $manager->persist($user);\n $manager->flush();\n\n $this->addFlash('success', \"Votre compte a bien été crée ! Vous pouvez maintenant vous connecter !\");\n\n return $this->redirectToRoute(\"app_login\");\n }\n\n return $this->render('account/registration.html.twig', [\n 'form' => $form->createView()\n ]);\n\n\n }",
"function inscription(array $user){ \n \n //Recupere tous les utilisateurs du fichier sous forme de Tableau\n $arr_users=getAllUsers();\n // Ajoute le User dans le Tableau\n $arr_users[]=$user;\n //Convertir le Tableau en Chaine\n $str_user=json_encode($arr_users,JSON_PRETTY_PRINT);\n //Ajouter la chaine dans le Fichier\n file_put_contents(FILE_NAME,$str_user); \n\n }",
"public function accionPerfilArtista(){\n // (si es que hay alguno logueado)\n $sw = false;\n $codRole = 0;\n \n if(Sistema::app()->Acceso()->hayUsuario()){\n $sw = true;\n \n $nick = Sistema::app()->Acceso()->getNick();\n $codRole = Sistema::app()->ACL()->getUsuarioRole($nick);\n \n }\n \n // Si el usuario que intenta acceder es un restaurante, administrador\n // o simplemente no hay usuario validado, lo mando a una página de\n // error. Los artistas tienen el rol 5\n if(!$sw || $codRole != 5){\n Sistema::app()->paginaError(403, \"No tiene permiso para acceder a esta página.\");\n exit();\n }\n \n // Una vez comprobado que está accediendo un artista, procedo a\n // obtener los datos del artista\n $art = new Artistas();\n \n // El nick del usuario es el correo electrónico. Es un valor\n // único, por lo que puedo buscar al artista por\n // su dirección de correo\n if(!$art->buscarPor([\"where\"=>\"correo='$nick'\"])){\n \n Sistema::app()->paginaError(300,\"Ha habido un problema al encontrar tu perfil.\");\n return;\n \n }\n \n $imagenAntigua = $art->imagen;\n $nombre=$art->getNombre();\n \n // Si se modifican los datos del artista, esta variable\n // pasará a true para notificar a la vista\n $artistaModificado = false;\n if (isset($_POST[$nombre]))\n {\n $hayImagen = true;\n // Si ha subido una nueva imagen, recojo su nombre\n if($_FILES[\"nombre\"][\"name\"][\"imagen\"]!=\"\"){\n $_POST[\"nombre\"][\"imagen\"] = $_FILES[\"nombre\"][\"name\"][\"imagen\"];\n }\n else{\n $hayImagen = false;\n $_POST[\"nombre\"][\"imagen\"] = $art->imagen;\n }\n // El coreo es una clave foránea, así que tengo\n // que cambiar el correo en la tabla ACLUsuarios\n Sistema::app()->ACL()->setNick($nick, $_POST[\"nombre\"][\"correo\"]);\n \n $art->setValores($_POST[$nombre]);\n \n if ($art->validar())\n {\n // Si se ha guardado correctamente, actualizo la imagen de perfil\n // e inicio sesión con el nuevo correo automáticamente\n if ($art->guardar()){\n $artistaModificado = true;\n if($hayImagen){\n // Obtengo la carpeta destino de la imagen\n $carpetaDestino = $_SERVER['DOCUMENT_ROOT'].\"/imagenes/artistas/\";\n // Elimino la imagen antigua\n unlink($carpetaDestino.$imagenAntigua);\n \n // Y guardo la nueva\n move_uploaded_file($_FILES['nombre']['tmp_name']['imagen'], $carpetaDestino.$_POST[\"nombre\"][\"imagen\"]);\n }\n Sistema::app()->Acceso()->registrarUsuario(\n $_POST[\"nombre\"][\"correo\"],\n mb_strtolower($art->nombre),\n 0,\n 0,\n [1,1,1,1,1,0,0,0,0,0]);\n }\n \n }\n }\n \n $this->dibujaVista(\"perfilArtista\",\n [\"art\"=>$art, \"artistaModificado\"=>$artistaModificado],\n \"Perfil\");\n \n }",
"private function mprofil() {\n\t\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t\t$this->_ctrlAdmin->userProfil();\n\t}",
"function acao_perfilBoleto( $user ) {\n\t// @requer funcaoDesteUsuario\n\t$funcao = funcaoDesteUsuario( $user );\n\tif ( $funcao == FUNCAO_REPRESENTANTE ) :\n\t\t$user_meta_image = get_the_author_meta( 'user_meta_image', $user->ID );\n\t\t?>\n\t\n\t\t<!-- CONDICAO SOMENTE BOLETO -->\n\t\t<script type=\"text/javascript\">\n\t\t\n\t\t\tjQuery(document).ready( function( $ ) {\n\n\t\t\t\t$( \".media-button-insert\" ).click(function() {\n\t\t\t\t\tvar boleto_user = $('.link-to-custom').val();\n\t\t\t\t\t$('#user_meta_image').val(boleto_user);\n\n\t\t\t\t});\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\t// Esconde o User Role Editor, que não é utilizado\n\t\t\tjQuery('#your-profile table:last-of-type').hide();\n\t\t\tjQuery('#your-profile h3:last-of-type').hide();\n\t\t\n\t\t</script>\n\n\t\t<h3 id=\"boleto\">Boleto</h3>\n\n\t\t<table class=\"form-table\">\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">Cadastrar URL do boleto</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\n\t\t\t\t\t\t<input type=\"text\" name=\"user_meta_image\" id=\"user_meta_image\" value=\"<?php echo esc_url_raw( $user_meta_image ); ?>\" size='40' />\n\t\t\t\t\t\t<input type=\"button\" class='button-secondary' id=\"upload_pdf_button\" value=\"Procurar/Subir PDF…\" />\n\t\t\t\t\t\t<?php if ( !$user_meta_image ) : ?>\n\t\t\t\t\t\t\t<p class=\"description\">Após escolher o arquivo, você deve Atualizar o perfil deste usuário para habilitar a opção de Enviar o boleto.</p>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<?php if ( $user_meta_image ) : ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">Enviar boleto</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<a class='btn btn-primary' data-toggle='modal' href='#modal-id'>Enviar boleto para e-mail</a>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t// Insere o HTML do modal fora do form, para não dar conflito\n\t\t\t\t\t\tadd_action( 'admin_footer', 'acao_perfilBoletoModal', 10, 0 );\n\t\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<?php endif; ?>\n\t\t\t</tbody>\n\t\t</table>\n\n\t\t<?php\n\tendif;\n\t// FIM function additional_user_fields\n}",
"public function store(Request $request) {\n $users = $request->get('users');\n\n foreach ($users as $user) {\n $user = User::find($user);\n $user->attachPermission($request->get('permission'));\n }\n return redirect()->back();\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 d4os_io_db_070_users_add_extra_fields(&$user) {\n if (module_exists('d4os_io_services_profile')) {\n $properties = d4os_io_db_070_os_profile_services_avatar_properties_request(array('avatar_id' => $user->UUID));\n if (isset($properties['data'][0])) {\n $user->profileURL = $properties['data'][0]['ProfileUrl'];\n $user->profileImage = $properties['data'][0]['Image'];\n $user->profileAboutText = $properties['data'][0]['AboutText'];\n $user->profileFirstImage = $properties['data'][0]['FirstLifeImage'];\n $user->profileFirstText = $properties['data'][0]['FirstLifeAboutText'];\n $user->profilePartner = $properties['data'][0]['Partner'];\n\n //$user->profileAllowPublish = $properties['data'][0]['profileAllowPublish'];\n //$user->profileMaturePublish = $properties['data'][0]['profileMaturePublish'];\n\n // interests\n $user->profileWantDoMask = $properties['data'][0]['wantmask'];\n $user->profileWantToText = $properties['data'][0]['wanttext'];\n $user->profileSkillsMask = $properties['data'][0]['skillsmask'];\n $user->profileSkillsText = $properties['data'][0]['skillstext'];\n $user->profileLanguages = $properties['data'][0]['languages'];\n }\n }\n}",
"public function update(Request $request, User $usuario)\n {\n try{\n $this->authorize($usuario);\n\n $validator = Validator::make($request->all(), [\n 'name' => 'required|string|max:255',\n //'email' => [\n // 'required',\n // 'string',\n // 'email',\n // 'max:255',\n // Rule::unique('users')->ignore($usuario->id)\n //],\n 'email' => 'required|string|email|max:255|unique:users,email,'.$usuario->id,\n 'role_id' => 'required|integer|exists:roles,id',\n 'perfiles' => 'required|array|min:1|exists:perfiles,id'\n ],[\n 'email.required' => 'el campo correo es awebo',\n 'email.unique' => 'ese correo ya esta en uso.',\n 'name.required' => 'el nombre es obligatorio',\n 'role_id.required' => 'el rol es awebo',\n 'role_id.exists' => 'el rol no existe',\n 'perfiles.required' => 'los perfiles son necesarios.',\n 'perfiles.min' => 'mínimo es un perfil.',\n 'perfiles.exists' => 'ese perfil no esta registrado'\n ]);\n\n if ($validator->fails()){\n\n return redirect()->back()->withErrors($validator)->withInput();\n }\n $data = $request->except('_token','_method');\n\n $usuario->update($data);\n $usuario->perfiles()->sync($data['perfiles']);\n //$usuario->perfiles()->detach();\n //\n //foreach ($data['perfiles'] as $perfil)\n //{\n // $usuario->perfiles()->attach($perfil);\n //}\n\n return redirect()->route('usuarios.index')\n ->with('info','el usuario fue editado correctamente :)');\n\n }catch(AuthorizationException $e){\n return redirect()->route('usuarios.show',$usuario->id)->with('error',$e->getMessage());\n }\n\n }",
"public function crearusuarios($nombre,$primer_apellido,$segundo_apellido,$fechanacimento,$email,$telefono,$password,$comprobacion,$alias,$foto)\n { //busca en la tabla usuarios los campos donde el alias sea igual a admin si no encuentra nada devuelve null\n $usuarios = R::findOne('usuarios', 'alias=?', [\n $alias\n ]);\n \n \n // ok es igual a true siempre y cuando usuarios sea distinto de null\n $ok = ($usuarios == null );\n if ($ok) {\n // crea la tabla usuarios\n $usuarios = R::dispense('usuarios');\n //crea los campos de la tabla usuarios\n $usuarios->nombre=$nombre;\n $usuarios->primer_apellido=$primer_apellido;\n $usuarios->segundo_apellido=$segundo_apellido;\n $usuarios->fecha_nacimiento=$fechanacimento;\n $usuarios->fecha_de_registro=date('Y-m-d');\n $usuarios->email=$email;\n $usuarios->telefono=$telefono;\n $usuarios->contrasena=password_hash($password, PASSWORD_DEFAULT);\n $usuarios->confirmar_contrasena=password_hash($comprobacion, PASSWORD_DEFAULT);\n $usuarios->alias=$alias;\n //verifico si las fotos exiten en el directorio assets/fotosperfil\n $sustitutuirespaciosblancos = str_replace(\" \",\"_\",$alias);\n $directorio = \"assets/fotosperfil/usuario-\".$sustitutuirespaciosblancos.\".png\";\n \n $existefichero = is_file( $directorio );\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 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\n R::store($usuarios);\n \n \n //rdirege al controlador principal\n redirect(base_url());\n \n \n }\n \n }",
"function uploadProfileImageForUser($userData)\n\t\t{\n\t\t\t//takes the image size\n\t\t\t$img = getimagesize('../temp/'.$userData['imagename']);\n\t\t\t//print_r($img);\n\t\t\t//gets the image extension\n\t\t\t$ext = pathinfo('../temp/'.$userData['imagename'], PATHINFO_EXTENSION);\n\t\t\n\t\t\t$responsiveWidth = $userData['width'];\n\t\t\t$responsiveHeight = $userData['height'];\n\t\t\t\n\t\t\t$actualWidth = $img[0];\n\t\t\t$actualHeight = $img[1];\n\t\t\t\n\t\t\t$xCoordinate = ($actualWidth/$responsiveWidth)*$userData['xcordinate'];\n\t\t\t$yCoordinate = ($actualHeight/$responsiveHeight)*$userData['ycordinate'];\n\t\t\t\n\t\t\t\n\t\t\t$targ_w = ($actualWidth/$responsiveWidth)*300;\n\t\t\t$targ_h = ($actualHeight/$responsiveHeight)*300;\n\t\t\t\n\t\t\t\n\t\t\t$jpeg_quality = 90;\n\t\t\t$png_quality = 9;\n\t\t\t\n\t\t\t$src = '../temp/'.$userData['imagename'];\n\t\t\t\n\t\t\t\n\t\t\tif($ext == 'png') {\n\t\t\t\t$img_r = imagecreatefrompng($src);\n\t\t\t\t$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );\n\t\t\t\timagecopyresampled($dst_r,$img_r,0,0,$xCoordinate,$yCoordinate,$targ_w,$targ_h,$targ_w,$targ_h);\n\t\t\t\t//save image in admin panel\n\t\t\t\t//imagepng($dst_r,'../../img/product'.$GLOBALS['_POST']['imagename'], $png_quality);\n\t\t\t\t//save image in ui product folder\n\t\t\t\timagepng($dst_r,'../files/pro-image/'.$userData['imagename'], $png_quality);\n\t\t\t\t\n\t\t\t\t//save the product image into the database\n\t\t\t\t$this->saveUserPic($userData['imagename'],'pro');\n\t\t\t}\n\t\t\telse if($ext == 'jpeg' ) {\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );\n\t\t\t\timagecopyresampled($dst_r,$img_r,0,0,$xCoordinate,$yCoordinate,$targ_w,$targ_h,$targ_w,$targ_h);\n\t\t\t\t//save image in admin panel\n\t\t\t\t//imagejpeg($dst_r,'../../img/product'.$GLOBALS['_POST']['imagename'], $jpeg_quality);\n\t\t\t\t//save image in ui product folder\n\t\t\t\timagejpeg($dst_r,'../files/pro-image/'.$userData['imagename'], $jpeg_quality);\n\t\t\t\t\n\t\t\t\t//save the product image into the database\n\t\t\t\t$this->saveUserPic($userData['imagename'],'pro');\n\t\t\t}\n\t\t\telse if($ext == 'jpg') {\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );\n\t\t\t\timagecopyresampled($dst_r,$img_r,0,0,$xCoordinate,$yCoordinate,$targ_w,$targ_h,$targ_w,$targ_h);\n\t\t\t\t//save image in admin panel\n\t\t\t\t//imagejpeg($dst_r,'../../img/product'.$GLOBALS['_POST']['imagename'], $jpeg_quality);\n\t\t\t\t//save image in ui product folder\n\t\t\t\timagejpeg($dst_r,'../files/pro-image/'.$userData['imagename'], $jpeg_quality);\n\t\t\t\t\n\t\t\t\t//save the product image into the database\n\t\t\t\t$this->saveUserPic($userData['imagename'],'pro');\n\t\t\t}\n\t\t\t\n\t\t}",
"function subidaFichero($bd,$usuario,$entrada){\n if(isset($_FILES['imagen']['name']) && strlen ($_FILES['imagen']['name'])>0) {\n $dir_subida = $usuario . \"/\";\n ///////////NO TENGO PERMISOS DE CREAR CARPETAS!!!!!!!\n if ( !is_dir($dir_subida) && is_writable(\"../redsocial\")) {\n mkdir($dir_subida,0755, true);\n }else\n $dir_subida=\"img/\";\n $path = $_FILES['imagen']['name'];\n $ext = pathinfo($path, PATHINFO_EXTENSION);\n $fichero_subido = $dir_subida . $usuario . date(\"Ymd_Hm\").\".\".$ext;\n /////NO TENGO PERMISOS PARA SUBIR ARCHIVOS!!!!\n if(is_writable($dir_subida)) {\n if (!move_uploaded_file($_FILES['imagen']['tmp_name'], $fichero_subido)) {\n echo \"Problema de ataque de subida de ficheros!.\\n\";\n }\n }\n $imagen = new Imagen(null, $fichero_subido, $entrada->getId());\n $daoImagenes = new Imagenes($bd);\n $daoImagenes->addImagen($imagen, $entrada);\n return $fichero_subido;\n }\n\n}",
"function auth_register_user($user){\n $users = json_read('data/users.json');\n $max = -1;\n foreach($users as $user_max){\n if($user_max->id > $max) $max = $user_max->id;\n }\n $new_id = $max + 1;\n $user->id = $new_id;\n $user->pword = password_hash($user->pword1, PASSWORD_DEFAULT);\n $user->pword1 = $user->pword2 = '';\n $users->$new_id = $user;\n json_write('data/users.json', $users);\n\n return $new_id;\n}",
"final public function addItemOwner() {\n $this->addUserByField('users_id', true);\n }",
"final public function Crear() : array {\n global $http;\n\n # Capturamos el error\n $error = $this->Errors($http);\n if (!is_bool($error)) {\n return $error;\n }\n \n # Insertamos datos\n $this->db->insert('users', array(\n 'name'=> $this->name, \n 'email'=> $this->email,\n 'pass'=> Strings::hash($this->pass),\n 'fecha_reg' => time()\n ));\n\n # Si existe una imagen la guardamos\n if (null != $this->file) {\n # Obtenemos el id de este ultimo usuario insertado\n $this->setId( $this->db->lastInsertId() );\n\n # Capturamos el nombre de la imagen\n $avatar = $this->uploadImage($this->file, self::AVATARS_DIR);\n\n # Actualiamos los datos con el nombre de la imagen a este usuario\n $this->db->update('users', array('avatar' => $avatar), \"id_user = '$this->id'\", 'LIMIT 1');\n }\n\n \n return array('success' => 1, 'message' => 'Administrador creado exitosamente.');\n }",
"private function set_files()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}",
"public function perfil() {\n require_once 'views/usuarios/perfil.php';\n }",
"public static function registrarPelicula($idpelicula, $nombre, $direccion, $produccion, $guion, $musica, $pais, $ano, $estreno, $duracion, $idiomas, $productora, $distribucion, $presupuesto, $recaudacion, $generos, $argumento, $nombre_foto, $foto) {\n// . \"VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\"; //Estos parametros seran sustituidos mas adelante por valores.\n// $stmt = conexion::$conexion->prepare($query);\n//\n//\n// $stmt->bind_param(\"isssssssssssssssssb\", $idpelicula, $nombre, $direccion, $produccion, $guion, $musica, $pais, $ano, $estreno, $duracion, $idiomas, $productora, $distribucion, $presupuesto, $recaudacion, $selected, $argumento, $nombre_foto, $foto);\n//\n// /* Ejecución de la sentencia. */\n// $stmt->execute();\n $activa = 0;\n if ($foto != null) {\n $query = \"INSERT INTO pelicula (idpelicula, nombre, direccion, produccion, guion, musica, pais, ano, estreno, duracion, idiomas, productora, distribucion, presupuesto, recaudacion, argumento, nombre_foto, foto, activa) \"\n . \"VALUES ('$idpelicula','$nombre','$direccion','$produccion','$guion','$musica','$pais','$ano','$estreno','$duracion','$idiomas','$productora','$distribucion','$presupuesto','$recaudacion','$argumento','$nombre_foto','$foto','$activa')\"; //Estos parametros seran sustituidos mas adelante por valores.\n } else {\n $query = \"INSERT INTO pelicula (idpelicula, nombre, direccion, produccion, guion, musica, pais, ano, estreno, duracion, idiomas, productora, distribucion, presupuesto, recaudacion, argumento, nombre_foto, foto, activa) \"\n . \"VALUES ('$idpelicula','$nombre','$direccion','$produccion','$guion','$musica','$pais','$ano','$estreno','$duracion','$idiomas','$productora','$distribucion','$presupuesto','$recaudacion','$argumento',NULL,NULL,'$activa')\"; //Estos parametros seran sustituidos mas adelante por valores.\n }\n mysqli_query(conexion::$conexion, $query);\n\n\n\n //Que esta llena la lista de generos la recorremos y la guardamos en la \n // variable generos\n foreach ($generos as $selected) {\n $queryID = \"SELECT idpelicula FROM pelicula WHERE nombre = '\" . $nombre . \"'\";\n $queryGenero = \"INSERT INTO pelicula_genero (idpelicula, generos_idgeneros) \"\n . \"VALUES ((\" . $queryID . \"),'$selected')\"; //Estos parametros seran sustituidos mas adelante por valores.\n mysqli_query(conexion::$conexion, $queryGenero);\n }\n }",
"function add_persona_perfil($params)\n {\n $this->db->insert('persona_perfil',$params);\n return $this->db->insert_id();\n }"
] | [
"0.6224378",
"0.59013027",
"0.581284",
"0.5777077",
"0.5769535",
"0.57361114",
"0.5701051",
"0.5693234",
"0.56805843",
"0.56518084",
"0.5603112",
"0.5370323",
"0.5357536",
"0.5356267",
"0.5354409",
"0.5332031",
"0.5331295",
"0.5326001",
"0.53057986",
"0.52602893",
"0.52591676",
"0.52314097",
"0.5223487",
"0.52163213",
"0.52111304",
"0.51980513",
"0.51973426",
"0.5191787",
"0.5189277",
"0.51782906",
"0.5177197",
"0.5175657",
"0.51559836",
"0.5148915",
"0.5145355",
"0.5136058",
"0.51329094",
"0.5132771",
"0.5124865",
"0.5122174",
"0.511008",
"0.5098279",
"0.5084188",
"0.50711775",
"0.5067533",
"0.5047339",
"0.5043864",
"0.50403464",
"0.50251955",
"0.5015753",
"0.5013833",
"0.50084466",
"0.5006093",
"0.50048363",
"0.4997123",
"0.49714297",
"0.49695402",
"0.49688178",
"0.4968092",
"0.49668548",
"0.4966284",
"0.49658197",
"0.49594513",
"0.4957703",
"0.4946743",
"0.49451897",
"0.49446803",
"0.49437127",
"0.49390632",
"0.49384713",
"0.4938375",
"0.49377108",
"0.49331963",
"0.49331903",
"0.49325287",
"0.4930292",
"0.49282578",
"0.4924519",
"0.49235263",
"0.4914395",
"0.49114576",
"0.49104625",
"0.4910299",
"0.4904281",
"0.49019238",
"0.48948053",
"0.48878706",
"0.48835668",
"0.4882426",
"0.48811302",
"0.48808408",
"0.48789844",
"0.48738664",
"0.48643118",
"0.48636812",
"0.48601305",
"0.4860118",
"0.48575857",
"0.48570678",
"0.4854603"
] | 0.61545753 | 1 |
Cambia la clave de un usuario | function cambiarClave ($clave, $nuevaClave) {
$clave = md5($clave);
//Helpers\Debug::imprimir("$clave===$this->clave_usuario",true);
if ($clave === $this->clave_usuario) {
$this->clave_usuario = md5($nuevaClave);
$this->salvar();
return true;
}
else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getClaveUsuario(){\n return $this->claveUsuario;\n }",
"public function restaurarClave()\n {\n echo $this->Usuarios_model->cambiarClave($this->input->post(\"ciu\"), hash(\"sha512\", \"12345678\"));\n }",
"public function cambiarClave()\n {\n echo $this->Usuarios_model->cambiarClave($this->session->userdata(\"ciu\"), hash(\"sha512\", $this->input->post(\"clave\")));\n }",
"function restaurarClave(){\n $usuario = $this->input->post('nick-usuario');\n $clave = $this->input->post('clave-nueva');\n $clave_rep = $this->input->post('rep-clave-nueva');\n if($clave == $clave_rep){\n \t$datos = array(\n \t\t'email' => $usuario,\n \t\t'pass' => md5($clave));\n \t$this->defaultbackend_model->update($datos);\n \tredirect('login');\n }else{\n \tredirect(base_url());\n }\n\t}",
"function GenerarClave()\n\t{\n\t\t$this->Clave = CifradorCodigo::generarNumero(\n\t\tCifradorCodigo::LongitudBitsClaveMaximo\n\t\t);\n\t}",
"public function necesitaCambiarPassword();",
"public function getAuthPassword()\n {\n return $this->usr_senha;\n }",
"public function olvidoPassword(){\n\t}",
"function comprobarClave($clave,$hash){\n\n $resultado = password_verify($clave,$hash);\n return $resultado;\n}",
"public function getPassword(): string\n {\n return $this->getClave();\n }",
"public function setClave($idUsuario, $clave) {\n $consultas = array();\n $consultas[] = \"UPDATE usuario SET password = MD5('$clave') WHERE idUsuario = $idUsuario\";\n return $this->ejecutarTransaccion($consultas);\n }",
"function verificaUsuario($login, $password)\n{\n /*\n Logando com ByCrpt\n */\n $sql = \"select senha from usuario where nome = '{$login}'\";\n $resultado = executaSQL($sql);\n $senha = mysqli_fetch_assoc($resultado);\n \n return (crypt($password, $senha['senha']) === $senha['senha']);\n}",
"public function getPasswordUsuario()\n {\n return $this->passwordUsuario;\n }",
"public function saveUsuario(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_usuario SET usuario = \"%s\" password = \"%s\" WHERE usuario_id = %d',\n $this->usuario,\n $this->password,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_usuario ( usuario, password) VALUES (\"%s\", \"%s\")',\n $this->usuario,\n $this->password );\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function setClaveUsuario($claveUsuario){\n $this->claveUsuario = $claveUsuario;\n }",
"public function getPassword() {}",
"function bd_usuarios_hash($id){\n return sql2value(\"\n SELECT clave\n FROM usuarios\n WHERE id LIKE '{$id}'or email LIKE '{$id}'\n LIMIT 1;\n \");\n}",
"private function setEncryptPassword(){\n // Encode the new users password\n $encrpyt = $this->get('security.password_encoder');\n $password = $encrpyt->encodePassword($this->user, $this->user->getPassword());\n $this->user->setPassword($password);\n }",
"public function getPassword(): string;",
"public function validarClave() {\r\n if (!$this->hasErrors()) {\r\n if ($this->clave != $this->claveConfirmar) {\r\n $this->addError('clave', 'Contraseña no coincide');\r\n $this->addError('claveConfirmar', 'Contraseña no coincide');\r\n $this->clave = null;\r\n $this->claveConfirmar = null;\r\n }\r\n }\r\n }",
"function retrievePassword($id_utente) {\n\n $query = sprintf(\"SELECT password FROM scuola.utenti_scuola WHERE id_utente = %s\", $id_utente);\n\n // Perform Query\n $result = mysql_query($query);\n\n $row = mysql_fetch_assoc($result);\n $password = $row['password'];\n\n\n return base64_decode(base64_decode($password));\n }",
"public function LoginUser($Ppassword, $Pusuario){\n\n //se limpian las variables\n $Ppassword = $this->limpiarVariable($Ppassword);\n $Pusuario = $this->limpiarVariable($Pusuario);\n //se instancia la clase conexion y se le otorga el string de conexion a una nueva variable\n $con = new Conexion();\n $conexion = $con->get_Conexion();\n\n //se crea la sentencia SQL\n $sql = \"SELECT COD_CLIENTE, CONTRASENIA FROM GEN_CLIENTE WHERE COD_CLIENTE = ? AND CONTRASENIA = ?\";\n\n //encriptacion de la contraseña\n $hash_pass = crypt($Ppassword);\n echo($hash_pass);\n\n echo \"<script>console.log('Debug Objects: \" . $hash_pass . \"' );</script>\";\n\n //se prepara el statement con la sentencia previamente creada\n $stmt = $conexion->prepare($sql);\n\n if ($stmt) {\n //se realiza un execute y un fetch donde se obtienen los datos de la primera fila\n //que coincida con el usuario y la clave ademas del cia.\n //en el execute se agregan las variables por medio de un array.\n $stmt->execute(array($Pusuario, $Ppassword));\n $result = $stmt->fetch();\n\n //se cierra la conexion\n $conexion = null;\n\n //se retorna el $result;\n return $result;\n }else{\n //si el statement da error, se retorna falso.\n return false;\n }\n\n}",
"public function validarClave() {\n if (!$this->hasErrors()) {\n if ($this->clave != $this->claveConfirmar) {\n $this->addError('clave', 'Contraseña no coincide');\n $this->addError('claveConfirmar', 'Contraseña no coincide');\n $this->clave = null;\n $this->claveConfirmar = null;\n }\n }\n }",
"public function getAuthPassword()\n {\n }",
"public function getAuthPassword()\n {\n }",
"public function getAuthPassword()\n {\n }",
"private function getKey($user) {\n\t\t$uid = $user['uid'];\n\t\t$pwd = $user['password'];\n\t\t$ip = $this->input->getip();\n\t\t$time = SYSTIME;\n\t\t$skey = \"$pwd\\t$uid\\t$ip\\t$time\";\n\t\t$auth = authcode($skey, 'ENCODE');\n\t\treturn $auth;\n\t}",
"private function getKey($user) {\n\t\t$uid = $user['uid'];\n\t\t$pwd = $user['password'];\n\t\t$ip = $this->input->getip();\n\t\t$time = SYSTIME;\n\t\t$skey = \"$pwd\\t$uid\\t$ip\\t$time\";\n\t\t$auth = authcode($skey, 'ENCODE');\n\t\treturn $auth;\n\t}",
"public function getClave(){\n\t\treturn $this->clave;\n\t}",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function verificarLoginPassword($obj, $conex){\r\n $usuario= trim($obj->getUsuario());\r\n $password= sha1(trim($obj->getPassword())); \r\n $sql = \"SELECT * FROM USUARIO WHERE USUARIO=:usuario AND PASSWORD=:password AND ROL='CLIENTE' AND BAJA='0' AND ESTADO='ACTIVADO'\";\r\n $consulta = $conex->prepare($sql);\r\n $consulta->execute(array(\":usuario\" => $usuario, \":password\" => $password));\r\n $result = $consulta->fetchAll();\r\n return $result;\r\n}",
"function cambioClave() {\n if (isset($_POST['id_usuario']) && isset($_POST['login']) && isset($_POST['clave']) && isset($_POST['clave_nueva'])) {\n $clave = substr(crypt($_POST['clave'], strtoupper($_POST['login'])), 3);\n $clave_nueva = substr(crypt($_POST['clave_nueva'], strtoupper($_POST['login'])), 3);\n\n $objetoCambioClave = new ClaseCambioClave($_POST['id_usuario'], $clave, $clave_nueva);\n $result = $objetoCambioClave->cambioClave();\n\n $data = ClaseJson::getJson($result);\n } else {\n $data = ClaseJson::getMessageJson(false, 'Los campos Login o Clave estan vacios');\n }\n\n echo $data;\n}",
"function compobarDatosUsuario($usuario,$password){\n\t$data = getKValue(BUCKET_USUARIOS,$usuario);\n\t/*$value = $data->value;\n\techo $value.' | '.$password.'<br>';*/\n\treturn $data->value === $password;\n}",
"public function getSecuredPassword();",
"function get_password($usrid){\r\n\t\r\n}",
"public function testUpdateNetworkMerakiAuthUser()\n {\n }",
"public function getHashedPassword(){\n\n // query the database to get the users password\n // database instance\n $db = database::getPDOobject();\n\n // query\n $checkUser = $db->prepare('SELECT `password` FROM `users` WHERE BINARY `user_name` = BINARY :userName LIMIT 1');\n $checkUser->bindParam(':userName',$this->username);\n $checkUser->execute();\n $encyptedPassword = $checkUser->fetch()['password'];\n\n return $encyptedPassword;\n}",
"public function buscaCvePas(){\n /* Consulta usando ELOQUENT -> Trae al usuario si lo encuentra en la tabla usuarios */\n $usuario = Usuario::where([\n ['cuentaUsuario', $this->cuentaUsuario],\n ['contrasenia', $this->contrasenia]\n ])->first();\n return $usuario;\n }",
"function renuevaPassword($password, $user_id)\n {\n\n //la query actualiza la contraseña y cambia el campo password_request a 0 y el token_password lo limpia\n $query = \"UPDATE usuarios SET Passwd = ?, activacion=0 WHERE IdUsuario = ?\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(2, $user_id);\n\n $password_hash = password_hash($password, PASSWORD_BCRYPT);\n $stmt->bindParam('1', $password_hash);\n\n if ($stmt->execute()) {\n return true;\n } else {\n return false;\n }\n }",
"public function m_buscarClave($cod,$pass)\n\t\t{\n\t\t\t$this->db->where('cod',$cod);\n\t\t\t$this->db->where('password',$pass);\n\t\t\t$sql = $this->db->get('tblusuarios');\n\n\t\t\tif($sql->num_rows() == 1)\n\t\t\t\treturn TRUE;\n\t\t\telse\n\t\t\t\treturn FALSE;\n\t\t}",
"private function derivarClave()\n\t{\n\t\t$this->claveDerivada = array();\n\t\t$bitsClave = CifradorCodigo::fijarLongitud(CifradorCodigo::LongitudBitsClaveMaximo, decbin($this->Clave));\n\t\t$xorClave = bindec(substr($bitsClave, 0, CifradorCodigo::LongitudBitsClaveMaximo / 2)) ^ bindec(substr($bitsClave, CifradorCodigo::LongitudBitsClaveMaximo / 2, CifradorCodigo::LongitudBitsClaveMaximo / 2));\n\t\t$xorClaveOriginal = $xorClave;\n\t\tfor($i = 1; $i <= 6; $i++)\n\t\t{\n\t\t\t$clave = bindec($this->permutacionMultiple(CifradorCodigo::fijarLongitud(CifradorCodigo::LongitudBitsClaveMaximo / 2, decbin($xorClave >> 2))));\n\t\t\t$this->claveDerivada[] = $clave;\n\t\t\t$xorClave = $clave ^ $xorClave;\n\t\t}\n\t}",
"public function getPW() {}",
"public function generateAuthKey() {\n $this->llaveAutenticacion = Yii::$app->security->generateRandomString();\n }",
"public function getPasswordEmpresa()\n {\n return $this->passwordEmpresa;\n }",
"protected function cekIdUsername($name){\n //\n //$passLama = bcrypt($passwordlama);\n\n $cekPass = User::Select(DB::raw('id'))\n ->where('username','=',$name)\n //->where('password','=',$passLama)\n ->first();\n //echo $passLama.$mhsNim;\n //dd($cekPass);\n\n return $cekPass;\n }",
"function cambiaPassword($password, $user_id, $token)\n {\n\n //la query actualiza la contraseña y cambia el campo password_request a 0 y el token_password lo limpia\n $query = \"UPDATE usuarios SET Passwd = ?, PasswdTmp='', password_request=0 WHERE IdUsuario = ? AND PasswdTmp = ?\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $password);\n $stmt->bindParam(2, $user_id);\n $stmt->bindParam(3, $token);\n\n if ($stmt->execute()) {\n return true;\n } else {\n return false;\n }\n }",
"protected function getConfiguredPassword() {}",
"function encryptPassword()\n\t{\n\t\t$userPassword = $_POST['userPassword'];\n\n\t $key = pack('H*', \"bcb04b7e103a05afe34763051cef08bc55abe029fdebae5e1d417e2ffb2a00a3\");\n\t $key_size = strlen($key);\n\n\t $plaintext = $userPassword;\n\n\t $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n\t $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\n\t $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_CBC, $iv);\n\t $ciphertext = $iv . $ciphertext;\n\n\t $userPassword = base64_encode($ciphertext);\n\n\t return $userPassword;\n\t}",
"function comprobarContrasena($contrasena, $contrasenaBD) {\n $t_hasher = new PasswordHash(8, FALSE);\n return $t_hasher->CheckPassword($contrasena, $contrasenaBD);\n}",
"public function UpdateAuthKey()\r\n {\r\n $queryUpdateSecureKey = \"UPDATE users SET auth_key=MD5(RAND()) WHERE user_id = :user_id\";\r\n $updateSecureKey = $this->sqlDataBase->prepare($queryUpdateSecureKey);\r\n $updateSecureKey->execute(array(\":user_id\"=>$this->userId));\r\n\r\n $queryGetSecureKey = \"SELECT auth_key FROM users WHERE user_id = :user_id\";\r\n $secureKey = $this->sqlDataBase->prepare($queryGetSecureKey);\r\n $secureKey->execute(array(\":user_id\"=>$this->userId));\r\n $secureKeyArr = $secureKey->fetch(PDO::FETCH_ASSOC);\r\n $this->authKey = $secureKeyArr['auth_key'];\r\n }",
"function f_get_seg_usuario_password(\n\t\t\t\t$txt_login,\n\t\t\t\t$txt_password\t\t\n\t\t){\n\t\t\tglobal $db;\n\t\t\t$query =\"\n\t\t\tselect \t*\n\t\t\tfrom\tseg_usuario\n\t\t\twhere\ttxt_password\t=\tpassword(SHA('$txt_password'))\n\t\t\tand\t\ttxt_login\t\t=\t'$txt_login'\";\n\t\t\t$row = $db->consultar_registro($query);\t\n\t\t\treturn $row;\n\t\t}",
"function getPassword(){\n\n}",
"function decryptUser() {\n $pk = $_SESSION['pk'];\n $valid = 0;\n\n connectDatabase();\n \n $result = queryDatabase(\"SELECT pk\n FROM user\n WHERE active = 1\");\n\n if (mysql_num_rows($result) >= 1) {\n while ($row = mysql_fetch_object($result)) {\n if ($pk == crypt($row->pk, SALT)) {\n return $row->pk;\n }\n }\n } else {\n header('Location: ' . HOME . 'login.php?feedback=7');\n }\n}",
"function ModifMiniPassUser( $passUser ){\r\n return md5($passUser);\r\n}",
"public static function Actualizar_Usuario_Clave($valor, $id)\n {\n // Creando consulta UPDATE\n $consulta = \"UPDATE accesos SET password = ? WHERE id_usuario = ?\";\n\n // Preparar la sentencia\n $cmd = Database::getInstance()->getDb()->prepare($consulta);\n\n // Relacionar y ejecutar la sentencia\n $cmd->execute(array($valor, $id));\n\n return $cmd;\n }",
"public function dodajUcenika($enc_password,$skola){\n\t\t\t$data = array(\n\t\t\t\t'name' => $this->input->post('name'),\n\t\t\t\t'surname' => $this->input->post('surname'),\n\t\t\t\t'email' => $this->input->post('email'),\n\t\t\t\t'username' => $this->input->post('username'),\n\t\t\t\t'password' => $enc_password\n\n\t\t\t);\n\t\t\t$this->db->insert('users', $data);\n\t\t\t\n\t\t\t$this->db->where('username', $this->input->post('username'));\n\t\t\t$this->db->where('password', $enc_password);\n\t\t\t$result = $this->db->get('users');\n\t\t\t$id = $result->row(0)->id;\n\t\t\t$this->dodajUcenikaId($id,$skola);\n\t\t\t\n\t\t\treturn $id;\n\t\t}",
"public function actualizar_password(Request $request){\n $user=User::where('email','=',$request->email)\n ->first();\n\n $user->password=Hash::make($request->password);\n\n $user->save();\n\n return $user->email;\n }",
"public function dodajNastavnika($enc_password,$skola){\n\t\t\t$data = array(\n\t\t\t\t'name' => $this->input->post('name'),\n\t\t\t\t'surname' => $this->input->post('surname'),\n\t\t\t\t'email' => $this->input->post('email'),\n\t\t\t\t'username' => $this->input->post('username'),\n\t\t\t\t'password' => $enc_password\n\t\t\t);\n\t\t\t$this->db->insert('users', $data);\n\t\t\t\n\t\t\t$this->db->where('username', $this->input->post('username'));\n\t\t\t$this->db->where('password', $enc_password);\n\t\t\t$result = $this->db->get('users');\n\t\t\t$id = $result->row(0)->id;\n\t\t\t$this->dodajNastavnikaId($id,$skola);\n\t\t\t\n\t\t\treturn $id;\n\t\t}",
"public function cambioPassword($usuario){\n\t\t$this->db->where('dni', $usuario['dni']);\n\t\t$this->db->update('usuarios', $usuario);\n\t\treturn $this->db->affected_rows();\n\t}",
"public function getAuthPassword()\r\n {\r\n return $this->mot_de_passe;\r\n }",
"public function getPassword(): string\n {\n }",
"public function generaClave()\n {\n do {\n $clave = '';\n for ($i = 0; $i < 3; $i++) {\n $clave .= strtoupper(substr(uniqid(), -5));\n $clave .= $i != 2 ? '-' : '';\n }\n } while (!$this->claveValida($clave) && !$this->claveUnica($clave));\n \n return $clave;\n }",
"public function userFromKey($key){\r\n $query = $this->conn->prepare('SELECT `user_id` FROM `user` WHERE confirmationKey = :key'); // Création de la requête + utilisation order by pour ne pas utiliser sort\r\n $query->execute([':key' => $key ]); // Exécution de la requête\r\n return $query->fetch(\\PDO::FETCH_ASSOC);\r\n\r\n }",
"private function valPassLMS(){\n $LMS = new LMS();\n\n $apiUser = $LMS->getDataXUserPass($this->_user, $this->_pass, 'https://www.sistemauno.com/source/ws/uno_wsj_login.php');\n\n if(is_numeric($apiUser)) {\n return false;\n }else {\n\n $datUser = json_decode($apiUser);\n\n\n if ($datUser->person) {\n //update pass Local\n $pass = Mcrypt::encrypt($this->_pass);\n\n $em = $this->getDoctrine()->getManager();\n $personDB = $em->getRepository(PersonDB_L)->findOneBy(array('personid' => $datUser->person->personId));\n if ($personDB) {\n //$personDB->setUser($pass);\n $personDB->setPassword($pass);\n $em->flush();\n\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }\n\n }",
"public function store(CambioClaveRequests $request)\n {\n\n\n if (Hash::check($request['passActual'], Auth::user()->password)) {\n\n Auth::User()->where('email','=', Auth::user()->email)->update(['password'=>bcrypt($request['password'])]);\n Session::flash('message','Cambio de clave exitoso');\n return view('/password.index');\n }\n else {\n Session::flash('message-error','Credenciales incorrectos');\n return view('/password.index');\n }\n\n }",
"function validarIngreso($Usuario, $Clave)\n {\n $this->Consulta(\"*\",\"usuarios\",\"usuario='\".$Usuario.\"' AND password=md5('\". $Clave .\"')\");\n // Contar la cantidad de resultados\n $this->Filas = mysql_num_rows($this->Resultado);\n if( $this->Filas > 0){\n // Regresar los datos del usuario\n $Columnas = mysql_fetch_assoc($this->Resultado);\n //echo \"Datos de usuario: \". $Columnas['id'] .\", \". $Columnas['usuario'].\", \". $Columnas['password'].\", \". $Columnas['nombre'].\", \". $Columnas['correo'].\", \". $Columnas['activo'].\", \". $Columnas['zonashorarias_id'].\", \". $Columnas['roles_id'].\", \". $Columnas['gruposusuarios_id'];\n return $Columnas;\n }\n else {\n /* No se encontró al usuario */\n return false;\n }\n }",
"public function getAuthPassword()\n {\n return $this->mot_de_passe;\n\n }",
"function usuario($listaNombres, $listaPasswords, $nombre, $passwords) {\n $encontrado = -3;\n $claveNombre = -1;\n $clavePassword = -2;\n foreach ($listaNombres as $clave => $valor) {\n if ($valor === $nombre) {\n //el nombre es igual al que se pasa del formulario\n $claveNombre = $clave;\n foreach ($listaPasswords as $claveC => $valorC) {\n //la contraseña es igual a la del formulario\n if ($valorC === $passwords) {\n $clavePassword = $claveC;\n if ($clavePassword === $claveNombre) {\n //comprobamos si es el nombre y la contraseña pertenecen a la misma persona\n $encontrado = $clavePassword;\n }\n }\n }\n }\n }\n return $encontrado;\n}",
"public function getUsuario() {\n }",
"function compruebaLoginUsuario($bd){\n //Hago un filtrado previo por si hay valores indeseables en el array\n $arrayFiltrado=array();\n foreach ($_POST as $k => $v)\n $arrayFiltrado[$k] = filtrado($v);\n\n //Utilizo los objetos DAO para añadir el usuario a la BD\n $daoUsuario = new Usuarios($bd);\n $usuario = new Usuario();\n $usuario->setPassword($arrayFiltrado[\"password\"]);\n $usuario->setUsuario($arrayFiltrado[\"usuario\"]);\n $resultado = $daoUsuario->compruebaCredenciales($usuario);\n //Compruebo si tengo usuario\n if($resultado!=false) {\n $usuario->setPassword(null);\n $usuario->setId($resultado[\"id\"]);\n $usuario->setImagen($resultado[\"imagen\"]);\n return $usuario;\n }\n else\n return false;\n}",
"public function getUserPassword()\n {\n return $this->user_password;\n }",
"public function setPassword(){\n\t}",
"public function passwordValide () {\n $password = $this->donnees[self::PASSWORD_REF];\n // Le champ password ne doit pas ?tre vide\n if ($password == null) {\n $this->erreur[self::PASSWORD_REF] = \"Veuillez remplir le champ password\";\n return false;\n }\n // Si le password entr? correspond au password contenu dans la base de donn?es on retourne true\n if ($this->utilisateurs->identificationUser($this->donnees[self::LOGIN_REF], $this->donnees[self::PASSWORD_REF])) {\n return true;\n // Sinon on cr?e une erreur et on renvoie false\n } else {\n $this->erreur[self::PASSWORD_REF] .= \"Mot de passe erron?\";\n return false;\n }\n }",
"public function login($user, $clave)\n {\n parent::conectar();\n\n \n\n // El metodo salvar sirve para escapar cualquier comillas doble o simple y otros caracteres que pueden vulnerar nuestra consulta SQL\n $user = parent::salvar($user);\n $clave = parent::salvar($clave);\n\n // Si necesitas filtrar las mayusculas y los acentos habilita las lineas 36 y 37 recuerda que en la base de datos debe estar filtrado tambien para una \n \n\t$consulta = 'select id, nombre, cargo from usuarios where email=\"'.$user.'\" and clave= MD5(\"'.$clave.'\")\n\t UNION SELECT codpaci, nombrep, cargo from customers where email =\"'.$user.'\" and clave= MD5(\"'.$clave.'\")';\n\t \n\t \n /*\n Verificamos si el usuario existe, la funcion verificarRegistros\n retorna el número de filas afectadas, en otras palabras si el\n usuario existe retornara 1 de lo contrario retornara 0\n */\n\n $verificar_usuario = parent::verificarRegistros($consulta);\n\n // si la consulta es mayor a 0 el usuario existe\n if($verificar_usuario > 0){\n\n \n\n /*\n Realizamos la misma consulta de la linea 55 pero esta ves transformaremos el resultado en un arreglo,\n ten mucho cuidado con usar el metodo consultaArreglo ya que devuelve un arreglo de la primera fila encontrada\n es decir, como nosotros solo validamos a un usuario no hay problema pero esta funcion no funciona si\n vas a listar a los usuarios, espero que me entiendan xd\n */\n\n $user = parent::consultaArreglo($consulta);\n\n /*\n Bien espero ser un poco claro en esta parte, la variable user\n en la linea 69 pasa a ser un arreglo con los campos consultados en la linea\n 48, entonces para acceder a los datos utilizamos $user[nombre_del_campo] Ok?\n bueno hagamos el ejercicio.\n */\n\n /*\n Inicializamos la sessión | Recuerda con las variables de sesión\n podemos acceder a la informacion desde cualquiera pagina siempre y cuando\n exista una sesión y ademas utilicemos el codigo de la linea 84\n */\n\n session_start();\n\n /*\n Las variables de sesion son muy faciles de usar, es como\n declarar una variable, lo unico diferente es que obligatoria mente\n debes usar $_SESSION[] y .... el nombre de la variable ya no sera asi\n $miVariable sino entre comillas dentro del arreglo de sesion, haber me\n dejo explicar, $_SESSION['miVariable'], recuerda que como declares la variable\n en este archivo asi mismo lo llamaras en los demas.\n */\n\n $_SESSION['id'] = $user['id'];\n $_SESSION['nombre'] = $user['nombre'];\n $_SESSION['cargo'] = $user['cargo'];\n\n /*\n Que porqué almacenamos cargo? es encillo en nuestros proyectos\n pueden existir archivos que solo puede ver un usuario con el cargo de\n administrador y no un usuario estandar, asi que la variable global de\n sesion nos ayudara a verificar el cargo del usuario que ha iniciado sesion\n Ok?\n */\n\n /*\n Recuerda:\n cargo con valor: 1 es: Administrador\n cargo con valor: 2 es: usuario estandar\n puedes agregar cuantos cargos desees, en este ejemplo solo uso 2\n */\n\n // Verificamos que cargo tiene l usuario y asi mismo dar la respuesta a ajax para que redireccione\n if($_SESSION['cargo'] == 1){\n echo 'view/admin/admin.php';\n }else if($_SESSION['cargo'] == 2){\n echo 'view/user/user.php';\n }\n\n\n // u.u finalizamos aqui :v\n\n }else{\n // El usuario y la clave son incorrectos\n echo 'error_3';\n }\n\n\n # Cerramos la conexion\n parent::cerrar();\n }",
"function new_auth($username) {\n $random_string = \"asd\";\n\n $output = openssl_encrypt($random_string,\"AES-256-CBC\", $key, 0, $iv);\n $new_token = base64_encode($output);\n\n // PDO this into DB\n }",
"public function getAuthPassword()\n {\n return $this->mot_de_passe;\n }",
"public function cambiarClaveAction()\n {\n \tif ($this->identity())\n \t{\n \t\t$formManager = $this->container->get('FormElementManager'); \n $editarUsuarioForm = $formManager->get(EditarUsuarioForm::class);\n \t\t\n \t\t$cambiarClaveForm = new \\Users\\Form\\CambiarClaveForm($this->getRequest()->getBaseUrl() . '/captcha/');\n \t\t\n \t\t$subirImagenForm = new \\Users\\Form\\SubirImagenForm(); \t\t\n \t\t\n \t\t$codUsuario = $this->identity()['codUsuario'];\n \t\t$usuario = $this->usuarioTable->obtenerUsuario($codUsuario);\n \t\t$editarUsuarioForm->bind($usuario);\n \t\t\n \t\t$request = $this->getRequest();\n \t\t\n \t\tif ($request->isPost())\n \t\t{ \t\t \t\t\t\n \t\t\t$cambiarClaveForm->setData($request->getPost());\n \t\t\t$cambiarClaveForm->setInputFilter(new \\Users\\Form\\Filter\\CambiarClaveFilter());\n \t\t\t\n \t\t\tif ($cambiarClaveForm->isValid())\n \t\t\t{\n \t\t\t\t$data = $cambiarClaveForm->getData();\n \t\t\t\t\n \t\t\t\t$claveActual = (string) $data['anteriorClave']; //md5($data['anteriorClave']);\n \t\t\t\t$nuevaClave = (string) $data['nuevaClave']; //md5($data['nuevaClave']);\n \t\t\t\t\n \t\t\t\t$usuario = $this->usuarioTable->obtenerUsuario($this->identity()['codUsuario']);\n \t\t\t\t\n \t\t\t\t$claveOriginal = (string) $usuario->clave;\n \n \t\t\t\tif ($claveOriginal == $claveActual)\n \t\t\t\t{ \t\t\t\t\t\n \t\t\t\t\t$usuario->clave = $nuevaClave;\n \t\t\t\t\t\n \t\t\t\t\tif($this->usuarioTable->guardarUsuario($usuario))\n \t\t\t\t\t{\n \t\t\t\t\t\t$this->flashMessenger()->addMessage('¡Su clave ha sido cambiada correctamente, vuelva a ingresar por favor!'); \t\t\t\t\t\t\n \t\t\t\t\t\treturn $this->redirect()->toRoute('salir');\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{ \n \t\t\t\t\t$this->flashMessenger()->addErrorMessage('¡La clave proporcionada no es correcta');\n \t\t\t\t\treturn $this->redirect()->toRoute('perfil', array('action' => 'cambiar-clave'));\n \t\t\t\t}\n \t\t\t}\n \t\t\t$error = true;\n \t\t}\n \t\t\n \t\t$view = new ViewModel(array(\n \t\t\t\t'editarUsuarioForm' => $editarUsuarioForm,\n \t\t\t\t'cambiarClaveForm' => $cambiarClaveForm,\n \t\t\t\t'subirImagenForm' => $subirImagenForm,\n \t\t\t\t'messages' => $this->flashmessenger()->getMessages(),\n \t\t\t\t'errorMessages' => $this->flashmessenger()->getErrorMessages(),\n \t\t));\n \t\t \n \t\t$view->setTemplate('users/perfil/index.phtml');\n \t\treturn $view;\n \n \t}\n \treturn $this->redirect()->toRoute('ingresar');\n }",
"function StatusVerify($usuario, $senha){\n $usuario = ClearString($usuario);\n $senha = CryptPassword($senha);\n $query = \"SELECT userchave FROM membros WHERE usuario=:username AND senha=:senha AND status='1'\";\n try{\n $result = MySQLStart()->prepare($query);\n $result->bindParam(':username', $usuario, PDO::PARAM_STR);\n $result->bindParam(':senha', $senha, PDO::PARAM_STR);\n $result->execute();\n $count = $result->rowCount();\n if($count > 0){\n $sucesso = true;\n }else{\n $sucesso = false;\n }\n }catch (PDOException $erro_bd){\n echo $erro_bd;\n }\n return $sucesso;\n }",
"function getPassword(){\n //Creamos la consulta\n $sql = \"SELECT password FROM usuarios WHERE id_usuario = \".$this->id_user.\";\";\n //obtenemos el array\n $data = $this->getArraySQL($sql);\n //obtenemos el primer elemento, ya que así no tenemos que extraerlo posteriormente\n return $data[0][0];\n }",
"private function cargarObjetoConClave($param)\n {\n $obj = null;\n\n if (isset($param['idusuario'])) {\n $obj = new Usuario();\n $obj->setear($param['idusuario'], \"\", \"\", \"\", \"\", \"\");\n }\n return $obj;\n }",
"function verificaTokenPass($user_id, $token)\n {\n //ademas verifica si el usuario a solicitado el cambio de password \n\n $query = \"SELECT IdUsuario FROM usuarios WHERE IdUsuario = ? AND PasswdTmp = ? AND password_request = 1 LIMIT 1\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $user_id);\n $stmt->bindParam(2, $token);\n $stmt->execute();\n $num = $stmt->rowCount();\n\n if ($num > 0) {\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->IdUsuario = $row['IdUsuario'];\n if ($this->IdUsuario = $row['IdUsuario']) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }",
"function user_regenerate_password() {\n\t\t$this->left_menu_list = array();\n\t\t\n\t\tif (isset($this->data)) {\n\t\t\t$user = $this->User->find('first', array(\n\t\t\t\t'conditions' => array('User.email' => $this->data['User']['email']),\n\t\t\t\t'contain' => array()\n\t\t\t));\n\t\t\tif (empty($user)) {\n\t\t\t\t$this->Session->setFlash('Uživatel se zadanou emailovou adresou neexistuje.');\n\t\t\t} else {\n\t\t\t\t// udelam hash, pomoci ktereho budu moci identifikovat uzivatele a zaslu ho na jeho emailovou adresu (v dane url)\n\t\t\t\t$hash = $this->User->createHash($user);\n\t\t\t\tif ($this->User->sendHash($user, $hash)) {\n\t\t\t\t\t$this->Session->setFlash('Výzva k potvrzení změny hesla byla odeslána.');\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash('Výzvu k potvrzení změny hesla se nepodařilo odeslat.');\n\t\t\t\t}\n\t\t\t\t$this->redirect(array('controller' => 'users', 'action' => 'login'));\n\t\t\t}\n\t\t}\n\t}",
"public function encryptPass()\n {\n return \"RASAHolaRSSA\";\n }",
"public function auth_user_by_rmn_pass($key)\n\t{\n\t $sql=\"SELECT * FROM waf_users WHERE rmn_pass='\".$this->db->Q($key,1).\"'\";\n $result=$this->db->ROW_Q($sql);\n\t\treturn $result;\n\t\t\n\t}",
"public function getPassword()\n {\n return base64_decode($this->clave);\n }",
"public function generateAuthKey()\n {\n $this->salt = OldDi::GetString(8);\n }",
"public function getClave() {\n\t\treturn $this->clave;\n\t}",
"public function verificarClave($idUsuario, $clave) {\n $this->consulta = \"SELECT COUNT(idUsuario) AS claveOK FROM usuario WHERE idUsuario = $idUsuario AND password = MD5('$clave')\";\n if ($this->consultarBD() > 0) {\n if ($this->registros[0]['claveOK'] > 0) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }"
] | [
"0.8038806",
"0.7438939",
"0.7246355",
"0.69747436",
"0.66613954",
"0.66232985",
"0.66155577",
"0.66034585",
"0.6599402",
"0.63700956",
"0.63416874",
"0.62916684",
"0.62677586",
"0.62593347",
"0.6248087",
"0.6248087",
"0.6248087",
"0.6248087",
"0.6248087",
"0.6248087",
"0.6248087",
"0.6246486",
"0.6241952",
"0.6232735",
"0.61554986",
"0.6152416",
"0.61107415",
"0.61084265",
"0.6101739",
"0.60764027",
"0.606999",
"0.606999",
"0.606999",
"0.6064119",
"0.6064119",
"0.6052186",
"0.60425466",
"0.60425466",
"0.60425466",
"0.60425466",
"0.60425466",
"0.60425466",
"0.6037119",
"0.60263795",
"0.6022179",
"0.60134476",
"0.6010993",
"0.59996426",
"0.599149",
"0.59516245",
"0.5939611",
"0.5928003",
"0.5896816",
"0.58821017",
"0.58421427",
"0.58391565",
"0.58358395",
"0.5827676",
"0.58150953",
"0.5804306",
"0.57854885",
"0.57812274",
"0.57779413",
"0.5774655",
"0.5770253",
"0.57621664",
"0.5752395",
"0.5752089",
"0.5747127",
"0.5743254",
"0.5742949",
"0.57417923",
"0.5736545",
"0.5734736",
"0.57342273",
"0.57340765",
"0.5733741",
"0.5725024",
"0.5724621",
"0.572443",
"0.5723273",
"0.5720313",
"0.5717348",
"0.571623",
"0.57109624",
"0.57082766",
"0.5704533",
"0.5702949",
"0.57009614",
"0.5691861",
"0.5691285",
"0.5690011",
"0.5687984",
"0.5687908",
"0.5687616",
"0.56864434",
"0.5683323",
"0.5664154",
"0.5662788",
"0.56586385"
] | 0.66414 | 5 |
Verifica el codigo de activacion creado en el registro de un usuario | function validarCodigoActivacion ($codigo) {
$data = $this->select()->filtro(['validacion' => $codigo])->fila();
if ($this->bd->totalRegistros > 0) {
$this->establecerAtributos($data);
$this->activo = 1;
$this->validacion = 1;
$this->id_estatus = 1;
if ($this->salvar()->ejecutado()) {
return true;
}
else {
return false;
}
}
else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function verificarActivacion($codActivacion){\n $this-> Conexion -> abrir();\n $this -> Conexion -> ejecutar($this -> ClienteDAO -> verificarActivacion($codActivacion));\n if($this -> Conexion -> numFilas()){\n $this -> Conexion -> ejecutar( $this -> ClienteDAO -> activacion());\n $this -> Conexion -> cerrar();\n return true;\n }else{\n $this -> Conexion -> cerrar();\n return false;\n }\n }",
"public function userCadConfirm($codConfirmacao=''){\n \n\n \n if($codConfirmacao==''){//se em branco retorna NULL (erro)\n \n \n return null;\n \n }else{//caso codigo informado procede com a conferencia e a ativacao\n \n \n \n $sql = new Sql();\n $ativacao = $sql->select('SELECT * FROM usuarios \n WHERE cod_ativacao_usuario = :cod_ativacao_usuario',\n array(':cod_ativacao_usuario'=>$codConfirmacao)); \n \n if(count($ativacao)==0){\n \n \n return null;//caso nada encontrado retorna NULL (deve pode ser um codigo invalido)\n \n }elseif(count($ativacao)>0){//caso codigo de confirmacao for OK entao ativa o cadastro\n \n \n //obtem o id do usuario\n $id_usuario = $ativacao[0]['id_usuario'];\n \n \n //verifica se existe a necessidade de ativacao\n if($ativacao[0]['status_usuario']==1){//cadastro JA ATIVO basta notificar\n \n return true;//retorna true confirmando que o cadastro esta atualizado \n \n }elseif($ativacao[0]['status_usuario']==0){//CASO INATIVO ENTÃO PROCEDE COM A ATIVACAO\n \n //atualiza o cadastro do usuario ativando ele\n $res = $sql->query('UPDATE usuarios SET status_usuario = 1\n WHERE id_usuario = :id_usuario',\n array(':id_usuario'=>$id_usuario));\n \n if($res>0){//se o numero de linhas afetadas for maior que ZERO\n \n return true;//retorna true confirmando que o cadastro esta atualizado\n \n }else{\n return false;//caso nada encontrado retorna FALSE (pode ter ocorrido erro na atualizacao)\n\n }\n }\n } \n }\n }",
"public function activarUsuario() {\n\t\t$this->id_status = self::STATUS_ACTIVED;\n\t\treturn $this->save () ? $this : null;\n\t}",
"public function validacion(){\n\t\t$this->inicializa();\n\t\t$client=Cliente::find(1);\n\t\t$id=$client->transaccion.\"\";\n\t\t// si en la transaccion aparece el id del cliente que esta en la base de datos entonces la transaccion le pertenece\n\t\t// y por tanto es valida\n\t\t$transaction = $this->pasarela->transaction()->find(\"{$id}\");\n\t\t\n\t\tif($client->token==$transaction->customer['id'])\n\t\t\treturn true;\n\t\treturn false;\n\t\t//return response()->json($transaction);\n\t}",
"public function inactivarCodigoContable($conn, $conexion)\r\n {\r\n $idCodigo = $_SESSION['idCodigo'];\r\n\r\n \r\n $tableName = 'codigos_contables';\r\n \r\n $arregloCondition = ['id_codigo' => $idCodigo];\r\n \r\n $arregloDatos['inactivo'] = 1;\r\n\r\n\r\n \r\n\r\n $conexion = new ConexionController();\r\n\r\n $conn = $conexion->initConectar('db');\r\n \r\n $conn->open();\r\n\r\n \r\n\r\n if ($conexion->modificarRegistro($conn, $tableName, $arregloDatos, $arregloCondition)){\r\n\r\n \r\n\r\n return true;\r\n \r\n }\r\n\r\n }",
"public function activar($id, $codigo)\n {\n //si no exite el id o codigo entonces muetra un error de cuenta inexistente\n //y renderiza a la vista activar registro\n if(!$this->filtrarInt($id) || !$this->filtrarInt($codigo)){\n $this->_view->assign('_error', 'Esta cuenta no existe');\n $this->_view->renderizar('activar', 'registro');\n exit; \n }\n //guarda una fila con la consuta de conseguir usuario\n $row = $this->_registro->getUsuario(\n $this->filtrarInt($id),\n $this->filtrarInt($codigo)\n );\n //si no existe la fila entonces se produce un error de cuenta inexistente\n if(!$row){\n $this->_view->assign('_error', 'Esta cuenta no existe');\n $this->_view->renderizar('activar', 'registro');\n exit;\n }\n //si el estado del usuario ya esta activado ser produce un error de cuenta ya activada\n //muestra la vista activar registro.\n if($row['estado'] == 1){\n $this->_view->assign('_error', 'Esta cuenta ya ha sido activada');\n $this->_view->renderizar('activar', 'registro');\n exit;\n }\n //Cambia el estado del usuario a activado\n $this->_registro->activarUsuario(\n $this->filtrarInt($id),\n $this->filtrarInt($codigo)\n );\n //consigue nuevamente información del usuario y lo guarda en una fila\n $row = $this->_registro->getUsuario(\n $this->filtrarInt($id),\n $this->filtrarInt($codigo)\n );\n //si el estado sigue siendo igual a 0 entonces se produce un erro de activación pendiente\n if($row['estado'] == 0){\n $this->_view->assign('_error', 'Error al activar la cuenta, por favor intente mas tarde');\n $this->_view->renderizar('activar', 'registro');\n exit;\n }\n //En otros casos se muestra activación realizada con exito y se muetra vista activar registro.\n $this->_view->assign('_mensaje', 'Su cuenta ha sido activada');\n $this->_view->renderizar('activar', 'registro');\n }",
"public function isRegistered() {\n //1ero. es un registro completo o 2do es un\n //registro incompleto.\n if (is_file(\"/etc/elastix.key\")) { \n if($this->columnExists(\"has_account\")) {\n $result = $this->_DB->getFirstRowQuery(\"select has_account from register;\", true);\n if (is_array($result) && count($result)>0){\n return ($result['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n }\n else return \"yes-inc\";\n }\n else {\n //intento crear la columna \n if(!$this->addColumnTableRegister(\"has_account char(3) default 'no'\")) {\n $this->errMsg = \"The column 'has_account' does not exist and could not be created\";\n return \"yes-inc\";\n }\n\n //Actualizo el valor de la columna\n //con la info desde webservice\n $dataWebService = $this->getDataServerRegistration();\n if(!(is_array($dataWebService) && count($dataWebService)>0)) // no se puedo conectar al webservice\n return \"yes-inc\";\n \n if($this->updateHasAccount(1,$dataWebService['has_account']))\n return ($dataWebService['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n else return \"yes-inc\";\n }\n }\n else return \"no\";\n }",
"public function authorize()\n {\n return Auth::user()->data_confirmacao != null;\n }",
"function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }",
"public function actionInactivarCodigoPresupuestario()\r\n {\r\n\r\n $idCodigo = yii::$app->request->get('value');\r\n $_SESSION['idCodigo'] = $idCodigo; \r\n\r\n $inactivar = self::beginSave(\"inactivar\", 0);\r\n\r\n if($inactivar == true){\r\n return MensajeController::actionMensaje(200);\r\n }else{\r\n return MensajeController::actionMensaje(920);\r\n } \r\n\r\n }",
"public function verificaAppartenenza(){\n \n $sess_user=$this->session->get_userdata('LOGGEDIN');\n $this->utente=$sess_user[\"LOGGEDIN\"][\"userid\"];\n if(isset($sess_user[\"LOGGEDIN\"][\"business\"])){\n \n $this->azienda=$sess_user[\"LOGGEDIN\"][\"business\"];\n \n \n }\n \n \n }",
"protected function Authorized(){\n // usuario\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return true;\n }\n \n // Autorizar la solicitud atendiendo a la activacion del usuario\n\t\t$uType = $this->getUserType();\n\t\t\n\t\tif ($uType >= USER_CLIENT){ // Ok user is active\n\t\t\t$res = DBHelper::Select('users', '*', \"email='{$this->user}'\");\n\t\t\t//if ((!$res[0]['name'] || !$res[0]['phone']) && $res[0]['expiration'] - time() >= 7 * 24 * 3600){\n\t\t\t//\t$this->url = Url::Parse(\n // \t\t\"http://\".HTTP_HOST.\"/__www/set-user-info.php?user={$this->user}&success_url=\" . urlencode((string)$this->data->url)\n \t//\t);\n\t\t\t//}\n\t\t}elseif(DBHelper::is_user_registered($this->user) > 0){ \n // La activacion del usuario ha expirado. Redirigir a\n // la pagina de recarga\n\t\t\t\n /** @var Url url */\n $url = $this->getUrlFromData();\n if (stripos($url->host, HTTP_HOST) === FALSE){\n\t\t\t $this->url = Url::Parse(ACCOUNT_EXPIRED_URL . \"&user={$this->user}&mobile={$this->data->mobile}&success_url=\". urlencode((string)$this->data->url));\n }\n\t\t}else {\n // Se permite acceso solamente al servidor de Aurora\n return FALSE;\n }\n \n return true;\n\t}",
"function validar_Validado()\n {\n\n $this->resource = 'Actividades';\n\n if ($this->no_vacio($this->validado) === false) {\n $this->code = '70032';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($this->es_validado($this->validado) === false) {\n $this->code = '70033';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n }\n }",
"public function authorize()\n {\n $usuario = Auth::User();\n //se ele e master\n if($usuario->tipo_usuario_id!=8){\n return false; \n }\n return true;\n }",
"public function authenticate()\n\t{\n\t\t\n\t\t$username=strtolower($this->username);\n\t\t// aca deber�a agregar la condici�n de activo\n\t\t $user=Usuario::model()->find('LOWER(nombre)=? and estado=1',array($username));\n\t\t if($user===null)\n\t\t\t$this->errorCode=self::ERROR_USERNAME_INVALID;\n\t\t else if(!$user->validatePassword($this->password))\n\t\t\t$this->errorCode=self::ERROR_PASSWORD_INVALID;\n\t\t else\n\t\t {\n\t\t\t$this->_id=$user->id;\n\t\t\t$this->username=$user->nombre; \n //si el estado es 0 le muestro un cartel avisando que debe completar sus datos sino se bloqueará\n /* if($user->estado==0 && !isset($_GET['act']))\n Yii::app()->user->setFlash(\"warning\",\"Debe completar sus datos personales sino su cuenta será deshabilitada.<br>\n \".CHtml::link('Completar',array('site/completarRegistro','act'=>$user->hash_activacion)));*/\n\t\t\t$this->errorCode=self::ERROR_NONE;\n\t\t }\n\treturn $this->errorCode==self::ERROR_NONE;\n\t}",
"public function activar()\n {\n $id = $this->input->post('activar');\n $this->load->model('Usuario_model');\n $this->Usuario_model->activar_cuenta($id);\n $this->listar_usuarios();\n }",
"public function SesionIniciada()\n{\n \n $ConexionCassandra=new ManejadorCassandra();//Conexion con la base de datos \n $ObtenerIp=$ConexionCassandra->ConsultaPorParametro('sesion',array('ip'=>$this->ObtenerIp())); //Busco en la tabla sesion si se encuentra la ip\n $VerificarIp=$ObtenerIp->getAll();\n \n if($VerificarIp!=NULL){\n \n return true; //Retorna true si se encontra el usuario\n }\n else{\n \n return false; //Retorna false si no se encuentra el usuario\n }\n \n }",
"function StatusVerify($usuario, $senha){\n $usuario = ClearString($usuario);\n $senha = CryptPassword($senha);\n $query = \"SELECT userchave FROM membros WHERE usuario=:username AND senha=:senha AND status='1'\";\n try{\n $result = MySQLStart()->prepare($query);\n $result->bindParam(':username', $usuario, PDO::PARAM_STR);\n $result->bindParam(':senha', $senha, PDO::PARAM_STR);\n $result->execute();\n $count = $result->rowCount();\n if($count > 0){\n $sucesso = true;\n }else{\n $sucesso = false;\n }\n }catch (PDOException $erro_bd){\n echo $erro_bd;\n }\n return $sucesso;\n }",
"function verificarenvio($expediente,$usuario){\n \n $parametros=array($expediente);\n $query=$this->db->query(\"select t.cTramiteTipoPersona,e.nExpedienteCodigo from tb_sistram_expediente as e inner join tb_sistram_tramite as t on e.nTramiteId=t.nTramiteId where e.nExpedienteId=?\",$parametros);\n if($query){\n $row=$query->row();\n $tipopersona=$row->cTramiteTipoPersona;\n if($usuario==$tipopersona){\n return true;\n }\n else {\n $this->setExpGenerado($row->nExpedienteCodigo);\n return false;\n }\n \n }\n \n \n }",
"function verificarComprobante($fecha)\n {\n global $db;\n $sql = \" select count(dateReception) as total from almacen_reception\n where tipoTrans = 'A' and tipoComprobante = 'A';\n and dateReception >= '$fecha' \";\n echo $sql;\n $db->SetFetchMode(ADODB_FETCH_ASSOC);\n \t$info = $db->execute($sql);\n if ($info->fields(\"total\") == 0)\n {\n return 1; // positivo, puede registrar\n }\n else if ($info->fields(\"total\") > 0)\n {\n return 0; // existe ajustes, no puede registrar\n }\n }",
"function ValidarServicioEjecutivo($id_servicio,$id_ejecutivo,$codigo){\n\t\t\t\t\t$this->db->where(\"id_servicio\",$id_servicio);\n\t\t\t\t\t$this->db->where(\"f_id_usuario\",$id_ejecutivo);\n\t\t\t\t\t$this->db->where(\"Codigo_activacion\",$codigo);\n\t\t\t\t\t$query = $this->db->get('t_dat_servicios');\n\n\t\t\t\t\treturn($query->num_rows()==1);\n\t\t\t\t}",
"public function CheckActivationCode($code){\n $this->db->where('activation_code',$code);\n $query = $this->db->get('users'); \n if ($query->num_rows() > 0)\n { \n return true;\n }\n else\n { \n return false;\n }\n }",
"function modificarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\t\t$this->setParametro('id_cuenta_bancaria_boa','id_cuenta_bancaria_boa','int4');\n\t\t$this->setParametro('desc_cuenta','desc_cuenta','varchar');\n\t\t$this->setParametro('moneda','moneda','int4');\n\t\t$this->setParametro('cuenta','cuenta','varchar');\n\t\t$this->setParametro('tipo_cuenta','tipo_cuenta','bpchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado_cuenta','estado_cuenta','bpchar');\n\t\t$this->setParametro('banco','banco','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"private function existeusuario2($usuario)\n {\n $stmt = $this->con->prepare(\"SELECT id_conductor FROM `descuento` WHERE id_conductor = ?\");\n $stmt->bind_param(\"s\", $usuario);\n $stmt->execute(); \n $stmt->store_result();\n return $stmt->num_rows > 0;\n }",
"function activationVerife($jeton) {\n\t\t$resultat = Bdd::connectBdd()->prepare(SELECT.ALL.JETONMAIL.JETONACTIVATION);\n\t\t$resultat -> bindParam(':jeton', $jeton);\n\t\t$resultat -> execute();\n\t\tif($resultat -> rowCount() === 1) {\n\t\t\t$donnee = $resultat -> fetch(PDO::FETCH_ASSOC);\n\t\t\tActivation::activationAuto($donnee['login']);\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"function modificarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_baja','fecha_baja','date');\n\t\t$this->setParametro('nro_cuenta','nro_cuenta','varchar');\n\t\t$this->setParametro('fecha_alta','fecha_alta','date');\n\t\t$this->setParametro('id_institucion','id_institucion','int4');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('denominacion','denominacion','varchar');\n\t\t$this->setParametro('centro','centro','varchar');\n\t\t\n\t\t$this->setParametro('id_finalidads','id_finalidads','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function activate() {\r\n \r\n $statement = ConnectionModel::getConnection()->query('Select * From user where id = :id and confirmToken = :confirmToken',\r\n ['id' => $this->_id,\r\n 'confirmToken' => $this->_confirmToken]);\r\n \r\n if($statement) {\r\n \r\n $activate = ConnectionModel::getConnection()->query('Update user set isConfirmed = 1 where id = :id', \r\n ['id' => $this->_id]);\r\n \r\n if($activate) {\r\n \r\n $user = ConnectionModel::getConnection()->query('Select * From user where id = :id', \r\n ['id' => $this->_id]);\r\n \r\n $result = new UserModel('','');\r\n $result->hydrate($user[0]);\r\n \r\n return $result;\r\n \r\n }\r\n \r\n }\r\n \r\n return false;\r\n \r\n}",
"public function estaInscritoActividadEconomica()\r\n\t\t{\r\n\t\t\t$result = false;\r\n\t\t\t$inscripcion = New InscripcionActividadEconomicaSearch($this->_id_contribuyente);\r\n\t\t\t$result = $inscripcion->yaEstaInscritoActividadEconomica();\r\n\t\t\treturn $result;\r\n\t\t}",
"public function getActivate($code) {\n\n\n\t$user = User::where('code' , '=' , $code)->where('active' , '=' ,0);\n\n\tif($user->count()) {\n\t\t$user = $user->first();\n\n\t\t// update user activate \n\t\t$user->active = 1;\n\t\t$user->code = '';\n\t\t if($user->save()) {\n\n\n\t\t \treturn Redirect::to('users/index')->with('yes' , 'account activate done u can now login ');\n\n\n\t\t }\n\t}\n\n\treturn Redirect::to('users/index')->with('yes' , 'we coulnt activate ur account yet pleas try again later ');\n\n}",
"public function hasActivateCode(){\n return $this->_has(10);\n }",
"public function hasActivateCode(){\n return $this->_has(10);\n }",
"public function Modificar(): bool\n {\n $retorno = false;\n $objetoAccesoDato = AccesoDatos::RetornarObjetoAcceso();\n\n\n $consulta =$objetoAccesoDato->RetornarConsulta(\"UPDATE usuarios SET nombre = :nombre, correo = :correo, clave = :clave, id_perfil = :id_perfil\n WHERE usuarios.id = :id\");\n // $consulta = $objetoAccesoDato->RetornarConsulta(\"UPDATE `usuarios` SET `nombre`='$this->nombre',`correo`='$this->correo',\"\n // . \"`clave`='$this->clave',`id_perfil`='$this->id_perfil' WHERE `id`='$this->id'\");\n\n\n $consulta->bindParam(':correo', $this->correo, PDO::PARAM_STR);\n $consulta->bindParam(':clave', $this->clave, PDO::PARAM_STR);\n $consulta->bindParam(':nombre', $this->nombre, PDO::PARAM_STR);\n $consulta->bindParam(':id_perfil', $this->perfil, PDO::PARAM_INT);\n $consulta->bindParam(':id', $this->id, PDO::PARAM_INT);\n\n $consulta->execute();\n $filasAfectadas = $consulta->rowCount();\n if ($filasAfectadas > 0)\n $retorno = true;\n\n\n return $retorno;\n }",
"static public function mdlAsignarCodigo($datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE miembros SET codigo_activador = :codigo_activador WHERE id_miembro = :id_miembro\");\n\n\t\t$stmt->bindParam(\":codigo_activador\", $datos[\"codigo_activador\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_miembro\", $datos[\"id_miembro\"], PDO::PARAM_STR);\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n }",
"public function activacion($codimpuesto){\n\n\t\tyii::app()->db->createCommand()\n\t\t\t->update($this->tableName(),\n\t\t\t\tarray(\"activo\"=>'0'),\n\t\t\t\t\"id <> :vid AND hcodimpuesto=:vcodigo\",\n\t\t\t\tarray(\":vid\"=>$this->id,\":vcodigo\"=>trim($codimpuesto)));\n return 1;\n\t}",
"function verify()\n {\n $activation = null;\n $param = getParameter();\n if (!empty($param[0])) {\n $activation = $param[0];\n }\n $resultActive = $this->model->khachhang->activeAccount($activation);\n switch ($resultActive) {\n case 1 :\n redirect('user/active_expire');\n break;\n case 2:\n redirect('user/active_success');\n break;\n case 3:\n redirect('user/active_fail');\n break;\n }\n }",
"private function verificaAcao() {\n $return = 0;\n if ($this->acao == 'adicionar') {\n $return = $this->verificaAdicionar();\n } elseif ($this->acao == 'editar') {\n $return = $this->verificaEditar();\n } elseif ($this->acao == 'remover') {\n $return = $this->verificaRemover();\n }\n return $return;\n }",
"function getCodUsuario() {\n return $this->codUsuario;\n }",
"public function inactivarRecesoDia($idAgendaHorarioReceso){\n\t\t\n\t\t $idAgendaHorarioReceso \t\t= parent::escaparQueryBDCliente($idAgendaHorarioReceso); \t\t\n\n\n $query = \"UPDATE tb_agendaHorarioReceso SET estado = 'I'\n \t\t\t\tWHERE idAgendaHorarioReceso = '$idAgendaHorarioReceso' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \n\n\t}",
"public function hasActivateCode(){\n return $this->_has(3);\n }",
"public function accesiblePara( $usuarioActivo ){\n return $usuarioActivo->accesoElemento( $this );\n }",
"function verif_codigo(){\n if($this->input->is_ajax_request()){\n $post = $this->input->post();\n\n $codigo= $this->security->xss_clean($post['codigo']); /// Codigo\n $com_id= $this->security->xss_clean($post['com_id']); /// Componente id\n\n $verif_com_ope=$this->model_producto->verif_componente_operacion($com_id,$codigo);\n if(count($verif_com_ope)!=0){\n echo \"true\"; ///// no existe un CI registrado\n }\n else{\n echo \"false\"; //// existe el CI ya registrado\n } \n }else{\n show_404();\n }\n }",
"public function ctrIngresoUsuario(){\n\t\tif(isset($_POST[\"ingUsuario\"])){\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/',$_POST[\"ingUsuario\"]) && \n\t\t\t\tpreg_match('/^[a-zA-Z0-9]+$/',$_POST[\"ingPassword\"])){\n\n\t\t\t\t$tabla=\"usuarios\";\n\t\t\t$item=\"usuario\";\n\t\t\t$valor=$_POST[\"ingUsuario\"];\n\t\t\t$respuesta=ModeloUsuarios::MdlMostrarUsuarios($tabla,$item,$valor);\t\n\t\t\t //var_dump($respuesta[\"usuario\"]);\n\t\t\tif($respuesta[\"usuario\"]==$_POST[\"ingUsuario\"] && $respuesta[\"password\"]==$_POST[\"ingPassword\"]){\n\t\t\t\t$_SESSION[\"iniciarSesion\"]=\"ok\";\n\t\t\t\techo '<script>\n\t\t\t\twindow.location=\"inicio\";\n\t\t\t\t</script>';\n\t\t\t}else{\n\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelva a intentarlo</div>';\n\t\t\t}\n\t\t}\n\t}\n }",
"public function inactivarHorarioFecha($idAgendaHorarioFechaUsuario){\n\t\t\n\t\t $idAgendaHorarioFechaUsuario \t\t= parent::escaparQueryBDCliente($idAgendaHorarioFechaUsuario); \t\t\n\n\n $query = \"UPDATE tb_agendaHorarioFechaUsuario SET estado = 'I'\n \t\t\t\tWHERE idAgendaHorarioFechaUsuario = '$idAgendaHorarioFechaUsuario' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \n\n\t}",
"private function existeusuario($usuario)\n {\n $stmt = $this->con->prepare(\"SELECT id_conductor FROM `carga` WHERE id_conductor = ?\");\n $stmt->bind_param(\"s\", $usuario);\n $stmt->execute(); \n $stmt->store_result();\n\n return $stmt->num_rows > 0;\n }",
"function verificarRegistro (){\n\t\t//Llamo a la vista registro\n\t\trequire \"app/Views/Registro.php\";\n\t\t$usuario = new Usuario();\n\t\t//Mandar datps\n \t\t$usuario->nombre=$_POST['nombre'];\n \t\t$usuario->apellidoPaterno=$_POST['apellidoP'];\n \t\t$usuario->apellidoMaterno=$_POST['apellidoM'];\n \t\t$usuario->nombreUsuario=$_POST['nombreUsuario'];\n \t\t$usuario->correo=$_POST['correo'];\n \t\t$usuario->contrasenia=$_POST['pass'];\n \t\t$usuario->sexo=$_POST['sexo'];\n \t\t$usuario->descripcion=$_POST['descripcion'];\n \t\t$usuario->crear();\n \t\theader(\"Location:/Proyecto/index.php?controller=Usuario&action=login\");\n\n\t}",
"public function validarCorreo() {\r\n if (!$this->hasErrors(\"correoElectronico\")) {\r\n $usuario = null;\r\n \r\n if ($this->getScenario() == 'registro') {\r\n $usuario = Usuario::model()->find('correoElectronico=:correo', array(':correo' => $this->correoElectronico));\r\n }else if($this->getScenario() == 'actualizar'){\r\n $usuario = Usuario::model()->find('correoElectronico=:correo AND identificacionUsuario<>:cedula', array(':correo' => $this->correoElectronico, ':cedula' => $this->cedula));\r\n }\r\n\r\n if ($usuario !== null) {\r\n $this->addError('correoElectronico', 'Correo electrónico ya registrado');\r\n }\r\n }\r\n }",
"public function activeAccount(Request $request, $infoActive = \"\" ){\n //chay sang trng hom neu da login\n if(Auth::user()){\n return redirect(\"home\");\n }\n\n if ( strlen( $infoActive ) > 0 ){\n $data = json_decode( base64_decode( $infoActive ) );\n\n //check neu da active roi va chua login hien thong bao da active kem link login\n try {\n $activeUser = User::where('email', '=', $data[1])->firstOrFail();\n if( $activeUser->active == 1 ) {\n //chay sang trang thong bao\n return redirect(\"notification/useractived\");\n }\n } catch (Exception $e) {\n echo \"Error : ket noi\";\n die(); \n }\n $count = User::where('email','=', $data[1])\n ->where('updated_at','>', Carbon::now()->subDay(3))\n ->count();\n if($count==0){\n $request->session()->flash('error', 'Link Active Account expired!');\n }else{\n //kiem tra va update kich hoat tk\n if ( $data[0] == hash( \"sha256\", md5( md5( $data[1] ) ) ) ) {\n try {\n $user = User::where( 'email', '=', $data[1] )->first();\n $user->active = 1;\n $user->save();\n UserData::find($user->id )->update( ['active' => 1] );\n //Active vaf redirect ve trang thong bao kem theo link login\n if($user){\n return redirect(\"notification/useractive\");\n }else{\n $request->session()->flash('error', 'Cannot activate !');\n }\n } catch ( Exception $e ) {\n \n }\n } else {\n $request->session()->flash('error', 'Something wrongs. We cannot activated!');\n }\n }\n\n } else {\n $request->session()->flash('error', 'Something wrongs. We cannot activated!');\n }\n return view('adminlte::auth.reactive');\n }",
"public function verificarLoteExistente()\r\n {\r\n $datos = $_SESSION['idLote'];\r\n $anoImpositivo = $datos[0]->ano_impositivo;\r\n $rangoInicial = $datos[0]->rango_inicial;\r\n $rangoFinal = $datos[0]->rango_final;\r\n \r\n \r\n $busquedaLote = Calcomania::find()\r\n \r\n\r\n ->select('*')\r\n \r\n ->where('nro_calcomania between '. $rangoInicial .' and '.$rangoFinal)\r\n ->andWhere('estatus =:estatus' , [':estatus' => 0])\r\n ->andWhere('ano_impositivo =:ano_impositivo' , [':ano_impositivo' => $anoImpositivo])\r\n ->all();\r\n\r\n\r\n if ($busquedaLote == true){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"static public function ctrRegistroBitacora(){\r\n\r\n\t\tif (isset($_POST[\"editarIdBanco\"])) {\r\n\r\n\t\t$tabla = \"bitacora\";\r\n\r\n\t\t$datos = array(\"usuario\" => $_SESSION['nombre'],\r\n\t\t\t\t\t\t\t \"perfil\" => $_SESSION['perfil'],\r\n\t\t\t\t\t\t\t \"accion\" => 'Edición Banco 6278',\r\n\t\t\t\t\t\t\t \"folio\" => $_POST[\"editarIdBanco\"]);\r\n\r\n\t\t$respuesta = ModeloBanco6278Diario::mdlRegistroBitacora($tabla, $datos);\r\n\r\n\t\treturn $respuesta;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"public function actionActivar($id)\n {\n $model = $this->findModel($id);\n $auth = Yii::$app->authManager;\n if($model->activo==True)\n {\n $model->activo=False;\n $auth->revokeAll($model->fk_usuario);\n $authorRole = $auth->getRole('Invitado');\n $auth->assign($authorRole, $model->fk_usuario);\n Yii::$app->getSession()->setFlash('warning',\"Se desactivó el usuario.\");\n }\n else\n {\n $model->activo=True;\n $auth->revokeAll($model->fk_usuario);\n $authorRole = $auth->getRole('Usuario');\n $auth->assign($authorRole, $model->fk_usuario);\n Yii::$app->getSession()->setFlash('success',\"Se activó el usuario.\");\n //Se crea una notificación por correo\n \\Yii::$app->mailer->compose()\n ->setTo($model->fkUsuario->email)\n ->setFrom([\\Yii::$app->params['supportEmail'] => \\Yii::$app->name . ' robot'])\n ->setSubject('Activación por el admin de legalitas')\n ->setTextBody(\"\n Fue activado por el admin de legalitas, ya puede utilizar el sistema\"\n )\n ->send();\n }\n $model->save();\n return $this->redirect('index');\n }",
"public function ValidarEstado(UsuarioBean $UsuarioBean ){\n try {\n \n $instancia = ConexionBD::getInstance();\n $sql = \"SELECT usu.estado from usuario as usu \n WHERE usu.usu_nombre = '$UsuarioBean->usu_nombre' and usu.usu_contra='$UsuarioBean->usu_contra';\";\n \n \n \n $res = $instancia->EjecutarConEstado($sql);\n $estado = $instancia->obtener_filas($res);\n \n\n return $estado;\n \n } catch (Exception $ex) {\n echo $ex->getTraceAsString() . \"ERROR EN LA LINEA : \" . $ex->getLine() . \" \" . $ex->getMessage();\n }\n\n \n }",
"static public function ctrRegistroBitacora(){\r\n\r\n\t\tif (isset($_POST[\"editarIdBanco\"])) {\r\n\r\n\t\t$tabla = \"bitacora\";\r\n\r\n\t\t$datos = array(\"usuario\" => $_SESSION['nombre'],\r\n\t\t\t\t\t\t\t \"perfil\" => $_SESSION['perfil'],\r\n\t\t\t\t\t\t\t \"accion\" => 'Edición Banco 1219',\r\n\t\t\t\t\t\t\t \"folio\" => $_POST[\"editarIdBanco\"]);\r\n\r\n\t\t$respuesta = ModeloBanco1219Diario::mdlRegistroBitacora($tabla, $datos);\r\n\r\n\t\treturn $respuesta;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"public function buscaCvePas(){\n /* Consulta usando ELOQUENT -> Trae al usuario si lo encuentra en la tabla usuarios */\n $usuario = Usuario::where([\n ['cuentaUsuario', $this->cuentaUsuario],\n ['contrasenia', $this->contrasenia]\n ])->first();\n return $usuario;\n }",
"function _active($info)\n\t{\n\t // Gan trang thai xac thuc\n\t $data = array();\n\t $data['status'] = mod('order')->status('completed');\n\t\n\t // Cap nhat du lieu vao data\n\t model('user_bank')->update($info->id, $data);\n\t // Gui thong bao\n\t set_message(lang('notice_update_success'));\n\t return TRUE;\n\t}",
"function habilitarContrato(){\n $this->procedimiento = 'adq.f_cotizacion_ime';\n $this->transaccion = 'ADQ_HABCONT_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }",
"public function checkActivationUser($email, $code)\n {\n $sql = \"SELECT id FROM `user` WHERE `email` = '$email' and `activationCode`='$code'\";\n $query = $this->db->prepare($sql);\n $query->execute();\n $result = $query->fetchAll();\n $count = sizeof($result);\n if ($count > 0)\n return true;\n else return false;\n }",
"public function verificarUsuario($usuario){\n\n\t\t$id = $this->db->prepare(\"select id, codigo from users where user = :usuario\");\n\t\t$id->bindParam(':usuario',$usuario);\n\t\t$id->execute();\n\t\t$row = $id->fetch();\n\t\t\n\t\treturn $row;\t\n\t}",
"function checkRegistered(){\n $registered_user=User::find('all',array('conditions' => array('email=? and active=1',$this->email)));\n $registered_user_id='';\n if(!empty($registered_user)){\n foreach($registered_user as $user){\n $registered_user_id=$user->id;\n }\n $this->user_id=$registered_user_id;\n }\n return null;\n }",
"public function verificarLogin($nombre, $password)\n {\n //busca en la tabla usuarios los campos donde el nombre sea igual a admin si no encuentra nada devuelve null\n $usuario = R::findOne('usuarios', 'alias=?', [\n $nombre\n ]);\n $a=\"\";\n $b=\"\";\n echo $usuario->alias;\n echo $usuario->contrasena;\n //comprueba si la variable usuario es distinta al campo alias almacenado en la base de datos si es asi a octiene el valor=\"no\"\n if ($usuario->alias!=$nombre) {\n \n $a=\"no\";\n }\n //comprueba si la variable password es distinta al campo contraseña almacenado en la base de datos si es asi b octiene el valor=\"no\"\n if (! password_verify($password, $usuario->contrasena)) {\n \n $b=\"no\";\n }\n // si a y b de los if anteriores son no redirecciona al controlador a la carpeta usuarios dentro de esta carpeta al controlador usuarios.php linea 192\n \n if($a!=\"no\"&& $b!=\"no\"){\n //rdirege al controlador Usuarios/Bienvenidos_u\n \n redirect(base_url().\"usuario/Usuarios/Bienvenidos_u\");\n \n \n \n }\n else{\n session_destroy();\n // redirecciona al controlador usuario usuarios.php linea 190 dentro de la carpeta usuario\n redirect(base_url().\"usuario/Usuarios/errorsesion\");\n }\n \n }",
"public function authorize()\n {\n /* \n AQUI PODRIA REALIZAR ALGÚN TIPO DE VALIDACIÓN INDICANDO SI EL USUARIO TIENE\n PERMISOS PARA CREAR EL RECURSO, EN ESTE CASO SOLO DEVUELVO EL true PARA INDICAR\n QUE CUALQUIER USUARIO PUEDE CREAR EL RECURSO\n */\n return true;\n }",
"public function isVerified()\n\t{\n\t\tif (($record=$this->getActiveRecord())===null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool)$record->correo_verificado;\n\t}",
"public function efectivaReserva($cod) {\n $this->db->query('UPDATE venta SET efectiva=1 WHERE cod_venta like \"' . $cod . '\"');\n if ($this->db->affected_rows() > 0) {\n return \"Se ha registrado la venta\";\n } else {\n return \"Error Ha ocurrido un problema, No se ha registrado la venta\";\n }\n }",
"public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"user01\"])){\n\n\t\t//\t if(preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"ingresoEmail\"]) && preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingresoPassword\"])){\n\n\t\t\t \t//$encriptar = crypt($_POST[\"ingresoPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\t\t\t\t$encriptar = crypt($_POST[\"passwords01\"], '$2a$07$asxx54ahjppf17sd87a5a4dDDGsystemdevmybebe$');\n\n\t\t\t \t$tabla = \"genusuario\";\n\t\t\t \t$item = \"usunombre\";\n\t\t\t \t$valor = $_POST[\"user01\"];\n\n\t\t\t \t$respuesta = UserModel::mdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t//echo \"<pre>\".print_r($respuesta).\"</pre>\";\n\n\t\t\t \tif($respuesta[\"usunombre\"] == $_POST[\"user01\"] && $respuesta[\"usuclave\"] == $encriptar){\n\n\t\t\t \t\tif($respuesta[\"usuverific\"] == 0){\n\n\t\t\t \t\t\techo'<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\t\t \ttitle: \"¡ERROR!\",\n\t\t\t\t\t\t\t\t \ttext: \"¡El correo electrónico aún no ha sido verificado, por favor revise la bandeja de entrada o la carpeta SPAM de su correo electrónico para verificar la cuenta, o contáctese con nuestro soporte a [email protected]!\",\n\t\t\t\t\t\t\t\t \tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\t\tif(result.value){ \n\t\t\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t\treturn;\n\n\t\t\t \t\t}else{\n\n\t\t\t \t\t\t$_SESSION[\"validarSesion\"] = \"ok\";\n\t\t\t \t\t\t$_SESSION[\"id\"] = $respuesta[\"oid\"];\n\n\t\t\t \t\t\t$ruta = RouteController::ctrRoute();\n\n\t\t\t \t\t\techo '<script>\n\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"'.$ruta.'backoffice\";\t\t\t\t\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t \t\t}\n\n\t\t\t \t}else{\n\n\t\t\t \t\techo'<script>\n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\t \ttitle: \"¡ERROR!\",\n\t\t\t\t\t\t\t \ttext: \"¡El email o contraseña no coinciden!\",\n\t\t\t\t\t\t\t \tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\tif(result.value){ \n\t\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t});\n\n\t\t\t\t\t</script>';\n\n\t\t\t \t}\n\n\n\t\t/*\t }else{\n\n\t\t\t \techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\ttitle: \"¡CORREGIR!\",\n\t\t\t\t\t\ttext: \"¡No se permiten caracteres especiales en ninguno de los campos!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\thistory.back();\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\t\n\n\t\t\t\t</script>';\n\n\t\t\t }*/\n\n\t\t}\n\n\t}",
"function status($uuid){\n perfil_superior();\n if ($uuid==$this->session->userdata('usuario')[\"uuid\"]) {\n #MENSAJE ERROR\n $this->session->set_flashdata('mensaje_error',\"No puedes cambiar tu propio estado\");\n redirect('usuarios/index','refresh');\n }\n $resultado=$this->Usuario_Model->get_user($uuid);\n if ($resultado[\"status\"]==1) {\n $usuario = [\n \"status\"=> 0,\n \"fecha_modificacion\" => date('Y-m-d H:i:s') \n ];\n $mensaje = \"Desactivado\";\n }else{\n $usuario = [\n \"status\"=> 1,\n \"fecha_modificacion\" => date('Y-m-d H:i:s') \n ];\n $mensaje = \"Activado\";\n }\n $this->Usuario_Model->update($uuid,$usuario);\n\n #MENSAJE EXITO\n $this->session->set_flashdata('mensaje_exito',\"Usuario \".$mensaje);\n redirect('usuarios/index','refresh');\n \n \n }",
"public function getActivate($code){\n\t\t\n\t\t//find the user where activate_code is same and active is false\n\t\t$user =\tUser::where('activate_code','=',$code);\n\n\t\t//If user found\n\t\tif($user->count()){\n\t\t\t\n\t\t\t//get user data\n\t\t\t$user=$user->first();\n\t\t\t\n\t\t\t//update user active state\n\t\t\t$user->active\t\t\t=\t1;\n\t\t\t$user->activate_code\t=\t'';\n\n\t\t\t//save to db\n\t\t\tif($user->save()){\n\t\t\t\t//redirect to login page with success msg\n\t\t\t\treturn Redirect::route('account-login')->with('account-active-msg','<div class=\"alert alert-info\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAccount has been activated. <br/>You can login now.\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t\t\t}\n\t\t}\n\n\t\t//redirect to login page with alternative success msg\n\t\treturn Redirect::route('account-login')->with('account-active-msg','<div class=\"alert alert-info\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYour account already activated. <br/>You can login now.\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t}",
"public function authorize()\n {\n $position = Position::findOrFail($this->position_id);\n $project = $position->Project;\n $position_application_count = Application::where('user_id', auth()->user()->id)->where('position_id', $this->position_id)->count();\n if ($position_application_count == 0 && $project->user_id != auth()->user()->id && $position->status == 1) {\n //daca nu este proiectul meu si daca nu mai am aplicatii la aceasta pozitie si daca statusul positiei este 1\n return true;\n }\n return false;\n }",
"static public function ctrRegistroBitacora(){\r\n\r\n\t\tif (isset($_POST[\"editarIdBanco\"])) {\r\n\r\n\t\t$tabla = \"bitacora\";\r\n\r\n\t\t$datos = array(\"usuario\" => $_SESSION['nombre'],\r\n\t\t\t\t\t\t\t \"perfil\" => $_SESSION['perfil'],\r\n\t\t\t\t\t\t\t \"accion\" => 'Edición Banco 0840',\r\n\t\t\t\t\t\t\t \"folio\" => $_POST[\"editarIdBanco\"]);\r\n\r\n\t\t$respuesta = ModeloBanco0840Diario::mdlRegistroBitacora($tabla, $datos);\r\n\r\n\t\treturn $respuesta;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"public function probar_usuario_sucursal($newsucursal){\n $cuenta = $this->ci->session->userdata('usuario');\n $cuenta = $this->ci->arixkernel->select_one_content('sucursal_id','config.v_cuenta_sucursal', array('cuenta_id' => $cuenta, 'sucursal_id'=>$newsucursal));\n if (!is_null($cuenta)) {\n return true;\n }else{\n return false;\n }\n }",
"public function verificarConta() {\n\t\t$this->form_validation->set_rules('email', 'E-Mail', 'trim|required|min_length[5]|max_length[254]|valid_email');\n\t\t$this->form_validation->set_rules('senha', 'Senha', 'trim|required|min_length[6]|max_length[20]');\n\n\t\tif($this->form_validation->run()) {\n\t\t\t$resposta = $this->modelLogin->verificarConta($this->input->post());\n\n\t\t\tif(isset($resposta['codigo'])) {\n\t\t\t\t$data = array (\n\t\t\t\t\t\t'codigo' => $resposta['codigo'],\n\t\t\t\t\t\t'nome' => $resposta['nome'],\n\t\t\t\t\t\t'email' => $this->input->post('email'),\n\t\t\t\t\t\t'logado' => true\n\t\t\t\t\t);\n\t\t\t\t\t$this->session->set_userdata($data);\n\n\t\t\t\techo 'success';\n\t\t\t}\n\t\t\telse\n\t\t\t\techo 'error';\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\techo 'error';\n\t\t}\n\t}",
"private function existe_usuario()\n\t{\n\t\t$data = $this->request->getRawInput();\n\t\t$ruc = $data['nick']; \n\t\t$usu = new Admin_model();\n\t\t$usuarioObject = $usu->where(\"nick\", $ruc) \n\t\t->first();\n\t\treturn !is_null($usuarioObject);\n\t\t \n\t}",
"function post_conectar()\n\t{\n\t\t//En este metodo antiguamente se incluia codigo para asegurarse que el esquema de auditoria\n\t\t//guardara el usuario conectado.\n\t}",
"static public function tryToActivateAccount() {\r\n\t\tDB::getInstance()->stopAddingAccountID();\r\n\t\t$Account = DB::getInstance()->query('SELECT id FROM `'.PREFIX.'account` WHERE `activation_hash`='.DB::getInstance()->escape($_GET['activate']).' LIMIT 1')->fetch();\r\n\t\tDB::getInstance()->startAddingAccountID();\r\n\r\n\t\tif ($Account) {\r\n\t\t\tDB::getInstance()->update('account', $Account['id'], 'activation_hash', '');\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"function activate($correo){\n $campos = array('activa' => 1);\n \n return $this->db->updateParameters(self::TABLA, $campos, array('email' => $correo));\n }",
"public function userExists($codigo, $clave, $tipo_usuario)\n\t{\n\t\t$db = Db::getConnect();\n\t\t$md5Clave = md5($clave);\n\t\t$query = $db->prepare('SELECT * FROM usuarios \n\t\t\t\t\t\t\t\t\t\t\t WHERE codigo = :codigo AND clave = :clave\n\t\t\t\t\t\t\t\t\t\t\t\t AND tipo = :tipo');\n\t\t$query->execute([\n\t\t\t'codigo' => $codigo,\n\t\t\t'clave' => $md5Clave,\n\t\t\t'tipo' => $tipo_usuario\n\t\t]);\n\n\t\t// ME TRAE EL NUMERO DE FILAS ENCONTRADAS\n\t\tif ($query->rowCount()) {\n\n\t\t\tforeach ($query as $currentUser) {\n\t\t\t\t$this->id = $currentUser['id'];\n\t\t\t\t$this->tipo = $currentUser['tipo'];\n\t\t\t\t$this->nombre = $currentUser['nombre'];\n\t\t\t\t$this->apellido = $currentUser['apellido'];\n\t\t\t\t$this->cedula = $currentUser['cedula'];\n\t\t\t\t$this->foto = $currentUser['foto'];\n\t\t\t\t$this->direccion = $currentUser['direccion'];\n\t\t\t\t$this->telefono = $currentUser['telefono'];\n\t\t\t\t$this->estudios = $currentUser['estudios'];\n\t\t\t\t$this->anopromo = $currentUser['anopromo'];\n\t\t\t\t$this->codigo = $currentUser['codigo'];\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function tiene_cuenta()\n {\n if ($this->plan_de_cuenta->id != NULL)\n return true;\n else\n return false;\n }",
"public function validaExistencia($acceso)\n\t{\n\t\t$acceso->objeto->ejecutarSql(\"select * from Smartcard where SMCid='$this->SMCid'\");\n\t\tif($acceso->objeto->registros>0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"function verificarCompraSuscripcion($cliente){\n\t\tinclude \"conexion.php\"; \n\n\t\t\t$sql=\"select * from suscripcion\n\t\t\twhere cliente_id=$cliente\n\t\t\t\";\n\t\t\t$result=mysql_query($sql, $conexion) or die (mysql_error());\n\t\t\tif (mysql_num_rows($result)>0)\n\t\t\t{\n\t\t\t\n\t\t\t\t\n\t\t\t\t$error=\"<p>Ya tienes una suscripcion activa</p>\";\n\t\t\t\theader (\"Location: errores.php?errores=$error\");\n\t\t\t\t\n\t\t\t\texit();\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t}",
"public function regiuniActiveByAdmin($active){\n $sql = \"UPDATE regiune SET\n isActive=:isActive\n WHERE id = :id\";\n\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':isActive', 1);\n $stmt->bindValue(':id', $active);\n $result = $stmt->execute();\n if ($result) {\n echo \"<script>location.href='regiune.php';</script>\";\n Session::set('msg', '<div class=\"alert alert-success alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">×</a>\n <strong>Success !</strong> Regiunea activat cu succes!</div>');\n }else{\n echo \"<script>location.href='regiune.php';</script>\";\n Session::set('msg', '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">×</a>\n <strong>Error !</strong> Regiunea nu sunt activate!</div>');\n }\n }",
"function activar_usuario ($id_colaborador) {\n\t\n\t$UpdateRecords = \"UPDATE colaboradores \n\t\tSET estado='1' WHERE id_colaborador='$id_colaborador'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords);\n\t\tmysql_close($connection);\n\t\n\t}",
"public function validarCorreo() {\n if (!$this->hasErrors(\"correoElectronico\")) {\n $usuario = null;\n \n\t\t\t$usuario = Usuario::model()->find(array(\n\t\t\t\t\t'condition' => 'identificacionUsuario !=:usuario AND correoElectronico =:correo',\n\t\t\t\t\t'params' => array(\n\t\t\t\t\t\t\t'usuario' => $this->cedula,\n\t\t\t\t\t\t\t'correo' => $this->correoElectronico\n\t\t\t\t\t)\n\t\t\t));\n\t\t\tif($usuario)\n\t\t\t\t$this->addError('correoElectronico', 'Correo ya registrado');\n }\n }",
"function validacion($conn, $usuario, $clave, &$tipo_usuario){\n\n\t/*\n\t\t$cSql = \"select * from usuarios where u_correo = ?\";\n\t\t$pdo = $conn->prepare($cSql);\n\t\t$pdo->bindParam(1,$usuario);\n\t\t$pdo->execute();\n\t\t$result = $pdo->fetchAll();\n\t\t$tipo_usuario \t= \"ESTUDIANTE\";\n\t\t$id_usuario \t= \"\";\n\t\tforeach($result as $r){\n\t\t\t$tipo_usuario \t= $r[\"u_tipo_usuario\"];\n\t\t\t$id_usuario \t= $r[\"id_usuario\"];\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t*/\n\n\t\tif($usuario == \"\" and $clave==\"\"){\n\t\t\t$tipo_usuario = \"ADMINISTRADOR\";\n\t\t\treturn true;\n\t\t}else{\n\t\t\tsleep(2);\n\t\t\treturn false;\n\t\t}\n\t}",
"public function validado($usuario){\r\n\t\t$consulta=$this->db->query(\"SELECT * FROM Usuarios WHERE usuario LIKE '$usuario'\");\r\n\t\tforeach ($consulta->result() as $row)\r\n\t\t\t{\r\n\t\t\t\t$id=$row->ID;\r\n\t\t\t}\r\n\t\t$consulta=$this->db->query(\"SELECT ID FROM Cliente WHERE alta LIKE '1' AND ID LIKE '$id'\");\r\n\t\t if($consulta->num_rows()!=0){\r\n\t\t\t return true;\r\n\t\t }else{\r\n\t\t\t return false;\r\n\t\t }\r\n\t}",
"function inativaUsuario($id){\n\t\t\ttry{\n\t\t\t\t$conn = Banco::ConectaBanco();\n\t\t\t\t$statm = $conn->prepare(\n\t\t\t\t\"UPDATE Usuario\n\t\t\t\t\tSET usuario_ativo = FALSE\n\t\t\t\t\tWHERE usuario_id = :id AND usuario_ativo = TRUE\n\t\t\t\t\");\n\t\t\t\t$statm->bindValue(\":id\", $id);\n\t\t\t\t$conn = NULL;\n\t\t\t\treturn $statm->execute();\n\t\t\t}catch(Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t}",
"public function autenticando_usuario_e_verificando_permissao_de_criar_empresa()\n {\n //Cria e loga o usuario\n $this->actingAs(factory('App\\User')->create());\n\n //And a task object\n $empresa = factory('App\\Empresa')->create();\n //When user submits post request to create task endpoint\n $this->post('empresa/create',$empresa->toArray());\n //It gets stored in the database\n $this->assertEquals(1, Empresa::all()->count());\n }",
"public function existeComentario($idComentario, $idAnuncio){ \n $query = \"SELECT idComentario FROM final_comentario WHERE idComentario='\".$idComentario.\"' AND idAnuncio='\".$idAnuncio.\"'\"; \n return mysqli_num_rows($this->con->action($query))> 0 ? True : False; \n }",
"public function Modificar(): bool;",
"public function validaEstoque(): bool\n {\n echo \"Registro de retirada efetuado com sucesso\";\n return true;\n }",
"protected function antes() {\n\t // $accion = str_replace(\"accion_\", '', $this->accion);\n\t\t\t// \n\t // $this->permiso = \\FMT\\Usuarios::getPermiso($_SESSION['iu'])['permiso'];\n // $this->id_puerto = \\FMT\\Usuarios::getMetadata($_SESSION['iu'])['metadata'];\n\t // $permisos_sistema = json_decode(PERMISOS);\n\t // if(isset($permisos_sistema->$control->$accion) && in_array($this->permiso, $permisos_sistema->$control->$accion)) {\n\t // return true;\n\t // } else {\n\t // $control = new \\App\\Controlador\\Error('na');\n\t // $control->procesar();\n\t // $datos = [];\n\t // $datos['session_data'] = $_SESSION['datos_usuario_logueado'];\n\t // \\FMT\\Logger::event('no_autorizado',$datos);\n\t // exit;\n\t\t\t// \n\t // }\n\t return true; \n\t}",
"public function authorize()\n {\n /*\n * #挂号方式:1商户后台挂号,2总后台挂号,3代理后台挂号,4三方挂号\n */\n if ($this->id){\n //更新操作\n $user_id = env('ADD_ACCOUNT_TYPE')!=2?Auth::user()->id:100000;\n $device_id = $this->id;\n $deviceInfo = DB::table('account_phones')->whereId($device_id)->whereUserId($user_id)->first();\n if(!$deviceInfo){\n throw new CustomServiceException('非法操作!');\n }\n return true;\n }else{\n //添加操作\n $add_account_type=env('ADD_ACCOUNT_TYPE');\n $userType=Auth::user()->group_type??null;\n if($add_account_type==1&&$userType==1) return true;\n if($add_account_type==2&&$userType==null) return true;\n if($add_account_type==3&&$userType==2) return true;\n if($add_account_type==4&&$userType==3) return true;\n throw new CustomServiceException('非法操作!');\n }\n\n\n }",
"public function usuarioAutorizado($usuario)\r\n\t {\r\n\t \t$lista = self::getListaUsuarioAutorizado();\r\n\t \tif ( count($lista) > 0 ) {\r\n\r\n\t \t\tforeach ( $lista as $key => $value ) {\r\n\t \t\t\tif ( $value == $usuario ) {\r\n\t \t\t\t\treturn true;\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t}\r\n\r\n\t \treturn false;\r\n\t }",
"public function get_Code_utilisateur(): int { return $this->Code_utilisateur; }",
"public function inscrire(){\r\n $nb = 0 ;\r\n $pseudo = $this -> getPseudo();\r\n $q = \"update UserTab set User_inscrit = 1 where User_pseudo = '\".$pseudo.\"'\";\r\n $nb = execute($q) ;\r\n \r\n return $nb ;\r\n\r\n }",
"public function ouvrir()\n {\n // On enregistre l'ouverture\n if ($this->set('mission_statut', 1)) {\n return true;\n } else {\n return false;\n }\n }",
"public function getUsuarioValidado()\n\t{\n\t\treturn $this->usuario_validado;\n\t}",
"public function authenticate() {\n /* Valido que el usuario exista */\n\n $valido_usuario = Users::model()->find(array(\n 'select' => 'count(*) as id',\n 'condition' => 'username = :username',\n 'params' => array(':username' => $this->username)\n ));\n if ($valido_usuario->id == 1) {\n /* Si existe el usuario consulto el usuario con su password */\n\n $valido_clave = Users::model()->find(array(\n 'select' => 'count(*) as id',\n 'condition' => 'username = :username AND password = :password',\n 'params' => array(':username' => $this->username, ':password' => $this->password)\n ));\n\n if ($valido_clave->id == 1) {\n\n $sql = new CDbCriteria();\n\n $sql->params = array(':username' => $this->username, ':password' => $this->password);\n $sql->condition = 'username = :username AND password = :password';\n\n $model = Users::model()->find($sql);\n\n $sql->with = array('rol', 'statusUser');\n\n\n $consulto_usuario = Users::model()->find($sql);\n\n if ($consulto_usuario->status_user_id == 1) {\n\n $this->setState('id', $consulto_usuario->id);\n $this->setState('rol', $consulto_usuario->rol_id);\n $this->errorCode = self::ERROR_NONE;\n\n /* Usuario Activo Procedo a crear la Session */\n } elseif ($consulto_usuario->status_user_id == 2) {\n /* Usuario Inactivo */\n Yii::app()->user->setFlash('alert-danger', \"Usuario \" . @$consulto_usuario->statusUser->name);\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n } elseif ($consulto_usuario->status_user_id == 3) {\n /* Usuario Bloqueado */\n Yii::app()->user->setFlash('alert-danger', \"Usuario \" . @$consulto_usuario->statusUser->name);\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n } elseif ($consulto_usuario->status_user_id == 4) {\n /* Usuario Suspendido */\n Yii::app()->user->setFlash('alert-danger', \"Usuario \" . @$consulto_usuario->statusUser->name);\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n } elseif ($consulto_usuario->status_user_id == 5) {\n /* Usuario debe validar Email */\n Yii::app()->user->setFlash('alert-danger', \"Su usuario debe activarlo confirmando en su correo electronico \");\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n }\n } else {\n /* CONTRASEÑA ERRADA */\n Yii::app()->user->setFlash('alert-danger', \"Contraseña Errada\");\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n }\n } else {\n /* NO EXISTE USUARIO' */\n Yii::app()->user->setFlash('alert-danger', \"Usuario no existe\");\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n }\n\n return !$this->errorCode;\n }",
"public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }",
"public function getCodUsuario()\n {\n return $this->codUsuario;\n }",
"private function ifoCadUser()\n {\n $infoCadUser = new AdmsRead();\n $infoCadUser->fullRead(\"SELECT env_email_conf, adms_niveis_acesso_id, adms_sits_usuario_id FROM adms_cads_usuarios WHERE id =:id LIMIT :limit\", \"id=1&limit=1\");\n $this->IfoCadUser = $infoCadUser->getResultado();\n\n }",
"function verClienteActual(){ \r\n\t$query = sprintf(\"SELECT * FROM usuarios WHERE userId=%d\",$_SESSION['userId']);\r\n\treturn getFromDB($query);}",
"public function inactivarRecesoFecha($idAgendaHorarioRecesoFecha){\n\t\t\n\t\t $idAgendaHorarioRecesoFecha \t\t= parent::escaparQueryBDCliente($idAgendaHorarioRecesoFecha); \t\t\n\n\n $query = \"UPDATE tb_agendaHorarioRecesoFecha SET estado = 'I'\n \t\t\t\tWHERE idAgendaHorarioRecesoFecha = '$idAgendaHorarioRecesoFecha' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \n\n\t}"
] | [
"0.70125216",
"0.6680873",
"0.66770405",
"0.65301144",
"0.651596",
"0.64585334",
"0.63454396",
"0.6283189",
"0.6255636",
"0.6255348",
"0.6212573",
"0.6203343",
"0.61870575",
"0.61454344",
"0.61378765",
"0.6103033",
"0.6079236",
"0.6069586",
"0.60378146",
"0.60357666",
"0.6015665",
"0.60117555",
"0.5933655",
"0.5923696",
"0.59229016",
"0.5907242",
"0.5895596",
"0.588711",
"0.58814734",
"0.58656216",
"0.58656216",
"0.5860954",
"0.5852092",
"0.5849157",
"0.58456993",
"0.584249",
"0.58421695",
"0.58379877",
"0.5811986",
"0.5801986",
"0.58012795",
"0.5799884",
"0.57975364",
"0.57964134",
"0.5791984",
"0.5788638",
"0.5786463",
"0.5786144",
"0.57736695",
"0.5771067",
"0.5770889",
"0.5766575",
"0.5759834",
"0.575569",
"0.57534444",
"0.5751906",
"0.5750719",
"0.57442844",
"0.57427233",
"0.573932",
"0.57382745",
"0.57365966",
"0.5729922",
"0.57198995",
"0.57150036",
"0.5713081",
"0.5711755",
"0.5710943",
"0.5710198",
"0.5708008",
"0.57075185",
"0.5694211",
"0.56872934",
"0.56826264",
"0.56787914",
"0.56745946",
"0.56725806",
"0.56724197",
"0.5668817",
"0.56657815",
"0.5660324",
"0.56581354",
"0.5656853",
"0.5656845",
"0.56538916",
"0.56534797",
"0.5652913",
"0.5651963",
"0.56500876",
"0.5647392",
"0.5645832",
"0.5645798",
"0.5645494",
"0.5644606",
"0.564363",
"0.56392485",
"0.56355894",
"0.56191",
"0.5616947",
"0.56126356"
] | 0.69735533 | 1 |
Make sure the user is logged in | public function contentHTML() {
// If not then offer them a login or registration link
if( !isset($_SESSION['username']) ) {
echo 'You need to be logged in';
return;
}
//include account html
include 'templates/search/searchform.php';
include 'templates/account/user-account.php';
// If user is an admin
if( $_SESSION['privilege'] == 'admin' ) {
include 'templates/account/admin-controls.php';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function isUserLoggedIn() {}",
"protected function isUserLoggedIn() {}",
"public function check_login(){\n\t\t\tif( isset( $_SESSION['user_id'] ) ) {\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset( $this->user_id );\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}",
"private function check_login()\n {\n if (self::exists('user_id')) {\n $this->user_id = self::get('user_id');\n $this->logged_in = true;\n } else {\n unset($this->user_id);\n $this->logged_in = false;\n }\n }",
"public function checkUser()\n {\n $response = $this->di->get(\"response\");\n $user = $this->di->get(\"user\");\n\n if (!$user->isLoggedIn()) {\n $response->redirect(\"login\");\n }\n }",
"private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }",
"private function _checkAuth()\n {\n // check login or not\n if (!$this->getUser()->isAuthenticated()) {\n $this->redirect('login');\n }\n }",
"public function check_login()\n\t{\n\t\tif(isset($_SESSION[\"user_id\"]))\n\t\t{\n\t\t $this->_user_id = $_SESSION[\"user_id\"];\n\t\t\t$this->_client = $_SESSION[\"client\"];\n\t\t\t$this->_loged_in = true;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_loged_in = false;\n\t\t\t$this->_client = false;\n\t\t\tunset($this->_user_id);\n\t\t}\n\t}",
"abstract protected function isUserLoggedIn() ;",
"private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }",
"function ensure_logged_in() {\n\t\tif(!isset($_SESSION[\"user\"])) {\n\t\t\tredirect(\"start\", \"You must log in before you can view the page.\");\n\t\t}\n\t}",
"public function isLoggedIn()\n {\n return true;\n }",
"public static function check_log_in ()\n {\n session_start();\n\n if (!$_SESSION['user_data']) {\n header('Location: ./../index.php');\n exit;\n }\n }",
"private function checkIfLoggedIn()\n {\n if (!session()->has('user')) {\n abort(403, 'You are not logged in.');\n }\n }",
"protected function check_logged_in(){\n\n\t\t$this->load->model('patoauth/patoauth_model', 'patoauth');\n\n\t/*\n\t\tTRY TO AUTOLOGIN */\n\n\t\tif(! $this->patoauth->is_logged_in())\n\t\t\t$this->patoauth->autologin();\n\n\t/*\n\t\tIF STILLS NO LOGGED IN GET OUT OF HERE */\n\n\t\tif(! $this->patoauth->is_logged_in())\n\t\t\tredirect(site_url('auth/login'));\n\t}",
"public static function isLoggedIn(){\n if(!self::exists('is_logged_in')&& self::get('is_logged_in')!==true){\n \n header('location:' . URL . 'user/login.php');\n exit;\n }\n }",
"public function isLoggedIn()\n {\n if(Session::get('user_id') != '') {\n $this->user_id=Session::get('user_id');\n $this->role_id=Session::get('role_id');\n return true;\n }else {\n return false;\n }\n }",
"public function loggedIn()\n {\n if($this->di->session->get('user'))\n {\n return true;\n }\n return false;\n }",
"public function must_be_logged_in()\n {\n Session::_start();\n if(!isset($_SESSION['user']))\n {\n Session::_destroy();\n header('location: ' . URL_WITH_INDEX_FILE . 'login/index');\n exit();\n }\n }",
"public function isLoggedIn();",
"public function isLoggedIn();",
"public function is_logged_in() {\n\n\t}",
"private function checkLogin() {\n\t\t\n\t\tif ( ! $this->user_model->isLoggedIn() )\n\t\t\tredirect( base_url() . 'admin' );\n\n\t}",
"public function loggedIn()\n {\n if ($this->userId) {\n return true;\n } else {\n return false;\n }\n }",
"public function loggedIn()\n {\n if(isset($_SESSION['user']) && !empty($_SESSION['user'])) {\n return true;\n }\n\n return false;\n }",
"function requires_login()\n {\n $user = user();\n \n if ( empty( $user ) )\n {\n // no user id found, send to login\n Utility::redirect( Utility::login_url() );\n }\n }",
"public function isLoggedIn()\n {\n if (isset($this->user) === false) {\n throw new \\Exception('Please log-in first!');\n }\n }",
"function user_loggedin(){\n\t$app = \\Jolt\\Jolt::getInstance();\n\tif( !$app->store('user') ){\n\t\treturn false;\n\t}\n\treturn true;\n//\t$app->redirect( $app->getBaseUri().'/login',!$app->store('user') );\n}",
"public function logged_in()\n {\n if (isset($_SESSION['user_data'])) {\n return true;\n } else {\n return false;\n }\n }",
"private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }",
"public function loggedIn(){\r\n if (isset($_SESSION['user_session']))\r\n return true;\r\n else\r\n return false;\r\n }",
"protected function checkUser() {\n if(!$this->session->userdata(\"usuario_id\")) {\n redirect(\"/login\");\n }\n }",
"public function loggedIn ()\r\n {\r\n\r\n if (isset($_SESSION['userID'])) {\r\n return true;\r\n } else {\r\n header('Location: login');\r\n exit;\r\n }\r\n }",
"private function checkLogin()\n {\n if ($this->verifySession()) {\n $this->userId = $this->session['id'];\n }\n if ($this->userId === 0) {\n if ($this->verifyCookie()) {\n $this->userId = $this->cookie['userid'];\n $this->createSession();\n }\n }\n }",
"function isLoggedIn(){\r\n APP::import('Component','Auth');\r\n $auth = new AuthComponent;\r\n $auth ->Session = $this->Session;\r\n $user = $auth->user();\r\n return !empty($user);\r\n \r\n }",
"protected function isUserAllowedToLogin() {}",
"public function checkLoggedIn() {\n\t\t\tif (isset($_SESSION['username'])) {\n\t\t\t\t// Get User object from the database\n\t\t\t\t$this->dao = new UserDAO();\n\t\t\t\treturn $this->dao->getUser($_SESSION['username']);\n\t\t\t}\n\t\t\t//redirect to login page\n\t\t\theader('Location: ./');\n\t\t}",
"function validateUser() {\n\tif (!isLoggedIn()) {\n\t\tredirectTo(\"index.php\");\n\t}\n}",
"private function check_is_user_login()\n\t{\n\t\tif($this->session->userdata('logged_in') != FALSE)\n\t\t{\n\t\t\tredirect('home');\n\t\t}\n\t}",
"public function userIsLoggedIn() {\n return auth()->check() ;\n }",
"private function checkUserLoggedIn(): bool\n {\n $user = JFactory::getUser();\n if ($user->id > 0) {\n return true;\n } else {\n return false;\n }\n }",
"public function isLoginRequired()\r\n\t{\r\n\t\treturn true;\r\n\t}",
"public function isUserLoggedIn() {\r\n\t\treturn ($this->coreAuthenticationFactory->isUserLoggedIn ());\r\n\t}",
"protected function _logged_in()\n\t{\n\t\t$authentic = Auth::instance();\n\t\t\n\t\tif ($authentic->logged_in())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\t\n\t\t}\n\t}",
"function isLoggedIn(){\n return $this->auth->isLoggedIn();\n }",
"function is_logged_in()\n\t{\n\t\treturn require_login();\n\t}",
"public function checkLoggedIn()\n\t\t{\n\t\t\t\n\t\t\ttry {\n\t\t\t \n\t\t\t\t$query = $this->_db->prepare( \"SELECT username FROM login WHERE username=:username\" );\n \n \n\t\t\t\t$query->bindParam( \":username\", $_SESSION[ 'username' ], PDO::PARAM_STR );\n\n\t\t\t\t$query->execute();\n\t\t\t\n\t\t\t} catch ( PDOException $e ) {\n\n\t\t\t\techo $e->getMessage();\n\n\t\t\t}\n\n\t\t\t$row = $query->fetch();\n\t\t\t\n \n\t\t\t$loggedInUser = $row[ 'username' ];\n \n //if the user is not logged in\n\t\t\tif( !isset( $loggedInUser ) )\n\t\t\t{\n //head to the log in page\n\t\t\t\theader( 'Location: login.php' );\n\n\t\t\t}\n\t\t\t\n\t\t}",
"function userLoggedIn()\n{\n\tif(Auth::check()) {\n\t\t// Log::info('');\n\t\theader('Location: /users/account?id=' . Auth::id() );\n\t\tdie();\n\t}\n}",
"public function checkLoggedIn()\n {\n if(!isset($_SESSION['user_id']))\n {\n redirect('pages/view/home');\n exit;\n }\n else\n {\n return $user_id=$_SESSION['user_id'];\n }\n }",
"public function isLoggedIn()\n {\n return isset($_SESSION['user']);\n }",
"function logged_in(){\n\t\tif((isset($_SESSION['user_id']) || isset($_SESSION['username'])) && (!empty($_SESSION['user_id']) || !empty($_SESSION['username']))){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function logged_in()\n\t{\n\t\t$status = FALSE;\n\n\t\t// Get the user from the session\n\t\t$user = $this->_session->get($this->_config['session_key']);\n\n\t\tif ( ! is_object($user))\n\t\t{\n\t\t\t// Attempt auto login\n\t\t\tif ($this->auto_login())\n\t\t\t{\n\t\t\t\t// Success, get the user back out of the session\n\t\t\t\t$user = $this->_session->get($this->_config['session_key']);\n\t\t\t}\n\t\t}\n\n\t\t// check from DB if set in config\n\t\tif ($this->_config['strong_check'])\n\t\t{\n\t\t\t$user = $this->_get_object($user, TRUE);\n\t\t}\n\n\t\tif (is_object($user)\n\t\t\tAND is_subclass_of($user, 'Model_MangoRauth_User')\n\t\t\tAND $user->loaded()\n\t\t\tAND $user->is_active\n\t\t)\n\t\t{\n\t\t\t// Everything is okay so far\n\t\t\t$status = TRUE;\n\t\t}\n\n\t\treturn $status;\n\t}",
"function is_logged_in() \n {\n return (empty($this->userID) || $this->userID == \"\") ? false : true;\n }",
"function getUserIsLoggedIn() {\r\n\r\n // For now, just return false\r\n return false;\r\n}",
"static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }",
"function isLoggedIn()\n{\n\treturn auth()->check();\n}",
"public function isLoggedIn() {\n if(isset($this->username)){\n return true;\n }\n return false;\n}",
"function logged_user_check() {\n if(is_user_logged())\n launch_error(\"You are already logged in.\");\n}",
"public function isLoggedIn()\n {\n if (isset($_SESSION['username'], $_SESSION['email'])) {\n return true;\n } else {\n $url=URL::getURI('login/required');\n header(\"location:$url\");\n }\n }",
"public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }",
"public function authenticated(){\n if(isset($_SESSION['user'])){\n if($this->load($_SESSION['user']) == false){\n header('Location: /logout.php');\n die;\n }\n return true;\n }\n return false;\n }",
"public function authUser(){\n if(!isset($this->sessionBool) || empty($this->sessionBool)){\n die($this->alerts->ACCESS_DENIED);\n }else{\n if(!$this->sessionBool){\n die($this->alerts->ACCESS_DENIED);\n }\n } \n }",
"public function checkAuthentication() \n {\n if(!isset($this->userInfo['admin_id']) && empty($this->userInfo['admin_id'])) \n {\n redirect('login/loginPage');\n }\n }",
"function isLoggedIn()\n\t{\n\t\tif ( $this->_isAuthorized() ){\t\n\t\t\treturn true;\n\t\t} else return false;\n\t\n\t}",
"private function checkAuth()\n {\n $this->isAuthenticated = false;\n $isLoggedIn = is_user_logged_in();\n\n if ($isLoggedIn) {\n $this->username = wp_get_current_user()->user_login;\n $id = wp_get_current_user()->ID;\n $meta = get_user_meta($id, 'wp_capabilities', false);\n foreach ($meta[0] as $key => $value) {\n $k = strtoupper($key);\n if (($k == $this->PluginRole) or\n ($k == $this->AdminRole)) {\n $this->isAuthenticated = true;\n }\n }\n }\n }",
"public function loggedIn()\n {\n $CI = &get_instance();\n if ($CI->session->has_userdata('user_id')) {\n return true;\n } else {\n return false;\n }\n }",
"public function loggedIn()\n {\n return $this->user() != null;\n }",
"function loggedIn(){\r\n\tif(Session::exists('loggedIn') && Session::get('loggedIn')==1){\r\n\t\treturn TRUE;\r\n\t}\r\n\telse\r\n\t\treturn FALSE;\r\n}",
"function loggedin() {return $this->login_state!=0;}",
"public function isUserLoggedIn()\n {\n return $this->container->get('security.authorization_checker')\n ->isGranted('IS_AUTHENTICATED_FULLY');\n }",
"private function check_login(){\n if (isset($_SESSION['email'])){\n $this->email=$_SESSION['email'];\n\t\t\t$this->role=$_SESSION['role'];\n\t\t\t$this->id=$_SESSION['id'];\n $this->signed_in=true;\n }\n else{\n unset($this->email);\n $this->signed_in=false;\n }\n }",
"public static function LoggedIn() {\n\t\tif (empty($_SESSION['current_user'])) {\n\t\t\tnotfound();\n\t\t}\n\t}",
"public function isUserLoggedIn() \n {\n if (!isset($_SESSION['user_id']) || !isset($_SESSION['is_logged_in'])) {\n return false;\n } else {\n return true;\n }\n }",
"function check_valid_user()\n// see if somebody is logged in and notify them if not\n{\n if (isset($_SESSION['valid_user'])) {\n \n return true;\n \n \n } else {\n // they are not logged in \n\n \n return false;\n // exit;\n \n }\n}",
"public function logged_in() {\n return !empty($this->session->userdata('user_id'));\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 isLoggedIn()\n {\n $database = new Database();\n $loggedIn = $database->getAdminByUsername($_SESSION['user']);\n $admin = new Admin($loggedIn['adminId'], $loggedIn['username'], $loggedIn['adminLevel'], $loggedIn['active']);\n if(isset($_SESSION['user']) === true && strpos($admin->getAdminLevel(), Resources) !== false && $admin->getActive() == 1) {\n $testLogin = true;\n } else {\n $this->_f3->reroute('/Login');\n }\n $this->_f3->set('login', $testLogin);\n $this->_f3->set('admin', $admin);\n }",
"function auth_check()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->is_logged_in();\n\t}",
"function auth_check()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->is_logged_in();\n\t}",
"protected function _checkAndRedirect() {\n $auth = $this->_checkAuthentication();\n if(true === $auth) { // authentication required, redirects to login page\n $user = $this->getCurrentUser();\n if(null === $user) { // user doesn't appear do be logged in\n $this->flashMessenger()->addErrorMessage(IControllerMessages::FATAL_ERROR_NOT_AUTHENTIFICATED);\n $this->redirect()->toRoute(IRouteStore::LOGIN); // break;\n return;\n }\n else {\n \treturn $user;\n }\n }\n else {\n \texit;\n \treturn false;\n }\n }",
"public static function checkUser()\n\t{\n\n\t\tif (!User::verifyLogin())\n\t\t{\n\n\t\t\theader(\"Location: /admin/login\");\n\t\t\texit;\n\n\t\t}\n\n\t}",
"public function isLoggedIn()\n {\n return $this->session->has('user');\n }",
"public static function isLoggedIn()\n {\n return (bool)Users::getCurrentUser();\n }",
"function verificar_login()\n {\n if (!isset($_SESSION['usuario'])) {\n $this->sign_out();\n }\n }",
"function checkLoginStatus() // Check if user is logged in.\n\t{\n\t\tif(!$_SESSION['loggedIn'])\n\t\t{\n\t\t\theader(\"Location: login.html\");\n\t\t\texit();\n\t\t}\n\t}",
"function has_logged_in()\n\t{\n\t\tif( $this->session->userdata('usir_nim') )\n\t\t{\n\t\t\tredirect('reminders');\n\t\t}\n\t\t\n\t}",
"public function isAuthenticated()\r\n {\r\n if (!isset($_SESSION[\"ed\"])) {\r\n echo '<meta http-equiv=\"refresh\" content=\"0; url=' . (new CodeFlirt\\Handlers)->path(\"login\") . '\">';\r\n exit(0);\r\n }\r\n }",
"public function isUserLoggedIn()\n {\n return $this->user_is_logged_in;\n }",
"public function isUserLoggedIn() {\n\n $this->restartSession();\n\n if ($this->checkLogin() == false) {\n return false;\n } else {\n return true;\n }\n }",
"function isUserLoggedIn()\r\n\t{\r\n\t\t\tglobal $con;\r\n\t\t\t$return = false;\r\n\t\t\tif (isset($_SESSION['USER_ID']) && ($_SESSION['USER_ID'] > 0) && ($_SESSION['USER_ID'] != ''))\r\n\t\t\t{\r\n\t\t\t\t$id = $_SESSION['USER_ID'];\r\n\t\t\t\tif ($this->chkValidUser($id))\r\n\t\t\t\t{\r\n\t\t\t\t\t$return = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $return;\r\n\t}",
"function checkLogin() { //Determine status of the user in current session\n\n\t//If a user is currently logged in\n\tif(isset($_SESSION['userID'])) {\n\n\t\tlogout(); //Display components to allow user to logout\n\n\t} else {\n\n\t\tlogin(); //Otherwise display components to allow a guest to login\n\n\t}\n\n}",
"function is_logged_in()\n {\n //check session\n //return logged in user_id or false\n }",
"public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }",
"static function isLoggedIn() {\n $user = self::currentUser();\n return isset($user) && $user != null;\n }",
"function userValid()\n\t{\n\t\tif ( ! $this->_isAuthorized() ){\n\t\t\n\t\t\t\t// Store Query String - user will be redirected to this page (query_string)\n\t\t\t\t// after logging in - [if used in login.php]\n\t\t\t\t$dataBank =& new DataBank($this->sessionKey);\n\t\t\t\t$dataBank->setVar('s_c_pending_query',$_SERVER['QUERY_STRING']);\n\t\t\t\t\n\t\t\t\t// Not Auth - Redirect to admin login page\n\t\t\t\theader('HTTP/1.1 301 Moved Permanently');\n\t\t\t\theader(\"Location: index.php?_a=login\");\n\t\t\t\theader('Connection: close');\n\t\t\t\texit;\t\n\t\t}\n\t}",
"public function isLoggedIn()\n {\n $loggedIn = $this->di->get(\"session\")->has(\"user\");\n if (!$loggedIn) {\n $this->di->get(\"response\")->redirect(\"user/login\");\n return false;\n }\n return true;\n }",
"public function isLoggedIn()\n {\n $database = new Database();\n $loggedIn = $database->getAdminByUsername($_SESSION['user']);\n $admin = new Admin($loggedIn['adminId'], $loggedIn['username'], $loggedIn['adminLevel'], $loggedIn['active']);\n if(isset($_SESSION['user']) === true && strpos($admin->getAdminLevel(), Partner) !== false && $admin->getActive() == 1) {\n $testLogin = true;\n } else {\n $this->_f3->reroute('/Login');\n }\n $this->_f3->set('login', $testLogin);\n $this->_f3->set('admin', $admin);\n }",
"public function is_user_logged_in(){\n\t\treturn $this->session->userdata('current_user_id') != FALSE;\n\t}",
"private function checkUser()\n {\n $session = $this->di->get(\"session\");\n\n if (!$session->get(\"activeUser\") && !$session->get(\"username\")) {\n return $this->di->response->redirect(\"user/login\");\n }\n }",
"public function isUserLoggedIn()\n {\n return (isset($this->session->sUserId) && !empty($this->session->sUserId));\n }",
"function logged_in() {\n\t\treturn isset($_SESSION['USERID']);\n \n\t}"
] | [
"0.83521706",
"0.83521706",
"0.799548",
"0.7994199",
"0.7966886",
"0.788059",
"0.7870306",
"0.7868187",
"0.78295004",
"0.78223246",
"0.7813323",
"0.7809981",
"0.7804663",
"0.77909565",
"0.7739792",
"0.77396",
"0.7708924",
"0.77039087",
"0.76800233",
"0.7671621",
"0.7671621",
"0.76661587",
"0.7653706",
"0.7646295",
"0.7615468",
"0.76011133",
"0.7575839",
"0.7563078",
"0.75625634",
"0.7551463",
"0.75507665",
"0.7548157",
"0.7545971",
"0.7538765",
"0.75314325",
"0.75046486",
"0.7502523",
"0.7498006",
"0.7497351",
"0.7490962",
"0.7480703",
"0.74798363",
"0.74796474",
"0.7478999",
"0.7478418",
"0.7470575",
"0.7462671",
"0.7461539",
"0.7453083",
"0.7447328",
"0.7440854",
"0.7429919",
"0.7421924",
"0.74153304",
"0.7406583",
"0.74051225",
"0.7398444",
"0.73913074",
"0.73756653",
"0.7359201",
"0.7357006",
"0.7352889",
"0.7350439",
"0.7341684",
"0.7340085",
"0.73322344",
"0.7328324",
"0.7323449",
"0.73198634",
"0.7318629",
"0.73154086",
"0.7312869",
"0.7309702",
"0.73078436",
"0.72931737",
"0.72881716",
"0.7286829",
"0.72802216",
"0.72802216",
"0.7279252",
"0.7276941",
"0.7265526",
"0.7263514",
"0.72619706",
"0.72600883",
"0.72591496",
"0.7257742",
"0.72495914",
"0.7247293",
"0.72417575",
"0.72380096",
"0.72298",
"0.7225982",
"0.7225722",
"0.7224631",
"0.72214425",
"0.72210044",
"0.7214799",
"0.72112757",
"0.72077644",
"0.7204565"
] | 0.0 | -1 |
$this>mongo_db>where(array('triggers_type' => $trigger_type,'coin' => $global_symbol,'order_mode' => $global_mode)); | public function rulesOrderProfitLoss($coin, $order_mode,$triggers_type,$userID,$start_date,$end_date)
{
$this->mongo_db->limit(100);
$rulesSet_result = $this->mongo_db->get('trigger_global_setting');
$rulesSet_arr = iterator_to_array($rulesSet_result);
echo "<pre>"; print_r($rulesSet_arr); exit;
return $rulesSet_arr[0];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function dbWhereVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->where($this->model.'.'.$f,$this->$f);\n }\n\n }",
"function s_m_put_get_condition($ref_id_db_arr, $ref_data){\r\n $where = \"\";\r\n for($i = 0; $i < count($ref_id_db_arr); $i++){\r\n $where .= $ref_id_db_arr[$i] . \"='\" . $ref_data[$i] . \"'' AND \";\r\n }\r\n return substr($where, 0, strlen($where) - 5);\r\n}",
"public function where() {\r\n\t\t$args = func_get_args();\r\n\t\t$expr = array_shift($args);\r\n\t\tarray_push($this->_wheres, '(' . $this->_parameterize($expr, $args) . ')');\r\n\t\t$this->_dirty = true;\r\n\t}",
"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 }",
"function query_finalize($instance){\r\n $instance->db->where(\"row_active\",1); \r\n}",
"function query($params){\n\t$db = new Db();\n $OUTPUT = new Output();\n $coll = $db->selectCollection($params[\"collectionName\"]);\n $Subscribe = $db->selectCollection(\"Subscribers\");\n\t$AUTH = new Auth();\n\t$LuxFunctions = new LuxFunctions();\n\t$LuxFunctions->setDocument($params);\n\tif($LuxFunctions->is_avail(\"id\")){\n\t\t$query = array(\"_id\" => new MongoID($LuxFunctions->fetch_avail(\"id\")));\n\t\t$result = $coll->findOne($query);\n\t\n\t}else if($LuxFunctions->is_avail(\"query\")){\n\t\t$query = $LuxFunctions->fetch_avail(\"query\");\n\t\t// change to is_avail\t\n\t\tif(isset($params[\"distinct\"]) && $params[\"distinct\"]){\n \t$result = $coll->distinct($query);\n\t\n\t\t}else if(isset($params[\"aggregate\"]) && $params[\"aggregate\"]){\n \t$result = $coll->aggregate($query);\n\t\t}else{\n\t\t\t$result = $coll->find($query);\n\t\t}\n\t}\n\techo json_encode($result);\n\tif(isset($params[\"subscribe\"]) && $params[\"subscribe\"] == true){\n\t\t$key = array_keys($query);\n\t\t$value = array_values($query); \n\t\t$cursor = $Subscribe->findOne(array(\"query.\".$key[0] => $value[0]));\t\t\n\t\tif(isset($cursor)){\n\t\t\t$Subscribe->update(array(\"_id\" => $cursor[\"_id\"]) , array('$addToSet' => array(\"subscribers.clientId\" => $AUTH->getClientId())));\n\t\t}else{\n\t\t\t$newdoc = array(\"query\" => $query, \"subscribers\" => array(\"clientId\" => array($AUTH->getClientId())), \"timestamp\" => microtime(), \"parent_sub\" => null);\n\t\t\t$Subscribe->insert($newdoc);\n\t\t}\n\t}\n\tif(isset($params[\"publish\"]) && $params[\"publish\"] == true){\n\t\t $db->Publish($LuxFunctions->fetch_avail(\"doc\", false), $AUTH, $params[\"priority\"]);\t\n\t}\n}",
"public function find(array $conditions = []);",
"function beforeFind($queryData) {\r\n\t\t\t\t\tif (is_array($queryData['conditions'])) {\r\n\t\t\t\t\t\t$queryData['conditions']['Auction.deleted']=0;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$queryData['conditions'].=' AND Auction.deleted=0';\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn $queryData;\r\n\t\t\t\t}",
"public function find(array $where);",
"function query($filter=[],$options=[]){\n if(!$this->db_coll_set()){\n return [\"error\"=>\"db or collection not set.\"];\n }\n $results = [];\n \n if(array_key_exists('_id',$filter) && strlen($filter['_id']) >= 24){\n $filter['_id'] = new MongoDB\\BSON\\ObjectID($filter['_id']);\n }\n \n $query = new MongoDB\\Driver\\Query($filter, $options);\n $cursor = $this->manager->executeQuery($this->dbdotcoll, $query);\n \n foreach ($cursor as $document) { \n $results[] = $document;\n }\n return $results;\n }",
"public function beforeFind(EventInterface $event, Query $query, ArrayObject $options, $primary)\n\t{\n // $query->iterateClause(function($val) {\n // if($val->getField()){\n // dump($val->getField());\n // }\n \n // }); \n //dd($conds);\n // dd($query->clause('where'));\n $model = $this->_table->getAlias();\n\t $query->where([$model.'.listing_id' => \\Cake\\Core\\Configure::read('LISTING_ID')]);\n\t}",
"public function findOneBy(array $conditions, array $orderBy = null, array $extras = array());",
"function findPlayerByName($player) {\n global $db;\n $p = $db->players->findOne(array('name' => $player, '2014.type' => 'batter'));\n if ($p == NULL) {\n echo \"player '$player' not found\";\n die();\n }\n return array($p);\n}",
"public function get_where()\n {\n }",
"public function get_where()\n {\n }",
"public function findWhere(array $conditions);",
"function get_water_pumped_history($order_id){\r\n $configs = include('config/config.php');\r\n $query = \"SELECT * FROM \" . $vogomo_pump_water_history_table . \" WHERE oid='\" . $order_id . \"' AND action='water_pumped'\";\r\n //echo $query;\r\n $result = $configs->query($query);\r\n return $result;\r\n}",
"public function findOne(array $where);",
"public function where(array $params)\n {\n }",
"function neworder_where(){\n\t\treturn false;\n\t}",
"public function where($arr){//ex of $arr : ['name' => 'LIKE A%','email' => '= [email protected]']\n $c = \"\";\n $x = 0;\n foreach($arr as $key => $v){//for each param, translate to SQL language\n if($x != 0){\n $c .= \" AND\";\n }\n $x++;\n $c .= \" $key $v\";\n }\n $this->params[\"WHERE\"] = $c;//adding the conditions to the query\n return $this;\n }",
"function where($callback,$strict = false){\r\n \treturn Arr::where($callback, $this, $strict);\r\n }",
"function start_group_where($key,$value=NULL,$escape=TRUE,$type=\"AND\")\n {\n $this->open_bracket($type); \n return parent::_where($key, $value,'',$escape); \n }",
"protected function user_where_clause() {}",
"function query($args, $operator = 'AND')\n {\n }",
"function get_companies_where($connection, $params=array())\n{\n try {\n $params_imploded = implode(\"','\",$params);\n $sql = \"SELECT symbol,name FROM companies WHERE symbol IN ('$params_imploded')\";\n $result = runQuery($connection, $sql, null);\n return $result;\n }\n catch (PDOException $e) {\n die( $e->getMessage() );\n }\n}",
"public function findOne(array $conditions);",
"public function where($table,$column,$data = \"\");",
"function paperselPredicate($papersel) {\n return \"ContactInfo.contactId\" . sql_in_numeric_set($papersel);\n}",
"function get_where($data) {\n\t\t$query = $this->db->get_where('realisasi_skp',$data);\n\t\treturn $query->result();\t\t\n\t}",
"public function query() {\n if (isset($this->value, $this->definition['trovequery'])) {\n $this->query->args['method'] = $this->definition['trovequery']['method'];\n if (is_array($this->value)) {\n $this->query->add_where($this->options['group'], $this->definition['trovequery']['arg'], implode($this->value, ','));\n }\n else {\n $this->query->add_where($this->options['group'], $this->definition['trovequery']['arg'], $this->value);\n }\n }\n }",
"function findDocuments( $orderby='name DESC' )\n\t{\n\t\t//return MyActiveRecord::FindAll( 'Documents', 'item_id = '.$this->id, $orderby );\n\t\treturn MyActiveRecord::FindBySql('Documents', \"SELECT * FROM documents WHERE item_id = \".$this->id.\" ORDER BY \".$orderby.\"\");\n\t}",
"public function whereEq()\n {\n \n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n $this->_conditions[self::WHERE][$field] = new MongoRegex(preg_quote($value), 'i');\n return $this;\n }",
"public static function findOne($condition);",
"public function where()\n {\n return $this->query; \n }",
"public function find( $params=array() ) {\n \t\n \t$cond \t= array();\n \t\n \t$query = \"SELECT * FROM stat\";\n \t\n \tif (!empty($params)){\n \t\t$query .= \" WHERE \";\n \t\tforeach($params as $key=>$value){\n \t\t\t$cond[] = $key.\"=?\";\n \t\t}\n \t\t$query.= join(\" AND \", $cond);\n \t\t$values = array_values($params);\n \t} \n\t\n return $this->db->execute( $query, $values ); \t\n }",
"private function sql_where($filter, $structure) {\n\t\t$pool_class = $structure['class'] . 'Pool_Model';\n\t\t$visitor = new $this->sql_builder_visitor_class_name(array($pool_class, \"map_name_to_backend\"));\n\t\t$sql = \" WHERE \".$filter->visit($visitor, false);\n\t\treturn $sql;\n\t}",
"public function search()\n {\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id,true);\n $criteria->compare('name',$this->name,true);\n $criteria->compare('title',$this->title,true);\n $criteria->compare('identifier',$this->identifier,true);\n $criteria->compare('langue_id',$this->langue_id,true);\n $criteria->compare('tax',$this->tax,true);\n $criteria->compare('taux',$this->taux,true);\n $criteria->compare('show_langs',$this->show_langs);\n $criteria->compare('env',$this->env,true);\n $criteria->compare('gmaps_key',$this->gmaps_key,true);\n $criteria->compare('jetlag',$this->jetlag);\n $criteria->compare('issuetickets',$this->issuetickets);\n $criteria->compare('sendmailtickets',$this->sendmailtickets);\n $criteria->compare('smsactivitation',$this->smsactivitation,true);\n $criteria->compare('smsreservation',$this->smsreservation,true);\n $criteria->compare('openingdays',$this->openingdays,true);\n $criteria->compare('openinghours',$this->openinghours,true);\n $criteria->compare('closinghours',$this->closinghours,true);\n $criteria->compare('fashion',$this->fashion);\n $criteria->compare('adminip',$this->adminip,true);\n $criteria->compare('wsuser',$this->wsuser,true);\n $criteria->compare('wspass',$this->wspass,true);\n $criteria->compare('theme',$this->theme,true);\n $criteria->compare('display_phone',$this->display_phone);\n $criteria->compare('phonecallcenter',$this->phonecallcenter,true);\n $criteria->compare('sav_portable',$this->sav_portable,true);\n $criteria->compare('email',$this->email,true);\n $criteria->compare('logo',$this->logo,true);\n $criteria->compare('pos_h',$this->pos_h);\n $criteria->compare('down',$this->down);\n $criteria->compare('decalage',$this->decalage);\n $criteria->compare('currency',$this->currency,true);\n $criteria->compare('symbole',$this->symbole,true);\n $criteria->compare('show_journey',$this->show_journey);\n $criteria->compare('application_type_id',$this->application_type_id,true);\n $criteria->compare('google_analytics',$this->google_analytics,true);\n $criteria->compare('escales',$this->escales);\n $criteria->compare('session_resa',$this->session_resa);\n $criteria->compare('meta_title',$this->meta_title,true);\n $criteria->compare('meta_description',$this->meta_description,true);\n $criteria->compare('meta_keywords',$this->meta_keywords,true);\n $criteria->compare('service',$this->service,true);\n $criteria->compare('account_id',$this->account_id,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function orWhere($table,$column,$data = \"\");",
"public function hook_query_index(&$query) {\n/*\t //Your code here\n $userId = CRUDBooster::myId();\n//\t echo $userId;\n\t $isAdmin = CRUDBooster::isSuperadmin();\n\t $storeAssignedtoUser = DB::table('srv_centers')\n ->where('cms_user_id', '=', $userId)\n ->first();\n\t if ($isAdmin) {\n\n\t }else {\n\t $query->where('cms_users.id',$storeAssignedtoUser->cms_user_id);\n\t }\n*/\n\t }",
"function compare_operator($query,$item)\n{\n if($query['WHERE'][2]==\"CONTAINS\")\n {\n if(strpos($item,$query['WHERE'][3]) !== false)\n {\n return true;\n }\n }\n else if ($query['WHERE'][2]==\"=\")\n {\n if((is_double($query['WHERE'][3]) && ((double)$item == $query['WHERE'][3])) || strcmp($item, $query['WHERE'][3])==0)\n {\n return true;\n }\n }\n else if ($query['WHERE'][2]==\"<\")\n {\n if((is_double($query['WHERE'][3]) && ((double)$item < $query['WHERE'][3])) || strcmp($item, $query['WHERE'][3]) < 0)\n {\n return true;\n }\n }\n else if ($query['WHERE'][2]==\">\")\n {\n if((is_double($query['WHERE'][3]) && ((double)$item > $query['WHERE'][3])) || strcmp($item, $query['WHERE'][3]) > 0)\n {\n return true;\n }\n }\n return false;\n}",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n \n\t\t$criteria->compare('ESUB_ID',$this->ESUB_ID);\n\t\t$criteria->compare('ESUB_EMP_ID',$this->ESUB_EMP_ID);\n//\t\t$criteria->compare('ESUB_SUBSCRS_ID',$this->ESUB_SUBSCRS_ID);\n// $criteria->together=true;\n\t\t\n//\t\t$criteria->compare('ESUB_PAYMENT_ID',$this->ESUB_PAYMENT_ID);\n $criteria->with = array( 'eSUBSUBSCRS' );\n $criteria->compare('eSUBSUBSCRS.SUBSCR_RATE', $this->ESUB_PAYMENT_ID,true);\n $criteria->compare('eSUBSUBSCRS.SUBSCR_DESC', $this->ESUB_SUBSCRS_ID,true);\n\t\t$criteria->compare('ESUB_STATUS',$this->ESUB_STATUS,true);\n $criteria->compare('ESUB_PURCHASE_DATE',$this->ESUB_PURCHASE_DATE,true);\n\t\t$criteria->compare('ESUB_EXPIRY_DATE',$this->ESUB_EXPIRY_DATE,true);\n\t\t$criteria->compare('ESUB_UTILIZED_COUNT',$this->ESUB_UTILIZED_COUNT,true);\n\t\t$criteria->compare('ESUB_REMAIN_COUNT',$this->ESUB_REMAIN_COUNT,true);\n// $criteria->compare('date(ESUB_PURCHASE_DATE)',$this->ESUB_PURCHASE_DATE,true);\n////\n// $criteria->compare('date(ESUB_EXPIRY_DATE)',$this->ESUB_EXPIRY_DATE,true);\n// $criteria->compare(\"DATE_FORMAT(date,'%yy-%mm-%dd')\",$this->ESUB_PURCHASE_DATE,true);\n// $criteria->compare(\"DATE_FORMAT(date,'%yy-%mm-%dd')\",$this->ESUB_EXPIRY_DATE,true);\n// if($this->ESUB_SUBSCRS_ID)\n// {\n// $criteria->together = true;\n// $criteria->with = ( 'eSUBSUBSCRS' );\n// $criteria->compare('eSUBSUBSCRS.SUBSCR_DESC', $model->ESUB_SUBSCRS_ID,true);\n// }\n// if(strlen($this->ESUB_PURCHASE_DATE) && strlen($this->ESUB_EXPIRY_DATE)) {\n// $criteria->params[':ESUB_PURCHASE_DATE'] = date('Y-m-d', strtotime($this->ESUB_PURCHASE_DATE));\n// \n// $criteria->params[':ESUB_EXPIRY_DATE'] = date('Y-m-d', strtotime($this->ESUB_EXPIRY_DATE));\n//// (strlen($this->ESUB_EXPIRY_DATE)) ? date('Y-m-d', strtotime($this->ESUB_EXPIRY_DATE)) : $criteria->params[':post_date'];\n// $criteria->addCondition('DATE(ESUB_PURCHASE_DATE) BETWEEN :ESUB_PURCHASE_DATE AND :ESUB_EXPIRY_DATE');\n// }\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n \n\t\t));\n\t}",
"function build_sql_conditions( $args = array() ){\r\n\t\tglobal $wpdb;\r\n\t\t$events_table = $wpdb->prefix . EM_EVENTS_TABLE;\r\n\t\t$locations_table = $wpdb->prefix . EM_LOCATIONS_TABLE;\r\n\t\t\r\n\t\t$conditions = parent::build_sql_conditions($args);\r\n\t\t//eventful locations\r\n\t\tif( true == $args['eventful'] ){\r\n\t\t\t$conditions[] = \"{$events_table}.event_id IS NOT NULL\";\r\n\t\t}elseif( true == $args['eventless'] ){\r\n\t\t\t$conditions[] = \"{$events_table}.event_id IS NULL\";\r\n\t\t}\r\n\t\treturn $conditions;\r\n\t}",
"private function getUpdateableClause () {\n\t\t$where = new Where;\n\t\tforeach ($this->primaryKeys as $key) {\n\t\t\t$value = $this->retreive($key);\n\t\t\tif ($value){\n\t\t\t\t$where->equals($key, $this->retreive($key));\n\t\t\t} else {\n\t\t\t\tthrow new \\Exception(\"Primary key (\". $key .\") has no value!\");\n\t\t\t}\n\t\t}\n\n\t\treturn $where;\n\t}",
"function KM_all($options=array(),$obj_type=FALSE)\n\t {\n\t $conditions=array();\n\t\t//pr($options);exit;\n\t\tif(isset($options['class'])){\n\t\t $table=$this->db->dbprefix.$options['class'];\n\t\t}\n\t\telse{\n\t\t $table=$this->table;\n\t\t}\n\t\t\n\t\tif(isset($options['limit'])){\n\t\t $offset=0; \n\t\t if(isset($options['offset'])){\n\t\t $offset=$options['offset'];\n\t\t }\n\t\t $this->db->limit($options['limit'],$offset);\n\t\t}\n\t\t\n\t\tif(isset($options['order'])){\n\t\t\t if(isset($options['order_prefix']) && $options['order_prefix']==false){\n\t\t $this->db->order_by($options['order']);\n\t\t }else{\n\t\t $this->db->order_by($table.'.'.$options['order']);\n\t\t }\n\t\t}\n\t\tif(isset($options['conditions'])){\n\t\t if(isset($options['conditions_prefix']) && $options['conditions_prefix']==false){\n\t\t $this->db->where($options['conditions']);\n\t\t }else{\n\t\t \t $this->db->where($this->_conditions($options['conditions'],$table));\n\t\t }\t\t \n\t\t}\n\t\tif(isset($options['conditions_in'])){\n\t\t\t \n\t\t if(isset($options['conditions_prefix']) && $options['conditions_prefix']==false){\n\t\t\t \n\t\t $this->db->where_in($options['conditions_in']);\n\t\t }else{ \n\t\t \t $where_in = $this->_conditions($options['conditions_in'],$table); \n\t\t\t foreach($where_in as $kwi=>$kwv)\t \n\t\t \t $this->db->where_in($kwi,$kwv);\n\t\t }\t\t \n\t\t}\n\t\tif(isset($options['search_conditions'])){\n \t\t$this->db->where($options['search_conditions'],NULL, FALSE);\n\t\t}\n\t\tif(isset($options['joins'])){\n\t\t $joins=$options['joins'];\n\t\t foreach($joins as $join){\n\t\t $type=''; \n\t\t\t if(isset($join['type']))\n\t\t $type=$join['type'];\n\t\t\t$join_table=$this->db->dbprefix($join['class']);\n\t\t\tif(isset($join['join_and_cond'])){ \n\t\t \t\t$str_join_and=$join_table.'.'.$join['primaryKey'].'='.$table.'.'.$join['foreignKey'];\n\t\t\t\tforeach($join['join_and_cond'] as $andky=>$andval){\n\t\t\t\t\t$str_join_and.= \" and \".$join['class'].'.'.$andky.\"='$andval'\" ;\t\t\t\n\t\t\t\t} \n\t\t\t\t$this->db->join($join_table,$str_join_and,$type);\t\t\t\t\n\t\t\t}\n\t\t\telse{\t\n \t$this->db->join($join_table,$join_table.'.'.$join['primaryKey'].'='.$table.'.'.$join['foreignKey'],$type);\n\t\t\t}\n\t\t\tif(isset($join['conditions'])){\n \t\t\t $this->db->where($this->_conditions($join['conditions'],$join_table));\n\t\t\t}\n\t\t }\t \t\t\n\t\t}\n\t\t\n\t\tif(isset($options['select'])){\n\t\t\n\t\t$protect_identifiers=(isset($options['protect_identifiers'])&&$options['protect_identifiers']==false)?false:true;\n\t\t\n\t\t$this->db->select($options['select'],$protect_identifiers);\n\t\t}\n\t\telse if(isset($options['fields'])){\n\t\t $fields_prefix=(isset($options['fields_prefix']))?$options['fields_prefix']:TRUE;\n\t\t \n\t\t $this->db->select($this->_fields($options['fields'],$table,$fields_prefix));\n\t\t}\n\t\tif(isset($options['groupby']))\n\t\t$this->db->group_by($options['groupby']);\n\t\t$query=$this->db->get($table);\n\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t if($obj_type){\n\t\t return $query->result();\n\t\t }\n\t\t else{\n\t\t return $query->result_array();\n\t\t }\t \t\t \n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array();\n\t\t} \n\t }",
"function get($search) {\r\n\t\tglobal $wpdb;\r\n\t\t$conds = array(); \r\n\t\tforeach($search as $key => $value) {\r\n\t\t\tif( array_key_exists($key, $this->fields) ){\r\n\t\t\t\t$value = $wpdb->escape($value);\r\n\t\t\t\t$conds[] = \"`$key`='$value'\";\r\n\t\t\t} \r\n\t\t}\r\n\t\t$sql = \"SELECT * FROM \". $wpdb->EM_BOOKINGS_TABLE .\" WHERE \" . implode(' AND ', $conds) ;\r\n\t\t$result = $wpdb->get_row($sql, ARRAY_A);\r\n\t\tif($result){\r\n\t\t\t$this->to_object($result);\r\n\t\t\treturn true;\t\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function SqlKeyFilter() {\n\t\treturn \"`rid` = @rid@\";\n\t}",
"public static function get_search_sql($args = array()){\n global $TFUSE;\n return $TFUSE->ext->seek->get_search_sql($args);\n }",
"function searchOrders() {\n //\terror_log ( 'addOrder\\n', 3, '/var/tmp/php.log' );\n $request = Slim::getInstance ()->request ();\n\t$criteria = json_decode ( $request->getBody () );\n try {\n $db = new DbOperation();\n $orders = $db->searchOrders ( $criteria );\n if ( $orders != null ) {\n echo '{\"orders\":' . json_encode ( $orders ) . '}';\n } else {\n echo '{\"error\":{\"text\":' . \"Unable to search order\" . '}}';\n }\n } catch ( Exception $e ) {\n\t\techo '{\"errorText\":\"search orders fail with text as\", \"text\":}' . $e->getMessage () . $e . '}';\n }\n}",
"public static function findOne($condition)\n {\n $object = Server::$container->make(get_called_class(), [get_called_class()]);\n $conn = self::getMongoReadConn($object);\n $collection = $conn->selectCollection($object->getDBName(), $object->getCollectionName());\n if (isset($condition[\"_id\"])) {\n if (!is_object($condition[\"_id\"])) {\n $condition[\"_id\"] = new ObjectID($condition[\"_id\"]);\n }\n }\n // var_dump($conn);\n $res = $collection->findOne($condition);\n // var_dump($res);\n return $object;\n }",
"public function hook_query_index(&$query) {\n\t\t\t//Your code here\n\t\t\t// pr($query->toSql(),1);\t\t\t\n\t\t\tif(CRUDBooster::isSuperAdmin()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$user = getUser();\n\t\t\t$my_company = $this->my_company;\n\t\t\tif($user->company != $my_company){\n\t\t\t\treturn $query->where('supplier',$user->company);\n\t\t\t} else {\n\t\t\t\treturn $query->where('status','!=','draft');\n\t\t\t}\n\n\t }",
"public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['trovequery'])) {\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->bride,true,'OR');\n\t\t$criteria->compare('bride',$this->bride,true,'OR');\n\t\t$criteria->compare('bride_phone',$this->bride_phone,true,'OR');\n\t\t$criteria->compare('phone',$this->bride_phone,true,'OR');\n\t\t// $criteria->compare('bride_phone',$this->bride_phone,true);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('contact',$this->contact,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t// $criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('qq',$this->qq,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t if(empty($this->update_time)){\n\t\t \t$criteria->compare('update_time',$this->update_time);\n\t\t }else{\n\t\t \t$start =$this->update_time.' 00:00:00';\n\t\t \t$stop =$this->update_time.' 23:59:59';\n\t\t \t$start=strtotime($start);\n\t\t \t$stop=strtotime($stop);\n\t\t \t$criteria->addBetweenCondition('update_time', $start, $stop);\n\t\t }\n\t\t\n\t\t$criteria->compare('usiness',$this->usiness);\n\t\t$criteria->compare('situation',$this->situation);\n\t\t$criteria->compare('province',$this->province);\n\t\t$criteria->compare('zip',$this->zip);\n\t\t$criteria->compare('eserve_time',$this->eserve_time);\n\t\t$criteria->compare('remarks',$this->remarks,true);\n\t\t$criteria->compare('entry',$this->entry);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('oid',$this->oid);\n\t\t$criteria->compare('source',$this->source);\n\t\t$criteria->compare('site_id',$this->site_id);\n\t\t$criteria->compare('remind_time',$this->remind_time);\n\t\t$criteria->compare('remind_status',$this->remind_status);\n\t\t$criteria->compare('marry_date',$this->marry_date,true);\n\t\t$criteria->compare('budget',$this->budget,true);\n\t\t$criteria->compare('order_status',$this->order_status);\n\t\t$criteria->compare('prcie_total',$this->prcie_total);\n\t\t$criteria->compare('deposit',$this->deposit);\n\t\t$criteria->compare('deposit_time',$this->deposit_time);\n\t\t$criteria->compare('sign_user',$this->sign_user,true);\n\t\t$criteria->compare('executor',$this->executor,true);\n\t\t$criteria->compare('photo_date',$this->photo_date,true);\n\t\t$criteria->compare('choose_date',$this->choose_date,true);\n\t\t$criteria->compare('photographer',$this->photographer,true);\n\t\t$criteria->compare('makeupartist',$this->makeupartist,true);\n\t\t$criteria->compare('design_date',$this->design_date,true);\n\t\t$criteria->compare('taketablets_date',$this->taketablets_date,true);\n\t\t$criteria->compare('looksite_date',$this->looksite_date,true);\n\t\t$criteria->compare('style_date',$this->style_date,true);\n\t\t$criteria->compare('scheme_date',$this->scheme_date,true);\n\t\t$criteria->compare('makeup_date',$this->makeup_date,true);\n\t\t$criteria->compare('compere_date',$this->compere_date,true);\n\t\t$criteria->compare('rehearsal_date',$this->rehearsal_date,true);\n\t\t$criteria->compare('dep_id',$this->dep_id,true);\t\n\t\t$criteria->compare('entry_status',$this->entry_status);\t\n\t\t$criteria->compare('xsituation',$this->xsituation);\t\n\t\t$criteria->compare('wx',$this->wx,true);\n\t\t$criteria->compare('wangwang',$this->wangwang,true);\n\t\t$criteria->compare('dangqian',$this->dangqian,true);\n\t\t$criteria->order = 'remind_status DESC,status DESC,update_time desc';\n\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n\t\t\t 'pageSize'=>30,\n\t\t\t),\n\t\t));\n\t}",
"function pk_where($binded=false) {\r\n\t\t$in = $this->session_vars;\r\n\t\t$pk_key = $this->pk_key ();\r\n\t\tfor($i = 0; $i < count ( $pk_key ); $i ++) {\r\n\t\t\tif ($in [$pk_key [$i]] != 'next') {\r\n\t\t\t\tif ($where != '')\r\n\t\t\t\t$where .= ' and ';\r\n\t\t\t\tif(!$binded) $where .= $pk_key [$i] . \"='\" . $in [$pk_key [$i]] . \"'\";\r\n\t\t\t\telse $where .= $pk_key [$i] . \"=:\" .$pk_key [$i] ;\r\n\t\t\t\t$bind[$pk_key [$i]]= $in [$pk_key [$i]];\r\n\t\t\t}\r\n\t\t}\r\n\t\t$return['WHERE']=$where;\r\n\t\t$return['BIND']=$bind;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif(!$binded) return $return['WHERE'];\r\n\t\telse return $return;\r\n\t}",
"private function _set_where($params) {\n if (count($params) == 1) {\n if (!is_array($params[0]) && !strstr($params[0], \"'\")) {\n $this->db->where($this->primary_key, $params[0]); // 1.\n } else {\n $this->db->where($params[0]); // 2.\n }\n } elseif (count($params) == 2) {\n if (is_array($params[1])) {\n $this->db->where_in($params[0], $params[1]); // 4.\n } else {\n $this->db->where($params[0], $params[1]); // 3.\n }\n }\n }",
"function searchAllByCriteria($db,$criteria,$search)\n{\n $request = \"SELECT game.name game_name,game.year game_year,game.note game_note,categorie.content categorie_name,editor.name editor_name FROM game,categorie,game_editor,editor WHERE game.id_categorie = categorie.id AND game.id = game_editor.id_game AND editor.id = game_editor.id_editor AND $criteria = $search ORDER BY game.name ASC\";\n return mysqli_query($db,$request);\n}",
"public function operatorK()\n\t{\n\t\t$condition = ['or'];\n\t\tforeach ($this->getRelatedTableName() as $formattedName) {\n\t\t\t$condition[] = ['not like', $formattedName, $this->getValue()];\n\t\t}\n\t\treturn $condition;\n\t}",
"public function getCriteria();",
"public function search($params)\n {\n $query = Deal::find()->alias('d1')\n ->select([\n '*',\n 'TRUNCATE(price*(1.01),2) as \"1%_price\"',\n 'TRUNCATE(price*(1.02),2) as \"2%_price\"',\n 'TRUNCATE(price*(1.03),2) as \"3%_price\"',\n 'TRUNCATE(price*(1.04),2) as \"4%_price\"',\n 'TRUNCATE(price*(1.05),2) as \"5%_price\"',\n 'if(is_sell=1,TRUNCATE((sell_price-price)*num,2),0) win_money'\n ])\n ;\n\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $query;\n }\n\n\n // grid filtering conditions\n $query->andFilterWhere([\n 'd1.id' => $this->id,\n 'd1.price' => $this->price,\n 'd1.num' => $this->num,\n 'd1.date' => $this->date,\n ]);\n $query->orderBy(['is_sell'=>SORT_ASC,'d1.stock_id'=>SORT_DESC,'d1.price'=>SORT_ASC]);\n\n return $query;\n }",
"public function query() {\n\t\treturn Documents::instance()->query();\n\t}",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('data',$this->data,true);\n $criteria->compare('signature',$this->signature,true);\n $criteria->compare('create_time',$this->create_time,true);\n $criteria->compare('err_code',$this->err_code,true);\n $criteria->compare('err_description',$this->err_description,true);\n $criteria->compare('version',$this->version);\n $criteria->compare('status',$this->status,true);\n $criteria->compare('type',$this->type,true);\n $criteria->compare('err_erc',$this->err_erc,true);\n $criteria->compare('redirect_to',$this->redirect_to,true);\n $criteria->compare('token',$this->token,true);\n $criteria->compare('card_token',$this->card_token,true);\n $criteria->compare('payment_id',$this->payment_id);\n $criteria->compare('public_key',$this->public_key,true);\n $criteria->compare('acq_id',$this->acq_id);\n $criteria->compare('order_id',$this->order_id,true);\n $criteria->compare('liqpay_order_id',$this->liqpay_order_id,true);\n $criteria->compare('description',$this->description,true);\n $criteria->compare('sender_phone',$this->sender_phone,true);\n $criteria->compare('sender_card_mask2',$this->sender_card_mask2,true);\n $criteria->compare('sender_card_bank',$this->sender_card_bank,true);\n $criteria->compare('sender_card_country',$this->sender_card_country,true);\n $criteria->compare('ip',$this->ip,true);\n $criteria->compare('info',$this->info,true);\n $criteria->compare('customer',$this->customer,true);\n $criteria->compare('amount',$this->amount);\n $criteria->compare('currency',$this->currency,true);\n $criteria->compare('sender_commission',$this->sender_commission,true);\n $criteria->compare('receiver_commission',$this->receiver_commission,true);\n $criteria->compare('agent_commission',$this->agent_commission,true);\n $criteria->compare('completion_date',$this->completion_date,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"function mWHERE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$WHERE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:156:3: ( 'where' ) \n // Tokenizer11.g:157:3: 'where' \n {\n $this->matchString(\"where\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"public function search()\n {\n $criteria = new CDbCriteria;\n\n #count_orders\n $order_table = Order::model()->tableName();\n $order_count_sql = \"(select count(*) from `\".$order_table.\"` as pt3 where pt3.user_id = t.id)\";\n\n #first_buy\n $first_buy_sql = \"(select min(pt4.date_create) from `\".$order_table.\"` as pt4 where pt4.user_id = t.id)\";\n\n\n if((isset($this->orders_date_first) && trim($this->orders_date_first) != \"\") && (isset($this->orders_date_last) && trim($this->orders_date_last) != \"\")){\n $orders_by_period_sql = \"(select count(*) from `\".$order_table.\"` as pt7 where pt7.user_id = t.id AND pt7.date_create between '\".$this->orders_date_first.\"' AND '\".$this->orders_date_last.\"')\";\n //$criteria->join = \"INNER JOIN `\".$order_table.\"` AS pt8 where pt8.user_id = t.id\";\n }else{\n $orders_by_period_sql = \"(select count(*) from `\".$order_table.\"` as pt7 where pt7.user_id = t.id)\";\n $criteria->compare($orders_by_period_sql, $this->orders_by_period);\n }\n\n $criteria->select = array(\n '*',\n $order_count_sql . \" as order_count\",\n $first_buy_sql . \" as first_buy\",\n $orders_by_period_sql . \" as orders_by_period\",\n );\n\n if((isset($this->date_first) && trim($this->date_first) != \"\") && (isset($this->date_last) && trim($this->date_last) != \"\")){\n $criteria->addBetweenCondition('(select min(pt6.date_create) from `'.$order_table.'` as pt6 where pt6.user_id = t.id)', ''.$this->date_first.'', ''.$this->date_last.'');\n }\n\n $criteria->compare($order_count_sql, $this->order_count);\n $criteria->compare($order_count_sql, $this->order_count);\n $criteria->compare($orders_by_period_sql, $this->orders_by_period);\n $criteria->compare('t.id', $this->id);\n $criteria->compare('t.login', $this->login, true);\n $criteria->compare('t.password', $this->password, true);\n $criteria->compare('t.email', $this->email, true);\n $criteria->compare('t.display_name', $this->display_name, true);\n $criteria->compare('t.name', $this->name, true);\n $criteria->compare('t.servicename', $this->servicename, true);\n $criteria->compare('t.phone', $this->phone, true);\n $criteria->compare('t.address', $this->address);\n $criteria->compare('t.status', $this->status);\n $criteria->compare('t.discount', $this->status);\n $criteria->compare('t.camefrom', $this->camefrom);\n $criteria->compare('t.position', $this->position);\n\n\n\n return parent::searchInit($criteria);\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('gh_type',$this->gh_type);\n\t\t$criteria->compare('gh_amount',$this->gh_amount,true);\n\t\t$criteria->compare('m_p_water',$this->m_p_water,true);\n\t\t$criteria->compare('m_u_water',$this->m_u_water,true);\n\t\t$criteria->compare('m_p_cement',$this->m_p_cement,true);\n\t\t$criteria->compare('m_u_cement',$this->m_u_cement,true);\n\t\t$criteria->compare('m_p_ash',$this->m_p_ash,true);\n\t\t$criteria->compare('m_u_ash',$this->m_u_ash,true);\n\t\t$criteria->compare('m_p_gravel',$this->m_p_gravel,true);\n\t\t$criteria->compare('m_u_gravel',$this->m_u_gravel,true);\n\t\t$criteria->compare('m_p_sand',$this->m_p_sand,true);\n\t\t$criteria->compare('m_u_sand',$this->m_u_sand,true);\n\t\t$criteria->compare('m_p_river_sand',$this->m_p_river_sand,true);\n\t\t$criteria->compare('m_u_river_sand',$this->m_u_river_sand,true);\n\t\t$criteria->compare('m_p_additive',$this->m_p_additive,true);\n\t\t$criteria->compare('m_u_additive',$this->m_u_additive,true);\n\t\t$criteria->compare('capacity',$this->capacity,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('add_time',$this->add_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,true);\n\t\t$criteria->compare('s_number',$this->s_number,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"function channel_entries_sql_where($sql, &$channel)\n\t{\n\n\t\tif ( is_string( $this->EE->extensions->last_call ) === TRUE )\n\t\t{\n\t\t\t$sql\t= $this->EE->extensions->last_call;\n\t\t}\n\n\t\t/** ----------------------------------------\n\t\t/**\tShould we proceed?\n\t\t/** ----------------------------------------*/\n\n\t\tif ( $this->EE->TMPL->fetch_param('date_field') === FALSE OR $this->EE->TMPL->fetch_param('date_field') == '' )\n\t\t{\n\t\t\treturn $sql;\n\t\t}\n\n\t\tif ( ( $this->EE->TMPL->fetch_param('date_field_start') === FALSE OR $this->EE->TMPL->fetch_param('date_field_start') == '' ) AND ( $this->EE->TMPL->fetch_param('date_field_stop') === FALSE OR $this->EE->TMPL->fetch_param('date_field_stop') == '' ) )\n\t\t{\n\t\t\treturn $sql;\n\t\t}\n\n\t\tif ( empty( $this->EE->TMPL->site_ids ) )\n\t\t{\n\t\t\treturn $sql;\n\t\t}\n\n\t\t/** ----------------------------------------\n\t\t/**\tLoop for site ids and add DB queries\n\t\t/** ----------------------------------------*/\n\n\t\t$sql_a\t= array();\n\n\t\tforeach ( $this->EE->TMPL->site_ids as $site_id )\n\t\t{\n\t\t\tif ( ! empty( $channel->dfields[$site_id][ $this->EE->TMPL->fetch_param('date_field') ] ) )\n\t\t\t{\n\t\t\t\t$field_id\t= $channel->dfields[$site_id][ $this->EE->TMPL->fetch_param('date_field') ];\n\n\t\t\t\t$sql_b\t= array();\n\n\t\t\t\tif ( $this->EE->TMPL->fetch_param('date_field_start') != '' )\n\t\t\t\t{\n\t\t\t\t\t$sql_b[]\t= \" ( wd.field_id_{$field_id} >= '\".$this->EE->localize->string_to_timestamp( $this->EE->db->escape_str( $this->EE->TMPL->fetch_param('date_field_start') ) ).\"' AND wd.site_id = \" . $this->EE->db->escape_str( $site_id ) . \" )\";\n\n\t\t\t\t}\n\n\t\t\t\tif ( $this->EE->TMPL->fetch_param('date_field_stop') != '' )\n\t\t\t\t{\n\t\t\t\t\t$sql_b[]\t= \" ( wd.field_id_{$field_id} < '\".$this->EE->localize->string_to_timestamp( $this->EE->db->escape_str( $this->EE->TMPL->fetch_param('date_field_stop') ) ).\"' AND wd.site_id = \" . $this->EE->db->escape_str( $site_id ) . \" )\";\n\t\t\t\t}\n\n\t\t\t\t$sql_a[]\t= implode( ' AND ', $sql_b );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $sql_a ) )\n\t\t{\n\t\t\t/** ----------------------------------------\n\t\t\t/**\tPrepare the necessary DB join\n\t\t\t/** ----------------------------------------*/\n\n\t\t\tif ( strpos($sql, 'LEFT JOIN exp_channel_data') === FALSE )\n\t\t\t{\n\t\t\t\t$sql = str_replace( 'LEFT JOIN exp_members', 'LEFT JOIN exp_channel_data AS wd ON wd.entry_id = t.entry_id LEFT JOIN exp_members', $sql );\n\t\t\t}\n\n\t\t\t/** ----------------------------------------\n\t\t\t/**\tAdd our new conditions\n\t\t\t/** ----------------------------------------*/\n\n\t\t\t$sql\t.= \" AND ( \" . implode( ' OR ', $sql_a ) . \" )\";\n\t\t}\n\n\t\t/*\n\t\tif ( $SESS->userdata('group_id') == '1' )\n\t\t{\n\t\t\techo \"Visible only to Super Admins<br /><br />\";\n\t\t\tprint_r( $sql );\n\t\t\techo \"<br /><br />Visible only to Super Admins\";\n\t\t}\n\t\t*/\n\t\treturn $sql;\n\t}",
"static function where(){\r\n\t\t$arr = func_get_args();\r\n\t\t// tao ra lop static \r\n\t\t$model = new static();\r\n\t\t$tb = call_user_func_array(array($model->mask(), 'where'), $arr);\r\n\r\n\t\treturn $model;\r\n\t}",
"public function where() {\r\n\t\t$args = func_get_args();\r\n\t\treturn call_user_func_array(array($this, 'andWhere'), $args);\r\n\t}",
"function getWhere($table,$col,$where,$order){\n $array=array();\n $conn=connectDB();\n $query=\"SELECT $col FROM $table WHERE $where ORDER BY $order\";\n //print($query);\n foreach ($conn->query($query)as $row){\n array_push($array,$row[$col]);\n }\n return $array;\n }",
"public function findCriteria()\r\n\t{\n\t\t$result = $this -> connection -> setTable($this -> entity)\n\t\t\t\t\t\t\t\t\t -> fetch();\r\n\n\t\treturn $result;\r\n\t}",
"function MyMod_Data_Fields_Sql_Where($data,$value)\n {\n $where=array();\n if (!empty($this->SqlWhere[ $data ]))\n {\n $where[ $data ]=$this->SqlWhere[ $data ];\n }\n return $where;\n }",
"public function where($field, $operator, $value);",
"public function index()\n\t{\n\t\t//phpinfo();die;\n\t\t$user_id = 39;\n\t\t$time_from = time() - 60 * 60 * 24 * 2;\n\t\t$time_to = time();\n\t\t\n\t\t$time_from = 1405503206;\n\t\t$time_to = 1405503207;\n\t\t\n\t\t$this->load->model('location_payload_model');\n\t\t$this->location_payload_model->calc_user_distance_and_zooz_sum_for_time($user_id,$time_from,$time_to);\n\t\t\n\t\tdie;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\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\n\t\t$connection = new MongoClient();\n\t\t$collection = $connection->db->users;\n\t\t//zooz_distance_balance\n\t\t\n\t\t$out = $collection->aggregate(\n\t\t\n \tarray(\n //'$match' => array('activation_status' => array('$eq' => 'active')),\n '$match' => array('activation_status' => 'not_activated')\n \t),\n \tarray(\n '$group' => array(\n \t\t'_id' => array('activation_status' => '$activation_status'),\n 'pop' => array('$sum' => '$zooz_distance_balance' )\n )\n )\n \n);\n\n//print_r($out['result']);\nprint_r($out);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdie;\n\t\t\n\t\t$query = array( \"_id\" => array( '$gt' => 1 ) ); //note the single quotes around '$gt'\n\t\t$cursor = $collection->find( $query );\n\n\t\twhile ( $cursor->hasNext() )\n\t\t{\n \t\tvar_dump( $cursor->getNext() );\n\t\t}\n\n\t\tdie;\n\n\t\t\n\t\t$this->load->library('mongo_db');\n\t\t\n\t\t$db = $this->mongo_db->_connect();\n\t\t\n\t\t$collection = $db->users;\n\t\t\n\t\t$document = $collection->findOne();\n\t\tvar_dump( $document );\n\t\tdie;\n\n\n\t\t\n\t\t$q = array('\n\t\tdb.orders.aggregate( [\n \t\t{\n \t\t$group: {\n \t_id: null,\n \ttotal: { $sum: \"$price\" }\n \t\t}\n \t\t}\n\t\t] )');\n\t\t\n\t\t$this->mongo_db->command();\n\t\t\n\t\t\n\n\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->load->model('zip_model');\n\t\techo $this->zip_model->get_content_from_file('c:/Temp/123.zip','123.TXT');\n\t\t\n\t\tdie;\n\t\t\n\t$zip = zip_open(\"c:/Temp/123.zip\");\n\n\tif ($zip) {\n while ($zip_entry = zip_read($zip)) {\n echo \"Name: \" . zip_entry_name($zip_entry) . \"\\n\";\n echo \"Actual Filesize: \" . zip_entry_filesize($zip_entry) . \"\\n\";\n echo \"Compressed Size: \" . zip_entry_compressedsize($zip_entry) . \"\\n\";\n echo \"Compression Method: \" . zip_entry_compressionmethod($zip_entry) . \"\\n\";\n\n if (zip_entry_open($zip, $zip_entry, \"r\")) {\n echo \"File Contents:\\n\";\n $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));\n echo \"$buf\\n\";\n\n zip_entry_close($zip_entry);\n }\n echo \"\\n\";\n\n }\n\n zip_close($zip);\n\n}\n\n\t\tdie;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//echo 'start<br>';\n\t\t\n/*\t\t\n\t// Config \n$dbhost = '127.0.0.1'; \n$dbname = 'db'; \n \n// Connect to test database \n$m = new Mongo(\"mongodb://$dbhost\"); \n$db = $m->$dbname; \n \n// select the collection \n$collection = $db->users; \n\n\n$document[\"id\"] = 2332;\n$document[\"name\"] = 'sharona';\n\n $collection->insert($document);die;\n */\n/* \n// pull a cursor query \n$cursor = $collection->find(); \n\nforeach($cursor as $document) { \n print_r($document); \n} \n\n*/\t\t\n/*\t\t\n\t\t\n\t\t$this->load->model('users_model');\n\t\t$this->users_model->insert_new_user();\n\t\tdie;\n\t\t\n\t\t\n\t\t $this->load->model('sequence_model');\n\t\t $this->sequence_model->get_sequence('users');\n\t\t \n\t\t die;\n\t\t\n\t\t\n\t\t\n\t\t $this->load->library('mongo_db');\n\t\t \n\t\n \n\t\t\t\n\t\t// $users = $this->mongo_db->db->users->find();\n\t\t \n\t\t// print_r($users);\n\t\t\n\t\t$users = $this->mongo_db->where(array(\n 'name' => 'sharon'))->get('users');\n\t\tprint_r($users);\n\n\t\n\t\t\n\t\t echo '<br><br>end';\n\t\t*/\n\t\t\n\t\t\n\t\t//$this->load->view('welcome_message');\n\t}",
"public function where(array $array = array(), $operator = 'and') {\n $where = '';\n $counter = 0;\n foreach ($array as $key => $value) {\n $this->placeHolder[\":$key\"] = $value;\n if ($counter > 0) {\n $where.=\" $operator `$key`=:$key\";\n } else {\n $where.=\"`$key`=:$key\";\n }\n $counter++;\n }\n // $where = trim($where, $operator);\n $this->sql.=\" WHERE \" . $where;\n }",
"function query() {}",
"public function findOneBy($params)\n\t{\n\t}",
"public function _query()\n {\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('board_works',$this->board_works,true);\n\t\t$criteria->compare('add_new_ads',$this->add_new_ads,true);\n\t\t$criteria->compare('add_new_news',$this->add_new_news,true);\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('cache_clear',$this->cache_clear,true);\n\t\t$criteria->compare('scache',$this->scache);\n\t\t$criteria->compare('scache_expire',$this->scache_expire);\n\t\t$criteria->compare('scache_exp_expire',$this->scache_exp_expire);\n\t\t$criteria->compare('kcache',$this->kcache);\n\t\t$criteria->compare('add_new_only_user',$this->add_new_only_user,true);\n\t\t$criteria->compare('money_service',$this->money_service,true);\n\t\t$criteria->compare('top_status_days',$this->top_status_days);\n\t\t$criteria->compare('top_prefix',$this->top_prefix,true);\n\t\t$criteria->compare('top_price',$this->top_price,true);\n\t\t$criteria->compare('top_number',$this->top_number,true);\n\t\t$criteria->compare('select_status_days',$this->select_status_days);\n\t\t$criteria->compare('select_prefix',$this->select_prefix,true);\n\t\t$criteria->compare('select_price',$this->select_price,true);\n\t\t$criteria->compare('select_number',$this->select_number,true);\n\t\t$criteria->compare('wm_money_service',$this->wm_money_service,true);\n\t\t$criteria->compare('wm_mode',$this->wm_mode,true);\n\t\t$criteria->compare('wm_purse',$this->wm_purse,true);\n\t\t$criteria->compare('wm_type',$this->wm_type,true);\n\t\t$criteria->compare('wmprice_vip',$this->wmprice_vip);\n\t\t$criteria->compare('wmprice_select',$this->wmprice_select);\n\t\t$criteria->compare('subscribe_theme',$this->subscribe_theme,true);\n\t\t$criteria->compare('subscribe_text',$this->subscribe_text,true);\n\t\t$criteria->compare('subscribe_from',$this->subscribe_from,true);\n\t\t$criteria->compare('subscribe_limit',$this->subscribe_limit);\n\t\t$criteria->compare('subscribe_sleep',$this->subscribe_sleep);\n\t\t$criteria->compare('view_nonactiv_contacts',$this->view_nonactiv_contacts,true);\n\t\t$criteria->compare('count_symb_autor',$this->count_symb_autor);\n\t\t$criteria->compare('count_symb_title',$this->count_symb_title);\n\t\t$criteria->compare('count_symb_url',$this->count_symb_url);\n\t\t$criteria->compare('count_symb_contacts',$this->count_symb_contacts);\n\t\t$criteria->compare('count_symb_text',$this->count_symb_text);\n\t\t$criteria->compare('count_adv_on_index',$this->count_adv_on_index);\n\t\t$criteria->compare('tags_generate',$this->tags_generate,true);\n\t\t$criteria->compare('kaleidoscope',$this->kaleidoscope,true);\n\t\t$criteria->compare('count_show_img_kaleidoscope',$this->count_show_img_kaleidoscope);\n\t\t$criteria->compare('add_url',$this->add_url,true);\n\t\t$criteria->compare('view_comments',$this->view_comments,true);\n\t\t$criteria->compare('clouds_tags',$this->clouds_tags,true);\n\t\t$criteria->compare('add_comments',$this->add_comments,true);\n\t\t$criteria->compare('stop_words',$this->stop_words,true);\n\t\t$criteria->compare('upl_image_size',$this->upl_image_size);\n\t\t$criteria->compare('mail_friends',$this->mail_friends,true);\n\t\t$criteria->compare('admin_mail',$this->admin_mail,true);\n\t\t$criteria->compare('print_keywords',$this->print_keywords,true);\n\t\t$criteria->compare('print_vip',$this->print_vip,true);\n\t\t$criteria->compare('count_print_vip',$this->count_print_vip);\n\t\t$criteria->compare('print_news',$this->print_news,true);\n\t\t$criteria->compare('count_print_news',$this->count_print_news);\n\t\t$criteria->compare('count_news_in_page',$this->count_news_in_page);\n\t\t$criteria->compare('print_stat',$this->print_stat,true);\n\t\t$criteria->compare('limit_pagination_on_page',$this->limit_pagination_on_page);\n\t\t$criteria->compare('mail_about_new_mess',$this->mail_about_new_mess,true);\n\t\t$criteria->compare('upload_images',$this->upload_images,true);\n\t\t$criteria->compare('count_images_for_users',$this->count_images_for_users);\n\t\t$criteria->compare('width_small_images',$this->width_small_images);\n\t\t$criteria->compare('width_normal_images',$this->width_normal_images);\n\t\t$criteria->compare('width_cat_images',$this->width_cat_images);\n\t\t$criteria->compare('width_news_images',$this->width_news_images);\n\t\t$criteria->compare('add_link_to_video',$this->add_link_to_video,true);\n\t\t$criteria->compare('captcha',$this->captcha,true);\n\t\t$criteria->compare('edit_message',$this->edit_message,true);\n\t\t$criteria->compare('edit_comments',$this->edit_comments,true);\n\t\t$criteria->compare('anti_link',$this->anti_link,true);\n\t\t$criteria->compare('day_for_notice_autor',$this->day_for_notice_autor);\n\t\t$criteria->compare('user_title',$this->user_title,true);\n\t\t$criteria->compare('user_keywords',$this->user_keywords,true);\n\t\t$criteria->compare('user_description',$this->user_description,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search($status = null)\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->with = array('invoices');\n\t\t//$criteria->join='LEFT JOIN hts_invoices ON hts_invoices.orderId=t.orderId';\n\t\t$criteria->compare('orderId',$this->orderId);\n\t\t$criteria->compare('sellerId',$this->sellerId);\n\t\t$criteria->compare('totalCost',$this->totalCost,true);\n\t\t$criteria->compare('totalShipping',$this->totalShipping,true);\n\t\t$criteria->compare('discount',$this->discount,true);\n\t\t$criteria->compare('discountSource',$this->discountSource,true);\n\t\t$criteria->compare(\"from_unixtime(`orderDate`, '%d-%m-%Y')\",$this->orderDate,true);\n\t\t/*if(!empty($this->orderDate))\n\t\t $criteria->condition = \"from_unixtime(`orderDate`, '%d-%m-%Y') = '$this->orderDate'\";\n\t\t else\n\t\t $criteria->compare('orderDate',$this->orderDate); */\n\t\t$criteria->compare('shippingAddress',$this->shippingAddress);\n\t\t$criteria->compare('currency',$this->currency,true);\n\n\n\t\tif(Yii::app()->controller->action->id == 'scroworders') {\n\t\t\t$criteria->addCondition(\"trackPayment != ''\");\n\t\t\tif($status == 'approved') {\n\t\t\t\t$criteria->addCondition(\"trackPayment = 'paid'\");\n\t\t\t} elseif($status == 'delivered') {\n\t\t\t\t$criteria->addCondition(\"trackPayment = 'pending'\");\n\t\t\t\t$criteria->addCondition(\"status = 'delivered'\");\n\t\t\t} elseif($status == 'cancelled') {\n\t\t\t\t$criteria->addCondition(\"trackPayment = 'pending'\");\n\t\t\t\t$criteria->addCondition(\"status = 'cancelled'\");\n\t\t\t} elseif($status == 'refunded') {\n\t\t\t\t$criteria->addCondition(\"trackPayment = 'refunded'\");\n\t\t\t\t$criteria->addCondition(\"status = 'cancelled'\");\n\t\t\t} else {\n\t\t\t\t$criteria->compare('status',$status,true);\n\t\t\t}\n\t\t} else {\n\t\t\t$criteria->addCondition(\"trackPayment = ''\");\n\t\t\t$criteria->compare('status',$status,true);\n\t\t}\n\t\tif(Yii::app()->request->isAjaxRequest) {\n\t\t\tif(!empty($status))\n\t\t\t$criteria->addCondition(\"status = '$status'\");\n\t\t\t\n\t\t}\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t'sort'=>array(\n 'defaultOrder'=>'orderId DESC',\n\t\t)\n\t\t));\n\t}",
"function test($d){\n $sql = $this->db->table('sendmailtemp')->getWhere(['email' => $d['email']]);\n }",
"public function where($col, $operator = self::NO_OPERATOR, $value = self::NO_VALUE);",
"public function testPDONewWhere()\n {\n $mod = Read::Factory($this->_table, $this->_db, \"MysqlPDO\");\n\n $where = [\n \"(\",\n\n \"(\",\n ['fend_test.`db`.user_id', 14],\n ['users.user_name', 'oak'],\n ['`users`.user_id', \">=\", 0],\n \")\",\n\n \"OR\",\n\n \"(\",\n ['`user_id`', \"<=\", 10000],\n ['user_id', \"like\", '57%'],\n \")\",\n\n \")\",\n\n \"OR\",\n\n ['user_id', \"in\", [1, 2, 3, 4, 5, 6]],\n\n \"OR\",\n\n \"(\",\n ['user_id', \"not in\", ['a', 'c', 'd', 'f']],\n \" `user_name` = 'yes' \",\n \")\",\n\n ];\n $mod->where($where);\n $sql = $mod->getSql();\n self::assertEquals('SELECT * FROM users WHERE ( ( `fend_test`.`db`.`user_id` = \\'14\\' AND `users`.`user_name` = \\'oak\\' AND `users`.`user_id` >= \\'0\\' ) OR ( `user_id` <= \\'10000\\' AND `user_id` like \\'57%\\' ) ) OR `user_id` in (\\'1\\',\\'2\\',\\'3\\',\\'4\\',\\'5\\',\\'6\\') OR ( `user_id` not in (\\'a\\',\\'c\\',\\'d\\',\\'f\\') AND `user_name` = \\'yes\\' ) ', $sql);\n\n }",
"function criteria(&$query){\n $id = $this->input->post('id', true);\n $k = $this->input->post('k', true);/*kind*/\n $t = $this->input->post('t', true);/*title*/\n $s = $this->input->post('s', true);/*sub*/\n $b = $this->input->post('b', true);/*background*/\n $so = $this->input->post('so', true);/*sort*/\n if(!empty($id)){/*where like include: before(%pattern), after(pattern%) and both(%pattern%)*/\n $query = $query->like('id', $id, 'both');\n }\n if(!empty($k)){\n $query = $query->like('kind', $k, 'both');\n }\n if(!empty($t)){\n $query = $query->like('title', $t, 'both');\n }\n if(!empty($s)){\n $query = $query->like('sub', $s, 'both');\n }\n if(!empty($b)){\n $query = $query->like('background', $b, 'both');\n }\n if(!empty($so)){\n $query = $query->like('sort', $so, 'both');\n }\n }",
"private function getQuery(array $where, array $options): MongoQuery\n {\n try {\n $query = new MongoQuery($where, $options);\n } catch (InvalidArgumentException $e) {\n new Exception('WriteConcern could not to be initiated');\n }\n return $query;\n }",
"public function search($params)\n {\n $query = A2Liquidaciones::find();\n\n //$query->joinWith('operacionInmobiliaria',false, 'INNER JOIN');\n\n $query->joinWith(['operacionInmobiliaria' => function ($q) {\n $q->joinWith(['inmueble', 'cliente']);\n //$q->joinWith('cliente');\n }], false, 'INNER JOIN');\n if (isset($params['A2LiquidacionesSearch']['tipo_filtro']) && $params['A2LiquidacionesSearch']['tipo_filtro'] == 'sin_vencer') {\n $query->where(\"a2_operaciones_inmobiliarias.estado='ACTIVO' AND DATEDIFF(NOW(),CONCAT(a2_liquidaciones.liq_anio,'-',\n a2_liquidaciones.liq_mes,'-',`a2_operaciones_inmobiliarias`.`dia_venc_mensual`))<0\");\n }\n\n if (isset($params['A2LiquidacionesSearch']['tipo_filtro']) && $params['A2LiquidacionesSearch']['tipo_filtro'] == 'por_vencer') {\n $query->where(\"a2_operaciones_inmobiliarias.estado='ACTIVO' AND DATEDIFF(NOW(),CONCAT(`a2_operaciones_inmobiliarias`.`hasta_anio`,'-',\n `a2_operaciones_inmobiliarias`.`hasta_mes`,'-',`a2_operaciones_inmobiliarias`.`dia_venc_mensual`))>=-70\");\n }\n\n //VENCIDAS\n if (isset($params['A2LiquidacionesSearch']['tipo_filtro']) && $params['A2LiquidacionesSearch']['tipo_filtro'] == 'vencidas') {\n $query->where(\"a2_operaciones_inmobiliarias.estado='ACTIVO' AND (DATEDIFF(NOW(),CONCAT(a2_liquidaciones.liq_anio,'-',\n a2_liquidaciones.liq_mes,'-',`a2_operaciones_inmobiliarias`.`dia_venc_mensual`))>0 AND \n DATEDIFF(NOW(),CONCAT(a2_liquidaciones.liq_anio,'-',\n a2_liquidaciones.liq_mes,'-',`a2_operaciones_inmobiliarias`.`dia_venc_mensual`))<=30) \");\n }\n\n //VENCIDAS MAS DE UN MES\n if (isset($params['A2LiquidacionesSearch']['tipo_filtro']) && $params['A2LiquidacionesSearch']['tipo_filtro'] == 'vencidas_mas_mes') {\n $query->where(\"a2_operaciones_inmobiliarias.estado='ACTIVO' AND DATEDIFF(NOW(),CONCAT(a2_liquidaciones.liq_anio,'-',\n a2_liquidaciones.liq_mes,'-',`a2_operaciones_inmobiliarias`.`dia_venc_mensual`))>30 \");\n }\n\n // add conditions that should always apply here\n if ($params['A2LiquidacionesSearch']['estado'] == 'ACTIVO') {\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort' => [\n 'defaultOrder' => [\n 'liq_anio' => SORT_DESC,\n 'liq_mes' => SORT_DESC,\n ]\n ],\n ]);\n } else {\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort' => [\n 'defaultOrder' => [\n 'fecha_pago' => SORT_DESC,\n ]\n ],\n ]);\n }\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n if (!empty($this->periodo)) {\n $arreglo_periodo = explode(\"/\", $this->periodo);\n $this->liq_mes = $arreglo_periodo[0];\n $this->liq_anio = $arreglo_periodo[1];\n }\n\n // grid filtering conditions\n $query->andFilterWhere([\n 'id_liquidacion' => $this->id_liquidacion,\n 'id_operacion' => $this->id_operacion,\n 'liq_anio' => $this->liq_anio,\n 'liq_mes' => $this->liq_mes,\n 'fecha_pago' => $this->fecha_pago,\n 'monto_pagado' => $this->monto_pagado,\n 'monto_intereses' => $this->monto_intereses,\n 'timestamp' => $this->timestamp,\n ]);\n\n\n $query->andFilterWhere(['like', 'usuario', $this->usuario])\n ->andFilterWhere(['like', 'a2_liquidaciones.estado', $this->estado])\n ->andFilterWhere(['like', 'a2_noticias.direccion', $this->direccion])\n ->andFilterWhere(['like', 'a2_clientes.nombre', $this->cliente]);\n\n\n return $dataProvider;\n }",
"public static function where($config)\n\t{\n\t\treturn self::new_instance_records()->where($config);\n\t}",
"function BasicSearchSQL($arKeywords, $type) {\n\t\t$sWhere = \"\";\n\t\t$this->BuildBasicSearchSQL($sWhere, $this->auc_number, $arKeywords, $type);\n\t\t$this->BuildBasicSearchSQL($sWhere, $this->chop, $arKeywords, $type);\n\t\t$this->BuildBasicSearchSQL($sWhere, $this->grade, $arKeywords, $type);\n\t\t$this->BuildBasicSearchSQL($sWhere, $this->estate, $arKeywords, $type);\n\t\treturn $sWhere;\n\t}",
"function admin_getter_options() {\n\treturn array(\n\t\t'wheres' => array(\n\t\t\t\"ue.admin = 'yes'\"\n\t\t)\n\t);\n}",
"function beforeFind($queryData) {\n\t\t\tif (is_array($queryData['conditions'])) {\n\t\t\t\t$queryData['conditions']['Product.deleted']=0;\n\t\t\t} else {\n\t\t\t\t$queryData['conditions'].=' AND Product.deleted=0';\n\t\t\t}\n\t\t\treturn $queryData;\n\t\t}",
"public function search($mode = '') {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->with = array('Vessel', 'VoyageOrder');\n $criteria->together = true;\n $criteria->condition = 'Vessel.VesselName LIKE :data OR VoyageOrder.VoyageOrderNumber LIKE :data ';\n $criteria->params = array(':data' => '%' . trim($this->VesselName_VoyageOrderNumber) . '%');\n\n $criteria->compare('t.id_purchase_request', $this->id_purchase_request);\n $criteria->compare('t.PRNumber', $this->PRNumber, true);\n $criteria->compare('t.PRDate', $this->PRDate, true);\n $criteria->compare('t.PRNo', $this->PRNo);\n $criteria->compare('t.PRMonth', $this->PRMonth);\n $criteria->compare('t.PRYear', $this->PRYear);\n $criteria->compare('t.id_po_category', $this->id_po_category);\n $criteria->compare('t.amount', $this->amount, true);\n $criteria->compare('t.metric', $this->metric);\n $criteria->compare('t.dedicated_to', $this->dedicated_to, true);\n $criteria->compare('t.id_vessel', $this->id_vessel);\n $criteria->compare('t.id_voyage_order', $this->id_voyage_order);\n $criteria->compare('t.notes', $this->notes, true);\n $criteria->compare('t.is_mutliple_item', $this->is_mutliple_item);\n $criteria->compare('t.requested_user', $this->requested_user, true);\n $criteria->compare('t.requested_date', $this->requested_date, true);\n $criteria->compare('t.ip_user_requested', $this->ip_user_requested, true);\n $criteria->compare('t.Status', $this->Status);\n $criteria->compare('t.approved_user', $this->approved_user, true);\n $criteria->compare('t.approval_date', $this->approval_date, true);\n $criteria->compare('t.ip_user_approved', $this->ip_user_approved, true);\n $criteria->compare('t.approval_level', $this->approval_level, true);\n\n /*\n if($mode=='agency'){\n $sort=array(\n 'defaultOrder'=>'PRDate DESC',\n 'attributes'=>array(\n 'VesselName_VoyageOrderNumber'=>array(\n 'asc'=>'VoyageOrder.VoyageOrderNumber ASC',\n 'desc'=>'VoyageOrder.VoyageOrderNumber DESC',\n ),\n '*',\n ),\n );\n }else{\n $sort=array(\n 'defaultOrder'=>'PRDate DESC',\n 'attributes'=>array(\n 'VesselName_VoyageOrderNumber'=>array(\n 'asc'=>'Vessel.VesselName ASC',\n 'desc'=>'Vessel.VesselName DESC',\n ),\n '*',\n ),\n );\n } */\n\n if ($mode == 'agency') {\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'PRDate DESC',\n 'attributes' => array(\n 'VesselName_VoyageOrderNumber' => array(\n 'asc' => 'VoyageOrder.VoyageOrderNumber ASC',\n 'desc' => 'VoyageOrder.VoyageOrderNumber DESC',\n ),\n '*',\n ),\n ),\n /*\n 'pagination'=>array(\n 'pageSize'=>15,\n ),\n */\n /// page size nya\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState('pageSize', Yii::app()->params['defaultPageSize']),\n ),\n ));\n } else {\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'PRDate DESC',\n 'attributes' => array(\n 'VesselName_VoyageOrderNumber' => array(\n 'asc' => 'Vessel.VesselName ASC',\n 'desc' => 'Vessel.VesselName DESC',\n ),\n '*',\n ),\n ),\n /*\n 'pagination'=>array(\n 'pageSize'=>15,\n ),\n */\n /// page size nya\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState('pageSize', Yii::app()->params['defaultPageSize']),\n ),\n ));\n }\n }",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('merchant_id',$this->merchant_id);\n\t\t$criteria->compare('merchant_short_name',$this->merchant_short_name,true);\n\t\t$criteria->compare('card_id',$this->card_id,true);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('if_wechat',$this->if_wechat);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('vice_title',$this->vice_title,true);\n\t\t$criteria->compare('money_type',$this->money_type);\n\t\t$criteria->compare('money_random',$this->money_random,true);\n\t\t$criteria->compare('money',$this->money);\n\t\t$criteria->compare('discount',$this->discount);\n\t\t$criteria->compare('prompt',$this->prompt,true);\n\t\t$criteria->compare('if_share',$this->if_share);\n\t\t$criteria->compare('if_give',$this->if_give);\n\t\t$criteria->compare('num',$this->num);\n\t\t$criteria->compare('get_num',$this->get_num);\n\t\t$criteria->compare('time_type',$this->time_type);\n\t\t$criteria->compare('start_time',$this->start_time,true);\n\t\t$criteria->compare('end_time',$this->end_time,true);\n\t\t$criteria->compare('start_days',$this->start_days);\n\t\t$criteria->compare('effective_days',$this->effective_days);\n\t\t$criteria->compare('receive_num',$this->receive_num);\n\t\t$criteria->compare('use_restriction',$this->use_restriction);\n\t\t$criteria->compare('mini_consumption',$this->mini_consumption);\n\t\t$criteria->compare('if_with_userdiscount',$this->if_with_userdiscount);\n\t\t$criteria->compare('store_limit',$this->store_limit,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('use_illustrate',$this->use_illustrate,true);\n\t\t$criteria->compare('discount_illustrate',$this->discount_illustrate,true);\n\t\t$criteria->compare('if_invalid',$this->if_invalid);\n\t\t$criteria->compare('flag',$this->flag);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('last_time',$this->last_time,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('use_channel',$this->use_channel);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function where($conditions = null, $overwrite = false);",
"function check_story_exits_or_not($where_condition) {\n $ci = & get_instance();\n $ci->load->database();\n\n if (!empty($where_condition)) {\n foreach ($where_condition as $key => $value) {\n $ci->db->where($key, $value);\n }\n }\n $query = $ci->db->get('storys');\n return $query->row_array();\n}",
"public function whereArray($wheres){\r\n\t\tforeach($wheres as $k => $v){\r\n\t\t\t$this->where(\"`$k`=?\", $v);\r\n\t\t}\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 }"
] | [
"0.5492911",
"0.54797816",
"0.52177733",
"0.5212182",
"0.51435363",
"0.51335293",
"0.51284814",
"0.5115798",
"0.5102637",
"0.5098043",
"0.50964355",
"0.5084329",
"0.5076734",
"0.505389",
"0.505389",
"0.5031265",
"0.50268036",
"0.50047094",
"0.50002205",
"0.49989867",
"0.49849832",
"0.49632883",
"0.49601397",
"0.49455512",
"0.49370447",
"0.4925179",
"0.49048117",
"0.48952597",
"0.4895069",
"0.4891136",
"0.48621148",
"0.48565716",
"0.48527157",
"0.48499757",
"0.48464236",
"0.48244154",
"0.48203912",
"0.47886884",
"0.47886175",
"0.4782233",
"0.47778603",
"0.47603703",
"0.47602943",
"0.47536024",
"0.4745127",
"0.47423825",
"0.47402373",
"0.4723553",
"0.47231483",
"0.47197983",
"0.47197655",
"0.47118902",
"0.47076678",
"0.47049713",
"0.470449",
"0.4701862",
"0.47016028",
"0.46946347",
"0.46896338",
"0.46887797",
"0.46854883",
"0.46807733",
"0.4679354",
"0.4671636",
"0.46670893",
"0.46631345",
"0.46616825",
"0.46600243",
"0.46592253",
"0.46486703",
"0.46482944",
"0.4643594",
"0.46427703",
"0.4637978",
"0.46379253",
"0.46366635",
"0.46309972",
"0.46284524",
"0.4625149",
"0.4623995",
"0.46181366",
"0.46175927",
"0.46167374",
"0.46104303",
"0.46038622",
"0.46030805",
"0.46025905",
"0.46023288",
"0.4597277",
"0.45971435",
"0.45960122",
"0.4591211",
"0.45879737",
"0.45763567",
"0.45763567",
"0.45763567",
"0.45763567",
"0.45763567",
"0.45763567",
"0.45763567"
] | 0.4775082 | 41 |
Write a procedure ShiftLeft3(A, B, C) that performs a left cyclic shift by assigning the initial values of A, B, C to variables C, A, B respectively (A, B, C are input and output realvalued parameters). Using this procedure, perform the left cyclic shift for each of two given triples of real numbers: (A1, B1, C1) and (A2, B2, C2). | function ShiftLeft3(&$A, &$B, &$C){
$var = $C;
$C = $B ;
$B = $A ;
$A = $var;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function bitwiseLeftShift(int $shift);",
"private function getLeftShift()\n {\n if ($this->currentPage < 3) {\n $shift = 3;\n } else {\n $shift = 1;\n }\n return $shift;\n }",
"function shift_left_CD($CorD, $shift_schedule){\n $arr[16][28] = array();\n for($i=0; $i<28; $i++){\n $arr[0][$i] = $CorD[$i];\n }\n $arr[0]=shift_left_rotate($arr[0]);\n\n for($i=1; $i<16; $i++){\n for($j=0; $j<28; $j++){\n $arr[$i][$j]=$arr[$i-1][$j];\n }\n\n if($shift_schedule[$i]==2)\n {\n $arr[$i]=shift_left_rotate($arr[$i]);\n $arr[$i]=shift_left_rotate($arr[$i]);\n }\n else\n {\n $arr[$i]=shift_left_rotate($arr[$i]);\n }\n }\n\n return $arr;\n }",
"public function incrTurnsLeft($increment) {\n $this->setTurnsLeft($this->getTurnsLeft() + $increment);\n }",
"public function rotateLeft();",
"function shift();",
"function left_rotate3($string){\n\t$arr_string = str_split($string);\n\t$tmp_arr = array();\n\t$num = count($arr_string);\n\tfor(;$num > 0; $num--){\n\t\t$tmp_arr[] = array_pop($arr_string);\n\t}\n\t$rotate_string = implode($tmp_arr);\n\treturn $rotate_string;\n}",
"private function leftShift32($number, $steps) {\n\t\t// convert to binary (string)\n\t\t$binary = decbin($number);\n\t\t// left-pad with 0's if necessary\n\t\t$binary = str_pad($binary, 32, \"0\", STR_PAD_LEFT);\n\t\t// left shift manually\n\t\t$binary = $binary.str_repeat(\"0\", $steps);\n\t\t// get the last 32 bits\n\t\t$binary = substr($binary, strlen($binary) - 32);\n\t\t// if it's a positive number return it\n\t\t// otherwise return the 2's complement\n\t\treturn ($binary{0} == \"0\" ? bindec($binary) :\n\t\t-(pow(2, 31) - bindec(substr($binary, 1))));\n\t}",
"function removeSMOC($r1, $r2, $r3)\n{\n\tif($r1 == 11) { $r1++; $r2++; $r3++; }\n\tif($r2 == 11) { $r2++; $r3++; }\n\tif($r3 == 11) $r3++;\n\treturn array($r1, $r2, $r3);\n}",
"public function shift();",
"public function shift();",
"function rotate(array &$items)\r\n{\r\n $itemCount = count($items);\r\n if($itemCount < 3) {\r\n return;\r\n }\r\n $lastIndex = $itemCount - 1;\r\n $factor = (int) ($itemCount % 2 === 0 ? $itemCount / 2 : ($itemCount / 2) + 1);\r\n $topRightIndex = $factor - 1;\r\n $topRightItem = $items[$topRightIndex];\r\n $bottomLeftIndex = $factor;\r\n $bottomLeftItem = $items[$bottomLeftIndex];\r\n for($i = $topRightIndex; $i > 0; $i -= 1) {\r\n $items[$i] = $items[$i - 1];\r\n }\r\n for($i = $bottomLeftIndex; $i < $lastIndex; $i += 1) {\r\n $items[$i] = $items[$i + 1];\r\n }\r\n $items[1] = $bottomLeftItem;\r\n $items[$lastIndex] = $topRightItem;\r\n}",
"function rotate(array &$items)\r\n{\r\n $itemCount = count($items);\r\n if($itemCount < 3) {\r\n return;\r\n }\r\n $lastIndex = $itemCount - 1;\r\n $factor = (int) ($itemCount % 2 === 0 ? $itemCount / 2 : ($itemCount / 2) + 1);\r\n $topRightIndex = $factor - 1;\r\n $topRightItem = $items[$topRightIndex];\r\n $bottomLeftIndex = $factor;\r\n $bottomLeftItem = $items[$bottomLeftIndex];\r\n for($i = $topRightIndex; $i > 0; $i -= 1) {\r\n $items[$i] = $items[$i - 1];\r\n }\r\n for($i = $bottomLeftIndex; $i < $lastIndex; $i += 1) {\r\n $items[$i] = $items[$i + 1];\r\n }\r\n $items[1] = $bottomLeftItem;\r\n $items[$lastIndex] = $topRightItem;\r\n}",
"function rotLeft64($lane, $biShift) \n \t{\t\t\n\t$byShift = floor($biShift/8);\t\t\n\t$lane = substr($lane,-$byShift).substr($lane,0,-$byShift);\t\t\n\t$biShift %= 8;\t\t\n\t$carry = 0;\n\tfor ($i = 0; $i < 8; $i++) \n\t\t{\t\t\n\t\t$temp = ord($lane[$i]) << $biShift;\n\t\t$lane[$i] = chr($temp & 0xff | $carry);\n\t\t$carry = $temp >> 8;\t\t\n\t\t}\t\n\t$lane[0] = chr(ord($lane[0]) | $carry);\t\n\treturn $lane;\t\t\n\t}",
"function isLeft($a, $b, $c) {\n return area2($a, $b, $c) > 0;\n}",
"public static function leftShift32($x, $y) {\n $n = $x << $y;\n if (PHP_INT_MAX != 0x80000000) {\n $n = -(~($n & 0x00000000FFFFFFFF) + 1);\n } return (int)$n;\n }",
"private static function ShiftLeft( int|string|\\GMP $x, int $n ) : \\GMP\n\t{\n\t\treturn gmp_mul( $x, gmp_pow( 2, $n ) );\n\t}",
"function num1BitsThirdSolution($number)\n{\n if ($number <= 0) {\n return 0;\n }\n\n for ($c = 0; $number; $c++) {\n $number &= $number - 1;\n }\n\n return $c;\n}",
"private function getShift()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n if ($this->currentPage < 3 || $this->currentPage >= $all_pages - 1) {\n $shift = 3;\n } else {\n $shift = 1;\n }\n return $shift;\n }",
"public function triangleCreate($x1, $y1, $x2, $y2, $x3, $y3){\n\n $this->createLine($x1, $y1, $x2, $y2); \n $this->createLine($x2, $y2, $x3, $y3); \n $this->createLine($x1, $y1, $x3, $y3);\n }",
"function add3($par1, $par2, $par3) {\n\t\t\t\t/*echo \"<br>\" . $par1 . \" \" . $par2 . \" = \" . $par3;*/\n\t\t\t\techo \"<br> $par1 $par2 = $par3\";\n\t\t\t}",
"public function translate($shiftX, $shiftY) {}",
"public function translate($shiftX, $shiftY) {}",
"public function translate($shiftX, $shiftY) {}",
"public function shift($position, $shiftAmount) {\n\n }",
"public function shift()\n {\n \n }",
"function shift($steps){\n\t\treturn new Color(\n\t\t\tself::contain($this->a + $steps), \n\t\t\tself::contain($this->b + $steps), \n\t\t\tself::contain($this->c + $steps)\n\t\t);\n\t}",
"function separate_every_three_chars_left_to_right($string){\n\t\t\n\t\t//To get the string length\n\t\t$string_length\t= strlen($string);\n\t\t$string_length++;\n\t\t//The string to return\n\t\t$string_final\t= '';\n\t\t//The position in the loop (incrementing with 3 every time)\n\t\t$string_local_position\t= '0';\n\t\t\n\t\twhile($string_length>0){\n\t\t\t\n\t\t\t$string_final\t.=substr($string, $string_local_position, 3).' ';\n\t\t\t\n\t\t\t$string_local_position\t= $string_local_position +3;\n\t\t\t$string_length \t\t\t= $string_length-3;\n\t\t\t\n\t\t}//End while\n\t\t\n\t\treturn $string_final;\n\t}",
"public function setC3($C3)\r\n {\r\n $this->C3 = $C3;\r\n\r\n return $this;\r\n }",
"public function step_3()\n {\n }",
"public function testMiddleKey3()\n {\n $this->setExpectedException('PHPUnit_Framework_Error_Warning');\n\n $key = str_repeat('z', 20);\n $iv = str_repeat('z', 16);\n\n $plaintext = 'a';\n\n phpseclib_mcrypt_encrypt('rijndael-128', $key, $plaintext, 'cbc', $iv);\n }",
"function multiply($p1, $p2, $p3)\n{\n return $p1 * $p2 + $p3;\n}",
"private function getRightShift()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n if ($this->currentPage >= $all_pages - 1) {\n $shift = 3;\n } else {\n $shift = 1;\n }\n return $shift;\n }",
"function getLeft() ;",
"protected function installStep3()\n {\n $this->upgrade2005010Step2();\n }",
"abstract public function moveLeft($id);",
"public function setLigthsLeftFrontTurn($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 case 23 : // Fisura\n return 10;\n break;\n case 24 : // Picado\n return 10;\n break;\n }\n }",
"protected function parse_threeLSS_fun()\n {\n $this->check_param_num(3);\n\n $this->generate_instruction();\n\n $this->get_token();\n $this->check_label();\n $this->generate_arg(\"1\", \"label\");\n\n $this->get_token();\n $result = $this->check_symb();\n $this->generate_symb($result, \"2\");\n\n $this->get_token();\n $result = $this->check_symb();\n $this->generate_symb($result, \"3\");\n\n $this->xml->endElement();\n }",
"function gen_one_to_three() {\n for ($i = 1; $i <= 3; $i++) {\n //注意变量$i的值在不同的yield之间是保持传递的。\n yield $i;\n }\n}",
"public function move($left, $right){\n\t\t$left = ($left < 256) ? $left : 255;\n\t\t$left = ($left >= 0) ? $left : 0;\n\t\t$right = ($right < 256) ? $right : 255;\n\t\t$right = ($right >= 0) ? $right : 0;\n\t\treturn $this->_sendPacketToController(self::MOVE, pack('CC', $left, $right));\n\t}",
"function State_3($parameters) {\n\t\trequire_once(CUSTOMER_LIB.\"/ach_returns_dfa.php\");\n\t\tif(isset($parameters->server) && is_a($parameters->server, \"Server\"))\n\t\t{\n\t\t\tif (!isset($dfas['ach_returns'])) {\n\t\t\t\t$dfa = new ReschedulingDFA($parameters->server);\n\t\t\t\t$dfa->SetLog($parameters->log);\n\t\t\t\t$dfas['ach_returns'] = $dfa;\n\t\t\t} else {\n\t\t\t\t$dfa = $dfas['ach_returns'];\n\t\t\t}\n\n\t\t\t$dfa->run($parameters);\n\t\t} else {\n\t\t\tthrow new Exception(\"Server object not passed to FailureDFA! This is required for the ACH Reschuling DFA!\");\n\t\t}\n\n\t}",
"function _rshift($integer, $n) {\r\n if (0xffffffff < $integer || -0xffffffff > $integer) {\r\n $integer = fmod($integer, 0xffffffff + 1);\r\n }\r\n\r\n // convert to unsigned integer\r\n if (0x7fffffff < $integer) {\r\n $integer -= 0xffffffff + 1.0;\r\n } elseif (-0x80000000 > $integer) {\r\n $integer += 0xffffffff + 1.0;\r\n }\r\n\r\n // do right shift\r\n if (0 > $integer) {\r\n $integer &= 0x7fffffff; // remove sign bit before shift\r\n $integer >>= $n; // right shift\r\n $integer |= 1 << (31 - $n); // set shifted sign bit\r\n } else {\r\n $integer >>= $n; // use normal right shift\r\n }\r\n\r\n return $integer;\r\n }",
"public function cosTheoremForAngle($side1, $side2, $side3)\n {\n //returns cos\n return $angleCos = (-pow($side1, 2) +\n (pow($side2, 2) + pow($side3, 2)))/\n (2*$side2*$side3);\n }",
"public function testWalkCompositeExpression_three()\n {\n // (\"foo\" == \"bar\" AND bar = \"foo\") AND \"bar\" > $foo\n\n // NOTE: I wonder if we should just now allow composites of more than two\n $expr = $this->expr->andx(\n $this->expr->eq('foo', 'bar'),\n $this->expr->eq('bar', 'foo'),\n $this->expr->gt('bar', 'foo')\n );\n\n $res = $this->visitor->walkCompositeExpression($expr);\n $this->assertInstanceOf('PHPCR\\Query\\QOM\\AndInterface', $res);\n $this->assertInstanceOf('PHPCR\\Query\\QOM\\AndInterface', $res->getConstraint1());\n $this->assertInstanceOf('PHPCR\\Query\\QOM\\ComparisonInterface', $res->getConstraint2());\n }",
"function cubeIt($val) { \n return $val*$val*$val;\n }",
"function _casetravel($previousloc_X, $previousloc_Z, $previousaisle_X, $previousaisle_Z, $currentaisle_X, $currentaisle_Z, $FIRSTLOC_X, $FIRSTLOC_Z) {\n\n $outeraisle = abs($previousloc_X - $previousaisle_X) + abs($previousloc_Z - $previousaisle_Z); //previous last location to previous parking spot\n $outeraisle += abs($previousaisle_X - $currentaisle_X) + abs($previousaisle_Z - $currentaisle_Z); //previous parking spot to current parking spot\n $outeraisle += abs($currentaisle_X - $FIRSTLOC_X) + abs($currentaisle_Z - $FIRSTLOC_Z);\n\n return $outeraisle;\n}",
"function warp1($c)\n{\n if($c > 10.3148)\n {\n return pow((561 + 40*$c)/10761, 2.4);\n }\n else\n {\n return $c / 3294.6;\n }\n}",
"function newpop3()\n\t{\n\t\tif (get_option('is_on_pop3_buy')=='0') return new ocp_tempcode();\n\n\t\t$title=get_page_title('TITLE_NEWPOP3');\n\n\t\tpointstore_handle_error_already_has('pop3');\n\n\t\t// What addresses are there?\n\t\t$member_id=get_member();\n\t\t$pointsleft=available_points($member_id); // the number of points this member has left\n\t\t$list=get_mail_domains('pop3_',$pointsleft);\n\t\tif ($list->is_empty())\n\t\t{\n\t\t\treturn warn_screen($title,do_lang_tempcode('NO_POP3S'));\n\t\t}\n\n\t\t// Build up fields\n\t\t$fields=new ocp_tempcode();\n\t\trequire_code('form_templates');\n\t\t$fields->attach(form_input_line(do_lang_tempcode('ADDRESS_DESIRED_STUB'),'','email-prefix',$GLOBALS['FORUM_DRIVER']->get_username(get_member()),true));\n\t\t$fields->attach(form_input_list(do_lang_tempcode('ADDRESS_DESIRED_DOMAIN'),'','esuffix',$list));\n\t\t$fields->attach(form_input_password(do_lang_tempcode('PASSWORD'),'','pass1',true));\n\t\t$fields->attach(form_input_password(do_lang_tempcode('CONFIRM_PASSWORD'),'','pass2',true));\n\n\t\t$javascript=\"\n\t\t\tvar form=document.getElementById('pass1').form;\n\t\t\tform.old_submit=form.onsubmit;\n\t\t\tform.onsubmit=function()\n\t\t\t\t{\n\t\t\t\t\tif ((form.elements['pass1'].value!=form.elements['pass2'].value))\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.fauxmodal_alert('\".php_addslashes(do_lang('PASSWORD_MISMATCH')).\"');\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof form.old_submit!='undefined' && form.old_submit) return form.old_submit();\n\t\t\t\t\treturn true;\n\t\t\t\t};\n\t\t\";\n\n\t\t// Return template\n\t\t$newpop_url=build_url(array('page'=>'_SELF','type'=>'_newpop3','id'=>'pop3'),'_SELF');\n\t\treturn do_template('FORM_SCREEN',array('_GUID'=>'addf1563770845ba5fe4aaf2e60ca6fc','JAVASCRIPT'=>$javascript,'HIDDEN'=>'','TITLE'=>$title,'TEXT'=>paragraph(do_lang_tempcode('ADDRESSES_ABOUT')),'URL'=>$newpop_url,'SUBMIT_NAME'=>do_lang_tempcode('PURCHASE'),'FIELDS'=>$fields));\n\t}",
"public function setCodeRef3($codeRef3) {\n $this->codeRef3 = $codeRef3;\n return $this;\n }",
"public function incrItemsLeft($increment) {\n $this->setItemsLeft($this->getItemsLeft() + $increment);\n }",
"function getNext3($PID, $rank)\n{\n\t// Build next 3 ranks\n\t$first = $rank + 1;\n\t$second = $rank + 2;\n\t$third = $rank + 3;\n\t\n\t// First we need to make sure that none of next 3 ranks are 1SG or SGM\n\tif($first == 8 || $first == 10)\n\t{\n\t\t$first++; // Increment\n\t\t$second++; // Increment\n\t\t$third++; // Increment\n\t}\n\tif($second == 8 || $second == 10)\n\t{\n\t\t$second++; // Increment\n\t\t$third++; // Increment\n\t}\n\tif($third == 8 || $third == 10)\t\t$third++; // Increment\n\t\n\t// if -> NEXT <- rank is MSG, or MGYSGT\n\tif($first == 7 || $first == 9)\n\t{\n\t\t// Check to see if the player gets 1SG or SGM\n\t\t$award_check = checkReqs($first, $PID);\n\t\t\n\t\t// If a true return return, add 1 to the cuurent rank to make it 1SG or SGM\n\t\tif($award_check == TRUE)\n\t\t{\n\t\t\tswitch($first)\n\t\t\t{\n\t\t\t\tcase 7:\n\t\t\t\t\t$first = 8;\n\t\t\t\t\t$second = 9; \n\t\t\t\t\t$third = 12;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 9:\n\t\t\t\t\t$first = 10;\n\t\t\t\t\t$second = 12;\n\t\t\t\t\t$third = 13;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 1SG or SGM is a no go\n\t\telse\n\t\t{\t\n\t\t\tswitch($first)\n\t\t\t{\n\t\t\t\tcase 7:\n\t\t\t\t\t$second = 9; \n\t\t\t\t\t$third = 12;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 9:\n\t\t\t\t\t$second = 12;\n\t\t\t\t\t$third = 13;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Check the -> NEXT NeXT <-rank for MSG or MGYSGT\n\tif($second == 7 || $second == 9)\n\t{\n\t\t// Check to see if the player gets 1SG or SGM\n\t\t$award_check = checkReqs($second, $PID);\n\t\t\n\t\t// If a true return return, add 1 to the cuurent rank to make it 1SG or SGM\n\t\tif($award_check == TRUE)\n\t\t{\n\t\t\t$second++; // 8 or 10\n\t\t\t\n\t\t\tswitch($second)\n\t\t\t{\n\t\t\t\tcase 8:\n\t\t\t\t\t$third = 9;\n\t\t\t\tbreak;\n\t\t\n\t\t\t\tcase 10:\n\t\t\t\t\t$third = 12; // 2nd Lieutenant\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Check the -> next next NEXT <- rank for MSG or MGYSGT\n\tif($third == 7 || $third == 9)\n\t{\n\t\t// Check to see if the player gets 1SG or SGM\n\t\t$award_check = checkReqs($third, $PID);\n\t\t\n\t\t// If a true return return, add 1 to the cuurent rank to make it 1SG or SGM\n\t\tif($award_check == TRUE)\n\t\t{\n\t\t\t$third++; // Increment\n\t\t}\n\t}\n\t\n\t// Just incase we got a rank 11 (SMOC), Remove itsince its not a promotable rank\n\t$return = removeSMOC($first, $second, $third);\n\t\n\t// Remove additional ranks\n\tforeach($return as $k => $v)\n\t{\n\t\tif($v > 21) unset($return[$k]);\n\t}\n\t\n\t// return the next 3 ranks\n\treturn $return;\n}",
"public function shiftNode();",
"protected function prepareThreeAlbumsWithMixedSharingAndPasswordProtection(): void\n\t{\n\t\t$this->albumID1 = $this->albums_tests->add(null, TestConstants::ALBUM_TITLE_1)->offsetGet('id');\n\t\t$this->albumID2 = $this->albums_tests->add(null, TestConstants::ALBUM_TITLE_2)->offsetGet('id');\n\t\t$this->albumID3 = $this->albums_tests->add(null, TestConstants::ALBUM_TITLE_3)->offsetGet('id');\n\t\t// The mis-order of photos by there title (N, T, M) is on purpose such that\n\t\t// we first receive the result (N, T) as long as album 3 is locked and\n\t\t// then (M, N, T) after album 3 has been unlocked, with album 3\n\t\t// being in the front position.\n\t\t$this->photoID1 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_NIGHT_IMAGE), $this->albumID1)->offsetGet('id');\n\t\t$this->photoID2 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_TRAIN_IMAGE), $this->albumID2)->offsetGet('id');\n\t\t$this->photoID3 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_MONGOLIA_IMAGE), $this->albumID3)->offsetGet('id');\n\t\t$this->sharing_tests->add([$this->albumID1, $this->albumID2], [$this->userID]);\n\t\t// Sic! We use the same password for both albums here, because we want\n\t\t// to ensure that incidentally \"unlocking\" an album which is also\n\t\t// shared has no negative side effect.\n\t\t$this->albums_tests->set_protection_policy(id: $this->albumID2, is_nsfw: true, password: TestConstants::ALBUM_PWD_1);\n\t\t$this->albums_tests->set_protection_policy(id: $this->albumID3, is_nsfw: true, password: TestConstants::ALBUM_PWD_1);\n\n\t\tAuth::logout();\n\t\tSession::flush();\n\t\t$this->clearCachedSmartAlbums();\n\t\t$this->performPostPreparatorySteps();\n\t}",
"public function testThreeTurns(){\n\t\t$this->assertEquals($this->game->score(array(1,2), array(3,4), array()),10);\n\t\t$this->assertEquals($this->game->score(array(1,2), array(3,4), array(2,2)),14);\n\t}",
"function next_mp3_frame($data, $index){\n\n // A - frame sync\n if( ord($data[$index]) !== 255) {\n trigger_error('Func: next_mp3_frame. A1 err: '.ord($data[0]).' U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n }\n\n $b2 = ord($data[$index+1]);\n $check = 128+64+32;\n if( ($b2 & $check ) !== $check ) {\n trigger_error('Func: next_mp3_frame. A2 err: '.$b2.' U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n }\n\n // B\n $ver = ($b2 >> 3) & 3;\n\n switch($ver) {\n case 0:\n trigger_error('Func: next_mp3_frame. B err: ver: MPEG Version 2.5. U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n break;\n case 1:\n trigger_error('Func: next_mp3_frame. B err: ver: reserved. U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n break;\n case 2:\n trigger_error('Func: next_mp3_frame. B err: ver: MPEG Version 2 (ISO/IEC 13818-3). U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n break;\n case 3:\n break;\n default:\n trigger_error('Func: next_mp3_frame. B err: non ver type. U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n break;\n }\n\n // C\n $lay = ($b2 >> 1) & 3;\n\n switch($lay) {\n case 0:\n trigger_error('Func: next_mp3_frame. C err: lay: reserved. U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n break;\n case 1:\n break;\n case 2:\n trigger_error('Func: next_mp3_frame. C err: ver: Layer II. U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n break;\n case 3:\n trigger_error('Func: next_mp3_frame. C err: ver: Layer I. U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n break;\n default:\n trigger_error('Func: next_mp3_frame. C err: non lay type. U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n break;\n }\n\n // D\n $prot = $b2 & 1;\n\n // E\n $b3 = ord($data[$index+2]);\n $bitRate = ($b3 >> 4) & 15;\n\n switch($bitRate) {\n case 1:\n $bitRate = 32000;\n break;\n case 2:\n $bitRate = 40000;\n break;\n case 3:\n $bitRate = 48000;\n break;\n case 4:\n $bitRate = 56000;\n break;\n case 5:\n $bitRate = 64000;\n break;\n case 6:\n $bitRate = 80000;\n break;\n case 7:\n $bitRate = 96000;\n break;\n case 8:\n $bitRate = 112000;\n break;\n case 9:\n $bitRate = 128000;\n break;\n case 10:\n $bitRate = 160000;\n break;\n case 11:\n $bitRate = 192000;\n break;\n case 12:\n $bitRate = 224000;\n break;\n case 13:\n $bitRate = 256000;\n break;\n case 14:\n $bitRate = 320000;\n break;\n case 15:\n trigger_error('Func: next_mp3_frame. E err: bitrate: bad. U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n default:\n trigger_error('Func: next_mp3_frame. E err: bitrate: wrong. U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n }\n\n // F\n $sampleRate = ($b3 >> 2) & 3;\n\n switch($sampleRate) {\n case 0:\n $sampleRate = 44100;\n break;\n case 1:\n $sampleRate = 48000;\n break;\n case 2:\n $sampleRate = 32000;\n break;\n case 3:\n trigger_error('Func: next_mp3_frame. F err: smpRate: reserved. U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n default:\n trigger_error('Func: next_mp3_frame. F err: smpRate: wrong. U_ID: '.$_SESSION['user_id'], E_USER_ERROR);\n die();\n }\n\n // G\n $padding = ($b3 >> 1) & 1;\n\n // H - private bit\n\n // I - Channel mode\n\n // J - mode extension (only if joint stereo)\n\n // K - copyright\n\n // L - original\n\n // M - emphasis\n\n // calculate length\n\n $frameLen = intval(144*$bitRate/$sampleRate + $padding);\n\n return $frameLen;\n}",
"public function example3()\n {\n if ($a == $b) {\n if ($a1 == $b1) {\n fiddle();\n } else {\n if ($a2 == $b2) {\n fiddle();\n } else {\n fiddle();\n }\n }\n } else {\n if ($c == $d) {\n while ($c == $d) {\n fiddle();\n }\n } else {\n if ($e == $f) {\n for ($n = 0; $n < $h; $n++) {\n fiddle();\n }\n } else {\n switch ($z) {\n case 1:\n fiddle();\n break;\n case 2:\n fiddle();\n break;\n case 3:\n fiddle();\n break;\n default:\n fiddle();\n break;\n }\n }\n }\n }\n\n if ($a == $b) {\n if ($a1 == $b1) {\n fiddle();\n } else {\n if ($a2 == $b2) {\n fiddle();\n } else {\n fiddle();\n }\n }\n } else {\n if ($c == $d) {\n while ($c == $d) {\n fiddle();\n }\n } else {\n if ($e == $f) {\n for ($n = 0; $n < $h; $n++) {\n fiddle();\n }\n } else {\n switch ($z) {\n case 1:\n fiddle();\n break;\n case 2:\n fiddle();\n break;\n case 3:\n fiddle();\n break;\n default:\n fiddle();\n break;\n }\n }\n }\n }\n\n // Just to make sure the class method is very long\n abc();\n xyz();\n\n abc();\n xyz();\n abc();\n xyz();\n abc();\n xyz();\n }",
"function gx($Z, $X, $W, $K)\n{\n\n $X = $K - $X;\n $X = $X + $Z;\n\n if ($W >= 0) {\n return $X;\n }\n $Z = $W - 1;\n $W = $Z - 1;\n\n\n gx($K, $X, $W, $Z);\n}",
"public function setCcmp3($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->ccmp3 !== $v) {\n $this->ccmp3 = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_CCMP3] = true;\n }\n\n return $this;\n }",
"function bcpowmod($left_operand, $right_operand, $modulus, $scale = false)\n{\n}",
"function calculateLeftPosition(array $prevItem, $margin = 0)\n{\n $left = $prevItem['left'] + $prevItem['width'] + $margin;\n return $left + 1;\n}",
"public function multiplyBy3($value)\n {\n return $value * 3;\n }",
"function nCrModp($n, $r, $p)\n{\n \n// Optimization for the cases when r is large\nif ($r > $n - $r)\n $r = $n - $r;\n \n// The array C is going\n// to store last row of\n// pascal triangle at\n// the end. And last entry\n// of last row is nCr\n$C = array();\n \nfor( $i = 0; $i < $r + 1; $i++)\n $C[$i] = 0;\n \n// Top row of Pascal\n// Triangle\n$C[0] = 1;\n \n// One by constructs remaining\n// rows of Pascal Triangle from\n// top to bottom\nfor ($i = 1; $i <= $n; $i++)\n{\n \n // Fill entries of current\n // row using previous row values\n for ($j = Min($i, $r); $j > 0; $j--)\n \n // nCj = (n-1)Cj + (n-1)C(j-1);\n $C[$j] = ($C[$j] +\n $C[$j - 1]) % $p;\n}\n \nreturn $C[$r];\n}",
"public function setCodeRef3(?string $codeRef3): CriteresClient {\n $this->codeRef3 = $codeRef3;\n return $this;\n }",
"public function moveLeft() : Tetris {\n // check if the block can be moved to the left\n if ($this->block->canMove('left')) {\n // move the block to the left\n $this->block->setX($this->block->getX() - 1);\n }\n\n // return the game for chained method calling\n return $this;\n }",
"function separate_every_three_chars_right_to_left($string){\n\t\t\n\t\t$string_final = number_format($string, 0, '.', ' ');\n\t\t$string_final = str_replace(',', ' ', $string_final);\n\t\t\n\t\treturn $string_final;\n\t}",
"public function pushInt32($int32)\n {\n $mask = 0xff;\n for ($i = 0; $i < 4; $i++) {\n $this->pushByte(($int32 >> ((3 - $i) * 8)) & $mask);\n }\n }",
"function build_bitwise_swap($profilefieldid, $loc1, $loc2)\n{\n\n\tglobal $vbulletin;\n\n\t$loc1value = pow(2, $loc1 - 1);\n\t$loc2value = pow(2, $loc2 - 1);\n\n\t// Zero loc1 in temp field\n\t$vbulletin->db->query_write(\"\n\t\tUPDATE \" . TABLE_PREFIX . \"userfield\n\t\tSET temp = temp - $loc1value\n\t\tWHERE temp & $loc1value\n\t\");\n\t// Copy loc2 to loc1\n\t$vbulletin->db->query_write(\"\n\t\tUPDATE \" . TABLE_PREFIX . \"userfield\n\t\tSET temp = temp + $loc1value\n\t\tWHERE temp & $loc2value\n\t\");\n\t// Zero loc2 in temp field\n\t$vbulletin->db->query_write(\"\n\t\tUPDATE \" . TABLE_PREFIX . \"userfield\n\t\tSET temp = temp - $loc2value\n\t\tWHERE temp & $loc2value\n\t\");\n\t// Copy loc1 from perm field to loc2 temp field\n\t$vbulletin->db->query_write(\"\n\t\tUPDATE \" . TABLE_PREFIX . \"userfield\n\t\tSET temp = temp + $loc2value\n\t\tWHERE field$profilefieldid & $loc1value\n\t\");\n\n}",
"protected function parse_threeVSS_fun()\n {\n $this->check_param_num(3);\n\n $this->generate_instruction();\n\n $this->get_token();\n $this->check_var();\n $this->generate_arg(\"1\", \"var\");\n\n $this->get_token();\n $result = $this->check_symb();\n $this->generate_symb($result, \"2\");\n\n $this->get_token();\n $result = $this->check_symb();\n $this->generate_symb($result, \"3\");\n\n $this->xml->endElement();\n }",
"public function roll($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"public static function c32to8bit($arr32) {\n for($i=0; $i<sizeof($arr32); $i++) {\n for ($bitOrder=$i*4; $bitOrder<=$i*4+3; $bitOrder++) {\n $arr8[$bitOrder] = $arr32[$i] & 255;\n $arr32[$i] = self::unsignedRightShift($arr32[$i], 8); }\n } return $arr8;\n }",
"protected function prepareThreePhotosInPublicAlbum(): void\n\t{\n\t\t$this->albumID1 = $this->albums_tests->add(null, TestConstants::ALBUM_TITLE_1)->offsetGet('id');\n\t\t$this->photoID1 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_TRAIN_IMAGE), $this->albumID1)->offsetGet('id');\n\t\t$this->photoID2 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_MONGOLIA_IMAGE), $this->albumID1)->offsetGet('id');\n\t\t$this->photoID3 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_SUNSET_IMAGE), $this->albumID1)->offsetGet('id');\n\t\t$this->albums_tests->set_protection_policy($this->albumID1);\n\t\t$this->photos_tests->set_star([$this->photoID1], true);\n\t\tAuth::logout();\n\t\tSession::flush();\n\t\t$this->clearCachedSmartAlbums();\n\t\t$this->performPostPreparatorySteps();\n\t}",
"protected function lockAcquire($keys)\n {\n $strlenLockPrefix = \\strlen($this->lockPrefix);\n $keys = (array) $keys;\n $values = array();\n foreach ($keys as $key) {\n $values[$this->lockPrefix.$key] = null;\n }\n // there's no point in locking longer than max allowed execution time\n // for this script\n $ttl = \\ini_get('max_execution_time');\n // lock these keys, then compile a list of successfully locked keys\n // (using the returned failure array)\n $result = (array) $this->apcAdd($values, null, $ttl);\n $failed = array();\n foreach ($result as $key => $err) {\n $failed[] = \\substr($key, $strlenLockPrefix);\n }\n return \\array_diff($keys, $failed);\n }",
"public function testAddGetLeft($item)\n {\n self::$obj->addLeft($item);\n $this->assertSame($item, self::$obj->getLeft(-1), 'addLeft() and getLeft() do not modify the same property');\n }",
"function shift ()\n {\n return array_shift ($this->A);\n }",
"public function stdWrap_wrap3($content = '', $conf = [])\n {\n return $this->wrap($content, $conf['wrap3'], $conf['wrap3.']['splitChar'] ? $conf['wrap3.']['splitChar'] : '|');\n }",
"private function getThirdOrderWithPhase()\n {\n $phase = new Phase();\n $phase->ottp = static::ORDER_3_PHASE_1;\n\n $command = $this->getThirdCommand();\n $command->phases = [$phase];\n\n return $command;\n }",
"public function rshift()\n {\n $out = clone $this;\n for ($j = $this->count() - 1; $j > 0; --$j) {\n $out[$j] = (($out[$j - 1] & 1) << 7) | ($out[$j] >> 1);\n }\n $out[0] >>= 1;\n return $out;\n }",
"public function pass_3()\n\t{\n\t\t$tokens = token_get_all($this->source[$this->last_pass]);\n\t\t$token_count = count($tokens);\n\t\t$tp = 0;\n\t\t$tokens_of_interest = array('T_IF','T_FOR','T_FOREACH','T_ELSE','T_ELSEIF','T_WHILE','T_DO');\n\t\twhile($tp < $token_count) {\n\t\t\t$ct = $tokens[$tp];\n\t\t\tif(in_array($this->token_name($ct), $tokens_of_interest )){\n\t\t\t\twhile(in_array($token_name = $this->token_name($ct), $tokens_of_interest )) {\n\t\t\t\t\t$temp = $this->get_next_non_comment($tokens,$tp+1);\n\t\t\t\t\tif($this->token_name($tokens[$temp]) == '(') {\n\t\t\t\t\t\t$temp = $this->get_pair($tokens,$temp);\n\t\t\t\t\t\t$next = $this->get_next_non_comment($tokens,$temp+1);\n\t\t\t\t\t} else \n\t\t\t\t\t\t$next = $temp;\n\t\t\t\t\t$ct = $tokens[$next];\n\t\t\t\t\tif(!in_array($this->token_name($tokens[$next]), array('{',':',';'))) {\n\t\t\t\t\t\t$this->add_tokens_to_be_inserted_after($next,'{');\n\t\t\t\t\t\tif($token_name == 'T_IF') \n\t\t\t\t\t\t\t$this->add_tokens_to_be_inserted_after($this->get_if_end($tokens,$tp)+1,'}');\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$this->add_tokens_to_be_inserted_after($this->get_statement_end($tokens,$next)+1,'}');\n\n\t\t\t\t\t}\n\t\t\t\t\t$tp = $next;\n\t\t\t\t}\n\t\t\t} \n\t\t\t$tp++;\n\t\t}\n\t\t$this->source[$this->current_pass] = $this->change_stuff() ;\n\t}",
"protected function _rshift($integer, $n)\n\t{\n if (0xffffffff < $integer || -0xffffffff > $integer)\n\t\t{\n $integer = fmod($integer, 0xffffffff + 1);\n }\n\n // convert to unsigned integer\n if (0x7fffffff < $integer)\n\t\t{\n $integer -= 0xffffffff + 1.0;\n } elseif (-0x80000000 > $integer)\n\t\t{\n $integer += 0xffffffff + 1.0;\n }\n\n // do right shift\n if (0 > $integer)\n\t\t{\n $integer &= 0x7fffffff; // remove sign bit before shift\n $integer >>= $n; // right shift\n $integer |= 1 << (31 - $n); // set shifted sign bit\n }\n\t\telse\n\t\t{\n $integer >>= $n; // use normal right shift\n }\n\n return $integer;\n }",
"public function setTradeStyle3($tradeStyle3)\n {\n $this->tradeStyle3 = $tradeStyle3;\n return $this;\n }",
"function _wpsc_action_merchant_v3_before_shopping_cart() {\n\t// likely that the theme depends on api v2's $wpsc_gateways loop object\n\tif ( _wpsc_is_merchant_v2_active() ) {\n\t\tadd_filter(\n\t\t\t'wpsc_merchant_v2_gateway_loop_items',\n\t\t\t'_wpsc_filter_merchant_v3_gateway_loop_items'\n\t\t);\n\n\t\treturn;\n\t}\n\n\tadd_filter(\n\t\t'wpsc_get_gateway_list',\n\t\t'_wpsc_filter_merchant_v3_get_gateway_list'\n\t);\n\n\tadd_filter(\n\t\t'wpsc_gateway_count',\n\t\t'_wpsc_filter_merchant_v3_gateway_count'\n\t);\n}",
"function test_with_retries() {\n $retries = 3;\n while ($retries--) {\n if ($retries !== 0) {\n echo \"Retrying\\n\";\n }\n }\n}",
"function fetchThree() {\n // inner SELECT takes all, but only returns the first three in reverse order; outer SELECT then reorder those three in ascending order\n $query='SELECT * FROM \n (SELECT * FROM ads ORDER BY id DESC LIMIT 0 , 3) \n ORDER BY id ASC';\n $stmt=$dbc->query($query);\n }",
"function unsigned_shift_r($a, $b) {\n $z = 0x80000000;\n if ($z & $a) {\n $a = ($a >> 1);\n $a &= (~$z);\n $a |= 0x40000000;\n $a = ($a >> ($b - 1));\n } else {\n $a = ($a >> $b);\n }\n return $a;\n }",
"function armstrong_number(int $num){\n $temp = $num; // store the number in a temporary variable\n $result = 0; // variable to store the result\n\n // loop till the the temporary variable is not equal to zero\n while($temp != 0){\n $remainder = $temp%10; // get the remainder of temp variable divided by 10\n $result = $result + $remainder*$remainder*$remainder; // add the result with cube of the remainder\n\n $temp = $temp/10; // change the temp variable by dividing it by 10\n }\n\n return $result; // return result\n }",
"public function setThirdNaics($thirdNaics)\n {\n $this->thirdNaics = $thirdNaics;\n return $this;\n }",
"function encrypt($password,$code_1,$code_2,$dateandtime){\n\t\n\t$pass_length=strlen($password);\n\n\t$rotate_mag=3;\n\n\t\t$rotated_password=$password; //No Rotation\n\n\n\n//\t$rotated_password=substr($password,$rotate_mag).substr($password,0,$rotate_mag);\n\n\t\n\n\t//$code=$code_1.$code_2;\n\n\t$dateandtime_for_encrypt=$code_1.$dateandtime.$code_2;\n\t\t\n\t$password='';\n\t\t\n\t\tfor($i=0;$i<=strlen($rotated_password)-1;$i++){\t\n\t\t\t\n\t\t\tif(($i!=strlen($rotated_password)-1)){\n\t\t\t\t$password.=ord($rotated_password[$i])*ord($dateandtime_for_encrypt[$i]).\" \";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$password.=ord($rotated_password[$i])*ord($dateandtime_for_encrypt[$i]);//FOR THE LAST ONE\t\t\t\n\t\t\t}\t\n\t\t}\n\t\t\nreturn $password;\n}",
"function _newpop3()\n\t{\n\t\tif (get_option('is_on_pop3_buy')=='0') return new ocp_tempcode();\n\n\t\t$title=get_page_title('TITLE_NEWPOP3');\n\n\t\t// Getting User Information\n\t\t$member_id=get_member();\n\t\t$pointsleft=available_points($member_id);\n\n\t\t// So we don't need to call these big ugly names, again...\n\t\t$_suffix=post_param('esuffix');\n\t\t$prefix=post_param('email-prefix');\n\t\t$pass1=post_param('pass1');\n\t\t$pass2=post_param('pass2');\n\n\t\t// Which suffix have we chosen?\n\t\t$suffix='pop3_'.$_suffix;\n\n\t\t$_suffix_price=get_price($suffix);\n\t\t$points_after=$pointsleft-$_suffix_price;\n\n\t\tpointstore_handle_error_already_has('pop3');\n\n\t\tif (($points_after<0) && (!has_specific_permission(get_member(),'give_points_self')))\n\t\t{\n\t\t\treturn warn_screen($title,do_lang_tempcode('NOT_ENOUGH_POINTS',escape_html($_suffix)));\n\t\t}\n\n\t\t// Password checking (to see if both 'passwords' are the same)\n\t\tif ($pass1!=$pass2)\n\t\t{\n\t\t\treturn warn_screen($title,do_lang_tempcode('PASSWORD_MISMATCH'));\n\t\t}\n\n\t\t// Does the prefix contain valid characters?\n\t\trequire_code('type_validation');\n\t\tif (!is_valid_email_address($prefix.'@'.$_suffix))\n\t\t{\n\t\t\treturn warn_screen($title,do_lang_tempcode('INVALID_EMAIL_PREFIX'));\n\t\t}\n\n\t\tpointstore_handle_error_taken($prefix,$_suffix);\n\n\t\t// Return\n\t\t$proceed_url=build_url(array('page'=>'_SELF','type'=>'__newpop3','id'=>'pop3'),'_SELF');\n\t\t$keep=new ocp_tempcode();\n\t\t$keep->attach(form_input_hidden('prefix',$prefix));\n\t\t$keep->attach(form_input_hidden('suffix',$_suffix));\n\t\t$keep->attach(form_input_hidden('password',$pass1));\n\t\treturn do_template('POINTSTORE_CONFIRM_SCREEN',array('_GUID'=>'099ab9d87fb6e68d74de27e7d41d50c0','MESSAGE'=>paragraph($prefix.'@'.$_suffix),'TITLE'=>$title,'ACTION'=>do_lang_tempcode('TITLE_NEWPOP3'),'KEEP'=>$keep,'COST'=>integer_format($_suffix_price),'POINTS_AFTER'=>integer_format($points_after),'PROCEED_URL'=>$proceed_url,'CANCEL_URL'=>build_url(array('page'=>'_SELF'),'_SELF')));\n\t}",
"public function getRepeat3($aCode)\n {\n $result = [];\n for ($i = 0; $i < sizeof($aCode); $i++) {\n $result[$i] = $aCode[$i] . $aCode[$i] . $aCode[$i];\n }\n return $result;\n }",
"public function setThird($third = null)\n {\n // validation for constraint: string\n if (!is_null($third) && !is_string($third)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($third, true), gettype($third)), __LINE__);\n }\n if (is_null($third) || (is_array($third) && empty($third))) {\n unset($this->third);\n } else {\n $this->third = $third;\n }\n return $this;\n }",
"private function button3() {\n\t\tif ( $this->button_array['button3']['text'] ) {\n\t\t\t?>\n\t\t\tlastOpenedPointer.find('#pointer-primary').after('<a id=\"pointer-ternary\" style=\"float: left;\" class=\"button-secondary\">' +\n\t\t\t\t'<?php echo esc_attr( $this->button_array['button3']['text'] ); ?>' + '</a>');\n\t\t\tlastOpenedPointer.find('#pointer-ternary').click(function () {\n\t\t\t<?php echo $this->button_array['button3']['function']; ?>\n\t\t\t});\n\t\t<?php }\n\t}",
"public function bitwiseRightShift(int $shift);",
"public function html_buttons3($buttons)\n\t{\n\t\t$this->html_buttons3 = $buttons;\n\t\treturn $this;\n\t}",
"function _static3($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\n\t\tif ( !empty($options['ww_height'])) {\n\t\t\t$height = 'style=\"height:'.$options['ww_height'].'px;\"';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" <?php echo $height;?> class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"zn_slideshow\">\n <div class=\"container\">\n \t<div class=\"static-content video-style\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t// TITLE\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_title'] ) && !empty ( $options['ww_slide_title'] ) ) {\n\t\t\t\t\t\t\techo '<h3 class=\"centered\">'.do_shortcode($options['ww_slide_title']).'</h3>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// VIDEO\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_video'] ) && !empty ( $options['ww_slide_video'] ) ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"video_trigger_container\">';\n\t\t\t\t\t\t\t\techo '<a class=\"playVideo\" data-rel=\"prettyPhoto\" href=\"'.$options['ww_slide_video'].'\"></a>';\n\t\t\t\t\t\t\t\techo $options['ww_slide_video_text'];\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t?>\n </div><!-- end static-content -->\n </div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}",
"static private function addReedSolomonCW($nSolomonCW, $coeffTab, $nDataCW, &$dataTab, $blocks){\n $temp = 0;\n $errorBlocks = $nSolomonCW / $blocks;\n $correctionCW = array();\n\n for($k = 0; $k < $blocks; $k++) { \n for ($i=0; $i < $errorBlocks; $i++) $correctionCW[$i] = 0;\n \n for ($i=$k; $i<$nDataCW; $i+=$blocks){ \n $temp = self::champGaloisSum($dataTab[$i], $correctionCW[$errorBlocks-1]);\n for ($j=$errorBlocks-1; $j>=0; $j--){ \n if ( !$temp ) {\n $correctionCW[$j] = 0;\n } else { \n $correctionCW[$j] = self::champGaloisMult($temp, $coeffTab[$j]);\n }\n if ($j>0) $correctionCW[$j] = self::champGaloisSum($correctionCW[$j-1], $correctionCW[$j]);\n }\n }\n // Renversement des blocs calcules\n $j = $nDataCW + $k;\n for ($i=$errorBlocks-1; $i>=0; $i--){\n $dataTab[$j] = $correctionCW[$i];\n $j=$j+$blocks;\n }\n }\n return $dataTab;\n }",
"private function connect($r, $n1, $n2, $n3)\n {\n $room = $this->rooms[$r];\n $room->addNeighbor($this->rooms[$n1]);\n $room->addNeighbor($this->rooms[$n2]);\n $room->addNeighbor($this->rooms[$n3]);\n }",
"function third_factor($equation)\r\n{\r\n \r\n //remove q_factor\r\n $q = q_factor($equation);\r\n $q_factor = $q[0];\r\n $pos_q = $q[1];\r\n \r\n $pos = strpos($equation , \"^2\");\r\n \r\n $remove_str = $q_factor . $equation[$pos -1 ] .\"^2\";\r\n $equation2 = str_replace($remove_str , '' , $equation);\r\n \r\n //remove s_factor\r\n $s = s_factor($equation);\r\n $s_factor = $s[0];\r\n $pos_s = $s[1];\r\n \r\n \r\n \r\n $remove_str = $s_factor . $equation[$pos_s + 1] ;\r\n \r\n $equation3 = str_replace($remove_str , '' , $equation2);\r\n \r\n //equation3 will be like this x+10=0 so the third factor equal first number will see\r\n \r\n $third_factor = first_number($equation3);\r\n \r\n $pos = strpos($equation , $third_factor);\r\n \r\n if($pos == $pos_q)\r\n {\r\n $pos2 = strrpos($equation , $third_factor);\r\n if($pos2 == $pos_s)\r\n {\r\n //if he come here so the equation written like this 3x^2-3x+3=0\r\n //so we will reverse the string and get again the sign \r\n \r\n $rev_equation = strrev($equation1);\r\n $pos_sign_rev = strpos($rev_equation , $third_factor);\r\n $pos = strlen($equation) - ($pos_sign_rev + 1);\r\n }\r\n else\r\n {\r\n $pos = $pos2;\r\n }\r\n }\r\n else if($pos == $pos_s)\r\n {\r\n $pos2 = strrpos($equation , $third_factor);\r\n if($pos2 == $pos_q)\r\n {\r\n //if he come here so the equation written like this 3x-3x^2+3=0\r\n //so we will reverse the string and get again the sign \r\n $rev_equation = strrev($equation1);\r\n $pos_sign_rev = strpos($rev_equation , $third_factor);\r\n $pos_sign = strlen($equation) - ($pos_sign_rev + 1);\r\n \r\n }\r\n else\r\n $pos = $pos2;\r\n }\r\n \r\n return array($third_factor , $pos);\r\n \r\n \r\n}",
"function sp_one_third_sc( $atts, $content = null ) {\n\n\t\treturn '<div class=\"one_third\">' . do_shortcode( $content ) . '</div>';\n\n\t}",
"private function writeMarginLeft(): void\n {\n $record = 0x0026; // Record identifier\n $length = 0x0008; // Bytes to follow\n\n $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches\n\n $header = pack('vv', $record, $length);\n $data = pack('d', $margin);\n if (self::getByteOrder()) { // if it's Big Endian\n $data = strrev($data);\n }\n\n $this->append($header . $data);\n }",
"function sp_one_third_sc( $atts, $content = null ) {\n\n\t\treturn '<div class=\"one-third\">' . do_shortcode( $content ) . '</div>';\n\n\t}"
] | [
"0.51497823",
"0.49912277",
"0.48430577",
"0.46106917",
"0.45953348",
"0.45932406",
"0.4551648",
"0.45476073",
"0.44131067",
"0.43816963",
"0.43816963",
"0.43797442",
"0.43797442",
"0.43543637",
"0.41905352",
"0.41420537",
"0.41283697",
"0.41007546",
"0.40672085",
"0.4000949",
"0.40003532",
"0.39701355",
"0.39701355",
"0.39701355",
"0.39506078",
"0.39446443",
"0.39426833",
"0.3933278",
"0.39329687",
"0.3912509",
"0.3898315",
"0.3864272",
"0.37755993",
"0.37553746",
"0.3753979",
"0.37514815",
"0.37288013",
"0.36809728",
"0.36574712",
"0.36487976",
"0.3648446",
"0.36358514",
"0.3627174",
"0.3620994",
"0.35753864",
"0.35654303",
"0.35435674",
"0.35363975",
"0.3532176",
"0.35273117",
"0.35213283",
"0.35096088",
"0.34949133",
"0.34865808",
"0.34855536",
"0.34740117",
"0.34731308",
"0.34707707",
"0.34683388",
"0.346435",
"0.34516314",
"0.34507507",
"0.3449658",
"0.34460914",
"0.3445255",
"0.34386173",
"0.34242642",
"0.34163207",
"0.34017664",
"0.3400159",
"0.33941805",
"0.33889943",
"0.3387752",
"0.33821735",
"0.3376924",
"0.3368791",
"0.33532685",
"0.3346887",
"0.33368155",
"0.3326923",
"0.33246183",
"0.33174717",
"0.33136636",
"0.3312445",
"0.33034202",
"0.33027333",
"0.32939672",
"0.32919735",
"0.32882187",
"0.32806146",
"0.32733887",
"0.32703197",
"0.32671988",
"0.32656318",
"0.32644212",
"0.32640055",
"0.32534814",
"0.3251371",
"0.32488167",
"0.3247995"
] | 0.73764396 | 0 |
Return early if no sidebars are active | function scratch_home_page_setup() {
if (!in_array(true, $home_sidebars)) {
return;
}
if( $home_sidebars['home-welcome']) {
add_action('genesis_after_header', 'scratch_add_home_welcome');
}
if( $home_sidebars['call-to-action']) {
add_action('genesis_after_header', 'scratch_add_call_to_action');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 discard_sidebar_being_rendered()\n {\n }",
"function ts_check_if_any_sidebar($ifNoSidebars,$ifOneSidebar, $ifTwoSidebars )\r\n{\r\n\tif (ts_check_if_two_sidebars( ))\r\n\t{\r\n\t\treturn $ifTwoSidebars;\r\n\t}\r\n\tif (ts_check_if_sidebar())\r\n\t{\r\n\t\treturn $ifOneSidebar;\r\n\t}\r\n\treturn $ifNoSidebars;\r\n}",
"function anva_sidebar_layout_before_default() {\n\tif ( is_page() ) {\n\t\t\n\t\t$sidebar = anva_get_post_meta( '_sidebar_column' );\n\t\t\n\t\t// One sidebar\n\t\tif ( 'left' == $sidebar ) {\n\t\t\tanva_sidebars( 'left' );\n\n\t\t// Two sidebar\n\t\t} elseif( 'double' == $sidebar ) {\n\t\t\tanva_sidebars( 'left' );\n\n\t\t// Two sidebar left\n\t\t} elseif ( 'double_left' == $sidebar ) {\n\t\t\tanva_sidebars( 'left' );\n\t\t\tanva_sidebars( 'right' );\n\t\t}\n\t}\n}",
"function display_sidebar() {\n\n static $display;\n\n isset($display) || $display = !in_array(true, array(\n // The sidebar will NOT be displayed if ANY of the following return true.\n // @link https://codex.wordpress.org/Conditional_Tags\n is_404(),\n is_page() && !is_front_page()\n ));\n\n return apply_filters('sage/display_sidebar', $display);\n\n}",
"function sidebar() {\n\t\t}",
"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 getIsNeedToDisplaySideBar()\n {\n return (bool) Mage::app()->getStore()->getConfig('checkout/sidebar/display');\n }",
"function display_left_sidebar() {\n static $display;\n\n isset($display) || $display = in_array(false, [\n // The sidebar will NOT be displayed if ANY of the following return true.\n // @link https://codex.wordpress.org/Conditional_Tags\n is_home(),\n ]);\n\n return apply_filters('mytemplate/display_left_sidebar', $display);\n}",
"public static function header_sidebars() {\n\t\tif(WpvFancyPortfolio::has('disabled'))\n\t\t\tself::header_footer_sidebars('header');\n\t}",
"function display_sidebar()\n{\n static $display;\n isset($display) || $display = apply_filters('sage/display_sidebar', false);\n return $display;\n}",
"function display_sidebar()\n{\n static $display;\n isset($display) || $display = apply_filters('sage/display_sidebar', false);\n return $display;\n}",
"protected function isAdminSidebarSecondVisible()\n {\n return false;\n }",
"function wsm_child_do_sidebar() {\n\tif ( $id = wsm_child_has_ss_sidebar() ) {\n\t\tif ( dynamic_sidebar( $id ) ) { /* do nothing */ }\n\t}\n\telse {\n\t\tif( is_archive() || is_single() || is_category() || is_page_template( 'page_blog.php' ) ) {\n\t\t\tgenesis_widget_area( 'blog-sidebar');\n\t\t}\n\t\telse genesis_widget_area( 'page-sidebar');\n\t}\n}",
"function display_sidebar() {\n static $display;\n\n isset($display) || $display = !in_array(true, [\n // The sidebar will NOT be displayed if ANY of the following return true.\n // @link https://codex.wordpress.org/Conditional_Tags\n is_404(),\n is_front_page(),\n is_page(),\n is_single(),\n is_page_template('template-custom.php'),\n ]);\n\n return apply_filters('sage/display_sidebar', false);\n //return apply_filters('sage/display_sidebar', $display);\n}",
"function is_sidebar_active( $index ){\r\n\t global $wp_registered_sidebars;\r\n\t \r\n\t $widgetcolums = wp_get_sidebars_widgets();\r\n\t \r\n\t if ($widgetcolums[$index]) return true;\r\n\t \r\n\t\treturn false;\r\n\t}",
"function display_sidebar()\n{\n static $display;\n\n isset($display) || $display = !in_array(true, [\n // The sidebar will NOT be displayed if ANY of the following return true.\n // @link https://codex.wordpress.org/Conditional_Tags\n is_404(),\n is_front_page(),\n is_single(),\n is_page_template('template-homepage.php'),\n is_page_template('template-custom.php'),\n is_page_template('template-full-width.php'),\n is_page_template('template-full-width-naked.php'),\n is_page_template('template-elementor.php'),\n ]);\n\n return apply_filters('sage/display_sidebar', $display);\n}",
"function wordfes2014_display_sidebar(){\n\n\t$display = true;\n\n\t/**\n\t * ワンカラムが選択されているか、404ページの時は非表示\n\t */\n\tif ( 'one_column' === get_field( 'template_layout' ) ||\n\t\t\tis_404() ) {\n\t\t$display = false;\n\t}\n\n\treturn $display;\n\n}",
"public function isSidebarFirstVisible()\n {\n return \\XLite::isAdminZone()\n ? $this->isAdminSidebarFirstVisible()\n : $this->isCustomerSidebarFirstVisible();\n }",
"function wpstartup_sidebar_html(){\n\n if( has_nav_menu('side') ){\n echo '<div id=\"sidebarmenu\">';\n wpstartup_menu_html( 'side' );\n echo '<div class=\"clr\"></div></div>';\n }\n\n\n if( !is_page() && !is_single() && wp_startup_is_sidebar_active('sidebar-1') ){\n echo '<div id=\"sidebarcontent\">';\n wpstartup_widgetarea_html( 'sidebar-1' );\n echo '<div class=\"clr\"></div></div>';\n }else if( wp_startup_is_sidebar_active( 'sidebar-widget' ) ){\n echo '<div id=\"sidebarcontent\">';\n wpstartup_widgetarea_html( 'sidebar-widget' );\n echo '<div class=\"clr\"></div></div>';\n }\n}",
"function is_sidebar_active( $index ){\n\t global $wp_registered_sidebars;\n\n\t $widgetcolums = wp_get_sidebars_widgets();\n\n\t if ($widgetcolums[$index]) return true;\n\n\t return false;\n\t}",
"function is_sidebar_active( $index ){\n\t global $wp_registered_sidebars;\n\n\t $widgetcolums = wp_get_sidebars_widgets();\n\n\t if ($widgetcolums[$index]) return true;\n\n\t return false;\n\t}",
"public function getWrapLeftSideBarInWell(): bool\n {\n return $this->wrapLeftSideBarInWell;\n }",
"function _wp_sidebars_changed()\n {\n }",
"function display_sidebar() {\n static $display;\n\n isset($display) || $display = !in_array(true, [\n // The sidebar will NOT be displayed if ANY of the following return true.\n // @link https://codex.wordpress.org/Conditional_Tags\n is_404(),\n is_front_page(),\n is_home(),\n is_page([\n 'free-case-evaluations',\n 'discrimination-employee-rights-case-evaluation',\n 'criminal-defense-dwi-case-evaluation',\n 'personal-injury-free-case-evaluation',\n 'contact'\n ])\n ]);\n\n return apply_filters('display_sidebar', $display);\n}",
"public function show_sidebar_meta() {\n\n\t\tif ( $this->post_id === null ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $this->is_restricted_woocommerce_page() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( $this->is_sections_front_page() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"function anva_sidebar_layout_after_default() {\n\tif ( is_page() ) {\n\t\t\n\t\t$sidebar = anva_get_post_meta( '_sidebar_column' );\n\t\t\n\t\t// One sidebar\n\t\tif ( 'right' == $sidebar ) {\n\t\t\tanva_sidebars( 'right' );\n\n\t\t// Two sidebar\n\t\t} elseif ( 'double' == $sidebar ) {\n\t\t\tanva_sidebars( 'right' );\n\n\t\t// Two sidebar right\n\t\t} elseif ( 'double_right' == $sidebar ) {\n\t\t\tanva_sidebars( 'left' );\n\t\t\tanva_sidebars( 'right' );\n\t\t}\n\t}\n}",
"function adventure_is_sidebar_active($index) {\r\n\tglobal $wp_registered_sidebars;\r\n\t$widgetcolums = wp_get_sidebars_widgets();\r\n\tif ($widgetcolums[$index]) {\r\n\t\treturn true; }\r\n\t\treturn false; }",
"function ft_hook_sidebar() {}",
"function ts_check_if_sidebar( )\r\n{\r\n\t$single_post_sidebar_position = ts_get_single_post_sidebar_position();\r\n\tif ($single_post_sidebar_position == 'no')\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n}",
"function is_sidebar_active( $index ) {\n\t global $wp_registered_sidebars;\n\n\t $widgetcolums = wp_get_sidebars_widgets();\n\n\t if ($widgetcolums[$index]) return true;\n\n\t return false;\n\t}",
"protected function isAdminSidebarFirstVisible()\n {\n $widget = new \\Xlite\\View\\Controller;\n\n return $widget->isViewListVisible('admin.main.page.content.left')\n && !\\Xlite::getController()->isForceChangePassword();\n }",
"public function isSidebarIncludespacer()\r\n\t{\r\n\t\treturn $this->sidebarIncludespacer;\r\n\t}",
"function cera_grimlock_sidebar_left() {\n\t\tif ( apply_filters( 'grimlock_template_sidebar_left_displayed', true ) && is_active_sidebar( 'sidebar-1' ) ) :\n\t\t\t?>\n\t\t\t<aside id=\"secondary-left\" class=\"widget-area sidebar region__col region__col--1\">\n\t\t\t\t<?php dynamic_sidebar( 'sidebar-1' ); ?>\n\t\t\t</aside><!-- #secondary-left -->\n\t\t\t<?php\n\t\tendif;\n\t}",
"function display_right_sidebar() {\n static $display;\n\n isset($display) || $display = in_array(false, [\n // The sidebar will NOT be displayed if ANY of the following return true.\n // @link https://codex.wordpress.org/Conditional_Tags\n is_home(),\n ]);\n\n return apply_filters('mytemplate/display_right_sidebar', $display);\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 static function onMonacoSidebar() {\n\t\tglobal $wgAdConfig;\n\t\tif (\n\t\t\tisset( $wgAdConfig['monaco']['sidebar'] ) &&\n\t\t\t$wgAdConfig['monaco']['sidebar']\n\t\t) {\n\t\t\techo self::loadAd( 'sidebar' );\n\t\t}\n\t\treturn true;\n\t}",
"function ts_check_if_two_sidebars( )\r\n{\r\n\t$single_post_sidebar_position = ts_get_single_post_sidebar_position();\r\n\tif (in_array($single_post_sidebar_position,array('left2','right2','both')))\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n}",
"function sidebars_require () {\n\t\tglobal $wpdb;\t\t\n\t\t$portfolio_require_query = 'SELECT * FROM duotive_sidebars ORDER BY ID ASC';\t\n\t\t$portfolio_require = $wpdb->get_results($portfolio_require_query);\n\t\treturn $portfolio_require;\n\t}",
"private function mapSidebars(){\n \n /* register menu package theme*/\n $manager = app()->make(SidebarManager::class);\n $manager->register(CoreSidebar::class);\n View::composer(\n 'theme::layouts.sidebar', CoreSidebarCompose::class\n );\n }",
"public function display_primary_sidebar()\n\t{\n\t\tdynamic_sidebar(static::PRIMARY_SIDEBAR_SLUG);\n\t}",
"function get_sidebar() {\n require_once(COMP_DIR . 'sidebars.php');\n }",
"public function hidden_sidebars() {\n\t\techo '<div style=\"display: none\">';\n\t\tif ( is_customize_preview() ) {\n\t\t\tdynamic_sidebar( 'sidebar-top-bar' );\n\t\t\tdynamic_sidebar( 'header-sidebar' );\n\t\t\tdynamic_sidebar( 'subscribe-widgets' );\n\t\t\tdynamic_sidebar( 'sidebar-big-title' );\n\t\t}\n\t\techo '</div>';\n\t}",
"function honeycomb_above_header_widget_region() {\n\t\tif ( is_active_sidebar( 'header-1' ) ) {\n\t\t?>\n\t\t<div class=\"header-above-widget-region\" role=\"complementary\">\n\t\t\t<div class=\"col-full\">\n\t\t\t\t<?php dynamic_sidebar( 'header-1' ); ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\t}\n\t}",
"function scm_should_this_get_sidebar() {\n echo \" \";\n}",
"public function isSidebarSecondVisible()\n {\n return \\XLite::isAdminZone()\n ? $this->isAdminSidebarSecondVisible()\n : $this->isCustomerSidebarSecondVisible();\n }",
"abstract public function getSidebarUpgrade();",
"protected function isCustomerSidebarFirstVisible()\n {\n return in_array(\n $this->getLayoutType(),\n array(\n static::LAYOUT_TWO_COLUMNS_LEFT,\n static::LAYOUT_THREE_COLUMNS\n ),\n true\n )\n && !in_array(\n \\XLite\\Core\\Request::getInstance()->target,\n $this->getSidebarFirstHiddenTargets(),\n true\n );\n }",
"public function is_primary_sidebar_active(): bool\n\t{\n\t\t$this->get_option = get_option('qreate-options');\n\n\n\t\tif (class_exists('ReduxFramework') && $this->get_option != '') {\n\t\t\tif (is_search()) {\n\t\t\t\t$option = $this->get_option['search_page'];\n\t\t\t} else {\n\t\t\t\t$option = is_single() ? $this->get_option['blog_single_page_setting'] : $this->get_option['blog_setting'];\n\t\t\t}\n\t\t\tif (in_array($option, [4, 5])) {\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\n\t\treturn (bool)is_active_sidebar(static::PRIMARY_SIDEBAR_SLUG);\n\t}",
"function anva_content_before_default() {\n\t?>\n\t<div class=\"sidebar-layout\">\n\t<?php\n}",
"public function quickSidebarAction();",
"public function getWrapRightSideBarInWell(): bool\n {\n return $this->wrapRightSideBarInWell;\n }",
"public function is_sidebar_rendered($sidebar_id)\n {\n }",
"public function sidebarAction();",
"function wp_admin_bar_sidebar_toggle($wp_admin_bar)\n {\n }",
"public static function left_sidebar() {\n\t\t$layout_type = WpvTemplates::get_layout();\n\n\t\tif($layout_type == 'left-only' || $layout_type == 'left-right'): ?>\n\t\t\t<aside class=\"<?php echo apply_filters('wpv_left_sidebar_class', 'left', $layout_type) ?>\">\n\t\t\t\t<?php WpvSidebars::getInstance()->get_sidebar('left'); ?>\n\t\t\t</aside>\n\t\t<?php endif;\n\t}",
"function rovoko_get_sidebar($check = true){\n $sidebar = 'none';\n if(is_post_type_archive('post') || is_singular('post') || is_home()){\n $sidebar = 'sidebar-main';\n } elseif (is_post_type_archive('portfolio') || is_singular('ef5_portfolio')) {\n $sidebar = 'sidebar-portfolio';\n } elseif (is_singular('ef5_stories')) {\n $sidebar = 'ef5_stories_widget';\n } elseif (is_page()) {\n if (class_exists('WooCommerce') && (is_checkout() || is_cart())) {\n $sidebar = 'sidebar-shop';\n } else {\n $sidebar = 'sidebar-page';\n }\n } elseif (class_exists('WooCommerce') && (is_woocommerce() || is_post_type_archive('product') || is_singular('product') ) ) {\n $sidebar = 'sidebar-shop';\n } elseif(class_exists('Tribe__Events__Main') && ( isset($_REQUEST['tribe_event_display']) && $_REQUEST['tribe_event_display'] === 'list') ){\n $sidebar = 'sidebar-tribe-event';\n } elseif(class_exists('Tribe__Events__Main') && ( isset($_REQUEST['tribe_event_display']) && $_REQUEST['tribe_event_display'] !== 'list') ){\n $sidebar = 'none';\n } elseif (is_archive() || is_search()){\n $sidebar = 'sidebar-main';\n }\n if($check)\n return is_active_sidebar($sidebar);\n else \n return $sidebar;\n}",
"function biagiotti_mikado_get_header_widget_area_one() {\n\t\t$page_id = biagiotti_mikado_get_page_id();\n\t\t$custom_menu_widget_area = get_post_meta( $page_id, 'mkdf_custom_header_widget_area_one_meta', true );\n\t\t\n\t\tif ( get_post_meta( $page_id, 'mkdf_disable_header_widget_areas_meta', 'true' ) !== 'yes' ) {\n\t\t\tif ( is_active_sidebar( 'mkdf-header-widget-area-one' ) && empty( $custom_menu_widget_area ) ) {\n\t\t\t\tdynamic_sidebar( 'mkdf-header-widget-area-one' );\n\t\t\t} else if ( ! empty( $custom_menu_widget_area ) && is_active_sidebar( $custom_menu_widget_area ) ) {\n\t\t\t\tdynamic_sidebar( $custom_menu_widget_area );\n\t\t\t}\n\t\t}\n\t}",
"function shopno2_sidebar_3fah2() {\n//\tif (is_front_page()){\n\tif ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( '3fah2' ) ) {} }",
"function comicpress_is_active_sidebar( $index ) {\n\tglobal $wp_registered_sidebars, $_wp_sidebars_widgets;\n\tif ( is_int($index) ) {\n\t\tif (!empty($_wp_sidebars_widgets[sanitize_title(\"sidebar-$index\")]) )\n\t\t\treturn true;\n\t} else {\n\t\t$i = 1;\n\t\tforeach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {\n\t\t\tif ( $index == $registered_sidebar['name'] && !empty($_wp_sidebars_widgets[sanitize_title(\"sidebar-$i\")]) )\n\t\t\t\treturn true;\n\t\t\t$i++;\n\t\t}\n\t}\n\treturn false;\n}",
"function kvell_edge_get_header_vertical_widget_areas() {\n\t\t$page_id = kvell_edge_get_page_id();\n\t\t$custom_vertical_header_widget_area = get_post_meta( $page_id, 'edgtf_custom_vertical_area_sidebar_meta', true );\n\t\t\n\t\tif ( is_active_sidebar( 'edgtf-vertical-area' ) && empty( $custom_vertical_header_widget_area ) ) {\n\t\t\tdynamic_sidebar( 'edgtf-vertical-area' );\n\t\t} else if ( ! empty( $custom_vertical_header_widget_area ) && is_active_sidebar( $custom_vertical_header_widget_area ) ) {\n\t\t\tdynamic_sidebar( $custom_vertical_header_widget_area );\n\t\t}\n\t}",
"function honeycomb_below_header_widget_region() {\n\t\tif ( is_active_sidebar( 'header-2' ) ) {\n\t\t?>\n\t\t<div class=\"header-below-widget-region\" role=\"complementary\">\n\t\t\t<div class=\"col-full\">\n\t\t\t\t<?php dynamic_sidebar( 'header-2' ); ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\t}\n\t}",
"public function hasCustomSidebars($id) {\n\t\tglobal $wpdb;\n\t\t$result = $wpdb->get_row(\"SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = '_customize_sidebars' AND post_id = '$id'\", OBJECT);\n\n\t\tif (isset($result->meta_value) && $result->meta_value == 'yes') {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"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}",
"function medigroup_mikado_get_side_area() {\n\n\t\tif(is_active_widget(false, false, 'mkd_side_area_opener')) {\n\n\t\t\t$parameters = array(\n\t\t\t\t'show_side_area_title' => medigroup_mikado_options()->getOptionValue('side_area_title') !== '' ? true : false,\n\t\t\t\t//Dont show title if empty\n\t\t\t);\n\n\t\t\tmedigroup_mikado_get_module_template_part('templates/sidearea', 'sidearea', '', $parameters);\n\n\t\t}\n\n\t}",
"public function override_sidebars_widgets_for_theme_switch()\n {\n }",
"function register_sidebar_init() {\n\n\t}",
"function stay_current_nav_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Stay Current Page Nav Left Col',\n\t\t'id' => 'stay_current_page_nav',\n\t\t'before_widget' => '<div id=\"stayCurrentNav\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n}",
"function magnb_woo_layout( $sidebar ) {\n\tif ( is_woocommerce() ){\n\t\tif ( is_product() ) { // single product page. Wrapper for is_singular\n\t\t\t$sidebar = hoot_get_mod( 'sidebar_wooproduct' );\n\t\t} else { // shop, category, tag archives etc\n\t\t\t$sidebar = hoot_get_mod( 'sidebar_wooshop' );\n\t\t}\n\t}\n\n\t// Let developers edit default layout for Cart and Checkout which are standard 'Pages' with shortcodes\n\t$forcenosidebar = apply_filters( 'magnb_woo_pages_force_nosidebar', true );\n\tif ( $forcenosidebar && ( is_cart() || is_checkout() || is_account_page() ) ) {\n\t\t$sidebar = 'none';\n\t}\n\n\treturn $sidebar;\n}",
"function woo_sidebar_left() {\n\tif ( get_option('woo_left_sidebar') == \"true\" )\n\t\techo '<style type=\"text/css\">#main.col-left { float:right; } #main.col-right { float:left; }</style>' . \"\\n\";\n}",
"function blog_way_before_primary_action(){\n $global_layout = blog_way_get_option( 'global_layout' );\n\n if('no-sidebar' === $global_layout || is_page_template( 'templates/page-fullwidth.php' ) ){\n $col_class = 'col-sm-12 layout-' . esc_attr( $global_layout );\n } else{\n $col_class = 'col-md-8 col-sm-12 layout-' . esc_attr( $global_layout );\n }\n ?><div class=\"<?php echo $col_class; ?> main-content-area\"><div id=\"primary\" class=\"content-area\"><main id=\"main\" class=\"site-main\" role=\"main\"><?php\n }",
"function is_registered_sidebar($sidebar_id)\n {\n }",
"function shopno2_sidebar_3fah3() {\n//\tif (is_front_page()){\n\tif ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( '3fah3' ) ) {} }",
"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 wp_has_sidebar($classes)\n{\n\tif (is_active_sidebar('sidebar')) {\n\t\t// add 'class-name' to the $classes array\n\t\t$classes[] = 'has_sidebar';\n\t}\n\treturn $classes;\n}",
"public function hasLayout() {}",
"function Pmx_SideBar()\n{\n\tglobal $options, $context, $txt, $scripturl, $settings, $sourcedir;\n\n\tif(!empty($context['PmxBlog']['Manager']['showcalendar']) || !empty($context['PmxBlog']['Manager']['showarchive']) || !empty($context['PmxBlog']['Manager']['showcategories']))\n\t{\n\t\techo '\n\t\t<td valign=\"top\">\n\t\t<div id=\"upshrinkPmxBlogSideBar\" style=\"margin-left:6px; width:170px;'. (empty($options['collapse_PmxBlogSideBar']) ? '' : ' display:none;') .'\">';\n\n\t\t$margintop = '';\n\t\t$blogdate = getdate($context['PmxBlog']['Manager']['blogcreated']);\n\t\t$currTime = getdate(forum_time());\n\t\tif(!empty($context['PmxBlog']['Archivdate']))\n\t\t{\n\t\t\t$now = $context['PmxBlog']['Archivdate'];\n\t\t\t$today = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$now = getdate(forum_time());\n\t\t\t$today = $now['mday'];\n\t\t}\n\n\t\t// The Calendar\n\t\tif(isset($context['PmxBlog']['Manager']['showcalendar']) && $context['PmxBlog']['Manager']['showcalendar'] == 1)\n\t\t{\n\t\t\tinclude_once($sourcedir .'/Subs-Calendar.php');\n\t\t\t$calOpt = array(\n\t\t\t\t'start_day' => !empty($options['calendar_start_day']) ? $options['calendar_start_day'] : 0,\n\t\t\t\t'show_week_num' => 1,\n\t\t\t\t'short_day_titles' => 1,\n\t\t\t\t'show_holidays' => 0,\n\t\t\t\t'show_events' => 0,\n\t\t\t\t'show_birthdays' => 0,\n\t\t\t);\n\t\t\t$calData = getCalendarGrid($now['mon'], $now['year'], $calOpt);\n\t\t\t$title = $txt['months'][(int) $now['mon']] .' '. $now['year'];\n\n\t\t\t$calendar = '\n\t\t\t\t<table class=\"table_grid pmxblog_th\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr class=\"catbg\">\n\t\t\t\t\t\t\t<th class=\"first_th\" scope=\"col\" width=\"97%\">\n\t\t\t\t\t\t\t\t<div style=\"text-align:center;\">';\n\n\t\t\tif(PmxCompareDate($blogdate, $now, array('year', 'mon')) == -1)\n\t\t\t{\n\t\t\t\tif($now['mon'] > 1)\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 1, 0, ($now['mon'] -1), $now['mday'], $now['year']);\n\t\t\t\telse\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 1, 0, 12, $now['mday'], ($now['year'] -1));\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t<span style=\"margin-right:4px;\"><a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_prevmon'] .'\">«</a></span>';\n\t\t\t}\n\n\t\t\tif(PmxCompareDate($currTime, $now, array('seconds', 'minutes', 'year', 'mon', 'mday')) != 0)\n\t\t\t{\n\t\t\t\t$calaction = ';arch=0';\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_resetdate'] .'\">'.$title.'</a>';\n\t\t\t}\n\t\t\telse\n\t\t\t\t$calendar .= $title;\n\n\t\t\tif(PmxCompareDate($now, $currTime, array('year', 'mon')) == -1)\n\t\t\t{\n\t\t\t\tif($now['mon'] < 12)\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 1, 0, ($now['mon'] +1), $now['mday'], $now['year']);\n\t\t\t\telse\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 1, 0, 1, $now['mday'], ($now['year'] +1));\n\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t<span style=\"margin-right:4px;\"><a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_nextmon'] .'\">»</a></span>';\n\t\t\t}\n\n\t\t\t$calendar .= '\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th class=\"last_th\" scope=\"col\" width=\"3%\"></th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tr><td colspan=\"2\" class=\"pmxblog_empty\"></td></tr></table>\n\n\t\t\t\t\t<div class=\"plainbox pmxblog_border\">\n\t\t\t\t\t<table class=\"windowbg2\" width=\"100%\" align=\"center\" border=\"0\" cellspacing=\"4\" cellpadding=\"0\">\n\t\t\t\t\t\t<tr>';\n\n\t\t\tforeach($calData['week_days'] as $day)\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t\t<td class=\"smalltext\" align=\"center\">'. substr($txt['days'][$day], 0, 2) .'</td>';\n\n\t\t\t$calendar .= '\n\t\t\t\t\t\t</tr>';\n\n\t\t\tforeach($calData['weeks'] as $week)\n\t\t\t{\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t<tr>';\n\n\t\t\t\t$dayspan = 0;\n\t\t\t\tforeach($week['days'] as $days)\n\t\t\t\t{\n\t\t\t\t\tif(empty($days['day']))\n\t\t\t\t\t\t$dayspan++;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!empty($dayspan))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$calendar .= '\n\t\t\t\t\t\t\t<td class=\"smalltext\" colspan=\"'. $dayspan .'\"></td>';\n\t\t\t\t\t\t\t$dayspan = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$calendar .= '\n\t\t\t\t\t\t\t<td align=\"right\" valign=\"middle\" class=\"smalltext';\n\n\t\t\t\t\t\tif($days['day'] == $today)\n\t\t\t\t\t\t\t$calendar .= ' plainbox\" style=\"padding:0 2px 2px 0;\">';\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$calendar .= '\" style=\"padding:0px 2px;\">';\n\n\t\t\t\t\t\tif(!empty($context['PmxBlog']['cal'][$now['year']][$now['mon']][$days['day']]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$calaction = ';arch='. mktime(0, 0, 1, $now['mon'], $days['day'], $now['year']);\n\t\t\t\t\t\t\t$calendar .= '\n\t\t\t\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='. $context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\"><u><b>'. $days['day'] .'</b></u></a>\n\t\t\t\t\t\t\t</td>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$calendar .= $days['day'] .'\n\t\t\t\t\t\t\t</td>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$calendar .= '\n\t\t\t\t\t\t</tr>';\n\t\t\t}\n\t\t\t$calendar .= '\n\t\t\t\t\t</table>\n\t\t\t\t</div>';\n\n\t\t\techo $calendar;\n\t\t\t$margintop = 'margin-top:5px; ';\n\t\t}\n\n\t\t// The Archive\n\t\tif(isset($context['PmxBlog']['Manager']['showarchive']) && $context['PmxBlog']['Manager']['showarchive'] == 1)\n\t\t{\n\t\t\techo '\n\t\t\t\t<table class=\"table_grid pmxblog_th\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" style=\"'.$margintop.'\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr class=\"catbg\">\n\t\t\t\t\t\t\t<th class=\"first_th\" scope=\"col\" width=\"97%\"><div style=\"text-align:center;\">';\n\n\t\t\tif(PmxCompareDate($blogdate, $now, array('year')) == -1)\n\t\t\t{\n\t\t\t\t$calaction = ';arch='. mktime(0, 0, 0, $now['mon'], 1, ($now['year'] -1));\n\t\t\t\tif($calaction < $context['PmxBlog']['Manager']['blogcreated'])\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 0, 0, $blogdate['mon'], $blogdate['mday'], $blogdate['year']);\n\t\t\t\techo '\n\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_prevyear'] .'\">«</a>';\n\t\t\t}\n\n\t\t\techo '\n\t\t\t\t\t<span style=\"margin:0px 4px;\">';\n\n\t\t\tif(PmxCompareDate($currTime, $now, array('seconds', 'minutes', 'year', 'mon', 'mday')) != 0)\n\t\t\t{\n\t\t\t\t$calaction = ';arch=0';\n\t\t\t\techo '\n\t\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_resetdate'] .'\">'. $txt['PmxBlog_archive'] .' '. $now['year'] .'</a>';\n\t\t\t}\n\t\t\telse\n\t\t\t\techo $txt['PmxBlog_archive'] .' '. $now['year'];\n\n\t\t\techo '\n\t\t\t\t\t</span>';\n\n\t\t\tif(PmxCompareDate($currTime, $now, array('year')) == 1)\n\t\t\t{\n\t\t\t\t$calaction = mktime(0, 0, 0, $now['mon'], 1, ($now['year'] +1));\n\t\t\t\tif(PmxCompareDate(getdate($calaction), $currTime, array('year')) == -1)\n\t\t\t\t\t$calaction = mktime(0, 0, 0, $currTime['mon'], 1, $currTime['year']);\n\t\t\t\techo '\n\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='.$context['PmxBlog']['mode'] .';arch='.$calaction.$context['PmxBlog']['UserLink'].'\" title=\"'. $txt['PmxBlog_blogview_nextyear'] .'\">»</a>';\n\t\t\t}\n\n\t\t\techo '\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th class=\"last_th\" scope=\"col\" width=\"3%\"></th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t<tr><td colspan=\"2\" class=\"pmxblog_empty\"></td></tr></table>\n\t\t\t\t<div class=\"plainbox pmxblog_border\">\n\t\t\t\t<div class=\"windowbg2\" style=\"padding:5px 5px;\">\n\t\t\t\t\t<span class=\"smalltext\">';\n\n\t\t\tfor ($m=1; $m <= 12; $m++)\n\t\t\t{\n\t\t\t\tif(isset($context['PmxBlog']['arch'][$now['year']][$m]))\n\t\t\t\t{\n\t\t\t\t\t$calaction = ';arch='. mktime(0, 1, 0, $m, 1, $now['year']);\n\t\t\t\t\techo '\n\t\t\t\t\t\t<a href=\"'. $scripturl .'?action=pmxblog;sa='. $context['PmxBlog']['mode'].$calaction.$context['PmxBlog']['UserLink'].'\"><b>'. $txt['months'][$m] .'</b></a>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo $txt['months'][$m];\n\n\t\t\t\techo '<br />';\n\t\t\t}\n\n\t\t\techo '\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</div>';\n\t\t\t$margintop = 'margin-top:5px; ';\n\t\t}\n\n\t\t// Categorie List\n\t\tif(isset($context['PmxBlog']['Manager']['showcategories']) && $context['PmxBlog']['Manager']['showcategories'] == 1 && !empty($context['PmxBlog']['categorie']))\n\t\t{\n\t\t\techo '\n\t\t\t\t<table class=\"table_grid pmxblog_th\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" style=\"'.$margintop.'\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr class=\"catbg\">\n\t\t\t\t\t\t\t<th class=\"first_th\" scope=\"col\" width=\"97%\"><div style=\"text-align:center;\">'. $txt['PmxBlog_categorie_title'] .'</div></th>\n\t\t\t\t\t\t\t<th class=\"last_th\" scope=\"col\" width=\"3%\"></th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t<tr><td colspan=\"2\" class=\"pmxblog_empty\"></td></tr></table>';\n\n\t\t\tif(!empty($context['PmxBlog']['categorie']))\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t<div class=\"plainbox pmxblog_border\">\n\t\t\t\t\t<div class=\"windowbg2\" style=\"padding:5px 5px;\">';\n\t\t\t\tforeach($context['PmxBlog']['categorie'] as $fbcat)\n\t\t\t\t{\n\t\t\t\t\t$d = str_pad('', $fbcat['depth']*2, '.');\n\t\t\t\t\techo '\n\t\t\t\t\t\t<div class=\"smalltext\">'.\n\t\t\t\t\t\t\t(!empty($fbcat['ContCat']) ? '<a href=\"'. $scripturl .'?action=pmxblog;sa='. $context['PmxBlog']['mode']. ';ca='. $fbcat['id'] .$context['PmxBlog']['UserLink'].'\"><b>'.$d.$fbcat['name'] .'</b></a>' : $d.$fbcat['name']) .\n\t\t\t\t\t\t'</div>';\n\t\t\t\t}\n\t\t\t\techo '\n\t\t\t\t\t</div>';\n\t\t\t}\n\t\t\techo '\n\t\t\t</div>';\n\t\t}\n\t\techo '\n\t</div>\n\t</td>';\n\t}\n}",
"function astra_return_page_layout_no_sidebar() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound\n\t_deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_return_page_layout_no_sidebar()' );\n\treturn astra_addon_return_page_layout_no_sidebar();\n}",
"function store_show_sidebar_options($control) {\n\t \n\t $option = $control->manager->get_setting('store_disable_sidebar');\n\t return $option->value() == false ;\n\t \n\t}",
"public function get_help_sidebar()\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 note_sidebar_being_rendered($index)\n {\n }",
"function fanwood_disable_sidebars( $sidebars_widgets ) {\n\tglobal $wp_query;\n\n\tif ( current_theme_supports( 'theme-layouts' ) && !is_admin() ) {\n\n\t\tif ( 'layout-1c' == theme_layouts_get_layout() ) {\n\t\t\t$sidebars_widgets['primary'] = false;\n\t\t\t$sidebars_widgets['secondary'] = false;\n\t\t\t\n\t\t}\n\t\telseif ( 'layout-hl-1c' == theme_layouts_get_layout() || 'layout-hr-1c' == theme_layouts_get_layout() ) {\n\t\t\t$sidebars_widgets['primary'] = false;\n\t\t\t$sidebars_widgets['secondary'] = false;\n\t\t\t$sidebars_widgets['after-header'] = false;\n\t\t\t$sidebars_widgets['after-header-2c'] = false;\n\t\t\t$sidebars_widgets['after-header-3c'] = false;\n\t\t\t$sidebars_widgets['after-header-4c'] = false;\n\t\t\t$sidebars_widgets['after-header-5c'] = false;\n\t\t}\n\t\telseif ( 'layout-hl-2c-l' == theme_layouts_get_layout() || 'layout-hl-2c-r' == theme_layouts_get_layout() || 'layout-hr-2c-l' == theme_layouts_get_layout() || 'layout-hr-2c-r' == theme_layouts_get_layout() ) {\n\t\t\t$sidebars_widgets['after-header'] = false;\n\t\t\t$sidebars_widgets['after-header-2c'] = false;\n\t\t\t$sidebars_widgets['after-header-3c'] = false;\n\t\t\t$sidebars_widgets['after-header-4c'] = false;\n\t\t\t$sidebars_widgets['after-header-5c'] = false;\n\t\t}\n\t\t\n\t}\n\n\treturn $sidebars_widgets;\n}",
"function wowaries_widgets_init() {\n /* WowAriesProject generated Register Sidebars Begin */\n\n /* WowAriesProject generated Register Sidebars End */\n}",
"function omega_one_column() {\n\n\tif ( !is_active_sidebar( 'primary' ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'omega_theme_layout_one_column' );\n\n\telseif ( is_attachment() && wp_attachment_is_image() && 'default' == get_post_layout( get_queried_object_id() ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'omega_theme_layout_one_column' );\n\n}",
"function hybrid_get_utility_before_content() {\n\tget_sidebar( 'before-content' );\n}",
"function learn_press_single_quiz_sidebar() {\n\t\tlearn_press_get_template( 'content-quiz/sidebar.php' );\n\t}",
"function is_tabber_tabs_area_active( $index ){\n global $wp_registered_sidebars;\n\n $widgetcolums = wp_get_sidebars_widgets();\n\t\t \n if ($widgetcolums[$index]) return true;\n \n\treturn false;\n}",
"function aton_qodef_add_support_custom_sidebar() {\n add_theme_support('AtonQodefSidebar');\n if (get_theme_support('AtonQodefSidebar')) new AtonQodefSidebar();\n }",
"function mrseo_elated_sidebar_layout() {\n\t\t$sidebar_layout = '';\n\t\t$sidebar_layout_meta = mrseo_elated_get_meta_field_intersect('sidebar_layout');\n\t\t$archive_sidebar_layout = mrseo_elated_options()->getOptionValue('archive_sidebar_layout');\n\t\t$search_sidebar_layout = mrseo_elated_options()->getOptionValue('search_page_sidebar_layout');\n\t\t$single_sidebar_layout = mrseo_elated_get_meta_field_intersect('blog_single_sidebar_layout');\n\t\t\n\t\tif (!empty($sidebar_layout_meta)) {\n\t\t\t$sidebar_layout = $sidebar_layout_meta;\n\t\t}\n\t\t\n\t\tif (is_singular('post') && !empty($single_sidebar_layout)) {\n\t\t\t$sidebar_layout = $single_sidebar_layout;\n\t\t}\n\t\t\n\t\tif(is_search() && !mrseo_elated_is_woocommerce_shop() && !empty($search_sidebar_layout)) {\n\t\t\t$sidebar_layout = $search_sidebar_layout;\n\t\t}\n\t\t\n\t\tif ((is_archive() || (is_home() && is_front_page())) && !mrseo_elated_is_woocommerce_page() && !empty($archive_sidebar_layout)) {\n\t\t\t$sidebar_layout = $archive_sidebar_layout;\n\t\t}\n\t\t\n\t\tif (is_archive() && mrseo_elated_is_woocommerce_installed()) {\n\t\t\tif (is_product_category() || is_product_tag()) {\n\t\t\t\t$shop_id = get_option('woocommerce_shop_page_id');\n\t\t\t\t$sidebar_layout = mrseo_elated_get_meta_field_intersect('sidebar_layout', $shop_id);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn apply_filters('mrseo_elated_sidebar_layout', $sidebar_layout);\n\t}",
"function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}",
"public function reset( $args, $assoc_args ) {\n\n\t\tglobal $wp_registered_sidebars;\n\n\t\t$all = Utils\\get_flag_value( $assoc_args, 'all', false );\n\n\t\t// Bail if no arguments and no all flag.\n\t\tif ( ! $all && empty( $args ) ) {\n\t\t\tWP_CLI::error( 'Please specify one or more sidebars, or use --all.' );\n\t\t}\n\n\t\t// Fetch all sidebars if all flag is set.\n\t\tif ( $all ) {\n\t\t\t$args = array_keys( $wp_registered_sidebars );\n\t\t}\n\n\t\t// Sidebar ID wp_inactive_widgets is reserved by WP core for inactive widgets.\n\t\tif ( isset( $args['wp_inactive_widgets'] ) ) {\n\t\t\tunset( $args['wp_inactive_widgets'] );\n\t\t}\n\n\t\t// Check if no registered sidebar.\n\t\tif ( empty( $args ) ) {\n\t\t\tWP_CLI::error( 'No sidebar registered.' );\n\t\t}\n\n\t\t$count = 0;\n\t\t$errors = 0;\n\t\tforeach ( $args as $sidebar_id ) {\n\t\t\tif ( ! array_key_exists( $sidebar_id, $wp_registered_sidebars ) ) {\n\t\t\t\tWP_CLI::warning( sprintf( 'Invalid sidebar: %s', $sidebar_id ) );\n\t\t\t\t$errors++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$widgets = $this->get_sidebar_widgets( $sidebar_id );\n\t\t\tif ( empty( $widgets ) ) {\n\t\t\t\tWP_CLI::warning( sprintf( \"Sidebar '%s' is already empty.\", $sidebar_id ) );\n\t\t\t} else {\n\t\t\t\tforeach ( $widgets as $widget ) {\n\t\t\t\t\t$widget_id = $widget->id;\n\t\t\t\t\tlist( $name, $option_index, $new_sidebar_id, $sidebar_index ) = $this->get_widget_data( $widget_id );\n\t\t\t\t\t$this->move_sidebar_widget(\n\t\t\t\t\t\t$widget_id,\n\t\t\t\t\t\t$new_sidebar_id,\n\t\t\t\t\t\t'wp_inactive_widgets',\n\t\t\t\t\t\t$sidebar_index,\n\t\t\t\t\t\tcount( $this->get_sidebar_widgets( 'wp_inactive_widgets' ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tWP_CLI::log( sprintf( \"Sidebar '%s' reset.\", $sidebar_id ) );\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\n\t\tUtils\\report_batch_operation_results( 'sidebar', 'reset', count( $args ), $count, $errors );\n\t}",
"function happy_one_column() {\n\n\tif ( !is_active_sidebar( 'primary' ) && !is_active_sidebar( 'secondary' ) )\n\t\tadd_filter( 'get_theme_layout', 'happy_post_layout_one_column' );\n\n\telseif ( is_attachment() )\n\t\tadd_filter( 'get_theme_layout', 'happy_post_layout_one_column' );\n}",
"function biagiotti_mikado_get_header_widget_area_two() {\n\t\t$page_id = biagiotti_mikado_get_page_id();\n\t\t$custom_menu_widget_area = get_post_meta( $page_id, 'mkdf_custom_header_widget_area_two_meta', true );\n\n\t\tif ( get_post_meta( $page_id, 'mkdf_disable_header_widget_areas_meta', 'true' ) !== 'yes' ) {\n\t\t\tif ( is_active_sidebar( 'mkdf-header-widget-area-two' ) && empty( $custom_menu_widget_area ) ) {\n\t\t\t\tdynamic_sidebar( 'mkdf-header-widget-area-two' );\n\t\t\t} else if ( ! empty( $custom_menu_widget_area ) && is_active_sidebar( $custom_menu_widget_area ) ) {\n\t\t\t\tdynamic_sidebar( $custom_menu_widget_area );\n\t\t\t}\n\t\t}\n\t}",
"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 radium_do_bbpress_sidebar() {\n\n if ( ! dynamic_sidebar( 'sidebar-bbpress' ) && current_user_can( 'edit_theme_options' ) ) {\n radium_bbpress_widget_area_content( esc_html__( 'Forum Sidebar Widget Area', 'newsfront-bbpress' ) );\n }\n\n }",
"function hasLayout() ;",
"function get_sidebar_id() {\n\t\tif ( is_page() || (is_front_page() && get_option('show_on_front') == 'page') ) {\n\t\t\t// Get the sidebar setting from\n\t\t\t$sidebar = noo_get_post_meta(get_the_ID(), '_noo_wp_page_sidebar', 'sidebar-main');\n\t\t\t\n\t\t\treturn $sidebar;\n\t\t}\n\n\t\t// NOO Resume\n\t\tif( is_post_type_archive( 'noo_resume' ) ) {\n\t\t\t$resume_layout = noo_get_option('noo_resumes_layout', 'sidebar');\n\t\t\tif( $resume_layout != 'fullwidth' ) {\n\t\t\t\treturn noo_get_option('noo_resume_list_sidebar', 'sidebar-resume');\n\t\t\t}\n\n\t\t\treturn '';\n\t\t}\n\t\tif( is_singular( 'noo_resume' ) ) {\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t// NOO Company\n\t\tif( is_post_type_archive( 'noo_company' ) || is_singular( 'noo_company' ) ) {\n\t\t\t$companies_layout = noo_get_option('noo_companies_layout', 'fullwidth');\n\t\t\tif( $companies_layout != 'fullwidth' ) {\n\t\t\t\treturn noo_get_option('noo_companies_sidebar', 'sidebar-main');\n\t\t\t}\n\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t// NOO Job\n\t\tif( is_post_type_archive( 'noo_job' )\n\t\t\t|| is_tax( 'job_category' )\n\t\t\t|| is_tax( 'job_type' )\n\t\t\t|| is_tax( 'job_tag' )\n\t\t\t|| is_tax( 'job_location' ) ) {\n\n\t\t\t$jobs_layout = noo_get_option('noo_jobs_layout', 'sidebar');\n\t\t\tif( $jobs_layout != 'fullwidth' ) {\n\t\t\t\treturn noo_get_option('noo_jobs_sidebar', 'sidebar-job');\n\t\t\t}\n\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t// Single Job\n\t\tif( is_singular( 'noo_job' ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t// WooCommerce Product\n\t\tif( NOO_WOOCOMMERCE_EXIST ) {\n\t\t\tif( is_product() ) {\n\t\t\t\t$product_layout = noo_get_option('noo_woocommerce_product_layout', 'same_as_shop');\n\t\t\t\t$sidebar = '';\n\t\t\t\tif ( $product_layout == 'same_as_shop' ) {\n\t\t\t\t\t$product_layout = noo_get_option('noo_shop_layout', 'fullwidth');\n\t\t\t\t\t$sidebar = noo_get_option('noo_shop_sidebar', '');\n\t\t\t\t} else {\n\t\t\t\t\t$sidebar = noo_get_option('noo_woocommerce_product_sidebar', '');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $product_layout == 'fullwidth' ) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $sidebar;\n\t\t\t}\n\n\t\t\t// Shop, Product Category, Product Tag, Cart, Checkout page\n\t\t\tif( is_shop() || is_product_category() || is_product_tag() ) {\n\t\t\t\t$shop_layout = noo_get_option('noo_shop_layout', 'fullwidth');\n\t\t\t\tif($shop_layout != 'fullwidth'){\n\t\t\t\t\treturn noo_get_option('noo_shop_sidebar', '');\n\t\t\t\t}\n\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Single post page\n\t\tif (is_single()) {\n\t\t\t// Check if there's overrode setting in this post.\n\t\t\t$post_id = get_the_ID();\n\t\t\t$override_setting = noo_get_post_meta($post_id, '_noo_wp_post_override_layout', false);\n\t\t\tif ($override_setting) {\n\t\t\t\t// overrode\n\t\t\t\t$overrode_layout = noo_get_post_meta($post_id, '_noo_wp_post_layout', 'fullwidth');\n\t\t\t\tif ($overrode_layout != 'fullwidth') {\n\t\t\t\t\treturn noo_get_post_meta($post_id, '_noo_wp_post_sidebar', 'sidebar-main');\n\t\t\t\t}\n\t\t\t} else{\n\n\t\t\t\t$post_layout = noo_get_option('noo_blog_post_layout', 'same_as_blog');\n\t\t\t\t$sidebar = '';\n\t\t\t\tif ($post_layout == 'same_as_blog') {\n\t\t\t\t\t$post_layout = noo_get_option('noo_blog_layout', 'sidebar');\n\t\t\t\t\t$sidebar = noo_get_option('noo_blog_sidebar', 'sidebar-main');\n\t\t\t\t} else {\n\t\t\t\t\t$sidebar = noo_get_option('noo_blog_post_sidebar', 'sidebar-main');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($post_layout == 'fullwidth'){\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $sidebar;\n\t\t\t}\n\n\t\t\treturn '';\n\t\t}\n\n\t\t// Archive page\n\t\tif( is_archive() ) {\n\t\t\t$archive_layout = noo_get_option('noo_blog_archive_layout', 'same_as_blog');\n\t\t\t$sidebar = '';\n\t\t\tif ($archive_layout == 'same_as_blog') {\n\t\t\t\t$archive_layout = noo_get_option('noo_blog_layout', 'sidebar');\n\t\t\t\t$sidebar = noo_get_option('noo_blog_sidebar', 'sidebar-main');\n\t\t\t} else {\n\t\t\t\t$sidebar = noo_get_option('noo_blog_archive_sidebar', 'sidebar-main');\n\t\t\t}\n\t\t\t\n\t\t\tif($archive_layout == 'fullwidth'){\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\t\n\t\t\treturn $sidebar;\n\t\t}\n\n\t\t// Archive, Index or Home\n\t\tif (is_home() || is_archive() || (is_front_page() && get_option('show_on_front') == 'posts')) {\n\t\t\t\n\t\t\t$blog_layout = noo_get_option('noo_blog_layout', 'sidebar');\n\t\t\tif ($blog_layout != 'fullwidth') {\n\t\t\t\treturn noo_get_option('noo_blog_sidebar', 'sidebar-main');\n\t\t\t}\n\t\t\t\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\treturn '';\n\t}",
"public function isNavbarOffcanvas()\r\n\t{\r\n\t\treturn $this->navbarOffcanvas;\r\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 }"
] | [
"0.7353241",
"0.68996406",
"0.67829204",
"0.66129977",
"0.6590218",
"0.65776527",
"0.6565056",
"0.6565056",
"0.653077",
"0.65107536",
"0.650736",
"0.64769024",
"0.64769024",
"0.6472891",
"0.6469332",
"0.64147216",
"0.6399931",
"0.6372368",
"0.6366004",
"0.63465744",
"0.63326794",
"0.62846476",
"0.62846476",
"0.6276519",
"0.62754214",
"0.6268043",
"0.62611294",
"0.62424874",
"0.622442",
"0.6216743",
"0.619158",
"0.6178747",
"0.61235476",
"0.6121923",
"0.61038554",
"0.6099731",
"0.60843503",
"0.60818946",
"0.60692805",
"0.6064571",
"0.6040694",
"0.603265",
"0.6031505",
"0.5979757",
"0.59598523",
"0.5954531",
"0.5937443",
"0.5895802",
"0.589283",
"0.5891303",
"0.5887378",
"0.5835409",
"0.582363",
"0.5817956",
"0.5816445",
"0.58124757",
"0.5805512",
"0.5805053",
"0.5792419",
"0.5786138",
"0.5781685",
"0.5771917",
"0.5763454",
"0.57582045",
"0.5749172",
"0.5726503",
"0.5711706",
"0.57050914",
"0.5702215",
"0.569751",
"0.5692711",
"0.56483996",
"0.5637494",
"0.56300604",
"0.5622993",
"0.5611764",
"0.5601024",
"0.55971926",
"0.55971014",
"0.55961573",
"0.5576315",
"0.55653954",
"0.55513006",
"0.5549357",
"0.55430955",
"0.55411536",
"0.5531344",
"0.5530403",
"0.55292016",
"0.5521817",
"0.55143046",
"0.5507582",
"0.55053335",
"0.54865795",
"0.548143",
"0.54757637",
"0.54756737",
"0.546966",
"0.5469051",
"0.5457852",
"0.54539347"
] | 0.0 | -1 |
this method is called when the module is being created | public function init()
{
// you may place code here to customize the module or the application
// import the module-level models and components
$this->setImport(array(
'admin.models.*',
'admin.components.*',
));
$this->layoutPath = Yii::getPathOfAlias('admin.views.layouts');
$this->layout = 'main';
$this->publishCssFile('admin.assets', '/styles.css');
//$this->publishJsFile('admin.assets', '/vendors/modernizr-2.6.2-respond-1.1.0.min.js');
Yii::app()->clientScript->registerCoreScript('jquery');
Yii::app()->clientScript->registerCoreScript('jquery.ui');
//$this->publishJsFile('admin.assets', '/vendors/jquery-1.9.1.min.js');
//$this->publishJsFile('admin.assets', '/vendors/jquery-ui-1.10.3.js');
//$this->publishJsFile('admin.assets', '/bootstrap/js/bootstrap.js');
//$this->publishJsFile('admin.assets', '/vendors/datatables/js/jquery.dataTables.min.js');
$this->publishJsFile('admin.assets', '/scripts.js');
//$this->publishJsFile('admin.assets', '/DT_bootstrap.js');
Yii::app()->errorHandler->errorAction = '/admin/default/error';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function init()\n {\n // you may place code here to customize the module or the application\n }",
"function on_creation() {\n $this->init();\n }",
"protected function onInit() {}",
"public function init() {\n // you may place code here to customize the module or the application\n\n $endName = Yii::app()->endName;\n $this->setImport(array(\n \"users.models.*\",\n \"points.models.*\",\n \"users.{$endName}.components.*\",\n ));\n Yii::app()->onModuleCreate(new CEvent($this));\n }",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"public function init ()\r\n {\r\n }",
"public function _init() {\r\n\r\n }",
"public function init ()\n {\n }",
"public function init ()\n {\n }",
"public function init()\n {\n \n \n }",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {\r\n\r\n\t\t}",
"public function init() {\r\n }",
"protected function init()\n {\n\n }",
"public function init() {\n \n }",
"public function init() {\n \n }",
"public function init() {\n \n }",
"protected function __onInit()\n\t{\n\t}",
"public function onModuleBoot()\n {\n }",
"protected function initialize() {}",
"protected function initialize() {}",
"protected function initialize() {}",
"protected function initialize() {}",
"public function init() {\n\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init()\r\n {\r\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init()\n {\n\n }",
"public function init()\n {\n\n }",
"public function init()\n {\n\n }",
"public function init()\n {\n\n }",
"public function init()\n {\n\n }",
"public function init()\n {\n\n }",
"public function init()\n {\n\n }",
"public function _init() {}",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }"
] | [
"0.7632283",
"0.72788334",
"0.7178431",
"0.71653306",
"0.71461445",
"0.71461445",
"0.71461445",
"0.71461445",
"0.7144346",
"0.7144346",
"0.7144346",
"0.7144346",
"0.7144346",
"0.7144346",
"0.71433365",
"0.71433365",
"0.7096021",
"0.7055633",
"0.70553154",
"0.70553154",
"0.70203674",
"0.7007035",
"0.7007035",
"0.7007035",
"0.7007035",
"0.7007035",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70068866",
"0.70048565",
"0.6999863",
"0.6998495",
"0.69922036",
"0.69922036",
"0.69922036",
"0.6988659",
"0.69659823",
"0.6963607",
"0.6963607",
"0.6963607",
"0.6963607",
"0.69423133",
"0.69364834",
"0.69364834",
"0.69364834",
"0.69364834",
"0.69364834",
"0.69364834",
"0.69364834",
"0.69364834",
"0.69364834",
"0.69364834",
"0.69364834",
"0.69364834",
"0.69364834",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6932153",
"0.6926334",
"0.692499",
"0.692499",
"0.692499",
"0.692499",
"0.692499",
"0.692499",
"0.692499",
"0.6924644",
"0.6896484",
"0.6896484",
"0.6896484"
] | 0.0 | -1 |
Registers any custom rule extensions | protected function registerRuleExtensions(RuleExtensionRegistry $ruleExtensionRegistry)
{
$ruleExtensionRegistry->registerRuleExtension(new Forbidden());
$ruleExtensionRegistry->registerRuleExtension(new ExactlyOne());
$ruleExtensionRegistry->registerRuleExtension(new Base64());
$ruleExtensionRegistry->registerRuleExtension(new MaxLength());
$ruleExtensionRegistry->registerRuleExtension(new MinLength());
$ruleExtensionRegistry->registerRuleExtension(new Url());
$ruleExtensionRegistry->registerRuleExtension(new Uuid());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function registerCustomValidationRules()\n {\n Validator::extend('platform', function ($attribute, $value, $parameters, $validator) {\n return Device::isPlatformValueOrAlias($value);\n });\n }",
"protected static function _registerCoreExtensions()\n {\n self::registerExtension('DublinCore');\n self::registerExtension('Content');\n self::registerExtension('Atom');\n self::registerExtension('Slash');\n self::registerExtension('WellFormedWeb');\n self::registerExtension('Thread');\n self::registerExtension('Podcast');\n }",
"public function addExtension(string $extension);",
"public function add_rule( WP_Autoload_Rule $rule );",
"protected function getExtensions()\r\n {\r\n return array(new ValidatorExtension(Validation::createValidator()));\r\n }",
"protected function addValidatorRules()\n {\n Validator::extend('jwt', function ($attribute, $value, $parameters) {\n return (new ValidJWT(Arr::first($parameters)))->passes($attribute, $value);\n });\n }",
"static protected function setup_extensions()\n\t{\n\t\treturn array('anavaro/eventmedals');\n\t}",
"final public static function register()\n {\n $ruleName = self::getRuleName();\n ValidatorValidator::extend($ruleName, static::class . '@performValidation');\n\n if (method_exists(static::class, 'replacer')) {\n ValidatorValidator::replacer($ruleName, static::class . '@replacer');\n }\n }",
"function registerHooks(): void\n{\n\tregister_activation_hook( __FILE__, __NAMESPACE__ . '\\\\flushRewriteRules' );\n\tregister_deactivation_hook( __FILE__, __NAMESPACE__ . '\\\\flushRewriteRules' );\n\tregister_uninstall_hook( __FILE__, __NAMESPACE__ . '\\\\flushRewriteRules' );\n}",
"protected function registerExtensions()\n {\n $apiResult = Event::fire('editor.extension.register');\n\n if (!is_array($apiResult)) {\n return;\n }\n\n foreach ($apiResult as $extensionClassName) {\n if (!is_string($extensionClassName)) {\n continue;\n }\n\n $this->extensionClassNames[] = $extensionClassName;\n }\n }",
"protected function register_rewrite_rules() {\n\t\tif ( ! empty( $this->rules ) ) {\n\t\t\tforeach ( $this->rules as $value ) {\n\t\t\t\tadd_rewrite_rule( $value['regex'], $value['replace'], $value['type'] );\n\t\t\t}\n\t\t}\n\t}",
"public function extensions();",
"public function extension() {}",
"public function extension();",
"private function setupRules()\n {\n // Validator::extend('rule', 'App\\Support\\Rules\\Rule@validate');\n // Validator::replacer('rule', 'App\\Support\\Rules\\Rule@message');\n }",
"protected function registerExtensions()\n {\n $this->app['extensions'] = $this->app->share(function ($app) {\n return new ExtensionBag($app['files'], $app['extensions.finder'], $app, [], $app['cache']);\n });\n\n $this->app->alias('extensions', 'Cartalyst\\Extensions\\ExtensionBag');\n }",
"private function loadExtensions(){\n\n // CSRF Extension\n $csrfGenerator = new UriSafeTokenGenerator();\n $csrfStorage = new NativeSessionTokenStorage();\n $csrfManager = new CsrfTokenManager($csrfGenerator, $csrfStorage); \n $csrfExtension = new CsrfExtension($csrfManager);\n \n $this->extensions[] = $csrfExtension;\n \n // HttpFoundation Extension\n $httpFoundation = new HttpFoundationExtension();\n $this->extensions[] = $httpFoundation;\n \n //Core\n $core = new CoreExtension();\n $this->extensions[] = $core;\n \n }",
"public function Extensions($extensions){\r\n foreach($extensions as $extension ){\r\n $this->Extension($extension);\r\n }\r\n }",
"public function addExtAddon($addon);",
"protected function customRules()\n {\n return [\n ['company', 'validateExpenseType'],\n ]; // todo\n }",
"function spl_autoload_extensions(?string $file_extensions): string {}",
"public function addCheckExtension($checkExtension) {\n $this->checkExtensions[] = $checkExtension;\n }",
"private function addRules()\n {\n $rules = [\n 'maintenance' => 'maintenance/index',\n 'maintenance/<_a:\\w+>' => 'maintenance/<_a>'\n ];\n $rules = (YII_DEBUG) ? ArrayHelper::merge($rules, [\n '<_m:debug>/<_c:\\w+>/<_a:\\w+>' => '<_m>/<_c>/<_a>',\n ]) : $rules;\n $urlManager = Yii::$app->urlManager;\n $urlManager->addRules($rules);\n }",
"protected function _loadExtensions()\n {\n }",
"protected function registerExtension()\n {\n $this->app->make('view')->addExtension($this->app->make('twig.extension'), 'twig', function () {\n return $this->app->make('twig.engine');\n });\n }",
"public function getMatchableExtensions();",
"abstract public function addRule(ValidationRule$rule);",
"private function addExtension($extension) {\n $extension = trim(strtolower($extension));\n $extension = preg_quote($extension, \"#\");\n\n if ($extension === \"jpg\" || $extension === \"jpeg\")\n $extension = \"jpe?g\";\n\n // don't add duplicates!\n if (!in_array($extension, $this->extensions)) {\n $this->extensions[] = $extension;\n }\n }",
"function allowed_extensions($url) {\n\n\t}",
"public function registerFile($extensions) {\r\n $extensions[] = __FILE__;\r\n return $extensions;\r\n }",
"protected function registerCustomValidations()\n {\n Validator::extend('old_password', function($attribute, $value, $parameters, $validator) {\n return Hash::check($value, $parameters[0]);\n });\n }",
"function add_extension() {\n\n require_once( dirname( __FILE__ ) . '/LFAPPS_Comments_Extension.php' );\n $this->ext = new LFAPPS_Comments_Extension();\n }",
"abstract public function register_hook_callbacks();",
"public static function loadCustomValidators(){\n\t\t// Preload all the validation rules you've linked up and plan to use.\n\t\t// This isn't done automatically. If it were, object inheritance might break.\n\t\t\n\t\tRun::fromFormValidators('CustomValidators/ValidPassword.php');\n\t}",
"protected function registerBladeExtensions()\n {\n $blade = $this->app['view']->getEngineResolver()->resolve('blade')->getCompiler();\n\n // JavaScripts extension\n $blade->extend(function($value, $compiler)\n {\n $matcher = $compiler->createMatcher('javascripts');\n\n return preg_replace($matcher, '$1<?php echo Assets::javascript$2; ?>', $value);\n });\n\n // Stylesheets extension\n $blade->extend(function($value, $compiler)\n {\n $matcher = $compiler->createMatcher('stylesheets');\n\n return preg_replace($matcher, '$1<?php echo Assets::stylesheet$2; ?>', $value);\n });\n }",
"public function Extension();",
"protected function loadBaseExtensions() {}",
"protected function setAvailableExtensions() {}",
"public function setExtension($ext);",
"abstract protected function register_hook_callbacks();",
"public function add_validation_methods(array $rules){\n $this->validation_methods = $rules;\n }",
"public function add_external_rule($regex, $query)\n {\n }",
"public function add($f, $ext_path, $ext_name = 'plugins')\n {\n if (in_array($ext_name, self::$extensions)) {\n return true;\n }\n $extension = array('name' => $f, 'base' => $ext_path);\n self::$extensions[$ext_name] = $extension;\n }",
"public function defaultAddons(){\n\t $this->addRule('oid.pen', function($in){\n\t \t $tok = '1.3.6.1.4.1';\n\t\t $tl = strlen($tok);\n\t\t $l = strlen($in);\n\t \t $r = valFormats::is($in,'oid'); \n\t \t return (false !== $r && $tok === substr($in,0,$tl) && $l > $tl) ? true : false;\n\t });\n\t \n\t $this->addRule('oid.weid', function($in){\n\t \t $tok = '1.3.6.1.4.1.37553.8';\n\t \t $r = valFormats::is($in,'oid'); \n\t \t return (false !== $r && $tok === substr($in,0,strlen($tok))) ? true : false;\n\t });\t\n\t \n\t $this->addRule('impolite', function($in){\n\t \t return (preg_match(\"/porn|fucker|sex|asshole/i\", $in)) ? true : false;\n\t });\t\n\t \n\t \n\t /**\n\t * german aliasis\n\t */\n\t $this->addRule('ungerade', function($in){\n\t \t return valFormats::create()->is($in, 'odd');\n\t });\t \t \n\n\t $this->addRule('gerade', function($in){\n\t \t return valFormats::create()->is($in, 'even');\n\t });\n\t \n\n\t $this->addRule('primzahl', function($in){\n\t \t return valFormats::create()->is($in, 'prime');\n\t });\t\n\t \n\t return $this;\t\t \t\t \t\n }",
"public function extend($extender_name);",
"public function register()\n {\n \\Sanitizer::extend('remove_special_chars', function ($value) {\n return preg_replace('/[^a-zA-Z0-9_ -]/s', '', $value);\n });\n }",
"public function getExtensionPoint();",
"public function validateExtensions($attribute){\n $infoFile = $this->$attribute;\n if (!in_array(pathinfo($infoFile['file']['name'], PATHINFO_EXTENSION), ['png', 'jpg', 'jpeg'])) {\n $this->addError($attribute, \\Yii::t('app', 'extensions',['attribute' => $this->attributeLabels()[$attribute]]));\n }\n }",
"public static function register()\n\t{\n\t\tglobal $modSettings;\n\n\t\tif (empty($modSettings['emoji_selection']) || $modSettings['emoji_selection'] === 'noemoji')\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\t// $hook, $function, $file\n\t\treturn [\n\t\t\t[\n\t\t\t\t'integrate_pre_bbc_parser',\n\t\t\t\t'\\\\ElkArte\\\\EmojiIntegrate::integrate_pre_bbc_parser'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'integrate_editor_plugins',\n\t\t\t\t'\\\\ElkArte\\\\EmojiIntegrate::integrate_editor_plugins'\n\t\t\t],\n\t\t];\n\t}",
"public function addRule(RuleIface $rule);",
"public function extensions(array $extensions) {\n $this->extensions = [];\n foreach ($extensions as $key => $value) {\n $this->addExtension($value);\n }\n }",
"public function register_hooks() {\n\t\t// This would only happen if a theme supports BOTH site-logo and custom-logo for some reason\n\t\tif ( current_theme_supports( 'custom-logo' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_action( 'wp_head', array( $this, 'head_text_styles' ) );\n\t\tadd_action( 'customize_register', array( $this, 'customize_register' ) );\n\t\tadd_action( 'customize_preview_init', array( $this, 'preview_enqueue' ) );\n\t\tadd_action( 'delete_attachment', array( $this, 'reset_on_attachment_delete' ) );\n\t\tadd_filter( 'body_class', array( $this, 'body_classes' ) );\n\t\tadd_filter( 'image_size_names_choose', array( $this, 'media_manager_image_sizes' ) );\n\t\tadd_filter( 'display_media_states', array( $this, 'add_media_state' ) );\n\t}",
"public function setValidExtensions($extensions) {\n\t\t$this->valid_extensions = $extensions;\n\t}",
"public function register_hooks() {\n\t\tadd_action( 'admin_init', [ $this, 'intercept_save_update_notification' ] );\n\t}",
"public function register()\n {\n $this->registerValidateMacro();\n }",
"public function activate_extension(){}",
"protected function add()\n {\n $this->numArgs = $this->findNumArgs($this->callback);\n if (is_string($this->callback) && class_exists($this->callback)) {\n $this->useCallbackManager('invoke', $this->callback);\n }\n foreach ((array) $this->hook as $hook) {\n \\add_filter($hook, $this->callback, $this->priority, $this->numArgs);\n }\n }",
"public function registerRules()\n {\n\n $routes = $this->getRoutes();\n if (!empty($routes)) {\n add_rewrite_tag('%' . $this->routeVariable . '%', '(.+)');\n foreach ($routes as $name => $route) {\n /** @var Route $route */\n $regex = $this->generateRouteRegex($route);\n $path = $route->getPath();\n\n $qs = $this->routeVariable . '=' . $name;\n if (strpos($path, '{') !== false) {\n preg_match_all('/{(.*?)}/', $path, $wildCardsMatchs);\n $wildCards = $wildCardsMatchs[1];\n if (!empty($wildCards)) {\n $cpt = 1;\n foreach ($wildCards as $wildCard) {\n $qs .= '&' . $wildCard . '=$matches[' . $cpt . ']';\n $cpt++;\n }\n }\n }\n $callable = $route->getCallable();\n if (is_callable($callable) || is_array($callable)) {\n $newRewriteRule = 'index.php?' . $qs;\n } else {\n $newRewriteRule = $callable;\n if (strpos($newRewriteRule, $this->routeVariable . '=' . $name) === false) {\n $newRewriteRule .= '&' . $this->routeVariable . '=' . $name;\n }\n }\n\n add_rewrite_rule($regex, $newRewriteRule, 'top');\n }\n }\n\n return $this;\n }",
"protected function registerExtensionsFinder()\n {\n $this->app['extensions.finder'] = $this->app->share(function ($app) {\n $paths = $app['config']->get('cartalyst.extensions.paths');\n\n return new FileFinder($app['files'], $paths);\n });\n }",
"public function add_hooks()\n {\n }",
"public function add_hooks()\n {\n }",
"protected function assignExtensionSettings() {}",
"public function registerRules(){\n \t// $this->applyValidationDateRange('start_event', 'end_event', 'editable_cierre');\n \t// $this->applyValidationTextMemo('desc_sol_comun', 3000, 0);\n \t$this->applyValidationClear('desc_sol_comun', 3000, 0);\n\t}",
"public function register(){\n\t\t$this->registerOptimusAsAlias();\n\t\t$this->registerCommand();\n\t}",
"public function allow($ext = NULL)\n {\n $this->_allow_extensions = $ext;\n }",
"public function getValidExtensions();",
"public function register()\n {\n $validator = app('validator');\n\n $validator->extend('prohibit', Prohibit::class);\n $validator->extend('equal', Equal::class);\n }",
"public function addValidator()\n {\n $this->app->validator->extendImplicit('recaptcha', function ($attribute, $value, $parameters) {\n $captcha = new Recaptcha();\n return $captcha->validate();\n }, config('Recaptcha.custom_error'));\n }",
"public static function register()\n\t{\n\t\tForm::extensionMethod('addTag', callback(__CLASS__, 'addTag'));\n\t}",
"public function addExtension($fromExt, $toExt)\n {\n $this->extensions[strtolower($fromExt)] = strtolower($toExt);\n }",
"public function register()\n {\n add_filter( 'upload_mimes', array( $this, 'add_custom_file_types_supprot' ) );\n\n // add svg support\n add_filter( 'wp_prepare_attachment_for_js', array( $this, 'add_svg_media_thumbnails' ), 10, 3 );\n\n // filter wordpress filetype security check\n add_filter('wp_check_filetype_and_ext', array( $this, 'wp_check_filetype_and_ext' ) , 5, 5);\n\n // Add Custom user fields to ccd_client user role\n add_action( 'show_user_profile', array( $this, 'add_custom_user_fields' ) );\n add_action( 'edit_user_profile', array( $this, 'add_custom_user_fields' ) );\n\n // handle custom user fields update / form post\n add_action( 'personal_options_update', array( $this, 'update_custom_user_fields' ) );\n add_action( 'edit_user_profile_update', array( $this, 'update_custom_user_fields' ) );\n }",
"protected function setDefaultRules()\n\t{\n\t\tif(empty($this->rules['FileExtension']['allowed']))\n\t\t\t$this->rules['FileExtension']['allowed'] = ['jpeg', 'jpg', 'png', 'gif'];\n\t}",
"public function testExtensionsWithScopedRoutes(): void\n {\n Router::extensions(['json']);\n\n $routes = Router::createRouteBuilder('/');\n $routes->scope('/', function (RouteBuilder $routes): void {\n $routes->setExtensions('rss');\n $routes->connect('/', ['controller' => 'Pages', 'action' => 'index']);\n\n $routes->scope('/api', function (RouteBuilder $routes): void {\n $routes->setExtensions('xml');\n $routes->connect('/docs', ['controller' => 'ApiDocs', 'action' => 'index']);\n });\n });\n\n $this->assertEquals(['json', 'rss', 'xml'], array_values(Router::extensions()));\n }",
"private function _add_hook($hook)\n\t{\n\t\tee()->db->insert('extensions', array(\n\t\t\t'class' => $this->class_name,\n\t\t\t'method' => $hook,\n\t\t\t'hook' => $hook,\n\t\t\t'settings' => serialize($this->settings),\n\t\t\t'priority' => 5,\n\t\t\t'version' => $this->version,\n\t\t\t'enabled' => 'y'\n\t\t));\n\t}",
"function iis7_add_rewrite_rule($filename, $rewrite_rule)\n {\n }",
"public static function add_rewrite_rule()\n {\n }",
"public function register_hooks() {\n\t\t\\add_action( 'admin_action_duplicate_post_check_changes', [ $this, 'check_changes_action_handler' ] );\n\t}",
"public function addRules(array $rules) : ValidatorInterface;",
"function extra_register_customizer_portability() {\n\tglobal $options;\n\n\t// Make sure the Portability is loaded.\n\tet_core_load_component( 'portability' );\n\n\t// Load ePanel options.\n\tet_load_core_options();\n\n\t// Exclude ePanel options.\n\t$exclude = array();\n\n\tforeach ( $options as $option ) {\n\t\tif ( isset( $option['id'] ) ) {\n\t\t\t$exclude[ $option['id'] ] = true;\n\t\t}\n\t}\n\n\t// Register the portability.\n\tet_core_portability_register( 'et_extra_mods', array(\n\t\t'name' => esc_html__( 'Extra Customizer Settings', 'Extra' ),\n\t\t'type' => 'options',\n\t\t'target' => 'et_extra',\n\t\t'exclude' => $exclude,\n\t\t'view' => is_customize_preview(),\n\t) );\n}",
"public function addEngine($engine, $extension)\n {\n if (isset($this->extensions[$extension])) {\n unset($this->extensions[$extension]);\n }\n\n $this->extensions = array_merge([$extension => $engine], $this->extensions);\n }",
"function gsCustomPageExtensions() {\r\n /* Load Langauge Files */\r\n $langDir = dirname(plugin_basename(__FILE__)) . '/lang';\r\n load_plugin_textdomain('custom-page-extensions', false, $langDir, $langDir);\r\n\r\n /* Set the plugin name to use the selected language. */\r\n $this->pluginName = __('Custom Page Extensions', 'custom-page-extensions');\r\n\r\n global $wp_rewrite;\r\n\r\n /* Plugin paths */\r\n $this->pluginPath = WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__));\r\n $this->pluginURL = WP_PLUGIN_URL . '/' . basename(dirname(__FILE__));\r\n\r\n // Get the extension.\r\n $this->load_settings();\r\n\r\n /* Add Options Pages and Links */\r\n add_action('admin_menu', array(&$this, 'admin_menu'));\r\n add_action('admin_init', array(&$this, 'admin_init'));\r\n add_action('update_option_' . $this->optionsName, array(&$this, 'update_option'), 10);\r\n add_action('wp_loaded', array(&$this, 'flush_rules'));\r\n\r\n add_filter('plugin_action_links', array(&$this, \"plugin_action_links\"), 10, 2);\r\n add_filter('user_trailingslashit', array(&$this, 'no_page_slash'), 66, 2);\r\n }",
"public function addParser(ParserContract $parser, string $extension): void\n {\n self::$supportedParsers[$extension] = $parser;\n }",
"private function injectExtensions(\n Environment $environment,\n ContainerInterface $container,\n array $extensions\n ): void {\n foreach ($extensions as $extension) {\n $extension = $this->loadExtension($extension, $container);\n\n if (! $environment->hasExtension($extension::class)) {\n $environment->addExtension($extension);\n }\n }\n }",
"public function attach_hooks() {\n\n\t\t$this->define_hooks();\n\n\t}",
"private function hooks() {\n\t\t// Register rewrite tags.\n\t\tadd_action( 'wct_add_rewrite_tags', array( $this, 'add_rewrite_tags' ) );\n\n\t\t// Register the rewrite rules\n\t\tadd_action( 'wct_add_rewrite_rules', array( $this, 'add_rewrite_rules' ) );\n\n\t\t// Register the permastructs\n\t\tadd_action( 'wct_add_permastructs', array( $this, 'add_permastructs' ) );\n\t}",
"public function add_rewrite_rules()\n {\n }",
"public function add_rewrite_rules()\n {\n }",
"protected function registerExtensionConfigurationErrorHandler() {}",
"protected function registerAdditionalNodeTypesFromConfiguration() {}",
"protected function addHookableConfigs()\n {\n // TODO: add hookable configs\n }",
"public function setExtensions(array $extensions)\n {\n foreach ($extensions as $extension) {\n $this->addExtension($extension);\n }\n }",
"public static function getExtensions()\n {\n }",
"protected function getExtensionsToLoad() {}",
"function woocommerce_admin_register_extension_scripts() {\n\trequire_once dirname( __FILE__ ) . '/extensions/add-report/add-report.php';\n}",
"public function activate_extension() {\n $hooks = array(\n 'template_post_parse' => 'template_post_parse'\n );\n foreach($hooks as $hook => $method) {\n $data = array(\n 'class' => __CLASS__,\n 'method' => $method,\n 'hook' => $hook,\n 'priority' => 10,\n 'version' => $this->version,\n 'enabled' => 'y',\n 'settings' => ''\n );\n ee()->db->insert('exp_extensions', $data);\n }\n return true;\n }",
"public function register(): void {\n\t\tif ( $this->type === 'script' ) {\n\t\t\t$this->register_script();\n\t\t}\n\n\t\tif ( $this->type === 'style' ) {\n\t\t\t$this->register_style();\n\t\t}\n\t}",
"public function attach_hooks() {\n\t\t$this->define_hooks();\n\t}",
"public function getAcceptExtensRegex();",
"public function setAllowedExtensions(array $extensions) {\n \t $this->allowedExtensions = $extensions;\n\t }",
"public function getExtensions();"
] | [
"0.62995833",
"0.60734963",
"0.6050026",
"0.59406465",
"0.59124744",
"0.5869441",
"0.58467513",
"0.5838353",
"0.5807829",
"0.5758012",
"0.5725592",
"0.5716446",
"0.5703893",
"0.5678612",
"0.5643395",
"0.56365854",
"0.5612093",
"0.5591013",
"0.5570018",
"0.5503729",
"0.5492288",
"0.5482022",
"0.54457366",
"0.54395944",
"0.5416087",
"0.54118377",
"0.53733474",
"0.5355762",
"0.53509265",
"0.5343615",
"0.5339652",
"0.5316317",
"0.5303375",
"0.5297172",
"0.52897674",
"0.52553445",
"0.5234583",
"0.5203336",
"0.51921177",
"0.51897365",
"0.5188149",
"0.51730824",
"0.5172421",
"0.51635915",
"0.51526284",
"0.51520693",
"0.51442134",
"0.5142002",
"0.51377594",
"0.51240504",
"0.51181746",
"0.5114529",
"0.5104902",
"0.51024085",
"0.5100991",
"0.50949895",
"0.50880253",
"0.5072284",
"0.50662977",
"0.5060643",
"0.5060643",
"0.5051556",
"0.5039166",
"0.50380075",
"0.50350034",
"0.5032304",
"0.5027065",
"0.50258505",
"0.5023045",
"0.5018393",
"0.50099885",
"0.5007492",
"0.50071365",
"0.5004275",
"0.5003521",
"0.49830315",
"0.4981573",
"0.49809825",
"0.49708265",
"0.49698478",
"0.49691644",
"0.4967143",
"0.49557224",
"0.49543488",
"0.49515912",
"0.4949641",
"0.4948811",
"0.49430597",
"0.49419963",
"0.49396804",
"0.49366844",
"0.49326363",
"0.49196628",
"0.49188346",
"0.49169257",
"0.49145472",
"0.4914057",
"0.49104527",
"0.49072054",
"0.4906126"
] | 0.6213242 | 1 |
Get read permission checker. | public static function getReadPermissionChecker()
{
return array(__CLASS__, 'onReadPermissionCheck');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function can_read () {\r\n\r\n return $this->permissions[\"R\"] ? true : false;\r\n\r\n }",
"function isReadable() { return $this->flagAccessRead; }",
"public function check_read_permission($post)\n {\n }",
"public function check_read_permission($post)\n {\n }",
"function read()\r\n {\r\n $right = right::get(\"rights\");\r\n if ($right & 1) return(TRUE);\r\n else return(FALSE);\r\n }",
"protected function check_read_permission($post)\n {\n }",
"public function getReadProtected() {\n\t\t$readProtected = FALSE;\n\t\tif ($this->getUsersWithReadAccess()->count() > 0) {\n\t\t\t$readProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithReadAccess()->count() > 0) {\n\t\t\t$readProtected = TRUE;\n\t\t}\n\n\t\treturn $readProtected;\n\t}",
"public function getReadPreference();",
"public function read(): bool\n {\n return $this->isAllowed(self::READ);\n }",
"public function checkPermissions();",
"protected function check_read_permission($status)\n {\n }",
"abstract public function getPermissions();",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"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}",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function & GetPermissions ();",
"static function getPermission($name) {\n return static::getPermissions()->get($name);\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"protected function check_read_permission($sidebar)\n {\n }",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"public function getEvaluatePermissions() {}",
"public function validate_read($func_name = '', $classname = '') {\n if(empty($classname)) {\n $classname = $this->getClassName();\n }\n $granted = $this->operationGranted($classname, $this->read, $func_name);\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function getPermissions();",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function permission(): string;",
"public function getIsRead()\n {\n return $this->isRead;\n }",
"public function getReadLevel()\n {\n return $this->read_level;\n }",
"public function getPermission($permission);",
"public function can_read($model)\n {\n return true;\n }",
"public function allowsRead()\n {\n if ($this->plus) {\n return true;\n }\n\n return $this->base == 'r';\n }",
"public function isReadable() {\n\t\treturn $this->pathway->getTitleObject()->userCan( 'read' );\n\t}",
"public function getReadPreference()\n {\n return $this->readPreference;\n }",
"protected function check_read_permission($comment, $request)\n {\n }",
"function getSystemPermission($name) {\n \t$role = $this->getRole();\n if(instance_of($role, 'Role')) {\n return (boolean) $role->getPermissionValue($name);\n } else {\n return false;\n } // if\n }",
"public function getReadOnlyFlag() {}",
"public static function uses_permissions(): bool;",
"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 isRead()\n {\n return $this->isRead;\n }",
"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 }",
"abstract public function permission(): string;",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"protected function getCurrentPermission() {}",
"function permissions_get ()\n{\n\tstatic $perms = array (\n\t\t\t\"read\"\t\t=> 0x0001,\n\t\t\t\"create\"\t=> 0x0002,\n\t\t\t\"change\"\t=> 0x0004,\n\t\t\t\"delete\"\t=> 0x0008,\n\t\t\t\"password\"\t=> 0x0040,\n\t\t\t\"admin\"\t\t=> 0x8000,\t// admin\n\t\t\t);\n\treturn $perms;\n}",
"final public function permission():int\n {\n return $this->permission;\n }",
"public function getWorkspacePermission() {}",
"public function isReadable() {}",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function isReadable(): bool;",
"public function checkFolderPermissionsFilesystemPermissionsDataProvider() {}",
"public function getPossiblePermissions();",
"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 static function CHECK_ACCESS_PERMISSION(){\n\t $SQL_String = \"SELECT uid,gid FROM permission_matrix WHERE uid=:uid AND master=1;\";\n\t return $SQL_String;\n\t}",
"public function isReadable();",
"public function getPermissions()\n {\n return $this->get(self::PERMISSIONS);\n }",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"public function my_rights($folder) {\n\n return $this->_get_acl($folder);\n }",
"public function isReadProtected() {\n\t\treturn $this->getReadProtected();\n\t}",
"public function getFileOperationPermissions() {}",
"public function hasAccess($permission);",
"function readableResources(){\n\n return $this->resourcesByPermission('read');\n }",
"public function isReadResource();",
"public function getRW() {}",
"public function getPermissions(): int\n {\n /** @psalm-suppress InvalidArgument */\n $stat = \\msg_stat_queue($this->queue);\n return $stat['msg_perm.mode'];\n }",
"private function getSettingsPermissions() {\n $settings_permissions_read_only = TRUE;\n // http://en.wikipedia.org/wiki/File_system_permissions.\n $writes = array('2', '3', '6', '7');\n $settings_file = './' . DrupalKernel::findSitePath(\\Drupal::request(), TRUE) . '/settings.php';\n $permissions = Unicode::substr(sprintf('%o', fileperms($settings_file)), -4);\n\n foreach ($writes as $bit) {\n if (strpos($permissions, $bit)) {\n $settings_permissions_read_only = FALSE;\n break;\n }\n }\n\n return $settings_permissions_read_only;\n }",
"function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = 0)\n {\n global $ilUser, $ilAccess;\n\n if ($a_user_id == 0) {\n $a_user_id = $ilUser->getId();\n }\n\n switch ($a_permission) {\n case \"read\":\n /*if (!ilObjUFreibFeedbackAccess::checkOnline($a_obj_id) &&\n !$ilAccess->checkAccessOfUser($a_user_id, \"write\", \"\", $a_ref_id))\n {\n return false;\n }*/\n break;\n }\n\n return true;\n }",
"public function isRead() {\n\t\treturn $this -> data['is_read'] == 1;\n\t}",
"function getPermissions(&$record){\n $auth =& Dataface_AuthenticationTool::getInstance();\n $user =& $auth->getLoggedInUser();\n if ( !isset($user) ) return Dataface_PermissionsTool::READ_ONLY();\n // if the user is null then nobody is logged in... read only\n $role = $user->val('Role');\n return Dataface_PermissionsTool::getRolePermissions($role);\n // Returns all of the permissions for the user's current role.\n }",
"static function getPermissions() {\n if(self::$permissions === false) {\n self::$permissions = new NamedList(array(\n\n ));\n\n EventsManager::trigger('on_system_permissions', array(&self::$permissions));\n } // if\n\n return self::$permissions;\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"public function can($permission);",
"protected function isPermissionCorrect() {}",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }",
"public function permissions()\n\t{\n\t\treturn $this->get('permissions');\n\t}",
"function checkAccess() ;",
"public function hasAccess(): bool;",
"public function isReadable()\n {\n }",
"public function isReadable()\n {\n $this->is_readable = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $r = substr($this->temp_files[$this->path]->permissions, 1, 1);\n\n if ($r == 'r') {\n $this->is_readable = true;\n } else {\n $this->is_readable = false;\n }\n\n return;\n }",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function isRead()\n {\n return $this->object->isRead();\n }",
"abstract protected function canAccess();",
"public function getPermissions()\n {\n return $this->fileStructure->mode;\n }",
"public function can_write () {\r\n\r\n return $this->permissions[\"W\"] ? true : false;\r\n\r\n }",
"public function getReadConcern()\n {\n return $this->readConcern;\n }"
] | [
"0.7392462",
"0.7036591",
"0.66918",
"0.66918",
"0.66576624",
"0.657163",
"0.65252495",
"0.6428532",
"0.6401286",
"0.63801414",
"0.63638514",
"0.62240356",
"0.6202258",
"0.6183938",
"0.6167421",
"0.61546487",
"0.61390316",
"0.6138477",
"0.6138477",
"0.61219746",
"0.61157024",
"0.61123794",
"0.61115503",
"0.6073331",
"0.60648257",
"0.60220087",
"0.60004425",
"0.60004425",
"0.59849584",
"0.59849584",
"0.59849584",
"0.5984017",
"0.5984017",
"0.5984017",
"0.59836084",
"0.59836084",
"0.59807825",
"0.5957515",
"0.59539896",
"0.5942634",
"0.593575",
"0.59053016",
"0.58953667",
"0.588894",
"0.5876648",
"0.58693194",
"0.58548486",
"0.5852563",
"0.58402896",
"0.5837956",
"0.5837077",
"0.5830914",
"0.5827465",
"0.5816008",
"0.5812765",
"0.57978773",
"0.57859874",
"0.5785941",
"0.5768264",
"0.57520664",
"0.57520664",
"0.57520664",
"0.57520664",
"0.57520664",
"0.5740482",
"0.57314724",
"0.5712833",
"0.56900907",
"0.56881726",
"0.56782454",
"0.56695664",
"0.5664467",
"0.56569874",
"0.56487143",
"0.5644417",
"0.5643823",
"0.56422335",
"0.56309134",
"0.562207",
"0.56141627",
"0.56112367",
"0.5609994",
"0.56025535",
"0.55981994",
"0.5597659",
"0.55659527",
"0.5565617",
"0.5558752",
"0.5535016",
"0.55344266",
"0.5533562",
"0.5529874",
"0.5527397",
"0.55232644",
"0.5521795",
"0.552143",
"0.5521345",
"0.5520555",
"0.55153614",
"0.5501403"
] | 0.79322946 | 0 |
On read permission check. | public static function onReadPermissionCheck(Result $result)
{
if (Security\User::current()->canView()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function check_read_permission($post)\n {\n }",
"public function check_read_permission($post)\n {\n }",
"public function check_read_permission($post)\n {\n }",
"protected function check_read_permission($status)\n {\n }",
"public function can_read () {\r\n\r\n return $this->permissions[\"R\"] ? true : false;\r\n\r\n }",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"protected function check_read_permission($sidebar)\n {\n }",
"function isReadable() { return $this->flagAccessRead; }",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function read(): bool\n {\n return $this->isAllowed(self::READ);\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"protected function check_permission()\n {\n return true;\n }",
"public function checkPermissions();",
"function read()\r\n {\r\n $right = right::get(\"rights\");\r\n if ($right & 1) return(TRUE);\r\n else return(FALSE);\r\n }",
"protected function check_read_permission($comment, $request)\n {\n }",
"protected function isPermissionCorrect() {}",
"function checkAccess() ;",
"abstract protected function canAccess();",
"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 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 doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"public function validate_read($func_name = '', $classname = '') {\n if(empty($classname)) {\n $classname = $this->getClassName();\n }\n $granted = $this->operationGranted($classname, $this->read, $func_name);\n }",
"function access() {\n\t\treturn true;\n\t}",
"protected function check_read_post_permission($post, $request)\n {\n }",
"function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = 0)\n {\n global $ilUser, $ilAccess;\n\n if ($a_user_id == 0) {\n $a_user_id = $ilUser->getId();\n }\n\n switch ($a_permission) {\n case \"read\":\n /*if (!ilObjUFreibFeedbackAccess::checkOnline($a_obj_id) &&\n !$ilAccess->checkAccessOfUser($a_user_id, \"write\", \"\", $a_ref_id))\n {\n return false;\n }*/\n break;\n }\n\n return true;\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 }",
"public function lock_read() {}",
"public function allowsRead()\n {\n if ($this->plus) {\n return true;\n }\n\n return $this->base == 'r';\n }",
"protected function _after_read(): void\n {\n //it is not supposed to be readable is the object is not readable\n //$this->get_object();//will trigger the permission denied if there is no permission to read the target object\n //TODO - add permission check\n //instantiating the object here may trigger a recursion as the object itself may be creating the alias in its _after_read\n }",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function rol_conductor_only_access()\n {\n if ($this->rol != 3) {\n exit($this->httpResponse(\"error\", \"forbbiden\", \"Your role do not have permission\", 403)->json());\n }\n }",
"public function can_read($model)\n {\n return true;\n }",
"private function checkReadable() {\n\t\tif ( !$this->isReadable() ) {\n\t\t\tthrow new Exception(\n\t\t\t\t\"Current user doesn't have permissions to view this pathway\"\n\t\t\t);\n\t\t}\n\t}",
"public function isReadProtected() {\n\t\treturn $this->getReadProtected();\n\t}",
"abstract public function require_access();",
"public function isReadable() {\n\t\treturn $this->pathway->getTitleObject()->userCan( 'read' );\n\t}",
"public function getReadProtected() {\n\t\t$readProtected = FALSE;\n\t\tif ($this->getUsersWithReadAccess()->count() > 0) {\n\t\t\t$readProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithReadAccess()->count() > 0) {\n\t\t\t$readProtected = TRUE;\n\t\t}\n\n\t\treturn $readProtected;\n\t}",
"public function checkPermissions() {\n if ($this->checkIp()) {\n \\BDSCore\\Errors\\Errors::returnError(403);\n }\n }",
"public function doesCheckModifyAccessListHookGetsCalled() {}",
"function checkWriteAccess() {\r\n\t\tif (!$this->hasWriteAccess()) throw new UserError(_(\"Vous n'avez pas les droits d'écriture sur cette annonce\"));\r\n\t}",
"public function isRead() {\n\t\treturn $this -> data['is_read'] == 1;\n\t}",
"public function rest_api_permission() {\n return apply_filters('h5p_rest_api_all_permission', current_user_can('edit_others_h5p_contents'));\n }",
"function el_access($attr, $path, $data, $volume)\n{\n\tglobal $cfg, $usr, $el_usr_limits, $el_pfs_size;\n\n\t// Hide files starting with dot\n\tif (strpos(basename($path), '.') === 0)\n\t{\n\t\t// set read+write to false, other (locked+hidden) set to true\n\t\treturn !($attr == 'read' || $attr == 'write');\n\t}\n\n\t// Check write permission\n\tif ($attr == 'write' && !$usr['auth_write'])\n\t{\n\t\treturn false;\n\t}\n\n\treturn null; // let elFinder decide it itself\n}",
"protected function getCurrentPermission() {}",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}",
"public static function uses_permissions(): bool;",
"public function hasAccess(): bool;",
"public function isAccess();",
"abstract public function permission(): string;",
"public function hasUsageRights() {}",
"public function hasAccess($permission);",
"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 onRead();",
"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 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 function isReadOnly() {}",
"public function isReadOnly() {}",
"public function isReadOnly() {}",
"abstract public function getPermissions();",
"public function can_write () {\r\n\r\n return $this->permissions[\"W\"] ? true : false;\r\n\r\n }",
"public function mikrotik_access() {\n\t\treturn true;\n\t}",
"function permissions() {\r\n\t\treturn false;\r\n\t}",
"public static function CHECK_ACCESS_PERMISSION(){\n\t $SQL_String = \"SELECT uid,gid FROM permission_matrix WHERE uid=:uid AND master=1;\";\n\t return $SQL_String;\n\t}",
"public function getReadOnlyFlag() {}",
"public function set_readable_check() {\n\n\t\t/* Nonce check */\n\t\tcheck_ajax_referer( 'wpcd-admin', 'nonce' );\n\n\t\t/* Permision check - unsure that this is needed since the action is not destructive and might cause issues if the user sees the message and can't dismiss it because they're not an admin. */\n\t\tif ( ! wpcd_is_admin() ) {\n\t\t\twp_send_json_error( array( 'msg' => __( 'You are not authorized to perform this action - dismiss readable check.', 'wpcd' ) ) );\n\t\t}\n\n\t\t/* All checks passed so set the transient */\n\t\tset_transient( 'wpcd_readable_check', 1, 12 * HOUR_IN_SECONDS );\n\t\twp_die();\n\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}",
"public function access($what = 'all') {\n\t\treturn FALSE;\n\t}",
"public function readable_check_again() {\n\n\t\t/* Nonce check */\n\t\tcheck_ajax_referer( 'wpcd-admin', 'nonce' );\n\n\t\t/* Permision check - unsure that this is needed since the action is not destructive and might cause issues if the user sees the message and can't dismiss it because they're not an admin. */\n\t\tif ( ! wpcd_is_admin() ) {\n\t\t\twp_send_json_error( array( 'msg' => __( 'You are not authorized to perform this action - do readable check again.', 'wpcd' ) ) );\n\t\t}\n\n\t\t$this->wpapp_admin_init();\n\n\t\tif ( get_transient( 'wpcd_readable_check' ) ) {\n\t\t\t$return = array(\n\t\t\t\t'message' => __( 'Readable check successful!', 'wpcd' ),\n\t\t\t);\n\t\t\twp_send_json_success( $return );\n\t\t} else {\n\t\t\t$return = array(\n\t\t\t\t'message' => __( 'Readable check failed!', 'wpcd' ),\n\t\t\t);\n\t\t\twp_send_json_error( $return );\n\t\t}\n\n\t\twp_die();\n\t}",
"public function hasRead()\n {\n return ($this->status == NOTIFICATION_VIEWED);\n }",
"public function setPermissions() {\r\n\t\tif ($this->canSave) {\r\n\t\t\t$this->canSave = $this->resource->checkPolicy('save');\r\n\t\t}\r\n\t\t$this->canEdit = $this->modx->hasPermission('edit_document');\r\n\t\t$this->canCreate = $this->modx->hasPermission('new_document');\r\n\t\t$this->canPublish = $this->modx->hasPermission('publish_document');\r\n\t\t$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));\r\n\t\t$this->canDuplicate = $this->resource->checkPolicy('save');\r\n\t}",
"public function index()\n {\n if (Auth::user()->ability('superadministrator', 'read-permissions')){\n return view('permission.read',[\n 'pageheader'=>'权限',\n 'pagedescription'=>'列表',\n 'permissions'=>Permission::all(),\n 'enableUpdate'=>Auth::user()->hasPermission('update-permissions'),\n 'enableDelete'=>Auth::user()->hasPermission('delete-permissions'),\n ]);\n }\n return abort(403,config('yyxt.permission_deny'));\n }",
"public function & GetPermissions ();",
"public function getFileOperationPermissions() {}",
"public function checkFolderPermissionsFilesystemPermissionsDataProvider() {}",
"function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = \"\")\n\t{\n\t\tglobal $ilUser, $ilAccess;\n\n\t\tif ($a_user_id == \"\")\n\t\t{\n\t\t\t$a_user_id = $ilUser->getId();\n\t\t}\n\n\t\t// add no access info item and return false if access is not granted\n\t\t// $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $a_text, $a_data = \"\");\n\t\t//\n\t\t// for all RBAC checks use checkAccessOfUser instead the normal checkAccess-method:\n\t\t// $ilAccess->checkAccessOfUser($a_user_id, $a_permission, $a_cmd, $a_ref_id)\n\n\t\treturn true;\n\t}",
"public function isRead(){\n $read = VolumeRead::where('user_id', Auth()->user()->id)->where('volume_id', $this->id)->first();\n if($read){\n return true;\n }\n return false;\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 hook_mm_ensure_node_access_check_perm_alter(&$permission, $item) {\n $path = key($item);\n switch ($path) {\n // Require elevated permissions for some path.\n case 'node/%/foo/bar':\n $permission = MM_PERMS_WRITE;\n break;\n // Remove the MM permission check for some other path.\n case 'node/%/baz/foo':\n $permission = '';\n break;\n }\n}",
"public function get_item_permissions_check($request)\n {\n }",
"public function readAction()\n {\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public function trylock_read() {}",
"public function isRead()\n {\n return $this->isRead;\n }",
"public function setRead() {\n\t\t$statement = Registry::get(\"database\") -> query(\"UPDATE messages SET is_read=1 WHERE id=?\");\n\t\t$statement -> bindParam(1, \t$this -> getId());\n\t\t$statement -> execute();\n\t}",
"function GST_setRead()\n\t{\n $this->GST_setClassDB();\n \n\t\t$query = $this->DB->query(\"UPDATE guestbook SET condition='READ' WHERE condition!='REPLIED' AND user_GUID='\".$this->user_GUID.\"'\");\n $query->run();\n \n\t\treturn $query->affected_rows;\n\t}"
] | [
"0.7861233",
"0.78550017",
"0.78550017",
"0.75949556",
"0.74207586",
"0.72818285",
"0.72066045",
"0.7181149",
"0.71709603",
"0.71709603",
"0.7170915",
"0.7170915",
"0.7170915",
"0.7170398",
"0.7170398",
"0.7170398",
"0.70791113",
"0.701246",
"0.694722",
"0.6911423",
"0.68546724",
"0.68185633",
"0.6809433",
"0.6762935",
"0.6729386",
"0.66009843",
"0.65824735",
"0.6574456",
"0.6570994",
"0.6569224",
"0.6541504",
"0.65137327",
"0.65076673",
"0.6486625",
"0.6479583",
"0.64426434",
"0.64386946",
"0.64336693",
"0.64080894",
"0.6396699",
"0.6396699",
"0.6396699",
"0.6396699",
"0.6396699",
"0.63959944",
"0.63924474",
"0.63711727",
"0.6351882",
"0.6341446",
"0.63181895",
"0.6306149",
"0.6283274",
"0.62768173",
"0.6253825",
"0.62376505",
"0.62240726",
"0.6217426",
"0.6211036",
"0.62069774",
"0.6193557",
"0.61717576",
"0.61631244",
"0.6128659",
"0.6127396",
"0.6102349",
"0.60947746",
"0.6087685",
"0.60875",
"0.6082221",
"0.60768473",
"0.60768473",
"0.6076573",
"0.6068208",
"0.6050908",
"0.6028624",
"0.6028164",
"0.6020917",
"0.6014974",
"0.60028934",
"0.5993209",
"0.59930736",
"0.59893435",
"0.5985109",
"0.59806406",
"0.5978191",
"0.5969402",
"0.5969107",
"0.5967509",
"0.5964534",
"0.5959344",
"0.5957951",
"0.5951966",
"0.5951135",
"0.5947472",
"0.5946547",
"0.5946547",
"0.5943729",
"0.5940847",
"0.5928542",
"0.5927949"
] | 0.60835135 | 68 |
Get write permission checker. | public static function getWritePermissionChecker()
{
return array(__CLASS__, 'onWritePermissionCheck');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function can_write () {\r\n\r\n return $this->permissions[\"W\"] ? true : false;\r\n\r\n }",
"public function canWrite(){\n\t\treturn is_writable($this->file);\n\t}",
"public function isWriteable(): bool;",
"public function isWriteable()\n {\n $this->is_writable = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $w = substr($this->temp_files[$this->path]->permissions, 2, 1);\n\n if ($w == 'w') {\n $this->is_writable = true;\n } else {\n $this->is_writable = false;\n }\n\n return;\n }",
"public function getWriteProtected() {\n\t\t$writeProtected = FALSE;\n\t\tif ($this->getUsersWithWriteAccess()->count() > 0) {\n\t\t\t$writeProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithWriteAccess()->count() > 0) {\n\t\t\t$writeProtected = TRUE;\n\t\t}\n\n\t\treturn $writeProtected;\n\t}",
"function checkWriteAccess() {\r\n\t\tif (!$this->hasWriteAccess()) throw new UserError(_(\"Vous n'avez pas les droits d'écriture sur cette annonce\"));\r\n\t}",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function canWriteFiles()\n {\n return is_writable(__FILE__);\n }",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function checkPermissions();",
"public function isWritable() {}",
"public function isWritable() {}",
"public function isWritable() {}",
"public function isWritable() {}",
"public function writable()\n\t{\n\t\tif($this->exists()) // file exists check if writable\n\t\t{\n\t\t\treturn parent::writable();\n\t\t}\n\n\t\t// new file, check if directory writable\n\t\treturn $this->__getDir()->writable();\n\t}",
"public function isWritable()\n {\n return $this->writable;\n }",
"protected function checkPermissions () {\n foreach ($this->aSequences as $sType => $aActions) {\n foreach ($aActions as $sAction => $aAction) {\n if (!empty($sAction)) {\n foreach ($aAction as $sIdent => $aFile) {\n if (!$this->isWriteable($aFile)) {\n throw MLException::factory(\n 'update', \n 'File `{#path}` is not writable.', \n 1407759765\n )->setData(array('path' => MLHelper::getFilesystemInstance()->getFullPath($aFile['dst'])));\n }\n }\n }\n }\n }\n return $this;\n }",
"function isWritable() ;",
"public function isWritable() {\n\t\treturn $this->writable;\n\t}",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"function check_writable_perms($list = 'must_write')\n\t{\n\t\t$bad_files = array();\n\t\t\n\t\t$system_dirs = $this->e107->e107_dirs;\n\t\t$system_dirs['MEDIA_DIRECTORY'] = str_replace(\"[hash]/\",\"\", $system_dirs['MEDIA_DIRECTORY']);\n\t\t$system_dirs['SYSTEM_DIRECTORY'] = str_replace(\"[hash]/\",\"\", $system_dirs['SYSTEM_DIRECTORY']);\n\t\t\n\t\t$data['must_write'] = 'e107_config.php|{$MEDIA_DIRECTORY}|{$SYSTEM_DIRECTORY}'; // all-sub folders are created on-the-fly\n\t\t\n\t\t$data['can_write'] = '{$PLUGINS_DIRECTORY}|{$THEMES_DIRECTORY}|{$WEB_DIRECTORY}cache|{$WEB_DIRECTORY}lib';\n\t\tif (!isset($data[$list])) return $bad_files;\n\t\tforeach ($system_dirs as $dir_name => $value)\n\t\t{\n\t\t\t$find[] = \"{\\${$dir_name}}\";\n\t\t\t$replace[] = \"./$value\";\n\t\t}\n\t\t$data[$list] = str_replace($find, $replace, $data[$list]);\n\t\t$files = explode(\"|\", trim($data[$list]));\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\tif(!is_writable($file))\n\t\t\t{\n\t\t\t\t$bad_files[] = str_replace(\"./\", \"\", $file);\n\t\t\t}\n\t\t}\n\t\treturn $bad_files;\n\t}",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public function checkIsWritable($path);",
"function write()\r\n {\r\n $right = right::get(\"rights\");\r\n if ($right & 2) return(TRUE);\r\n else return(FALSE);\r\n }",
"public function writable()\n {\n return is_writable($this->path);\n }",
"public function getWorkspacePermission() {}",
"public function isWritable()\n {\n return $this->adapter->isWritable($this->path);\n }",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function can_read () {\r\n\r\n return $this->permissions[\"R\"] ? true : false;\r\n\r\n }",
"public static function uses_permissions(): bool;",
"public function isWritable()\n {\n }",
"private function getSettingsPermissions() {\n $settings_permissions_read_only = TRUE;\n // http://en.wikipedia.org/wiki/File_system_permissions.\n $writes = array('2', '3', '6', '7');\n $settings_file = './' . DrupalKernel::findSitePath(\\Drupal::request(), TRUE) . '/settings.php';\n $permissions = Unicode::substr(sprintf('%o', fileperms($settings_file)), -4);\n\n foreach ($writes as $bit) {\n if (strpos($permissions, $bit)) {\n $settings_permissions_read_only = FALSE;\n break;\n }\n }\n\n return $settings_permissions_read_only;\n }",
"public function canWrite() {\n\t\tif (empty($_SESSION['tokens']['fb'])) return false;\n\t\tif (empty($_SESSION['user']['fb']['permissions'])) return false;\n\t\treturn in_array('publish_actions', $_SESSION['user']['fb']['permissions']);\n\t}",
"function writable() {\n\t\treturn is_file($this->path) && is_writable($this->path);\n\t}",
"function hasWriteAccess() {\r\n\t\treturn (\r\n\t\t\t\t$this->annonce->associationID == $this->extendedProfile->userID ||\r\n\t\t\t\t$this->extendedProfile instanceof ProfileNiceBenevolat);\r\n\t}",
"function fn_check_writable_path_permissions($path)\n{\n if (is_writable($path)) {\n $result = true;\n\n } elseif (is_dir($path)) {\n $result = $path;\n\n } else {\n $result = call_user_func(__FUNCTION__, dirname($path));\n }\n\n return $result;\n}",
"public function isWritable()\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\treturn is_writable($this->directory);\n\t}",
"public function permission(): string;",
"final public function permission():int\n {\n return $this->permission;\n }",
"public function getDirectoryPermissionStatus()\n {\n $ok = true;\n try {\n $mageFile = new Varien_Io_File();\n $mageFile->checkAndCreateFolder(Mage::getBaseDir(Emv_Core_Helper_Data::BASE_CONTAINER));\n $mageFile->checkAndCreateFolder(\n Mage::getBaseDir(Emv_Core_Helper_Data::BASE_CONTAINER)\n . DS . Emv_Core_Helper_Data::BASE_WORKING_DIR\n );\n } catch (Exception $e) {\n $ok = false;\n }\n\n $message = '';\n if ($ok) {\n $image = $this->_getTickImageLink();\n $message = Mage::helper('emvcore')->__(\n '<span class=\"icon-status\">%s</span> Write permission is correctly set to <strong>%s</strong>.',\n $image,\n Mage::getBaseDir(Emv_Core_Helper_Data::BASE_CONTAINER)\n );\n } else {\n $image = $this->_getUnTickImageLink();\n $message = Mage::helper('emvcore')->__(\n '<span class=\"icon-status\">%s</span> Write permission is not correctly set to <strong>%s</strong>.',\n $image,\n Mage::getBaseDir(Emv_Core_Helper_Data::BASE_CONTAINER)\n );\n }\n return $message;\n }",
"public function isWritable() : bool\n\t{\n\t\tif (!self::exists($this->path))\n\t\t\treturn false;\n\t\t\n\t\treturn (is_writable($this->path));\n\t}",
"public function isWritable(string $path): bool;",
"public function isWritable()\n {\n if (!$this->metadata) {\n return false;\n }\n\n $mode = $this->metadata['mode'];\n\n return (\n strstr($mode, 'x')\n || strstr($mode, 'w')\n || strstr($mode, 'c')\n || strstr($mode, 'a')\n || strstr($mode, '+')\n );\n }",
"public function isWritable(): bool\n {\n return is_writable($this->directory->getPath().'/'.$this->filename);\n }",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"function getWritable($creator, $user, $room)\n{\n // Always allowed to modify your own stuff\n if(strcasecmp($creator, $user) == 0)\n {\n return 1;\n }\n \n // Otherwise you have to be a (booking) admin for this room\n if (auth_book_admin($user, $room))\n {\n return 1;\n }\n \n // Unathorised access\n return 0;\n}",
"function Pico_IsWritable($file, $update_perms = false)\n{\n\tif ( (!file_exists($file)) or (is_file($file)) )\n\t{\n\t\t// check to see if parent folder is writable\n\t\t$parent_dir = dirname($file);\n\t\t\n\t\tif (is_writable($parent_dir))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telseif ($update_perms == TRUE)\n\t\t{\n\t\t\t// atempt to make writable\n\t\t\tif (is_dir($parent_dir))\n\t\t\t{\n\t\t\t\t$folder_is_writable = Pico_IsWritable($parent_dir, TRUE);\n\t\t\t\treturn $folder_is_writable;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t$is_writable = is_writable($file);\n\t\n\tif (!$is_writable)\n\t{\n\t\tif ($update_perms == TRUE)\n\t\t{\n\t\t\t// try to connect via FTP and make this file writable\n\t\t\t$ftp = @Pico_ConnectFTP();\n\t\t\tif (!is_object($ftp))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (is_file($file))\n\t\t\t\t{\n\t\t\t\t\t@$ftp->chmod($file, 0666);\n\t\t\t\t}\n\t\t\t\telseif (is_dir($file))\n\t\t\t\t{\n\t\t\t\t\t@$ftp->chmod($file, 0777);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (is_writable($file))\n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn TRUE;\n\t}\n}",
"public function & GetPermissions ();",
"public function isWritable()\n {\n if (in_array($this->mode, ['r+', 'w', 'w+', 'a', 'a+', 'x', 'x+', 'c', 'c+'])) {\n return true;\n }\n return false;\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}",
"public function isWritable() {\n\n $folder = new Folder($this->root());\n\n if(!$folder->isWritable()) return false;\n\n foreach($folder->files() as $f) {\n if(!$f->isWritable()) return false;\n }\n\n return true;\n\n }",
"static function getPermissions() {\n if(self::$permissions === false) {\n self::$permissions = new NamedList(array(\n\n ));\n\n EventsManager::trigger('on_system_permissions', array(&self::$permissions));\n } // if\n\n return self::$permissions;\n }",
"protected function buildSetterPermission() {\n }",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function isWriteable(string $path): bool;",
"public function isWriteOnly(): bool\n {\n return $this->getPhanFlagsHasState(Flags::IS_WRITE_ONLY);\n }",
"public function IsWriter() {\n\t\t$user = self::GetUserProfile();\n\t\t$ifWriter = false;\n\t\t\n\t\t\n\t\tif($this->IsAuthenticated()) {\n\t\t\tforeach($user['groups'] as $val) {\n\t\t\t\tif($val['akronym'] == 'writer' || $val['akronym'] == 'admin')\n\t\t\t\t\t$ifWriter=true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ifWriter;\n\t}",
"public function isWriteProtected() {\n\t\treturn $this->getWriteProtected();\n\t}",
"public function isFilesystemWritable($correct_permissions = false)\n {\n $dir_root = Registry::get('config.dir.root');\n $checking_result = self::checkFileAccess($dir_root . '/config.local.php', self::WRITABLE, $correct_permissions);\n $checking_result = $checking_result & self::checkFileAccess($dir_root . '/images', self::WRITABLE, $correct_permissions);\n $checking_result = $checking_result & self::checkFileAccess($dir_root . '/design', self::WRITABLE, $correct_permissions);\n $checking_result = $checking_result & self::checkFileAccess($dir_root . '/var', self::WRITABLE, $correct_permissions);\n\n return $checking_result;\n }",
"public function getFileOperationPermissions() {}",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\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 }",
"public function check_read_permission($post)\n {\n }",
"public function check_read_permission($post)\n {\n }",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"function writable($file)\n{\n\treturn (file_exists($file) && is_writable($file));\n}",
"public function isWritable()\n {\n return false;\n }",
"public function getPermissions()\n {\n return $this->get(self::PERMISSIONS);\n }",
"public function checkFolderPermissionsFilesystemPermissionsDataProvider() {}",
"public function isWritable()\n {\n if (!is_writable($this->root)) {\n return false;\n }\n return true;\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"abstract public function permission(): string;",
"public static function getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"abstract public function getPermissions();",
"public function can($permission);",
"public function isWritable() {\n throw new Exception('Not implemented yet');\n }",
"public function perms()\n {\n if ($this->exists()) {\n return substr(sprintf('%o', fileperms($this->path)), -4);\n }\n\n return false;\n }",
"public function is_writable($file);",
"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 setPermissions() {\r\n\t\tif ($this->canSave) {\r\n\t\t\t$this->canSave = $this->resource->checkPolicy('save');\r\n\t\t}\r\n\t\t$this->canEdit = $this->modx->hasPermission('edit_document');\r\n\t\t$this->canCreate = $this->modx->hasPermission('new_document');\r\n\t\t$this->canPublish = $this->modx->hasPermission('publish_document');\r\n\t\t$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));\r\n\t\t$this->canDuplicate = $this->resource->checkPolicy('save');\r\n\t}",
"public function permission($permission);",
"public function getEvaluatePermissions() {}",
"public function hasAccess($permission);",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public static function CHECK_ACCESS_PERMISSION(){\n\t $SQL_String = \"SELECT uid,gid FROM permission_matrix WHERE uid=:uid AND master=1;\";\n\t return $SQL_String;\n\t}",
"protected function check_read_permission($post)\n {\n }",
"protected function checkPermissions()\n\t{\n\t\t$result = true;\n\n\t\t$CrmPerms = new CCrmPerms($GLOBALS['USER']->GetID());\n\t\tif (!$CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'WRITE'))\n\t\t{\n\t\t\t$this->errors['FATAL'][] = Loc::getMessage('CRM_CLE2_PERMISSION_DENIED');\n\t\t\t$result = false;\n\t\t}\n\n\t\treturn $result;\n\t}",
"protected function isPermissionCorrect() {}",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"private function isWritable(): bool\n {\n return BackendExtensionsModel::isWritable(FRONTEND_PATH . '/Themes');\n }",
"public static function getModifySegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"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}",
"public function getPermissions();"
] | [
"0.7644738",
"0.6752038",
"0.6724825",
"0.67009765",
"0.6555009",
"0.6518307",
"0.6468478",
"0.6432084",
"0.6390556",
"0.63715786",
"0.63186526",
"0.63186526",
"0.6317494",
"0.6317494",
"0.63150537",
"0.6287586",
"0.6266522",
"0.6256065",
"0.6205228",
"0.6195523",
"0.61613965",
"0.6158627",
"0.6153562",
"0.61414504",
"0.6131202",
"0.61147374",
"0.6108658",
"0.608939",
"0.6088227",
"0.6077823",
"0.60647243",
"0.6062797",
"0.6062357",
"0.6055131",
"0.60407877",
"0.60188866",
"0.6001854",
"0.59978586",
"0.59894216",
"0.59522766",
"0.5940832",
"0.59379625",
"0.5908487",
"0.58633375",
"0.5855596",
"0.58432215",
"0.5840967",
"0.5833063",
"0.58284694",
"0.5826755",
"0.582588",
"0.5823581",
"0.58192563",
"0.5809671",
"0.5808572",
"0.5807432",
"0.57959473",
"0.57956874",
"0.5792481",
"0.57922566",
"0.57867295",
"0.5780715",
"0.5780575",
"0.5765919",
"0.57497126",
"0.57497126",
"0.5749553",
"0.5737487",
"0.5717335",
"0.5715866",
"0.5710861",
"0.5710215",
"0.5694788",
"0.5694788",
"0.5693006",
"0.5677803",
"0.56625175",
"0.56538475",
"0.56515634",
"0.5651471",
"0.5640139",
"0.5639759",
"0.56358135",
"0.5629827",
"0.56276727",
"0.561969",
"0.56194466",
"0.56194466",
"0.56194466",
"0.56194466",
"0.56194466",
"0.5616726",
"0.5612984",
"0.5597385",
"0.55944204",
"0.55922425",
"0.55842054",
"0.55782294",
"0.5568016",
"0.5562781"
] | 0.8053417 | 0 |
On write permission check. | public static function onWritePermissionCheck(Result $result)
{
if (Security\User::current()->canEdit()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkWriteAccess() {\r\n\t\tif (!$this->hasWriteAccess()) throw new UserError(_(\"Vous n'avez pas les droits d'écriture sur cette annonce\"));\r\n\t}",
"public function can_write () {\r\n\r\n return $this->permissions[\"W\"] ? true : false;\r\n\r\n }",
"public function enforceOnWrite() { return true; }",
"public function isWriteable()\n {\n $this->is_writable = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $w = substr($this->temp_files[$this->path]->permissions, 2, 1);\n\n if ($w == 'w') {\n $this->is_writable = true;\n } else {\n $this->is_writable = false;\n }\n\n return;\n }",
"public function canWrite(){\n\t\treturn is_writable($this->file);\n\t}",
"function hasWriteAccess() {\r\n\t\treturn (\r\n\t\t\t\t$this->annonce->associationID == $this->extendedProfile->userID ||\r\n\t\t\t\t$this->extendedProfile instanceof ProfileNiceBenevolat);\r\n\t}",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"public function isWriteable(): bool;",
"public function canWriteFiles()\n {\n return is_writable(__FILE__);\n }",
"function write()\r\n {\r\n $right = right::get(\"rights\");\r\n if ($right & 2) return(TRUE);\r\n else return(FALSE);\r\n }",
"public function isWriteOnly(): bool\n {\n return $this->getPhanFlagsHasState(Flags::IS_WRITE_ONLY);\n }",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"public function canWrite() {\n\t\tif (empty($_SESSION['tokens']['fb'])) return false;\n\t\tif (empty($_SESSION['user']['fb']['permissions'])) return false;\n\t\treturn in_array('publish_actions', $_SESSION['user']['fb']['permissions']);\n\t}",
"private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t}",
"public function checkIsWritable($path);",
"protected function check_permission()\n {\n return true;\n }",
"public function is_writable($path)\n {\n }",
"public function is_writable($path)\n {\n }",
"public function is_writable($path)\n {\n }",
"public function is_writable($path)\n {\n }",
"public function is_writable($path)\n {\n }",
"protected function isPermissionCorrect() {}",
"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 isWritable() ;",
"public function checkPermissions();",
"public function isWritable() {}",
"public function isWritable() {}",
"public function isWritable() {}",
"public function isWritable() {}",
"public function writable()\n\t{\n\t\tif($this->exists()) // file exists check if writable\n\t\t{\n\t\t\treturn parent::writable();\n\t\t}\n\n\t\t// new file, check if directory writable\n\t\treturn $this->__getDir()->writable();\n\t}",
"public function isWritable()\n {\n }",
"public function isWritable()\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\treturn is_writable($this->directory);\n\t}",
"public function SavePermissions()\n\t{\n\t\treturn true;\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() {}",
"public function isWriteProtected() {\n\t\treturn $this->getWriteProtected();\n\t}",
"public function setPermissions() {\r\n\t\tif ($this->canSave) {\r\n\t\t\t$this->canSave = $this->resource->checkPolicy('save');\r\n\t\t}\r\n\t\t$this->canEdit = $this->modx->hasPermission('edit_document');\r\n\t\t$this->canCreate = $this->modx->hasPermission('new_document');\r\n\t\t$this->canPublish = $this->modx->hasPermission('publish_document');\r\n\t\t$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));\r\n\t\t$this->canDuplicate = $this->resource->checkPolicy('save');\r\n\t}",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"protected function checkPermissions () {\n foreach ($this->aSequences as $sType => $aActions) {\n foreach ($aActions as $sAction => $aAction) {\n if (!empty($sAction)) {\n foreach ($aAction as $sIdent => $aFile) {\n if (!$this->isWriteable($aFile)) {\n throw MLException::factory(\n 'update', \n 'File `{#path}` is not writable.', \n 1407759765\n )->setData(array('path' => MLHelper::getFilesystemInstance()->getFullPath($aFile['dst'])));\n }\n }\n }\n }\n }\n return $this;\n }",
"public function isWritable()\n {\n return $this->adapter->isWritable($this->path);\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 allowsWrite()\n {\n if ($this->plus) {\n return true;\n }\n\n return $this->base != 'r';\n }",
"protected function editLockPermissions() {}",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}",
"function folder_is_writable(string $folder)\n{\n if (file_exists($folder)) {\n if (!is_writable($folder)) {\n throw new Exception(\"no_rights\", 1);\n } else {\n return true;\n }\n }\n return false;\n}",
"public function checkPermissions() {\n if ($this->checkIp()) {\n \\BDSCore\\Errors\\Errors::returnError(403);\n }\n }",
"public function isWritable(): bool\n {\n return is_writable($this->directory->getPath().'/'.$this->filename);\n }",
"public function check_read_permission($post)\n {\n }",
"public function check_read_permission($post)\n {\n }",
"protected function check_read_permission($post)\n {\n }",
"function check_permission()\n\t{\n\t\t$CFG = $this->config->item('language_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 check_writable_perms($list = 'must_write')\n\t{\n\t\t$bad_files = array();\n\t\t\n\t\t$system_dirs = $this->e107->e107_dirs;\n\t\t$system_dirs['MEDIA_DIRECTORY'] = str_replace(\"[hash]/\",\"\", $system_dirs['MEDIA_DIRECTORY']);\n\t\t$system_dirs['SYSTEM_DIRECTORY'] = str_replace(\"[hash]/\",\"\", $system_dirs['SYSTEM_DIRECTORY']);\n\t\t\n\t\t$data['must_write'] = 'e107_config.php|{$MEDIA_DIRECTORY}|{$SYSTEM_DIRECTORY}'; // all-sub folders are created on-the-fly\n\t\t\n\t\t$data['can_write'] = '{$PLUGINS_DIRECTORY}|{$THEMES_DIRECTORY}|{$WEB_DIRECTORY}cache|{$WEB_DIRECTORY}lib';\n\t\tif (!isset($data[$list])) return $bad_files;\n\t\tforeach ($system_dirs as $dir_name => $value)\n\t\t{\n\t\t\t$find[] = \"{\\${$dir_name}}\";\n\t\t\t$replace[] = \"./$value\";\n\t\t}\n\t\t$data[$list] = str_replace($find, $replace, $data[$list]);\n\t\t$files = explode(\"|\", trim($data[$list]));\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\tif(!is_writable($file))\n\t\t\t{\n\t\t\t\t$bad_files[] = str_replace(\"./\", \"\", $file);\n\t\t\t}\n\t\t}\n\t\treturn $bad_files;\n\t}",
"public function is_writable($file);",
"public function testUpdatePermissionSet()\n {\n }",
"public function isWritable() : bool\n\t{\n\t\tif (!self::exists($this->path))\n\t\t\treturn false;\n\t\t\n\t\treturn (is_writable($this->path));\n\t}",
"public function checkWriteAccess($oObj, $aData = null)\n {\n return;\n\n if ($oObj->isDerived()) {\n throw new Exception(oxERPBase::$ERROR_USER_NO_RIGHTS);\n }\n }",
"protected function fixPermission() {}",
"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 isWriteable(string $path): bool;",
"public function writable()\n {\n return is_writable($this->path);\n }",
"function writable() {\n\t\treturn is_file($this->path) && is_writable($this->path);\n\t}",
"function writable($file)\n{\n\treturn (file_exists($file) && is_writable($file));\n}",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public function isWritable()\n {\n return false;\n }",
"public function isWritable() {\n\n $folder = new Folder($this->root());\n\n if(!$folder->isWritable()) return false;\n\n foreach($folder->files() as $f) {\n if(!$f->isWritable()) return false;\n }\n\n return true;\n\n }",
"public function isWritable()\n {\n return $this->writable;\n }",
"function checkAccess() ;",
"public static function isAllowedWrite(): bool\n {\n if (!isset(self::$definition)) {\n self::$definition = Splash::object(\"Order\")->description();\n }\n if (is_array(self::$definition) && !empty(self::$definition[\"allow_push_updated\"])) {\n return true;\n }\n\n return false;\n }",
"protected function check_update_permission($post)\n {\n }",
"protected function check_update_permission($post)\n {\n }",
"public function doesCheckModifyAccessListHookGetsCalled() {}",
"public static function uses_permissions(): bool;",
"function CheckFilePermission($filename) {\n\t//can we write?\n\tif(!is_writable($filename)) {\n\t\t//no we can't.\n\t\tif(!@chmod($filename, 0666)) {\n\t\t\t$pathtofilename = dirname($filename);\n\t\t\t//Lets check if parent directory is writable.\n\t\t\tif(!is_writable($pathtofilename)) {\n\t\t\t\t//it's not writeable too.\n\t\t\t\tif(!@chmod($pathtoffilename, 0666)) {\n\t\t\t\t\t//darn couldn't fix up parrent directory this hosting is foobar.\n\t\t\t\t\t//Lets error because of the permissions problems.\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//we can write, return 1/true/happy dance.\n\treturn true;\n}",
"function wp_is_writable($path)\n {\n }",
"function Pico_IsWritable($file, $update_perms = false)\n{\n\tif ( (!file_exists($file)) or (is_file($file)) )\n\t{\n\t\t// check to see if parent folder is writable\n\t\t$parent_dir = dirname($file);\n\t\t\n\t\tif (is_writable($parent_dir))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telseif ($update_perms == TRUE)\n\t\t{\n\t\t\t// atempt to make writable\n\t\t\tif (is_dir($parent_dir))\n\t\t\t{\n\t\t\t\t$folder_is_writable = Pico_IsWritable($parent_dir, TRUE);\n\t\t\t\treturn $folder_is_writable;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t$is_writable = is_writable($file);\n\t\n\tif (!$is_writable)\n\t{\n\t\tif ($update_perms == TRUE)\n\t\t{\n\t\t\t// try to connect via FTP and make this file writable\n\t\t\t$ftp = @Pico_ConnectFTP();\n\t\t\tif (!is_object($ftp))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (is_file($file))\n\t\t\t\t{\n\t\t\t\t\t@$ftp->chmod($file, 0666);\n\t\t\t\t}\n\t\t\t\telseif (is_dir($file))\n\t\t\t\t{\n\t\t\t\t\t@$ftp->chmod($file, 0777);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (is_writable($file))\n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn TRUE;\n\t}\n}",
"public function isWritable() {\n\t\treturn $this->writable;\n\t}",
"public function canWriteConfiguration() {}",
"function win_is_writable($path)\n {\n }",
"public function isWritable() {\n throw new Exception('Not implemented yet');\n }",
"public function is_writable( $file ) {\n\t\treturn true;\n\t}",
"public function onWrite();",
"public function isWritable(string $path): bool;",
"function hook_mm_ensure_node_access_check_perm_alter(&$permission, $item) {\n $path = key($item);\n switch ($path) {\n // Require elevated permissions for some path.\n case 'node/%/foo/bar':\n $permission = MM_PERMS_WRITE;\n break;\n // Remove the MM permission check for some other path.\n case 'node/%/baz/foo':\n $permission = '';\n break;\n }\n}",
"protected function check_read_permission($status)\n {\n }",
"public function isWritable()\n {\n if (!is_writable($this->root)) {\n return false;\n }\n return true;\n }",
"function permissions() {\r\n\t\treturn false;\r\n\t}",
"protected function buildSetterPermission() {\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}",
"private function isWritable(): bool\n {\n return BackendExtensionsModel::isWritable(FRONTEND_PATH . '/Themes');\n }",
"public function is_allowed_to_set_content_object_rights();",
"static function checkPermissions() {\n\t\tif ( !@file_exists(self::getConfig()->getPathLogs()) || !@is_writable(self::getConfig()->getPathLogs()) ) {\n\t\t\texit(\"The LOGS folder cannot be written to by the current process: \".self::getConfig()->getPathLogs());\n\t\t}\n\t\tif ( !@file_exists(self::getConfig()->getPathTemp()) || !@is_writable(self::getConfig()->getPathTemp()) ) {\n\t\t\texit(\"The TEMP folder cannot be written to by the current process: \".self::getConfig()->getPathTemp());\n\t\t}\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 is_writable($file) {\r\n\t\tif (file_exists($file) || is_dir($file)) { return is_writable($file); } else { return is_writable(dirname($file)); }\r\n\t}",
"public function updatePermission() {\n try {\n if (!($this->permission instanceof Base_Model_ObtorLib_App_Core_Doc_Entity_Permission)) {\n throw new Base_Model_ObtorLib_App_Core_Doc_Exception(\" Permission Entity not intialized\");\n } else {\n $objPermission = new Base_Model_ObtorLib_App_Core_Doc_Dao_Permission();\n $objPermission->permission = $this->permission;\n return $objPermission->updatePermission();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Doc_Exception($ex);\n }\n }"
] | [
"0.80685425",
"0.7708975",
"0.7235534",
"0.7199416",
"0.7160152",
"0.7110058",
"0.70368034",
"0.7009818",
"0.6871481",
"0.6840123",
"0.6832856",
"0.68172175",
"0.6758443",
"0.6748806",
"0.67073876",
"0.66625327",
"0.6661144",
"0.66604483",
"0.66604483",
"0.66604483",
"0.66604275",
"0.66394484",
"0.6635397",
"0.6613292",
"0.6613153",
"0.65893817",
"0.65893817",
"0.6588846",
"0.6588846",
"0.65750927",
"0.6545134",
"0.65232944",
"0.64943606",
"0.6465209",
"0.6465209",
"0.6465209",
"0.6464726",
"0.6464726",
"0.6464401",
"0.6464401",
"0.6464401",
"0.645875",
"0.6453855",
"0.64475673",
"0.6441045",
"0.6439641",
"0.641549",
"0.64044195",
"0.6391974",
"0.63582224",
"0.6338629",
"0.6338142",
"0.63293",
"0.6322192",
"0.6322192",
"0.63053215",
"0.63026255",
"0.6286979",
"0.6278438",
"0.62758154",
"0.62692124",
"0.6268769",
"0.6266339",
"0.6261841",
"0.6254208",
"0.6253876",
"0.6251715",
"0.6242999",
"0.6235451",
"0.6235012",
"0.6220598",
"0.6206554",
"0.6195271",
"0.61734396",
"0.6172143",
"0.6172143",
"0.6171414",
"0.6169899",
"0.61677307",
"0.6161666",
"0.61586624",
"0.6142049",
"0.6135085",
"0.6130829",
"0.6118135",
"0.61173636",
"0.6111702",
"0.61061686",
"0.60848284",
"0.6082145",
"0.6078475",
"0.6076708",
"0.60603225",
"0.60487634",
"0.6029994",
"0.6029672",
"0.60112154",
"0.60064435",
"0.5999454",
"0.5994653"
] | 0.63395715 | 50 |
Get permission checker for viewing Letter. | public static function getViewLetterPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewLetters()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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}",
"public static function getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function permission(): string;",
"public function GetPermissionToSeeAssignments () {\n \treturn \n \t(\n \t\t$this->user_type == $this->user_types[0]\n \t\t|| $this->user_type == $this->user_types[1]\n\t\t\t|| $this->user_type == $this->user_types[2]\n\t\t);\n }",
"public function checkPermissions();",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\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() {}",
"static function detectPermission()\n {\n if(self::$org && !self::$role)\n return 'org';\n elseif(self::$org && self::$role)\n return 'orgRole';\n elseif(!self::$org && self::$role)\n return 'role';\n elseif(!self::$org && !self::$role && !self::$isGuest)\n return 'user';\n else\n return 'guest';\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 checkAccess() ;",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"abstract public function permission(): string;",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"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 authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }",
"public function isAccess();",
"abstract protected function canAccess();",
"public function & GetPermissions ();",
"static function getPermission($name) {\n return static::getPermissions()->get($name);\n }",
"public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin', 'create_users');\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"public function getIsAdministrator() {}",
"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 function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"protected function check_permission()\n {\n return true;\n }",
"public static function CHECK_ACCESS_PERMISSION(){\n\t $SQL_String = \"SELECT uid,gid FROM permission_matrix WHERE uid=:uid AND master=1;\";\n\t return $SQL_String;\n\t}",
"public function getPossiblePermissions();",
"public function hasAccess($permission);",
"public function getEvaluatePermissions() {}",
"public function check_admin() {\n return current_user_can('administrator');\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}",
"function VisibleToAdminUser()\n {\n\tinclude (\"dom.php\");\n return $this->CheckPermission($pavad.' Use');\n }",
"public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function authorize()\n {\n return Auth::user()->is_admin;\n }",
"public function getWorkspacePermission() {}",
"public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }",
"public function hasAccess(): bool;",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"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 authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }",
"public function authorize()\n {\n return $this->user('office')->isActive();\n }",
"function user_can_access_admin_page()\n {\n }",
"public function index()\n {\n if (Auth::user()->ability('superadministrator', 'read-permissions')){\n return view('permission.read',[\n 'pageheader'=>'权限',\n 'pagedescription'=>'列表',\n 'permissions'=>Permission::all(),\n 'enableUpdate'=>Auth::user()->hasPermission('update-permissions'),\n 'enableDelete'=>Auth::user()->hasPermission('delete-permissions'),\n ]);\n }\n return abort(403,config('yyxt.permission_deny'));\n }",
"public function authorize()\n\t{\n\t\treturn User::isAdmin();\n\t}",
"public function authorize()\n {\n $this->id = $this->route('admin');\n return auth('admin')->check();\n }",
"public function authorize()\n {\n return auth('admin')->check();\n }",
"function perm_check($content)\n{\n\t$Feul = new Feul;\n\tif($Feul->checkPerm() == true)\n\t{\n\t\treturn $content;\n\t}\n\telse\n\t{\n\t\treturn $Feul->getData('protectedmessage');\n\t}\n}",
"public function authorize()\n {\n return auth()->user()->admin();\n }",
"public function authorize()\n {\n return auth()->user()->admin();\n }",
"public function authorize()\n {\n return auth()->user()->admin();\n }",
"abstract public function getPermissions();",
"function acl( $check )\n{\n global $current_user_acl;\n \n $acl = $current_user_acl;\n if ($acl[ 'p' ][ 'ForbiddenAccess' ])\n {\n return false;\n }\n if ($acl[ 'p' ][ 'System' ])\n {\n return true;\n }\n \n $result = false;\n $match = substr($check, 0, 2);\n switch ($match)\n {\n case 'u:':\n case 'g:':\n case 'p:':\n $type = substr($check, 0, 1);\n $target = substr($check, 2);\n $result = check($acl[ $type ], $target);\n break;\n default:\n $args = array_slice(func_get_args(), 1);\n if (is_callable(array( 'Granted', $check )))\n {\n $result = call_user_func_array(array( 'Granted', $check ), $args);\n }\n }\n return $result;\n}",
"public static function getViewAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function can($permission);",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public function getAllowCheck()\n {\n return $this->allow_check;\n }",
"public function authorize()\n {\n return Auth::guard('admin')->check();\n }",
"public function getPermissions();",
"protected function isPermissionCorrect() {}",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function authorize()\n {\n return Gate::allows('admin.booking.edit', $this->booking);\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function authorize()\n {\n return $this->checkAuthorization(Template::class);\n }",
"public static function allows ()\r\n {\r\n $acl = Session::get('acl');\r\n return $acl['allows'];\r\n }",
"function check_permission()\n {\n // Make sure the user is logged-in\n require_course_login($this->course, true, $this->cm);\n\n add_to_log($this->course->id, 'sloodle', 'view sloodle module', \"view.php?id={$this->cm->id}\", \"{$this->sloodle->id}\", $this->cm->id);\n \n // Check for permissions\n $this->module_context = get_context_instance(CONTEXT_MODULE, $this->cm->id);\n $this->course_context = get_context_instance(CONTEXT_COURSE, $this->course->id);\n if (has_capability('moodle/course:manageactivities', $this->module_context)) $this->canedit = true;\n\n // If the module is hidden, then can the user still view it?\n if (empty($this->cm->visible) && !has_capability('moodle/course:viewhiddenactivities', $this->module_context)) notice(get_string('activityiscurrentlyhidden'));\n }",
"public static function uses_permissions(): bool;",
"public function view()\n {\n return $this->check;\n }",
"public function authorize()\n {\n return access()->allow('edit-reports');\n }",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function authorize()\n {\n return Auth::guard('mahasiswa')->check();\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public static function getSelectSegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewLetters()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewAds()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewRc()) {\n return;\n }\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function authorize()\n {\n return auth()->guard('admin')->check();\n }",
"public function authorize()\n {\n $user = Auth::user('admin');\n\n return $user->is_admin;\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed(\\Eadesigndev\\Pdfgenerator\\Controller\\Adminhtml\\Templates::ADMIN_RESOURCE_VIEW);\n }",
"public function getPermission($permission);",
"public function getAccess()\n {\n return $this->access;\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 {\n return Auth::user()->type == 'admin';\n }",
"public function authorize()\n {\n return Auth::user()->is_supplier;\n }",
"protected function authorityControl()\n {\n return Auth::check();\n }",
"protected function authorityControl()\n {\n return Authority::can(Permission::ACTION_R, 'Queries');\n }",
"public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }"
] | [
"0.6293804",
"0.6119971",
"0.60978514",
"0.60493803",
"0.59566474",
"0.59347457",
"0.59149206",
"0.59149206",
"0.59149206",
"0.59145534",
"0.59145534",
"0.5914509",
"0.5914509",
"0.5914509",
"0.5871723",
"0.5846903",
"0.58238155",
"0.57836443",
"0.57720375",
"0.5769872",
"0.57512707",
"0.57458043",
"0.5718322",
"0.5717118",
"0.57054573",
"0.5666532",
"0.56554395",
"0.5639052",
"0.56197625",
"0.56131715",
"0.56039655",
"0.5600981",
"0.56005526",
"0.5587802",
"0.55846286",
"0.5570751",
"0.55701286",
"0.5565295",
"0.5564162",
"0.5557693",
"0.55569685",
"0.5549637",
"0.5538669",
"0.55370677",
"0.5529446",
"0.5527648",
"0.55228657",
"0.55212504",
"0.55194265",
"0.5517328",
"0.55131376",
"0.5505721",
"0.54980445",
"0.5496243",
"0.54958856",
"0.54956305",
"0.5488998",
"0.5481146",
"0.54792404",
"0.54792404",
"0.54792404",
"0.54748803",
"0.5467536",
"0.5467028",
"0.54603904",
"0.544982",
"0.544982",
"0.5445998",
"0.54457253",
"0.5443421",
"0.54375523",
"0.5434755",
"0.5434755",
"0.5401466",
"0.5400864",
"0.5397413",
"0.5397345",
"0.53902334",
"0.53875864",
"0.53864396",
"0.53797597",
"0.5370135",
"0.5370135",
"0.5370135",
"0.5370135",
"0.5370135",
"0.53629583",
"0.5358101",
"0.5354101",
"0.5351051",
"0.5349894",
"0.5347367",
"0.53466827",
"0.533951",
"0.5336955",
"0.5336147",
"0.53239286",
"0.5321222",
"0.5316816",
"0.5314391"
] | 0.69067806 | 0 |
Get permission checker for modifying Letter. | public static function getModifyLetterPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifyLetters()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getViewLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function permission(): string;",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function checkPermissions();",
"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}",
"abstract public function permission(): string;",
"public function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"function perm_check($content)\n{\n\t$Feul = new Feul;\n\tif($Feul->checkPerm() == true)\n\t{\n\t\treturn $content;\n\t}\n\telse\n\t{\n\t\treturn $Feul->getData('protectedmessage');\n\t}\n}",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"protected function isPermissionCorrect() {}",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"public function getIsAdministrator() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\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}",
"function check_permission()\n\t{\n\t\t$CFG = $this->config->item('language_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}",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"static function getPermission($name) {\n return static::getPermissions()->get($name);\n }",
"function get_required_permission()\n {\n return str_replace(array(' ', \"\\n\", \"\\t\"), '_', $this->object->name);\n }",
"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}",
"public function getWorkspacePermission() {}",
"public function check_admin() {\n return current_user_can('administrator');\n }",
"public static function uses_permissions(): bool;",
"public function & GetPermissions ();",
"protected function check_permission()\n {\n return true;\n }",
"function PERMISSIONS_CELEB() {\n return -1;\n}",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"final public function permission():int\n {\n return $this->permission;\n }",
"public function GetPermissionToSeeAssignments () {\n \treturn \n \t(\n \t\t$this->user_type == $this->user_types[0]\n \t\t|| $this->user_type == $this->user_types[1]\n\t\t\t|| $this->user_type == $this->user_types[2]\n\t\t);\n }",
"public function checkAccess()\n {\n // need to be modified for security\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 }",
"public function getEvaluatePermissions() {}",
"function acl( $check )\n{\n global $current_user_acl;\n \n $acl = $current_user_acl;\n if ($acl[ 'p' ][ 'ForbiddenAccess' ])\n {\n return false;\n }\n if ($acl[ 'p' ][ 'System' ])\n {\n return true;\n }\n \n $result = false;\n $match = substr($check, 0, 2);\n switch ($match)\n {\n case 'u:':\n case 'g:':\n case 'p:':\n $type = substr($check, 0, 1);\n $target = substr($check, 2);\n $result = check($acl[ $type ], $target);\n break;\n default:\n $args = array_slice(func_get_args(), 1);\n if (is_callable(array( 'Granted', $check )))\n {\n $result = call_user_func_array(array( 'Granted', $check ), $args);\n }\n }\n return $result;\n}",
"public function can($permission);",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"static function detectPermission()\n {\n if(self::$org && !self::$role)\n return 'org';\n elseif(self::$org && self::$role)\n return 'orgRole';\n elseif(!self::$org && self::$role)\n return 'role';\n elseif(!self::$org && !self::$role && !self::$isGuest)\n return 'user';\n else\n return 'guest';\n }",
"public function checkPermission()\n {\n $objUser = \\BackendUser::getInstance();\n $objSession = \\Session::getInstance();\n $objDatabase = \\Database::getInstance();\n\n // TODO!\n if (true || $objUser->isAdmin)\n {\n return;\n }\n\n // Set the root IDs\n if (!is_array($objUser->competition_submissions) || empty($objUser->competition_submissions))\n {\n $root = [0];\n }\n else\n {\n $root = $objUser->competition_submissions;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n \\Controller::log(\n 'Not enough permissions to create submission items in submission archive ID \"' . Input::get('pid') . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n \\Controller::log(\n 'Not enough permissions to ' . Input::get('act') . ' submission item ID \"' . $id . '\" to submission archive ID \"'\n . Input::get('pid') . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n case 'feature':\n $objArchive = $objDatabase->prepare(\"SELECT pid FROM tl_competition_submission WHERE id=?\")->limit(1)->execute($id);\n\n if ($objArchive->numRows < 1)\n {\n \\Controller::log('Invalid submission item ID \"' . $id . '\"', 'tl_competition_submission checkPermission', TL_ERROR);\n \\Controller::redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objArchive->pid, $root))\n {\n \\Controller::log(\n 'Not enough permissions to ' . Input::get('act') . ' submission item ID \"' . $id . '\" of submission archive ID \"'\n . $objArchive->pid . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n \\Controller::log(\n 'Not enough permissions to access submission archive ID \"' . $id . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n\n $objArchive = $objDatabase->prepare(\"SELECT id FROM tl_competition_submission WHERE pid=?\")->execute($id);\n\n if ($objArchive->numRows < 1)\n {\n \\Controller::log('Invalid submission archive ID \"' . $id . '\"', 'tl_competition_submission checkPermission', TL_ERROR);\n \\Controller::redirect('contao/main.php?act=error');\n }\n\n $session = $objSession->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objArchive->fetchEach('id'));\n $objSession->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n \\Controller::log('Invalid command \"' . Input::get('act') . '\"', 'tl_competition_submission checkPermission', TL_ERROR);\n \\Controller::redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n \\Controller::log(\n 'Not enough permissions to access submission archive ID ' . $id,\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"public function permission($permission);",
"public function getPossiblePermissions();",
"function checkAccess() ;",
"function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"public function checkAdmin();",
"function hook_mm_ensure_node_access_check_perm_alter(&$permission, $item) {\n $path = key($item);\n switch ($path) {\n // Require elevated permissions for some path.\n case 'node/%/foo/bar':\n $permission = MM_PERMS_WRITE;\n break;\n // Remove the MM permission check for some other path.\n case 'node/%/baz/foo':\n $permission = '';\n break;\n }\n}",
"function getSystemPermission($name) {\n \t$role = $this->getRole();\n if(instance_of($role, 'Role')) {\n return (boolean) $role->getPermissionValue($name);\n } else {\n return false;\n } // if\n }",
"public static function getModifyRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"function getWritable($creator, $user, $room)\n{\n // Always allowed to modify your own stuff\n if(strcasecmp($creator, $user) == 0)\n {\n return 1;\n }\n \n // Otherwise you have to be a (booking) admin for this room\n if (auth_book_admin($user, $room))\n {\n return 1;\n }\n \n // Unathorised access\n return 0;\n}",
"public function authorizePatch()\n {\n return $this->user()->can('acme.update');\n }",
"function allowAdminAbility($ability) {\n\n\t\t// map to uppercase before checking list\n\t\t$ability = strtoupper($ability);\n\t\tif (isset($this->adm_abilities[$ability])) {\n\t\t\treturn $this->adm_abilities[$ability][0];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function check($aco, $action = '*') {\n\n // no user means no special access\n if (empty($this->user['user_id'])) return false;\n\n // return cached perm if available in this request\n if (isset($this->cache[$aco][$action])) {\n return $this->cache[$aco][$action];\n }\n\n $user_id = $this->user['user_id'];\n $canAccess = $this->checkUser($user_id, $aco, $action);\n\n // cache perm for later in this request\n if (empty($this->cache[$aco])) {\n $this->cache[$aco] = array($action => $canAccess);\n } else {\n $this->cache[$aco][$action] = $canAccess;\n }\n\n return $canAccess;\n }",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"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}",
"abstract public function getPermissions();",
"public function checkPermission()\n {\n if ($this->User->isAdmin)\n {\n return;\n }\n\n // Set root IDs\n if (!is_array($this->User->calendars) || empty($this->User->calendars))\n {\n $root = [0];\n }\n else\n {\n $root = $this->User->calendars;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to create promoters in calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" to calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n $objPromoter = $this->Database->prepare(\"SELECT pid FROM tl_calendar_promoters WHERE id=?\")->limit(1)->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid event ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objPromoter->pid, $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" of calendar ID \"' . $objCalendar->pid . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $objPromoter = $this->Database->prepare(\"SELECT id FROM tl_calendar_promoters WHERE pid=?\")->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $session = $this->Session->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objPromoter->fetchEach('id'));\n $this->Session->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n $this->log('Invalid command \"' . Input::get('act') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}",
"public function getAllowCheck()\n {\n return $this->allow_check;\n }",
"public function authorize()\n {\n return Gate::allows('employee.edit');\n }",
"public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function getPermission($permission);",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }",
"function permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'au_set')) {\n\t\treturn $return;\n\t}\n\n\tif (!elgg_is_logged_in()) {\n\t\treturn $return;\n\t}\n\n\t// this is our object, lets determine if we can edit it\n\t$set = $params['entity'];\n\t$user = $params['user'];\n\t$owner = $params['entity']->getOwnerEntity();\n\n\t// owners and admins can always edit\n\tif ($user->getGUID() == $owner->getGUID() || $user->isAdmin()) {\n\t\treturn true;\n\t}\n\n\n\t// check for friends special case\n\tif ($set->write_access_id == ACCESS_FRIENDS) {\n\t\treturn $owner->isFriendsWith($user->getGUID());\n\t}\n\n\t// write access is set using acl nomenclature\n\t$access = get_pinboard_write_accesses($user);\n\n\t// now we just look at remaining acls\n\tif (in_array($set->write_access_id, $access)) {\n\t\treturn true;\n\t}\n\n\treturn $return;\n}",
"protected function getCurrentPermission() {}",
"public function check_admin()\n {\n return current_user_can('administrator');\n }",
"public function check_permflag($flag) {\n // TO DO!!!!!!\n }",
"public function can_write () {\r\n\r\n return $this->permissions[\"W\"] ? true : false;\r\n\r\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"protected function getMigrator_Tool_PermissionService()\n {\n return $this->services['migrator.tool.permission'] = new \\phpbb\\db\\migration\\tool\\permission(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php');\n }",
"public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }",
"public function authorize()\n {\n return Gate::allows('admin.booking.edit', $this->booking);\n }",
"public function getModifyProtected() {\n\t\t$modifyProtected = FALSE;\n\t\tif ($this->getUsersWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\n\t\treturn $modifyProtected;\n\t}",
"abstract protected function canAccess();",
"protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }",
"public static function getModifySegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function canEdit() {\n\t\treturn $this->_perms->checkModuleItem ( $this->_tbl_module, 'edit' );\n\t}",
"public function authorize()\n {\n return $this->user()->can('update', \\App\\Models\\Member::withTrashed()->find($this->id));\n }",
"public function hasAccess($permission);",
"protected function _checkPermission($permission = \\SetaPDF_Core_SecHandler::PERM_FILL_FORM) {}",
"public function edit()\n {\n return $this->check;\n }"
] | [
"0.6133229",
"0.61281526",
"0.60791415",
"0.6056289",
"0.60234785",
"0.5973391",
"0.5890391",
"0.5704964",
"0.5696499",
"0.56874144",
"0.5668803",
"0.56526756",
"0.56501627",
"0.56007904",
"0.5599411",
"0.55924153",
"0.5582373",
"0.5548666",
"0.55447257",
"0.55447257",
"0.55447257",
"0.5544152",
"0.5544152",
"0.5544152",
"0.55438167",
"0.55438167",
"0.5543747",
"0.5538904",
"0.55280244",
"0.55245125",
"0.55142725",
"0.5506565",
"0.5504087",
"0.55039054",
"0.5486715",
"0.5478797",
"0.5473465",
"0.543145",
"0.54248315",
"0.5411757",
"0.5410379",
"0.5402932",
"0.5400456",
"0.53961515",
"0.53888524",
"0.5386066",
"0.538601",
"0.53833866",
"0.5381066",
"0.5361872",
"0.5358787",
"0.5347726",
"0.5342517",
"0.5342517",
"0.53354114",
"0.5333516",
"0.53321904",
"0.5329697",
"0.53206545",
"0.531559",
"0.5312556",
"0.53064185",
"0.53024775",
"0.53006154",
"0.53004164",
"0.5296965",
"0.52949744",
"0.52918684",
"0.52918684",
"0.52918684",
"0.52918684",
"0.52918684",
"0.5279581",
"0.5274515",
"0.5269438",
"0.5269295",
"0.52629924",
"0.52613163",
"0.5257146",
"0.52570903",
"0.5253215",
"0.5239589",
"0.5238015",
"0.5237814",
"0.52367026",
"0.5226706",
"0.5221087",
"0.5221087",
"0.52149284",
"0.5212289",
"0.5210616",
"0.5209797",
"0.5198028",
"0.5197858",
"0.5197737",
"0.51843625",
"0.5175515",
"0.51733154",
"0.5171726",
"0.5166017"
] | 0.7384962 | 0 |
Get permission checker for modifying Abuse. | public static function getModifyAbusePermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifyAbuses()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkPermissions();",
"public static function uses_permissions(): bool;",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\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}",
"public function & GetPermissions ();",
"public function permission(): string;",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"protected function isPermissionCorrect() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getEvaluatePermissions() {}",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }",
"public function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"abstract public function getPermissions();",
"protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }",
"function acl( $check )\n{\n global $current_user_acl;\n \n $acl = $current_user_acl;\n if ($acl[ 'p' ][ 'ForbiddenAccess' ])\n {\n return false;\n }\n if ($acl[ 'p' ][ 'System' ])\n {\n return true;\n }\n \n $result = false;\n $match = substr($check, 0, 2);\n switch ($match)\n {\n case 'u:':\n case 'g:':\n case 'p:':\n $type = substr($check, 0, 1);\n $target = substr($check, 2);\n $result = check($acl[ $type ], $target);\n break;\n default:\n $args = array_slice(func_get_args(), 1);\n if (is_callable(array( 'Granted', $check )))\n {\n $result = call_user_func_array(array( 'Granted', $check ), $args);\n }\n }\n return $result;\n}",
"public function can($permission);",
"public function hasUsageRights() {}",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"function permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'au_set')) {\n\t\treturn $return;\n\t}\n\n\tif (!elgg_is_logged_in()) {\n\t\treturn $return;\n\t}\n\n\t// this is our object, lets determine if we can edit it\n\t$set = $params['entity'];\n\t$user = $params['user'];\n\t$owner = $params['entity']->getOwnerEntity();\n\n\t// owners and admins can always edit\n\tif ($user->getGUID() == $owner->getGUID() || $user->isAdmin()) {\n\t\treturn true;\n\t}\n\n\n\t// check for friends special case\n\tif ($set->write_access_id == ACCESS_FRIENDS) {\n\t\treturn $owner->isFriendsWith($user->getGUID());\n\t}\n\n\t// write access is set using acl nomenclature\n\t$access = get_pinboard_write_accesses($user);\n\n\t// now we just look at remaining acls\n\tif (in_array($set->write_access_id, $access)) {\n\t\treturn true;\n\t}\n\n\treturn $return;\n}",
"abstract public function permission(): string;",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public function getPossiblePermissions();",
"public function getPermissions();",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}",
"protected function getCurrentPermission() {}",
"public function GetPermissionToSeeAssignments () {\n \treturn \n \t(\n \t\t$this->user_type == $this->user_types[0]\n \t\t|| $this->user_type == $this->user_types[1]\n\t\t\t|| $this->user_type == $this->user_types[2]\n\t\t);\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\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 getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function checkAccess()\n {\n // need to be modified for security\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}",
"final public function permission():int\n {\n return $this->permission;\n }",
"protected function check_permission()\n {\n return true;\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\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}",
"public function check($aco, $action = '*') {\n\n // no user means no special access\n if (empty($this->user['user_id'])) return false;\n\n // return cached perm if available in this request\n if (isset($this->cache[$aco][$action])) {\n return $this->cache[$aco][$action];\n }\n\n $user_id = $this->user['user_id'];\n $canAccess = $this->checkUser($user_id, $aco, $action);\n\n // cache perm for later in this request\n if (empty($this->cache[$aco])) {\n $this->cache[$aco] = array($action => $canAccess);\n } else {\n $this->cache[$aco][$action] = $canAccess;\n }\n\n return $canAccess;\n }",
"public function check_admin() {\n return current_user_can('administrator');\n }",
"public function getAllowCheck()\n {\n return $this->allow_check;\n }",
"public function hasAccess($permission);",
"function getSystemPermission($name) {\n \t$role = $this->getRole();\n if(instance_of($role, 'Role')) {\n return (boolean) $role->getPermissionValue($name);\n } else {\n return false;\n } // if\n }",
"static function getPermission($name) {\n return static::getPermissions()->get($name);\n }",
"function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = 0)\n {\n global $ilUser, $ilAccess;\n\n if ($a_user_id == 0) {\n $a_user_id = $ilUser->getId();\n }\n\n switch ($a_permission) {\n case \"read\":\n /*if (!ilObjUFreibFeedbackAccess::checkOnline($a_obj_id) &&\n !$ilAccess->checkAccessOfUser($a_user_id, \"write\", \"\", $a_ref_id))\n {\n return false;\n }*/\n break;\n }\n\n return true;\n }",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"public static function CHECK_ACCESS_PERMISSION(){\n\t $SQL_String = \"SELECT uid,gid FROM permission_matrix WHERE uid=:uid AND master=1;\";\n\t return $SQL_String;\n\t}",
"public function getWorkspacePermission() {}",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function canEdit() {\n\t\treturn $this->_perms->checkModuleItem ( $this->_tbl_module, 'edit' );\n\t}",
"public function getCanModifyAttribute()\n {\n // Checks if there are any shared user permissions for this user, if not returnes false\n // If they do have permissions, it will return there modify attribute\n return (count($this->auth_user_share)) ? (bool)($this->auth_user_share[0]->pivot->modify) : false;\n }",
"public function permission($permission);",
"function check_permission()\n {\n // Make sure the user is logged-in\n require_course_login($this->course, true, $this->cm);\n\n add_to_log($this->course->id, 'sloodle', 'view sloodle module', \"view.php?id={$this->cm->id}\", \"{$this->sloodle->id}\", $this->cm->id);\n \n // Check for permissions\n $this->module_context = get_context_instance(CONTEXT_MODULE, $this->cm->id);\n $this->course_context = get_context_instance(CONTEXT_COURSE, $this->course->id);\n if (has_capability('moodle/course:manageactivities', $this->module_context)) $this->canedit = true;\n\n // If the module is hidden, then can the user still view it?\n if (empty($this->cm->visible) && !has_capability('moodle/course:viewhiddenactivities', $this->module_context)) notice(get_string('activityiscurrentlyhidden'));\n }",
"public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function hasAccess(): bool;",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"public function restore_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function getAdminPermissions(): array;",
"function checkAccess() ;",
"public function get_item_permissions_check($request)\n {\n }",
"public function authorize()\n {\n return access()->can('edit-project');\n }",
"private function permissionCheck($action){\n\n\t\tglobal $checkgroup, $checkmod;\n\t\t\n\t\t#autmatically fail check if user is a guest, and its not set to public.\n\t\tif(($this->user == \"guest\") AND ($action != 0)){\n\t\t $permissionChk = false;\n\t\t}else{\n\t\t\tif($checkmod == 1){\n\t\t\t\t$permissionChk = true;\n\t\t\t}else{\n\t\t\t\tif(($action == 1) AND ($this->groupAccessLevel() == 1)){\n\t\t\t\t\t$permissionChk = true;\n\t\t\t\t}elseif(($action == 2) AND ($this->groupAccessLevel() == 1) or ($this->groupAccessLevel() == 2)){\n\t\t\t\t\t$permissionChk = true;\n\t\t\t\t}elseif(($action == 3) AND ($this->groupAccessLevel() == 3) or ($this->groupAccessLevel() == 2) or ($this->groupAccessLevel() == 1)){\n\t\t\t\t\t$permissionChk = true;\n\t\t\t\t}elseif($action == 4){\n\t\t\t\t\t$permissionChk = false;\n\t\t\t\t}elseif(($action == 5) and ($checkgroup == 1) or ($this->groupAccessLevel() == 1) or ($checkmod == 1)){\n\t\t\t\t\t$permissionChk = true;\n\t\t\t\t}elseif($action == 0){\n\t\t\t\t\t$permissionChk = true;\n\t\t\t\t}else{\n\t\t\t\t\t$permissionChk = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn($permissionChk);\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 }",
"function check_permission($moduleName = '', $scope = 'both') {\n\tif (!defined('NO_ACCESS')) {\n\t\tdie('No access to files!');\n\t}\n \n if ($scope == 'both' || $scope == 'module') {\n if (Cms::$modules[$moduleName] != 1) {\n die('This module is disabled!');\n }\n }\n \n if ($scope == 'both' || $scope == 'user') {\n if ($_SESSION[USER_CODE]['privilege'][$moduleName] != 1) {\n die('No permission at this level!');\n }\n }\n}",
"static function getPermissions() {\n if(self::$permissions === false) {\n self::$permissions = new NamedList(array(\n\n ));\n\n EventsManager::trigger('on_system_permissions', array(&self::$permissions));\n } // if\n\n return self::$permissions;\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"abstract protected function canAccess();",
"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 getModifyProtected() {\n\t\t$modifyProtected = FALSE;\n\t\tif ($this->getUsersWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\n\t\treturn $modifyProtected;\n\t}",
"public function get_item_permissions_check( $request ) {\n\t\treturn current_user_can( 'manage_options' );\n\t}",
"public function checkPolicy($permission) {\n $access = true;\n\n /* first check moderator access */\n if ($this->get('moderated')) {\n $moderatorGroups = $this->trimArray($this->get('moderator_group'));\n $moderators = $this->trimArray($this->get('moderators'));\n $inModeratorGroup = !empty($moderatorGroups) && !empty($this->xpdo->user) ? $this->xpdo->user->isMember($moderatorGroups) : false;\n $access = $inModeratorGroup || in_array($this->xpdo->user->get('username'),$moderators);\n } else {\n $access = $this->xpdo->user->isMember('Administrator');\n }\n\n /* now check global access */\n switch ($permission) {\n case 'view':\n $access = $this->xpdo->hasPermission('quip.thread_view');\n break;\n case 'truncate':\n $access = $this->xpdo->hasPermission('quip.thread_truncate');\n break;\n case 'remove':\n $access = $this->xpdo->hasPermission('quip.thread_remove');\n break;\n case 'comment_approve':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n case 'comment_remove':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n case 'comment_update':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n }\n\n return $access;\n }",
"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 validPermissions()\n {\n if (!ConfigHelper::cacheEnabled()) {\n return $this->getCurrentUserPermissions();\n }\n\n $cacheKey = 'laravelroles_permissions_' . Users::userModelCacheKey() . '_' . $this->getKey();\n\n return Cache::remember($cacheKey, ConfigHelper::cacheExpiryTime(), function () {\n return $this->getCurrentUserPermissions();\n });\n }",
"private static function getAclUtitlity() {\n $acl = AclUtility::getInstance();\n \tif (!is_null(self::$aclXml)) {\n \t\t$acl->setAclXml(self::$aclXml);\n \t}\n \treturn $acl;\n }",
"protected function getAcl_PermissionsService()\n {\n return $this->services['acl.permissions'] = new \\phpbb\\permissions(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n }",
"public function getIsAdministrator() {}",
"public function accessRules()\r\n\t{\r\n\t\t//Metodo localizado dentro da classe WebbeeController em protected/components/\r\n\t\treturn WebbeeController::controlAccess();\r\n\t}"
] | [
"0.69026065",
"0.65754366",
"0.64763993",
"0.6440685",
"0.639471",
"0.63770056",
"0.63055724",
"0.63027704",
"0.63027704",
"0.63027704",
"0.63027704",
"0.63027704",
"0.6266197",
"0.62584025",
"0.6225956",
"0.6209819",
"0.62080765",
"0.62080765",
"0.62080765",
"0.62067884",
"0.62067884",
"0.6206716",
"0.6206716",
"0.6206716",
"0.6198071",
"0.6193548",
"0.618315",
"0.6181777",
"0.6181777",
"0.61784947",
"0.6176449",
"0.6146857",
"0.6136173",
"0.6124235",
"0.61116976",
"0.61054647",
"0.61038387",
"0.6076684",
"0.606367",
"0.6042057",
"0.6040057",
"0.6039171",
"0.60265857",
"0.6023577",
"0.6000541",
"0.599813",
"0.5998034",
"0.5994681",
"0.59775877",
"0.59710443",
"0.5950331",
"0.5948478",
"0.5945226",
"0.59429777",
"0.59418535",
"0.59365046",
"0.5906218",
"0.5900345",
"0.58780205",
"0.58692014",
"0.58686227",
"0.58654535",
"0.5865321",
"0.5848601",
"0.58445054",
"0.58364344",
"0.583288",
"0.58315927",
"0.58313376",
"0.5830517",
"0.58259547",
"0.5823798",
"0.5805207",
"0.5802617",
"0.57973844",
"0.5759759",
"0.57574725",
"0.5757259",
"0.5755567",
"0.5750227",
"0.57480156",
"0.57379025",
"0.5737233",
"0.57228833",
"0.5696202",
"0.5690552",
"0.5683953",
"0.5681495",
"0.5681495",
"0.56776106",
"0.56747484",
"0.5668264",
"0.56681",
"0.56613725",
"0.5656693",
"0.56552017",
"0.5654329",
"0.56536305",
"0.56464666",
"0.56409085"
] | 0.70240664 | 0 |
Get permission checker for viewing Segment. | public static function getViewSegmentPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewSegments()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getSelectSegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewLetters()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewAds()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewRc()) {\n return;\n }\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function checkPermissions();",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"public function hasAccess($permission);",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function & GetPermissions ();",
"public function can($permission);",
"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}",
"public function authorize()\n {\n return Auth()->user()->isAbleTo('school_sections-create');\n }",
"public static function getModifySegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\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 }",
"public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }",
"public function permission(): string;",
"public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function authorize()\n {\n return access()->allow('edit-school');\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public function getPermission($permission);",
"public function authorize()\n {\n $this->id = $this->route('admin');\n return auth('admin')->check();\n }",
"public function permission($permission);",
"public function getPermissions();",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"public function authorize()\n {\n return \\Auth::guard('staff')->check();\n }",
"public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"protected function isPermissionCorrect() {}",
"public function authorize()\n {\n return $this->user()->can('manage-routes');\n }",
"public function authorize()\n {\n return $this->user()->can('manage-routes');\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 }",
"public function authorize()\n {\n return Auth::guard('admin')->check();\n }",
"protected function getCurrentPermission() {}",
"abstract public function getPermissions();",
"protected function check_permission()\n {\n return true;\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function authorize()\n {\n return Auth::user()->is_admin;\n }",
"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 // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }",
"public function authorize()\n {\n return Gate::allows('store', $this->getMarkType());\n }",
"public function authorize()\n {\n return Gate::allows('admin.booking.edit', $this->booking);\n }",
"public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }",
"public static function uses_permissions(): bool;",
"public function isAccess();",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public function authorize()\n {\n return auth()->guard('admin')->check();\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"public function authorize()\n {\n $model = $this->resource()::$model;\n\n return $this->authorizeIfPolicyExists('viewAny', $model);\n }",
"public function authorize()\n {\n return auth('admin')->check();\n }",
"public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }",
"public static function getViewAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function authorize()\n {\n return Gate::authorize('manage-app');\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\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 getWorkspacePermission() {}",
"public function hasUsageRights() {}",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }",
"public function authorize()\n {\n // dd($this->route('file')->name_id);\n return $this->auth->check();\n // return $this->route('file')->name_id === $this->auth->user()->id;\n }",
"public function authorize() {\n\t\tif (Auth::user()->user_type == \"S\" || Auth::user()->user_type == \"O\") {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tabort(404);\n\t\t}\n\t}",
"function CanCreateSegment()\n\t{\n\t\tif ($this->SegmentAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->HasAccess('Segments', 'Create')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\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 authorize()\n {\n return \\Auth::guard('web')->check();\n }",
"public function authorize()\n {\n return access()->can('edit-project');\n }",
"public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess||Auth::user()->allowAdminAccess);\n }",
"public function authorize()\n {\n return Gate::allows('admin.shipment.edit', $this->shipment);\n }",
"function hasPermission($uriPermission){\n\tif(Auth::check() && Auth::user()->hasAnyPermission($uriPermission))\n return true;\n else\n return false;\n}",
"public function authorize()\n {\n return is_client_or_staff();\n }",
"public static function getViewRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"function SegmentAdmin()\n\t{\n\t\t// if we've already worked this out, return it.\n\t\tif (!is_null($this->segmentadmin)) {\n\t\t\treturn $this->segmentadmin;\n\t\t}\n\t\t\n\t\t$admin = false;\n\n\t\tif ($this->isAdmin()) {\n\t\t $admin = true;\n\t\t}\n\t\t\n\t\tif ($this->group->segmentadmin == 1) {\n\t\t $admin = true;\n\t\t}\n\t\t\n\t\t$this->segmentadmin = $admin;\n\t\t\n\t\treturn $this->segmentadmin;\n\t}",
"static function detectPermission()\n {\n if(self::$org && !self::$role)\n return 'org';\n elseif(self::$org && self::$role)\n return 'orgRole';\n elseif(!self::$org && self::$role)\n return 'role';\n elseif(!self::$org && !self::$role && !self::$isGuest)\n return 'user';\n else\n return 'guest';\n }",
"function check_permission()\n {\n // Make sure the user is logged-in\n require_course_login($this->course, true, $this->cm);\n\n add_to_log($this->course->id, 'sloodle', 'view sloodle module', \"view.php?id={$this->cm->id}\", \"{$this->sloodle->id}\", $this->cm->id);\n \n // Check for permissions\n $this->module_context = get_context_instance(CONTEXT_MODULE, $this->cm->id);\n $this->course_context = get_context_instance(CONTEXT_COURSE, $this->course->id);\n if (has_capability('moodle/course:manageactivities', $this->module_context)) $this->canedit = true;\n\n // If the module is hidden, then can the user still view it?\n if (empty($this->cm->visible) && !has_capability('moodle/course:viewhiddenactivities', $this->module_context)) notice(get_string('activityiscurrentlyhidden'));\n }",
"public function authorize()\n {\n return access()->allow('edit-reports');\n }",
"public function authorize()\n {\n return auth()->user()->admin();\n }",
"public function authorize()\n {\n return auth()->user()->admin();\n }",
"public function authorize()\n {\n return auth()->user()->admin();\n }",
"public function authorize()\n {\n // todo: dominion selected, selected dominion in active round?\n return Auth::check();\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"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 Vetting Step?\n $p['add'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing Vetting Step?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Vetting Step?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing Vetting Steps?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Vetting Step's order?\n $p['order'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Modify ordering for display via AJAX\n $p['reorder'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Vetting Step?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return $p[$this->action];\n }",
"public function authorize()\n {\n \t// var_dump(Auth::check());\n \t// $postId = $this->route('create');\n \t// var_dump($postId);\n \tif(session('statut') == 'admin')\n \t\treturn true;\n \telse\n \t\treturn false;\n\n \t// return Gate::allows('update', Post::findOrFail($postId));\n }",
"public function authorize()\n {\n return PrivateCategory::where([\n ['owner_id', '=', Auth::user()->id],\n ['id', '=', $this->category_id],\n ])->exists();\n }",
"public function has_permission($permission) {\n\t\t\n\t}",
"public function authorize()\n {\n $user = Auth::user('admin');\n\n return $user->is_admin;\n }",
"public function checkPermission(\\App\\Request $request)\n\t{\n\t\t$recordId = $request->getInteger('record');\n\t\tif (!$recordId) {\n\t\t\tthrow new \\App\\Exceptions\\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);\n\t\t}\n\t\tif (!\\App\\Privilege::isPermitted($request->getModule(), 'DetailView', $recordId)) {\n\t\t\tthrow new \\App\\Exceptions\\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);\n\t\t}\n\t}",
"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 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 function authorize()\n {\n return $this->user('office')->isActive();\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }"
] | [
"0.7301632",
"0.6323381",
"0.62603754",
"0.6251687",
"0.6142566",
"0.6142566",
"0.6142566",
"0.6142566",
"0.6142566",
"0.6142205",
"0.61233217",
"0.6098302",
"0.6092688",
"0.60910434",
"0.60897166",
"0.60364956",
"0.60060346",
"0.5959245",
"0.5951448",
"0.5951448",
"0.5950463",
"0.59408754",
"0.59408754",
"0.59340465",
"0.59178245",
"0.59168726",
"0.5916755",
"0.59157807",
"0.59157807",
"0.59157807",
"0.59152365",
"0.59152365",
"0.5914533",
"0.5914533",
"0.5914533",
"0.5906141",
"0.58875704",
"0.58570325",
"0.58427143",
"0.58365476",
"0.5835258",
"0.5835258",
"0.58336705",
"0.58323467",
"0.58214676",
"0.57898754",
"0.5787103",
"0.5776718",
"0.5774868",
"0.5764795",
"0.57619905",
"0.57618415",
"0.5760534",
"0.5752497",
"0.5725105",
"0.57105345",
"0.57099247",
"0.5705394",
"0.56993127",
"0.5698491",
"0.5692974",
"0.568211",
"0.56817263",
"0.5671593",
"0.56684536",
"0.5666354",
"0.56582505",
"0.5650498",
"0.5645028",
"0.5641263",
"0.5639897",
"0.5637624",
"0.5631259",
"0.56256443",
"0.56242925",
"0.56240946",
"0.5621041",
"0.5620008",
"0.56198037",
"0.56195027",
"0.5610172",
"0.5608584",
"0.56075466",
"0.5606563",
"0.5604076",
"0.5604076",
"0.5604076",
"0.56031704",
"0.56027603",
"0.5601605",
"0.5600427",
"0.5590063",
"0.55844384",
"0.5582647",
"0.55825806",
"0.55792403",
"0.5577801",
"0.557572",
"0.5573422",
"0.5570649"
] | 0.670777 | 1 |
Get permission checker for selecting Segment. | public static function getSelectSegmentPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewSegments()) {
return;
}
if (Security\Access::getInstance()->canViewLetters()) {
return;
}
if (Security\Access::getInstance()->canViewAds()) {
return;
}
if (Security\Access::getInstance()->canViewRc()) {
return;
}
if (Security\Access::getInstance()->canModifySettings()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getModifySegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getViewSegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function getPermission($permission);",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function can($permission);",
"public function checkPermissions();",
"public function & GetPermissions ();",
"public function permission($permission);",
"public function authorize()\n {\n return Auth()->user()->isAbleTo('school_sections-create');\n }",
"public function hasAccess($permission);",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\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}",
"public function permission(): string;",
"function CanCreateSegment()\n\t{\n\t\tif ($this->SegmentAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->HasAccess('Segments', 'Create')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getPermissions();",
"public function getPermissions() {}",
"public function getPermissions() {}",
"protected function getCurrentPermission() {}",
"public function authorize()\n {\n return access()->allow('edit-school');\n }",
"public function authorize()\n {\n return Gate::allows('store', $this->getMarkType());\n }",
"function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"abstract public function getPermissions();",
"public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }",
"public function findPermission($permissionName);",
"public function authorize()\n {\n return \\Auth::guard('staff')->check();\n }",
"public function authorize()\n {\n return Gate::allows('admin.booking.edit', $this->booking);\n }",
"public function authorize()\n {\n $this->id = $this->route('admin');\n return auth('admin')->check();\n }",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"function SegmentAdmin()\n\t{\n\t\t// if we've already worked this out, return it.\n\t\tif (!is_null($this->segmentadmin)) {\n\t\t\treturn $this->segmentadmin;\n\t\t}\n\t\t\n\t\t$admin = false;\n\n\t\tif ($this->isAdmin()) {\n\t\t $admin = true;\n\t\t}\n\t\t\n\t\tif ($this->group->segmentadmin == 1) {\n\t\t $admin = true;\n\t\t}\n\t\t\n\t\t$this->segmentadmin = $admin;\n\t\t\n\t\treturn $this->segmentadmin;\n\t}",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\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 }",
"public function authorize()\n {\n // todo: dominion selected, selected dominion in active round?\n return Auth::check();\n }",
"public function authorize()\n {\n // dd($this->route('file')->name_id);\n return $this->auth->check();\n // return $this->route('file')->name_id === $this->auth->user()->id;\n }",
"public function hasPermission($id);",
"public function hasPermission($id);",
"public function authorize()\n {\n return Auth::guard('admin')->check();\n }",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"public function authorize()\n {\n return Gate::authorize('require-permission', 'teams.create');\n }",
"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 can($permissions);",
"protected function getAcl_PermissionsService()\n {\n return $this->services['acl.permissions'] = new \\phpbb\\permissions(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n }",
"protected function isPermissionCorrect() {}",
"public function getPermission()\n {\n return $this->permission;\n }",
"protected function getMigrator_Tool_PermissionService()\n {\n return $this->services['migrator.tool.permission'] = new \\phpbb\\db\\migration\\tool\\permission(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php');\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"static function detectPermission()\n {\n if(self::$org && !self::$role)\n return 'org';\n elseif(self::$org && self::$role)\n return 'orgRole';\n elseif(!self::$org && self::$role)\n return 'role';\n elseif(!self::$org && !self::$role && !self::$isGuest)\n return 'user';\n else\n return 'guest';\n }",
"public static function uses_permissions(): bool;",
"public static function CHECK_ACCESS_PERMISSION(){\n\t $SQL_String = \"SELECT uid,gid FROM permission_matrix WHERE uid=:uid AND master=1;\";\n\t return $SQL_String;\n\t}",
"public function has_permission($permission) {\n\t\t\n\t}",
"public function authorize()\n {\n return PrivateCategory::where([\n ['owner_id', '=', Auth::user()->id],\n ['id', '=', $this->category_id],\n ])->exists();\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function getPossiblePermissions();",
"public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }",
"abstract public function permission(): string;",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"protected function _checkPermission($permission = \\SetaPDF_Core_SecHandler::PERM_FILL_FORM) {}",
"public function authorize()\n {\n return auth()->guard('admin')->check();\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() {}",
"function acl( $check )\n{\n global $current_user_acl;\n \n $acl = $current_user_acl;\n if ($acl[ 'p' ][ 'ForbiddenAccess' ])\n {\n return false;\n }\n if ($acl[ 'p' ][ 'System' ])\n {\n return true;\n }\n \n $result = false;\n $match = substr($check, 0, 2);\n switch ($match)\n {\n case 'u:':\n case 'g:':\n case 'p:':\n $type = substr($check, 0, 1);\n $target = substr($check, 2);\n $result = check($acl[ $type ], $target);\n break;\n default:\n $args = array_slice(func_get_args(), 1);\n if (is_callable(array( 'Granted', $check )))\n {\n $result = call_user_func_array(array( 'Granted', $check ), $args);\n }\n }\n return $result;\n}",
"public function checkPermission()\n {\n if ($this->User->isAdmin)\n {\n return;\n }\n\n // Set root IDs\n if (!is_array($this->User->calendars) || empty($this->User->calendars))\n {\n $root = [0];\n }\n else\n {\n $root = $this->User->calendars;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to create promoters in calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" to calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n $objPromoter = $this->Database->prepare(\"SELECT pid FROM tl_calendar_promoters WHERE id=?\")->limit(1)->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid event ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objPromoter->pid, $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" of calendar ID \"' . $objCalendar->pid . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $objPromoter = $this->Database->prepare(\"SELECT id FROM tl_calendar_promoters WHERE pid=?\")->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $session = $this->Session->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objPromoter->fetchEach('id'));\n $this->Session->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n $this->log('Invalid command \"' . Input::get('act') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"public function authorize()\n {\n return Auth::guard('mahasiswa')->check();\n }",
"public function authorize()\n {\n return $this->user()->can('manage-routes');\n }",
"public function authorize()\n {\n return $this->user()->can('manage-routes');\n }",
"protected function getSecurity_AuthorizationCheckerService()\n {\n return $this->services['security.authorization_checker'] = new \\Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationChecker($this->get('security.token_storage'), ${($_ = isset($this->services['security.authentication.manager']) ? $this->services['security.authentication.manager'] : $this->getSecurity_Authentication_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['security.access.decision_manager']) ? $this->services['security.access.decision_manager'] : $this->getSecurity_Access_DecisionManagerService()) && false ?: '_'}, false);\n }",
"public function getAllowSpecific();",
"public static function with_permission($permission) {\n return self::where([\"can_$permission\" => '1']);\n }",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"public function authorize()\n {\n return access()->can('edit-project');\n }",
"public function getWorkspacePermission() {}",
"public function authorize()\n {\n return auth('admin')->check();\n }",
"public function authorize()\n {\n return auth()->user()->can('create-buildings');\n }",
"public function getEvaluatePermissions() {}",
"public function authorize()\n {\n return Gate::authorize('manage-app');\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"public function validator()\n {\n\n return PermissionValidator::class;\n }",
"public function authorize()\n {\n return $this->user('office')->isActive();\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin', 'create_users');\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function getACL(){\n\t\tif(!isset($this->subsite_acl_cache)){\n\t\t\t$this->subsite_acl_cache = false;\n\n\t\t\t$query = \"SELECT value\";\n\t\t\t$query .= \" FROM \" . get_config(\"dbprefix\") . \"private_settings\";\n\t\t\t$query .= \" WHERE name = 'subsite_acl'\";\n\t\t\t$query .= \" AND entity_guid = \" . $this->getGUID();\n\n\t\t\tif($setting = get_data_row($query)){\n\t\t\t\t$this->subsite_acl_cache = $setting->value;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->subsite_acl_cache;\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 // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }",
"abstract protected function getAcl();",
"public function getPermissionForGroup() {\n $sql = \"SELECT * FROM `SM_PERMISSION` WHERE sm_idGroup = '$this->idGroup'\";\n if (!($resultado = $this->mysqli->query($sql))) {\n return 'Error in the query on the database';\n } else {\n $toret = array();\n $i = 0;\n while ($fila = $resultado->fetch_array()) {\n $toret[$i] = $fila;\n $i++;\n }\n return $toret;\n }\n }",
"public function authorize()\n {\n return auth()->user()->can('create', Task::class);\n }",
"public function permissions()\n\t{\n\t\treturn $this->get('permissions');\n\t}",
"public static function getViewRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }"
] | [
"0.60791427",
"0.60461384",
"0.5780635",
"0.5740629",
"0.5740629",
"0.5689016",
"0.5608048",
"0.55742043",
"0.557218",
"0.54922813",
"0.54641026",
"0.5454264",
"0.5454264",
"0.5454264",
"0.5454264",
"0.5454264",
"0.5403058",
"0.5379075",
"0.53535944",
"0.5271953",
"0.5267266",
"0.52542883",
"0.52542883",
"0.52386653",
"0.52375007",
"0.5226764",
"0.5224389",
"0.5217727",
"0.5212695",
"0.5205866",
"0.51985955",
"0.5187178",
"0.51795745",
"0.5156686",
"0.5149861",
"0.51344436",
"0.51191556",
"0.5115295",
"0.5106121",
"0.51019025",
"0.51019025",
"0.51005924",
"0.5086362",
"0.5085872",
"0.50769305",
"0.5059423",
"0.5050891",
"0.5043006",
"0.5042606",
"0.50414413",
"0.50385946",
"0.5037936",
"0.5037515",
"0.5035328",
"0.502728",
"0.50271225",
"0.50243914",
"0.502415",
"0.5015712",
"0.49919584",
"0.49782172",
"0.4975873",
"0.49732426",
"0.49645808",
"0.49521422",
"0.49521422",
"0.49521422",
"0.49511683",
"0.49511683",
"0.49509445",
"0.49509445",
"0.49509445",
"0.49468112",
"0.4937941",
"0.49280918",
"0.4923784",
"0.4923784",
"0.49137592",
"0.49069795",
"0.4901515",
"0.490039",
"0.48982957",
"0.48958826",
"0.48943716",
"0.4888753",
"0.48817587",
"0.48816285",
"0.48807615",
"0.48789522",
"0.48734435",
"0.48719394",
"0.48707482",
"0.48688406",
"0.48686594",
"0.486712",
"0.4859824",
"0.48555425",
"0.4852321",
"0.48453274",
"0.48423702"
] | 0.78514 | 0 |
Get permission checker for modifying Segment. | public static function getModifySegmentPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifySegments()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getSelectSegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewLetters()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewAds()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewRc()) {\n return;\n }\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function checkPermissions();",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"protected function isPermissionCorrect() {}",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function & GetPermissions ();",
"public function permission($permission);",
"public function permission(): string;",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function can($permission);",
"public static function getViewSegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function getPermission($permission);",
"public function hasAccess($permission);",
"public static function uses_permissions(): bool;",
"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}",
"public function checkPermission()\n {\n if ($this->User->isAdmin)\n {\n return;\n }\n\n // Set root IDs\n if (!is_array($this->User->calendars) || empty($this->User->calendars))\n {\n $root = [0];\n }\n else\n {\n $root = $this->User->calendars;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to create promoters in calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" to calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n $objPromoter = $this->Database->prepare(\"SELECT pid FROM tl_calendar_promoters WHERE id=?\")->limit(1)->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid event ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objPromoter->pid, $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" of calendar ID \"' . $objCalendar->pid . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $objPromoter = $this->Database->prepare(\"SELECT id FROM tl_calendar_promoters WHERE pid=?\")->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $session = $this->Session->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objPromoter->fetchEach('id'));\n $this->Session->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n $this->log('Invalid command \"' . Input::get('act') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"protected function getCurrentPermission() {}",
"public function authorize()\n {\n $hackedRoute = 'admin.media.update';\n if ( ! is_null($this->segment(4))) {\n $hackedRoute = 'admin.media_category.media.update#####' .$this->segment(3);\n }\n return hasPermission($hackedRoute);\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"public function getWorkspacePermission() {}",
"protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }",
"public function authorize()\n {\n if ($this->method() == 'PUT') {\n $categorySlug = $this->route('category');\n $category = $this->categoryRepo->getWithModerator($categorySlug);\n\n return $this->authUserRepo->can('update', $category);\n }\n else {\n return $this->authUserRepo->can('createOrDelete', 'App\\\\Category');\n }\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"public function getPermission()\n {\n return $this->permission;\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() {}",
"public function setPermissions() {\r\n\t\tif ($this->canSave) {\r\n\t\t\t$this->canSave = $this->resource->checkPolicy('save');\r\n\t\t}\r\n\t\t$this->canEdit = $this->modx->hasPermission('edit_document');\r\n\t\t$this->canCreate = $this->modx->hasPermission('new_document');\r\n\t\t$this->canPublish = $this->modx->hasPermission('publish_document');\r\n\t\t$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));\r\n\t\t$this->canDuplicate = $this->resource->checkPolicy('save');\r\n\t}",
"abstract public function permission(): string;",
"protected function check_permission()\n {\n return true;\n }",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"public function authorize()\n {\n return access()->allow('edit-school');\n }",
"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}",
"abstract public function getPermissions();",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public function getPermissions();",
"public static function getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function validator()\n {\n\n return PermissionValidator::class;\n }",
"public function authorize()\n {\n return $this->user()->can('update', \\App\\Models\\Member::withTrashed()->find($this->id));\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function authorize()\n {\n return Gate::allows('admin.booking.edit', $this->booking);\n }",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"public function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function authorize()\n {\n $this->id = $this->route('admin');\n return auth('admin')->check();\n }",
"public function hasPermission($id);",
"public function hasPermission($id);",
"public function authorize()\n {\n return auth()->user()->can('update', [Category::class, request('category')]);\n }",
"public function checkFolderPermissionsFilesystemPermissionsDataProvider() {}",
"protected function getAcl_PermissionsService()\n {\n return $this->services['acl.permissions'] = new \\phpbb\\permissions(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n }",
"public function authorize()\n {\n return Gate::allows('store', $this->getMarkType());\n }",
"public function authorize()\n {\n return $this->user()->canUpdateSecurity();\n }",
"public function authorize()\n {\n// $comment = Comment::find($this->route('comment')); // Get 'comment' route's params.\n// return $comment && $this->user()->can('update', $comment);\n\n return false;\n }",
"public function getEvaluatePermissions() {}",
"public function authorize()\n {\n return auth()->user()->can('updatePermissions', [Role::class, request('role')]);\n }",
"protected function _checkPermission($permission = \\SetaPDF_Core_SecHandler::PERM_FILL_FORM) {}",
"public function authorize()\n {\n return access()->can('edit-project');\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return \\Auth::check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return \\Auth::check();\n }",
"public function updatePermission() {\n try {\n if (!($this->permission instanceof Base_Model_ObtorLib_App_Core_Doc_Entity_Permission)) {\n throw new Base_Model_ObtorLib_App_Core_Doc_Exception(\" Permission Entity not intialized\");\n } else {\n $objPermission = new Base_Model_ObtorLib_App_Core_Doc_Dao_Permission();\n $objPermission->permission = $this->permission;\n return $objPermission->updatePermission();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Doc_Exception($ex);\n }\n }",
"public function get_item_permissions_check($request)\n {\n }",
"public function authorizePatch()\n {\n return $this->user()->can('acme.update');\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 }",
"final public function permission():int\n {\n return $this->permission;\n }",
"public function authorize()\n {\n return Auth::guard('admin')->check();\n }",
"public function authorize()\n {\n return Gate::allows('employee.edit');\n }",
"public function authorize()\n {\n\n $this->note = Note::find($this->route('note'));\n\n return Gate::allows('update', $this->note);\n }",
"public function authorize()\n {\n $authorized = auth()->check();\n if ($authorized) {\n $this->rules = $this->getRulesForAction(CrudAction::update());\n }\n return $authorized;\n }"
] | [
"0.69190854",
"0.6452372",
"0.6450016",
"0.6296729",
"0.61881",
"0.615267",
"0.5978442",
"0.5963707",
"0.5963707",
"0.5963707",
"0.5963707",
"0.5963707",
"0.5943561",
"0.5942078",
"0.59220827",
"0.5902732",
"0.58819616",
"0.58792764",
"0.58548754",
"0.580614",
"0.580614",
"0.57858235",
"0.5784576",
"0.5773025",
"0.57536817",
"0.5710154",
"0.56915873",
"0.56804067",
"0.56588537",
"0.56530875",
"0.5651906",
"0.5651906",
"0.56309783",
"0.5616745",
"0.5600444",
"0.5585138",
"0.55806476",
"0.5566256",
"0.5561221",
"0.5561221",
"0.5561221",
"0.55598545",
"0.55598545",
"0.55595887",
"0.55595887",
"0.55595887",
"0.5553926",
"0.5553657",
"0.55507886",
"0.55504346",
"0.5530977",
"0.5530657",
"0.55289966",
"0.5525418",
"0.5523716",
"0.551799",
"0.55061054",
"0.54813045",
"0.5476143",
"0.5475226",
"0.54750377",
"0.5467103",
"0.5449402",
"0.5445063",
"0.5437273",
"0.54174143",
"0.5416717",
"0.53983784",
"0.5398089",
"0.5398089",
"0.53946567",
"0.53932506",
"0.5389274",
"0.53802127",
"0.53758913",
"0.5371611",
"0.53617954",
"0.53591293",
"0.53578484",
"0.53557414",
"0.53513956",
"0.5346543",
"0.5346543",
"0.5345783",
"0.53294086",
"0.53292555",
"0.5322667",
"0.5322667",
"0.5322667",
"0.5322667",
"0.5322667",
"0.5322667",
"0.5322667",
"0.5322667",
"0.5322667",
"0.5321488",
"0.53126466",
"0.53108007",
"0.5307836",
"0.53010964"
] | 0.72991794 | 0 |
Get permission checker for viewing RC. | public static function getViewRcPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewRc()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkPermissions();",
"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}",
"public function & GetPermissions ();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function getWorkspacePermission() {}",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function permission(): string;",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"abstract public function getPermissions();",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public static function uses_permissions(): bool;",
"public function getPermissions();",
"public function getEvaluatePermissions() {}",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPossiblePermissions();",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"protected function getCurrentPermission() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function can($permission);",
"protected function check_permission()\n {\n return true;\n }",
"public function can_read () {\r\n\r\n return $this->permissions[\"R\"] ? true : false;\r\n\r\n }",
"static function detectPermission()\n {\n if(self::$org && !self::$role)\n return 'org';\n elseif(self::$org && self::$role)\n return 'orgRole';\n elseif(!self::$org && self::$role)\n return 'role';\n elseif(!self::$org && !self::$role && !self::$isGuest)\n return 'user';\n else\n return 'guest';\n }",
"protected function authorityControl()\n {\n return Authority::can(Permission::ACTION_R, 'Queries');\n }",
"function check_permission()\n {\n // Make sure the user is logged-in\n require_course_login($this->course, true, $this->cm);\n\n add_to_log($this->course->id, 'sloodle', 'view sloodle module', \"view.php?id={$this->cm->id}\", \"{$this->sloodle->id}\", $this->cm->id);\n \n // Check for permissions\n $this->module_context = get_context_instance(CONTEXT_MODULE, $this->cm->id);\n $this->course_context = get_context_instance(CONTEXT_COURSE, $this->course->id);\n if (has_capability('moodle/course:manageactivities', $this->module_context)) $this->canedit = true;\n\n // If the module is hidden, then can the user still view it?\n if (empty($this->cm->visible) && !has_capability('moodle/course:viewhiddenactivities', $this->module_context)) notice(get_string('activityiscurrentlyhidden'));\n }",
"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 authorize()\n {\n return access()->can('edit-project');\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"public static function CHECK_ACCESS_PERMISSION(){\n\t $SQL_String = \"SELECT uid,gid FROM permission_matrix WHERE uid=:uid AND master=1;\";\n\t return $SQL_String;\n\t}",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"abstract public function permission(): string;",
"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 // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }",
"protected function isPermissionCorrect() {}",
"function checkAccess() ;",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function getPermission($permission);",
"protected function authorityControl()\n {\n return Auth::check();\n }",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }",
"function permissions_get ()\n{\n\tstatic $perms = array (\n\t\t\t\"read\"\t\t=> 0x0001,\n\t\t\t\"create\"\t=> 0x0002,\n\t\t\t\"change\"\t=> 0x0004,\n\t\t\t\"delete\"\t=> 0x0008,\n\t\t\t\"password\"\t=> 0x0040,\n\t\t\t\"admin\"\t\t=> 0x8000,\t// admin\n\t\t\t);\n\treturn $perms;\n}",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function hasAccess($permission);",
"public function accessRules()\r\n\t{\r\n\t\t//Metodo localizado dentro da classe WebbeeController em protected/components/\r\n\t\treturn WebbeeController::controlAccess();\r\n\t}",
"public function authorize()\n {\n return $this->container['auth']->check();\n }",
"public function authorize()\n {\n $this->id = $this->route('admin');\n return auth('admin')->check();\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }",
"public function GetPermissionToSeeAssignments () {\n \treturn \n \t(\n \t\t$this->user_type == $this->user_types[0]\n \t\t|| $this->user_type == $this->user_types[1]\n\t\t\t|| $this->user_type == $this->user_types[2]\n\t\t);\n }",
"public function authorize()\n {\n switch($this->method()) {\n case 'GET':\n $cvReference = CvReference::findOrFail($this->id);\n $cv = Cv::findOrFail($cvReference->cv_id);\n return $this->user()->can('view', [Cv::class, $cv]);\n case 'POST':\n return $this->user()->can('create', Cv::class);\n case 'PUT':\n case 'PATCH':\n $cvReference = CvReference::findOrFail($this->id);\n $cv = Cv::findOrFail($cvReference->cv_id);\n return $this->user()->can('update', [Cv::class, $cv]);\n case 'DELETE':\n $cvReference = CvReference::findOrFail($this->id);\n $cv = Cv::findOrFail($cvReference->cv_id);\n return $this->user()->can('delete', [Cv::class, $cv]);\n default:break;\n }\n }",
"public function authorize()\n {\n return \\Auth::user()->iCan('donor', 'store');\n }",
"public function authorize()\n {\n return auth('admin')->check();\n }",
"public function permissions()\n\t{\n\t\treturn $this->get('permissions');\n\t}",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }",
"function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }",
"public function authorize()\n {\n return $this->auth->check();\n }",
"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 // Add a new Data Scrubber Filter Attribute?\n $p['add'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // Delete an existing Data Scrubber Filter Attribute?\n $p['delete'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // Edit an existing Data Scrubber Filter Attribute?\n $p['edit'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // View all existing Data Scrubber Filter Attribute?\n $p['index'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // Edit an existing Data Scrubber Filter Attribute?\n $p['order'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Modify ordering for display via AJAX \n $p['reorder'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Data Scrubber Filter Attribute?\n $p['view'] = $roles['cmadmin'] || $roles['coadmin'];\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }",
"function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = 0)\n {\n global $ilUser, $ilAccess;\n\n if ($a_user_id == 0) {\n $a_user_id = $ilUser->getId();\n }\n\n switch ($a_permission) {\n case \"read\":\n /*if (!ilObjUFreibFeedbackAccess::checkOnline($a_obj_id) &&\n !$ilAccess->checkAccessOfUser($a_user_id, \"write\", \"\", $a_ref_id))\n {\n return false;\n }*/\n break;\n }\n\n return true;\n }",
"public function getPermissions()\n\t{\n\t\tif(isset($this->permissions))\n\t\t{\n\t\t\treturn $this->permissions;\n\t\t}\n\n\t\t$request = new ColoCrossing_Http_Request('/', 'GET');\n\t\t$executor = $this->getHttpExecutor();\n\t\t$response = $executor->executeRequest($request);\n\t\t$content = $response->getContent();\n\n\t\treturn $this->permissions = isset($content) && isset($content['permissions']) ? $content['permissions'] : array();\n\t}",
"private static function getAclUtitlity() {\n $acl = AclUtility::getInstance();\n \tif (!is_null(self::$aclXml)) {\n \t\t$acl->setAclXml(self::$aclXml);\n \t}\n \treturn $acl;\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function authorize()\n {\n return Auth::guard('admin')->check();\n }",
"public function get_permissions()\n\t{\n\t\treturn $this->area->get_permissions($this->path);\n\t}",
"public function accessRules() {\n return VAuth::getAccessRules('package', array('getCity', 'clear', 'export', 'entry', 'input', 'childUpdate', 'index'));\n }",
"public function permission($permission);",
"public function authorize()\n {\n return \\Auth::guard('web')->check();\n }",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"public function authorize()\n {\n return Gate::authorize('manage-app');\n }",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}"
] | [
"0.67443115",
"0.66270953",
"0.65135026",
"0.6484154",
"0.6484154",
"0.6484154",
"0.6484154",
"0.6484154",
"0.63726616",
"0.6342119",
"0.6315979",
"0.6292842",
"0.62815636",
"0.6276726",
"0.6276726",
"0.62648296",
"0.6246302",
"0.6232253",
"0.61533964",
"0.61510795",
"0.6142803",
"0.61358595",
"0.60649747",
"0.60649747",
"0.60649747",
"0.6064796",
"0.6064277",
"0.6064277",
"0.6064108",
"0.6064108",
"0.6064108",
"0.6053971",
"0.60257435",
"0.6024688",
"0.60229594",
"0.60195994",
"0.59968245",
"0.59773517",
"0.59684664",
"0.59671277",
"0.5965764",
"0.5946917",
"0.59104174",
"0.59082323",
"0.59014946",
"0.5891583",
"0.5883767",
"0.5880387",
"0.5876899",
"0.5876899",
"0.58660805",
"0.5857753",
"0.5852797",
"0.5822886",
"0.58077395",
"0.58008784",
"0.57971853",
"0.57786965",
"0.5764962",
"0.5764898",
"0.5760803",
"0.57606494",
"0.57597417",
"0.5758535",
"0.57554424",
"0.57521737",
"0.5749959",
"0.5747319",
"0.57401174",
"0.573741",
"0.5735901",
"0.5724351",
"0.5721441",
"0.57184434",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.5704658",
"0.57021546",
"0.5701306",
"0.56893593",
"0.5688775",
"0.568032",
"0.56761414",
"0.5673892",
"0.56725127",
"0.5665718",
"0.56641054",
"0.5663701",
"0.5662007",
"0.56565034"
] | 0.6644883 | 1 |
Get permission checker for modifying RC. | public static function getModifyRcPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifyRc()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkPermissions();",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getWorkspacePermission() {}",
"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}",
"public function & GetPermissions ();",
"public static function uses_permissions(): bool;",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function permission(): string;",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function getEvaluatePermissions() {}",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"abstract public function getPermissions();",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }",
"public static function getViewRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"protected function getCurrentPermission() {}",
"public function checkPermission()\n {\n if ($this->User->isAdmin)\n {\n return;\n }\n\n // Set root IDs\n if (!is_array($this->User->calendars) || empty($this->User->calendars))\n {\n $root = [0];\n }\n else\n {\n $root = $this->User->calendars;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to create promoters in calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" to calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n $objPromoter = $this->Database->prepare(\"SELECT pid FROM tl_calendar_promoters WHERE id=?\")->limit(1)->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid event ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objPromoter->pid, $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" of calendar ID \"' . $objCalendar->pid . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $objPromoter = $this->Database->prepare(\"SELECT id FROM tl_calendar_promoters WHERE pid=?\")->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $session = $this->Session->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objPromoter->fetchEach('id'));\n $this->Session->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n $this->log('Invalid command \"' . Input::get('act') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"public static function getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPermissions();",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }",
"protected function isPermissionCorrect() {}",
"abstract public function permission(): string;",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"public function getPossiblePermissions();",
"function permissions_get ()\n{\n\tstatic $perms = array (\n\t\t\t\"read\"\t\t=> 0x0001,\n\t\t\t\"create\"\t=> 0x0002,\n\t\t\t\"change\"\t=> 0x0004,\n\t\t\t\"delete\"\t=> 0x0008,\n\t\t\t\"password\"\t=> 0x0040,\n\t\t\t\"admin\"\t\t=> 0x8000,\t// admin\n\t\t\t);\n\treturn $perms;\n}",
"public function authorizePatch()\n {\n return $this->user()->can('acme.update');\n }",
"public function can($permission);",
"public function can_read () {\r\n\r\n return $this->permissions[\"R\"] ? true : false;\r\n\r\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function validator()\n {\n\n return PermissionValidator::class;\n }",
"protected function check_permission()\n {\n return true;\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"final public function permission():int\n {\n return $this->permission;\n }",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"static function getPermissions() {\n if(self::$permissions === false) {\n self::$permissions = new NamedList(array(\n\n ));\n\n EventsManager::trigger('on_system_permissions', array(&self::$permissions));\n } // if\n\n return self::$permissions;\n }",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public function getPermission($permission);",
"public function authorize()\n {\n return access()->can('edit-project');\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\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() {}",
"function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"function permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'au_set')) {\n\t\treturn $return;\n\t}\n\n\tif (!elgg_is_logged_in()) {\n\t\treturn $return;\n\t}\n\n\t// this is our object, lets determine if we can edit it\n\t$set = $params['entity'];\n\t$user = $params['user'];\n\t$owner = $params['entity']->getOwnerEntity();\n\n\t// owners and admins can always edit\n\tif ($user->getGUID() == $owner->getGUID() || $user->isAdmin()) {\n\t\treturn true;\n\t}\n\n\n\t// check for friends special case\n\tif ($set->write_access_id == ACCESS_FRIENDS) {\n\t\treturn $owner->isFriendsWith($user->getGUID());\n\t}\n\n\t// write access is set using acl nomenclature\n\t$access = get_pinboard_write_accesses($user);\n\n\t// now we just look at remaining acls\n\tif (in_array($set->write_access_id, $access)) {\n\t\treturn true;\n\t}\n\n\treturn $return;\n}",
"public function authorize()\n {\n return auth()->user()->can('updatePermissions', [Role::class, request('role')]);\n }",
"public function permission($permission);",
"public function setPermissions() {\r\n\t\tif ($this->canSave) {\r\n\t\t\t$this->canSave = $this->resource->checkPolicy('save');\r\n\t\t}\r\n\t\t$this->canEdit = $this->modx->hasPermission('edit_document');\r\n\t\t$this->canCreate = $this->modx->hasPermission('new_document');\r\n\t\t$this->canPublish = $this->modx->hasPermission('publish_document');\r\n\t\t$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));\r\n\t\t$this->canDuplicate = $this->resource->checkPolicy('save');\r\n\t}",
"protected function getAcl_PermissionsService()\n {\n return $this->services['acl.permissions'] = new \\phpbb\\permissions(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n }",
"public static function getModifyRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPermissions()\n\t{\n\t\tif(isset($this->permissions))\n\t\t{\n\t\t\treturn $this->permissions;\n\t\t}\n\n\t\t$request = new ColoCrossing_Http_Request('/', 'GET');\n\t\t$executor = $this->getHttpExecutor();\n\t\t$response = $executor->executeRequest($request);\n\t\t$content = $response->getContent();\n\n\t\treturn $this->permissions = isset($content) && isset($content['permissions']) ? $content['permissions'] : array();\n\t}",
"public function authorize()\n {\n $authorized = auth()->check();\n if ($authorized) {\n $this->rules = $this->getRulesForAction(CrudAction::update());\n }\n return $authorized;\n }",
"public function validPermissions()\n {\n if (!ConfigHelper::cacheEnabled()) {\n return $this->getCurrentUserPermissions();\n }\n\n $cacheKey = 'laravelroles_permissions_' . Users::userModelCacheKey() . '_' . $this->getKey();\n\n return Cache::remember($cacheKey, ConfigHelper::cacheExpiryTime(), function () {\n return $this->getCurrentUserPermissions();\n });\n }",
"public function permissions()\n\t{\n\t\treturn $this->get('permissions');\n\t}",
"function acl( $check )\n{\n global $current_user_acl;\n \n $acl = $current_user_acl;\n if ($acl[ 'p' ][ 'ForbiddenAccess' ])\n {\n return false;\n }\n if ($acl[ 'p' ][ 'System' ])\n {\n return true;\n }\n \n $result = false;\n $match = substr($check, 0, 2);\n switch ($match)\n {\n case 'u:':\n case 'g:':\n case 'p:':\n $type = substr($check, 0, 1);\n $target = substr($check, 2);\n $result = check($acl[ $type ], $target);\n break;\n default:\n $args = array_slice(func_get_args(), 1);\n if (is_callable(array( 'Granted', $check )))\n {\n $result = call_user_func_array(array( 'Granted', $check ), $args);\n }\n }\n return $result;\n}",
"public function checkPermission()\n {\n $objUser = \\BackendUser::getInstance();\n $objSession = \\Session::getInstance();\n $objDatabase = \\Database::getInstance();\n\n // TODO!\n if (true || $objUser->isAdmin)\n {\n return;\n }\n\n // Set the root IDs\n if (!is_array($objUser->competition_submissions) || empty($objUser->competition_submissions))\n {\n $root = [0];\n }\n else\n {\n $root = $objUser->competition_submissions;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n \\Controller::log(\n 'Not enough permissions to create submission items in submission archive ID \"' . Input::get('pid') . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n \\Controller::log(\n 'Not enough permissions to ' . Input::get('act') . ' submission item ID \"' . $id . '\" to submission archive ID \"'\n . Input::get('pid') . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n case 'feature':\n $objArchive = $objDatabase->prepare(\"SELECT pid FROM tl_competition_submission WHERE id=?\")->limit(1)->execute($id);\n\n if ($objArchive->numRows < 1)\n {\n \\Controller::log('Invalid submission item ID \"' . $id . '\"', 'tl_competition_submission checkPermission', TL_ERROR);\n \\Controller::redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objArchive->pid, $root))\n {\n \\Controller::log(\n 'Not enough permissions to ' . Input::get('act') . ' submission item ID \"' . $id . '\" of submission archive ID \"'\n . $objArchive->pid . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n \\Controller::log(\n 'Not enough permissions to access submission archive ID \"' . $id . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n\n $objArchive = $objDatabase->prepare(\"SELECT id FROM tl_competition_submission WHERE pid=?\")->execute($id);\n\n if ($objArchive->numRows < 1)\n {\n \\Controller::log('Invalid submission archive ID \"' . $id . '\"', 'tl_competition_submission checkPermission', TL_ERROR);\n \\Controller::redirect('contao/main.php?act=error');\n }\n\n $session = $objSession->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objArchive->fetchEach('id'));\n $objSession->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n \\Controller::log('Invalid command \"' . Input::get('act') . '\"', 'tl_competition_submission checkPermission', TL_ERROR);\n \\Controller::redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n \\Controller::log(\n 'Not enough permissions to access submission archive ID ' . $id,\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"function getSystemPermission($name) {\n \t$role = $this->getRole();\n if(instance_of($role, 'Role')) {\n return (boolean) $role->getPermissionValue($name);\n } else {\n return false;\n } // if\n }",
"protected function checkPermissions()\n\t{\n\t\t$result = true;\n\n\t\t$CrmPerms = new CCrmPerms($GLOBALS['USER']->GetID());\n\t\tif (!$CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'WRITE'))\n\t\t{\n\t\t\t$this->errors['FATAL'][] = Loc::getMessage('CRM_CLE2_PERMISSION_DENIED');\n\t\t\t$result = false;\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function get_permissions()\n\t{\n\t\treturn $this->area->get_permissions($this->path);\n\t}",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function accessRules() {\n return VAuth::getAccessRules('package', array('getCity', 'clear', 'export', 'entry', 'input', 'childUpdate', 'index'));\n }",
"public function authorize()\n {\n if ($this->method() == 'PUT') {\n $categorySlug = $this->route('category');\n $category = $this->categoryRepo->getWithModerator($categorySlug);\n\n return $this->authUserRepo->can('update', $category);\n }\n else {\n return $this->authUserRepo->can('createOrDelete', 'App\\\\Category');\n }\n }",
"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 canEdit() {\n\t\treturn $this->_perms->checkModuleItem ( $this->_tbl_module, 'edit' );\n\t}",
"function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = 0)\n {\n global $ilUser, $ilAccess;\n\n if ($a_user_id == 0) {\n $a_user_id = $ilUser->getId();\n }\n\n switch ($a_permission) {\n case \"read\":\n /*if (!ilObjUFreibFeedbackAccess::checkOnline($a_obj_id) &&\n !$ilAccess->checkAccessOfUser($a_user_id, \"write\", \"\", $a_ref_id))\n {\n return false;\n }*/\n break;\n }\n\n return true;\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 }",
"protected function _initPermissions () {\r\n\r\n\t\t$bFreshData = false;\r\n\r\n\t\tif (self::$_bUseCache) {\r\n\t\t\t$oCacheManager = Kwgl_Cache::getManager();\r\n\t\t\t$oAclCache = $oCacheManager->getCache('acl');\r\n\r\n\t\t\tif (($aPermissionListing = $oAclCache->load(self::CACHE_IDENTIFIER_PERMISSIONS)) === false) {\r\n\t\t\t\t// Not Cached or Expired\r\n\r\n\t\t\t\t$bFreshData = true;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$bFreshData = true;\r\n\t\t}\r\n\r\n\t\tif ($bFreshData) {\r\n\t\t\t// Get Privileges from the Database\r\n\t\t\t$oDaoRoleResourcePrivilege = Kwgl_Db_Table::factory('System_Role_Resource_Privilege');\r\n\t\t\t//$aPermissionListing = $oDaoRoleResource->fetchAll();\r\n\t\t\t$aPermissionListing = $oDaoRoleResourcePrivilege->getPermissions();\r\n\r\n\t\t\tif (self::$_bUseCache) {\r\n\t\t\t\t$oAclCache->save($aPermissionListing, self::CACHE_IDENTIFIER_PERMISSIONS);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforeach ($aPermissionListing as $aPermissionDetail) {\r\n\t\t\t$sRoleName = $aPermissionDetail['role_name'];\r\n\t\t\t$sResourceName = $aPermissionDetail['resource_name'];\r\n\t\t\t$sPrivilegeName = null;\r\n\t\t\tif (!is_null($aPermissionDetail['privilege_name'])) {\r\n\t\t\t\t$sPrivilegeName = $aPermissionDetail['privilege_name'];\r\n\t\t\t}\r\n\t\t\t$sPermissionType = $aPermissionDetail['permission'];\r\n\r\n\t\t\t// Check the Permission to see if you should allow or deny the Resource/Privilege to the Role\r\n\t\t\tswitch ($sPermissionType) {\r\n\t\t\t\tcase self::PERMISSION_TYPE_ALLOW:\r\n\t\t\t\t\t$this->allow($sRoleName, $sResourceName, $sPrivilegeName);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase self::PERMISSION_TYPE_DENY:\r\n\t\t\t\t\t$this->deny($sRoleName, $sResourceName, $sPrivilegeName);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function um_user_can( $permission ) {\r\n\t\t\tif ( ! is_user_logged_in() )\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t$user_id = get_current_user_id();\r\n\t\t\t$role = UM()->roles()->get_priority_user_role( $user_id );\r\n\t\t\t$permissions = $this->role_data( $role );\r\n\r\n\t\t\t/**\r\n\t\t\t * UM hook\r\n\t\t\t *\r\n\t\t\t * @type filter\r\n\t\t\t * @title um_user_permissions_filter\r\n\t\t\t * @description Change User Permissions\r\n\t\t\t * @input_vars\r\n\t\t\t * [{\"var\":\"$permissions\",\"type\":\"array\",\"desc\":\"User Permissions\"},\r\n\t\t\t * {\"var\":\"$user_id\",\"type\":\"int\",\"desc\":\"User ID\"}]\r\n\t\t\t * @change_log\r\n\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t * @usage\r\n\t\t\t * <?php add_filter( 'um_user_permissions_filter', 'function_name', 10, 2 ); ?>\r\n\t\t\t * @example\r\n\t\t\t * <?php\r\n\t\t\t * add_filter( 'um_user_permissions_filter', 'my_user_permissions', 10, 2 );\r\n\t\t\t * function my_user_permissions( $permissions, $user_id ) {\r\n\t\t\t * // your code here\r\n\t\t\t * return $permissions;\r\n\t\t\t * }\r\n\t\t\t * ?>\r\n\t\t\t */\r\n\t\t\t$permissions = apply_filters( 'um_user_permissions_filter', $permissions, $user_id );\r\n\r\n\t\t\tif ( isset( $permissions[ $permission ] ) && is_serialized( $permissions[ $permission ] ) )\r\n\t\t\t\treturn unserialize( $permissions[ $permission ] );\r\n\r\n\t\t\tif ( isset( $permissions[ $permission ] ) && $permissions[ $permission ] == 1 )\r\n\t\t\t\treturn true;\r\n\r\n\t\t\treturn false;\r\n\t\t}",
"public function getPermissionConfig()\n {\n return [\n 'canCreate' => $this->canCreate,\n 'canUpdate' => $this->canUpdate,\n 'canDelete' => $this->canDelete,\n 'canExport' => $this->canExport,\n 'canImport' => $this->canImport,\n 'canBulkEdit' => $this->canBulkEdit,\n 'canBulkCopy' => $this->canBulkCopy,\n 'canBulkDelete' => $this->canBulkDelete,\n 'canEditInNewWindow' => $this->canEditInNewWindow,\n ];\n }",
"static function getPermission($name) {\n return static::getPermissions()->get($name);\n }",
"public function getAdminPermissions(): array;"
] | [
"0.6704651",
"0.65782005",
"0.63510907",
"0.6344431",
"0.6317396",
"0.6310521",
"0.62894964",
"0.62569547",
"0.62562865",
"0.62562865",
"0.62562865",
"0.62562865",
"0.62562865",
"0.6221094",
"0.6184906",
"0.6177133",
"0.61091477",
"0.610039",
"0.6084153",
"0.6059748",
"0.6059748",
"0.6056447",
"0.60117084",
"0.6007241",
"0.5954784",
"0.5920679",
"0.5918445",
"0.59132063",
"0.59099764",
"0.59090877",
"0.5901986",
"0.58788395",
"0.5856657",
"0.5852072",
"0.58455735",
"0.58083755",
"0.5801414",
"0.57815045",
"0.5769234",
"0.5750853",
"0.57428867",
"0.5727847",
"0.57188314",
"0.57188314",
"0.5713131",
"0.5701018",
"0.5699917",
"0.5690177",
"0.56896925",
"0.56828374",
"0.56700206",
"0.5665895",
"0.56652206",
"0.56652206",
"0.56652206",
"0.5663991",
"0.5663991",
"0.5663991",
"0.5663872",
"0.5663872",
"0.5651735",
"0.5644103",
"0.5631049",
"0.56165826",
"0.55878115",
"0.5586145",
"0.5582728",
"0.5580148",
"0.55611855",
"0.55580884",
"0.55535287",
"0.5553089",
"0.5535386",
"0.55345446",
"0.55233926",
"0.551754",
"0.5503166",
"0.54971313",
"0.5494432",
"0.5494",
"0.5483535",
"0.54796827",
"0.54787713",
"0.5476549",
"0.5475381",
"0.54666895",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5461491",
"0.5459927",
"0.54576886",
"0.5455399",
"0.54549015"
] | 0.7098316 | 0 |
Get permission checker for viewing RC. | public static function getViewBlacklistPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewBlacklist()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkPermissions();",
"public static function getViewRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\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}",
"public function & GetPermissions ();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function getWorkspacePermission() {}",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function permission(): string;",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"abstract public function getPermissions();",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public static function uses_permissions(): bool;",
"public function getPermissions();",
"public function getEvaluatePermissions() {}",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPossiblePermissions();",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"protected function getCurrentPermission() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function can($permission);",
"protected function check_permission()\n {\n return true;\n }",
"public function can_read () {\r\n\r\n return $this->permissions[\"R\"] ? true : false;\r\n\r\n }",
"static function detectPermission()\n {\n if(self::$org && !self::$role)\n return 'org';\n elseif(self::$org && self::$role)\n return 'orgRole';\n elseif(!self::$org && self::$role)\n return 'role';\n elseif(!self::$org && !self::$role && !self::$isGuest)\n return 'user';\n else\n return 'guest';\n }",
"protected function authorityControl()\n {\n return Authority::can(Permission::ACTION_R, 'Queries');\n }",
"function check_permission()\n {\n // Make sure the user is logged-in\n require_course_login($this->course, true, $this->cm);\n\n add_to_log($this->course->id, 'sloodle', 'view sloodle module', \"view.php?id={$this->cm->id}\", \"{$this->sloodle->id}\", $this->cm->id);\n \n // Check for permissions\n $this->module_context = get_context_instance(CONTEXT_MODULE, $this->cm->id);\n $this->course_context = get_context_instance(CONTEXT_COURSE, $this->course->id);\n if (has_capability('moodle/course:manageactivities', $this->module_context)) $this->canedit = true;\n\n // If the module is hidden, then can the user still view it?\n if (empty($this->cm->visible) && !has_capability('moodle/course:viewhiddenactivities', $this->module_context)) notice(get_string('activityiscurrentlyhidden'));\n }",
"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 authorize()\n {\n return access()->can('edit-project');\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"public static function CHECK_ACCESS_PERMISSION(){\n\t $SQL_String = \"SELECT uid,gid FROM permission_matrix WHERE uid=:uid AND master=1;\";\n\t return $SQL_String;\n\t}",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"abstract public function permission(): string;",
"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 // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }",
"protected function isPermissionCorrect() {}",
"function checkAccess() ;",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function getPermission($permission);",
"protected function authorityControl()\n {\n return Auth::check();\n }",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }",
"function permissions_get ()\n{\n\tstatic $perms = array (\n\t\t\t\"read\"\t\t=> 0x0001,\n\t\t\t\"create\"\t=> 0x0002,\n\t\t\t\"change\"\t=> 0x0004,\n\t\t\t\"delete\"\t=> 0x0008,\n\t\t\t\"password\"\t=> 0x0040,\n\t\t\t\"admin\"\t\t=> 0x8000,\t// admin\n\t\t\t);\n\treturn $perms;\n}",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function hasAccess($permission);",
"public function accessRules()\r\n\t{\r\n\t\t//Metodo localizado dentro da classe WebbeeController em protected/components/\r\n\t\treturn WebbeeController::controlAccess();\r\n\t}",
"public function authorize()\n {\n return $this->container['auth']->check();\n }",
"public function authorize()\n {\n $this->id = $this->route('admin');\n return auth('admin')->check();\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }",
"public function GetPermissionToSeeAssignments () {\n \treturn \n \t(\n \t\t$this->user_type == $this->user_types[0]\n \t\t|| $this->user_type == $this->user_types[1]\n\t\t\t|| $this->user_type == $this->user_types[2]\n\t\t);\n }",
"public function authorize()\n {\n switch($this->method()) {\n case 'GET':\n $cvReference = CvReference::findOrFail($this->id);\n $cv = Cv::findOrFail($cvReference->cv_id);\n return $this->user()->can('view', [Cv::class, $cv]);\n case 'POST':\n return $this->user()->can('create', Cv::class);\n case 'PUT':\n case 'PATCH':\n $cvReference = CvReference::findOrFail($this->id);\n $cv = Cv::findOrFail($cvReference->cv_id);\n return $this->user()->can('update', [Cv::class, $cv]);\n case 'DELETE':\n $cvReference = CvReference::findOrFail($this->id);\n $cv = Cv::findOrFail($cvReference->cv_id);\n return $this->user()->can('delete', [Cv::class, $cv]);\n default:break;\n }\n }",
"public function authorize()\n {\n return \\Auth::user()->iCan('donor', 'store');\n }",
"public function authorize()\n {\n return auth('admin')->check();\n }",
"public function permissions()\n\t{\n\t\treturn $this->get('permissions');\n\t}",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }",
"function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }",
"public function authorize()\n {\n return $this->auth->check();\n }",
"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 // Add a new Data Scrubber Filter Attribute?\n $p['add'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // Delete an existing Data Scrubber Filter Attribute?\n $p['delete'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // Edit an existing Data Scrubber Filter Attribute?\n $p['edit'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // View all existing Data Scrubber Filter Attribute?\n $p['index'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // Edit an existing Data Scrubber Filter Attribute?\n $p['order'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Modify ordering for display via AJAX \n $p['reorder'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Data Scrubber Filter Attribute?\n $p['view'] = $roles['cmadmin'] || $roles['coadmin'];\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return \\Auth::check();\n }",
"public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }",
"function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = 0)\n {\n global $ilUser, $ilAccess;\n\n if ($a_user_id == 0) {\n $a_user_id = $ilUser->getId();\n }\n\n switch ($a_permission) {\n case \"read\":\n /*if (!ilObjUFreibFeedbackAccess::checkOnline($a_obj_id) &&\n !$ilAccess->checkAccessOfUser($a_user_id, \"write\", \"\", $a_ref_id))\n {\n return false;\n }*/\n break;\n }\n\n return true;\n }",
"public function getPermissions()\n\t{\n\t\tif(isset($this->permissions))\n\t\t{\n\t\t\treturn $this->permissions;\n\t\t}\n\n\t\t$request = new ColoCrossing_Http_Request('/', 'GET');\n\t\t$executor = $this->getHttpExecutor();\n\t\t$response = $executor->executeRequest($request);\n\t\t$content = $response->getContent();\n\n\t\treturn $this->permissions = isset($content) && isset($content['permissions']) ? $content['permissions'] : array();\n\t}",
"private static function getAclUtitlity() {\n $acl = AclUtility::getInstance();\n \tif (!is_null(self::$aclXml)) {\n \t\t$acl->setAclXml(self::$aclXml);\n \t}\n \treturn $acl;\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function authorize()\n {\n return Auth::guard('admin')->check();\n }",
"public function get_permissions()\n\t{\n\t\treturn $this->area->get_permissions($this->path);\n\t}",
"public function accessRules() {\n return VAuth::getAccessRules('package', array('getCity', 'clear', 'export', 'entry', 'input', 'childUpdate', 'index'));\n }",
"public function permission($permission);",
"public function authorize()\n {\n return \\Auth::guard('web')->check();\n }",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"public function authorize()\n {\n return Gate::authorize('manage-app');\n }",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}"
] | [
"0.67443115",
"0.6644883",
"0.66270953",
"0.65135026",
"0.6484154",
"0.6484154",
"0.6484154",
"0.6484154",
"0.6484154",
"0.63726616",
"0.6342119",
"0.6315979",
"0.6292842",
"0.62815636",
"0.6276726",
"0.6276726",
"0.62648296",
"0.6246302",
"0.6232253",
"0.61533964",
"0.61510795",
"0.6142803",
"0.61358595",
"0.60649747",
"0.60649747",
"0.60649747",
"0.6064796",
"0.6064277",
"0.6064277",
"0.6064108",
"0.6064108",
"0.6064108",
"0.6053971",
"0.60257435",
"0.6024688",
"0.60229594",
"0.60195994",
"0.59968245",
"0.59773517",
"0.59684664",
"0.59671277",
"0.5965764",
"0.5946917",
"0.59104174",
"0.59082323",
"0.59014946",
"0.5891583",
"0.5883767",
"0.5880387",
"0.5876899",
"0.5876899",
"0.58660805",
"0.5857753",
"0.5852797",
"0.5822886",
"0.58077395",
"0.58008784",
"0.57971853",
"0.57786965",
"0.5764962",
"0.5764898",
"0.5760803",
"0.57606494",
"0.57597417",
"0.5758535",
"0.57554424",
"0.57521737",
"0.5749959",
"0.5747319",
"0.57401174",
"0.573741",
"0.5735901",
"0.5724351",
"0.5721441",
"0.57184434",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.57073915",
"0.5704658",
"0.57021546",
"0.5701306",
"0.56893593",
"0.5688775",
"0.568032",
"0.56761414",
"0.5673892",
"0.56725127",
"0.5665718",
"0.56641054",
"0.5663701",
"0.5662007",
"0.56565034"
] | 0.0 | -1 |
Get permission checker for modifying RC. | public static function getModifyBlacklistPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifyBlacklist()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function checkPermissions();",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getWorkspacePermission() {}",
"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}",
"public function & GetPermissions ();",
"public static function uses_permissions(): bool;",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function permission(): string;",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function getEvaluatePermissions() {}",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"abstract public function getPermissions();",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }",
"public static function getViewRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"protected function getCurrentPermission() {}",
"public function checkPermission()\n {\n if ($this->User->isAdmin)\n {\n return;\n }\n\n // Set root IDs\n if (!is_array($this->User->calendars) || empty($this->User->calendars))\n {\n $root = [0];\n }\n else\n {\n $root = $this->User->calendars;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to create promoters in calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" to calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n $objPromoter = $this->Database->prepare(\"SELECT pid FROM tl_calendar_promoters WHERE id=?\")->limit(1)->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid event ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objPromoter->pid, $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" of calendar ID \"' . $objCalendar->pid . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $objPromoter = $this->Database->prepare(\"SELECT id FROM tl_calendar_promoters WHERE pid=?\")->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $session = $this->Session->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objPromoter->fetchEach('id'));\n $this->Session->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n $this->log('Invalid command \"' . Input::get('act') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"public static function getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPermissions();",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }",
"protected function isPermissionCorrect() {}",
"abstract public function permission(): string;",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"public function getPossiblePermissions();",
"function permissions_get ()\n{\n\tstatic $perms = array (\n\t\t\t\"read\"\t\t=> 0x0001,\n\t\t\t\"create\"\t=> 0x0002,\n\t\t\t\"change\"\t=> 0x0004,\n\t\t\t\"delete\"\t=> 0x0008,\n\t\t\t\"password\"\t=> 0x0040,\n\t\t\t\"admin\"\t\t=> 0x8000,\t// admin\n\t\t\t);\n\treturn $perms;\n}",
"public function authorizePatch()\n {\n return $this->user()->can('acme.update');\n }",
"public function can($permission);",
"public function can_read () {\r\n\r\n return $this->permissions[\"R\"] ? true : false;\r\n\r\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function validator()\n {\n\n return PermissionValidator::class;\n }",
"protected function check_permission()\n {\n return true;\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"final public function permission():int\n {\n return $this->permission;\n }",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"static function getPermissions() {\n if(self::$permissions === false) {\n self::$permissions = new NamedList(array(\n\n ));\n\n EventsManager::trigger('on_system_permissions', array(&self::$permissions));\n } // if\n\n return self::$permissions;\n }",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public function getPermission($permission);",
"public function authorize()\n {\n return access()->can('edit-project');\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\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() {}",
"function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"function permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'au_set')) {\n\t\treturn $return;\n\t}\n\n\tif (!elgg_is_logged_in()) {\n\t\treturn $return;\n\t}\n\n\t// this is our object, lets determine if we can edit it\n\t$set = $params['entity'];\n\t$user = $params['user'];\n\t$owner = $params['entity']->getOwnerEntity();\n\n\t// owners and admins can always edit\n\tif ($user->getGUID() == $owner->getGUID() || $user->isAdmin()) {\n\t\treturn true;\n\t}\n\n\n\t// check for friends special case\n\tif ($set->write_access_id == ACCESS_FRIENDS) {\n\t\treturn $owner->isFriendsWith($user->getGUID());\n\t}\n\n\t// write access is set using acl nomenclature\n\t$access = get_pinboard_write_accesses($user);\n\n\t// now we just look at remaining acls\n\tif (in_array($set->write_access_id, $access)) {\n\t\treturn true;\n\t}\n\n\treturn $return;\n}",
"public function authorize()\n {\n return auth()->user()->can('updatePermissions', [Role::class, request('role')]);\n }",
"public function permission($permission);",
"public function setPermissions() {\r\n\t\tif ($this->canSave) {\r\n\t\t\t$this->canSave = $this->resource->checkPolicy('save');\r\n\t\t}\r\n\t\t$this->canEdit = $this->modx->hasPermission('edit_document');\r\n\t\t$this->canCreate = $this->modx->hasPermission('new_document');\r\n\t\t$this->canPublish = $this->modx->hasPermission('publish_document');\r\n\t\t$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));\r\n\t\t$this->canDuplicate = $this->resource->checkPolicy('save');\r\n\t}",
"protected function getAcl_PermissionsService()\n {\n return $this->services['acl.permissions'] = new \\phpbb\\permissions(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n }",
"public static function getModifyRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPermissions()\n\t{\n\t\tif(isset($this->permissions))\n\t\t{\n\t\t\treturn $this->permissions;\n\t\t}\n\n\t\t$request = new ColoCrossing_Http_Request('/', 'GET');\n\t\t$executor = $this->getHttpExecutor();\n\t\t$response = $executor->executeRequest($request);\n\t\t$content = $response->getContent();\n\n\t\treturn $this->permissions = isset($content) && isset($content['permissions']) ? $content['permissions'] : array();\n\t}",
"public function authorize()\n {\n $authorized = auth()->check();\n if ($authorized) {\n $this->rules = $this->getRulesForAction(CrudAction::update());\n }\n return $authorized;\n }",
"public function validPermissions()\n {\n if (!ConfigHelper::cacheEnabled()) {\n return $this->getCurrentUserPermissions();\n }\n\n $cacheKey = 'laravelroles_permissions_' . Users::userModelCacheKey() . '_' . $this->getKey();\n\n return Cache::remember($cacheKey, ConfigHelper::cacheExpiryTime(), function () {\n return $this->getCurrentUserPermissions();\n });\n }",
"public function permissions()\n\t{\n\t\treturn $this->get('permissions');\n\t}",
"function acl( $check )\n{\n global $current_user_acl;\n \n $acl = $current_user_acl;\n if ($acl[ 'p' ][ 'ForbiddenAccess' ])\n {\n return false;\n }\n if ($acl[ 'p' ][ 'System' ])\n {\n return true;\n }\n \n $result = false;\n $match = substr($check, 0, 2);\n switch ($match)\n {\n case 'u:':\n case 'g:':\n case 'p:':\n $type = substr($check, 0, 1);\n $target = substr($check, 2);\n $result = check($acl[ $type ], $target);\n break;\n default:\n $args = array_slice(func_get_args(), 1);\n if (is_callable(array( 'Granted', $check )))\n {\n $result = call_user_func_array(array( 'Granted', $check ), $args);\n }\n }\n return $result;\n}",
"public function checkPermission()\n {\n $objUser = \\BackendUser::getInstance();\n $objSession = \\Session::getInstance();\n $objDatabase = \\Database::getInstance();\n\n // TODO!\n if (true || $objUser->isAdmin)\n {\n return;\n }\n\n // Set the root IDs\n if (!is_array($objUser->competition_submissions) || empty($objUser->competition_submissions))\n {\n $root = [0];\n }\n else\n {\n $root = $objUser->competition_submissions;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n \\Controller::log(\n 'Not enough permissions to create submission items in submission archive ID \"' . Input::get('pid') . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n \\Controller::log(\n 'Not enough permissions to ' . Input::get('act') . ' submission item ID \"' . $id . '\" to submission archive ID \"'\n . Input::get('pid') . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n case 'feature':\n $objArchive = $objDatabase->prepare(\"SELECT pid FROM tl_competition_submission WHERE id=?\")->limit(1)->execute($id);\n\n if ($objArchive->numRows < 1)\n {\n \\Controller::log('Invalid submission item ID \"' . $id . '\"', 'tl_competition_submission checkPermission', TL_ERROR);\n \\Controller::redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objArchive->pid, $root))\n {\n \\Controller::log(\n 'Not enough permissions to ' . Input::get('act') . ' submission item ID \"' . $id . '\" of submission archive ID \"'\n . $objArchive->pid . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n \\Controller::log(\n 'Not enough permissions to access submission archive ID \"' . $id . '\"',\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n\n $objArchive = $objDatabase->prepare(\"SELECT id FROM tl_competition_submission WHERE pid=?\")->execute($id);\n\n if ($objArchive->numRows < 1)\n {\n \\Controller::log('Invalid submission archive ID \"' . $id . '\"', 'tl_competition_submission checkPermission', TL_ERROR);\n \\Controller::redirect('contao/main.php?act=error');\n }\n\n $session = $objSession->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objArchive->fetchEach('id'));\n $objSession->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n \\Controller::log('Invalid command \"' . Input::get('act') . '\"', 'tl_competition_submission checkPermission', TL_ERROR);\n \\Controller::redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n \\Controller::log(\n 'Not enough permissions to access submission archive ID ' . $id,\n 'tl_competition_submission checkPermission',\n TL_ERROR\n );\n \\Controller::redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"function getSystemPermission($name) {\n \t$role = $this->getRole();\n if(instance_of($role, 'Role')) {\n return (boolean) $role->getPermissionValue($name);\n } else {\n return false;\n } // if\n }",
"protected function checkPermissions()\n\t{\n\t\t$result = true;\n\n\t\t$CrmPerms = new CCrmPerms($GLOBALS['USER']->GetID());\n\t\tif (!$CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'WRITE'))\n\t\t{\n\t\t\t$this->errors['FATAL'][] = Loc::getMessage('CRM_CLE2_PERMISSION_DENIED');\n\t\t\t$result = false;\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function get_permissions()\n\t{\n\t\treturn $this->area->get_permissions($this->path);\n\t}",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function accessRules() {\n return VAuth::getAccessRules('package', array('getCity', 'clear', 'export', 'entry', 'input', 'childUpdate', 'index'));\n }",
"public function authorize()\n {\n if ($this->method() == 'PUT') {\n $categorySlug = $this->route('category');\n $category = $this->categoryRepo->getWithModerator($categorySlug);\n\n return $this->authUserRepo->can('update', $category);\n }\n else {\n return $this->authUserRepo->can('createOrDelete', 'App\\\\Category');\n }\n }",
"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 canEdit() {\n\t\treturn $this->_perms->checkModuleItem ( $this->_tbl_module, 'edit' );\n\t}",
"function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = 0)\n {\n global $ilUser, $ilAccess;\n\n if ($a_user_id == 0) {\n $a_user_id = $ilUser->getId();\n }\n\n switch ($a_permission) {\n case \"read\":\n /*if (!ilObjUFreibFeedbackAccess::checkOnline($a_obj_id) &&\n !$ilAccess->checkAccessOfUser($a_user_id, \"write\", \"\", $a_ref_id))\n {\n return false;\n }*/\n break;\n }\n\n return true;\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 }",
"protected function _initPermissions () {\r\n\r\n\t\t$bFreshData = false;\r\n\r\n\t\tif (self::$_bUseCache) {\r\n\t\t\t$oCacheManager = Kwgl_Cache::getManager();\r\n\t\t\t$oAclCache = $oCacheManager->getCache('acl');\r\n\r\n\t\t\tif (($aPermissionListing = $oAclCache->load(self::CACHE_IDENTIFIER_PERMISSIONS)) === false) {\r\n\t\t\t\t// Not Cached or Expired\r\n\r\n\t\t\t\t$bFreshData = true;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$bFreshData = true;\r\n\t\t}\r\n\r\n\t\tif ($bFreshData) {\r\n\t\t\t// Get Privileges from the Database\r\n\t\t\t$oDaoRoleResourcePrivilege = Kwgl_Db_Table::factory('System_Role_Resource_Privilege');\r\n\t\t\t//$aPermissionListing = $oDaoRoleResource->fetchAll();\r\n\t\t\t$aPermissionListing = $oDaoRoleResourcePrivilege->getPermissions();\r\n\r\n\t\t\tif (self::$_bUseCache) {\r\n\t\t\t\t$oAclCache->save($aPermissionListing, self::CACHE_IDENTIFIER_PERMISSIONS);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforeach ($aPermissionListing as $aPermissionDetail) {\r\n\t\t\t$sRoleName = $aPermissionDetail['role_name'];\r\n\t\t\t$sResourceName = $aPermissionDetail['resource_name'];\r\n\t\t\t$sPrivilegeName = null;\r\n\t\t\tif (!is_null($aPermissionDetail['privilege_name'])) {\r\n\t\t\t\t$sPrivilegeName = $aPermissionDetail['privilege_name'];\r\n\t\t\t}\r\n\t\t\t$sPermissionType = $aPermissionDetail['permission'];\r\n\r\n\t\t\t// Check the Permission to see if you should allow or deny the Resource/Privilege to the Role\r\n\t\t\tswitch ($sPermissionType) {\r\n\t\t\t\tcase self::PERMISSION_TYPE_ALLOW:\r\n\t\t\t\t\t$this->allow($sRoleName, $sResourceName, $sPrivilegeName);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase self::PERMISSION_TYPE_DENY:\r\n\t\t\t\t\t$this->deny($sRoleName, $sResourceName, $sPrivilegeName);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function um_user_can( $permission ) {\r\n\t\t\tif ( ! is_user_logged_in() )\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t$user_id = get_current_user_id();\r\n\t\t\t$role = UM()->roles()->get_priority_user_role( $user_id );\r\n\t\t\t$permissions = $this->role_data( $role );\r\n\r\n\t\t\t/**\r\n\t\t\t * UM hook\r\n\t\t\t *\r\n\t\t\t * @type filter\r\n\t\t\t * @title um_user_permissions_filter\r\n\t\t\t * @description Change User Permissions\r\n\t\t\t * @input_vars\r\n\t\t\t * [{\"var\":\"$permissions\",\"type\":\"array\",\"desc\":\"User Permissions\"},\r\n\t\t\t * {\"var\":\"$user_id\",\"type\":\"int\",\"desc\":\"User ID\"}]\r\n\t\t\t * @change_log\r\n\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t * @usage\r\n\t\t\t * <?php add_filter( 'um_user_permissions_filter', 'function_name', 10, 2 ); ?>\r\n\t\t\t * @example\r\n\t\t\t * <?php\r\n\t\t\t * add_filter( 'um_user_permissions_filter', 'my_user_permissions', 10, 2 );\r\n\t\t\t * function my_user_permissions( $permissions, $user_id ) {\r\n\t\t\t * // your code here\r\n\t\t\t * return $permissions;\r\n\t\t\t * }\r\n\t\t\t * ?>\r\n\t\t\t */\r\n\t\t\t$permissions = apply_filters( 'um_user_permissions_filter', $permissions, $user_id );\r\n\r\n\t\t\tif ( isset( $permissions[ $permission ] ) && is_serialized( $permissions[ $permission ] ) )\r\n\t\t\t\treturn unserialize( $permissions[ $permission ] );\r\n\r\n\t\t\tif ( isset( $permissions[ $permission ] ) && $permissions[ $permission ] == 1 )\r\n\t\t\t\treturn true;\r\n\r\n\t\t\treturn false;\r\n\t\t}",
"public function getPermissionConfig()\n {\n return [\n 'canCreate' => $this->canCreate,\n 'canUpdate' => $this->canUpdate,\n 'canDelete' => $this->canDelete,\n 'canExport' => $this->canExport,\n 'canImport' => $this->canImport,\n 'canBulkEdit' => $this->canBulkEdit,\n 'canBulkCopy' => $this->canBulkCopy,\n 'canBulkDelete' => $this->canBulkDelete,\n 'canEditInNewWindow' => $this->canEditInNewWindow,\n ];\n }",
"static function getPermission($name) {\n return static::getPermissions()->get($name);\n }",
"public function getAdminPermissions(): array;"
] | [
"0.7098316",
"0.6704651",
"0.65782005",
"0.63510907",
"0.6344431",
"0.6317396",
"0.6310521",
"0.62894964",
"0.62569547",
"0.62562865",
"0.62562865",
"0.62562865",
"0.62562865",
"0.62562865",
"0.6221094",
"0.6184906",
"0.61091477",
"0.610039",
"0.6084153",
"0.6059748",
"0.6059748",
"0.6056447",
"0.60117084",
"0.6007241",
"0.5954784",
"0.5920679",
"0.5918445",
"0.59132063",
"0.59099764",
"0.59090877",
"0.5901986",
"0.58788395",
"0.5856657",
"0.5852072",
"0.58455735",
"0.58083755",
"0.5801414",
"0.57815045",
"0.5769234",
"0.5750853",
"0.57428867",
"0.5727847",
"0.57188314",
"0.57188314",
"0.5713131",
"0.5701018",
"0.5699917",
"0.5690177",
"0.56896925",
"0.56828374",
"0.56700206",
"0.5665895",
"0.56652206",
"0.56652206",
"0.56652206",
"0.5663991",
"0.5663991",
"0.5663991",
"0.5663872",
"0.5663872",
"0.5651735",
"0.5644103",
"0.5631049",
"0.56165826",
"0.55878115",
"0.5586145",
"0.5582728",
"0.5580148",
"0.55611855",
"0.55580884",
"0.55535287",
"0.5553089",
"0.5535386",
"0.55345446",
"0.55233926",
"0.551754",
"0.5503166",
"0.54971313",
"0.5494432",
"0.5494",
"0.5483535",
"0.54796827",
"0.54787713",
"0.5476549",
"0.5475381",
"0.54666895",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5462346",
"0.5461491",
"0.5459927",
"0.54576886",
"0.5455399",
"0.54549015"
] | 0.6177133 | 16 |
Get permission checker for viewing ad. | public static function getViewAdPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewAds()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkPermissions();",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"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 function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }",
"public function isAccess();",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function hasAccess($permission);",
"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}",
"public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }",
"public function & GetPermissions ();",
"function feed_category_admin_access() {\r\n $arguments = func_get_args();\r\n $allow_public = array_shift($arguments);\r\n $feed_category = array_shift($arguments);\r\n foreach ($arguments as $access) {\r\n if (!user_access($access)) {\r\n return FALSE;\r\n }\r\n }\r\n return feed_category_access($allow_public, $feed_category);\r\n}",
"function checkAccess() ;",
"protected function check_permission()\n {\n return true;\n }",
"public function hasAccess(): bool;",
"public function can($permission);",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public static function uses_permissions(): bool;",
"public function getPermissions();",
"public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }",
"protected function isPermissionCorrect() {}",
"function feed_widget_admin_access() {\r\n $arguments = func_get_args();\r\n $feed = array_shift($arguments);\r\n foreach ($arguments as $access) {\r\n if (!user_access($access)) {\r\n return FALSE;\r\n }\r\n }\r\n return feed_widget_access($feed);\r\n}",
"public function getPermissions() {}",
"public function getPermissions() {}",
"abstract protected function canAccess();",
"abstract public function getPermissions();",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"public function hasUsageRights() {}",
"public function getEvaluatePermissions() {}",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"function user_has_permission() {\r\n\tglobal $wp_query;\r\n\r\n\tif ( is_posttype( 'itinerary', POSTTYPE_ARCHIVEORSINGLE ) ) {\r\n\t\treturn current_user_can( 'ind_read_itinerary' );\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_SINGLEONLY ) ) {\r\n\t\t// Check if this is the most recent post somehow\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_ARCHIVEONLY ) ) {\r\n\t\treturn true;\r\n\t\t$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;\r\n\t\t$current = ( $paged == 1 && $wp_query->current_post == 0 );\r\n\t\treturn ( current_user_can( 'ind_read_magazine_archive' ) ||\r\n\t\t\t( $current /* && current_user_can( 'ind_read_magazine' ) */ ) );\r\n\t}\r\n\t\r\n\tif ( is_posttype( 'restaurant', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'shop', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'activity', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'article', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'insidertrip' ) ) {\r\n\t\tif ( current_user_can( 'ind_read_itinerary' ) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t$counter_show = \\indagare\\cookies\\Counters::getPageCountGroup( 'restricted' );\r\n\t\tif ( $counter_show > INDG_PREVIEW_COUNT_MAX ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n\treturn true;\r\n}",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function permission(): string;",
"public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }",
"function check_permission()\n {\n // Make sure the user is logged-in\n require_course_login($this->course, true, $this->cm);\n\n add_to_log($this->course->id, 'sloodle', 'view sloodle module', \"view.php?id={$this->cm->id}\", \"{$this->sloodle->id}\", $this->cm->id);\n \n // Check for permissions\n $this->module_context = get_context_instance(CONTEXT_MODULE, $this->cm->id);\n $this->course_context = get_context_instance(CONTEXT_COURSE, $this->course->id);\n if (has_capability('moodle/course:manageactivities', $this->module_context)) $this->canedit = true;\n\n // If the module is hidden, then can the user still view it?\n if (empty($this->cm->visible) && !has_capability('moodle/course:viewhiddenactivities', $this->module_context)) notice(get_string('activityiscurrentlyhidden'));\n }",
"public function authorize()\n {\n return PrivateCategory::where([\n ['owner_id', '=', Auth::user()->id],\n ['id', '=', $this->category_id],\n ])->exists();\n }",
"public function getAccessRulesInfo();",
"public static function allows ()\r\n {\r\n $acl = Session::get('acl');\r\n return $acl['allows'];\r\n }",
"public function getAllowCheck()\n {\n return $this->allow_check;\n }",
"public function checkPolicy($permission) {\n $access = true;\n\n /* first check moderator access */\n if ($this->get('moderated')) {\n $moderatorGroups = $this->trimArray($this->get('moderator_group'));\n $moderators = $this->trimArray($this->get('moderators'));\n $inModeratorGroup = !empty($moderatorGroups) && !empty($this->xpdo->user) ? $this->xpdo->user->isMember($moderatorGroups) : false;\n $access = $inModeratorGroup || in_array($this->xpdo->user->get('username'),$moderators);\n } else {\n $access = $this->xpdo->user->isMember('Administrator');\n }\n\n /* now check global access */\n switch ($permission) {\n case 'view':\n $access = $this->xpdo->hasPermission('quip.thread_view');\n break;\n case 'truncate':\n $access = $this->xpdo->hasPermission('quip.thread_truncate');\n break;\n case 'remove':\n $access = $this->xpdo->hasPermission('quip.thread_remove');\n break;\n case 'comment_approve':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n case 'comment_remove':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n case 'comment_update':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n }\n\n return $access;\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 getPossiblePermissions();",
"public function hasAccess(){\n \treturn $this->hasAccess;\n }",
"public function authorize()\n {\n return Auth::user()->is_admin;\n }",
"public function authorize()\n {\n return \\Auth::user()->iCan('donor', 'store');\n }",
"public function authorize()\n {\n return auth('admin')->check();\n }",
"function acl( $check )\n{\n global $current_user_acl;\n \n $acl = $current_user_acl;\n if ($acl[ 'p' ][ 'ForbiddenAccess' ])\n {\n return false;\n }\n if ($acl[ 'p' ][ 'System' ])\n {\n return true;\n }\n \n $result = false;\n $match = substr($check, 0, 2);\n switch ($match)\n {\n case 'u:':\n case 'g:':\n case 'p:':\n $type = substr($check, 0, 1);\n $target = substr($check, 2);\n $result = check($acl[ $type ], $target);\n break;\n default:\n $args = array_slice(func_get_args(), 1);\n if (is_callable(array( 'Granted', $check )))\n {\n $result = call_user_func_array(array( 'Granted', $check ), $args);\n }\n }\n return $result;\n}",
"public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess||Auth::user()->allowAdminAccess);\n }",
"public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }",
"function user_can_access_admin_page()\n {\n }",
"protected function getCurrentPermission() {}",
"function VisibleToAdminUser()\n {\n\tinclude (\"dom.php\");\n return $this->CheckPermission($pavad.' Use');\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function authorize()\n {\n return is_client_or_staff();\n }",
"public function authorize()\n {\n $this->id = $this->route('admin');\n return auth('admin')->check();\n }",
"public static function currentUserHasAccess() {\n return current_user_can('admin_access');\n }",
"function checkIfUserCanAccessPage()\n{\n $permissionGranted = false;\n\n $request = Request::path();\n $path = $request[\"path\"];\n $currentUrlString = rtrim(str_replace(Request::server('SCRIPT_NAME'), '', $path), '/');\n\n $getUserPermissions = session()->get('user_permissions');\n\n if (in_array($currentUrlString, $getUserPermissions)) {\n $permissionGranted = true;\n }\n\n return $permissionGranted;\n}",
"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 authorize()\n {\n $user = Auth::user('admin');\n\n return $user->is_admin;\n }",
"public function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public function authorize()\n {\n return access()->allow('edit-reports');\n }",
"public function authorize()\n {\n return Auth::guard('admin')->check();\n }",
"public function getIsAccess()\n {\n return $this->isAccess;\n }",
"public function authorize()\n {\n $tag = $this->route()->parameter('tag');\n return Auth::user()->can('view', [Tag::class, $tag]);\n }",
"public function checkPermission(\\App\\Request $request)\n\t{\n\t\t$recordId = $request->getInteger('record');\n\t\tif (!$recordId) {\n\t\t\tthrow new \\App\\Exceptions\\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);\n\t\t}\n\t\tif (!\\App\\Privilege::isPermitted($request->getModule(), 'DetailView', $recordId)) {\n\t\t\tthrow new \\App\\Exceptions\\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);\n\t\t}\n\t}",
"public function get_item_permissions_check( $request ) {\n\t\treturn current_user_can( 'manage_options' );\n\t}",
"public function authorize()\n {\n return Gate::allows('admin.booking.edit', $this->booking);\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin', 'create_users');\n }",
"public function authorize()\n {\n // todo: dominion selected, selected dominion in active round?\n return Auth::check();\n }",
"public function hasPermission($id);",
"public function hasPermission($id);",
"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 }",
"function eman_can_view( $post, $user_id=false )\n{\n\tif ( is_numeric($post) ) $post = get_post($post);\n\tif ( ! $user_id ) $user_id = get_current_user_id();\n\n\t// Turner can view anything\n\tif ( eman_check_role('turner', $user_id) ) return true;\n\n\t// Pending can't view anything\n\tif ( eman_check_role('pending', $user_id) ) return false;\n\n\t// Test a post_type generally\n\tif ( is_string($post) && get_post_type_object($post) )\n\t{\n\t\t$post_type = $post;\n\t\t$is_post = false;\n\t}\n\t// Test a post specifically\n\telseif ( is_object($post) )\n\t{\n\t\t$post_type = $post->post_type;\n\t\t$is_post = true;\n\t\t// If BIC user, all set, they can view it\n\t\tif ( $user_id == emanager_bic::get_bic($post, 'ID') ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n\n\t// Settings for post type\n\t$cpt = ( $settings = eman_post_types($post_type) ) ? $settings : array();\n\n\t// Test settings permissions\n\tif ( ! empty($cpt['access']) )\n\t{\n\t\t// Owners have no access to settings\n\t\tif ( eman_check_role('owner', $user_id) && ! in_array('owner', $cpt['access']) ) return false;\n\n\t\t// Subs have limited access to settings\n\t\tif ( eman_check_role('sub', $user_id) && ! in_array('sub', $cpt['access']) ) return false;\n\t}\n\telseif ( eman_check_role('owner', $user_id) && ( ($is_post && 'noc' === eman_pco_or_noc($post)) || ( ! $is_post && 'em_noc' == $post_type && ! get_query_var('pco')) ) )\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n\n\tif ( $is_post )\n\t{\n\t\t// Test if user is in same company or created post\n\t\tif ( $is_post && (emanager_post::is_author($post) || emanager_post::same_company_as_post($post) || ('em_issue' == $post->post_type && eman_check_role('owner', $user_id)) | ('em_letter' == $post->post_type && eman_check_role('owner', $user_id)) ) ) return true;\n\n\t\t// If is NOC (not PCO), and is owner group, they can view\n\t\tif ( $is_post && 'pco' == eman_pco_or_noc($post) && eman_check_role('owner', $user_id) ) return true;\n\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}",
"public static function getViewBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\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 authorize()\n {\n return access()->allow('edit-settings');\n }",
"public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }",
"public function getAllowSpecific();",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"private function _check_socials_access() {\n\n return Access_token::inst()->check_socials_access($this->c_user->id);\n\n }",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Amasty_Acart::acart_reports');\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Dilmah_TeaFaq::dilmah_tfaq');\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}"
] | [
"0.6467925",
"0.6206585",
"0.61714286",
"0.61714286",
"0.61714286",
"0.6170596",
"0.6170596",
"0.6169882",
"0.61697716",
"0.61697716",
"0.61697716",
"0.616466",
"0.61621225",
"0.61532056",
"0.61513406",
"0.6141661",
"0.61276966",
"0.6061856",
"0.60611343",
"0.6040426",
"0.6005775",
"0.5999906",
"0.59791577",
"0.5975129",
"0.59749985",
"0.597378",
"0.59701735",
"0.59701735",
"0.59701735",
"0.59701735",
"0.59701735",
"0.59536546",
"0.59529984",
"0.5946703",
"0.5934033",
"0.593349",
"0.5900198",
"0.5900198",
"0.58978474",
"0.588198",
"0.58819026",
"0.58810264",
"0.5875848",
"0.58547306",
"0.58500093",
"0.5843764",
"0.58411807",
"0.5831175",
"0.5830508",
"0.5829292",
"0.5827174",
"0.5824441",
"0.58233464",
"0.5817884",
"0.5814468",
"0.58122224",
"0.5809263",
"0.5795927",
"0.5774505",
"0.5763667",
"0.57572",
"0.5756209",
"0.57498693",
"0.5738013",
"0.57370377",
"0.57330585",
"0.57326853",
"0.5728628",
"0.57276154",
"0.5723101",
"0.5722705",
"0.57132304",
"0.57095146",
"0.56989974",
"0.56950504",
"0.5692396",
"0.5688943",
"0.5683361",
"0.568093",
"0.5678149",
"0.5672193",
"0.56719154",
"0.56671137",
"0.566456",
"0.56630296",
"0.56630296",
"0.56529874",
"0.5643344",
"0.5641814",
"0.5641353",
"0.5640439",
"0.56388515",
"0.5637893",
"0.5624273",
"0.5616639",
"0.5614069",
"0.5613956",
"0.561357",
"0.56089896",
"0.56089896"
] | 0.67129576 | 0 |
Get permission checker for modifying ad. | public static function getModifyAdPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifyAds()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkPermissions();",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"protected function isPermissionCorrect() {}",
"public static function uses_permissions(): bool;",
"public function & GetPermissions ();",
"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}",
"public function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }",
"public function permission(): string;",
"public function getEvaluatePermissions() {}",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function getPermission()\n {\n return $this->permission;\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}",
"protected function check_permission()\n {\n return true;\n }",
"function acl( $check )\n{\n global $current_user_acl;\n \n $acl = $current_user_acl;\n if ($acl[ 'p' ][ 'ForbiddenAccess' ])\n {\n return false;\n }\n if ($acl[ 'p' ][ 'System' ])\n {\n return true;\n }\n \n $result = false;\n $match = substr($check, 0, 2);\n switch ($match)\n {\n case 'u:':\n case 'g:':\n case 'p:':\n $type = substr($check, 0, 1);\n $target = substr($check, 2);\n $result = check($acl[ $type ], $target);\n break;\n default:\n $args = array_slice(func_get_args(), 1);\n if (is_callable(array( 'Granted', $check )))\n {\n $result = call_user_func_array(array( 'Granted', $check ), $args);\n }\n }\n return $result;\n}",
"abstract public function getPermissions();",
"protected function getCurrentPermission() {}",
"public function can($permission);",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function authorizePatch()\n {\n return $this->user()->can('acme.update');\n }",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function getPermissions();",
"public static function getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function permission($permission);",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }",
"public function getAllowCheck()\n {\n return $this->allow_check;\n }",
"public function getWorkspacePermission() {}",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"public function setPermissions() {\r\n\t\tif ($this->canSave) {\r\n\t\t\t$this->canSave = $this->resource->checkPolicy('save');\r\n\t\t}\r\n\t\t$this->canEdit = $this->modx->hasPermission('edit_document');\r\n\t\t$this->canCreate = $this->modx->hasPermission('new_document');\r\n\t\t$this->canPublish = $this->modx->hasPermission('publish_document');\r\n\t\t$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));\r\n\t\t$this->canDuplicate = $this->resource->checkPolicy('save');\r\n\t}",
"public function hasAccess($permission);",
"public function authorize()\n {\n return auth()->user()->can('update', [Category::class, request('category')]);\n }",
"public function getAdminPermissions(): array;",
"public function checkPolicy($permission) {\n $access = true;\n\n /* first check moderator access */\n if ($this->get('moderated')) {\n $moderatorGroups = $this->trimArray($this->get('moderator_group'));\n $moderators = $this->trimArray($this->get('moderators'));\n $inModeratorGroup = !empty($moderatorGroups) && !empty($this->xpdo->user) ? $this->xpdo->user->isMember($moderatorGroups) : false;\n $access = $inModeratorGroup || in_array($this->xpdo->user->get('username'),$moderators);\n } else {\n $access = $this->xpdo->user->isMember('Administrator');\n }\n\n /* now check global access */\n switch ($permission) {\n case 'view':\n $access = $this->xpdo->hasPermission('quip.thread_view');\n break;\n case 'truncate':\n $access = $this->xpdo->hasPermission('quip.thread_truncate');\n break;\n case 'remove':\n $access = $this->xpdo->hasPermission('quip.thread_remove');\n break;\n case 'comment_approve':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n case 'comment_remove':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n case 'comment_update':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n }\n\n return $access;\n }",
"function permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'au_set')) {\n\t\treturn $return;\n\t}\n\n\tif (!elgg_is_logged_in()) {\n\t\treturn $return;\n\t}\n\n\t// this is our object, lets determine if we can edit it\n\t$set = $params['entity'];\n\t$user = $params['user'];\n\t$owner = $params['entity']->getOwnerEntity();\n\n\t// owners and admins can always edit\n\tif ($user->getGUID() == $owner->getGUID() || $user->isAdmin()) {\n\t\treturn true;\n\t}\n\n\n\t// check for friends special case\n\tif ($set->write_access_id == ACCESS_FRIENDS) {\n\t\treturn $owner->isFriendsWith($user->getGUID());\n\t}\n\n\t// write access is set using acl nomenclature\n\t$access = get_pinboard_write_accesses($user);\n\n\t// now we just look at remaining acls\n\tif (in_array($set->write_access_id, $access)) {\n\t\treturn true;\n\t}\n\n\treturn $return;\n}",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"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}",
"public function check_admin() {\n return current_user_can('administrator');\n }",
"final public function permission():int\n {\n return $this->permission;\n }",
"public function get_item_permissions_check($request)\n {\n }",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"abstract public function permission(): string;",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function check_permflag($flag) {\n // TO DO!!!!!!\n }",
"public function canEdit() {\n\t\treturn $this->_perms->checkModuleItem ( $this->_tbl_module, 'edit' );\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 getPermission($permission);",
"public function authorize()\n {\n $authorized = auth()->check();\n if ($authorized) {\n $this->rules = $this->getRulesForAction(CrudAction::update());\n }\n return $authorized;\n }",
"public function getPossiblePermissions();",
"public function authorize()\n {\n return auth()->user()->can('updatePermissions', [Role::class, request('role')]);\n }",
"public function getCanModifyAttribute()\n {\n // Checks if there are any shared user permissions for this user, if not returnes false\n // If they do have permissions, it will return there modify attribute\n return (count($this->auth_user_share)) ? (bool)($this->auth_user_share[0]->pivot->modify) : false;\n }",
"public function authorize()\n {\n $hackedRoute = 'admin.media.update';\n if ( ! is_null($this->segment(4))) {\n $hackedRoute = 'admin.media_category.media.update#####' .$this->segment(3);\n }\n return hasPermission($hackedRoute);\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 authorize()\n {\n return auth()->user()->can('update online assessment');\n }",
"public function authorize()\n {\n if ($this->method() == 'PUT') {\n $categorySlug = $this->route('category');\n $category = $this->categoryRepo->getWithModerator($categorySlug);\n\n return $this->authUserRepo->can('update', $category);\n }\n else {\n return $this->authUserRepo->can('createOrDelete', 'App\\\\Category');\n }\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"public function validator()\n {\n\n return PermissionValidator::class;\n }",
"public function updatePermission() {\n try {\n if (!($this->permission instanceof Base_Model_ObtorLib_App_Core_Doc_Entity_Permission)) {\n throw new Base_Model_ObtorLib_App_Core_Doc_Exception(\" Permission Entity not intialized\");\n } else {\n $objPermission = new Base_Model_ObtorLib_App_Core_Doc_Dao_Permission();\n $objPermission->permission = $this->permission;\n return $objPermission->updatePermission();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Doc_Exception($ex);\n }\n }",
"public static function getModifyRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function authorize()\n {\n return $this->user()->can('update', $this->user());\n }",
"public function hasPermission($id);",
"public function hasPermission($id);",
"function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"public function get_item_permissions_check( $request ) {\n\t\treturn current_user_can( 'manage_options' );\n\t}",
"public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }"
] | [
"0.6759991",
"0.6660755",
"0.65371853",
"0.62435865",
"0.62106514",
"0.6200163",
"0.6168307",
"0.61410314",
"0.6109556",
"0.6108003",
"0.6106346",
"0.6106346",
"0.6106346",
"0.6106346",
"0.6106346",
"0.60883087",
"0.60842174",
"0.6045964",
"0.60349435",
"0.60338366",
"0.6006741",
"0.60001117",
"0.59953165",
"0.5951202",
"0.59469545",
"0.59381974",
"0.59198344",
"0.59198344",
"0.5919766",
"0.5903174",
"0.59009063",
"0.5894518",
"0.5889939",
"0.5886337",
"0.5879571",
"0.58791906",
"0.5868449",
"0.5868449",
"0.5868449",
"0.58671427",
"0.58671427",
"0.5866708",
"0.5866708",
"0.5866708",
"0.58558196",
"0.585502",
"0.5853462",
"0.58225584",
"0.58218473",
"0.5812646",
"0.5809756",
"0.57985497",
"0.5778216",
"0.57721835",
"0.57712424",
"0.5768733",
"0.57536095",
"0.57507604",
"0.57365036",
"0.573332",
"0.5729732",
"0.5727666",
"0.57059085",
"0.5705855",
"0.57021177",
"0.5699007",
"0.569236",
"0.56915104",
"0.56896895",
"0.56896895",
"0.56755364",
"0.5673703",
"0.5671194",
"0.56682134",
"0.5665858",
"0.5664856",
"0.5663706",
"0.56634665",
"0.56576335",
"0.5652175",
"0.5652175",
"0.5652175",
"0.5652175",
"0.5652175",
"0.5652175",
"0.5652175",
"0.5652175",
"0.5652175",
"0.56496227",
"0.5649492",
"0.56462795",
"0.56385803",
"0.56315106",
"0.5630392",
"0.56293476",
"0.5625575",
"0.5625575",
"0.5618367",
"0.56149477",
"0.5610932"
] | 0.7263932 | 0 |
Get permission checker for viewing recipients. | public static function getViewRecipientsPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewSegments()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getModifyRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function GetPermissionToSeeAssignments () {\n \treturn \n \t(\n \t\t$this->user_type == $this->user_types[0]\n \t\t|| $this->user_type == $this->user_types[1]\n\t\t\t|| $this->user_type == $this->user_types[2]\n\t\t);\n }",
"public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }",
"public function getPermissions();",
"public function & GetPermissions ();",
"public static function getViewBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }",
"public function listRecipients()\n {\n $recipients = $this->recipients;\n if (!count($recipients))\n return null;\n\n $recipients->transform(function ($recipient) {\n if (!$recipient->messagable) return FALSE;\n if (!$recipient->messagable->staff) return FALSE;\n\n return $recipient->messagable->staff;\n });\n\n return $recipients;\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public function checkPermissions();",
"public function can($permission);",
"static protected function checkAccess()\n {\n $cur_user = User::getConnectedUser();\n if (!$cur_user || !$cur_user->canSeeInvitations()) {\n redirectTo('/');\n }\n return $cur_user;\n }",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function recipients(){\n $user = User::whereHas('roles', function($q){\n $q->where('role_id', 3);\n })->get();\n\n return $user;\n }",
"public function getEvaluatePermissions() {}",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function hasAccess($permission);",
"public function getPermission($permission);",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"abstract public function getPermissions();",
"public function authorize()\n {\n return auth()->user()->can('edit', $this->subscription);\n }",
"public function getPermissions() {\n\t\treturn $this->addressBookInfo['permissions'];\n\t}",
"public function getUserPermissions(): Collection\n {\n return $this->model->where('name', 'LIKE', 'view_%')->get();\n }",
"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 // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }",
"public static function canDisplayContactsMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_CONTACT);\n\t}",
"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}",
"public function myRecipientDetails()\n {\n $recipients = Recipient::where('user_id', Auth::id())->get();\n return view('frontEnd.usersPanel.recipients',compact('recipients'));\n }",
"public function authorize(){\n\n if($this->reply_to) {\n $id = $this->reply_to;\n $staffID = Auth::id();\n $result = SystemTicket::where('email.id', $id)\n ->where(function ($query) use ($staffID) {\n $query->where(function ($query) use ($staffID) {\n $query->where('email.sendermodel_type', 'App\\Models\\Staff');\n $query->where(function ($query) use ($staffID) {\n $query->where('email.sendermodel_id', $staffID);\n $query->orWhereNull('email.sendermodel_id');\n });\n })\n ->orWhere(function ($query) use ($staffID) {\n $query->where('email_receiver.receivermodel_type', 'App\\Models\\Staff');\n $query->where(function ($query) use ($staffID) {\n $query->where('email_receiver.receivermodel_id', $staffID);\n $query->orWhereNull('email_receiver.receivermodel_id');\n });\n });\n })\n ->leftjoin('email_receiver','email.id','=','email_receiver.email_id')\n ->first();\n\n if (!$result) {\n return false;\n }\n }\n\n return true;\n }",
"public static function getViewRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"function check_permission()\n {\n // Make sure the user is logged-in\n require_course_login($this->course, true, $this->cm);\n\n add_to_log($this->course->id, 'sloodle', 'view sloodle module', \"view.php?id={$this->cm->id}\", \"{$this->sloodle->id}\", $this->cm->id);\n \n // Check for permissions\n $this->module_context = get_context_instance(CONTEXT_MODULE, $this->cm->id);\n $this->course_context = get_context_instance(CONTEXT_COURSE, $this->course->id);\n if (has_capability('moodle/course:manageactivities', $this->module_context)) $this->canedit = true;\n\n // If the module is hidden, then can the user still view it?\n if (empty($this->cm->visible) && !has_capability('moodle/course:viewhiddenactivities', $this->module_context)) notice(get_string('activityiscurrentlyhidden'));\n }",
"protected function getTranslatorPermissions() {\n return array_filter([$this->getTranslatePermission(), 'create content translations', 'update content translations', 'delete content translations']);\n }",
"public static function getViewAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function getPossiblePermissions();",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function getRecipients();",
"public function authorize()\n\t{\n $subjectId = $this->route('subject');\n\n return Subject::find($subjectId)->user->id == Auth::id();\n\t}",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function getPermission()\n {\n return $this->permission ?: null;\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 permissions()\n\t{\n\t\treturn $this->get('permissions');\n\t}",
"public static function getSelectSegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewLetters()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewAds()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewRc()) {\n return;\n }\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function checkApprovalRights(){\n $check = YumUser::approvalRights($this->id);\n return $check['has_right'];\n }",
"public static function canDisplayPermissionsMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_PERMISSION);\n\t}",
"public function hasUsageRights() {}",
"public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }",
"protected function getTargetPermission() {}",
"public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }",
"protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')\n ->isAllowed('admin/system/convert/professio_budgetmailer');\n }",
"public function view(User $actor, Permission $permission)\n {\n return $actor->can('set permissions');\n }",
"public function getReceiver()\n {\n return $this->user;\n }",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function authorize(): bool\n {\n return $this->user()->can('create_contact');\n }",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getUserPermissions()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('userPermissions');\n }",
"public function permission(): string;",
"public function getPermissions(string $from, string $to, int $id) : View\n {\n $permission = [];\n $fromModel = $this->{$from.'Repository'}->all();\n $toModel = $this->{$to.'Repository'}->all();\n if(!in_array($from. '.' . $to , $this->valid) || !hasResource($from. '.' . $to))\n {\n abort(404);\n }\n\n foreach ($fromModel as $valueFrom)\n {\n $permission[$valueFrom->id] = [0 => false, 1 => $valueFrom->name];\n foreach ($toModel->find($id)->{$from.'s'} as $valueTo)\n {\n if($valueFrom->id == $valueTo->id)\n {\n $permission[$valueFrom->id] = [0 => true, 1 => $valueFrom->name];\n break;\n }\n }\n }\n\n return view('AclView::acl/getresource',\n ['from' => $this->{$to.'Repository'}->find($id), // User -> ForExample Cyrix\n 'to' => $permission, // All Roles ( Example )\n 'action_split' => ucfirst($from).'s',\n 'action' => $to.'.'.$from,\n 'id' => $id\n ]);\n }",
"function can($action, $params=array()){\n $logger = Logger::getInstance();\n\n $user = false;\n if(isset($_SESSION['JR'])){\n //who is logged in.\n $user = $_SESSION['JR']->getUser();\n }\n\n //If someone is logged in\n if($user !== false){\n switch($action){\n case 'find':\n //IF searching for own address, return true;\n $ret = true;\n foreach($params[0] as $p){\n if($p[0] == \"person_id\"){\n if(count($p) == 2 && $p[1] == $user['person_id']) $ret = true && $ret;\n else if(count($p) == 3 && $p[2] == $user['person_id']) $ret = true && $ret;\n else $ret = false;\n }\n }\n if($ret) return true;\n //Otherwise let anyone but reviewers search addresses\n return $user['role_id'] != ROLE::REVIEWER;\n\n case 'read':\n //Let anyone but reviewers read addresses, except their own\n return $this->vals['person_id'] == $user['person_id'] || $user['role_id'] != ROLE::REVIEWER;\n break;\n case 'update':\n //A user can update their own address\n if($user['person_id'] == $this->person_id) return true;\n \n //Administrators and Editors can edit addresses\n return $user['role_id'] == ROLE::ADMINISTRATOR || $user['role_id'] == ROLE::EDITOR;\n break;\n case 'create':\n if($user['person_id'] == $params['person_id']) return true;\n case 'delete':\n //Administrators, Editors can create and delete\n return $user['role_id'] == ROLE::ADMINISTRATOR || $user['role_id'] == ROLE::EDITOR;\n break;\n }\n }\n\n $logger->log(\"Permission Denied!\",Logger::DEBUG,true);\n return false;\n\n\n }",
"public static function uses_permissions(): bool;",
"public static function checkPermission(\\SetaPDF_Core_Document $document, $permission, $message = null) {}",
"public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function hasPermission($id);",
"public function hasPermission($id);",
"public function permission($permission);",
"public function authorize()\n {\n return Gate::allows('admin.booking.edit', $this->booking);\n }",
"public function authorize()\n {\n return $this->user()->can('manage-drafts');\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"public function authorize()\n {\n return $this->user()->can('manage-routes');\n }",
"public function authorize()\n {\n return $this->user()->can('manage-routes');\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin', 'create_users');\n }",
"public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }",
"function getRecipients() {\n\t\treturn $this->getData('recipients');\n\t}",
"public function authorize(): bool\n {\n return $this->user()->can('update_contact');\n }",
"function user_can($permission, $user_id = null) {\n\n\tglobal $db;\n\tif ($user_id == null)\n\t\t// defaults to the current user\n \t$user_id = $_SESSION['user_id'];\n\n\t$db->real_escape_string($permission);\n\n\t$query = $db->prepare(\"SELECT \".$permission.\" FROM `users` NATURAL JOIN `roles` WHERE `user_id` = ?\");\n\n\tif ($db->error) {\n\t\t// An error may occur if the permission does not exist\n\t\treturn false;\n\t}\n\n\t$query->bind_param('i', $user_id);\n\t\n\t$query->execute();\n\t\n\t$query->bind_result($can);\n\n\t$query->fetch();\n\t\n\t$query->free_result();\n\n\treturn $can;\n}",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"public function restore_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function authorize()\n {\n return Gate::allows('admin.shipment.edit', $this->shipment);\n }",
"public function getPermissions()\r\n {\r\n return $this->getGuardUser()->getPermissions();\r\n }",
"private function recipients()\n {\n if (request('type') === 'bulk') {\n return $recipients = count(Contact::active()->where('group_id', request('recipients'))->pluck('mobile'));\n } elseif (request('type') === 'single') {\n return $recipients = 1;\n }\n }",
"public function HasPermission()\n\t\t{\n\t\t\tstatic $perms = null;\n\t\t\tif ($perms === null) {\n\t\t\t\t$perms = $GLOBALS[\"ISC_CLASS_ADMIN_AUTH\"]->GetPermissions();\n\t\t\t}\n\n\t\t\tif (in_array(AUTH_Edit_Customers, $perms)\n\t\t\t\t&& in_array(AUTH_Edit_Orders, $perms)\n\t\t\t\t&& in_array(AUTH_Newsletter_Subscribers, $perms)) {\n\t\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public function can($permissions);",
"public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }",
"function canSeePrivate() {\n \treturn $this->isProjectManager() || (boolean) $this->getSystemPermission('can_see_private_objects');\n }",
"public function can($permission, $requireAll = false);",
"public static function getPermissionModel()\n {\n return static::getModel('Permissions');\n }",
"private function filterByPermission(){\n\n }",
"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 // Add a new Data Scrubber Filter Attribute?\n $p['add'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // Delete an existing Data Scrubber Filter Attribute?\n $p['delete'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // Edit an existing Data Scrubber Filter Attribute?\n $p['edit'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // View all existing Data Scrubber Filter Attribute?\n $p['index'] = $roles['cmadmin'] || $roles['coadmin'];\n \n // Edit an existing Data Scrubber Filter Attribute?\n $p['order'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Modify ordering for display via AJAX \n $p['reorder'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Data Scrubber Filter Attribute?\n $p['view'] = $roles['cmadmin'] || $roles['coadmin'];\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }",
"public function permissions()\n {\n return $this->permissions;\n }",
"public function authorize()\n {\n $this->id = $this->route('admin');\n return auth('admin')->check();\n }"
] | [
"0.6474706",
"0.61962634",
"0.58606696",
"0.57558185",
"0.5754672",
"0.5747898",
"0.5737334",
"0.5705835",
"0.5655026",
"0.5655026",
"0.56410104",
"0.5619583",
"0.5578729",
"0.5578528",
"0.55465716",
"0.5533397",
"0.5508826",
"0.5493374",
"0.54809177",
"0.5454348",
"0.5453453",
"0.54502124",
"0.54502124",
"0.5432224",
"0.54296273",
"0.54274696",
"0.5421183",
"0.54205513",
"0.5420362",
"0.541257",
"0.5402271",
"0.5374603",
"0.53641",
"0.53622615",
"0.53471595",
"0.53448415",
"0.53440696",
"0.53326046",
"0.5332244",
"0.53310245",
"0.531696",
"0.531696",
"0.531696",
"0.531696",
"0.531696",
"0.5305615",
"0.5300815",
"0.5300535",
"0.5283416",
"0.5265938",
"0.5260394",
"0.52516717",
"0.5249784",
"0.52235955",
"0.5164317",
"0.5161255",
"0.51566905",
"0.51525235",
"0.51375365",
"0.51365614",
"0.51360893",
"0.51349455",
"0.5133755",
"0.5120164",
"0.5113977",
"0.5110715",
"0.51095885",
"0.5106566",
"0.510609",
"0.50933814",
"0.5092616",
"0.5088575",
"0.5087749",
"0.5087749",
"0.50874686",
"0.50866663",
"0.5073617",
"0.5073446",
"0.5061312",
"0.5061312",
"0.5061164",
"0.5055148",
"0.505478",
"0.5045373",
"0.5038918",
"0.5033673",
"0.5025383",
"0.502516",
"0.5024312",
"0.5024229",
"0.5023207",
"0.50192523",
"0.5008614",
"0.50059694",
"0.5004727",
"0.49913108",
"0.49894318",
"0.4988123",
"0.49870965",
"0.4979071"
] | 0.69527423 | 0 |
Get permission checker for modifying recipients. | public static function getModifyRecipientsPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifySegments()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function checkPermissions();",
"public static function getViewRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"public static function getModifySegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function & GetPermissions ();",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"protected function getTranslatorPermissions() {\n return array_filter([$this->getTranslatePermission(), 'create content translations', 'update content translations', 'delete content translations']);\n }",
"public function can($permission);",
"public function GetPermissionToSeeAssignments () {\n \treturn \n \t(\n \t\t$this->user_type == $this->user_types[0]\n \t\t|| $this->user_type == $this->user_types[1]\n\t\t\t|| $this->user_type == $this->user_types[2]\n\t\t);\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function authorize(): bool\n {\n return $this->user()->can('update_contact');\n }",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function getEvaluatePermissions() {}",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public function getPermissions();",
"public function getPermission($permission);",
"public function validator()\n {\n\n return PermissionValidator::class;\n }",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function checkPermission()\n {\n if ($this->User->isAdmin)\n {\n return;\n }\n\n // Set root IDs\n if (!is_array($this->User->calendars) || empty($this->User->calendars))\n {\n $root = [0];\n }\n else\n {\n $root = $this->User->calendars;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to create promoters in calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" to calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n $objPromoter = $this->Database->prepare(\"SELECT pid FROM tl_calendar_promoters WHERE id=?\")->limit(1)->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid event ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objPromoter->pid, $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" of calendar ID \"' . $objCalendar->pid . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $objPromoter = $this->Database->prepare(\"SELECT id FROM tl_calendar_promoters WHERE pid=?\")->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $session = $this->Session->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objPromoter->fetchEach('id'));\n $this->Session->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n $this->log('Invalid command \"' . Input::get('act') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function getModifyProtected() {\n\t\t$modifyProtected = FALSE;\n\t\tif ($this->getUsersWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\n\t\treturn $modifyProtected;\n\t}",
"protected function getTargetPermission() {}",
"public function getCanModifyAttribute()\n {\n // Checks if there are any shared user permissions for this user, if not returnes false\n // If they do have permissions, it will return there modify attribute\n return (count($this->auth_user_share)) ? (bool)($this->auth_user_share[0]->pivot->modify) : false;\n }",
"public static function uses_permissions(): bool;",
"public static function checkPermission(\\SetaPDF_Core_Document $document, $permission, $message = null) {}",
"public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }",
"abstract public function getPermissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function getPermissions() {\n\t\treturn $this->addressBookInfo['permissions'];\n\t}",
"public function permission($permission);",
"function permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'au_set')) {\n\t\treturn $return;\n\t}\n\n\tif (!elgg_is_logged_in()) {\n\t\treturn $return;\n\t}\n\n\t// this is our object, lets determine if we can edit it\n\t$set = $params['entity'];\n\t$user = $params['user'];\n\t$owner = $params['entity']->getOwnerEntity();\n\n\t// owners and admins can always edit\n\tif ($user->getGUID() == $owner->getGUID() || $user->isAdmin()) {\n\t\treturn true;\n\t}\n\n\n\t// check for friends special case\n\tif ($set->write_access_id == ACCESS_FRIENDS) {\n\t\treturn $owner->isFriendsWith($user->getGUID());\n\t}\n\n\t// write access is set using acl nomenclature\n\t$access = get_pinboard_write_accesses($user);\n\n\t// now we just look at remaining acls\n\tif (in_array($set->write_access_id, $access)) {\n\t\treturn true;\n\t}\n\n\treturn $return;\n}",
"protected function buildSetterPermission() {\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"public function authorize()\n {\n return $this->user()->can('update', \\App\\Models\\Member::withTrashed()->find($this->id));\n }",
"public function checkApprovalRights(){\n $check = YumUser::approvalRights($this->id);\n return $check['has_right'];\n }",
"public function authorizePatch()\n {\n return $this->user()->can('acme.update');\n }",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"public function authorize()\n {\n return auth()->user()->can('edit', $this->subscription);\n }",
"public function authorize()\n {\n return auth()->user()->can('updatePermissions', [Role::class, request('role')]);\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}",
"private function canModify()\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 }",
"protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')\n ->isAllowed('admin/system/convert/professio_budgetmailer');\n }",
"public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function getPossiblePermissions();",
"public function restore_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function authorize()\n {\n return $this->user()->can('update_users');\n }",
"public function getAdminPermissions(): array;",
"public function updatePermission() {\n try {\n if (!($this->permission instanceof Base_Model_ObtorLib_App_Core_Doc_Entity_Permission)) {\n throw new Base_Model_ObtorLib_App_Core_Doc_Exception(\" Permission Entity not intialized\");\n } else {\n $objPermission = new Base_Model_ObtorLib_App_Core_Doc_Dao_Permission();\n $objPermission->permission = $this->permission;\n return $objPermission->updatePermission();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Doc_Exception($ex);\n }\n }",
"public function hasAccess($permission);",
"public function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"protected function _checkPermission($permission = \\SetaPDF_Core_SecHandler::PERM_FILL_FORM) {}",
"function perm_check($content)\n{\n\t$Feul = new Feul;\n\tif($Feul->checkPerm() == true)\n\t{\n\t\treturn $content;\n\t}\n\telse\n\t{\n\t\treturn $Feul->getData('protectedmessage');\n\t}\n}",
"public function authorize()\n {\n return Gate::allows('update', $this->route('topic'));\n }",
"public function can($permission, $requireAll = false);",
"public function permission(): string;",
"public function canDo($permission, $force = false);",
"public function permissions()\n\t{\n\t\treturn $this->get('permissions');\n\t}",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"public function canEdit() {\n\t\treturn $this->_perms->checkModuleItem ( $this->_tbl_module, 'edit' );\n\t}",
"public function rules()\n {\n return (new Role)\n ->attachPermissionRules();\n }",
"protected function checkPermissions () {\n foreach ($this->aSequences as $sType => $aActions) {\n foreach ($aActions as $sAction => $aAction) {\n if (!empty($sAction)) {\n foreach ($aAction as $sIdent => $aFile) {\n if (!$this->isWriteable($aFile)) {\n throw MLException::factory(\n 'update', \n 'File `{#path}` is not writable.', \n 1407759765\n )->setData(array('path' => MLHelper::getFilesystemInstance()->getFullPath($aFile['dst'])));\n }\n }\n }\n }\n }\n return $this;\n }",
"static function getPermissions() {\n if(self::$permissions === false) {\n self::$permissions = new NamedList(array(\n\n ));\n\n EventsManager::trigger('on_system_permissions', array(&self::$permissions));\n } // if\n\n return self::$permissions;\n }",
"protected function getMigrator_Tool_PermissionService()\n {\n return $this->services['migrator.tool.permission'] = new \\phpbb\\db\\migration\\tool\\permission(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php');\n }",
"public function authorize()\n {\n return $this->user()->can('update', $this->user());\n }",
"protected function isPermissionCorrect() {}",
"public function setPermissions() {\r\n\t\tif ($this->canSave) {\r\n\t\t\t$this->canSave = $this->resource->checkPolicy('save');\r\n\t\t}\r\n\t\t$this->canEdit = $this->modx->hasPermission('edit_document');\r\n\t\t$this->canCreate = $this->modx->hasPermission('new_document');\r\n\t\t$this->canPublish = $this->modx->hasPermission('publish_document');\r\n\t\t$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));\r\n\t\t$this->canDuplicate = $this->resource->checkPolicy('save');\r\n\t}",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function checkPermission(DataObject $fromModel, DataObject $toModel) {\n\t\treturn self::check_permission($fromModel, $toModel, $this->Code, false);\n\t}",
"public function can($permissions);",
"public static function getViewBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\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 getPermissionConfig()\n {\n return [\n 'canCreate' => $this->canCreate,\n 'canUpdate' => $this->canUpdate,\n 'canDelete' => $this->canDelete,\n 'canExport' => $this->canExport,\n 'canImport' => $this->canImport,\n 'canBulkEdit' => $this->canBulkEdit,\n 'canBulkCopy' => $this->canBulkCopy,\n 'canBulkDelete' => $this->canBulkDelete,\n 'canEditInNewWindow' => $this->canEditInNewWindow,\n ];\n }",
"public function authorize()\n {\n $authorized = auth()->check();\n if ($authorized) {\n $this->rules = $this->getRulesForAction(CrudAction::update());\n }\n return $authorized;\n }",
"public function getPermissions()\n {\n return $this->get(self::PERMISSIONS);\n }",
"public function getPermissionsetId()\n {\n return $this->permissionsetId;\n }",
"public function findPermission($permissionName);",
"private function getPermissions()\n\t{\n\t\tif (!isset($this->permissions)) {\n\t\t\t$this->permissions = $this->permissions()->get();\n\t\t}\n\t\treturn $this->permissions;\n\t}",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}",
"public function authorize() {\n\t\t$this->competitor = $this->route('competitor');\n\t\treturn $this->user()->can('update', $this->competitor);\n\t}",
"abstract public function check($userId, $permission, array $data = []);",
"public static function getPermissionModel()\n {\n return static::getModel('Permissions');\n }",
"protected function getAcl_PermissionsService()\n {\n return $this->services['acl.permissions'] = new \\phpbb\\permissions(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n }",
"public function hasPermission($id);",
"public function hasPermission($id);"
] | [
"0.6416856",
"0.6386573",
"0.63151634",
"0.6233498",
"0.6038729",
"0.58068275",
"0.57921255",
"0.57638216",
"0.5547894",
"0.5500841",
"0.5479608",
"0.5475386",
"0.54669327",
"0.5465107",
"0.5405045",
"0.5393103",
"0.53840935",
"0.5377553",
"0.53530544",
"0.5327288",
"0.5321574",
"0.5321574",
"0.5298263",
"0.52948993",
"0.52897125",
"0.52793723",
"0.5268869",
"0.5268869",
"0.52644366",
"0.5248684",
"0.5234747",
"0.5229363",
"0.5229102",
"0.5227229",
"0.5222866",
"0.5198026",
"0.51558745",
"0.5152391",
"0.5152391",
"0.5152391",
"0.5152391",
"0.5152391",
"0.5150796",
"0.51505",
"0.51491207",
"0.5147888",
"0.51394814",
"0.51378816",
"0.5135151",
"0.5133327",
"0.51271385",
"0.51099074",
"0.51038367",
"0.508292",
"0.5075215",
"0.50606257",
"0.5055169",
"0.50468045",
"0.50437635",
"0.5029389",
"0.5018888",
"0.5018104",
"0.5014792",
"0.501343",
"0.5011307",
"0.49933192",
"0.49863204",
"0.49773762",
"0.49678686",
"0.4962585",
"0.49546996",
"0.49532872",
"0.49471065",
"0.49439383",
"0.49425852",
"0.4930512",
"0.49210528",
"0.4919821",
"0.4919759",
"0.49193668",
"0.4918487",
"0.49180537",
"0.49170387",
"0.49145615",
"0.49059525",
"0.48742425",
"0.48736793",
"0.4858765",
"0.48575512",
"0.48402548",
"0.48391348",
"0.48316818",
"0.48278835",
"0.4824286",
"0.48224947",
"0.48219863",
"0.4820191",
"0.4809481",
"0.48064658",
"0.48064658"
] | 0.74266493 | 0 |
Get permission checker for modifying settings. | public static function getModifySettingsPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifySettings()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getSettingsPermissions() {\n $settings_permissions_read_only = TRUE;\n // http://en.wikipedia.org/wiki/File_system_permissions.\n $writes = array('2', '3', '6', '7');\n $settings_file = './' . DrupalKernel::findSitePath(\\Drupal::request(), TRUE) . '/settings.php';\n $permissions = Unicode::substr(sprintf('%o', fileperms($settings_file)), -4);\n\n foreach ($writes as $bit) {\n if (strpos($permissions, $bit)) {\n $settings_permissions_read_only = FALSE;\n break;\n }\n }\n\n return $settings_permissions_read_only;\n }",
"public function checkPermissions();",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"public static function uses_permissions(): bool;",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"public function & GetPermissions ();",
"public function getWorkspacePermission() {}",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"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}",
"public function permission()\n {\n if ( ! auth()->guard('admin')->user()->can('access permission ' . $this->table)) {\n return redirect()->route('admin.setting.index')->with('alert-danger', __($this->noPermission));\n }\n $view = [\n 'back' => route('admin.setting.index'),\n 'title' => __('Permission Settings'),\n 'breadcrumbs' => [\n route('admin.setting.index') => __('Setting'),\n route('admin.setting.permission.index') => __('Permission'),\n null => __('Edit')\n ],\n 'subtitle' => __('All About Permission Settings'),\n 'description' => __('You can adjust all permission settings here'),\n 'navs' => $this->settings,\n 'setting' => $this->settings->where('slug', 'permission')->first(),\n 'roles' => Role::orderBy('name', 'asc')->pluck('name', 'id')->toArray()\n ];\n return view('admin.setting.permission.index', $view);\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"protected function getCurrentPermission() {}",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public function permission(): string;",
"public function getPermission($permission);",
"public function getPermissionConfig()\n {\n return [\n 'canCreate' => $this->canCreate,\n 'canUpdate' => $this->canUpdate,\n 'canDelete' => $this->canDelete,\n 'canExport' => $this->canExport,\n 'canImport' => $this->canImport,\n 'canBulkEdit' => $this->canBulkEdit,\n 'canBulkCopy' => $this->canBulkCopy,\n 'canBulkDelete' => $this->canBulkDelete,\n 'canEditInNewWindow' => $this->canEditInNewWindow,\n ];\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"abstract public function getPermissions();",
"public function getPermissions();",
"public function validator()\n {\n\n return PermissionValidator::class;\n }",
"public function getEvaluatePermissions() {}",
"public function permission($permission);",
"static function getPermissions() {\n if(self::$permissions === false) {\n self::$permissions = new NamedList(array(\n\n ));\n\n EventsManager::trigger('on_system_permissions', array(&self::$permissions));\n } // if\n\n return self::$permissions;\n }",
"protected function checkPermissions()\n\t{\n\t\t$result = true;\n\n\t\t$CrmPerms = new CCrmPerms($GLOBALS['USER']->GetID());\n\t\tif (!$CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'WRITE'))\n\t\t{\n\t\t\t$this->errors['FATAL'][] = Loc::getMessage('CRM_CLE2_PERMISSION_DENIED');\n\t\t\t$result = false;\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function setPermissions() {\r\n\t\tif ($this->canSave) {\r\n\t\t\t$this->canSave = $this->resource->checkPolicy('save');\r\n\t\t}\r\n\t\t$this->canEdit = $this->modx->hasPermission('edit_document');\r\n\t\t$this->canCreate = $this->modx->hasPermission('new_document');\r\n\t\t$this->canPublish = $this->modx->hasPermission('publish_document');\r\n\t\t$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));\r\n\t\t$this->canDuplicate = $this->resource->checkPolicy('save');\r\n\t}",
"public function permissions()\n\t{\n\t\treturn $this->get('permissions');\n\t}",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"protected function check_permission()\n {\n return true;\n }",
"public function validPermissions()\n {\n if (!ConfigHelper::cacheEnabled()) {\n return $this->getCurrentUserPermissions();\n }\n\n $cacheKey = 'laravelroles_permissions_' . Users::userModelCacheKey() . '_' . $this->getKey();\n\n return Cache::remember($cacheKey, ConfigHelper::cacheExpiryTime(), function () {\n return $this->getCurrentUserPermissions();\n });\n }",
"public function checkPolicy($permission) {\n $access = true;\n\n /* first check moderator access */\n if ($this->get('moderated')) {\n $moderatorGroups = $this->trimArray($this->get('moderator_group'));\n $moderators = $this->trimArray($this->get('moderators'));\n $inModeratorGroup = !empty($moderatorGroups) && !empty($this->xpdo->user) ? $this->xpdo->user->isMember($moderatorGroups) : false;\n $access = $inModeratorGroup || in_array($this->xpdo->user->get('username'),$moderators);\n } else {\n $access = $this->xpdo->user->isMember('Administrator');\n }\n\n /* now check global access */\n switch ($permission) {\n case 'view':\n $access = $this->xpdo->hasPermission('quip.thread_view');\n break;\n case 'truncate':\n $access = $this->xpdo->hasPermission('quip.thread_truncate');\n break;\n case 'remove':\n $access = $this->xpdo->hasPermission('quip.thread_remove');\n break;\n case 'comment_approve':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n case 'comment_remove':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n case 'comment_update':\n $access = $this->xpdo->hasPermission('quip.comment_approve');\n break;\n }\n\n return $access;\n }",
"public function can($permission);",
"protected function isPermissionCorrect() {}",
"public function settings(){\n if($this->isLogedin() && $this->hasAdminPanel())\n return $this->moduleSettings();\n return browser\\msg::pageAccessDenied();\n }",
"function permissions_get ()\n{\n\tstatic $perms = array (\n\t\t\t\"read\"\t\t=> 0x0001,\n\t\t\t\"create\"\t=> 0x0002,\n\t\t\t\"change\"\t=> 0x0004,\n\t\t\t\"delete\"\t=> 0x0008,\n\t\t\t\"password\"\t=> 0x0040,\n\t\t\t\"admin\"\t\t=> 0x8000,\t// admin\n\t\t\t);\n\treturn $perms;\n}",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function get_item_permissions_check( $request ) {\n\t\treturn current_user_can( 'manage_options' );\n\t}",
"public function getPossiblePermissions();",
"final public function permission():int\n {\n return $this->permission;\n }",
"function set_permissions($permessi_abilitati)\n {\n $permissions_data=$this->config->item(\"permissions\");\n $permissions_data=array_reverse($permissions_data['mask'],true);\n\n foreach($permissions_data as $value)\n {\n if(in_array($value,array_keys($permessi_abilitati)))\n $this->_permissions[$value]=$permessi_abilitati[$value];\n else\n $this->_permissions[$value]=false;\n }\n\n $bitmask=$this->to_bitmask($this->_permissions);\n return($bitmask);\n }",
"public static function getSettings()\n {\n return [\n 'login' => 'editor',\n 'legalTemplates' => ['skyscraper'],\n 'access' => [\n 'templates' => [\n [\n 'name' => 'skyscraper',\n 'roles' => ['editor'],\n 'editRoles' => ['editor'], // <-- has edit permission\n ]\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}",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}",
"private function getPermissions()\n\t{\n\t\tif (!isset($this->permissions)) {\n\t\t\t$this->permissions = $this->permissions()->get();\n\t\t}\n\t\treturn $this->permissions;\n\t}",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"function permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'au_set')) {\n\t\treturn $return;\n\t}\n\n\tif (!elgg_is_logged_in()) {\n\t\treturn $return;\n\t}\n\n\t// this is our object, lets determine if we can edit it\n\t$set = $params['entity'];\n\t$user = $params['user'];\n\t$owner = $params['entity']->getOwnerEntity();\n\n\t// owners and admins can always edit\n\tif ($user->getGUID() == $owner->getGUID() || $user->isAdmin()) {\n\t\treturn true;\n\t}\n\n\n\t// check for friends special case\n\tif ($set->write_access_id == ACCESS_FRIENDS) {\n\t\treturn $owner->isFriendsWith($user->getGUID());\n\t}\n\n\t// write access is set using acl nomenclature\n\t$access = get_pinboard_write_accesses($user);\n\n\t// now we just look at remaining acls\n\tif (in_array($set->write_access_id, $access)) {\n\t\treturn true;\n\t}\n\n\treturn $return;\n}",
"public function checkFolderPermissionsFilesystemPermissionsDataProvider() {}",
"public function core_settings(){\r\n\t\tif($this->has_admin_panel()) return $this->module_core_settings();\r\n return $this->module_no_permission();\r\n\t}",
"protected function getMigrator_Tool_PermissionService()\n {\n return $this->services['migrator.tool.permission'] = new \\phpbb\\db\\migration\\tool\\permission(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php');\n }",
"static function getPermission($name) {\n return static::getPermissions()->get($name);\n }",
"public static function getModifyRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getAdminPermissions(): array;",
"public function check_permflag($flag) {\n // TO DO!!!!!!\n }",
"public static function getPermissionModel()\n {\n return static::getModel('Permissions');\n }",
"public function getCustom()\n {\n return config('cms-acl-module.permissions', []);\n }",
"public function checkPermission()\n {\n if ($this->User->isAdmin)\n {\n return;\n }\n\n // Set root IDs\n if (!is_array($this->User->calendars) || empty($this->User->calendars))\n {\n $root = [0];\n }\n else\n {\n $root = $this->User->calendars;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to create promoters in calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" to calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n $objPromoter = $this->Database->prepare(\"SELECT pid FROM tl_calendar_promoters WHERE id=?\")->limit(1)->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid event ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objPromoter->pid, $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" of calendar ID \"' . $objCalendar->pid . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $objPromoter = $this->Database->prepare(\"SELECT id FROM tl_calendar_promoters WHERE pid=?\")->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $session = $this->Session->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objPromoter->fetchEach('id'));\n $this->Session->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n $this->log('Invalid command \"' . Input::get('act') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"public function permissions() {\n\t$this->loadPermissions();\n\treturn $this->permissions;\n}",
"public function getAllowCheck()\n {\n return $this->allow_check;\n }",
"protected function buildSetterPermission() {\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 check()\n {\n foreach(config('installer.permissions') as $folder => $permission)\n {\n if(!($this->getPermission($folder) >= $permission))\n {\n chmod($folder, 0775);\n }\n }\n\n return true;\n }",
"public static function get_allowed_settings()\n {\n }",
"public static function getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('MagicToolbox_MagicZoomPlus::magiczoomplus_settings_edit');\n }",
"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 }",
"function getSystemPermission($name) {\n \t$role = $this->getRole();\n if(instance_of($role, 'Role')) {\n return (boolean) $role->getPermissionValue($name);\n } else {\n return false;\n } // if\n }",
"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}",
"public function validate($settings)\n {\n return $settings;\n }",
"public function permissions()\n {\n return $this->permissions;\n }",
"public function getPermissions()\n {\n return $this->get(self::PERMISSIONS);\n }",
"function EditOwnSettings()\n\t{\n\t\tif ($this->Admin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $this->editownsettings;\n\t}",
"abstract public function permission(): string;",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"protected function getAcl_PermissionsService()\n {\n return $this->services['acl.permissions'] = new \\phpbb\\permissions(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n }",
"public static function getSettings() {\n\n\t\tglobal $lumi_aiowps_tweaks;\n\t\tif( isset( $lumi_aiowps_tweaks['Settings'] ) ) {\n\t\t\treturn $lumi_aiowps_tweaks['Settings'];\n\t\t} else {\n\t\t\tinclude_once( __DIR__ . '/SettingsAPI.class.php' );\n\t\t\t$lumi_aiowps_tweaks['Settings'] = new SettingsAPI();\n\t\t\treturn $lumi_aiowps_tweaks['Settings'];\n\t\t}\n\n\t}",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"protected function fixPermission() {}",
"public function getPermissions() {\n if (!$this->cache_permissions) {\n $this->cache_permissions = array();\n //berk... legacy permission code... legacy db functions... berk!\n $sql=\"SELECT ugroup_id, permission_type \n FROM permissions \n WHERE permission_type LIKE 'PLUGIN_TRACKER_FIELD%'\n AND object_id='\". db_ei($this->getId()) .\"' \n ORDER BY ugroup_id\";\n \n $res=db_query($sql);\n if (db_numrows($res) > 0) {\n while ($row = db_fetch_array($res)) {\n $this->cache_permissions[$row['ugroup_id']][] = $row['permission_type'];\n }\n }\n }\n return $this->cache_permissions;\n }",
"public function authorize()\n {\n return access()->can('edit-project');\n }",
"public static function getModifySegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function hasAccess($permission);",
"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}",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"function admin()\n{\n return current_user_can('manage_options');\n}",
"protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }"
] | [
"0.6640244",
"0.65241057",
"0.62436396",
"0.6203463",
"0.61914337",
"0.61419463",
"0.6092144",
"0.609213",
"0.6044892",
"0.6027715",
"0.6024488",
"0.6024488",
"0.6024488",
"0.6024488",
"0.6024488",
"0.6003032",
"0.5994742",
"0.5972926",
"0.5972926",
"0.59399426",
"0.59333557",
"0.59062827",
"0.5878985",
"0.58715904",
"0.58643883",
"0.5864118",
"0.58630866",
"0.58630866",
"0.5852816",
"0.5852164",
"0.5845472",
"0.58179307",
"0.58139986",
"0.5811844",
"0.5809222",
"0.5798003",
"0.5794502",
"0.5772193",
"0.57523257",
"0.57396764",
"0.573128",
"0.57291245",
"0.57192314",
"0.5719199",
"0.5712715",
"0.57127005",
"0.570908",
"0.5703604",
"0.56927615",
"0.56354016",
"0.56201875",
"0.56036794",
"0.5601072",
"0.55982244",
"0.5589669",
"0.5585264",
"0.5580652",
"0.5573126",
"0.55594474",
"0.55227196",
"0.5516929",
"0.5516716",
"0.5511931",
"0.5508997",
"0.55078024",
"0.55040365",
"0.550352",
"0.548693",
"0.5485948",
"0.5479275",
"0.5468329",
"0.5457531",
"0.5449339",
"0.5439099",
"0.5438055",
"0.54258823",
"0.5419025",
"0.54152906",
"0.54152775",
"0.5401555",
"0.54013056",
"0.53891397",
"0.53850156",
"0.53831035",
"0.537822",
"0.53607047",
"0.53578115",
"0.53563166",
"0.5352578",
"0.535112",
"0.53495216",
"0.5339711",
"0.53389287",
"0.53314483",
"0.53298485",
"0.5329578",
"0.5328358",
"0.5326701",
"0.532647",
"0.53263783"
] | 0.73782706 | 0 |
Resource id requested when the error raised | public function __construct($message, $jsonBody = null, $resource = null, $resourceId = null)
{
$this->jsonBody = $jsonBody;
$this->resource = $resource;
$this->resourceId = $resourceId;
parent::__construct($message);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getParameterId(){\n\t\tthrow new Exception('Unknown Error!', REST_ER_PAGE_NOTFOUND);\n\t}",
"public function getResourceID()\n {\n return $this->get('ResourceID');\n }",
"public function getResourceID()\n {\n return $this->get('ResourceID');\n }",
"public function getResourceID()\n {\n return $this->get('ResourceID');\n }",
"public function getResourceID()\n {\n return $this->get('ResourceID');\n }",
"function mensaje_error_no_existe($id){\n $mensaje=array(\n 'error' => TRUE,//siempre en MAYUSCULAS\n 'domain' =>$_SERVER['HTTP_HOST'],\n 'port' => $_SERVER['SERVER_PORT'],\n 'quantity' => 0,//cantidad\n 'records' => NULL, //registros\n 'reason:' => 'notFound',\n 'message:' => 'The resource: '.$id.' not be found.',\n 'locationType:'=> 'resourceNotFound',);\n return $mensaje;\n}",
"public function resourceId(): int\n {\n return $this->model->id;\n }",
"public function getResourceId()\n {\n $this->resourceId;\n }",
"public function getErrorByID()\n {\n $id = $this->security->xss_clean($this->input->post('id', true));\n\t\t$data = $this->errors_model->find($id);\n\t\t$token = $this->input->post('token', true);\n echo $this->repairer->send_json($data);\n }",
"public function getResourceId()\n {\n return $this->resourceId;\n }",
"public function getResourceId()\n {\n return $this->resourceId;\n }",
"private function requestError($id = null)\n {\n return $this->error($id, -32600, 'Invalid Request');\n }",
"public function getResourceId();",
"public function getResourceId();",
"public function getRequestedId() {}",
"public function shouldReturnNotFoundWhenIdDoesNotExist()\n {\n $this->json($this->method, str_replace(':id', 123456789, $this->endpoint), [])\n ->assertNotFound();\n }",
"public function findOrThrowException($id);",
"public function findOrThrowException($id);",
"public function id()\n {\n return $this->resource->getKey();\n }",
"private function selectResourceID()\n {\n $result = $this->sdb->query('select nextval(\\'resource_id_seq\\') as id',array());\n $row = $this->sdb->fetchrow($result);\n return $row['id'];\n }",
"public function getResourceId()\n {\n if (array_key_exists(\"resourceId\", $this->_propDict)) {\n return $this->_propDict[\"resourceId\"];\n } else {\n return null;\n }\n }",
"public function errorOccured();",
"final public function getResourceId() {\n return $this->resourceId;\n }",
"abstract protected function getNotFoundMessage();",
"public function get_error_code()\n {\n }",
"private function genErrID()\n {\n return uniqid();\n }",
"public static function error($id) \n {\n $language = $_SESSION['language'];\n $layout = 'layouts/polyglot/errors.php';\n $errors = require 'configs/errors.php';\n\n if (array_key_exists($id, $errors))\n {\n if (array_key_exists($language, $errors[$id]))\n {\n $title = $errors[$id][$language]['title'];\n $cause = $errors[$id][$language]['cause'];\n $advice = $errors[$id][$language]['advice'];\n } \n else\n {\n $title = $errors[$id]['en']['title'];\n $cause = $errors[$id]['en']['cause'];\n $advice = $errors[$id]['en']['advice'];\n }\n }\n else\n {\n $title = $errors['404']['en']['title'];\n $cause = $errors['404']['en']['cause'];\n $advice = $errors['404']['en']['advice'];\n }\n\n if (is_numeric($id))\n {\n http_response_code($id);\n } \n\n require $layout;\n exit; \n }",
"public function getResourceId(): ?string;",
"protected function requireId() {\n\t\tif (empty($this->document->_id)) {\n\t\t\tthrow new DocumentException(\"Please provide an _id.\");\n\t\t}\n\t}",
"function goodrds_image_exceptions($id) {\n\t\t\n\t\t$key = false;\n\t\t$id = str_replace(array('#','id_'), '', $id);\n\t\tforeach ($this->goodrds_options['exceptions']['ids'] as $k => $exID) {\n\t\t\t$exID = str_replace(array('#','id_'), '', $exID);\n\t\t\tif ($exID == $id)\n\t\t\t\t$key = $k;\n\t\t}\n\t\tif ($key)\n\t\t\treturn $this->goodrds_options['exceptions']['urls'][$key];\n\t\t\t\n\t\treturn $key; //false\n\t}",
"public function get_error();",
"public function get_error();",
"protected function errorAction() {}",
"public function getIdentificationKey() {\n\t\tif ($this->hasIdentification() === false) {\n\t\t\tthrow new Exception('resource has no identification yet');\n\t\t}\n\t\t\n\t\treturn $this->type.'|'.$this->primaryId();\n\t}",
"public function error404() {\n\t\t$this->render('error400');\n\t}",
"private function __validate_id() {\n if (isset($this->initial_data[\"id\"])) {\n # Check the Unbound ACLs array for ID\n if (array_key_exists($this->initial_data[\"id\"], $this->config[\"unbound\"][\"acls\"])) {\n $this->id = $this->initial_data[\"id\"];\n } else {\n $this->errors[] = APIResponse\\get(2074);\n }\n } else {\n $this->errors[] = APIResponse\\get(2072);\n }\n }",
"public function getResourceId()\n {\n return __CLASS__;\n }",
"public function getResourceId()\n {\n return __CLASS__;\n }",
"public function testShowEventInvalidId()\n {\n $this->get(route('events.show', 1000))\n ->assertStatus(404);\n }",
"public function getConflictedResource();",
"public function uriError()\n {\n header(\"HTTP/1.0 404\");\n exit();\n }",
"public function formatNotFoundError()\n {\n return 'Given resource could not be found.';\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 errorCode() {}",
"private function get_resource_id( $item ) {\n\t\t\tswitch ( $item->type ) {\n\t\t\t\tcase 'file':\n\t\t\t\t\t$item->key = \"file:{$item->post_id}\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ecv':\n\t\t\t\t\t$item->key = \"ecv:{$item->ecv_id}\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'uri':\n\t\t\t\t\t$item->key = $item->uri;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tforeach ( $this->resource_map as $resource ) {\n\t\t\t\tif ( $resource->key == $item->key )\n\t\t\t\t\treturn $resource->id;\n\t\t\t}\n\n\t\t\t$item->id = \\GTO\\Framework\\Util\\UUID::v4();\n\t\t\t$this->resource_map[ ] = $item;\n\t\t\treturn $item->id;\n\t\t}",
"public function id()\n {\n throw new BadMethodCallException;\n }",
"public function resource()\n {\n return tap($this->resource, function ($resource) {\n abort_if(is_null($resource), 404);\n });\n }",
"private function resourceNotFound()\n {\n // if the returned instance wasn't found\n return response()->json([\n 'success' => false,\n 'message' => 'Resource could not be found.',\n ], 404);\n }",
"function getError()\r\n\t{\r\n\t\treturn $this->error_code;\r\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}",
"protected function getLastError() {}",
"private function getRdfResourceId() {\r\n return 'RDF#'.$this->rdfResourceId;\r\n }",
"public function getError();",
"public function getError();",
"public function getError();",
"private function checkActionIdParam()\n {\n $id = $this->getRequest()->getParam('id');\n\n IF($id === NULL || is_numeric($id) === FALSE || $this->dbAction->find($id)->count() === 0) {\n throw new Admin_Model_Acl_Exception('Invalid or no Id Parameter given');\n }\n\n RETURN (int) $id;\n }",
"private function checkControllerIdParam()\n {\n $id = $this->getRequest()->getParam('id');\n\n IF($id === NULL || is_numeric($id) === FALSE || $this->dbCtrl->find($id)->count() === 0) {\n throw new Admin_Model_Acl_Exception('Invalid or no Id Parameter given');\n }\n\n RETURN (int) $id;\n }",
"public function getError() {}",
"public function determineId() {}",
"function errorCode()\n {\n }",
"function get_compute_resource($id)\n{\n global $airavataclient;\n $computeResource = null;\n\n try\n {\n $computeResource = $airavataclient->getComputeResource($id);\n }\n catch (InvalidRequestException $ire)\n {\n print_error_message('<p>There was a problem getting the compute resource.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>InvalidRequestException: ' . $ire->getMessage() . '</p>');\n }\n catch (AiravataClientException $ace)\n {\n print_error_message('<p>There was a problem getting the compute resource.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>Airavata Client Exception: ' . $ace->getMessage() . '</p>');\n }\n catch (AiravataSystemException $ase)\n {\n print_error_message('<p>There was a problem getting the compute resource.\n Please try again later or submit a bug report using the link in the Help menu.</p>' .\n '<p>Airavata System Exception: ' . $ase->getMessage() . '</p>');\n }\n\n return $computeResource;\n}",
"private function __validate_id() {\n if (isset($this->initial_data[\"id\"])) {\n $id = intval($this->initial_data[\"id\"]);\n\n # Ensure a bandwidth object with this ID exists\n if (array_key_exists($id, $this->config[\"dnshaper\"][\"queue\"][$this->parent_id][\"bandwidth\"][\"item\"])) {\n $this->id = $id;\n $this->validated_data = $this->config[\"dnshaper\"][\"queue\"][$this->parent_id][\"bandwidth\"][\"item\"][$id];\n } else {\n $this->errors[] = APIResponse\\get(4216);\n }\n } else {\n $this->errors[] = APIResponse\\get(4215);\n }\n }",
"public function errorcode();",
"abstract public function get_id();",
"public function error400()\n {\n }",
"function wrapper_errno($link_id = null) {\n\t\tif ($this->wrapper_error($link_id)) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t}",
"abstract protected function _getErrorNumber();",
"public function id(): ?int\n {\n // Get the value from the variable\n $resourceId = request()->route(\n // Set the variable\n $this->resourceVariable()\n );\n\n return is_numeric($resourceId)\n ? (int) $resourceId\n : null;\n }",
"public static function throwResourceNotFoundException()\n {\n return Response::json([\n 'message' => \"Your request dosen't contain any resources\"\n ], 404);\n }",
"public function errorCode();",
"public function errorCode();",
"public function testViewBadId()\n\t{\n\t\t// the exception it's looking for, even if some tests don't generate\n\t\t// the required exception.\n\n\t\t$badIds = array('', '1');\n\n\t\tforeach ($badIds as $badId)\n\t\t{\n\t\t\t$this->expectException('NotFoundException');\n\t\t\t$this->testAction(\"/employees/view/$badId\",\n\t\t\t\tarray('method' => 'GET'));\n\t\t}\n\t}",
"public function get_id() {\n if (!$this->processstarted) {\n throw new coding_exception('The course has not been processed yet!');\n }\n return $this->id;\n }",
"public function getFailedActivityId(): ?string;",
"public function error429()\n {\n }",
"public function getMissingId()\n {\n return $this->missing_id;\n }",
"public function id()\n {\n if (!is_null($this->id) && $this->id) {\n return $this->id;\n } else {\n throw new \\Exception('No object ID was supplied for this query');\n }\n }",
"public function actionError() {\n \n }",
"public function error();",
"function getError();",
"function getError();",
"public function testInvalidNamesForResourceAttributesId()\n {\n $this->document->addToData($resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'id' => 'whatever'], // <-- 'id' is a reserved word and cannot be used\n new Link('selfUrl'),\n [LinkInterface::SELF => new Link('selfUrl')], // links for resource\n ['some' => 'meta']\n ), new stdClass(), true));\n }",
"public function error404()\n {\n }",
"public function getErr() {}",
"public function cannotPerformReferencingErrorAction()\n {\n $this->renderTwigView('/iris-referencing/cannot-perform-referencing-error.html.twig');\n }",
"public function testEventStatusInvalidId()\n {\n $event = factory(Events::class)->create(['id' => 1]);\n $user = factory(User::class)->create();\n $params = ['status' => 0, 'id' => 1000];\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('events.status', $params))\n ->assertStatus(404);\n }",
"public function get_id()\n {\n }",
"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 makeErrorAction()\n {\n // test this\n\n $this->app->abort(404, 'I am a code generated 404 error message');\n\n }",
"public function Error404() {\n\t\t$this -> Render();\n\t}",
"public function getResourceIdName()\n {\n return $this->resourceIdName;\n }",
"public function actionError() {\n\t if($error=app()->errorHandler->error) {\t\t\n\t \tif(app()->request->isAjaxRequest)\n\t \t\techo $error['message'];\n\t \telse {\n\t\t\t\t$row = Pagecontent::model()->getPageContent('pagenotfound'); // get the page content for the page\n\t\t\t\tif ($row) { // row is found (page has contents) so we are rending the default view\n\t\t\t\t\t$row['html_title'] .= (!empty($row['html_title']) ? ' ' : '') . ' (' . $error['code'] . ')';\n\t\t\t\t\t$this->setPageAttributes($row);\t\t\n\t\t\t\t\t$this->render('default',array ('row'=>$row));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$this->render('error', $error); // execute the error view file \t \t\n\t\t\t}\n\t }\n\t}",
"public static function getResourceId($resource)\n {\n if (isset($resource->identifiers) || is_array($resource->identifiers)) {\n foreach ($resource->identifiers as $identifier) {\n if (substr($identifier, 0, 15) == 'action_network:') {\n return substr($identifier, 15);\n }\n }\n }\n }",
"abstract public function getLastError();",
"abstract public function getLastError();",
"public function Error404()\n\t{\n\t\t$this->Render();\n\t}",
"public function getErrNo() {\n return $this->get(self::ERR_NO);\n }",
"private function checkControllerIdParam()\n {\n $id = $this->getRequest()->getParam('control');\n\n IF($id === NULL || is_numeric($id) === FALSE || $this->dbController->find($id)->count() === 0) {\n throw new Admin_Model_Acl_Exception('Invalid or no Id Parameter given');\n }\n\n RETURN (int) $id;\n }",
"function error(){}",
"public function getId($resource): ?string\n {\n return $resource->id;\n }",
"public function error404(){\n\t\t$this->loadErrorView('Cette page n\\'existe pas', 'Error 404', 404); \n\t}"
] | [
"0.6430196",
"0.63689154",
"0.63689154",
"0.6368119",
"0.6368119",
"0.6334225",
"0.6305789",
"0.6276282",
"0.625186",
"0.61579794",
"0.61579794",
"0.6149905",
"0.6118105",
"0.6118105",
"0.60462105",
"0.60319",
"0.60216",
"0.60216",
"0.6013611",
"0.6007329",
"0.5997308",
"0.59722865",
"0.5947882",
"0.594244",
"0.5938596",
"0.5906028",
"0.58947796",
"0.58588",
"0.58441573",
"0.58170676",
"0.5762044",
"0.5762044",
"0.5744895",
"0.5735675",
"0.57295626",
"0.56975436",
"0.5697037",
"0.5697037",
"0.5692643",
"0.56880873",
"0.5680597",
"0.5657316",
"0.56345403",
"0.5616479",
"0.55944806",
"0.5591596",
"0.5586691",
"0.5584859",
"0.5584619",
"0.5582324",
"0.5578023",
"0.5576523",
"0.5536632",
"0.5536632",
"0.5536632",
"0.552955",
"0.5527361",
"0.55138654",
"0.5512261",
"0.5508701",
"0.550621",
"0.55057526",
"0.5492833",
"0.5481693",
"0.5469388",
"0.5460117",
"0.54560924",
"0.5451666",
"0.544092",
"0.54341006",
"0.54341006",
"0.54303116",
"0.54270816",
"0.54242676",
"0.541688",
"0.5405477",
"0.5401864",
"0.53967017",
"0.53926075",
"0.53756726",
"0.53756726",
"0.537556",
"0.53733057",
"0.53679734",
"0.5365778",
"0.53607583",
"0.5358994",
"0.53568727",
"0.5350863",
"0.53429276",
"0.53386813",
"0.53384054",
"0.5334085",
"0.5326332",
"0.5326332",
"0.53196555",
"0.5313414",
"0.53109485",
"0.5304153",
"0.5303892",
"0.53005236"
] | 0.0 | -1 |
Setup before running any test cases | public static function setUpBeforeClass()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function doSetup(): void\n {\n }",
"public function setup() {}",
"protected function setUp ()\n {}",
"function setUp() {\n\t\t\n\t}",
"function setUp() {\n\t\t\n\t}",
"private function setup()\r\n\t{ }",
"protected function setUp() { }",
"protected function setUp() { }",
"protected function setup(){\n }",
"function quickSetUp()\n {\n $this->setUp(null, null, null, null, null);\n }",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}"
] | [
"0.8299111",
"0.8299111",
"0.8299111",
"0.8299111",
"0.8299111",
"0.8299111",
"0.8299111",
"0.8299111",
"0.8299111",
"0.8299111",
"0.8299111",
"0.8299111",
"0.8299111",
"0.8299111",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.8298778",
"0.82985723",
"0.82985723",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.829808",
"0.82344025",
"0.81765306",
"0.8172459",
"0.81542856",
"0.81542856",
"0.8106448",
"0.80816454",
"0.80816454",
"0.8051928",
"0.8037265",
"0.8031149",
"0.8031149"
] | 0.0 | -1 |
Setup before running each test case | public function setUp()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"function setUp() {\n\t\t\n\t}",
"function setUp() {\n\t\t\n\t}",
"protected function doSetup(): void\n {\n }",
"protected function setUp ()\n {}",
"public function setUp(): void\n {\n $this->setUpWithNoResult();\n }",
"protected function setUp() { }",
"protected function setUp() { }",
"public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}"
] | [
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136364",
"0.8136321",
"0.8136321",
"0.8136321",
"0.8136321",
"0.8136321",
"0.8136321",
"0.8136321",
"0.8136321",
"0.8136321",
"0.8136321",
"0.8136321",
"0.8136321",
"0.8136321",
"0.8136321",
"0.81356287",
"0.81356287",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.8134937",
"0.80421937",
"0.80421937",
"0.80289686",
"0.8018776",
"0.793929",
"0.7926855",
"0.7926855",
"0.7909959",
"0.7904265",
"0.7904265",
"0.7904265",
"0.7904265"
] | 0.0 | -1 |
Clean up after running each test case | public function tearDown()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp();",
"public function cleanUp();",
"public function cleanUp();",
"public function cleanup() {\n\t\t//TODO\n\t}",
"public function cleanTestActivities()\n {\n\n $this->collectCurrentTestUsers();\n $this->cleanExerciseUploadPictures();\n $this->cleanDeviceUploadPictures();\n $this->resetDatabase();\n }",
"protected function tearDown(): void {\n unset($this->integration);\n unset($this->ccm);\n unset($this->session);\n }",
"public function teardown()\n {\n //\n }",
"protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }",
"public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }",
"protected function tearDown() {\n\n $this->client = null;\n $this->deleteTestLocations();\n $this->locIDs = null;\n reuse_generateXML();\n }",
"public function cleanup()\n {\n }",
"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 cleanUp()\n\t{\n\t\t// clean\n\t\t$this->killExceededTasks();\n\t\t$this->cleanHistory();\n\t}",
"public function teardown()\n {\n }",
"function __destruct() {\n if ($this->testDir) {\n $this->eraseTempDir();\n }\n $this->unsetMockSession();\n }",
"public function tearDown()\n {\n unset($this->_standardLib);\n unset($this->_daughter);\n }",
"public function tearDown(): void\n {\n parent::tearDown();\n unset($this->purifier);\n unset($this->em);\n unset($this->objectiveManager);\n unset($this->learningMaterialManager);\n unset($this->courseLearningMaterialManager);\n unset($this->sessionLearningMaterialManager);\n unset($this->sessionDescriptionManager);\n unset($this->commandTester);\n }",
"public function cleanup()\n\t{\n\t}",
"public function tearDown() {\n $this->container = null;\n $this->model = null;\n $this->request = null;\n $this->response = null;\n $this->responseHeaders = null;\n $this->responseWriter = null;\n }",
"protected function tearDown()\n {\n unset($this->output);\n }",
"public function tearDown(): void\n {\n parent::tearDown();\n unset($this->filesystem);\n unset($this->diskSpace);\n unset($this->commandTester);\n }",
"protected function tearDown() {\n $this->osapiCollection = null;\n $this->list = null;\n parent::tearDown();\n }",
"public function tearDown()\n {\n // delete your instance\n OGR_DS_Destroy($this->hSrcDataSource);\n\n delete_directory($this->strPathToOutputData);\n\n unset($this->strPathToOutputData);\n unset($this->strTmpDumpFile);\n unset($this->strPathToData);\n unset($this->strPathToStandardData);\n unset($this->bUpdate);\n unset($this->hOGRSFDriver);\n unset($this->hLayer);\n unset($this->iSpatialFilter);\n unset($this->hSrcDataSource);\n }",
"public function cleanup()\n\t{\n\t\t\n\t}",
"protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }",
"public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }",
"public function tearDown() {\n $this->resource = null;\n $this->response = null;\n $this->database = null;\n $this->storage = null;\n $this->event = null;\n $this->manager = null;\n }",
"public function tearDown()\n\t{\n\t\tunset($this->target);\n\t}",
"protected function tearDown(): void\n {\n $this->provider = null;\n $this->response = null;\n }",
"public function tearDown() : void {\n\t\tunset($this->ls); /* Kill circular references */\n\t\tunset($this->lsconn); /* Kill circular references */\n\t}",
"public function cleanup(): void\n {\n }",
"public function cleanup(): void\n {\n }",
"protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test data\n\t\tunset($modSettings);\n\t}",
"protected function tearDown() {\n gc_collect_cycles();\n }",
"public function tearDown(): void {\n // Remove any temporary directories that were created.\n $filesystem = new Filesystem();\n foreach ($this->tmpDirs as $dir) {\n $filesystem->remove($dir);\n }\n // Clear out variables from the previous pass.\n $this->tmpDirs = [];\n $this->io = NULL;\n // Clear the composer cache dir, if it was set\n putenv('COMPOSER_CACHE_DIR=');\n }",
"public function tearDown() {\n $this->transformation = null;\n }",
"public function tearDown() {\n $this->transformation = null;\n }",
"public function tearDown() {\n $this->transformation = null;\n }",
"protected function tearDown()\n {\n $this->regular1 = null;\n $this->regular2 = null;\n $this->rental1 = null;\n $this->rental2 = null;\n }",
"protected function tearDown()\n {\n $this->calculator = NULL;\n }",
"protected function tearDown(): void {\n $this->parser = null;\n }",
"public function teardown()\n {\n if ($this->csvFile) {\n unlink($this->csvFile);\n $this->csvFile = null;\n }\n\n if ($this->photoZip) {\n unlink($this->photoZip);\n $this->photoZip = null;\n }\n }",
"public function tearDown()\n {\n unset(\n $this->plugins,\n $this->events,\n $this->connection,\n $this->config\n );\n }",
"protected function tearDown()\n {\n session_destroy(); //req'd because Kml class sets a cookie\n $this->clearRequest();\n $this->clearTmpFiles();\n }",
"public function Cleanup()\r\n\t{\r\n\t}",
"protected function tearDown()\n {\n \tunset($this->object);\n }",
"protected function tearDown()\n {\n \tunset($this->object);\n }",
"protected function tearDown()\n {\n \tunset($this->object);\n }",
"protected function tearDown()\n {\n \tunset($this->object);\n }",
"public function tearDown() {\n\t\tFixtures::clear('db');\n\t\tGalleries::reset();\n\t\tImages::reset();\n\t}",
"public function tearDown() {\r\n\t\tunset($this->ImgTblHelper, $this->Controller, $this->View);\r\n\t\tparent::tearDown();\r\n\t}",
"protected function tearDown(): void\n {\n $this->autorizacao = null;\n $this->transacao = null;\n $this->object = null;\n }",
"protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\r\n\t\tparent::tearDown ();\r\n\t}",
"public function tearDown()\n {\n $this->objectManager->create(\\Magento\\Tax\\Test\\TestStep\\DeleteAllTaxRulesStep::class, [])->run();\n }",
"protected function tearDown() {\n $this->stack = null;\n }"
] | [
"0.7987785",
"0.7987785",
"0.7987785",
"0.7987785",
"0.7987785",
"0.7987785",
"0.7987785",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7986567",
"0.7985815",
"0.7985815",
"0.7985815",
"0.7985815",
"0.7985815",
"0.7985815",
"0.7850843",
"0.7850843",
"0.7850843",
"0.76951295",
"0.7688187",
"0.76663786",
"0.76383704",
"0.76116425",
"0.76023465",
"0.759858",
"0.7592881",
"0.7578189",
"0.75721014",
"0.7563723",
"0.7532292",
"0.7532245",
"0.7510675",
"0.7466052",
"0.745502",
"0.7447906",
"0.7437516",
"0.7432085",
"0.7422239",
"0.742056",
"0.74127865",
"0.7395499",
"0.7393894",
"0.73909515",
"0.7390909",
"0.7389362",
"0.7387827",
"0.7387827",
"0.7384437",
"0.7381771",
"0.73808354",
"0.73763293",
"0.73763293",
"0.73763293",
"0.73758084",
"0.7359128",
"0.7354937",
"0.7352378",
"0.73359734",
"0.7333032",
"0.7329993",
"0.7327933",
"0.7327933",
"0.7327933",
"0.7327933",
"0.73216355",
"0.7312936",
"0.7306989",
"0.7304376",
"0.7294614",
"0.72820467"
] | 0.0 | -1 |
Clean up after running all test cases | public static function tearDownAfterClass()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp();",
"public function cleanUp();",
"public function cleanUp();",
"public function cleanup() {\n\t\t//TODO\n\t}",
"public function cleanTestActivities()\n {\n\n $this->collectCurrentTestUsers();\n $this->cleanExerciseUploadPictures();\n $this->cleanDeviceUploadPictures();\n $this->resetDatabase();\n }",
"public function cleanup()\n {\n }",
"protected function cleanUp()\n\t{\n\t\t// clean\n\t\t$this->killExceededTasks();\n\t\t$this->cleanHistory();\n\t}",
"public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }",
"public function tearDown()\n {\n unset($this->_standardLib);\n unset($this->_daughter);\n }",
"public function teardown()\n {\n //\n }",
"protected function tearDown(): void {\n unset($this->integration);\n unset($this->ccm);\n unset($this->session);\n }",
"protected function tearDown() {\n\n $this->client = null;\n $this->deleteTestLocations();\n $this->locIDs = null;\n reuse_generateXML();\n }",
"public function cleanup()\n\t{\n\t}",
"protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }",
"public function tearDown(): void\n {\n parent::tearDown();\n unset($this->purifier);\n unset($this->em);\n unset($this->objectiveManager);\n unset($this->learningMaterialManager);\n unset($this->courseLearningMaterialManager);\n unset($this->sessionLearningMaterialManager);\n unset($this->sessionDescriptionManager);\n unset($this->commandTester);\n }",
"public function teardown()\n {\n }",
"public function cleanup()\n\t{\n\t\t\n\t}",
"function __destruct() {\n if ($this->testDir) {\n $this->eraseTempDir();\n }\n $this->unsetMockSession();\n }",
"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 tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }",
"public function tearDown()\n {\n // delete your instance\n OGR_DS_Destroy($this->hSrcDataSource);\n\n delete_directory($this->strPathToOutputData);\n\n unset($this->strPathToOutputData);\n unset($this->strTmpDumpFile);\n unset($this->strPathToData);\n unset($this->strPathToStandardData);\n unset($this->bUpdate);\n unset($this->hOGRSFDriver);\n unset($this->hLayer);\n unset($this->iSpatialFilter);\n unset($this->hSrcDataSource);\n }",
"protected function tearDown() {\n gc_collect_cycles();\n }",
"public function tearDown() {\n $this->container = null;\n $this->model = null;\n $this->request = null;\n $this->response = null;\n $this->responseHeaders = null;\n $this->responseWriter = null;\n }",
"public function tearDown(): void\n {\n parent::tearDown();\n unset($this->filesystem);\n unset($this->diskSpace);\n unset($this->commandTester);\n }",
"public function tearDown(): void {\n // Remove any temporary directories that were created.\n $filesystem = new Filesystem();\n foreach ($this->tmpDirs as $dir) {\n $filesystem->remove($dir);\n }\n // Clear out variables from the previous pass.\n $this->tmpDirs = [];\n $this->io = NULL;\n // Clear the composer cache dir, if it was set\n putenv('COMPOSER_CACHE_DIR=');\n }",
"public function cleanup(): void\n {\n }",
"public function cleanup(): void\n {\n }",
"public function Cleanup()\r\n\t{\r\n\t}",
"public function tearDown() : void {\n\t\tunset($this->ls); /* Kill circular references */\n\t\tunset($this->lsconn); /* Kill circular references */\n\t}",
"protected function tearDown()\n {\n unset($this->output);\n }",
"public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }",
"protected function tearDown() {\n $this->osapiCollection = null;\n $this->list = null;\n parent::tearDown();\n }",
"protected function tearDown()\n {\n $this->calculator = NULL;\n }",
"protected function tearDown(): void {\n $this->parser = null;\n }",
"protected function tearDown()\n {\n $this->compilerPass = null;\n $this->container = null;\n parent::tearDown();\n }",
"protected function tearDown()\n {\n $this->regular1 = null;\n $this->regular2 = null;\n $this->rental1 = null;\n $this->rental2 = null;\n }",
"public function tearDown() {\n\t\tFixtures::clear('db');\n\t\tGalleries::reset();\n\t\tImages::reset();\n\t}",
"protected function tearDown()\n {\n \\RPI\\Foundation\\Helpers\\FileUtils::delTree(__DIR__.\"/LESSPHPTest/ROOT\");\n }",
"public function tearDown() {\n $this->resource = null;\n $this->response = null;\n $this->database = null;\n $this->storage = null;\n $this->event = null;\n $this->manager = null;\n }",
"protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test data\n\t\tunset($modSettings);\n\t}",
"public function tearDown() {\n if ($this->wedisabledgc) {\n gc_enable();\n }\n $this->wedisabledgc = false;\n }",
"public function tearDown()\n {\n $fs = new SymfonyFileSystem();\n $fs->remove($this->fakeTestFileDir);\n\n unset($this->builder);\n unset($this->builder);\n unset($this->fs);\n m::close();\n }",
"protected function tearDown(): void\n {\n $this->provider = null;\n $this->response = null;\n }",
"function endTest() {\n unset($this->CalendarRecursion);\n unset($this->CalendarInstance);\n unset($this->Activity);\n ClassRegistry::flush();\n }",
"public function tearDown()\n {\n unset(\n $this->plugins,\n $this->events,\n $this->connection,\n $this->config\n );\n }",
"protected function tearDown()\n {\n session_destroy(); //req'd because Kml class sets a cookie\n $this->clearRequest();\n $this->clearTmpFiles();\n }",
"public function tearDown() {\r\n\t\tunset($this->ImgTblHelper, $this->Controller, $this->View);\r\n\t\tparent::tearDown();\r\n\t}",
"public function tearDown() {\n $this->transformation = null;\n }",
"public function tearDown() {\n $this->transformation = null;\n }",
"public function tearDown() {\n $this->transformation = null;\n }",
"protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\r\n\t\tparent::tearDown ();\r\n\t}",
"public function tearDown()\n\t{\n\t\tunset($this->target);\n\t}",
"function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}",
"protected function tearDown()\n {\n Phlash::clear();\n }",
"public function tearDown()\n {\n unset($this->filterRepositoryMock);\n unset($this->notificationContextManagerMock);\n unset($this->notificationTranslatorMock);\n unset($this->filterManager);\n }"
] | [
"0.79781395",
"0.79781395",
"0.79781395",
"0.79781395",
"0.79781395",
"0.79781395",
"0.79781395",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976836",
"0.7976344",
"0.7976344",
"0.7976344",
"0.7976344",
"0.7976344",
"0.7976344",
"0.78772247",
"0.78772247",
"0.78772247",
"0.77385294",
"0.7622718",
"0.7590846",
"0.7581981",
"0.75642306",
"0.75500023",
"0.7537886",
"0.75273365",
"0.7519937",
"0.7509883",
"0.7505579",
"0.74835205",
"0.74744475",
"0.7472191",
"0.7471073",
"0.7448932",
"0.74277306",
"0.74264514",
"0.7404205",
"0.739177",
"0.7386229",
"0.7383461",
"0.738092",
"0.738092",
"0.73677146",
"0.73663706",
"0.73597026",
"0.734277",
"0.7338558",
"0.73383325",
"0.7336859",
"0.73303896",
"0.7327291",
"0.73259425",
"0.7311458",
"0.7303411",
"0.7294846",
"0.7285744",
"0.7283386",
"0.7278399",
"0.7277675",
"0.7275594",
"0.72737646",
"0.7273622",
"0.7269152",
"0.7269152",
"0.7269152",
"0.72667706",
"0.72666764",
"0.7249254",
"0.7248658",
"0.72467804"
] | 0.0 | -1 |
Test case for addPackingPlan Create a packingPlan. | public function testAddPackingPlan()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function createPlan(){\n if(!$this->request->plan_name || !$this->request->plan_description) {\n return false;\n }\n $this->plan = Planes::create([\n 'name' => $this->request->plan_name,\n 'description' => $this->request->plan_description,\n 'price' => $this->request->price,\n 'product_id' => $this->request->product_id,\n 'balance' => $this->request->balance,\n ]);\n $this->plan = new PlanesFormatter($this->plan);\n }",
"public function testAddPackingPlanFile()\n {\n }",
"public function testAddPackingPlanTag()\n {\n }",
"public function testAddPackingPlanAudit()\n {\n }",
"public function testGetPackingPlanById()\n {\n }",
"public function create($plan, array $properties = array());",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function testAddPackingPlanFileByURL()\n {\n }",
"public function testDeletePackingPlan()\n {\n }",
"public function testUpdatePackingPlan()\n {\n }",
"public function create_plan($requestData){\n \n // ### Create Plan\n try {\n // Create a new instance of Plan object\n $plan = new Plan();\n if(isset($requestData['plan'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['plan']), $plan);\n } \n // # Payment definitions for this billing plan.\n $paymentDefinition = new PaymentDefinition(); \n $paymentDefinition\n ->setAmount(new Currency($requestData['paymentDefinition']['Amount']));\n array_pop($requestData['paymentDefinition']);\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $this->setArrayToMethods(array_filter($requestData['paymentDefinition']), $paymentDefinition); \n }\n \n // Charge Models\n $chargeModel = new ChargeModel();\n $chargeModel->setAmount(new Currency($requestData['chargeModel']['Amount']));\n array_pop($requestData['chargeModel']);\n if(!empty($this->checkEmptyObject((array)$chargeModel))){\n $this->setArrayToMethods(array_filter($requestData['chargeModel']), $chargeModel); \n $paymentDefinition->setChargeModels(array($chargeModel));\n }\n \n $merchantPreferences = new MerchantPreferences();\n $baseUrl = $requestData['baseUrl'];\n\n $merchantPreferences->setReturnUrl($baseUrl.$requestData['ReturnUrl'])\n ->setCancelUrl($baseUrl.$requestData['CancelUrl']);\n if(!empty($this->checkEmptyObject($requestData['merchant_preferences']['SetupFee']))){\n $merchantPreferences->setSetupFee(new Currency($requestData['merchant_preferences']['SetupFee']));\n }\n array_pop($requestData['merchant_preferences']);\n \n if(isset($requestData['merchant_preferences'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['merchant_preferences']), $merchantPreferences);\n }\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $plan->setPaymentDefinitions(array($paymentDefinition));\n }\n if(!empty($this->checkEmptyObject((array)$merchantPreferences))){\n $plan->setMerchantPreferences($merchantPreferences);\n } \n $requestArray= clone $plan;\n $output = $plan->create($this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $output->toArray();\n $returnArray['RAWREQUEST']=$requestArray->toJSON();\n $returnArray['RAWRESPONSE']=$output->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }",
"public function create($planData)\n {\n \t$planPurchase \t\t\t\t = new PlanPurchase();\n\t\t$planPurchase->user_id \t\t = $this->user->id;\n\t\t$planPurchase->plan_id \t\t = $planData->plan_id;\n\t\t$planPurchase->country_code = $planData->country_code;\n\t\t$planPurchase->gold_price = (float)$this->plan->gold_price;\n\t\t$planPurchase->transaction_id = $planData->transaction_id;\n\t\t$planPurchase->save();\n\n \t/** Add Chest Capacity value in user's table **/\n \t(new ChestService)->setUser($this->user)->expand($this->plan->bucket);\n \t\n /** Deduct User Gold **/\n $goldBalance = (new UserRepository($this->user))->deductGold($this->plan->gold_price);\n\n \t/** return the available skeleton keys **/\n \treturn ['chest_bucket'=> $this->user->buckets['chests'], 'available_gold_balance'=> $goldBalance];\n }",
"public function testGetPackingPlanFiles()\n {\n }",
"public function creating(Plan $plan)//troquei o created por creating\n {\n $plan->url = Str::kebab($plan->name);\n }",
"public function testGetPackingPlanByFilter()\n {\n }",
"public function created(PlanSubscription $planSubscription)\n {\n //\n }",
"public function plan_create( $plan_id, $amount, $name, $interval, $trial_days = FALSE ) {\r\n\t\t$params = array(\r\n\t\t\t'id' => $plan_id,\r\n\t\t\t'amount' => $amount,\r\n\t\t\t'name' => $name,\r\n\t\t\t'currency' => 'usd',\r\n\t\t\t'interval' => $interval\r\n\t\t);\r\n\t\tif( $trial_days )\r\n\t\t\t$params['trial_period_days'] = $trial_days;\r\n\t\t\t\r\n\t\treturn $this->_send_request( 'plans', $params, STRIPE_METHOD_POST );\r\n\t}",
"public function store(StoreStripePlanRequest $request)\n {\n Log::debug(\"STORE PLAN\");\n\n $amount = $request->amount . '00';\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->createPlan($amount, $request->name, $request->product, $request->interval);\n\n if ($result['message'] == 'Success'){\n\n session()->flash('success', 'Plan created successfully.');\n \n return redirect( route ('plans.index') );\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n \n return redirect()->back();\n\n }\n\n }",
"public function testNewFreeAccountAddValidRecord()\n {\n $this->assertEquals(0, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n $this->insight->accounts->addFree(12345, new FreePlan());\n $this->assertEquals(1, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(AccountsInterface::FREE, $row['status']);\n $this->assertEquals(FreePlan::class, $row['plan']);\n $this->assertNull($row['billing_period']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['created_at']);\n $this->assertEquals(date('Y'), $row['cohort_year']);\n $this->assertEquals(date('m'), $row['cohort_month']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['converted_to_free_at']->format('Y-m-d H:i:s'));\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(0, $row['mrr_value']);\n $this->assertFalse($row['had_trial']);\n }",
"public function create($name, $id)\n {\n return $this->add(new Plan($name, $id));\n }",
"public function savePlan($plan)\n {\n return Stripe\\Plan::create(array(\n \"amount\" => $plan->price,\n \"interval\" => $plan->interval,\n \"name\" => $plan->name,\n \"currency\" => \"usd\",\n 'id' => $plan->level\n ));\n }",
"function TestPlan_create($author_id, $product_id, $default_product_version, $type_id, $name, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testRunFulfillmentPlan()\n {\n }",
"public function planCreate(array $array);",
"function Add()\n\t{\n\t\t// Check user authorization and permissions\n\t\tAuthenticatedUser()->CheckAuth();\n\t\t// The User needs both Rate Management and Admin Permissions\n\t\tAuthenticatedUser()->PermissionOrDie(PERMISSION_RATE_MANAGEMENT | PERMISSION_ADMIN);\n\n\t\t// Context menu\n\t\t// Nothing to add\n\n\t\t// Breadcrumb menu\n\t\tBreadCrumb()->Employee_Console();\n\t\tBreadCrumb()->AvailablePlans(TRUE);\n\t\tBreadCrumb()->SetCurrentPage(\"Add Rate Plan\");\n\n\t\t// Handle form submittion\n\t\tif (SubmittedForm('AddPlan', 'Commit') || SubmittedForm('AddPlan', 'Save as Draft'))\n\t\t{\n\t\t\t// Validate the plan\n\t\t\t$mixResult = $this->_ValidatePlan();\n\t\t\tif ($mixResult !== TRUE && $mixResult !== FALSE)\n\t\t\t{\n\t\t\t\t// The plan is invalid and an error message has been returned\n\t\t\t\tAjax()->AddCommand(\"Alert\", $mixResult);\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telseif ($mixResult === FALSE)\n\t\t\t{\n\t\t\t\t// The plan is invalid and no error message was specified, so it is assumed appropraite actions have already taken place\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The plan is valid. Save it to the database\n\t\t\t\tTransactionStart();\n\t\t\t\t$mixResult = $this->_SavePlan();\n\t\t\t\tif ($mixResult !== TRUE && $mixResult !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t// Saving the plan failed, and an error message has been returned\n\t\t\t\t\tTransactionRollback();\n\t\t\t\t\tAjax()->AddCommand(\"Alert\", $mixResult);\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\telseif ($mixResult === FALSE)\n\t\t\t\t{\n\t\t\t\t\t// Saving the plan failed, and no error message was specified, so it is assumed appropraite actions have already taken place\n\t\t\t\t\tTransactionRollback();\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// The plan was successfully saved to the database\n\t\t\t\t\tTransactionCommit();\n\n\t\t\t\t\t// If we've saved as a draft, then filter our Plan List to Drafts\n\t\t\t\t\tif (DBO()->Plan->Archived->Value == RATE_STATUS_DRAFT) {\n\t\t\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['Status']\t= RATE_STATUS_DRAFT;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set the message appropriate to the action\n\t\t\t\t\t$strSuccessMsg = (DBO()->Plan->Archived->Value == RATE_STATUS_ACTIVE)? \"The plan has been successfully saved\" : \"The plan has been successfully saved as a draft\";\n\t\t\t\t\tAjax()->AddCommand(\"AlertAndRelocate\", Array(\"Alert\" => $strSuccessMsg, \"Location\" => Href()->AvailablePlans().'?RatePlan.Status='.RATE_STATUS_DRAFT));\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check if there has been a BaseRatePlan.Id specified, to base the new RatePlan on\n\t\tif (DBO()->BaseRatePlan->Id->Value)\n\t\t{\n\t\t\t// There is, so load it\n\t\t\tDBO()->RatePlan->Id = DBO()->BaseRatePlan->Id->Value;\n\t\t\tif (!DBO()->RatePlan->Load())\n\t\t\t{\n\t\t\t\t// Could not load the RatePlan\n\t\t\t\tDBO()->Error->Message = \"The RatePlan with id: \". DBO()->RatePlan->Id->value .\" could not be found\";\n\t\t\t\t$this->LoadPage('error');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t// Reset the Id of the RatePlan, because we are creating a new one, not editing an existing one\n\t\t\tDBO()->RatePlan->Id = 0;\n\t\t}\n\t\telseif (DBO()->RatePlan->Id->Value)\n\t\t{\n\t\t\t// We are opening an existing RatePlan for editing\n\t\t\t// Update the Breadcrumb menu\n\t\t\tBreadCrumb()->SetCurrentPage(\"Edit Draft Rate Plan\");\n\n\t\t\t// We want to display an existing RatePlan\n\t\t\tif (!DBO()->RatePlan->Load())\n\t\t\t{\n\t\t\t\t// Could not load the RatePlan\n\t\t\t\tDBO()->Error->Message = \"The RatePlan with id: \". DBO()->RatePlan->Id->value .\" could not be found\";\n\t\t\t\t$this->LoadPage('error');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t// Make sure the Rate Plan is a draft\n\t\t\tif (DBO()->RatePlan->Archived->Value != RATE_STATUS_DRAFT)\n\t\t\t{\n\t\t\t\t// Can't edit the Rate Plan\n\t\t\t\tDBO()->Error->Message = \"The RatePlan with id: \". DBO()->RatePlan->Id->value .\" and Name \\\"\". DBO()->RatePlan->Name->Value .\"\\\" is not a draft and therefore cannot be edited\";\n\t\t\t\t$this->LoadPage('error');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// We want to add a new RatePlan\n\t\t\tDBO()->RatePlan->Id = 0;\n\t\t}\n\n\t\t$this->LoadPage('rate_plan_add');\n\n\t\treturn TRUE;\n\n\t}",
"public function run()\n {\n Plan::create([\n \t'name' => 'Free Plan',\n\t\t\t'plan_identifier' => 'free_plan',\n\t\t\t'limit_list' => 3,\n\t\t\t'limit_space' => 1500,\n\t\t\t'price' => 0\n ]); \n }",
"public function run()\n {\n Plan::create([\n 'name' => 'Free Plan',\n 'trial_days' => 7,\n 'max_workspaces' => 1,\n 'max_users' => 5,\n 'max_clients' => 5,\n 'max_projects' => 5,\n 'image' => 'free_plan.png',\n 'status' => 1,\n ]);\n }",
"public function testGetPackingPlanTags()\n {\n }",
"public function actionSetup($plan)\n {\n // Redirect back to billing page if already has a plan active\n $isBillingActive = Yii::$app->user->identity->getBillingDaysLeft();\n if($isBillingActive){\n return $this->redirect(['billing/index']);\n }\n\n // Find the Pricing Option the user wants to setup\n $pricing = \\common\\models\\Pricing::findOne($plan);\n if(!$pricing){\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n\n // Check if is trial\n $isTrial = Yii::$app->user->identity->agent_trial_days > 0? true: false;\n\n // If user is attempting to setup a package which is for less than\n // the number of accounts he has attached, show error and redirect to billing\n $currentAccountCount = count(Yii::$app->ownedAccountManager->ownedAccounts);\n $planLimit = $pricing->pricing_account_quantity;\n if($planLimit < $currentAccountCount){\n Yii::$app->getSession()\n ->setFlash('warning', \"[Selected plan only allows $planLimit accounts. You have $currentAccountCount you administer. ] You may remove an account by clicking the <b>Remove</b> button on its right sidebar.\");\n\n return $this->redirect(['billing/index']);\n }\n\n // Calculate Discount if Available\n $discount = 0;\n if($isTrial){\n // Give 30% discount for trial users\n $discount = ($pricing->pricing_price - round($pricing->pricing_price * 0.7)) * -1;\n }\n\n // Setup new billing model\n $billingModel = new Billing();\n $billingModel->agent_id = Yii::$app->user->identity->agent_id;\n $billingModel->pricing_id = $pricing->pricing_id;\n $billingModel->billing_total = $pricing->pricing_price + $discount; // Store initial billed amount\n $billingModel->billing_email = Yii::$app->user->identity->agent_email;\n $billingModel->billing_name = Yii::$app->user->identity->agent_name;\n $billingModel->billing_currency = \"USD\";\n\n // Handle AJAX Validation\n if (Yii::$app->request->isAjax && $billingModel->load(Yii::$app->request->post())) {\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n return \\yii\\widgets\\ActiveForm::validate($billingModel);\n }\n\n if($billingModel->load(Yii::$app->request->post())){\n // Token returned from 2CO after creditcard input\n $billingModel->twoco_token = Yii::$app->request->post('token');\n\n // If Token exists and record of bill is saved\n if($billingModel->twoco_token && $billingModel->save()){\n $token = Yii::$app->request->post('token');\n\n // Your sellerId(account number) and privateKey are required to make the Payment API Authorization call.\n Twocheckout::privateKey(Yii::$app->params['2co.privateKey']);\n Twocheckout::sellerId(Yii::$app->params['2co.sellerId']);\n // Your username and password are required to make any Admin API call.\n Twocheckout::username(Yii::$app->params['2co.username']);\n Twocheckout::password(Yii::$app->params['2co.password']);\n // If you want to turn off SSL verification (Please don't do this in your production environment)\n Twocheckout::verifySSL(Yii::$app->params['2co.verifySSL']); // this is set to true by default\n // To use your sandbox account set sandbox to true\n Twocheckout::sandbox(Yii::$app->params['2co.isSandbox']);\n\n\n // Use the token to create a sale\n try {\n $charge = Twocheckout_Charge::auth([\n \"merchantOrderId\" => $billingModel->billing_id,\n \"token\" => $token,\n \"currency\" => $billingModel->billing_currency,\n \"billingAddr\" => [\n // Card holder’s name. (128 characters max)\n \"name\" => $billingModel->billing_name,\n // Card holder’s street address. (64 characters max) Required\n \"addrLine1\" => $billingModel->billing_address_line1,\n // Card holder’s street address line 2. (64 characters max)\n // Required if “country” value is: CHN, JPN, RUS - Optional for all other “country” values.\n \"addrLine2\" => $billingModel->billing_address_line1? $billingModel->billing_address_line1:\"\",\n // Card holder’s city. (64 characters max) Required\n \"city\" => $billingModel->billing_city,\n /**\n * Card holder’s state. (64 characters max) Required if “country” value is ARG, AUS, BGR, CAN, CHN, CYP,\n * EGY, FRA, IND, IDN, ITA, JPN, MYS, MEX, NLD, PAN, PHL, POL, ROU, RUS, SRB, SGP, ZAF, ESP, SWE, THA, TUR,\n * GBR, USA - Optional for all other “country” values.\n */\n \"state\" => $billingModel->billing_state? $billingModel->billing_state:\"\",\n /**\n * Card holder’s zip. (16 characters max) Required if “country” value is ARG, AUS, BGR, CAN, CHN, CYP, EGY, FRA,\n * IND, IDN, ITA, JPN, MYS, MEX, NLD, PAN, PHL, POL, ROU, RUS, SRB, SGP, ZAF, ESP, SWE, THA, TUR, GBR,\n * USA - Optional for all other “country” values.\n */\n \"zipCode\" => $billingModel->billing_zip_code? $billingModel->billing_zip_code:\"\",\n // Card holder’s country. (64 characters max) Required\n \"country\" => $billingModel->country->country_iso_code_3,\n // Card holder’s email. (64 characters max) Required\n \"email\" => $billingModel->billing_email,\n // Card holder’s phone. (16 characters max) Optional\n // \"phoneNumber\" => '555-555-5555'\n ],\n \"lineItems\" => [\n [\n \"type\" => \"product\",\n \"name\" => \"Plugn \".$pricing->pricing_title.\" Plan\",\n \"price\" => $pricing->pricing_price,\n \"tangible\" => \"N\",\n \"productId\" => $pricing->pricing_id,\n \"recurrence\" => \"1 Month\",\n \"duration\" => \"Forever\",\n \"startupFee\" => $discount?$discount:\"\"\n ]\n ]\n ]);\n\n $billingModel->processTwoCheckoutSuccess($charge);\n return $this->redirect(['billing/index']);\n } catch (Twocheckout_Error $e) {\n $billingModel->processTwoCheckoutError($e);\n }\n }\n }\n\n // List of Zip / State Required Countries\n $zipStateCountries = \\common\\models\\Country::find()->select('country_id')\n ->where(['country_zipstate_required' => 1])->asArray()->all();\n\n // List of Addr Line 2 required countries\n $addrCountries = \\common\\models\\Country::find()->select('country_id')\n ->where(['country_addrline2_required' => 1])->asArray()->all();\n\n\n return $this->render('setup', [\n // Form\n 'model' => $billingModel,\n 'zipStateCountries' => json_encode($zipStateCountries),\n 'addrCountries' => json_encode($addrCountries),\n\n // Pricing\n 'pricing' => $pricing,\n 'isTrial' => $isTrial,\n\n // 2 CO\n 'processFormUrl' => Url::to(['billing/process']),\n 'environment' => Yii::$app->params['2co.environment'],\n 'sellerId' => Yii::$app->params['2co.sellerId'],\n 'publishableKey' => Yii::$app->params['2co.publishableKey'],\n ]);\n }",
"public function testDeletePackingPlanTag()\n {\n }",
"public function store(CreateListingPlanRequest $request)\r\n\t{\r\n\t\t$data = $request->all();\r\n\r\n\t\t//creates listing plan\r\n\t\t$this->listingPlanRepository->create($data);\r\n\r\n\t\tflash()->success(trans('back.flash_successfully_added'));\r\n\t\treturn redirect()->route('admin.listing-plans.index');\r\n\t}",
"public function testApplyOrderWarehouseFulfillmentPlan()\n {\n }",
"public function create()\n {\n $this->authorize('create', Plan::class);\n\n return view('admin.plans.create');\n \n }",
"public function run()\n {\n Plan::create([\n 'name' =>'November Subscription Plan',\n 'description'=>\"It's time to increase your customers! Buy our subscription plan and save a spot of your choice amongst the top 20 restaurants that will be listed for a date night Hurry!\"\n ]);\n }",
"public function store(PlanSubTypeCreateRequest $request)\n {\n try {\n\n $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n $planSubType = $this->repository->create($request->all());\n\n $response = [\n 'message' => 'PlanSubType created.',\n 'data' => $planSubType->toArray(),\n ];\n\n if ($request->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect()->back()->with('message', $response['message']);\n } catch (ValidatorException $e) {\n if ($request->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }",
"public function run()\n {\n $group = Group::factory()\n ->count(1)\n ->create();\n \n Plan::first()->groups()->attach($group->first()->id);\n }",
"public function create( Request $request, Plan $plan)\n {\n $plan = Plan::findOrFail($request->get('plan'));\n \n $request->user()\n ->newSubscription('main', $plan->stripe_plan)\n ->create($request->stripeToken);\n \n return redirect()->route('home')->with('success', 'Your plan subscribed successfully');\n }",
"protected function getPackPlan(): ?SubscriptionPlanContract\n {\n /** @var PlanQueryContract */\n $query = app()->make(PlanQueryContract::class);\n\n /** @var AccountContract */\n $account = $this->accounts->first();\n $account->getChargebee()->getPlan()->isYearlyBilled() ?\n $query->beingYearly()\n : $query->beingMonthly();\n\n /** @var ?PlanContract */\n $plan = $query->whereGlobal()->first();\n \n return $plan?->toSubscriptionPlan();\n }",
"public function __construct()\n {\n $this->plan = new Plan();\n }",
"public function run()\n {\n Plan::factory()->createMany([\n ['id' => Plan::FREE_PLAN, 'name' => 'Free', 'monthly_payment' => 0],\n ['id' => Plan::BASIC_PLAN, 'name' => 'Basic', 'monthly_payment' => 100],\n ['id' => Plan::PLUS_PLAN, 'name' => 'Plus', 'monthly_payment' => 187],\n ]);\n }",
"public function testDeletePackingPlanFile()\n {\n }",
"public function add(Plan $plan)\n {\n $this->plans[] = $plan;\n\n return $plan;\n }",
"public function create()\n {\n\n return view('stripe.plan.create');\n\n }",
"public function create_or_update_plan( $plan_data ) {\n\t\t$item_id = $plan_data['id'];\n\t\t$all_items = MS_Factory::get_transient( 'ms_stripecheckout_plans' );\n\t\t$all_items = mslib3()->array->get( $all_items );\n\n\t\tif ( ! isset( $all_items[ $item_id ] )\n\t\t || ! is_a( $all_items[ $item_id ], 'StripeCheckoutPlan' )\n\t\t) {\n\t\t\ttry {\n\t\t\t\t$item = StripeCheckoutPlan::retrieve( $item_id );\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t// If the plan does not exist then stripe will throw an Exception.\n\t\t\t\t$item = false;\n\t\t\t}\n\t\t\t$all_items[ $item_id ] = $item;\n\t\t} else {\n\t\t\t$item = $all_items[ $item_id ];\n\t\t}\n\n\t\t/*\n\t\t * Stripe can only update the plan-name, so we have to delete and\n\t\t * recreate the plan manually.\n\t\t */\n\t\tif ( $item && is_a( $item, 'StripeCheckoutPlan' ) ) {\n\t\t\t$item->delete();\n\t\t\t$all_items[ $item_id ] = false;\n\t\t}\n\n\t\tif ( $plan_data['amount'] > 0 ) {\n\t\t\ttry {\n\t\t\t\t$item = StripeCheckoutPlan::create( $plan_data );\n\t\t\t\t$all_items[ $item_id ] = $item;\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t// Nothing.\n\t\t\t}\n\t\t}\n\n\t\tMS_Factory::set_transient(\n\t\t\t'ms_stripecheckout_plans',\n\t\t\t$all_items,\n\t\t\tHOUR_IN_SECONDS\n\t\t);\n\t}",
"function show_plan_add() {\n //must check that the user has the required capability \n if (!current_user_can('manage_options')) {\n csm_error('You do not have sufficient permissions to access this page', true);\n }\n \n $CsmWorkplace = new CsmWorkplace();\n $workplaces = $CsmWorkplace->all();\n \n //Add the member\n if (isset($_POST['action']) && $_POST['action'] === 'addplan') {\n $data = $_POST;\n $Csmplan = new CsmPlan();\n try {\n $Csmplan->create($_POST);\n csm_set_update('New membership plan was added');\n hacky_redirect('csm-plans');\n } catch (\\Exception $e) {\n csm_error($e->getMessage());\n }\n }\n \n include(CSM_PLUGIN_PATH . 'app/views/plan-add.view.php');\n}",
"public function createNewItemToPlan() {\n $tracker = $this->planning->getPlanningTracker();\n return $GLOBALS['Language']->getText('plugin_agiledashboard', 'create_new_item_to_plan', array($tracker->getItemName()));\n }",
"public function store(Request $request)\n {\n /* dd($request->all()); */\n $this->authorize('create', Plan::class);\n\n Stripe\\Stripe::setApiKey(env('STRIPE_SECRET'));\n \n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'duration' => 'required',\n // 'trial' => 'present'\n // 'plan_type' => 'required',Rule::in(['one_time','recurring'])\n ]);\n // Generate pla slug from plan name\n $slug = str_replace(' ','-', $request->input('name'));\n $gateway_id = str_replace(' ','_', $request->input('name'));\n //$team_enable = !empty($request->input('teams_limit')) ? 1 : 0;\n //$teams_limit = !empty($request->input('teams_limit')) ? $request->input('teams_limit') : NULL;\n $price = (float) $request->input('price') * 100;\n \n $interval=explode(',',$request->duration);\n /* dd($interval); */\n //Add the Stripe Api key to create the plan on the stripe dashboard\n // if($request->plan_type == \"recurring\"){\n \\Stripe\\Plan::create([\n \"amount\" => $price,\n \"interval\" => $interval[1],\n \"interval_count\"=>$interval[0], \n \"product\" => [\n \"name\" => $request->name,\n ],\n \"trial_period_days\" => $request->trial,\n \"currency\" => \"usd\",\n \"id\" => $gateway_id,\n //\"trial_period_days\" => $request->input('trial'),\n ]);\n // }elseif($request->plan_type == \"one_time\"){\n // \\Stripe\\Product::create([\n // \"name\" => $request->name,\n // \"id\" => $gateway_id,\n // ]);\n // \\Stripe\\Price::create([\n // \"unit_amount\" => $price,\n // \"currency\" => \"usd\",\n // \"product\" => $gateway_id,\n // ]);\n // }\n /* dd(123); */\n $plan = new Plan([\n 'name' => $request->name,\n 'gateway_id' => $gateway_id,\n 'price' => $request->price,\n 'brand' => $request->brand,\n 'contest' => $request->contest,\n 'duration' => $request->duration,\n 'other_info_1' => $request->plan_info_1,\n 'other_info_2' => $request->plan_info_2,\n //'teams_enabled' => $team_enable,\n //'teams_limit' => $teams_limit,\n 'active' => 1,\n 'slug' => $slug,\n 'trial_period_days' => $request->trial,\n ]);\n\n $plan->save();\n\n return redirect()->back()->with(\"status\", \"Your plan has been created.\");\n }",
"public function create_pack($form_name)\r\n\t{\r\n\t\t$api_params = array(\r\n\t\t\t'method' => 'moo.pack.createPack',\r\n\t\t\t'product' => $this->card_type,\r\n\t\t\t'friendlyName' => $this->pack_name.$form_name.' '.date(\"Y-m-d\"),\r\n\t\t);\r\n\r\n\t\t$response = $this->connect($api_params);\r\n\r\n\t\tif (isset($response->packId))\r\n\t\t{\r\n\t\t\t$this->pack_id = $response->packId;\r\n\t\t\t$this->dropin_url = $response->dropIns->imageChooser;\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function testConstruct()\n {\n $data_from_collection = $this->data['monthly_collection'];\n $this->assertEquals(\n $data_from_collection['attributes']['plan_name'],\n $this->makePlan($data_from_collection)->get('plan_name')\n );\n\n $data_from_site = $this->data['monthly_site'];\n $this->assertEquals($data_from_site['name'], $this->makePlan($data_from_site)->get('name'));\n }",
"public function store(CreateMemberShipPlanRequest $request)\n {\n $input = $request->all();\n\n $memberShipPlan = $this->memberShipPlanRepository->create($input);\n\n Flash::success('Member Ship Plan saved successfully.');\n\n return redirect(route('admin.memberShipPlans.index'));\n }",
"public function testCreatePayrun()\n {\n }",
"public function store(PlanCreateRequest $request , $id)\n {\n $validated = $request->validated();\n $plan = new Plan;\n $plan->name = $request->name;\n $plan->price = $request->price;\n $plan->shop_id = $id;\n $plan->save();\n return redirect()->route('shops.show' , ['shop' => $id])->\n with(['done' => 'Plan Added To The Shop Successfully']);\n\n }",
"private function _SavePlan()\n\t{\n\t\t/*\n\t\t * Saving process:\n\t\t *\t\tS1: Set up values for properties of the RatePlan object that are not already defined, or not in their database correct format\n\t\t *\t\tS2: Save the record to the RatePlan table\n\t\t *\t\tS3: Remove any records in the RatePlanRateGroup table\n\t\t *\t\tS4: For each RateGroup belonging to this RatePlan:\n\t\t *\t\t\t\tadd a record to the RatePlanRateGroup table\n\t\t *\t\tS5: If the RatePlan is being Committed: (not being saved as a draft)\n\t\t *\t\t\t\tFor each draft RateGroup belonging to this RatePlan:\n\t\t *\t\t\t\t\tupdate the Archived property of the RateGroup in the RateGroup table so that it is now a committed RateGroup, not a draft\n\t\t *\t\t\t\t\tFor each draft Rate belonging to the draft RateGroup:\n\t\t *\t\t\t\t\t\tupdate the Archived property of the Rate in the Rate table so that it is now a committed Rate, not a draft\n\t\t */\n\n\t\t// S1: Set up the remaing fields required of a RatePlan record\n\t\tDBO()->RatePlan->MinMonthly\t= ltrim(DBO()->RatePlan->MinMonthly->Value, \"$\");\n\t\tDBO()->RatePlan->ChargeCap\t= ltrim(DBO()->RatePlan->ChargeCap->Value, \"$\");\n\t\tDBO()->RatePlan->UsageCap\t= ltrim(DBO()->RatePlan->UsageCap->Value, \"$\");\n\n\t\tif (SubmittedForm('AddPlan', 'Save as Draft'))\n\t\t{\n\t\t\t// Flag the plan as being a draft\n\t\t\tDBO()->RatePlan->Archived = RATE_STATUS_DRAFT;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The plan is not being saved as a draft\n\t\t\tDBO()->RatePlan->Archived = RATE_STATUS_ACTIVE;\n\t\t}\n\n\t\tDBO()->RatePlan->modified_employee_id\t= Flex::getUserId();\n\t\tif (!DBO()->RatePlan->Id->Value)\n\t\t{\n\t\t\t// Plan has not been saved before\n\t\t\tDBO()->RatePlan->created_employee_id\t= Flex::getUserId();\n\t\t}\n\n\t\t// If the RatePlan has already been saved as a draft then load in the details that don't get edited here, so they don't get erased\n\t\tif (DBO()->RatePlan->Id->Value)\n\t\t{\n\t\t\tDBO()->RatePlan->LoadMerge();\n\t\t}\n\n\t\t// S2: Save the plan to the database\n\t\tif (!DBO()->RatePlan->Save())\n\t\t{\n\t\t\t// Saving failed\n\t\t\treturn \"ERROR: Saving the RatePlan to the RatePlan database table failed, unexpectedly\";\n\t\t}\n\n\t\t// S3: Remove all records from the RatePlanRateGroup table where RatePlan == DBO()->RatePlan->Id->Value\n\t\t$delRatePlanRateGroup = new Query();\n\t\t$delRatePlanRateGroup->Execute(\"DELETE FROM RatePlanRateGroup WHERE RatePlan = \" . DBO()->RatePlan->Id->Value);\n\n\t\t// S4: Save each of the RateGroups associated with the RatePlan to the RatePlanRateGroup table\n\t\tDBO()->RatePlanRateGroup->RatePlan = DBO()->RatePlan->Id->Value;\n\t\tforeach ($this->_arrRateGroups as $intRateGroup)\n\t\t{\n\t\t\tDBO()->RatePlanRateGroup->Id = 0;\n\t\t\tDBO()->RatePlanRateGroup->RateGroup = $intRateGroup;\n\n\t\t\tif (!DBO()->RatePlanRateGroup->Save())\n\t\t\t{\n\t\t\t\t// Saving failed\n\t\t\t\treturn \"ERROR: Saving one of the RateGroup - RatePlan associations failed, unexpectedly.<br />The RatePlan has not been saved\";\n\t\t\t}\n\t\t}\n\n\t\t// S5: Remove all records from the rate_plan_discount table where RatePlan == DBO()->RatePlan->Id->Value\n\t\t$delRatePlanDiscount\t= new Query();\n\t\t$delRatePlanDiscount->Execute(\"DELETE FROM rate_plan_discount WHERE rate_plan_id = \" . DBO()->RatePlan->Id->Value);\n\n\t\t// S6: Remove any records from the discount table which are no longer linked to any Rate Plans (Discounts cannot be shared between Plans)\n\t\t$delUnlinkedDiscounts\t= new Query();\n\t\t$delUnlinkedDiscounts->Execute(\"DELETE FROM discount WHERE (SELECT id FROM rate_plan_discount WHERE discount_id = discount.id LIMIT 1) IS NULL\");\n\n\t\t// S7: Save each of the Discounts which are linked between this Rate Plan and a Record Type\n\t\t$aDiscountReferenceMap\t= array();\n\t\tforeach (DBL()->RecordType as $dboRecordType)\n\t\t{\n\t\t\t$sRecordTypeObjectName\t\t= \"RecordType_{$dboRecordType->Id->Value}\";\n\t\t\t$iDiscountReference\t= (int)DBO()->{$sRecordTypeObjectName}->discount_id->Value;\n\n\t\t\t// Has the Discount already been created?\n\t\t\tif ($iDiscountReference && $iDiscountReference > 0)\n\t\t\t{\n\t\t\t\tif (!array_key_exists($iDiscountReference, $aDiscountReferenceMap))\n\t\t\t\t{\n\t\t\t\t\t// Create the Discount\n\t\t\t\t\t$sDiscountObjectName\t= \"discount_{$iDiscountReference}\";\n\n\t\t\t\t\t$oDiscount\t\t\t\t\t= new Discount();\n\t\t\t\t\t$oDiscount->name\t\t\t= trim(DBO()->{$sDiscountObjectName}->name->Value);\n\t\t\t\t\t$oDiscount->description\t\t= trim(DBO()->{$sDiscountObjectName}->description->Value);\n\n\t\t\t\t\tif (DBO()->{$sDiscountObjectName}->limit_type->Value === 'UNITS')\n\t\t\t\t\t{\n\t\t\t\t\t\t$oDiscount->charge_limit\t= null;\n\t\t\t\t\t\t$oDiscount->unit_limit\t\t= abs((int)trim(DBO()->{$sDiscountObjectName}->limit->Value));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$oDiscount->charge_limit\t= abs((float)trim(DBO()->{$sDiscountObjectName}->limit->Value));\n\t\t\t\t\t\t$oDiscount->unit_limit\t\t= null;\n\t\t\t\t\t}\n\t\t\t\t\t$oDiscount->charge_limit\t= ($oDiscount->charge_limit) ? $oDiscount->charge_limit : null;\n\t\t\t\t\t$oDiscount->unit_limit\t\t= ($oDiscount->unit_limit) ? $oDiscount->unit_limit : null;\n\n\t\t\t\t\t$oDiscount->save();\n\n\t\t\t\t\t// Create the Discount<->RatePlan Link\n\t\t\t\t\t$oRatePlanDiscount\t\t\t\t\t= new Rate_Plan_Discount();\n\t\t\t\t\t$oRatePlanDiscount->rate_plan_id\t= DBO()->RatePlan->Id->Value;\n\t\t\t\t\t$oRatePlanDiscount->discount_id\t\t= $oDiscount->id;\n\t\t\t\t\t$oRatePlanDiscount->save();\n\n\t\t\t\t\t$aDiscountReferenceMap[$iDiscountReference]\t= $oDiscount->id;\n\t\t\t\t}\n\n\t\t\t\t// Save Link\n\t\t\t\t$oDiscountRecordType\t\t\t\t\t= new Discount_Record_Type();\n\t\t\t\t$oDiscountRecordType->discount_id\t\t= $aDiscountReferenceMap[$iDiscountReference];\n\t\t\t\t$oDiscountRecordType->record_type_id\t= $dboRecordType->Id->Value;\n\t\t\t\t$oDiscountRecordType->save();\n\t\t\t}\n\t\t}\n\n\t\t// S8: If the RatePlan is being committed then all draft RateGroups used by it must be commited and all draft Rates\n\t\t// used by the draft RateGroups must be committed\n\t\tif ((SubmittedForm('AddPlan', 'Commit')) && (count($this->_arrRateGroups) > 0))\n\t\t{\n\t\t\t$strRateGroups \t= implode(',', $this->_arrRateGroups);\n\t\t\t$arrUpdate\t\t= Array(\"Archived\" => RATE_STATUS_ACTIVE);\n\t\t\t$updRateGroups \t= new StatementUpdate(\"RateGroup\", \"Archived = \". RATE_STATUS_DRAFT .\" AND Id IN ($strRateGroups)\", $arrUpdate);\n\t\t\t$updRates \t\t= new StatementUpdate(\"Rate\", \"Archived = \". RATE_STATUS_DRAFT .\" AND Id IN (SELECT Rate FROM RateGroupRate WHERE RateGroup IN ($strRateGroups))\", $arrUpdate);\n\n\t\t\tif ($updRateGroups->Execute($arrUpdate, NULL) === FALSE)\n\t\t\t{\n\t\t\t\treturn \"ERROR: Commiting one of the Draft Rate Groups, used by this Rate Plan, failed.<br />The RatePlan has not been saved\";\n\t\t\t}\n\n\t\t\tif ($updRates->Execute($arrUpdate, NULL) === FALSE)\n\t\t\t{\n\t\t\t\treturn \"ERROR: Commiting one of the Draft Rates, used by this Rate Plan, failed.<br />The RatePlan has not been saved\";\n\t\t\t}\n\t\t}\n\n\t\t// Everything has been saved\n\t\treturn TRUE;\n\t}",
"public function store(Request $request)\n {\n $validator = $this->validator($request->all());\n\n if ($validator->fails()) {\n $this->throwValidationException(\n $request, $validator\n );\n }\n\n $plan = new Plan([\n 'course_id' => $request->get('course'),\n 'conceptual_section_id' => $request->get('conceptual'),\n 'start_date' => Carbon::createFromFormat( 'd-m-Y h:i A', $request->get('planification_date') . ' ' . $request->get('time_start') ),\n 'end_date' => Carbon::createFromFormat( 'd-m-Y h:i A', $request->get('planification_date') . ' ' . $request->get('time_end') ),\n 'procedimental_section' => $request->get('procedimental'),\n 'actitudinal_section' => $request->get('actitudinal'),\n 'competences' => $request->get('competences'),\n 'indicators' => $request->get('indicators'),\n 'teaching_strategy' => $request->get('teaching_strategy'),\n 'teaching_sequence' => $request->get('teaching_sequence'),\n 'period_id' => Period::all()->last()->id\n ]);\n\n $plan->save();\n\n $condition = new Condition([\n 'state_id' => trans('globals.condition.pending'),\n 'plan_id' => Plan::all()->last()->id,\n 'user_id' => Auth::user()->id\n ]);\n\n $condition->save();\n\n return self::redirection('plans', trans('plan.create.success'), null, null);\n }",
"public function testUpdatePackingPlanCustomFields()\n {\n }",
"public function store(StoreNewPayplan $request)\n {\n\n $payplan = $this->payplan->create([\n 'name' => $request->name,\n 'description' => $request->description,\n 'billing_cycle' => $request->billing_cycle,\n 'payplan_terms' => $request->payplan_terms,\n 'is_recurring' => $is_recurring\n ]);\n\n return redirect(route('payplan.show', $payplan->id));\n }",
"public function testNewPaidMonthlyAccountAddValidRecord()\n {\n $this->assertEquals(0, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n $this->insight->accounts->addPaid(12345, new PlanL(), new Monthly());\n $this->assertEquals(1, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(PlanL::class, $row['plan']);\n $this->assertEquals(Monthly::class, $row['billing_period']);\n $this->assertEquals(AccountsInterface::PAID, $row['status']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['created_at']);\n $this->assertEquals(date('Y'), $row['cohort_year']);\n $this->assertEquals(date('m'), $row['cohort_month']);\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(99, $row['mrr_value']);\n $this->assertFalse($row['had_trial']);\n }",
"public function create()\r\n\t{\r\n\t\t$details = $this->getDetailsArray(['UserGroups' => null]);\r\n\r\n\t\treturn view('admin.listing-plans.create', [\r\n\t\t\t'details' => $details\r\n\t\t]);\r\n\t}",
"public function create()\n {\n return view('admin.member_ship_plans.create');\n }",
"public function createAction()\n {\n $addressData = $this->getRequest()->getPost('speedy_address', array());\n $pickingData = $this->getRequest()->getPost('picking', array());\n\n try {\n /** @var Extendix_SpeedySimpleShipping_Helper_Bol $bolHelper */\n $bolHelper = Mage::helper('speedy_simple_shipping/bol');\n\n $bolHelper->prepare(0, $addressData, $pickingData);\n\n $resultBol = $bolHelper->createBol();\n\n $this->_ajaxResponse['has_error'] = false;\n $this->_ajaxResponse['message'] = $this->__('The BOL was created.');\n\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($this->_ajaxResponse));\n\n } catch(Exception $e) {\n $this->_ajaxResponse['has_error'] = true;\n $this->_ajaxResponse['message'] = $this->__($e->getMessage());\n\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($this->_ajaxResponse));\n }\n }",
"public function store(PlanningStoreRequest $request)\n {\n\n\n\n if($Planning = Planning::create($request->except('roles', 'permissions')) ) {\n return new PlanningResource($Planning);\n }\n \n }",
"public function create_simple($data) {\n\n $plan = $this->csmplan->get($data['plan_id']);\n if (empty($plan)) {\n throw new Exception('Something went wrong. Membership plan does not exist');\n } else {\n $this->gump->validation_rules(array(\n 'user_id' => 'required|max_len,100',\n 'plan_id' => 'required|numeric',\n 'plan_start' => 'required|date',\n 'vat' => 'required|numeric'\n ));\n\n $validated_data = $this->gump->run($data);\n if ($validated_data === false) {\n $errArr = $this->gump->get_readable_errors();\n $errString = \"\";\n foreach ($errArr as $k => $err) {\n $errString .= $err . '<br>';\n }\n throw new Exception($errString);\n } else {\n $response = $this->create(array(\n 'user_id' => $data['user_id'],\n 'plan_id' => $plan['plan_id'],\n 'plan_start' => $data['plan_start'],\n 'plan_end' => date('Y-m-d', (strtotime($data['plan_start']) + ($plan['days'] * 60 * 60 * 24))),\n 'approved' => $data['approved'] ? 1 : 0,\n 'payment' => $data['payment'] ? 1 : 0,\n 'payment_method' => $data['payment_method'],\n 'payment_at' => $data['payment_at'],\n 'price' => $plan['price'],\n 'vat' => $plan['vat'],\n 'price_total' => $plan['price'] + (($plan['price'] / 100) * $data['vat'])\n ));\n if ($response !== 1) {\n throw new Exception('Something went wrong');\n } else {\n return $response;\n }\n }\n }\n }",
"public function store(Request $request)\n {\n $request->validate([\n 'label' => 'required',\n 'project_id' => 'required',\n 'modulesPlanIdList' => 'required'\n ]);\n\n $plan = Plan::create($request->all());\n\n return response()->json([\n 'message' => 'Le plan a bien été ajouté !',\n 'plan' => $plan\n ]);\n }",
"public function test_addExternalShipment() {\n\n }",
"public function add_to_plan(Request $request, $id)\n {\n $rules = [\n 'plan_id' => 'required|numeric',\n ];\n $attrs = [\n 'plan_id' => '出团计划id',\n ];\n $this->validate($request, $rules, [], $attrs);\n\n $obj = SaleOrder::find($id);\n $obj->fill($request->all());\n $obj->save();\n return redirect('/sale_order');\n \n }",
"protected function callPlanCreateRequest($call_plan, $accountid)\n {\n // verify the required parameter 'call_plan' is set\n if ($call_plan === null || (is_array($call_plan) && count($call_plan) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $call_plan when calling callPlanCreate'\n );\n }\n // verify the required parameter 'accountid' is set\n if ($accountid === null || (is_array($accountid) && count($accountid) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $accountid when calling callPlanCreate'\n );\n }\n\n $resourcePath = '/{accountid}/callplan';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($accountid !== null) {\n $resourcePath = str_replace(\n '{' . 'accountid' . '}',\n ObjectSerializer::toPathValue($accountid),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($call_plan)) {\n $_tempBody = $call_plan;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function testAddExternalShipment()\n {\n }",
"public function create()\n {\n return view('admin.plan.create');\n }",
"protected function getPayPalPlan(\\HGON\\HgonPayment\\Domain\\Model\\PayPalProduct $payPalProduct, \\HGON\\HgonPayment\\Domain\\Model\\Article $article = null)\n {\n /** @var \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager $objectManager */\n $objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Object\\\\ObjectManager');\n /** @var \\HGON\\HgonPayment\\Domain\\Repository\\PayPalPlanRepository $payPalPlanRepository */\n $payPalPlanRepository = $objectManager->get('HGON\\\\HgonPayment\\\\Domain\\\\Repository\\\\PayPalPlanRepository');\n\n /** @var \\HGON\\HgonPayment\\Domain\\Model\\PayPalPlan $payPalPlan */\n $payPalPlan = $payPalPlanRepository->findByProductId($payPalProduct->getProductId());\n if (! ($payPalPlan instanceof \\HGON\\HgonPayment\\Domain\\Model\\PayPalPlan)) {\n\n // create it\n\n // if article is not set, try to get it by sku from database\n // if the article is a donation, there will be no article in database\n if (! ($article instanceof \\HGON\\HgonPayment\\Domain\\Model\\Article)) {\n /** @var \\HGON\\HgonPayment\\Domain\\Repository\\ArticleRepository $articleRepository */\n $articleRepository = $objectManager->get('HGON\\\\HgonPayment\\\\Domain\\\\Repository\\\\ArticleRepository');\n /** @var \\HGON\\HgonPayment\\Domain\\Model\\Article $article */\n $article = $articleRepository->findBySku($payPalProduct->getSku());\n }\n\n if (! ($article instanceof \\HGON\\HgonPayment\\Domain\\Model\\Article)) {\n $this->getLogger()->log(\\TYPO3\\CMS\\Core\\Log\\LogLevel::ERROR, sprintf('Cannot find Article by SKU for creating a PayPalPlan for PayPalProduct \"%s\". Please check the configuration.', $payPalProduct->getProductId()));\n return false;\n //===\n }\n\n $data = [\n 'product_id' => $payPalProduct->getProductId(),\n 'name' => $payPalProduct->getName(),\n 'description' => $payPalProduct->getDescription(),\n 'status' => 'ACTIVE',\n 'billing_cycles' => [\n [\n 'frequency' => [\n 'interval_unit' => 'MONTH',\n 'interval_count' => 1,\n ],\n 'tenure_type' => 'REGULAR',\n 'sequence' => 1,\n 'total_cycles' => 0,\n 'pricing_scheme' => [\n 'fixed_price' => [\n 'value' => $article->getPrice(),\n 'currency_code' => 'EUR'\n ]\n ]\n ]\n ],\n 'payment_preferences' => [\n 'auto_bill_outstanding' => true,\n 'setup_fee' => [\n 'value' => '0',\n 'currency_code' => 'EUR'\n ],\n 'setup_fee_failure_action' => \"CONTINUE\",\n 'payment_failure_threshold' => 3\n ],\n /*\n 'taxes' => [\n 'percentage' => '0',\n 'inclusive' => false\n ]\n */\n\n ];\n\n $url = $this->host . '/v1/billing/plans';\n $authorization = 'Authorization: Bearer ' . $this->clientCredentials->access_token;\n\n $curl = curl_init();\n try {\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json;charset=UTF-8', $authorization));\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));\n } catch (\\Exception $e) {\n $this->getLogger()->log(\\TYPO3\\CMS\\Core\\Log\\LogLevel::ERROR, sprintf('An error occurred while trying to make following api call \"%s\". Please check the configuration. Error: %s', $url, $e->getMessage()));\n }\n\n $this->cUrl = $curl;\n $request = $this->sendRequest();\n\n // Create PayPalProduct\n /** @var \\HGON\\HgonPayment\\Domain\\Model\\PayPalPlan $newPayPalPlan */\n $newPayPalPlan = $objectManager->get('HGON\\\\HgonPayment\\\\Domain\\\\Model\\\\PayPalPlan');\n $newPayPalPlan->setTitle($request->name);\n $newPayPalPlan->setDescription($request->description);\n $newPayPalPlan->setPlanId($request->id);\n $newPayPalPlan->setStatus($request->status);\n\n $payPalPlanRepository->add($newPayPalPlan);\n\n /** @var \\TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager $persistenceManager */\n $persistenceManager = $objectManager->get('TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\PersistenceManager');\n $persistenceManager->persistAll();\n\n return $newPayPalPlan;\n //===\n }\n\n return $payPalPlan;\n //===\n }",
"private function insertPlan($accountId, $planId, $effectiveDate) {\n $stmt = $this->pdo->prepare(\n 'INSERT INTO account_plans(account_id,plan_id,effective_date) '\n . 'VALUES(:account_id,:plan_id,:effective_date)');\n \n return $stmt->execute([\n ':account_id' => $accountId,\n ':plan_id' => $planId,\n ':effective_date' => $effectiveDate,\n ]);\n }",
"public function create()\n {\n $user = Auth::user();\n if (!$user || !$user->is_back_user()) {\n return redirect()->intended(route('admin/login'));\n }\n elseif (!$user->can('create-membership-plans')){\n return redirect()->intended(route('admin/error/permission_denied'));\n }\n\n $cash_terminals = CashTerminal::with('shopLocation')->get();\n $shops = ShopLocations::all();\n\n $breadcrumbs = [\n 'Home' => route('admin'),\n 'Administration' => route('admin'),\n 'Back End User' => route('admin'),\n 'Permissions' => '',\n ];\n $text_parts = [\n 'title' => 'Add new membership plan',\n 'subtitle' => '',\n 'table_head_text1' => 'Membership Plans - Create New'\n ];\n $sidebar_link = 'admin-backend-memberships-new_plans';\n\n return view('admin/membership_plans/add_plan', [\n 'breadcrumbs' => $breadcrumbs,\n 'text_parts' => $text_parts,\n 'in_sidebar' => $sidebar_link,\n 'cash_terminals' => $cash_terminals,\n 'shops' => $shops,\n ]);\n }",
"public function create()\n {\n \n return view('admin.plans.create');\n\n }",
"public function create()\n {\n return view('backend.vendor-subscription-plan.create');\n }",
"public function iN_InsertNewPointPlan($userID, $planKey, $planPointAmount, $planAmount) {\n\t\tif ($this->iN_CheckIsAdmin($userID) == 1) {\n\t\t\tmysqli_query($this->db, \"INSERT INTO i_premium_plans(plan_name_key, plan_amount,amount,plan_status)VALUES('$planKey','$planPointAmount','$planAmount','0')\") or die(mysqli_error($this->db));\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function testCreate()\n {\n VCR::insertCassette('pickups/create.yml');\n\n $shipment = Shipment::create(Fixture::oneCallBuyShipment());\n\n $pickupData = Fixture::basicPickup();\n $pickupData['shipment'] = $shipment;\n\n $pickup = Pickup::create($pickupData);\n\n $this->assertInstanceOf('\\EasyPost\\Pickup', $pickup);\n $this->assertStringMatchesFormat('pickup_%s', $pickup->id);\n $this->assertNotNull($pickup->pickup_rates);\n }",
"public function updateListingPackageUsage(&$plan_info)\n {\n global $rlDb, $account_info, $reefless, $lang;\n\n $paid_status = false;\n\n // Existing package mode\n if ($plan_info['Type'] == 'package' && $plan_info['Package_ID']) {\n if ($plan_info['Listings_remains'] > 0) {\n $update = array(\n 'fields' => array(\n 'Listings_remains' => $plan_info['Listings_remains'] - 1,\n ),\n 'where' => array(\n 'ID' => $plan_info['Package_ID'],\n ),\n );\n\n $prefix = ucfirst($this->adType);\n if ($plan_info[$prefix . '_listings'] > 0) {\n $update['fields'][$prefix . '_remains'] = $plan_info[$prefix . '_remains'] - 1;\n }\n\n $rlDb->update($update, 'listing_packages');\n }\n\n // Set paid status\n $paid_status = $lang['purchased_packages'];\n }\n // Newly free package mode\n elseif ($plan_info['Type'] == 'package' && !$plan_info['Package_ID'] && $plan_info['Price'] <= 0) {\n $insert = array(\n 'Account_ID' => $account_info['ID'],\n 'Plan_ID' => $plan_info['ID'],\n 'Listings_remains' => $plan_info['Listing_number'] - 1,\n 'Standard_remains' => $plan_info['Standard_listings'],\n 'Featured_remains' => $plan_info['Featured_listings'],\n 'Type' => 'package',\n 'Date' => 'NOW()',\n 'IP' => $reefless->getClientIpAddress(),\n );\n\n if ($plan_info['Featured'] && $plan_info['Advanced_mode'] && $this->adType == 'standard') {\n $insert['Standard_remains']--;\n }\n\n if ($plan_info['Featured'] && $plan_info['Advanced_mode'] && $this->adType == 'featured') {\n $insert['Featured_remains']--;\n }\n\n $rlDb->insert($insert, 'listing_packages');\n\n // Set paid status\n $paid_status = $lang['package_plan'] . '(' . $lang['free'] . ')';\n }\n // Limited listing mode\n elseif ($plan_info['Type'] == 'listing' && $plan_info['Limit'] > 0) {\n $usage_key = $plan_info['Using'] ? 'Using' : 'Limit';\n $plan_usage_insert = array(\n 'Account_ID' => $account_info['ID'],\n 'Plan_ID' => $plan_info['ID'],\n 'Listings_remains' => $plan_info[$usage_key] - 1,\n 'Type' => 'limited',\n 'Date' => 'NOW()',\n 'IP' => $reefless->getClientIpAddress(),\n );\n\n $rlDb->insert($plan_usage_insert, 'listing_packages');\n }\n\n return $paid_status;\n }",
"public function createPlan(array $parameters = array())\n {\n /**\n * @var \\Omnipay\\Vindicia\\Message\\CreatePlanRequest\n */\n return $this->createRequest('\\Omnipay\\Vindicia\\Message\\CreatePlanRequest', $parameters);\n }",
"public function prepareAddSolventPlan($params) {\n \textract($params);\n \t$fields = $this->getFields();\n \t$sm = new SolventManagement($db,$facilityID);\n \t$facility = new Facility($db);\n \t$facility->initializeByID($facilityID);\n \t$currentDate = getdate();\n \tif (($year > $currentDate['year']) || ($year == $currentDate['year'] && $month >= $currentDate['mon'])) {\n \t\t$year = $currentDate['year'];\n \t\t$month = $currentDate['mon']-1;\n \t\tif ($month == 0) {\n \t\t\t$year--;\n \t\t\t$month = 12;\n \t\t}\n \t}\n \t$input = $facility->getCurrentUsageOptimized($month,$year);\n \tif (!$input) {\n \t\t$input = 0;\n \t}\n \t$noOutputs = false;\n \t$sm->getMonthlyOutputs($month,$year);\n \tif (!$sm->isAlreadyExist) {\n \t\tforeach ($fields as $field) {\n \t\t\t$sm->$field = 0;\n \t\t}\n \t\t$noOutputs = true;\n \t}\n \t$sm->iniOutputNames();\n \t$validation['summary'] = 'success';\n \tif ($save) {\n \t\t$sumOut = 0;\n \t\tforeach($outputs as $output_id => $value) {\n \t\t\t$sm->$output_id = $value;\n \t\t\tif (!is_numeric($value) || $value < 0 ) {\n \t\t\t\t$validation['summary'] = 'failed';\n \t\t\t\t$validation[$output_id] = 'Error! Please enter valid value!';\n \t\t\t} else {\n \t\t\t\t$sumOut += $value;\n \t\t\t}\n \t\t}\n \t\tif ((string)$input != (string)$sumOut) {\n \t\t\t$validation['summary'] = 'failed';\n \t\t\t$validation['input'] = 'Error! Input does not equal output!';\n \t\t}\n \t\tif ($validation['summary'] == 'success') {\n \t\t\t$sm->save();\n \t\t\treturn true;\n \t\t}\n \t}\n \t$company = new Company($db);\n\t\t$companyDetails = $company->getCompanyDetails($facility->getCompanyID());\n\t\t$unittype = new Unittype($db);\n\t\t$unittypeDescr = $unittype->getNameByID($companyDetails['voc_unittype_id']);\n\t\t$currentDate = getdate();\n \treturn array(\n \t\t'data' => $sm,\n \t\t'validation' => $validation,\n \t\t'input' => $input,\n \t\t'month' => $month,\n \t\t'year' => $year,\n\t\t\t'fields' => $fields,\n\t\t\t'unittype' => $unittypeDescr,\n \t\t'curYear'\t=> $currentDate['year'],\n \t\t'noOutputs'\t=> $noOutputs\n \t);\n }",
"public function store(PlanValidation $request)\n {\n $retorn=[\"can_create\"=>false];\n if(Auth::user()->can_create){\n $plan=App\\Plan::create($request->all());\n $retorn=[\"can_create\"=>true,\"plan\"=>$plan];\n }\n return response()->json($retorn);\n }",
"public function run()\n {\n Plan::create([\n 'name' => 'low_monthly',\n 'braintree_plan_id' => 'low_monthly',\n 'price' => '500',\n 'priceName' => 'Five',\n 'period' => 'month',\n ]);\n\n Plan::create([\n 'name' => 'high_monthly',\n 'braintree_plan_id' => 'high_monthly',\n 'price' => '1000',\n 'priceName' => 'Ten',\n 'period' => 'month',\n ]);\n }",
"function testAddCard() {\n\n $schedule = $this->parlayschedule->order_by('dateTime', 'DESC')->get_by(array('dateTime >=' => date('Y-m-d 00:00:00')));\n\n if ( ! empty($schedule) ) {\n\n $nextCartId = $this->parlaycard->getNextCardId();\n $data = array(\n 'parlayCardId' => $nextCartId->parlayCardId,\n 'sportScheduleId' => $schedule->id,\n 'sportCategoryId' => 1,\n 'dateTime' => date('m-d-Y H:i:s', strtotime( $schedule->dateTime )),\n 'endDate' => date('m-d-Y H:i:s', strtotime( $schedule->dateTime ) + 86400),\n 'team1' => $schedule->team1,\n 'team2' => $schedule->team2,\n 'team1Name' => 'A',\n 'team2Name' => 'B'\n\n );\n\n // To verify data is empty\n $dataInvalid = '';\n $testResultFirst = $this->parlaycard->add( $dataInvalid );\n\n if (is_array($testResultFirst) && isset($testResultFirst['message']) ) {\n\n $this->assertContains( $testResultFirst['message'], 'Please enter the required data', 'To verify data is empty');\n }\n\n // To verify parlayCardId Invalid\n $idInvalid = array('', null, 0, -1);\n foreach ($idInvalid as $value) {\n\n $parlayCardIdInvalid = $data;\n $parlayCardIdInvalid['parlayCardId'] = $value;\n $testResultSecond = $this->parlaycard->add( $parlayCardIdInvalid );\n\n if( is_array($testResultSecond) && isset($testResultSecond['message']) ) {\n\n if( !empty($value) ) {\n\n $this->assertContains( $testResultSecond['message'][0], 'The parlay Card Id field must contain a number greater than 0.', 'To verify parlayCardId is invalid' );\n } else {\n\n $this->assertContains( $testResultSecond['message'][0], 'The parlay Card Id field is required.', 'To verify parlayCardId is invalid' );\n }\n\n }\n }\n // To verify sportScheduleId Invalid\n $idInvalid = array('', null, 0, -1);\n foreach ($idInvalid as $value) {\n\n $sportScheduleIdInvalid = $data;\n $sportScheduleIdInvalid['sportScheduleId'] = $value;\n $testResultThird = $this->parlaycard->add( $sportScheduleIdInvalid );\n if( is_array($testResultThird) && isset($testResultThird['message']) ) {\n\n if( !empty($value) ) {\n\n $this->assertContains( $testResultThird['message'][0], 'The sport Schedule Id field must contain a number greater than 0.', 'To verify sportScheduleId is invalid' );\n } else {\n\n $this->assertContains( $testResultThird['message'][0], 'The sport Schedule Id field is required.', 'To verify sportScheduleId is invalid' );\n }\n\n }\n }\n\n // To verify sportCategoryId Invalid\n $idInvalid = array('', null, 0, -1);\n foreach ($idInvalid as $value) {\n\n $sportCategeryIdInvalid = $data;\n $sportCategeryIdInvalid['sportCategoryId'] = $value;\n\n $testResultFourth = $this->parlaycard->add( $sportCategeryIdInvalid );\n if( is_array($testResultFourth) && isset($testResultFourth['message']) ) {\n\n if( !empty($value) ) {\n\n $this->assertContains( $testResultFourth['message'][0], 'The sport Category Id field must contain a number greater than 0.', 'To verify sportCategoryId is invalid' );\n } else {\n\n $this->assertContains( $testResultFourth['message'][0], 'The sport Category Id field is required.', 'To verify sportCategoryId is invalid' );\n }\n\n }\n }\n\n // To verify add card is valid\n // ===========================\n $testResult = $this->parlaycard->add($data);\n\n if ( is_object($testResult) ) {\n\n // To verify parlayCardId return must be equal parlayCardInput\n $this->assertEquals((int)$testResult->parlayCardId, (int)$data['parlayCardId'], 'To verify parlayCardId return must be equal parlayCardInput');\n\n // To verify team1 return must be equal parlayCardInput\n $this->assertEquals((int)$testResult->team1, (int)$data['team1'], 'To verify team1 return must be equal team1 Input');\n // To verify team2 return must be equal parlayCardInput\n $this->assertEquals((int)$testResult->team2, (int)$data['team2'], 'To verify team2 return must be equal team2 Input');\n\n // To verify sportCategoryId return must be equal parlayCardInput\n $this->assertEquals((int)$testResult->sportCategoryId, (int)$data['sportCategoryId'], 'To verify sportCategoryId return must be equal sportCategoryId Input');\n\n // To verify sportScheduleId return must be equal parlayCardInput\n $this->assertEquals($testResult->sportScheduleId, $data['sportScheduleId'], 'To verify sportScheduleId return must be equal sportScheduleId Input');\n\n // To verify dateTime return must be equal parlayCardInput\n $this->assertEquals($testResult->dateTime, $schedule->dateTime, 'To verify dateTime return must be equal dateTime Input');\n\n\n // To verify team1Name return must be equal parlayCardInput\n $this->assertEquals($testResult->team1Name, $data['team1Name'], 'To verify team1Name return must be equal team1Name Input');\n\n // To verify team2Name return must be equal parlayCardInput\n $this->assertEquals($testResult->team2Name, $data['team2Name'], 'To verify team2Name return must be equal team2Name Input');\n } else {\n\n $this->assertTrue( FALSE, \"Can't verify add card dailyshow in case valid\");\n }\n } else {\n\n $this->assertTrue( FALSE, \"Can't verify add card dailyshow. schedule empty.\");\n\n }\n\n }",
"public function admin_add_paypal_payment() {\n\t\t$this->request->data['PaypalPaymentModule']['name'] = 'Paypal ' . $this->request->data['PaypalPaymentModule']['name'];\n\t\t\n\t\t$this->request->data['ShopsPaymentModule']['payment_module_id'] = PAYPAL_PAYMENT_MODULE;\n\t\t$this->request->data['ShopsPaymentModule']['shop_id'] = Shop::get('Shop.id');\n\t\t$this->request->data['ShopsPaymentModule']['display_name'] = $this->request->data['PaypalPaymentModule']['name'];\n\t\t\n\t\t$paymentModuleInShop = $this->Payment->ShopsPaymentModule;\n\t\t$paymentModule = $paymentModuleInShop->PaymentModule;\n\t\t\n\t\t$paymentModule->create();\n\t\t$paymentModuleInShop->create();\n\t\t\n\t\t\n\t\tif ($paymentModuleInShop->saveAll($this->request->data)) {\n\t\t\t$this->Session->setFlash(__('Paypal payment has been activated'), 'default', array('class'=>'flash_success'));\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Paypal payment could not be saved. Please, try again.'), 'default', array('class'=>'flash_failure'));\n\t\t}\n\t\t\n\t\t$this->redirect(array('action'=>'index'));\n\t}",
"public function create()\n\t{\n\t \n\t \n\t return view('admin.plans.create');\n\t}",
"public function createAction() {\n $customer = Mage::getSingleton('customer/customer')->load(Mage::getStoreConfig('testorders/general/customerid'));\n /*empty object for sourceOrder is fine*/\n $sourceOrder = new Varien_Object();\n $sku = $this->getRequest()->getParam('sku');\n\n $messages = array();\n $model = Mage::getModel(\"testorders/simulator\");\n $model->setOrderInfo($sourceOrder, $customer, $sku);\n $order = $model->create();\n\n if ($order && $order->getIncrementId()) {\n echo \"Order #{$order->getIncrementId()} has been created from SKU : {$sku}\";\n }\n else {\n echo \"Test Order creation failed. Please check the module config and make sure selected shipping method and payment method are configured properly\";\n }\n\n exit;\n }",
"public function __construct(Planilha $planilha)\n {\n $this->planilha = $planilha;\n }",
"public function createAccount($domain_name, $username, $password, $plan)\n {\n return $this->execute('createacct', [\n 'username' => $username,\n 'domain' => $domain_name,\n 'password' => $password,\n 'plan' => $plan,\n ]);\n }",
"public function add_individual_plan($individual_id) \n\t{\n\t\t$data = array(\n\t\t\t'individual_id'=>$individual_id,\n\t\t\t'savings_plan_id'=>$this->input->post('savings_plan_id'),\n\t\t\t'individual_savings_status'=>$this->input->post('individual_savings_status'),\n\t\t\t'individual_savings_opening_balance'=>$this->input->post('individual_savings_opening_balance'),\n\t\t\t'start_date'=>$this->input->post('start_date'),\n\t\t\t'created'=>date('Y-m-d H:i:s'),\n\t\t\t'created_by'=>$this->session->userdata('personnel_id'),\n\t\t\t'modified_by'=>$this->session->userdata('personnel_id')\n\t\t);\n\t\t\n\t\tif($this->db->insert('individual_savings', $data))\n\t\t{\n\t\t\treturn $this->db->insert_id();\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function create()\n {\n $mainmodules = MainModule::orderBy('position','ASC')->get();\n return view('admin.plans.create',compact('mainmodules'));\n }",
"public function testGetOrderPackData()\n {\n }",
"public function addPlan(AppsPlans $plan, int $quantity = 1) : self\n {\n if ($this->countPlans('apps_plans_id =' . $plan->getId())) {\n throw SubscriptionException::duplicatePlan($plan);\n }\n\n $subscription = $this->asStripeSubscription();\n\n $item = $subscription->items->create(array_merge([\n 'plan' => $plan->stripe_id,\n 'quantity' => $quantity,\n 'metadata' => [\n 'appPlan' => $plan->getId()\n ]\n ]));\n\n $subscriptionItem = new SubscriptionItems();\n $subscriptionItem->subscription_id = $this->getId();\n $subscriptionItem->apps_plans_id = $item->metadata->appPlan ?: 0;\n $subscriptionItem->stripe_id = $item->id;\n $subscriptionItem->stripe_plan = $item->plan->id;\n $subscriptionItem->quantity = $item->quantity;\n $subscriptionItem->saveOrFail();\n\n return $this;\n }",
"private function submitPlan(Request $request)\n\t{\n\t\tStripe::setApiKey( config('services.stripe.key') );\n\n\t\treturn Stripe::plan([\n\t\t\t'id' => str_slug( $request->nickname ),\n\t\t\t'amount' => $request->amount,\n\t\t\t'product' => 'service',\n\t\t\t'interval' => $request->interval,\n\t\t\t'currency' => $request->currency,\n\t\t]);\n\t}",
"function createPackage() {\n\n $sql = sprintf(\"INSERT INTO packages_new (name,\n \t\t\t\t\t\t\t\t\t\tprice_per_month,\n \t\t\t\t\t\t\t\t\t\tprice_per_year,\n \t\t\t\t\t\t\t\t\t\tis_agency_or_builder\t\n \t\t\t\t\t\t\t\t\t) VALUES ('%s',\n \t\t\t\t\t\t\t\t\t'%s',\n \t\t\t\t\t\t\t\t\t'%s',\n \t\t\t\t\t\t\t\t\t%d \n )\",\n \t\t\t\t\t\t\t\t\t\t$this->package_name,\n \t\t\t\t\t\t\t\t\t\t$this->price_per_month,\n \t\t\t\t\t\t\t\t\t\t$this->price_per_year,\n \t\t\t\t\t\t\t\t\t\t$this->is_agency_or_builder \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t);\n $this->conn->setsql($sql);\n $this->package_id = $this->conn->insertDB();\n\n if($this->conn->error) {\n for(reset($this->conn->error); $key = key($this->conn->error); next($this->conn->error)) {\n $this->Error[\"SQL ERROR ClssCmpnCrt-\".$key] = $this->conn->error[$key];\n }\n return false;\n }\n\n \n $sql = sprintf(\"SELECT id FROM supplements_new WHERE in_package = 1 AND is_agency_or_builder = %d \", $this->is_agency_or_builder);\n $this->conn->setsql($sql);\n $this->conn->getTableRows();\n if($this->conn->numberrows > 0 && $this->package_id > 0)\n {\n \tfor ($n=0;$n<$this->conn->numberrows;$n++)\n \t{\n\t\t $sql = sprintf(\"INSERT INTO packages_supliments_new (package_id,\n\t\t \t\t\t\t\t\t\t\t\t \tsuplement_id,\n\t\t \t\t\t\t\t\t\t\t\t \tvalue \t\t\t\t\t\t\t\t\t\t\n\t\t \t\t\t\t\t\t\t\t\t) VALUES (%d,\n\t\t \t\t\t\t\t\t\t\t\t%d,\n\t\t \t\t\t\t\t\t\t\t\t'%s'\n\t\t )\",\n\t\t \t\t\t\t\t\t\t\t\t\t$this->package_id,\n\t\t \t\t\t\t\t\t\t\t\t\t$this->conn->result[$n]['id'],\n\t\t \t\t\t\t\t\t\t\t\t\t'0' \t\t\t\t\t\t\t\t\t\t\n\t\t \t\t\t\t\t\t\t\t\t);\n\t\t $this->conn->setsql($sql);\n\t\t $this->conn->insertDB();\n\t\t\n\t\t if($this->conn->error) {\n\t\t for(reset($this->conn->error); $key = key($this->conn->error); next($this->conn->error)) {\n\t\t $this->Error[\"SQL ERROR ClssCmpnCrt-\".$key] = $this->conn->error[$key];\n\t\t }\n\t\t return false;\n\t\t }\n\t \n \t}\n \t\n }\n\n \n \n \n return true;\n }",
"function testAddNumber()\n {\n $number = \"17025295199\";\n \n $uuid = \"8711d367-469e-497d-9b26-ff79390bcfe8\";\n $request = new PlivoRequest(\n 'GET',\n 'Account/MAXXXXXXXXXXXXXXXXXX/Powerpack/' . $uuid . '/',\n [\n 'name' => \"powerpackname\",\n ]);\n $body = file_get_contents(__DIR__ . '/../Mocks/powerpackResponse.json');\n\n $this->mock(new PlivoResponse($request,200, $body));\n\n $powerpack = $this->client->powerpacks->get($uuid);\n\n $request = new PlivoRequest(\n 'POST',\n 'Account/MAXXXXXXXXXXXXXXXXXX/Numberpool/ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f/Number/'. $number .'/',\n []);\n $body = file_get_contents(__DIR__ . '/../Mocks/numberpoolResponse.json');\n\n $this->mock(new PlivoResponse($request,200, $body));\n $actual = $powerpack->add_number($number);\n self::assertNotNull($actual);\n }",
"public function UsePlan($plan_id) {\n\t\t$this->Param('plan_id', $plan_id, 'recur');\n\n\t\treturn true;\n\t}",
"public function test_should_create_group_with_in_house_program_type()\n {\n $this->browse(function (Browser $browser) {\n $this->create_group_with_in_house_program_type();\n $browser->waitFor('.toast-success')\n ->assertSee('The group was created successfully.')\n ->waitFor('@group-setup-card')\n ->waitForText('Setup Group: ' . $this->createGroupData['name'])\n ->type('@program-type-setup-allocation', mt_rand(1, 1000))\n ->click('.date-range div:nth-child(1) .vdp-datepicker input')\n ->click('.date-range div:nth-child(1) .vdp-datepicker__calendar .today')\n ->click('.date-range div:nth-child(3) .vdp-datepicker input')\n ->click('.date-range div:nth-child(3) .vdp-datepicker__calendar .next')\n ->click('.date-range div:nth-child(3) .vdp-datepicker__calendar .cell.weekend')\n ->type('@program-type-setup-date-shift', 1)\n ->select('@program-type-setup-day')\n ->type('@program-type-setup-cpl', mt_rand(1, 200))\n ->radio('@program-type-setup-pacing', 'Normal')\n ->driver->executeScript('window.scrollTo(0, 500);');\n $browser->press('Save & Continue')\n ->waitFor('@weekly-sectors')\n ->radio('@weekly-sectors', 'weekly')\n ->waitUntilMissing('.toast-success')\n ->assertMissing('.toast-success')\n ->waitFor('@save-and-continue-button')\n ->click('@save-and-continue-button');\n });\n }",
"public function store(PostponePlanRequestStore $request, PlanUser $plan_user)\n {\n $resopnse = $this->postponeRepository->store($request, $plan_user);\n\n if ($resopnse !== true) {\n return back()->with('error', $resopnse);\n }\n \n return back()->with('success', PostponePlan::FROZEN_PLAN_MESSAGE);\n }",
"public function store(Request $request)\n {\n try {\n $plan = Plan::create([\n 'title' => $request->title,\n 'sub_title' => $request->sub_title,\n 'price' => $request->price,\n 'day' => $request->day,\n 'properties' => ($request->properties?serialize($request->properties):null),\n ]);\n\n return redirect()->route('tariffs.index')->with('flash_message', 'با موفقیت ثبت شد');\n }catch (\\Exception $e){\n return redirect()->back()->with('err_message', 'خطایی رخ داده است، لطفا مجددا تلاش نمایید');\n }\n }",
"public function CreatePlat() {\n\t\ttry {\n\t\t\tDatabaseHandler::SetBeginTransaction();\n\t\t\t$sql = 'CALL add_plat(:pID,:pNom,:pDesc,:pPrix,:pPromo,:tID,:pImage,:pActif,:typeID,:pMenu,:mID,:pGroupe)';\n\t\t\t$params = array(':pID' => $this -> _mPrestaID, ':pNom' => $this -> _mPlatNom, ':pDesc' => $this -> _mPlatDescription, ':pPrix' => $this -> _mPlatPrix, ':pPromo' => $this -> _mPlatPrixPromo, ':tID' => $this -> _mTvaID, ':pImage' => $this -> _mPlatImage, ':pActif' => $this -> _mPlatActif, ':typeID' => $this -> _mTypePlatID, ':pMenu' => $this -> _mIsMenu, ':mID' => $this -> _mMenuPlatID, ':pGroupe' => $this -> _mGroupePlatNom);\n\t\t\t$this -> _mPlatID = DatabaseHandler::GetOne($sql, $params);\n\t\t\tDatabaseHandler::CommitTransaction();\n\t\t} catch(PDOException $e) {\n\t\t\tDatabaseHandler::RoolbackTransaction();\n\t\t\tDatabaseHandler::Close();\n\t\t\ttrigger_error($e -> getMessage(), E_USER_ERROR);\n\t\t}\n\n\t}",
"public function run()\n {\n $plans = [\n [\n 'name' => 'Monthly',\n 'slug' => 'monthly',\n 'gateway_id' => 'month_6',\n 'price' => 6.00,\n 'active' => true,\n 'teams_enabled' => false,\n 'teams_limit' => null,\n ],\n [\n 'name' => 'Yearly',\n 'slug' => 'yearly',\n 'gateway_id' => 'year_60',\n 'price' => 60.00,\n 'active' => true,\n 'teams_enabled' => false,\n 'teams_limit' => null,\n ],\n [\n 'name' => 'Monthly for 10 users',\n 'slug' => 'monthly-for-10-users',\n 'gateway_id' => 'team_month_55',\n 'price' => 55.00,\n 'active' => true,\n 'teams_enabled' => true,\n 'teams_limit' => 10,\n ],\n ];\n\n Plan::insert($plans);\n }",
"public function createAction(){\n \t$user = $this->get('security.context')->getToken()->getUser();\n \n \t$package = new Package();\n $package->setReporter( $user );\n \n $request = $this->getRequest();\n $form = $this->createForm( $this->get('restoo.packagetype'), $package );\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n \t\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($package);\n $em->flush();\n\n return $this->redirect( $this->generateUrl('package_edit', array('id' => $package->getId())));\n \n }\n\n return array(\n 'entity' => $package,\n 'form' => $form->createView()\n );\n }"
] | [
"0.69531554",
"0.6901942",
"0.6676506",
"0.63307506",
"0.6304023",
"0.6225091",
"0.61637425",
"0.6150241",
"0.6102987",
"0.608851",
"0.60822415",
"0.6023581",
"0.59372133",
"0.57835346",
"0.5757038",
"0.57414585",
"0.56579274",
"0.56268644",
"0.55209213",
"0.5484042",
"0.54468936",
"0.5420985",
"0.5390182",
"0.53826416",
"0.53811955",
"0.53775847",
"0.535144",
"0.53404164",
"0.5337725",
"0.5333339",
"0.53277665",
"0.5325863",
"0.5325629",
"0.52793515",
"0.5264237",
"0.52551216",
"0.5245714",
"0.5232567",
"0.52133435",
"0.5186566",
"0.5168449",
"0.5153091",
"0.5139888",
"0.51351255",
"0.5117748",
"0.5115227",
"0.5085936",
"0.50802857",
"0.5067526",
"0.5061822",
"0.5051742",
"0.5046552",
"0.503213",
"0.50319725",
"0.50272274",
"0.5023587",
"0.50126547",
"0.500522",
"0.49982166",
"0.49947467",
"0.49864572",
"0.49745134",
"0.49741992",
"0.4963607",
"0.4955827",
"0.49266282",
"0.49244744",
"0.49226898",
"0.49166054",
"0.49130562",
"0.49094564",
"0.49029297",
"0.48993498",
"0.48920915",
"0.48884183",
"0.48851115",
"0.48543972",
"0.4846565",
"0.4839086",
"0.48349664",
"0.4831225",
"0.48126283",
"0.48056668",
"0.47971663",
"0.47933716",
"0.47919726",
"0.47918746",
"0.4790883",
"0.4789841",
"0.47864136",
"0.47850782",
"0.47770864",
"0.4770775",
"0.47615886",
"0.47612086",
"0.47492874",
"0.47448134",
"0.47389862",
"0.4726714",
"0.4725453"
] | 0.7591891 | 0 |
Test case for addPackingPlanAudit Add new audit for a packingPlan. | public function testAddPackingPlanAudit()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAddPackingPlan()\n {\n }",
"public function addAudit(Audit $audit);",
"public function testAddExternalShipmentAudit()\n {\n }",
"public function test_addExternalShipmentAudit() {\n\n }",
"public function testAddReplenishmentAudit()\n {\n }",
"public function testAddOrderAudit()\n {\n }",
"public function testAddPackingPlanTag()\n {\n }",
"public function test_addReplenishmentProcessAudit() {\n\n }",
"public function testAddPackingPlanFile()\n {\n }",
"public function testAddVendorComplianceSurveyAudit()\n {\n }",
"public function test_addLowStockAudit() {\n\n }",
"public function test_addOrderLineActivityAudit() {\n\n }",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function testAddLowStockAudit()\n {\n }",
"public function test_addCartonActivityAudit() {\n\n }",
"public function created(PlanSubscription $planSubscription)\n {\n //\n }",
"public function test_addCustomerAudit() {\n\n }",
"public function test_addBillingCodeTypeAudit() {\n\n }",
"public function testPutAuditWitArgs()\r\n {\r\n $eventId = 1;\r\n $message = 'Installing new Library Activity.';\r\n $args = [\r\n '[solid_name]' => 'Sample_File_Deploy', \r\n '[artifact_id]' => 1\r\n ];\r\n $result = $this->Oddits->putAudit($eventId, $message, $args);\r\n $this->assertTrue($result);\r\n $lastID = $this->Oddits->getInsertID();\r\n $this->Auditargs = TableRegistry::get('Auditargs', ['className' => 'DBModel\\Model\\Table\\AuditargsTable']);\r\n $entity = $this->Auditargs->get($lastID);\r\n $this->assertNotEmpty($entity);\r\n $this->assertInternalType('object', $entity);\r\n $this->assertInstanceOf('DBModel\\Model\\Entity\\Auditarg', $entity);\r\n }",
"public function testGetPackingPlanById()\n {\n }",
"public function testAddItemSubCategoryAudit()\n {\n }",
"public function test_addItemCategoryAudit() {\n\n }",
"public function testUpdatePackingPlan()\n {\n }",
"private function insertPlan($accountId, $planId, $effectiveDate) {\n $stmt = $this->pdo->prepare(\n 'INSERT INTO account_plans(account_id,plan_id,effective_date) '\n . 'VALUES(:account_id,:plan_id,:effective_date)');\n \n return $stmt->execute([\n ':account_id' => $accountId,\n ':plan_id' => $planId,\n ':effective_date' => $effectiveDate,\n ]);\n }",
"public function test_addLegacyLowstockContactAudit() {\n\n }",
"public function testNewPaidAccountCanHaveCustomTimestamp()\n {\n $this->insight->accounts->addPaid(12345, new PlanM(), new Yearly(), new DateTimeValue('2015-12-05'));\n $this->assertEquals(1, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(AccountsInterface::PAID, $row['status']);\n $this->assertEquals('2015-12-05 00:00:00', $row['created_at']->format('Y-m-d H:i:s'));\n $this->assertEquals(2015, $row['cohort_year']);\n $this->assertEquals(12, $row['cohort_month']);\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(41.583, $row['mrr_value']);\n }",
"public function testNewPaidMonthlyAccountAddValidRecord()\n {\n $this->assertEquals(0, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n $this->insight->accounts->addPaid(12345, new PlanL(), new Monthly());\n $this->assertEquals(1, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(PlanL::class, $row['plan']);\n $this->assertEquals(Monthly::class, $row['billing_period']);\n $this->assertEquals(AccountsInterface::PAID, $row['status']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['created_at']);\n $this->assertEquals(date('Y'), $row['cohort_year']);\n $this->assertEquals(date('m'), $row['cohort_month']);\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(99, $row['mrr_value']);\n $this->assertFalse($row['had_trial']);\n }",
"public function testAddPackingPlanFileByURL()\n {\n }",
"public function testUpdatePackingPlanCustomFields()\n {\n }",
"public function testRunFulfillmentPlan()\n {\n }",
"public function testGetPackingPlanFiles()\n {\n }",
"function Add()\n\t{\n\t\t// Check user authorization and permissions\n\t\tAuthenticatedUser()->CheckAuth();\n\t\t// The User needs both Rate Management and Admin Permissions\n\t\tAuthenticatedUser()->PermissionOrDie(PERMISSION_RATE_MANAGEMENT | PERMISSION_ADMIN);\n\n\t\t// Context menu\n\t\t// Nothing to add\n\n\t\t// Breadcrumb menu\n\t\tBreadCrumb()->Employee_Console();\n\t\tBreadCrumb()->AvailablePlans(TRUE);\n\t\tBreadCrumb()->SetCurrentPage(\"Add Rate Plan\");\n\n\t\t// Handle form submittion\n\t\tif (SubmittedForm('AddPlan', 'Commit') || SubmittedForm('AddPlan', 'Save as Draft'))\n\t\t{\n\t\t\t// Validate the plan\n\t\t\t$mixResult = $this->_ValidatePlan();\n\t\t\tif ($mixResult !== TRUE && $mixResult !== FALSE)\n\t\t\t{\n\t\t\t\t// The plan is invalid and an error message has been returned\n\t\t\t\tAjax()->AddCommand(\"Alert\", $mixResult);\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telseif ($mixResult === FALSE)\n\t\t\t{\n\t\t\t\t// The plan is invalid and no error message was specified, so it is assumed appropraite actions have already taken place\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The plan is valid. Save it to the database\n\t\t\t\tTransactionStart();\n\t\t\t\t$mixResult = $this->_SavePlan();\n\t\t\t\tif ($mixResult !== TRUE && $mixResult !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t// Saving the plan failed, and an error message has been returned\n\t\t\t\t\tTransactionRollback();\n\t\t\t\t\tAjax()->AddCommand(\"Alert\", $mixResult);\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\telseif ($mixResult === FALSE)\n\t\t\t\t{\n\t\t\t\t\t// Saving the plan failed, and no error message was specified, so it is assumed appropraite actions have already taken place\n\t\t\t\t\tTransactionRollback();\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// The plan was successfully saved to the database\n\t\t\t\t\tTransactionCommit();\n\n\t\t\t\t\t// If we've saved as a draft, then filter our Plan List to Drafts\n\t\t\t\t\tif (DBO()->Plan->Archived->Value == RATE_STATUS_DRAFT) {\n\t\t\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['Status']\t= RATE_STATUS_DRAFT;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set the message appropriate to the action\n\t\t\t\t\t$strSuccessMsg = (DBO()->Plan->Archived->Value == RATE_STATUS_ACTIVE)? \"The plan has been successfully saved\" : \"The plan has been successfully saved as a draft\";\n\t\t\t\t\tAjax()->AddCommand(\"AlertAndRelocate\", Array(\"Alert\" => $strSuccessMsg, \"Location\" => Href()->AvailablePlans().'?RatePlan.Status='.RATE_STATUS_DRAFT));\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check if there has been a BaseRatePlan.Id specified, to base the new RatePlan on\n\t\tif (DBO()->BaseRatePlan->Id->Value)\n\t\t{\n\t\t\t// There is, so load it\n\t\t\tDBO()->RatePlan->Id = DBO()->BaseRatePlan->Id->Value;\n\t\t\tif (!DBO()->RatePlan->Load())\n\t\t\t{\n\t\t\t\t// Could not load the RatePlan\n\t\t\t\tDBO()->Error->Message = \"The RatePlan with id: \". DBO()->RatePlan->Id->value .\" could not be found\";\n\t\t\t\t$this->LoadPage('error');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t// Reset the Id of the RatePlan, because we are creating a new one, not editing an existing one\n\t\t\tDBO()->RatePlan->Id = 0;\n\t\t}\n\t\telseif (DBO()->RatePlan->Id->Value)\n\t\t{\n\t\t\t// We are opening an existing RatePlan for editing\n\t\t\t// Update the Breadcrumb menu\n\t\t\tBreadCrumb()->SetCurrentPage(\"Edit Draft Rate Plan\");\n\n\t\t\t// We want to display an existing RatePlan\n\t\t\tif (!DBO()->RatePlan->Load())\n\t\t\t{\n\t\t\t\t// Could not load the RatePlan\n\t\t\t\tDBO()->Error->Message = \"The RatePlan with id: \". DBO()->RatePlan->Id->value .\" could not be found\";\n\t\t\t\t$this->LoadPage('error');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t// Make sure the Rate Plan is a draft\n\t\t\tif (DBO()->RatePlan->Archived->Value != RATE_STATUS_DRAFT)\n\t\t\t{\n\t\t\t\t// Can't edit the Rate Plan\n\t\t\t\tDBO()->Error->Message = \"The RatePlan with id: \". DBO()->RatePlan->Id->value .\" and Name \\\"\". DBO()->RatePlan->Name->Value .\"\\\" is not a draft and therefore cannot be edited\";\n\t\t\t\t$this->LoadPage('error');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// We want to add a new RatePlan\n\t\t\tDBO()->RatePlan->Id = 0;\n\t\t}\n\n\t\t$this->LoadPage('rate_plan_add');\n\n\t\treturn TRUE;\n\n\t}",
"private function ensure_auditing()\n {\n // ignore if auditing is not enabled\n $setting_manager = bus\\setting_manager::self();\n if( !$setting_manager->get_setting( 'audit_db', 'enabled' ) ) return;\n\n // check the primary key value\n $primary_key_name = static::get_primary_key_name();\n if( is_null( $this->$primary_key_name ) )\n {\n log::warning( 'Cannot ensure auditing for phase with no id.' );\n return;\n }\n \n // check the sid\n if( is_null( $this->sid ) )\n {\n log::warning( 'Cannot ensure auditing for phase with no sid.' );\n return;\n }\n \n $survey_table = $setting_manager->get_setting( 'survey_db', 'prefix' ).'survey_'.$this->sid;\n $audit_table = $setting_manager->get_setting( 'audit_db', 'prefix' ).'survey_'.$this->sid;\n\n // check to see if the audit table already exists\n $count = static::db()->get_one( sprintf(\n ' SELECT COUNT(*)'.\n ' FROM information_schema.TABLES'.\n ' WHERE TABLE_SCHEMA = %s'.\n ' AND TABLE_NAME = %s',\n database::format_string( $setting_manager->get_setting( 'audit_db', 'database' ) ),\n database::format_string( $audit_table ) ) );\n \n if( 0 == $count )\n {\n $audit_db = bus\\session::self()->get_audit_database();\n $survey_db = bus\\session::self()->get_survey_database();\n\n // get the survey table's create syntax\n $row = $survey_db->get_row( 'SHOW CREATE TABLE '.$survey_table );\n $sql = $row['Create Table'];\n\n // add a timestamp\n $insert_pos = strpos( $sql, '`submitdate`' );\n $insert_sql =\n substr( $sql, 0, $insert_pos ).\n '`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP'.\n \" ON UPDATE CURRENT_TIMESTAMP,\\n\".\n substr( $sql, $insert_pos );\n\n // remove the auto increment\n $insert_sql = preg_replace( '/ AUTO_INCREMENT(=[0-9]+)?/', '', $insert_sql );\n\n // remove the primary key\n $insert_sql = str_replace( \",\\nPRIMARY KEY (`id`)\", '', $insert_sql );\n\n // set the table name\n $insert_sql = preg_replace( '/`'.$survey_table.'` \\(\\n/',\n '`'.$audit_table.\"` ( \\n\", $insert_sql );\n\n $audit_db->execute( $insert_sql );\n\n // TODO: need to add the trigger\n }\n }",
"public function testDeletePackingPlan()\n {\n }",
"private function createPlan(){\n if(!$this->request->plan_name || !$this->request->plan_description) {\n return false;\n }\n $this->plan = Planes::create([\n 'name' => $this->request->plan_name,\n 'description' => $this->request->plan_description,\n 'price' => $this->request->price,\n 'product_id' => $this->request->product_id,\n 'balance' => $this->request->balance,\n ]);\n $this->plan = new PlanesFormatter($this->plan);\n }",
"public function testGetPackingPlanByFilter()\n {\n }",
"public function creating(Plan $plan)//troquei o created por creating\n {\n $plan->url = Str::kebab($plan->name);\n }",
"public function add() {\n $dataH['CustomerBankAccount'] = $_lib['sess']->get_companydef('BankAccount');\n $old_pattern = array(\"/[^0-9]/\");\n $new_pattern = array(\"\");\n $dataH['CustomerAccountPlanID'] = strtolower(preg_replace($old_pattern, $new_pattern , $_lib['sess']->get_companydef('OrgNumber')));\n }",
"public function testNewPaidYearlyAccountAddValidRecord()\n {\n $this->insight->accounts->addPaid(12345, new PlanM(), new Yearly());\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(AccountsInterface::PAID, $row['status']);\n $this->assertEquals(PlanM::class, $row['plan']);\n $this->assertEquals(Yearly::class, $row['billing_period']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['created_at']->format('Y-m-d H:i:s'));\n $this->assertEquals(date('Y'), $row['cohort_year']);\n $this->assertEquals(date('m'), $row['cohort_month']);\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(41.583, $row['mrr_value']);\n $this->assertFalse($row['had_trial']);\n }",
"function ciniki_artcatalog_trackingAdd(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'artcatalog_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Artcatalog Item'), \n 'name'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Name'), \n 'external_number'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Number'), \n 'start_date'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'type'=>'date', 'name'=>'Start'), \n 'end_date'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'type'=>'date', 'name'=>'End'), \n 'notes'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Notes'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n\n if( $args['artcatalog_id'] == '0' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.artcatalog.39', 'msg'=>'No artcatalog item specified'));\n }\n\n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'artcatalog', 'private', 'checkAccess');\n $rc = ciniki_artcatalog_checkAccess($ciniki, $args['tnid'], 'ciniki.artcatalog.trackingAdd'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n if( isset($args['name']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'makePermalink');\n $args['permalink'] = ciniki_core_makePermalink($ciniki, $args['name'] . '-' . ($args['start_date']==''?'0000-00-00':$args['start_date']));\n }\n\n //\n // Update tracking\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n return ciniki_core_objectAdd($ciniki, $args['tnid'], 'ciniki.artcatalog.place', $args);\n}",
"public function testGetPackingPlanTags()\n {\n }",
"function insert_audit_trail()\n {\n $parameter_array = $this->get_parameter_array();\n \n parent::insert('siis', $parameter_array);\n }",
"private function _SavePlan()\n\t{\n\t\t/*\n\t\t * Saving process:\n\t\t *\t\tS1: Set up values for properties of the RatePlan object that are not already defined, or not in their database correct format\n\t\t *\t\tS2: Save the record to the RatePlan table\n\t\t *\t\tS3: Remove any records in the RatePlanRateGroup table\n\t\t *\t\tS4: For each RateGroup belonging to this RatePlan:\n\t\t *\t\t\t\tadd a record to the RatePlanRateGroup table\n\t\t *\t\tS5: If the RatePlan is being Committed: (not being saved as a draft)\n\t\t *\t\t\t\tFor each draft RateGroup belonging to this RatePlan:\n\t\t *\t\t\t\t\tupdate the Archived property of the RateGroup in the RateGroup table so that it is now a committed RateGroup, not a draft\n\t\t *\t\t\t\t\tFor each draft Rate belonging to the draft RateGroup:\n\t\t *\t\t\t\t\t\tupdate the Archived property of the Rate in the Rate table so that it is now a committed Rate, not a draft\n\t\t */\n\n\t\t// S1: Set up the remaing fields required of a RatePlan record\n\t\tDBO()->RatePlan->MinMonthly\t= ltrim(DBO()->RatePlan->MinMonthly->Value, \"$\");\n\t\tDBO()->RatePlan->ChargeCap\t= ltrim(DBO()->RatePlan->ChargeCap->Value, \"$\");\n\t\tDBO()->RatePlan->UsageCap\t= ltrim(DBO()->RatePlan->UsageCap->Value, \"$\");\n\n\t\tif (SubmittedForm('AddPlan', 'Save as Draft'))\n\t\t{\n\t\t\t// Flag the plan as being a draft\n\t\t\tDBO()->RatePlan->Archived = RATE_STATUS_DRAFT;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The plan is not being saved as a draft\n\t\t\tDBO()->RatePlan->Archived = RATE_STATUS_ACTIVE;\n\t\t}\n\n\t\tDBO()->RatePlan->modified_employee_id\t= Flex::getUserId();\n\t\tif (!DBO()->RatePlan->Id->Value)\n\t\t{\n\t\t\t// Plan has not been saved before\n\t\t\tDBO()->RatePlan->created_employee_id\t= Flex::getUserId();\n\t\t}\n\n\t\t// If the RatePlan has already been saved as a draft then load in the details that don't get edited here, so they don't get erased\n\t\tif (DBO()->RatePlan->Id->Value)\n\t\t{\n\t\t\tDBO()->RatePlan->LoadMerge();\n\t\t}\n\n\t\t// S2: Save the plan to the database\n\t\tif (!DBO()->RatePlan->Save())\n\t\t{\n\t\t\t// Saving failed\n\t\t\treturn \"ERROR: Saving the RatePlan to the RatePlan database table failed, unexpectedly\";\n\t\t}\n\n\t\t// S3: Remove all records from the RatePlanRateGroup table where RatePlan == DBO()->RatePlan->Id->Value\n\t\t$delRatePlanRateGroup = new Query();\n\t\t$delRatePlanRateGroup->Execute(\"DELETE FROM RatePlanRateGroup WHERE RatePlan = \" . DBO()->RatePlan->Id->Value);\n\n\t\t// S4: Save each of the RateGroups associated with the RatePlan to the RatePlanRateGroup table\n\t\tDBO()->RatePlanRateGroup->RatePlan = DBO()->RatePlan->Id->Value;\n\t\tforeach ($this->_arrRateGroups as $intRateGroup)\n\t\t{\n\t\t\tDBO()->RatePlanRateGroup->Id = 0;\n\t\t\tDBO()->RatePlanRateGroup->RateGroup = $intRateGroup;\n\n\t\t\tif (!DBO()->RatePlanRateGroup->Save())\n\t\t\t{\n\t\t\t\t// Saving failed\n\t\t\t\treturn \"ERROR: Saving one of the RateGroup - RatePlan associations failed, unexpectedly.<br />The RatePlan has not been saved\";\n\t\t\t}\n\t\t}\n\n\t\t// S5: Remove all records from the rate_plan_discount table where RatePlan == DBO()->RatePlan->Id->Value\n\t\t$delRatePlanDiscount\t= new Query();\n\t\t$delRatePlanDiscount->Execute(\"DELETE FROM rate_plan_discount WHERE rate_plan_id = \" . DBO()->RatePlan->Id->Value);\n\n\t\t// S6: Remove any records from the discount table which are no longer linked to any Rate Plans (Discounts cannot be shared between Plans)\n\t\t$delUnlinkedDiscounts\t= new Query();\n\t\t$delUnlinkedDiscounts->Execute(\"DELETE FROM discount WHERE (SELECT id FROM rate_plan_discount WHERE discount_id = discount.id LIMIT 1) IS NULL\");\n\n\t\t// S7: Save each of the Discounts which are linked between this Rate Plan and a Record Type\n\t\t$aDiscountReferenceMap\t= array();\n\t\tforeach (DBL()->RecordType as $dboRecordType)\n\t\t{\n\t\t\t$sRecordTypeObjectName\t\t= \"RecordType_{$dboRecordType->Id->Value}\";\n\t\t\t$iDiscountReference\t= (int)DBO()->{$sRecordTypeObjectName}->discount_id->Value;\n\n\t\t\t// Has the Discount already been created?\n\t\t\tif ($iDiscountReference && $iDiscountReference > 0)\n\t\t\t{\n\t\t\t\tif (!array_key_exists($iDiscountReference, $aDiscountReferenceMap))\n\t\t\t\t{\n\t\t\t\t\t// Create the Discount\n\t\t\t\t\t$sDiscountObjectName\t= \"discount_{$iDiscountReference}\";\n\n\t\t\t\t\t$oDiscount\t\t\t\t\t= new Discount();\n\t\t\t\t\t$oDiscount->name\t\t\t= trim(DBO()->{$sDiscountObjectName}->name->Value);\n\t\t\t\t\t$oDiscount->description\t\t= trim(DBO()->{$sDiscountObjectName}->description->Value);\n\n\t\t\t\t\tif (DBO()->{$sDiscountObjectName}->limit_type->Value === 'UNITS')\n\t\t\t\t\t{\n\t\t\t\t\t\t$oDiscount->charge_limit\t= null;\n\t\t\t\t\t\t$oDiscount->unit_limit\t\t= abs((int)trim(DBO()->{$sDiscountObjectName}->limit->Value));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$oDiscount->charge_limit\t= abs((float)trim(DBO()->{$sDiscountObjectName}->limit->Value));\n\t\t\t\t\t\t$oDiscount->unit_limit\t\t= null;\n\t\t\t\t\t}\n\t\t\t\t\t$oDiscount->charge_limit\t= ($oDiscount->charge_limit) ? $oDiscount->charge_limit : null;\n\t\t\t\t\t$oDiscount->unit_limit\t\t= ($oDiscount->unit_limit) ? $oDiscount->unit_limit : null;\n\n\t\t\t\t\t$oDiscount->save();\n\n\t\t\t\t\t// Create the Discount<->RatePlan Link\n\t\t\t\t\t$oRatePlanDiscount\t\t\t\t\t= new Rate_Plan_Discount();\n\t\t\t\t\t$oRatePlanDiscount->rate_plan_id\t= DBO()->RatePlan->Id->Value;\n\t\t\t\t\t$oRatePlanDiscount->discount_id\t\t= $oDiscount->id;\n\t\t\t\t\t$oRatePlanDiscount->save();\n\n\t\t\t\t\t$aDiscountReferenceMap[$iDiscountReference]\t= $oDiscount->id;\n\t\t\t\t}\n\n\t\t\t\t// Save Link\n\t\t\t\t$oDiscountRecordType\t\t\t\t\t= new Discount_Record_Type();\n\t\t\t\t$oDiscountRecordType->discount_id\t\t= $aDiscountReferenceMap[$iDiscountReference];\n\t\t\t\t$oDiscountRecordType->record_type_id\t= $dboRecordType->Id->Value;\n\t\t\t\t$oDiscountRecordType->save();\n\t\t\t}\n\t\t}\n\n\t\t// S8: If the RatePlan is being committed then all draft RateGroups used by it must be commited and all draft Rates\n\t\t// used by the draft RateGroups must be committed\n\t\tif ((SubmittedForm('AddPlan', 'Commit')) && (count($this->_arrRateGroups) > 0))\n\t\t{\n\t\t\t$strRateGroups \t= implode(',', $this->_arrRateGroups);\n\t\t\t$arrUpdate\t\t= Array(\"Archived\" => RATE_STATUS_ACTIVE);\n\t\t\t$updRateGroups \t= new StatementUpdate(\"RateGroup\", \"Archived = \". RATE_STATUS_DRAFT .\" AND Id IN ($strRateGroups)\", $arrUpdate);\n\t\t\t$updRates \t\t= new StatementUpdate(\"Rate\", \"Archived = \". RATE_STATUS_DRAFT .\" AND Id IN (SELECT Rate FROM RateGroupRate WHERE RateGroup IN ($strRateGroups))\", $arrUpdate);\n\n\t\t\tif ($updRateGroups->Execute($arrUpdate, NULL) === FALSE)\n\t\t\t{\n\t\t\t\treturn \"ERROR: Commiting one of the Draft Rate Groups, used by this Rate Plan, failed.<br />The RatePlan has not been saved\";\n\t\t\t}\n\n\t\t\tif ($updRates->Execute($arrUpdate, NULL) === FALSE)\n\t\t\t{\n\t\t\t\treturn \"ERROR: Commiting one of the Draft Rates, used by this Rate Plan, failed.<br />The RatePlan has not been saved\";\n\t\t\t}\n\t\t}\n\n\t\t// Everything has been saved\n\t\treturn TRUE;\n\t}",
"function testSapAdd()\n {\n $user = User::whereId(1)->first();\n\n $this->actingAs($user)\n ->post('/saps/add', [\n '_token' => csrf_token(),\n 'notes' => 'lead booked',\n 'lead_id' => 1,\n 'appointment_at' => date('Y-m-d H:i:s')\n ])->assertJson(['data' => ['lead_id' => 1]]);\n\n }",
"public function addAssertions($assertions) {\n $total = $this->getAssertions() + $assertions;\n $this->setAssertions($total);\n }",
"public function created(Deployment $deployment)\n {\n }",
"public function created(Installment $installment)\n {\n\n }",
"function WriteAuditTrailOnAdd(&$rs) {\n\t\tglobal $mst_vendor;\n\t\t$table = 'mst_vendor';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\") $key .= EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$key .= $rs['kode'];\n\n\t\t// Write Audit Trail\n\t\t$filePfx = \"log\";\n\t\t$curDate = date(\"Y/m/d\");\n\t\t$curTime = date(\"H:i:s\");\n\t\t$id = ew_ScriptName();\n\t $curUser = CurrentUserName();\n\t\t$action = \"A\";\n\t\t$oldvalue = \"\";\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif ($mst_vendor->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore Blob Field\n\t\t\t\t$newvalue = ($mst_vendor->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) ? \"<MEMO>\" : $rs[$fldname]; // Memo Field\n\t\t\t\tew_WriteAuditTrail($filePfx, $curDate, $curTime, $id, $curUser, $action, $table, $fldname, $key, $oldvalue, $newvalue);\n\t\t\t}\n\t\t}\n\t}",
"public function addAccount($firstName, $lastName, $planId, $effectiveDate) {\n try {\n // start the transaction\n $this->pdo->beginTransaction();\n \n // insert an account and get the ID back\n $accountId = $this->insertAccount($firstName, $lastName);\n \n // add plan for the account\n $this->insertPlan($accountId, $planId, $effectiveDate);\n \n // commit the changes\n $this->pdo->commit();\n } catch (\\PDOException $e) {\n // rollback the changes\n $this->pdo->rollBack();\n throw $e;\n }\n }",
"public function NEG_it_checks_create_audits() {\n\n $type = 'Bob';\n\n $taskType = new TaskType();\n $taskType->setType($type);\n $taskType->setDescription('was here');\n $taskType->created_at = Carbon::now();\n $taskType->updated_at = Carbon::now();\n $taskType->client_id = 1;\n\n $result = $taskType->checkTaskTypeCreateAudits($taskType);\n\n $this->assertEquals($result, 0);\n }",
"public function test_addExternalShipmentTag() {\n\n }",
"public function testNewPaidSetsConversionToCreationTimestampWhenOmitted()\n {\n $this->insight->accounts->addPaid(12345, new PlanM(), new Yearly());\n $this->insight->accounts->addPaid(12346, new PlanM(), new Yearly(), new DateTimeValue('2015-12-05'));\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['converted_to_paid_at']->format('Y-m-d H:i:s'));\n $this->assertEquals($row['created_at'], $row['converted_to_paid_at']);\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12346);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12346, $row['id']);\n $this->assertEquals('2015-12-05 00:00:00', $row['converted_to_paid_at']->format('Y-m-d H:i:s'));\n $this->assertEquals($row['created_at'], $row['converted_to_paid_at']);\n }",
"public function add_individual_plan($individual_id) \n\t{\n\t\t$data = array(\n\t\t\t'individual_id'=>$individual_id,\n\t\t\t'savings_plan_id'=>$this->input->post('savings_plan_id'),\n\t\t\t'individual_savings_status'=>$this->input->post('individual_savings_status'),\n\t\t\t'individual_savings_opening_balance'=>$this->input->post('individual_savings_opening_balance'),\n\t\t\t'start_date'=>$this->input->post('start_date'),\n\t\t\t'created'=>date('Y-m-d H:i:s'),\n\t\t\t'created_by'=>$this->session->userdata('personnel_id'),\n\t\t\t'modified_by'=>$this->session->userdata('personnel_id')\n\t\t);\n\t\t\n\t\tif($this->db->insert('individual_savings', $data))\n\t\t{\n\t\t\treturn $this->db->insert_id();\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function test_addExternalShipment() {\n\n }",
"public function actionCreate(SynchEntityInterface $bill)\n {\n\t\ttry {\n\t\t\t$IPPBIll = new IPPBill();\n $this->map($IPPBIll, $bill);\n $IPPBIll = $this->add($IPPBIll);\n $this->linkEntity($bill, $IPPBIll);\n Event::fire('JobProgress.Events.AttachmentCreated', new AttachmentCreated(['vendor_bill_id' => $bill->id]));\n\n\t \t} catch (Exception $e) {\n QuickBooks::quickBookExceptionThrow($e);\n\t\t}\n }",
"protected function expectAddEvent()\n {\n $this->eventPublisher->expects($this->once())\n ->method('addEvent')\n ->with(['uuid' => '123']);\n }",
"public function testDeletePackingPlanTag()\n {\n }",
"public function create($planData)\n {\n \t$planPurchase \t\t\t\t = new PlanPurchase();\n\t\t$planPurchase->user_id \t\t = $this->user->id;\n\t\t$planPurchase->plan_id \t\t = $planData->plan_id;\n\t\t$planPurchase->country_code = $planData->country_code;\n\t\t$planPurchase->gold_price = (float)$this->plan->gold_price;\n\t\t$planPurchase->transaction_id = $planData->transaction_id;\n\t\t$planPurchase->save();\n\n \t/** Add Chest Capacity value in user's table **/\n \t(new ChestService)->setUser($this->user)->expand($this->plan->bucket);\n \t\n /** Deduct User Gold **/\n $goldBalance = (new UserRepository($this->user))->deductGold($this->plan->gold_price);\n\n \t/** return the available skeleton keys **/\n \treturn ['chest_bucket'=> $this->user->buckets['chests'], 'available_gold_balance'=> $goldBalance];\n }",
"public function test_addOrderLineActivity() {\n\n }",
"public function savePlan($plan)\n {\n return Stripe\\Plan::create(array(\n \"amount\" => $plan->price,\n \"interval\" => $plan->interval,\n \"name\" => $plan->name,\n \"currency\" => \"usd\",\n 'id' => $plan->level\n ));\n }",
"public function created(Lab $lab)\n {\n $lab->postLog();\n }",
"public function testApplyOrderWarehouseFulfillmentPlan()\n {\n }",
"public function create_plan() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n # Set up query\n $q = \"INSERT INTO plans SET\n\t\t\t description='\".$_POST['description'].\"', time='\".$_POST['time'].\"', public='\".(!empty($_POST['public'])?1:0).\"',\n\t\t\t modified_date='\".Time::now().\"', modified_by='\".$this->user->user_id.\"'\";\n $plans = DB::instance(DB_NAME)->query($q);\n\n # Set up query\n $q = \"SELECT\n\t\t\t p.plan_id, p.description,p.time,p.public, c.first_name, c.last_name, p.modified_date, p.show\n\t\t\t FROM plans AS p inner join\n\t\t\t users as u on p.modified_by=u.user_id\n \t\t inner JOIN contacts AS c ON u.user_id=c.user_id\n\t\t\t and c.modified_date = (select max(modified_date) from\n\t\t\t contacts as c where c.user_id=p.modified_by) and p.plan_id = LAST_INSERT_ID()\n \";\n\n # Run query\n $result = DB::instance(DB_NAME)->select_row($q);\n $result[\"posted_on\"] = Time::display($result['modified_date'],'Y-m-d H:m:s');\n\n #Adding action to System Log\n $data3 = Array (\n\n \"modified_date\" => Time::now(),\n \"FK_id\" => $result[\"plan_id\"],\n \"FK_table\" => 'plans',\n \"login\" => false,\n \"modified_by\" => $this->user->user_id\n );\n DB::instance(DB_NAME)->insert('logs',$data3);\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n $jTableResult['Record'] = $result;\n print json_encode($jTableResult);\n }",
"public function testApproveFinalReport()\n {\n $mockLogger = $this->createMock(Logger::class); //create mock Logger object\n $database = new DatabaseHelper($mockLogger, $this->pdo); //initialize database helper object\n\n $approvedAppID = 1;\n $pendingAppID = 3;\n $deniedAppID = 4;\n $newAppID = 6;\n\n $database->approveFinalReport($approvedAppID, null);\n $this->assertEquals(\"Approved\", $database->getFinalReport($approvedAppID)->status);\n\n $database->approveFinalReport($deniedAppID, null);\n $this->assertEquals(\"Approved\", $database->getFinalReport($deniedAppID)->status);\n\n $database->approveFinalReport($pendingAppID, null);\n $this->assertEquals(\"Approved\", $database->getFinalReport($pendingAppID)->status);\n\n $database->approveFinalReport($newAppID, null);\n $this->assertEquals(0, $database->getApplication($newAppID)); //shouldn't exist\n $this->assertEquals(0, $database->getFinalReport($newAppID));\n }",
"public function testNewTrialAccountAddValidRecord()\n {\n $this->assertEquals(0, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n $this->insight->accounts->addTrial(12345);\n $this->assertEquals(1, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(AccountsInterface::TRIAL, $row['status']);\n $this->assertNull($row['plan']);\n $this->assertNull($row['billing_period']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['created_at']);\n $this->assertEquals(date('Y'), $row['cohort_year']);\n $this->assertEquals(date('m'), $row['cohort_month']);\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(0, $row['mrr_value']);\n $this->assertTrue($row['had_trial']);\n }",
"public function testAddNewEntry()\n {\n $actual = $this->diaryService->addNewEntry($this->entryData);\n $entry = Entry::latest('created_at')->first();\n $expected = [\n 'message' => 'Entry added successfully!',\n 'statusCode' => 201,\n 'data' => null\n ];\n $this->assertEquals($expected, $actual);\n $this->assertDatabaseHas('entries', $entry->toArray());\n }",
"public function addEntry(\\Yana\\Db\\Ddl\\Logs\\AbstractLog $log)\n {\n array_unshift($this->changes, $log);\n }",
"public function store(StoreStripePlanRequest $request)\n {\n Log::debug(\"STORE PLAN\");\n\n $amount = $request->amount . '00';\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->createPlan($amount, $request->name, $request->product, $request->interval);\n\n if ($result['message'] == 'Success'){\n\n session()->flash('success', 'Plan created successfully.');\n \n return redirect( route ('plans.index') );\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n \n return redirect()->back();\n\n }\n\n }",
"public function testInsertFinalReport()\n {\n $mockLogger = $this->createMock(Logger::class); //create mock Logger object\n $database = new DatabaseHelper($mockLogger, $this->pdo); //initialize database helper object\n\n $newReportID = 5; //application 5 shouldn't have a report yet\n\n //new, acceptable variables\n $validTravelFrom = date('Y-m-d h:i:s', mktime(0, 0, 0, 7, 1, 2018));\n $validTravelTo = date('Y-m-d h:i:s', mktime(0, 0, 0, 7, 25, 2018));\n $validActivityFrom = date('Y-m-d h:i:s', mktime(0, 0, 0, 7, 10, 2018));\n $validActivityTo = date('Y-m-d h:i:s', mktime(0, 0, 0, 7, 15, 2018));\n $validProjectSummary = \"Lorem Ipsum\";\n $validTotalAwardSpent = 300;\n\n $this->assertEquals(false, $database->hasFinalReport($newReportID)); //shouldn't have a report yet\n\n /*for inserting new reports*/\n\n //pass in empty values for all fields\n $testReturn = $database->insertFinalReport(false, $newReportID, \"\", \"\", \"\", \"\", \"\", \"\", null);\n $this->assertEquals(false, $testReturn['success']);//insert should have failed\n $this->assertEquals(false, $database->hasFinalReport($newReportID)); //shouldn't have a report yet\n\n //every field should have an error regarding missing data\n $this->assertArrayHasKey('travelFrom', $testReturn['errors']);\n $this->assertArrayHasKey('travelTo', $testReturn['errors']);\n $this->assertArrayHasKey('activityFrom', $testReturn['errors']);\n $this->assertArrayHasKey('activityTo', $testReturn['errors']);\n $this->assertArrayHasKey('projectSummary', $testReturn['errors']);\n $this->assertArrayHasKey('amountAwardedSpent', $testReturn['errors']);\n\n\n //pass in an invalid travel date\n $testReturn = $database->insertFinalReport(false, $newReportID, $validTravelFrom, $validTravelTo, date('Y-m-d h:i:s', mktime(0, 0, 0, 6, 1, 2018)), $validActivityTo, $validProjectSummary, $validTotalAwardSpent, null);\n $this->assertEquals(false, $testReturn['success']);//insert should have failed\n $this->assertEquals(false, $database->hasFinalReport($newReportID)); //shouldn't have a report yet\n\n //just check for invalid travel date\n $this->assertArrayHasKey('travelFrom', $testReturn['errors']);\n\n\n //insert an acceptable new final report\n $testReturn = $database->insertFinalReport(false, $newReportID, $validTravelFrom, $validTravelTo, $validActivityFrom, $validActivityTo, $validProjectSummary, $validTotalAwardSpent, null);\n $this->assertEquals(true, $testReturn['success']);//insert should have succeeded\n $this->assertEquals(true, $database->hasFinalReport($newReportID)); //should now have a report\n\n\n\n\n\n /*for updating reports*/\n\n //pass in empty values for all fields\n $testReturn = $database->insertFinalReport(true, $newReportID, \"\", \"\", \"\", \"\", \"\", \"\", null);\n $this->assertEquals(false, $testReturn['success']);//insert should have failed\n\n //every field should have an error regarding missing data\n $this->assertArrayHasKey('travelFrom', $testReturn['errors']);\n $this->assertArrayHasKey('travelTo', $testReturn['errors']);\n $this->assertArrayHasKey('activityFrom', $testReturn['errors']);\n $this->assertArrayHasKey('activityTo', $testReturn['errors']);\n $this->assertArrayHasKey('projectSummary', $testReturn['errors']);\n $this->assertArrayHasKey('amountAwardedSpent', $testReturn['errors']);\n\n\n //pass in an invalid travel date\n $testReturn = $database->insertFinalReport(true, $newReportID, $validTravelFrom, $validTravelTo, date('Y-m-d h:i:s', mktime(0, 0, 0, 6, 1, 2018)), $validActivityTo, $validProjectSummary, $validTotalAwardSpent, null);\n $this->assertEquals(false, $testReturn['success']);//insert should have failed\n\n //just check for invalid travel date\n $this->assertArrayHasKey('travelFrom', $testReturn['errors']);\n\n\n //insert an acceptable new final report\n $testReturn = $database->insertFinalReport(true, $newReportID, $validTravelFrom, $validTravelTo, $validActivityFrom, $validActivityTo, $validProjectSummary, $validTotalAwardSpent, null);\n $this->assertEquals(true, $testReturn['success']);//insert should have succeeded\n }",
"public function add($Attachment, $event_id) {\r\n\r\n\t\t$attachment_id = $this->getCurrentId() + 1;\r\n\t\t\t\r\n\t\t\r\n\t\t$file_name = $Attachment->getFileName();\r\n\t\t$file_type = $Attachment->getFileType();\r\n\t\t$file_size = $Attachment->getFileSize();\r\n\t\t\t\t\r\n\t\t$date_added = $Attachment->getDateAdded();\r\n\t\t\r\n\t\t$file_desc = $Attachment->getDesc();\r\n\t\t$file_approved = $Attachment->isApproved();\r\n\t\t\r\n\t\t\r\n\t\t\t\t\r\n\t\t$query = \"INSERT INTO $this->att VALUES ($attachment_id, $event_id, '$file_name', '$file_type', '$file_size', $date_added, '$file_desc', $file_approved)\";\r\n\t\t\t\t\r\n\t\t$this->execute($query);\r\n\t\r\n\t\t\t\t\r\n\t}",
"public function __construct(Audit $audit, Lead $lead) {\n parent::__construct();\n $this->audit = $audit;\n $this->lead = $lead;\n $this->subject('Website Audit Report for ' . get_domain($this->lead->url));\n }",
"public function testActCreate()\n {\n $this->browse(function (Browser $browser) {\n $bill = Bill::factory()->create([\n 'contract_id' => $this->contract->id,\n 'requisite_id' => $this->requisite->id,\n 'tenant_id' => $this->tenant->id,\n ]);\n $service = $bill->services()->save(Service::factory()->make([\n 'name' => 'Rent',\n 'quantity' => '2',\n 'measure' => 'pc',\n 'price' => '1234'\n ]));\n\n $browser->loginAs($this->user)\n ->visit('/tenants/'.$this->tenant->id.'?tab=bills#tab')\n ->press('Создать')\n ->clickLink('Загрузить')\n ->assertPathIs($bill->act->document_url)\n ->assertSee('Акт');\n });\n }",
"public function update_plan() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n # Set up query\n $q = \"UPDATE plans SET\n\t\t\t description='\".$_POST['description'].\"', time='\".$_POST['time'].\"', public='\".(!empty($_POST['public'])?1:0).\"'\n\t\t\t WHERE plan_id=\".$_POST['plan_id'];\n $plans = DB::instance(DB_NAME)->query($q);\n\t\t\n\t\t#Adding action to System Log\n $data3 = Array (\n\n \"modified_date\" => Time::now(),\n \"FK_id\" => $_POST['plan_id'],\n \"FK_table\" => 'plans',\n \"login\" => false,\n \"modified_by\" => $this->user->user_id\n );\n DB::instance(DB_NAME)->insert('logs',$data3);\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n print json_encode($jTableResult);\n }",
"public function testNewFreeAccountAddValidRecord()\n {\n $this->assertEquals(0, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n $this->insight->accounts->addFree(12345, new FreePlan());\n $this->assertEquals(1, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(AccountsInterface::FREE, $row['status']);\n $this->assertEquals(FreePlan::class, $row['plan']);\n $this->assertNull($row['billing_period']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['created_at']);\n $this->assertEquals(date('Y'), $row['cohort_year']);\n $this->assertEquals(date('m'), $row['cohort_month']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['converted_to_free_at']->format('Y-m-d H:i:s'));\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(0, $row['mrr_value']);\n $this->assertFalse($row['had_trial']);\n }",
"public function add_to_plan(Request $request, $id)\n {\n $rules = [\n 'plan_id' => 'required|numeric',\n ];\n $attrs = [\n 'plan_id' => '出团计划id',\n ];\n $this->validate($request, $rules, [], $attrs);\n\n $obj = SaleOrder::find($id);\n $obj->fill($request->all());\n $obj->save();\n return redirect('/sale_order');\n \n }",
"function WriteAuditTrailDummy($typ) {\n\t\t$table = 'scholarship_package';\n\t $usr = CurrentUserID();\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\n\t}",
"function eventclass_program_billing()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\n//\tonscreen events\n\n\n\t}",
"public function testCreatePayrollCalendar()\n {\n }",
"protected function addAssertions(array $assertions, $event)\n {\n if (empty($assertions)) {\n return;\n }\n\n $assertionsCache = array();\n $serviceManager = $event->getApplication()->getServiceManager();\n $assertResource = $this->getResource($assertions['resource']);\n $assertResource->setData($serviceManager->get('AssertResourceDataFactory')->makeData($event));\n\n foreach ($assertions['assertions'] as $role => $assertionsList) {\n $compositeAssertion = $serviceManager->get('CompositeAssertion');\n\n foreach ($assertionsList as $assertionName) {\n if (!isset($assertionsCache[$assertionName])) {\n $assertionsCache[$assertionName] = $serviceManager->get($assertionName);\n }\n\n $compositeAssertion->push($assertionsCache[$assertionName]);\n }\n\n $this->allow($role, $assertResource, null, $compositeAssertion);\n }\n }",
"public function testNewFreeCreationTimestampCanBeSpecified()\n {\n $in_two_weeks = new DateTimeValue('+14 days');\n\n $this->insight->accounts->addFree(12345, new FreePlan(), $in_two_weeks);\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals($in_two_weeks->format('Y-m-d H:i:s'), $row['converted_to_free_at']->format('Y-m-d H:i:s'));\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n $auditor = User::role('auditor')->pluck('id');\n $auditor_lead = User::role('auditor_lead')->pluck('id');\n $klausuls = Klausul::all();\n\n for ($i=0; $i < 20; $i++) {\n $auditplan = AuditPlan::create([\n 'departemen_id' => Departemen::all()->random()->id,\n 'approval_kadept' => $faker->numberBetween(0, 1),\n 'tanggal' => $faker->dateTimeBetween('+1 week', '+1 month')->format('Y-m-d'),\n 'waktu' => $faker->time('H:i:s','now'),\n 'auditee_user_id' => User::all()->random()->id,\n 'auditor_user_id' => $auditor ? $faker->randomElement($auditor) : $faker->randomElement($auditor),\n 'auditor_lead_user_id' => $faker->randomElement($auditor_lead),\n ]);\n\n $auditplan->klausuls()->attach(\n $klausuls->random(rand(1, 4))->pluck('id')->toArray()\n );\n\n if (($i % 2) == 0) {\n if (!$auditplan->approval_kadept) {\n $ubahJadwal = new UbahJadwalAudit([\n 'tanggal' => Carbon::createFromFormat('m-d-Y', $auditplan->tanggal)->addDays(rand(1, 7)),\n 'waktu' => $faker->time('H:i:s','now'),\n 'catatan' => $faker->realText(200, 2),\n ]);\n\n $auditplan->UbahJadwalAudit()->save($ubahJadwal);\n }\n }\n }\n\n }",
"public function actionSetup($plan)\n {\n // Redirect back to billing page if already has a plan active\n $isBillingActive = Yii::$app->user->identity->getBillingDaysLeft();\n if($isBillingActive){\n return $this->redirect(['billing/index']);\n }\n\n // Find the Pricing Option the user wants to setup\n $pricing = \\common\\models\\Pricing::findOne($plan);\n if(!$pricing){\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n\n // Check if is trial\n $isTrial = Yii::$app->user->identity->agent_trial_days > 0? true: false;\n\n // If user is attempting to setup a package which is for less than\n // the number of accounts he has attached, show error and redirect to billing\n $currentAccountCount = count(Yii::$app->ownedAccountManager->ownedAccounts);\n $planLimit = $pricing->pricing_account_quantity;\n if($planLimit < $currentAccountCount){\n Yii::$app->getSession()\n ->setFlash('warning', \"[Selected plan only allows $planLimit accounts. You have $currentAccountCount you administer. ] You may remove an account by clicking the <b>Remove</b> button on its right sidebar.\");\n\n return $this->redirect(['billing/index']);\n }\n\n // Calculate Discount if Available\n $discount = 0;\n if($isTrial){\n // Give 30% discount for trial users\n $discount = ($pricing->pricing_price - round($pricing->pricing_price * 0.7)) * -1;\n }\n\n // Setup new billing model\n $billingModel = new Billing();\n $billingModel->agent_id = Yii::$app->user->identity->agent_id;\n $billingModel->pricing_id = $pricing->pricing_id;\n $billingModel->billing_total = $pricing->pricing_price + $discount; // Store initial billed amount\n $billingModel->billing_email = Yii::$app->user->identity->agent_email;\n $billingModel->billing_name = Yii::$app->user->identity->agent_name;\n $billingModel->billing_currency = \"USD\";\n\n // Handle AJAX Validation\n if (Yii::$app->request->isAjax && $billingModel->load(Yii::$app->request->post())) {\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n return \\yii\\widgets\\ActiveForm::validate($billingModel);\n }\n\n if($billingModel->load(Yii::$app->request->post())){\n // Token returned from 2CO after creditcard input\n $billingModel->twoco_token = Yii::$app->request->post('token');\n\n // If Token exists and record of bill is saved\n if($billingModel->twoco_token && $billingModel->save()){\n $token = Yii::$app->request->post('token');\n\n // Your sellerId(account number) and privateKey are required to make the Payment API Authorization call.\n Twocheckout::privateKey(Yii::$app->params['2co.privateKey']);\n Twocheckout::sellerId(Yii::$app->params['2co.sellerId']);\n // Your username and password are required to make any Admin API call.\n Twocheckout::username(Yii::$app->params['2co.username']);\n Twocheckout::password(Yii::$app->params['2co.password']);\n // If you want to turn off SSL verification (Please don't do this in your production environment)\n Twocheckout::verifySSL(Yii::$app->params['2co.verifySSL']); // this is set to true by default\n // To use your sandbox account set sandbox to true\n Twocheckout::sandbox(Yii::$app->params['2co.isSandbox']);\n\n\n // Use the token to create a sale\n try {\n $charge = Twocheckout_Charge::auth([\n \"merchantOrderId\" => $billingModel->billing_id,\n \"token\" => $token,\n \"currency\" => $billingModel->billing_currency,\n \"billingAddr\" => [\n // Card holder’s name. (128 characters max)\n \"name\" => $billingModel->billing_name,\n // Card holder’s street address. (64 characters max) Required\n \"addrLine1\" => $billingModel->billing_address_line1,\n // Card holder’s street address line 2. (64 characters max)\n // Required if “country” value is: CHN, JPN, RUS - Optional for all other “country” values.\n \"addrLine2\" => $billingModel->billing_address_line1? $billingModel->billing_address_line1:\"\",\n // Card holder’s city. (64 characters max) Required\n \"city\" => $billingModel->billing_city,\n /**\n * Card holder’s state. (64 characters max) Required if “country” value is ARG, AUS, BGR, CAN, CHN, CYP,\n * EGY, FRA, IND, IDN, ITA, JPN, MYS, MEX, NLD, PAN, PHL, POL, ROU, RUS, SRB, SGP, ZAF, ESP, SWE, THA, TUR,\n * GBR, USA - Optional for all other “country” values.\n */\n \"state\" => $billingModel->billing_state? $billingModel->billing_state:\"\",\n /**\n * Card holder’s zip. (16 characters max) Required if “country” value is ARG, AUS, BGR, CAN, CHN, CYP, EGY, FRA,\n * IND, IDN, ITA, JPN, MYS, MEX, NLD, PAN, PHL, POL, ROU, RUS, SRB, SGP, ZAF, ESP, SWE, THA, TUR, GBR,\n * USA - Optional for all other “country” values.\n */\n \"zipCode\" => $billingModel->billing_zip_code? $billingModel->billing_zip_code:\"\",\n // Card holder’s country. (64 characters max) Required\n \"country\" => $billingModel->country->country_iso_code_3,\n // Card holder’s email. (64 characters max) Required\n \"email\" => $billingModel->billing_email,\n // Card holder’s phone. (16 characters max) Optional\n // \"phoneNumber\" => '555-555-5555'\n ],\n \"lineItems\" => [\n [\n \"type\" => \"product\",\n \"name\" => \"Plugn \".$pricing->pricing_title.\" Plan\",\n \"price\" => $pricing->pricing_price,\n \"tangible\" => \"N\",\n \"productId\" => $pricing->pricing_id,\n \"recurrence\" => \"1 Month\",\n \"duration\" => \"Forever\",\n \"startupFee\" => $discount?$discount:\"\"\n ]\n ]\n ]);\n\n $billingModel->processTwoCheckoutSuccess($charge);\n return $this->redirect(['billing/index']);\n } catch (Twocheckout_Error $e) {\n $billingModel->processTwoCheckoutError($e);\n }\n }\n }\n\n // List of Zip / State Required Countries\n $zipStateCountries = \\common\\models\\Country::find()->select('country_id')\n ->where(['country_zipstate_required' => 1])->asArray()->all();\n\n // List of Addr Line 2 required countries\n $addrCountries = \\common\\models\\Country::find()->select('country_id')\n ->where(['country_addrline2_required' => 1])->asArray()->all();\n\n\n return $this->render('setup', [\n // Form\n 'model' => $billingModel,\n 'zipStateCountries' => json_encode($zipStateCountries),\n 'addrCountries' => json_encode($addrCountries),\n\n // Pricing\n 'pricing' => $pricing,\n 'isTrial' => $isTrial,\n\n // 2 CO\n 'processFormUrl' => Url::to(['billing/process']),\n 'environment' => Yii::$app->params['2co.environment'],\n 'sellerId' => Yii::$app->params['2co.sellerId'],\n 'publishableKey' => Yii::$app->params['2co.publishableKey'],\n ]);\n }",
"public function test_addOrderLineActivityTag() {\n\n }",
"function addToAuditLog($jsonArray, $oldinfo, $id, $type ){\n\t\t\t\n\t\t\t$array = array(); \n\n\t\t\tforeach ($jsonArray as $key => $value) {\n\n\t\t\t\t\t$k = $key;\n\t\t\t\t\tif ($k == 'Reference') {continue; } //skip the reference\n\t\t\t\t\tif ($k == 'Comments') {continue; } //skip the reference\n\t\t\t\t\tif ($k == 'Name'){ $k = 'FullName'; } //cuz Name is stored as FullName in db\n\n\t\t\t\t\t//compare the json assoc array value and the old db value\n\t\t\t\t\tif ($oldinfo[0][$k] != $value){\n\t\t\t\t\t\t$delta = new DELTA();\n\n\t\t\t\t\t\t$delta->FieldName = $k;\n\t\t\t\t\t\t$delta->OldValue = $oldinfo[0][$k];\n\t\t\t\t\t\t$delta->NewValue = $value;\n\n\t\t\t\t\t\tarray_push($array, $delta);\n\n\t\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif (count($array) > 0 ){\n\t\t\t\t//create the database object\n\t\t\t\t$database = createDb();\n\n\t\t\t\t$database->insert(\"AuditLog\", [\n\t\t\t\t\t\"ChangeText\" => json_encode($array),\n\t\t\t\t\t\"Type\"\t\t\t=>\t$type,\n\t\t\t\t\t\"Id\"\t\t\t=>\t$id\n\t\t\t\t]);\n\t\t\t}\n\n\t}",
"public function testCollectionTicketsAdd()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function existingPackageHandler(&$plan_info)\n {\n if ($this->planType == 'account') {\n return;\n }\n\n if ((!$plan_info['Package_ID'] && $plan_info['Price'] <= 0)\n || ($plan_info['Package_ID']\n && ($plan_info['Listings_remains'] > 0\n || $plan_info['Listing_number'] == 0)\n )\n ) {\n $this->skipCheckout = true;\n unset($this->steps['checkout']);\n } else {\n $this->skipCheckout = false;\n }\n }",
"public function testCompanyManagementBackupsPost()\n {\n\n }",
"public function testInboundDocumentAddAttachment()\n {\n }",
"private function audit($operation, $details) {\r\n $columns = array(\r\n \"#timestamp\" => \"STR_TO_DATE('\" . date('d/m/Y H:i:s') . \"','%d/%m/%Y %H:%i:%s')\",\r\n \"username\" => $_SESSION['_ebb_username'],\r\n \"operation\" => $operation,\r\n \"details\" => $details\r\n );\r\n\r\n $this->database->insert(\"tb_audit\", $columns);\r\n }",
"public function createAuditLog($request)\n {\n return $this->start()->uri(\"/api/system/audit-log\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }",
"public function store(AuditTypeRequest $request)\n\t{\n\t\t$auditType = new AuditType;\n $auditType->name = $request->name;\n $auditType->description = $request->description;\n $auditType->user_id = Auth::user()->id;\n\t}",
"public function testHoldFinalReport()\n {\n $mockLogger = $this->createMock(Logger::class); //create mock Logger object\n $database = new DatabaseHelper($mockLogger, $this->pdo); //initialize database helper object\n\n $approvedAppID = 1;\n $pendingAppID = 3;\n $deniedAppID = 4;\n $newAppID = 6;\n\n $database->holdFinalReport($approvedAppID, null);\n $this->assertEquals(\"Hold\", $database->getFinalReport($approvedAppID)->status);\n\n $database->holdFinalReport($deniedAppID, null);\n $this->assertEquals(\"Hold\", $database->getFinalReport($deniedAppID)->status);\n\n $database->holdFinalReport($pendingAppID, null);\n $this->assertEquals(\"Hold\", $database->getFinalReport($pendingAppID)->status);\n\n $database->holdFinalReport($newAppID, null);\n $this->assertEquals(0, $database->getApplication($newAppID)); //shouldn't exist\n $this->assertEquals(0, $database->getFinalReport($newAppID));\n }",
"public function addEvent($ev){\n if(date('m',$ev->timestamp)==$this->monthNum){\n if(date('Y',$ev->timestamp)==$this->yearNum){\n $d = date('j',$ev->timestamp);\n $this->days[$d-1]->addEvent($ev);\n }\n }\n }",
"public function run()\n {\n $group = Group::factory()\n ->count(1)\n ->create();\n \n Plan::first()->groups()->attach($group->first()->id);\n }",
"public function testApprove()\n {\n $json = <<<JSON\n{\n \"order_id\": \"45aa52f387871e3a210645d4\",\n \"fraud_status\": \"REJECTED\"\n}\nJSON;\n\n $this->mock->append(\n new Response(\n 200,\n ['Content-Type' => 'application/json'],\n $json\n )\n );\n\n $order = new Orders($this->connector, 'auth-token-123456');\n $data = $order->approve([\n 'data' => 'sent in'\n ]);\n\n $this->assertEquals('45aa52f387871e3a210645d4', $data['order_id']);\n $this->assertEquals('REJECTED', $data['fraud_status']);\n\n $request = $this->mock->getLastRequest();\n $this->assertEquals(Method::POST, $request->getMethod());\n $this->assertEquals(\n '/instantshopping/v1/authorizations/auth-token-123456/orders',\n $request->getUri()->getPath()\n );\n $this->assertEquals('{\"data\":\"sent in\"}', strval($request->getBody()));\n\n $this->assertAuthorization($request);\n }",
"function TestPlan_add_tag($plan_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.add_tag', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($tag_name, \"string\")), \"array\");\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function addTestAssert($name, $arguments = null, $passed = true, $trace = null)\n\t{\n\t\t$this->testAsserts[] = [\n\t\t\t'name' => $name,\n\t\t\t'arguments' => (new Serializer)->normalize($arguments),\n\t\t\t'trace' => $trace,\n\t\t\t'passed' => $passed\n\t\t];\n\t}",
"public function testJobAdd()\n {\n\n }",
"public function setAuditTypeId($auditTypeId): void\n\t{\n\t\t$this->auditTypeId = $auditTypeId;\n\t}",
"public function create($plan, array $properties = array());"
] | [
"0.60553193",
"0.5969876",
"0.5941007",
"0.58760846",
"0.57419807",
"0.5704287",
"0.56345534",
"0.56341517",
"0.5615037",
"0.5517533",
"0.5516703",
"0.54870427",
"0.546986",
"0.5468823",
"0.537823",
"0.53143084",
"0.5251664",
"0.5245915",
"0.5208634",
"0.51976657",
"0.5169436",
"0.51458794",
"0.51247054",
"0.5069311",
"0.5065722",
"0.49830142",
"0.49595138",
"0.48859757",
"0.48745507",
"0.486139",
"0.48441923",
"0.48081535",
"0.48072374",
"0.4804849",
"0.47706023",
"0.47337747",
"0.47256052",
"0.47223067",
"0.4719534",
"0.4710131",
"0.47084796",
"0.46984687",
"0.4690886",
"0.46736455",
"0.4657514",
"0.46153635",
"0.4613168",
"0.4603163",
"0.4595865",
"0.4588904",
"0.45887345",
"0.4588704",
"0.45826304",
"0.45656696",
"0.4542889",
"0.45412734",
"0.4532172",
"0.45283467",
"0.45266554",
"0.45166403",
"0.45165035",
"0.4507909",
"0.45063233",
"0.45016482",
"0.4491327",
"0.4487224",
"0.44845653",
"0.44839528",
"0.44807428",
"0.44659373",
"0.44653845",
"0.44637373",
"0.4460565",
"0.4457314",
"0.4453417",
"0.44381356",
"0.4433346",
"0.4432704",
"0.44261754",
"0.44175747",
"0.44167012",
"0.44111532",
"0.44097072",
"0.43914622",
"0.43872175",
"0.43805048",
"0.4377607",
"0.43701473",
"0.43593633",
"0.4359306",
"0.435789",
"0.435776",
"0.43483886",
"0.4341161",
"0.4340598",
"0.4324972",
"0.43243122",
"0.4322489",
"0.4317096",
"0.4316954"
] | 0.75321937 | 0 |
Test case for addPackingPlanFile Attach a file to a packingPlan. | public function testAddPackingPlanFile()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAddPackingPlanFileByURL()\n {\n }",
"public function addFile($file);",
"public function testGetPackingPlanFiles()\n {\n }",
"public function testAddExternalShipmentFile()\n {\n }",
"public function testAddPackingPlan()\n {\n }",
"function addFile(FileUpload $file)\n\t{\n\t\t$file->move($this->getUniqueFilePath());\n\t\t$this->query('INSERT INTO files (queueID, created, data, name) VALUES (\"' . sqlite_escape_string($this->getQueueID()) . '\",' . time() . ',\\'' . sqlite_escape_string(serialize($file)) . '\\', \\'' . sqlite_escape_string($file->getName()) . '\\')');\n\t}",
"public function addFileTask(string $fileName, $_globals = NULL): void {}",
"public function addFile(\\Models\\File $file) {\n $this->files[] = $file;\n }",
"public function addFile($file) {\n $this->files[$file->getName()] = $file;\n }",
"private function _addFile($file, $params)\n {\n $this->_files[basename($file)] = $this->_element->insertFile(\n basename($file),\n $params['role'],\n $this->_getFileInsertionPoint(basename($file))\n );\n }",
"public function testDeletePackingPlanFile()\n {\n }",
"abstract public function attachFile($filePath, $name = null);",
"public function addFile(File $file)\n {\n $file->setFileset($this);\n $this->files->add($file);\n }",
"public function addFile($file = null){\n $client = Yii::$app->fileService;\n return $client->add(['sid'=>$this->sid,'file'=>$file]);\n }",
"public function add($file) {\n\t\tarray_push($this->files, $file);\n\t}",
"public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}",
"private function add_file()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t\n \t$file = $serviceManager->get('PM/Model/Files');\n \t\n \t$result = $file->getFileById($this->pk);\n \tif($result)\n \t{\n \t\tif($result['company_name'] != '' && $result['company_id'] && $result['company_id'] > 0)\n \t\t{\n \t\t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t}\n \t\t\n \t\tif($result['project_name'] != '' && $result['project_id'] && $result['project_id'] > 0)\n \t\t{ \t\t\n \t\t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t}\n \t\t\n \t\tif($result['task_name'] != '' && $result['task_id'] && $result['task_id'] > 0)\n \t\t{\n \t\t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['task_id']));\n \t\t\t$this->add_breadcrumb($task_url, $result['task_name']);\n \t\t}\n \t\t\n \t\t$file_url = $this->view->url('pm', array('module' => 'pm','controller' => 'files','action'=>'view', 'id' => $result['file_id']), null, TRUE);\n \t\t$this->add_breadcrumb($file_url, 'File: '.$result['name'], TRUE); \t\t\n \t}\n }",
"public function addFile($file)\n {\n $this->paths[] = $file;\n }",
"public function addAttachment($file)\n {\n $this->hasAttachment = true;\n $this->attachments[] = $file;\n }",
"function addFile(File $newFile)\r\n\t{\r\n\t\tif( file_exists( $this->path . '/' . $newFile->getName( ) ) )\r\n\t\t{\r\n\t\t\t$this->filesCollection->add( $newFile );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error( \"arquivo inexistente! não foi possível adicionar\" );\r\n\t\t}\r\n\t}",
"public function testAddFieldVisualisationFile() {\n $new_field_label = 'Testing visualisation file field';\n $new_field_name = 'testing_vis_file_field';\n $storage_type = 'dvf_file';\n\n $this->addNewFieldToPage($new_field_label, $new_field_name, $storage_type);\n }",
"public function attach_file($file){\n\t \t\t//ERROR CHECKNG , SET OJESCT ATTRIBUTESss\n\t \t\tif(!$file || empty($file) || !is_array($file)){\n\t \t\t\t$this->errors[] = \"No file was uploaded. \";\n\t \t\t\treturn false;\n\t \t\t}elseif($file['error'] != 0){\n\t \t\t\t$this->errors[] = $this->upload->errors[$file['error']];\n\t \t\t\treturn false;\n\t \t\t}else{\n\t \t\t\tif (!isset($this->testimony_id)) \n\t \t\t\t\t$this->setTestimonyid();\n\n\t \t\t\t$this->temp_path = $file['tmp_name'];\n\t \t\t\t$this->passport = str_replace(\"/\", \"_\", $this->testimony_id).\".\".basename($file[\"type\"]);\n\t \t\t\t$this->type = $file['type'];\n\t \t\t\t$this->size = $file['size'];\n\t \t\t\treturn true;\n\t \t\t}\n\t \t}",
"public function testAddExternalShipmentFileByURL()\n {\n }",
"public function addFile($file)\r\n\t{\r\n\t\t$this->frame[Cache::FILES][] = $file;\r\n\t}",
"public function testAddPackingPlanTag()\n {\n }",
"public function addPostFile($name, $file, $content_type = null) {}",
"public function testAddPackingPlanAudit()\n {\n }",
"public function addDesignFile(DesignFile $designFile)\n {\n DesignFileLink::create([\n 'invoice_item_id' => $this->id,\n 'design_file_id' => $designFile->id\n ]);\n if (is_null($this->product_id) || $this->product->productPrint->id != $designFile->product_print_id) {\n $this->_resetProduct(array('productPrint' => $designFile->product_print_id));\n }\n }",
"function addFile($attachment_id, $filename, $filetype, &$blob)\n {\n $attachment_id = Misc::escapeInteger($attachment_id);\n $filesize = strlen($blob);\n $stmt = \"INSERT INTO\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"issue_attachment_file\n (\n iaf_iat_id,\n iaf_filename,\n iaf_filesize,\n iaf_filetype,\n iaf_file\n ) VALUES (\n $attachment_id,\n '\" . Misc::escapeString($filename) . \"',\n '\" . $filesize . \"',\n '\" . Misc::escapeString($filetype) . \"',\n '\" . Misc::escapeString($blob) . \"'\n )\";\n $res = DB_Helper::getInstance()->query($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return false;\n } else {\n return true;\n }\n }",
"public function addFile( $file ) {\n if( in_array( $file, $this->pending ) === true )\n return $this;\n if( in_array( $file, $this->files ) === true )\n return $this;\n\n array_push( $this->pending, $file );\n\n if( isset( $this->dependencies[$file] ) === true ) {\n foreach( $this->dependencies[$file] as $dependency ) {\n $this->addFile( $dependency );\n }\n }\n\n if( $file[0] != '$' ) { // Don't actually add virtual dependencies.\n $this->files[] = $file;\n }\n\n array_pop( $this->pending );\n return $this;\n }",
"public function testAddReplenishmentFile()\n {\n }",
"function addFile($path)\n {\n }",
"function add_file($file) {\n if(isset($_POST[\"submit\"])) {\n $check = getimagesize($file[\"tmp_name\"]);\n if($check == false) {\n throw new Exception(\"File is not an image.\");\n }\n }\n\n // Check file size\n if ($file[\"size\"] > $this->max_size) {\n throw new Exception(\"Sorry, your file is too large.\");\n }\n\n // Allow certain file formats\n $ext = strtolower(pathinfo($file[\"name\"],PATHINFO_EXTENSION));\n $allowed = in_array($ext,explode(\",\",$this->allowed_files));\n if(!$allowed) {\n throw new Exception(\"Sorry, only {$this->allowed_files} files are allowed.\");\n }\n\n # find a free path in the archive\n do{\n $target_file = $this->get_path($file[\"name\"]);\n } while(file_exists($target_file));\n\n // Create the directory if it does not exist\n $target_path = substr($target_file,0,strripos($target_file,\"/\"));\n if(!is_dir($target_path)) mkdir($target_path,0750,true); \n\n if (!move_uploaded_file($file[\"tmp_name\"], $target_file)) {\n throw new Exception(\"Sorry, there was an error uploading your file.\");\n }\n return $target_file;\n }",
"function privAddFile($p_filedescr, &$p_header, &$p_options)\n {\n }",
"public function testAddFile()\n {\n\n }",
"private static function add_file($project, $entry, $base, $path_info) {\n if ($entry->attributes()->kind != 'file' )\n return;\n $path = (string) $entry->name;\n $link = $base . $path;\n $size = intval((string) $entry->size);\n\n $file = new File($path, $link, $size);\n $file->info = $path_info[$path];\n\n $project->files[] = $file;\n }",
"public function attach_file($file) {\r\n // Perform error checking on the form parameters\r\n if(!$file || empty($file) || !is_array($file)) {\r\n // error: nothing uploaded or wrong argument usage\r\n $this->errors[] = \"No file was uploaded.\";\r\n return FALSE;\r\n } elseif ($file['error'] != 0 ) {\r\n // error: report what PHP says went wrong\r\n $this->errors[] = $this->upload_errors[$file['error']];\r\n return FALSE;\r\n } else {\r\n // Set object attributes to the form parameters.\r\n $this->temp_path = $file['tmp_name'];\r\n $this->passport_path = basename($file['name']);\r\n\r\n return TRUE;\r\n }\r\n }",
"public function addFile($filePath)\n {\n $fileName = basename($filePath);\n $this->files[$fileName] = $filePath;\n $this->getOrder()->addFile($fileName);\n }",
"public function testAddOrderFile()\n {\n }",
"public function attach_file($file){\n\t \t\t//ERROR CHECKNG , SET OJESCT ATTRIBUTESss\n\t \t\tif(!$file || empty($file) || !is_array($file)){\n\t \t\t\t$this->errors[] = \"No file was uploaded. \";\n\t \t\t\treturn false;\n\t \t\t}elseif($file['error'] != 0){\n\t \t\t\t$this->errors[] = $this->upload->errors[$file['error']];\n\t \t\t\treturn false;\n\t \t\t}else{\n\t \t\t\tif (!isset($this->interview_id)) \n\t \t\t\t\t$this->setInterviewid();\n\n\t \t\t\t$this->temp_path = $file['tmp_name'];\n\t \t\t\t$this->passport = str_replace(\"/\", \"_\", $this->interview_id).\".\".basename($file[\"type\"]);\n\t \t\t\t$this->type = $file['type'];\n\t \t\t\t$this->size = $file['size'];\n\t \t\t\treturn true;\n\t \t\t}\n\t \t}",
"public function addTaskFile($task_id){\n\n $err=\"\";\n $file=\"\";\n // Testons si le fichier n'est pas trop gros\n if ($_FILES['myfile']['error'] == 0){\n if ($_FILES['myfile']['size'] <= MAX_FILE_SIZE)\n {\n // On peut valider le fichier et le stocker définitivement\n if (!is_dir(REPOSITORY_PATH . '/'. $task_id .'/')) {\n mkdir(REPOSITORY_PATH . '/'. $task_id .'/', 0777, true);\n }\n //move file to 'uploads' repository\n $file=REPOSITORY_PATH . '/'. $task_id .'/'. basename($_FILES['myfile']['name']);\n move_uploaded_file($_FILES['myfile']['tmp_name'], $file);\n\n //retrieve the task team id\n $bdd = $this->connectDB();\n $req=$bdd->prepare('SELECT team from task WHERE id= ?');\n $req->execute(array($task_id));\n\n if ($req->rowCount()){\n $row = $req->fetch();\n $team=$row['team'];\n }\n\n //update history\n $history_manager=new historyManager();\n $history_manager->addEvent($team,'attach_file',$task_id);\n\n }else{\n $err=\"fichier trop volumineux\";\n }\n }else{\n $err=\"erreur lors de l'envoi du fichier\";\n }\n\n\n $file_add=array(\n 'error'=>$err,\n 'file'=>$file\n );\n\n return $file_add;\n }",
"public function attach_file($file){\n\t\tif(!$file || empty($file) || !is_array($file)) {\n\t\t\t // error: nothing uploaded or wrong argument usage\n\t\t\t $this->errors[] = \"No file was uploaded.\";\n\t\t\t return false;\n\t\t} elseif($file['error'] != 0) {\n\t\t\t // error: report what PHP says went wrong\n\t\t\t $this->errors[] = $this->upload_errors[$file['error']];\n\t\t\t return false;\n\t\t} else {\n\t\t\t//set object attributes\n\t\t\t $this->temp_path = $file['tmp_name'];\n\t\t\t\t$this->filename = basename($file['name']);\n\t\t\t\t$this->type = $file['type'];\n\t\t\t\t$this->size = $file['size'];\n\t\t\t\treturn true;\n\t\t}\n\t\t\n\t}",
"function addFile($filename){\n\t\t$this->_Items[] = new StringBufferFileItem($filename);\n\t}",
"public function addAdminFile(FileAdmin $file){\n $req = $this->db->prepare('INSERT INTO admin_files(name_file, file_url,title_file) VALUES (?,?,?)');\n $req->execute(array($file->getName_file(),$file->getFile_url(),$file->getTitle_File()));\n }",
"public function addFile($file)\n\t{\n\t\t$file = $this->addAdditionalFileData($file);\n\n\t\t$this->returnData->files[$file->field] = (object) [\n\t\t\t'name' => $file->displayName,\n\t\t\t'filename' => $file->newFilename,\n\t\t\t'basename' => $file->basename,\n\t\t\t'extension' => $file->extension,\n\t\t\t'path' => $file->path,\n\t\t\t'url' => $file->url,\n\t\t\t'fileSize' => $file->size,\n\t\t\t'isImage' => $file->isImage,\n\t\t\t'thumbnailUrl' => $file->thumbnailUrl,\n\t\t\t'imageDimensions' => $file->imageDimensions,\n\t\t\t'error' => false,\n\t\t];\n\n\t\t$this->returnData->uploaded ++;\n\n\t\treturn $file->field;\n\t}",
"function addArtifactAttachedFile($sessionKey,$group_id,$group_artifact_id,$artifact_id,$encoded_data,$description,$filename,$filetype) {\n global $art_field_fact; \n if (session_continue($sessionKey)) {\n $pm = ProjectManager::instance();\n try {\n $grp = $pm->getGroupByIdForSoap($group_id, 'addArtifactAttachedFile');\n } catch (SoapFault $e) {\n return $e;\n }\n\n $at = new ArtifactTracker($grp,$group_artifact_id);\n if (!$at || !is_object($at)) {\n return new SoapFault(get_artifact_type_fault,'Could Not Get ArtifactTracker','addArtifactFile');\n } elseif ($at->isError()) {\n return new SoapFault(get_artifact_type_fault,$at->getErrorMessage(),'addArtifactFile');\n }\n \n $art_field_fact = new ArtifactFieldFactory($at);\n if (!$art_field_fact || !is_object($art_field_fact)) {\n return new SoapFault(get_artifact_field_factory_fault, 'Could Not Get ArtifactFieldFactory','addArtifactFile');\n } elseif ($art_field_fact->isError()) {\n return new SoapFault(get_artifact_field_factory_fault, $art_field_fact->getErrorMessage(),'addArtifactFile');\n }\n\n $a = new Artifact($at,$artifact_id);\n if (!$a || !is_object($a)) {\n return new SoapFault(get_artifact_fault,'Could Not Get Artifact','addArtifactFile');\n } elseif ($a->isError()) {\n return new SoapFault(get_artifact_fault,$a->getErrorMessage(),'addArtifactFile');\n }\n\n $af = new ArtifactFile($a);\n if (!$af || !is_object($af)) {\n return new SoapFault(get_artifact_file_fault,'Could Not Create File Object','addArtifactFile');\n } else if ($af->isError()) {\n return new SoapFault(get_artifact_file_fault,$af->getErrorMessage(),'addArtifactFile');\n }\n\n $bin_data = base64_decode($encoded_data);\n\n $filesize = strlen($bin_data);\n\n $id = $af->create($filename,$filetype,$filesize,$bin_data,$description, $changes);\n\n if (!$id) {\n return new SoapFault(get_artifact_file_fault,$af->getErrorMessage(),'addArtifactFile');\n } else {\n // Send the notification\n if ($changes) {\n $agnf =& new ArtifactGlobalNotificationFactory();\n $addresses = $agnf->getAllAddresses($at->getID(), true);\n $a->mailFollowupWithPermissions($addresses, $changes);\n }\n }\n\n return $id;\n } else {\n return new SoapFault(invalid_session_fault, 'Invalid Session', 'addArtifactFile');\n }\n}",
"function addFile($filePath, $fileName) {\n\t\t$this->_files[$fileName] = $filePath;\n\t}",
"function _drush_patchfile_add_patch($project_name, $patch_url, $file) {\n $output = \"\\nprojects[{$project_name}][patch][] = \\\"{$patch_url}\\\"\\n\";\n $result = file_put_contents($file, $output, FILE_APPEND);\n if ($result !== FALSE) {\n drush_log(dt('Added patch @patch to @project in @file.', array('@patch' => $patch_url, '@project' => $project_name, '@file' => $file)), 'success');\n return TRUE;\n }\n else {\n return drush_set_error('DRUSH_MAKE_FILE_NO_WRITE', dt('Unable to append to file @file.', array('@file' => $file)));\n }\n}",
"function add_attach_file($file, $encoding = \"base64\", $dispo = \"attachment\", $type = \"application/octet-stream\") {\n\t\t$file_str = $this->get_file_data($file);\n\t\tif ($file_str == \"\") {\n\t\t\treturn;\n\t\t}else{\n\t\t\tif ($encoding == \"base64\"){\n\t\t\t\t$file_str = base64_encode($file_str);\n\t\t\t\t}\n\t\t\t$this->att_files[] = array(\n\t\t\t\t\"data\"=>chunk_split($file_str),\n\t\t\t\t\"name\"=>basename($file), \n\t\t\t\t\"cont_type\"=>$type, \n\t\t\t\t\"trans_enc\"=>$encoding,\n\t\t\t\t\"disposition\"=>$dispo);\n\t\t\t}\n\t\t}",
"public function addFile($file, $params)\n {\n $this->getParent(explode('/', dirname($file)))\n ->_addFile($file, $params);\n }",
"public function AddFile($asFile = null)\n\t{\n $config = Config::GetInstance();\n\t\t$this->_File = $asFile;\n\t\tif($this->_File != null){\n\t\t\t$CarpetaFicheros = $config->get(\"Ruta\").'app/contenidos/proyectos/';\n\t\t\tcheckCarpeta($CarpetaFicheros);\n\t\t\tcheckCarpeta($CarpetaFicheros.$this->IdProyecto);\n\t\t\t$Nombrefichero = $this->IdProyecto.'/'.getToken(4).\"_\".normaliza($this->_File['name']);\n\t\t\t$ficheroFinal = $CarpetaFicheros.$Nombrefichero;\n\n\t\t\tif (move_uploaded_file($this->_File['tmp_name'], $ficheroFinal)) {\n\t\t\t\t// Guardarlo en la BD\n\t\t\t\t$this->Ruta = $Nombrefichero;\n\t\t\t}else{\n\t\t\t\t$this->Ruta = null;\n\t\t\t}\n\t\t}\n\t}",
"public function testInboundDocumentAddAttachment()\n {\n }",
"public function testPostFile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function createFile(File $file): void;",
"public function addFile($file, $local = null)\n {\n $this->invokeEvent(\n self::ADD_FILE,\n array(\n 'file' => $file,\n 'local' => $local\n )\n );\n }",
"public function add_attachment(Attachment $attachment);",
"private function addItem(\n string $file,\n bool $flatroot = false,\n int $compression = self::CM_DEFAULT,\n int $encryption = self::EM_NONE,\n ?string $base = null\n ): void {\n\n $file = is_null($this->getPath()) ? $file : $this->getPath() . \"/$file\";\n $real_file = str_replace('\\\\', '/', realpath($file));\n $real_name = basename($real_file);\n\n if (\n $base !== null &&\n (\n ($real_name[0] == \".\" &&\n in_array($this->getSkipMode(), [\"HIDDEN\", \"ALL\"])) ||\n ($real_name[0] == \".\" &&\n @$real_name[1] == \"_\" &&\n in_array($this->getSkipMode(), [\"COMODOJO\", \"ALL\"])))\n ) {\n return;\n }\n\n if (is_dir($real_file)) {\n $this->addDirectoryItem($real_file, $real_name, $compression, $encryption, $base, $flatroot);\n } else {\n $this->addFileItem($real_file, $real_name, $compression, $encryption, $base);\n }\n }",
"public function setFile($file) {}",
"public function testAddVendorComplianceSurveyFile()\n {\n }",
"public function push($zone, $file, $datasource = null);",
"protected function add_valid_file( $file ) {\r\n\t\t\t$file['isvalid'] = true;\r\n\t\t\t$file['name'] = ( empty( $file['name'] ) ) ? self::uniqString() : $file['name'];\r\n\t\t\t\r\n\t\t\t$this->Files_valid[] = $file;\r\n\t\t\t$this->Files_valid_count++;\r\n\t\t}",
"public function __construct(FileUpload $file, TemporaryLead $lead)\n {\n $this->file = $file;\n\n $this->lead = $lead;\n }",
"public function testGetExternalShipmentFiles()\n {\n }",
"public function attach_file($file){\n\t\t\t//perform error checking on form parameters.\n\t\t\tif(!$file || empty($file) || !is_array($file)){\n\t\t\t\t$this->error[]=\"No File Was Uploaded!\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telseif($file[\"error\"]!=0){\n\t\t\t\t$this->error[]=$this->upload_errors[$file[\"error\"]];\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//setting object attributes to form params.\n\t\t\t\t$this->temp_path=$file[\"tmp_name\"];\n\t\t\t\t$this->filename=basename($file[\"name\"]);\n\t\t\t\t$this->type=$file[\"type\"];\n\t\t\t\t$this->size=$file[\"size\"];\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}",
"public function add_file($filepath) {\n\t\t\t$this->hasfile = true;\n\t\t\t$this->files[] = $filepath;\n\t\t}",
"public function insertDb($filepath){\n $pdo = new PdoMethods();\n\n /* HERE I CREATE THE SQL STATEMENT I AM BINDING THE PARAMETERS */\n $sql = \"INSERT INTO file_info (file_name, file_path) VALUES (:fname, :fpath)\";\n \n /* THESE BINDINGS ARE LATER INJECTED INTO THE SQL STATEMENT THIS PREVENTS AGAIN SQL INJECTIONS */\n $bindings = [\n [':fname',$_POST['filename'],'str'],\n [':fpath',$filepath,'str'],\n ];\n \n /* I AM CALLING THE OTHERBINDED METHOD FROM MY PDO CLASS */\n $result = $pdo->otherBinded($sql, $bindings);\n \n /* HERE I AM USING AN OBJECT TO RETURN WHETHER SUCCESSFUL FOR ERROR */\n if($result === 'error'){\n return 'There was an error adding the file';\n }\n else {\n return 'File has been added';\n }\n }",
"public function add($Attachment, $event_id) {\r\n\r\n\t\t$attachment_id = $this->getCurrentId() + 1;\r\n\t\t\t\r\n\t\t\r\n\t\t$file_name = $Attachment->getFileName();\r\n\t\t$file_type = $Attachment->getFileType();\r\n\t\t$file_size = $Attachment->getFileSize();\r\n\t\t\t\t\r\n\t\t$date_added = $Attachment->getDateAdded();\r\n\t\t\r\n\t\t$file_desc = $Attachment->getDesc();\r\n\t\t$file_approved = $Attachment->isApproved();\r\n\t\t\r\n\t\t\r\n\t\t\t\t\r\n\t\t$query = \"INSERT INTO $this->att VALUES ($attachment_id, $event_id, '$file_name', '$file_type', '$file_size', $date_added, '$file_desc', $file_approved)\";\r\n\t\t\t\t\r\n\t\t$this->execute($query);\r\n\t\r\n\t\t\t\t\r\n\t}",
"function addFile(& $story, & $pageElement) {\n\t\t$storyElement =& $this->_document->createElement('file');\n\t\t$pageElement->appendChild($storyElement);\n\t\t\t\t\n\t\t$this->addCommonProporties($story, $storyElement);\n\t\t\n \t\t// description\n\t\t$shorttext =& $this->_document->createElement('description');\n\t\t$storyElement->appendChild($shorttext);\n\t\t$shorttext->appendChild($this->_document->createTextNode(htmlspecialchars($story->getField('shorttext'))));\n \t\t\n \t\t// file\n\t\t$longertext =& $this->_document->createElement('filename');\n\t\t$storyElement->appendChild($longertext);\n\t\t$filename = addslashes(urldecode(db_get_value(\"media\",\"media_tag\",\"media_id=\".$story->getField(\"longertext\"))));\n\t\t$longertext->appendChild($this->_document->createTextNode(htmlspecialchars($filename)));\t\t\n\t\t\n\t\t$this->addStoryProporties($story, $storyElement);\n\t}",
"public function add() {\n $this->usePostRequest();\n //$this->dbFileModel->add_file();\n }",
"public function addRow($row, $file)\n { }",
"public function insert($zone, $file, $datasource = null);",
"protected function createFile() {}",
"public static function AddFile($arch, $file){\r\n if(!Phar::canWrite()) return self::ERR_RDONLY;\r\n $status = null;\r\n $phar = self::Open($arch, $status);\r\n if($status != self::SUCCESS) return $status;\r\n return self::_AddFile($phar, $file);\r\n }",
"public function indexNewFile(File $file)\n {\n $query = $this->pdo->prepare(\"INSERT INTO rt_files VALUES(:id_bind, :name_bind)\");\n $query->bindValue(\":id_bind\", $file->getId(), \\PDO::PARAM_INT);\n $query->bindValue(\":name_bind\", $file->getClientFilename(), \\PDO::PARAM_STR);\n $query->execute();\n }",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function testGetBackupWithFile()\n {\n $test_filename = 'test.tar.gz';\n $test_download_url = 'http://download';\n\n $this->backups->expects($this->once())\n ->method('getBackupByFileName')\n ->with($test_filename)\n ->willReturn($this->backup);\n\n $this->backup->expects($this->once())\n ->method('getUrl')\n ->willReturn($test_download_url);\n\n $output = $this->command->getBackup('mysite.dev', ['file' => $test_filename,]);\n $this->assertEquals($output, $test_download_url);\n }",
"function addFileSet(FileSet $fileset)\n\t{\n\t\t$this->filesets[] = $fileset;\n\t}",
"public function creating(Plan $plan)//troquei o created por creating\n {\n $plan->url = Str::kebab($plan->name);\n }",
"public function testUpdatePackingPlan()\n {\n }",
"function add($File){\n if(is_file($File->path)) {\n $this->files[$File->ID] = $File;\n }\n elseif(is_dir($File->path)) {\n $this->folders[$File->ID] = $File;\n }\n $this->names[] = $File->basename;\n }",
"public function add()\n\t{\n\t\tforeach (func_get_args() as $script) {\n\t\t\t$asset = $this->input_path . $script;\n\t\t\tarray_push($this->files, $asset);\n\t\t}\n\t}",
"public static function AttachArchive ($file){\n $target_dir = \"../views/attachments/\";\n $curName = $file->getattachmentPath();\n $file_name = $file->getName();\n $uploadOk = 1;\n\n if ($uploadOk == 0) {\n return \"Sorry, your file was not uploaded.\";\n } else {\n if (move_uploaded_file($file_name , $target_dir . $curName )) {\n return true;\n } else {\n return false;\n }\n }\n }",
"function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)\n {\n }",
"public function addFile($file) {\n $originalName = $file['name'];\n $fileType = $file['type'];\n\n if ($fileType !== 'audio/mp3') {\n return false;\n }\n\n if (!file_exists(self::ROOT_PATH . \"/public/{$this->storagePath}\")) {\n mkdir(self::ROOT_PATH . \"/public/{$this->storagePath}\", 0777, true);\n }\n $fileName = time() . '_' . md5($originalName) . '.mp3';\n $filePath = self::ROOT_PATH . \"/public/{$this->storagePath}/\" . $fileName;\n\n $sqlData = array(\n 'filename' => $originalName,\n 'filepath' => $fileName,\n );\n if (!$this->_tableGw->insert($sqlData)) {\n return false;\n }\n\n copy($file['tmp_name'], $filePath);\n\n $fileId = $this->_tableGw->getLastInsertValue();\n return $fileId;\n }",
"public function add(SplFileInfo $splFileInfo);",
"public function test_uploadedfile_route() {\n global $CFG;\n list($user, , $talkpoint) = $this->_setup_single_user_in_single_talkpoint();\n\n // current time\n $now = time();\n\n // create a talkpoint\n $this->loadDataSet($this->createArrayDataSet(array(\n 'talkpoint_talkpoint' => array(\n array('id', 'instanceid', 'userid', 'title', 'uploadedfile', 'nimbbguid', 'mediatype', 'closed', 'timecreated', 'timemodified'),\n array(1, $talkpoint->id, $user->id, 'Talkpoint 001', 'mod_talkpoint_web_test.txt', null, 'file', 0, $now, $now),\n ),\n )));\n\n // spit a dummy existing file\n check_dir_exists($CFG->dataroot . '/into/mod_talkpoint/' . $talkpoint->id . '/1');\n file_put_contents($CFG->dataroot . '/into/mod_talkpoint/' . $talkpoint->id . '/1/mod_talkpoint_web_test.txt', 'dummy contents');\n\n // request the file\n $client = new Client($this->_app);\n $client->request('GET', '/uploadedfile/1');\n $this->assertTrue($client->getResponse()->isOk());\n }",
"public function it_should_allow_specifying_a_dump_file_to_import()\n {\n $root = vfsStream::setup('root');\n $dumpFle = vfsStream::newFile('foo.sql', 0777);\n $root->addChild($dumpFle);\n $path = $root->url() . '/foo.sql';\n\n $driver = $this->stubProphecy(ExtendedMySql::class);\n $driver->load([])->shouldBeCalled();\n\n $sut = $this->make_instance();\n $sut->_setDriver($driver->reveal());\n $sut->importSqlDumpFile($path);\n }",
"function addFile($file_name,$uploaded_file,$description=null) {\n\t\t\n\t\t\t$this->success = false;\n\t\t\t\t\t\t\n\t\t\t// if the file already exists, update it.\n\t\t\tif (!$file = $this->files()->contains('file_name',$file_name)) { \n\t\t\t\t// create a new file\n\t\t\t\t$file = $this->POD->getFile();\n\t\t\t}\n\t\t\n\t\t\tif ($uploaded_file['name']!='') {\n\t\t\t\t\t\n\t\t\t\t\t$file->set('file_name',$file_name);\n\t\t\t\t\t$file->set('original_name',$uploaded_file['name']);\n\t\t\t\t\t$file->set('tmp_name',$uploaded_file['tmp_name']);\n\t\t\t\t\t$file->set('contentId',$this->get('id'));\n\t\t\t\t\t$file->set('description',$description);\n\t\t\t\t\t$file->save();\t\t\n\t\t\t\t\tif (!$file->success()) {\n\t\t\t\t\t\t$this->throwError($file->error());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->success = true;\n\t\t\t\t\t\treturn $file;\n\t\t\t\t\t}\n\t\t\t} else if ($uploaded_file['error']!= 0 && $uploaded_file['error']!= UPLOAD_ERR_NO_FILE) {\n\t\t\t\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_INI_SIZE) {\n\t\t\t\t\t$this->throwError('The file ' . $file_name . ' exceeds the maximum allowed upload size on this server.');\n\t\t\t\t}\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_FORM_SIZE) {\n\t\t\t\t\t$this->throwError('The file ' . $file_name . ' exceeds the maximum allowed upload size for this form.');\n\t\t\t\t}\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_PARTIAL) {\n\t\t\t\t\t$this->throwError('The file ' . $file_name . ' did not successfully upload.');\n\t\t\t\t}\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_NO_TMP_DIR) {\n\t\t\t\t\t$this->throwError('PeoplePods cannot find a temporary folder to store the uploaded files.');\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_CANT_WRITE) {\n\t\t\t\t\t$this->throwError('PeoplePods cannot write to the temporary folder.');\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_EXTENSION) {\n\t\t\t\t\t$this->throwError('A PHP extension stopped the file upload.');\n\t\t\t\t}\t\t\t\t\n\n\t\t\t\treturn false;\n\t\t\t\n\t\t\t} else {\n\n\t\t\t\t// sometimes an invalid record gets into $_FILES where no tmp_name is specified\n\t\t\t\t// this normally happens when a javascript form validator has caused the file input to submit\n\t\t\t\t// even though there is no file!\n\t\t\t\t// we don't want to throw an error if this happens, we just want to silently ignore this record.\n\n\t\t\t\t//$file->set('description',$description);\n\t\t\t\t//$file->save();\n\t\t\t\t\n\t\t\t\t$this->success = true;\n\t\t\t}\n\t\t\n\t\t\treturn $this->success;\n\t\t\n\t\t}",
"public function testAddReplenishmentFileByURL()\n {\n }",
"private function add($type, $file)\n {\n array_push($this->asset[$type], $file);\n }",
"function insertFile ($filename, $origname='', $extraData='')\n{\n if (!$filename)\n v4b_exit ('Invalid filename passed to IbUtil::insertFile ...');\n\n if ($origname)\n $ext = FileUtil::getExtension ($origname);\n else\n $ext = FileUtil::getExtension ($filename);\n\n $data = '';\n $err = '';\n $cmd = '';\n global $v4bConfig;\n $txtFile = $v4bConfig['V4B_FILE_TMP_PATH'] . '/' . FileUtil::getBasename($filename) . '.txt';\n if ($ext == 'txt')\n $txtFile = $filename;\n else if ($ext == 'doc')\n $cmd = \"/usr/local/bin/antiword \\\"$filename\\\" > \\\"$txtFile\\\"\";\n else if ($ext == 'pdf')\n $cmd = \"pdftotext \\\"$filename\\\" \\\"$txtFile\\\"\";\n else if ($ext == 'ps')\n $cmd = \"ps2ascii \\\"$filename\\\" \\\"$txtFile\\\"\";\n else \n return -1;\n\n $rc = system ($cmd, $err);\n if ($err)\n return -1;\n\n $fp = fopen ($txtFile, \"a\");\n $swrite = \"\\nextraData\\n\";\n @fwrite ($fp, $swrite);\n fclose ($fp);\n\n $data = FileUtil::readFile ($txtFile);\n @unlink ($txtFile);\n\n if ($data)\n return IbUtil::insert ($data);\n\n return -1;\n}",
"function OnFileUploaded($file) {\n\tAddFileToDatabase($file);\n\tScanFileOnVirusTotal($file);\n}",
"public function testAddLowStockFile()\n {\n }",
"public function visitFile($file)\n {\n $this->file = $this->doc->createElement('CstmrPmtRvsl');\n $this->root->appendChild($this->file);\n }",
"public function addFile($file): AtomicTempFileObjects\n {\n $realPath = $file->getDestinationRealPath();\n if ($this->isFileOpen($realPath)) {\n throw new \\RuntimeException(\"File: \" . $realPath . \" already opened!\");\n }\n $this->files[$realPath] = $file;\n return $this;\n }",
"public static function add($tmpFile,$file){\n\t\t$file->ext=UFile::extension($file->name);\n\t\t\n\t\tif($file->_pkExists()){\n\t\t\t$id=$file->_getPkValue();\n\t\t\t$file->update();\n\t\t}else $id=$file->insert();\n\t\t\n\t\t$filename=static::folderPath().$id;\n\t\trename($tmpFile,$fullFilename=($filename.'.'.$file->ext));\n\t\tchmod($fullFilename,0755);\n\t\t\n\t\treturn $id;\n\t}",
"public function testAddFiles() {\n $build['#attached']['library'][] = 'common_test/files';\n $assets = AttachedAssets::createFromRenderArray($build);\n\n $css = $this->assetResolver->getCssAssets($assets, FALSE);\n $js = $this->assetResolver->getJsAssets($assets, FALSE)[1];\n $this->assertArrayHasKey('core/modules/system/tests/modules/common_test/bar.css', $css);\n $this->assertArrayHasKey('core/modules/system/tests/modules/common_test/foo.js', $js);\n\n $css_render_array = \\Drupal::service('asset.css.collection_renderer')->render($css);\n $js_render_array = \\Drupal::service('asset.js.collection_renderer')->render($js);\n $rendered_css = $this->renderer->renderPlain($css_render_array);\n $rendered_js = $this->renderer->renderPlain($js_render_array);\n $query_string = $this->container->get('state')->get('system.css_js_query_string') ?: '0';\n $this->assertStringContainsString('<link rel=\"stylesheet\" media=\"all\" href=\"' . $this->fileUrlGenerator->generateString('core/modules/system/tests/modules/common_test/bar.css') . '?' . $query_string . '\" />', $rendered_css, 'Rendering an external CSS file.');\n $this->assertStringContainsString('<script src=\"' . $this->fileUrlGenerator->generateString('core/modules/system/tests/modules/common_test/foo.js') . '?' . $query_string . '\"></script>', $rendered_js, 'Rendering an external JavaScript file.');\n }",
"public function addFile($file): string\n {\n $this->command->runCommand(sprintf('git add %s', escapeshellarg($file)));\n $response = 'Manually fixed file \"' . $file . '\"';\n\n //Trigger file alter Event\n $this->triggerGitAlterFilesEvent();\n\n return $response;\n }",
"public function attach_file($file)\n {\n if(!$file || empty($file) || !is_array($file))\n {\n $this->errors[] = \"No file was uploaded\";\n return false;\n } elseif($file['error'] != 0)\n {\n $this->errors[] = $this->upload_error[$file['error']];\n return false;\n }\n //set object attributes to the form parameters\n $this->temp_path = $file['tmp_name'];\n $this->filename = basename($file['name']);\n $this->type = $file['type'];\n $this->size = $file['size'];\n\n return true;\n }",
"protected static function attach($file)\n {\n self::$message->attach(\\Swift_Attachment::fromPath($file));\n }"
] | [
"0.64937943",
"0.6147898",
"0.5951913",
"0.57769436",
"0.57392806",
"0.5660011",
"0.5600821",
"0.5544153",
"0.55356807",
"0.5426812",
"0.54084337",
"0.54066163",
"0.53932345",
"0.53909034",
"0.5379048",
"0.5373547",
"0.53595406",
"0.53562784",
"0.5340339",
"0.5317471",
"0.5314521",
"0.5314444",
"0.5286771",
"0.5274398",
"0.5260713",
"0.5248816",
"0.52465504",
"0.5235639",
"0.52248824",
"0.51986414",
"0.5195632",
"0.5182313",
"0.51773345",
"0.5160658",
"0.5137265",
"0.5131318",
"0.5120611",
"0.51205873",
"0.5081553",
"0.50718",
"0.50716996",
"0.50548303",
"0.50457335",
"0.5040799",
"0.50304556",
"0.50023496",
"0.49954605",
"0.4989053",
"0.4964689",
"0.49290687",
"0.49281326",
"0.4921105",
"0.4917178",
"0.49042526",
"0.48836586",
"0.48684296",
"0.48657027",
"0.48587698",
"0.48572",
"0.4855562",
"0.48479193",
"0.4831101",
"0.48264372",
"0.48219582",
"0.481615",
"0.4808591",
"0.47874662",
"0.4778663",
"0.4768437",
"0.47580808",
"0.47523773",
"0.4748427",
"0.4741015",
"0.4734495",
"0.47324252",
"0.47320405",
"0.47316268",
"0.47310928",
"0.4727369",
"0.47234714",
"0.4713876",
"0.47119868",
"0.47028533",
"0.4698479",
"0.46935108",
"0.46929437",
"0.46925345",
"0.4682428",
"0.46812564",
"0.46809947",
"0.4677166",
"0.46761277",
"0.46708053",
"0.46671376",
"0.466518",
"0.46645778",
"0.46579698",
"0.46548218",
"0.46485677",
"0.4643076"
] | 0.7034536 | 0 |
Test case for addPackingPlanFileByURL Attach a file to a packingPlan by URL.. | public function testAddPackingPlanFileByURL()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAddExternalShipmentFileByURL()\n {\n }",
"public function testAddReplenishmentFileByURL()\n {\n }",
"public function testAddPackingPlanFile()\n {\n }",
"public function testAddLowStockFileByURL()\n {\n }",
"public function testAddVendorComplianceSurveyFileByURL()\n {\n }",
"public function testAddExternalShipmentFile()\n {\n }",
"public function add_file_from_url( $url ) {\r\n\t\t\t$url = ( substr( $url, 0, 4 ) !== 'http' ) ? 'http://' . str_replace( '//', '', $url ) : $url;\r\n\t\t\t\r\n\t\t\t$file = self::FILE_OBJECT_TEMPLATE;\r\n\t\t\t$file['path'] = $url;\r\n\t\t\t$file['origname'] = $url;\r\n\t\t\t$file['name'] = self::strip_to_valid_filename( substr( strrchr( $url, '/' ), 1 ) );\r\n\t\t\t$file['isurl'] = true;\r\n\t\t\t\r\n\t\t\t$this->process_file_add( $file, true );\r\n\t\t}",
"public function testAddOrderFileByURL()\n {\n }",
"public function testAddItemSubCategoryFileByURL()\n {\n }",
"public function testGetPackingPlanFiles()\n {\n }",
"public function addFile($file);",
"function addArtifactAttachedFile($sessionKey,$group_id,$group_artifact_id,$artifact_id,$encoded_data,$description,$filename,$filetype) {\n global $art_field_fact; \n if (session_continue($sessionKey)) {\n $pm = ProjectManager::instance();\n try {\n $grp = $pm->getGroupByIdForSoap($group_id, 'addArtifactAttachedFile');\n } catch (SoapFault $e) {\n return $e;\n }\n\n $at = new ArtifactTracker($grp,$group_artifact_id);\n if (!$at || !is_object($at)) {\n return new SoapFault(get_artifact_type_fault,'Could Not Get ArtifactTracker','addArtifactFile');\n } elseif ($at->isError()) {\n return new SoapFault(get_artifact_type_fault,$at->getErrorMessage(),'addArtifactFile');\n }\n \n $art_field_fact = new ArtifactFieldFactory($at);\n if (!$art_field_fact || !is_object($art_field_fact)) {\n return new SoapFault(get_artifact_field_factory_fault, 'Could Not Get ArtifactFieldFactory','addArtifactFile');\n } elseif ($art_field_fact->isError()) {\n return new SoapFault(get_artifact_field_factory_fault, $art_field_fact->getErrorMessage(),'addArtifactFile');\n }\n\n $a = new Artifact($at,$artifact_id);\n if (!$a || !is_object($a)) {\n return new SoapFault(get_artifact_fault,'Could Not Get Artifact','addArtifactFile');\n } elseif ($a->isError()) {\n return new SoapFault(get_artifact_fault,$a->getErrorMessage(),'addArtifactFile');\n }\n\n $af = new ArtifactFile($a);\n if (!$af || !is_object($af)) {\n return new SoapFault(get_artifact_file_fault,'Could Not Create File Object','addArtifactFile');\n } else if ($af->isError()) {\n return new SoapFault(get_artifact_file_fault,$af->getErrorMessage(),'addArtifactFile');\n }\n\n $bin_data = base64_decode($encoded_data);\n\n $filesize = strlen($bin_data);\n\n $id = $af->create($filename,$filetype,$filesize,$bin_data,$description, $changes);\n\n if (!$id) {\n return new SoapFault(get_artifact_file_fault,$af->getErrorMessage(),'addArtifactFile');\n } else {\n // Send the notification\n if ($changes) {\n $agnf =& new ArtifactGlobalNotificationFactory();\n $addresses = $agnf->getAllAddresses($at->getID(), true);\n $a->mailFollowupWithPermissions($addresses, $changes);\n }\n }\n\n return $id;\n } else {\n return new SoapFault(invalid_session_fault, 'Invalid Session', 'addArtifactFile');\n }\n}",
"private function add_file()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t\n \t$file = $serviceManager->get('PM/Model/Files');\n \t\n \t$result = $file->getFileById($this->pk);\n \tif($result)\n \t{\n \t\tif($result['company_name'] != '' && $result['company_id'] && $result['company_id'] > 0)\n \t\t{\n \t\t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t}\n \t\t\n \t\tif($result['project_name'] != '' && $result['project_id'] && $result['project_id'] > 0)\n \t\t{ \t\t\n \t\t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t}\n \t\t\n \t\tif($result['task_name'] != '' && $result['task_id'] && $result['task_id'] > 0)\n \t\t{\n \t\t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['task_id']));\n \t\t\t$this->add_breadcrumb($task_url, $result['task_name']);\n \t\t}\n \t\t\n \t\t$file_url = $this->view->url('pm', array('module' => 'pm','controller' => 'files','action'=>'view', 'id' => $result['file_id']), null, TRUE);\n \t\t$this->add_breadcrumb($file_url, 'File: '.$result['name'], TRUE); \t\t\n \t}\n }",
"function _drush_patchfile_add_patch($project_name, $patch_url, $file) {\n $output = \"\\nprojects[{$project_name}][patch][] = \\\"{$patch_url}\\\"\\n\";\n $result = file_put_contents($file, $output, FILE_APPEND);\n if ($result !== FALSE) {\n drush_log(dt('Added patch @patch to @project in @file.', array('@patch' => $patch_url, '@project' => $project_name, '@file' => $file)), 'success');\n return TRUE;\n }\n else {\n return drush_set_error('DRUSH_MAKE_FILE_NO_WRITE', dt('Unable to append to file @file.', array('@file' => $file)));\n }\n}",
"function addFile($attachment_id, $filename, $filetype, &$blob)\n {\n $attachment_id = Misc::escapeInteger($attachment_id);\n $filesize = strlen($blob);\n $stmt = \"INSERT INTO\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"issue_attachment_file\n (\n iaf_iat_id,\n iaf_filename,\n iaf_filesize,\n iaf_filetype,\n iaf_file\n ) VALUES (\n $attachment_id,\n '\" . Misc::escapeString($filename) . \"',\n '\" . $filesize . \"',\n '\" . Misc::escapeString($filetype) . \"',\n '\" . Misc::escapeString($blob) . \"'\n )\";\n $res = DB_Helper::getInstance()->query($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return false;\n } else {\n return true;\n }\n }",
"public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}",
"public function testAddPackingPlan()\n {\n }",
"public function addTaskFile($task_id){\n\n $err=\"\";\n $file=\"\";\n // Testons si le fichier n'est pas trop gros\n if ($_FILES['myfile']['error'] == 0){\n if ($_FILES['myfile']['size'] <= MAX_FILE_SIZE)\n {\n // On peut valider le fichier et le stocker définitivement\n if (!is_dir(REPOSITORY_PATH . '/'. $task_id .'/')) {\n mkdir(REPOSITORY_PATH . '/'. $task_id .'/', 0777, true);\n }\n //move file to 'uploads' repository\n $file=REPOSITORY_PATH . '/'. $task_id .'/'. basename($_FILES['myfile']['name']);\n move_uploaded_file($_FILES['myfile']['tmp_name'], $file);\n\n //retrieve the task team id\n $bdd = $this->connectDB();\n $req=$bdd->prepare('SELECT team from task WHERE id= ?');\n $req->execute(array($task_id));\n\n if ($req->rowCount()){\n $row = $req->fetch();\n $team=$row['team'];\n }\n\n //update history\n $history_manager=new historyManager();\n $history_manager->addEvent($team,'attach_file',$task_id);\n\n }else{\n $err=\"fichier trop volumineux\";\n }\n }else{\n $err=\"erreur lors de l'envoi du fichier\";\n }\n\n\n $file_add=array(\n 'error'=>$err,\n 'file'=>$file\n );\n\n return $file_add;\n }",
"function drush_patchfile_patch_add($project_name, $url) {\n $file = drush_get_option('patch-file');\n\n $args = array(\n '@project' => $project_name,\n '@url' => &$url,\n );\n\n $project_directory = drush_patchfile_project_get_directory($project_name);\n if (empty($project_directory)) {\n return drush_set_error('DRUSH_PROJECT_NOT_FOUND', dt(\"The project @project was not found.\", $args));\n }\n\n // Attempt to convert generic URLs to patch-specific URLs.\n $original_url = $url;\n if (_drush_patchfile_is_url($url)) {\n if (!drush_patchfile_process_url($url)) {\n return FALSE;\n }\n }\n\n $patch = $url;\n if (!_drush_patchfile_preprocess_local_file_url($patch, $file)) {\n return FALSE;\n }\n\n // Check to see if this project is already patched with this patch.\n $projects = drush_patchfile_get_patched_projects();\n if (isset($projects[$project_name])) {\n if (in_array($patch, $projects[$project_name]['patch']) || in_array($url, $projects[$project_name]['patch'])) {\n return drush_set_error('DRUSH_PATCH_ALREADY_LISTED', dt(\"The patch @url is already listed as a patch for @project.\", $args));\n }\n }\n\n if (!drush_get_option('no-apply')) {\n if (_drush_patchfile_project_apply_patches($project_name, array($patch), $project_directory) || drush_get_option('force')) {\n _drush_patchfile_add_patch($project_name, $patch['url'], $file);\n }\n else {\n if (drush_confirm(\"Would you still like to add this patch to the patch file?\")) {\n _drush_patchfile_add_patch($project_name, $patch['url'], $file);\n }\n return FALSE;\n }\n }\n else {\n if (_make_download_file($patch['url']) || drush_get_option('force')) {\n _drush_patchfile_add_patch($project_name, $patch['url'], $file);\n }\n else {\n return drush_set_error('DOWNLOAD_ERROR', dt('Unable to download or fetch @url.', $args));\n }\n }\n}",
"public function testInboundDocumentAddAttachment()\n {\n }",
"protected abstract function createUrl($file);",
"public function testGetExternalShipmentFiles()\n {\n }",
"function addFile($path)\n {\n }",
"public function testAddReplenishmentFile()\n {\n }",
"public function testDeletePackingPlanFile()\n {\n }",
"public function testPostFile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"private function submitFile()\n {\n\n $encoded_url = urlencode($this->getFileUrl());\n\n wp_remote_get(self::GOOGLE_WEBMASTER_TOOLS_URL . $encoded_url);\n wp_remote_get(self::BING_WEBMASTER_TOOLS_URL . $encoded_url);\n\n }",
"function test(){\n\t\t// See http://www.atk14.net/api/en/file_uploads/create_new/\n\n\t\t$adf = new ApiDataFetcher(\"http://www.atk14.net/api/\",array(\n\t\t\t\"logger\" => new Logger()\n\t\t));\n\t\t$data = $adf->postFile(\"file_uploads/create_new\",\"sandokan.jpg\");\n\n\t\t$this->assertEquals(201,$adf->getStatusCode());\n\t\t$this->assertEquals(\"POST\",$adf->getMethod());\n\t\t$this->assertEquals(\"http://www.atk14.net/api/en/file_uploads/create_new/?format=json\",$adf->getUrl());\n\t\t$this->assertEquals(\"sandokan.jpg\",$data[\"filename\"]);\n\t\t$this->assertEquals(\"image/jpeg\",$data[\"mime_type\"]);\n\t\t$this->assertEquals(\"d5d4599e3586064e0524d18e8ee8bce5\",$data[\"md5sum\"]);\n\t}",
"function addAUPPoints($submitted_by, $file_title){\n // $submitted_by = user ID after upload a file\n global $jlistConfig;\n \n if ($jlistConfig['use.alphauserpoints'] && $submitted_by){\n $api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';\n if (file_exists($api_AUP)){\n require_once ($api_AUP);\n $aupid = AlphaUserPointsHelper::getAnyUserReferreID( $submitted_by );\n if ($aupid){\n $text = JText::_('COM_JDOWNLOADS_BACKEND_SET_AUP_UPLOAD_TEXT');\n $text = sprintf($text,$file_title);\n AlphaUserPointsHelper::newpoints('plgaup_jdownloads_user_upload_published', $aupid, $file_title, $text);\n } \n } \n }\n}",
"function testVerifyFileSubmission()\n {\n $this->deleteLog($this->logfilename);\n //Verify file exists in the database\n $query = $this->db->query(\"SELECT buildid, fileid FROM build2uploadfile\");\n if(count($query) == 0)\n {\n $this->fail('No build2upload records were added to the database');\n return;\n }\n $this->BuildId = $query[0]['buildid'];\n\n $content = $this->connect($this->url.\"/viewFiles.php?buildid=$this->BuildId\");\n if(!$content)\n {\n return;\n }\n \n $this->assertClickable('http://www.kitware.com/company/about.html');\n \n $this->clickLink('CMakeCache.txt');\n if(!$this->checkLog($this->logfilename))\n {\n return;\n }\n\n //Verify symlink and content exist on disk\n $query = $this->db->query(\"SELECT id, sha1sum FROM uploadfile WHERE filename='CMakeCache.txt'\");\n if(count($query) == 0)\n {\n $this->fail('CMakeCache.txt was not added to the uploadfile table');\n return;\n }\n $this->FileId = $query[0]['id'];\n $this->Sha1Sum = $query[0]['sha1sum'];\n\n global $cdashpath;\n global $CDASH_DOWNLOAD_RELATIVE_URL;\n $dirName = $cdashpath.'/'.$CDASH_DOWNLOAD_RELATIVE_URL.'/'.$this->Sha1Sum;\n if(!is_dir($dirName))\n {\n $this->fail(\"Directory $dirName was not created\");\n return;\n }\n if(!file_exists($dirName.'/'.$this->Sha1Sum))\n {\n $this->fail(\"File contents were not written to $dirName/$this->Sha1Sum\");\n return;\n }\n if(!file_exists($dirName.'/CMakeCache.txt'))\n {\n $this->fail(\"File symlink was not written to $dirName/CMakeCache.txt\");\n return;\n }\n $this->pass('Uploaded file exists in database and on disk');\n }",
"public function test_uploadedfile_route() {\n global $CFG;\n list($user, , $talkpoint) = $this->_setup_single_user_in_single_talkpoint();\n\n // current time\n $now = time();\n\n // create a talkpoint\n $this->loadDataSet($this->createArrayDataSet(array(\n 'talkpoint_talkpoint' => array(\n array('id', 'instanceid', 'userid', 'title', 'uploadedfile', 'nimbbguid', 'mediatype', 'closed', 'timecreated', 'timemodified'),\n array(1, $talkpoint->id, $user->id, 'Talkpoint 001', 'mod_talkpoint_web_test.txt', null, 'file', 0, $now, $now),\n ),\n )));\n\n // spit a dummy existing file\n check_dir_exists($CFG->dataroot . '/into/mod_talkpoint/' . $talkpoint->id . '/1');\n file_put_contents($CFG->dataroot . '/into/mod_talkpoint/' . $talkpoint->id . '/1/mod_talkpoint_web_test.txt', 'dummy contents');\n\n // request the file\n $client = new Client($this->_app);\n $client->request('GET', '/uploadedfile/1');\n $this->assertTrue($client->getResponse()->isOk());\n }",
"public function upload_file(){\n\t\t$file_title = explode(\"/\",$_GET['url']);\n\t\t$file_name = end($file_title);\n\n\t\t$my_file = $_GET['url'];\n\t\t$handle = fopen($my_file, 'r');\n\t\t$read_file = fread($handle,filesize($my_file));\n\n\t\t$upload_url = \"https://pod-000-1126-02.backblaze.com/b2api/v2/b2_upload_file/d184771c8d50b17b65ba0618/c002_v0001126_t0048\"; \n\t\t$upload_auth_token = \"4_002147cd01b5a680000000000_018d4c4a_2690fb_upld_YoK-yBz17Mj5QQS60UQ1bVwRtXw=\";\n\t\t$bucket_id = \"d184771c8d50b17b65ba0618\"; \n\t\t$content_type = \"text/plain\";\n\t\t$sha1_of_file_data = sha1_file($my_file);\n\n\t\t$session = curl_init($upload_url);\n\n\t\tcurl_setopt($session, CURLOPT_POSTFIELDS, $read_file); \n\n\t\t$headers = array();\n\t\t$headers[] = \"Authorization: \" . $upload_auth_token;\n\t\t$headers[] = \"X-Bz-File-Name: \" . $file_name;\n\t\t$headers[] = \"Content-Type: \" . $content_type;\n\t\t$headers[] = \"X-Bz-Content-Sha1: \" . $sha1_of_file_data;\n\t\tcurl_setopt($session, CURLOPT_HTTPHEADER, $headers); \n\n\t\tcurl_setopt($session, CURLOPT_POST, true); \n\t\tcurl_setopt($session, CURLOPT_RETURNTRANSFER, true); \n\t\t$server_output = curl_exec($session); \n\t\tcurl_close ($session); \n\t\techo ($server_output); \n\t}",
"public function add() {\n $this->usePostRequest();\n //$this->dbFileModel->add_file();\n }",
"function privAddFile($p_filedescr, &$p_header, &$p_options)\n {\n }",
"public function testAddFile()\n {\n\n }",
"private static function add_file($project, $entry, $base, $path_info) {\n if ($entry->attributes()->kind != 'file' )\n return;\n $path = (string) $entry->name;\n $link = $base . $path;\n $size = intval((string) $entry->size);\n\n $file = new File($path, $link, $size);\n $file->info = $path_info[$path];\n\n $project->files[] = $file;\n }",
"public function testUploadUrlSuccess()\n {\n $mock_response = new MockHttpResponse(\n 200,\n json_encode([\n 'filename' => 'somefilename.jpg',\n 'size' => '1000',\n 'type' => 'image/jpg',\n 'url' => 'https://cdn.filestack.com/somefilehandle',\n ]),\n );\n\n $stub_http_client = $this->createMock(\\GuzzleHttp\\Client::class);\n $stub_http_client->method('request')\n ->willReturn($mock_response);\n\n $client = new FilestackClient(\n $this->test_api_key,\n $this->test_security,\n $stub_http_client\n );\n\n $filelink = $client->uploadUrl($this->test_file_url, [\n 'location' => 's3',\n 'filename' => 'filestack-php-sdk-test.jpg'\n ]);\n\n $this->assertNotNull($filelink);\n }",
"private function newFileRecord($url, $fileName) {\n\n /** @var URLRequest $record */\n $record = new URLRequest();\n $record->url = $url;\n $record->status = 'Requested';\n $record->fileName = $fileName;\n $record->save();\n\n }",
"public function test_it_downloads_files()\n {\n // using a real url I suppose, so I'm just going to\n // make sure it constructs for now\n // @todo see if there is a better test for this\n $FileDownloader = new FileDownloader;\n }",
"function create($filename, $filetype, $filesize, $file, $description='None', $importData = array()) {\n\t\t// Some browsers don't supply mime type if they don't know it\n\t\tif ($filetype == \"text/html\") {\n\t\t $this->setError(_('File type not allowed.'));\n\t\t return false;\n\t\t}\n\t\tif (!$filetype) {\n\t\t\t// Let's be on safe side?\n\t\t\t$filetype = 'application/octet-stream';\n\t\t}\n\n\t\t//\n\t\t//\tdata validation\n\t\t//\n\t\tif (!$filename || !$filetype || !$filesize || !$file) {\n\t\t\t//echo '<p>|'.$filename.'|'.$filetype.'|'.$filesize.'|'.$file.'|';\n\t\t\t$this->setError(_('ArtifactFile: File, name, type, size are required'));\n\t\t\treturn false;\n\t\t}\n\n\t\tif (array_key_exists('user', $importData)){\n\t\t\t$user_id = $importData['user'];\n\t\t} else {\n\t\t\tif (session_loggedin()) {\n\t\t\t\t$user_id=user_getid();\n\t\t\t} else {\n\t\t\t\t$user_id=100;\n\t\t\t}\n\t\t}\n\n\t\tif (array_key_exists('time',$importData)){\n\t\t\t$time = $importData['time'];\n\t\t} else {\n\t\t\t$time = time();\n\t\t}\n\n\t\tdb_begin();\n\n\t\t$res = db_query_params ('INSERT INTO artifact_file\n\t\t\t(artifact_id,description,bin_data,filename,filesize,filetype,adddate,submitted_by)\n\t\t\tVALUES ($1,$2,$3,$4,$5,$6,$7,$8)',\n\t\t\t\t\tarray ($this->Artifact->getID(),\n\t\t\t\t\t $description,\n\t\t\t\t\t '',\n\t\t\t\t\t $filename,\n\t\t\t\t\t $filesize,\n\t\t\t\t\t $filetype,\n\t\t\t\t\t $time,\n\t\t\t\t\t $user_id)) ;\n\n\t\t$id=db_insertid($res,'artifact_file','id');\n\n\t\tArtifactStorage::instance()->store($id, $file);\n\n\t\tif (!$res || !$id) {\n\t\t\tdb_rollback();\n\t\t\tArtifactStorage::instance()->rollback();\n\t\t\t$this->setError('ArtifactFile: '.db_error());\n\t\t\treturn false;\n\t\t} else {\n\t\t\tdb_commit();\n\t\t\tArtifactStorage::instance()->commit();\n\n\t\t\t//\n\t\t\t//\tNow set up our internal data structures\n\t\t\t//\n\t\t\tif (!$this->fetchData($id)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// If time is set, no need to add to history, will be done in batch\n\t\t\tif (!array_key_exists('time', $importData)){\n\t\t\t\t$this->Artifact->addHistory('File Added',$id.': '.$filename);\n\t\t\t}\n\t\t\t$this->Artifact->UpdateLastModifiedDate();\n\t\t\t$this->clearError();\n\t\t\treturn $id;\n\t\t}\n\t}",
"function addFile(FileUpload $file)\n\t{\n\t\t$file->move($this->getUniqueFilePath());\n\t\t$this->query('INSERT INTO files (queueID, created, data, name) VALUES (\"' . sqlite_escape_string($this->getQueueID()) . '\",' . time() . ',\\'' . sqlite_escape_string(serialize($file)) . '\\', \\'' . sqlite_escape_string($file->getName()) . '\\')');\n\t}",
"public function testAddFieldVisualisationFile() {\n $new_field_label = 'Testing visualisation file field';\n $new_field_name = 'testing_vis_file_field';\n $storage_type = 'dvf_file';\n\n $this->addNewFieldToPage($new_field_label, $new_field_name, $storage_type);\n }",
"function addFile($filename){\n\t\t$this->_Items[] = new StringBufferFileItem($filename);\n\t}",
"public function addFile($file = null){\n $client = Yii::$app->fileService;\n return $client->add(['sid'=>$this->sid,'file'=>$file]);\n }",
"public function testGetBackupWithFile()\n {\n $test_filename = 'test.tar.gz';\n $test_download_url = 'http://download';\n\n $this->backups->expects($this->once())\n ->method('getBackupByFileName')\n ->with($test_filename)\n ->willReturn($this->backup);\n\n $this->backup->expects($this->once())\n ->method('getUrl')\n ->willReturn($test_download_url);\n\n $output = $this->command->getBackup('mysite.dev', ['file' => $test_filename,]);\n $this->assertEquals($output, $test_download_url);\n }",
"public function addPostFile($name, $file, $content_type = null) {}",
"function addFile(& $story, & $pageElement) {\n\t\t$storyElement =& $this->_document->createElement('file');\n\t\t$pageElement->appendChild($storyElement);\n\t\t\t\t\n\t\t$this->addCommonProporties($story, $storyElement);\n\t\t\n \t\t// description\n\t\t$shorttext =& $this->_document->createElement('description');\n\t\t$storyElement->appendChild($shorttext);\n\t\t$shorttext->appendChild($this->_document->createTextNode(htmlspecialchars($story->getField('shorttext'))));\n \t\t\n \t\t// file\n\t\t$longertext =& $this->_document->createElement('filename');\n\t\t$storyElement->appendChild($longertext);\n\t\t$filename = addslashes(urldecode(db_get_value(\"media\",\"media_tag\",\"media_id=\".$story->getField(\"longertext\"))));\n\t\t$longertext->appendChild($this->_document->createTextNode(htmlspecialchars($filename)));\t\t\n\t\t\n\t\t$this->addStoryProporties($story, $storyElement);\n\t}",
"public function addAttachment(){\n $header = $this->app->request->headers->all();\n $body = $this->app->request->getBody();\n $fileObjects = Attachment::decodeAttachment($body);\n\n // always been an array\n $arr = true;\n if ( !is_array( $fileObjects ) ){\n $fileObjects = array( $fileObjects );\n $arr = false;\n }\n\n $res = array( );\n $files=array();\n\n foreach ( $fileObjects as $fileObject )\n $files[] = $fileObject->getFile();\n\n //add the Files\n $result = Request::routeRequest(\n 'POST',\n '/file',\n array(),\n File::encodeFile($files),\n $this->_postFile,\n 'file'\n );\n\n $tempFiles = File::decodeFile($result['content']);\n\n // checks the correctness of the query\n if ( $result['status'] === 201 && isset($result['content'])){\n\n // upload files\n $countObjects = count($fileObjects);\n for($i=0;$i<$countObjects;$i++){\n if ($tempFiles[$i]->getStatus() === 201){\n $fileObjects[$i]->setFile($tempFiles[$i]);\n\n if ($files[$i] !== null)\n $files[$i]->setStatus(201);\n } else {\n $fileObjects[$i]->setStatus(409);\n $fileObjects[$i]->addMessage(\"Die Datei konnte nicht gespeichert werden.\");\n if ($files[$i] !== null)\n $files[$i]->setBody();\n }\n }\n } else {\n $this->app->response->setStatus(409);\n $this->app->response->setBody( Attachment::encodeAttachment( new Attachment()) );\n $this->app->stop();\n }\n\n // upload attachments\n $result = Request::routeRequest(\n 'POST',\n '/attachment',\n array(),\n Attachment::encodeAttachment($fileObjects),\n $this->_postAttachment,\n 'attachment'\n );\n\n if ( $result['status'] === 201 && isset($result['content'])){\n $tempAttachments = Attachment::decodeAttachment($result['content']);\n\n $countObjects = count($fileObjects);\n for($i=0;$i<$countObjects;$i++){\n $fileObjects[$i]->setStatus($tempAttachments[$i]->getStatus());\n $fileObjects[$i]->addMessages($tempAttachments[$i]->getMessages());\n\n if ($tempAttachments[$i]->getStatus() !== 201){\n $fileObjects[$i]->addMessage('Anhang konnte nicht erstellt werden.');\n $fileObjects[$i]->getFile()->setBody();\n } else\n $fileObjects[$i]->setId($tempAttachments[$i]->getId());\n\n $res[] = $fileObjects[$i];\n }\n\n } else {\n $this->app->response->setStatus(409);\n $this->app->response->setBody( Attachment::encodeAttachment( new Attachment()) );\n $this->app->stop();\n\n }\n\n if ( !$arr &&\n count( $res ) == 1 )\n $res = $res[0];\n\n $this->app->response->setBody( Attachment::encodeAttachment( $res ) );\n $this->app->response->setStatus( 201 );\n }",
"function addFile($file_name, $mime_type, $file, $comment) {\n global $pdo;\n $id = '';\n for ($i = 0; $i < 16; $i++) $id .= chr(rand(97, 122));\n $file = base64_encode($file);\n $statement = $pdo->prepare('INSERT INTO `file` (`sid`, `mime_type`, `file`, `name`, `comment`) VALUES (:sid, :mime_type, :file, :name, :comment)');\n $statement->bindParam(\":sid\", $id);\n $statement->bindParam(\":mime_type\", $mime_type);\n $statement->bindParam(\":file\", $file);\n $statement->bindParam(\":name\", $file_name);\n $statement->bindParam(\":comment\", $comment);\n $statement->execute();\n return getFileId($pdo->lastInsertId())['sid'];\n}",
"public function addFileTask(string $fileName, $_globals = NULL): void {}",
"public function url($file, $type = NULL);",
"public function testAddOrderFile()\n {\n }",
"public function testAddPackingPlanTag()\n {\n }",
"public function Run ($singleFileUrl = FALSE);",
"public function attach_file($file){\n\t \t\t//ERROR CHECKNG , SET OJESCT ATTRIBUTESss\n\t \t\tif(!$file || empty($file) || !is_array($file)){\n\t \t\t\t$this->errors[] = \"No file was uploaded. \";\n\t \t\t\treturn false;\n\t \t\t}elseif($file['error'] != 0){\n\t \t\t\t$this->errors[] = $this->upload->errors[$file['error']];\n\t \t\t\treturn false;\n\t \t\t}else{\n\t \t\t\tif (!isset($this->testimony_id)) \n\t \t\t\t\t$this->setTestimonyid();\n\n\t \t\t\t$this->temp_path = $file['tmp_name'];\n\t \t\t\t$this->passport = str_replace(\"/\", \"_\", $this->testimony_id).\".\".basename($file[\"type\"]);\n\t \t\t\t$this->type = $file['type'];\n\t \t\t\t$this->size = $file['size'];\n\t \t\t\treturn true;\n\t \t\t}\n\t \t}",
"function add_attach_file($file, $encoding = \"base64\", $dispo = \"attachment\", $type = \"application/octet-stream\") {\n\t\t$file_str = $this->get_file_data($file);\n\t\tif ($file_str == \"\") {\n\t\t\treturn;\n\t\t}else{\n\t\t\tif ($encoding == \"base64\"){\n\t\t\t\t$file_str = base64_encode($file_str);\n\t\t\t\t}\n\t\t\t$this->att_files[] = array(\n\t\t\t\t\"data\"=>chunk_split($file_str),\n\t\t\t\t\"name\"=>basename($file), \n\t\t\t\t\"cont_type\"=>$type, \n\t\t\t\t\"trans_enc\"=>$encoding,\n\t\t\t\t\"disposition\"=>$dispo);\n\t\t\t}\n\t\t}",
"function privAddFile($p_filedescr, &$p_header, &$p_options)\n {\n $v_result=1;\n\n // ----- Working variable\n $p_filename = $p_filedescr['filename'];\n\n // TBC : Already done in the fileAtt check ... ?\n if ($p_filename == \"\") {\n // ----- Error log\n PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, \"Invalid file list parameter (invalid or empty list)\");\n\n // ----- Return\n return PclZip::errorCode();\n }\n\n // ----- Look for a stored different filename\n /* TBC : Removed\n if (isset($p_filedescr['stored_filename'])) {\n $v_stored_filename = $p_filedescr['stored_filename'];\n }\n else {\n $v_stored_filename = $p_filedescr['stored_filename'];\n }\n */\n\n // ----- Set the file properties\n clearstatcache();\n $p_header['version'] = 20;\n $p_header['version_extracted'] = 10;\n $p_header['flag'] = 0;\n $p_header['compression'] = 0;\n $p_header['crc'] = 0;\n $p_header['compressed_size'] = 0;\n $p_header['filename_len'] = strlen($p_filename);\n $p_header['extra_len'] = 0;\n $p_header['disk'] = 0;\n $p_header['internal'] = 0;\n $p_header['offset'] = 0;\n $p_header['filename'] = $p_filename;\n// TBC : Removed $p_header['stored_filename'] = $v_stored_filename;\n $p_header['stored_filename'] = $p_filedescr['stored_filename'];\n $p_header['extra'] = '';\n $p_header['status'] = 'ok';\n $p_header['index'] = -1;\n\n // ----- Look for regular file\n if ($p_filedescr['type']=='file') {\n $p_header['external'] = 0x00000000;\n $p_header['size'] = filesize($p_filename);\n }\n\n // ----- Look for regular folder\n else if ($p_filedescr['type']=='folder') {\n $p_header['external'] = 0x00000010;\n $p_header['mtime'] = filemtime($p_filename);\n $p_header['size'] = filesize($p_filename);\n }\n\n // ----- Look for virtual file\n else if ($p_filedescr['type'] == 'virtual_file') {\n $p_header['external'] = 0x00000000;\n $p_header['size'] = strlen($p_filedescr['content']);\n }\n\n\n // ----- Look for filetime\n if (isset($p_filedescr['mtime'])) {\n $p_header['mtime'] = $p_filedescr['mtime'];\n }\n else if ($p_filedescr['type'] == 'virtual_file') {\n $p_header['mtime'] = time();\n }\n else {\n $p_header['mtime'] = filemtime($p_filename);\n }\n\n // ------ Look for file comment\n if (isset($p_filedescr['comment'])) {\n $p_header['comment_len'] = strlen($p_filedescr['comment']);\n $p_header['comment'] = $p_filedescr['comment'];\n }\n else {\n $p_header['comment_len'] = 0;\n $p_header['comment'] = '';\n }\n\n // ----- Look for pre-add callback\n if (isset($p_options[PCLZIP_CB_PRE_ADD])) {\n\n // ----- Generate a local information\n $v_local_header = array();\n $this->privConvertHeader2FileInfo($p_header, $v_local_header);\n\n // ----- Call the callback\n // Here I do not use call_user_func() because I need to send a reference to the\n // header.\n $v_result = $p_options[PCLZIP_CB_PRE_ADD](PCLZIP_CB_PRE_ADD, $v_local_header);\n if ($v_result == 0) {\n // ----- Change the file status\n $p_header['status'] = \"skipped\";\n $v_result = 1;\n }\n\n // ----- Update the informations\n // Only some fields can be modified\n if ($p_header['stored_filename'] != $v_local_header['stored_filename']) {\n $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']);\n }\n }\n\n // ----- Look for empty stored filename\n if ($p_header['stored_filename'] == \"\") {\n $p_header['status'] = \"filtered\";\n }\n\n // ----- Check the path length\n if (strlen($p_header['stored_filename']) > 0xFF) {\n $p_header['status'] = 'filename_too_long';\n }\n\n // ----- Look if no error, or file not skipped\n if ($p_header['status'] == 'ok') {\n\n // ----- Look for a file\n if ($p_filedescr['type'] == 'file') {\n // ----- Look for using temporary file to zip\n if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))\n && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON])\n || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])\n && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_header['size'])) ) ) {\n $v_result = $this->privAddFileUsingTempFile($p_filedescr, $p_header, $p_options);\n if ($v_result < PCLZIP_ERR_NO_ERROR) {\n return $v_result;\n }\n }\n\n // ----- Use \"in memory\" zip algo\n else {\n\n // ----- Open the source file\n if (($v_file = @fopen($p_filename, \"rb\")) == 0) {\n PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, \"Unable to open file '$p_filename' in binary read mode\");\n return PclZip::errorCode();\n }\n\n // ----- Read the file content\n $v_content = @fread($v_file, $p_header['size']);\n\n // ----- Close the file\n @fclose($v_file);\n\n // ----- Calculate the CRC\n $p_header['crc'] = @crc32($v_content);\n\n // ----- Look for no compression\n if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {\n // ----- Set header parameters\n $p_header['compressed_size'] = $p_header['size'];\n $p_header['compression'] = 0;\n }\n\n // ----- Look for normal compression\n else {\n // ----- Compress the content\n $v_content = @gzdeflate($v_content);\n\n // ----- Set header parameters\n $p_header['compressed_size'] = strlen($v_content);\n $p_header['compression'] = 8;\n }\n\n // ----- Call the header generation\n if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {\n @fclose($v_file);\n return $v_result;\n }\n\n // ----- Write the compressed (or not) content\n @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']);\n\n }\n\n }\n\n // ----- Look for a virtual file (a file from string)\n else if ($p_filedescr['type'] == 'virtual_file') {\n\n $v_content = $p_filedescr['content'];\n\n // ----- Calculate the CRC\n $p_header['crc'] = @crc32($v_content);\n\n // ----- Look for no compression\n if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {\n // ----- Set header parameters\n $p_header['compressed_size'] = $p_header['size'];\n $p_header['compression'] = 0;\n }\n\n // ----- Look for normal compression\n else {\n // ----- Compress the content\n $v_content = @gzdeflate($v_content);\n\n // ----- Set header parameters\n $p_header['compressed_size'] = strlen($v_content);\n $p_header['compression'] = 8;\n }\n\n // ----- Call the header generation\n if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {\n @fclose($v_file);\n return $v_result;\n }\n\n // ----- Write the compressed (or not) content\n @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']);\n }\n\n // ----- Look for a directory\n else if ($p_filedescr['type'] == 'folder') {\n // ----- Look for directory last '/'\n if (@substr($p_header['stored_filename'], -1) != '/') {\n $p_header['stored_filename'] .= '/';\n }\n\n // ----- Set the file properties\n $p_header['size'] = 0;\n //$p_header['external'] = 0x41FF0010; // Value for a folder : to be checked\n $p_header['external'] = 0x00000010; // Value for a folder : to be checked\n\n // ----- Call the header generation\n if (($v_result = $this->privWriteFileHeader($p_header)) != 1)\n {\n return $v_result;\n }\n }\n }\n\n // ----- Look for post-add callback\n if (isset($p_options[PCLZIP_CB_POST_ADD])) {\n\n // ----- Generate a local information\n $v_local_header = array();\n $this->privConvertHeader2FileInfo($p_header, $v_local_header);\n\n // ----- Call the callback\n // Here I do not use call_user_func() because I need to send a reference to the\n // header.\n $v_result = $p_options[PCLZIP_CB_POST_ADD](PCLZIP_CB_POST_ADD, $v_local_header);\n if ($v_result == 0) {\n // ----- Ignored\n $v_result = 1;\n }\n\n // ----- Update the informations\n // Nothing can be modified\n }\n\n // ----- Return\n return $v_result;\n }",
"public function creating(Plan $plan)//troquei o created por creating\n {\n $plan->url = Str::kebab($plan->name);\n }",
"public function addFile($file)\r\n\t{\r\n\t\t$this->frame[Cache::FILES][] = $file;\r\n\t}",
"public function testAddLowStockFile()\n {\n }",
"public function test_upload_file() {\n $target_url = \"http://localhost:9111/src/upload.php\";\n // test1.txt is just a file\n $file_with_full_path = realpath(\"../_files/test1.txt\");\n $post = array(\"username\"=>\"ddd\", \"password\"=>\"123456\", \"file\"=>'@'.$file_with_full_path);\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $target_url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n $result=curl_exec ($ch);\n curl_close ($ch);\n $this->assertEquals(1, $result);\n }",
"abstract public function attachFile($filePath, $name = null);",
"function addFile($file_name,$uploaded_file,$description=null) {\n\t\t\n\t\t\t$this->success = false;\n\t\t\t\t\t\t\n\t\t\t// if the file already exists, update it.\n\t\t\tif (!$file = $this->files()->contains('file_name',$file_name)) { \n\t\t\t\t// create a new file\n\t\t\t\t$file = $this->POD->getFile();\n\t\t\t}\n\t\t\n\t\t\tif ($uploaded_file['name']!='') {\n\t\t\t\t\t\n\t\t\t\t\t$file->set('file_name',$file_name);\n\t\t\t\t\t$file->set('original_name',$uploaded_file['name']);\n\t\t\t\t\t$file->set('tmp_name',$uploaded_file['tmp_name']);\n\t\t\t\t\t$file->set('contentId',$this->get('id'));\n\t\t\t\t\t$file->set('description',$description);\n\t\t\t\t\t$file->save();\t\t\n\t\t\t\t\tif (!$file->success()) {\n\t\t\t\t\t\t$this->throwError($file->error());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->success = true;\n\t\t\t\t\t\treturn $file;\n\t\t\t\t\t}\n\t\t\t} else if ($uploaded_file['error']!= 0 && $uploaded_file['error']!= UPLOAD_ERR_NO_FILE) {\n\t\t\t\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_INI_SIZE) {\n\t\t\t\t\t$this->throwError('The file ' . $file_name . ' exceeds the maximum allowed upload size on this server.');\n\t\t\t\t}\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_FORM_SIZE) {\n\t\t\t\t\t$this->throwError('The file ' . $file_name . ' exceeds the maximum allowed upload size for this form.');\n\t\t\t\t}\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_PARTIAL) {\n\t\t\t\t\t$this->throwError('The file ' . $file_name . ' did not successfully upload.');\n\t\t\t\t}\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_NO_TMP_DIR) {\n\t\t\t\t\t$this->throwError('PeoplePods cannot find a temporary folder to store the uploaded files.');\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_CANT_WRITE) {\n\t\t\t\t\t$this->throwError('PeoplePods cannot write to the temporary folder.');\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif ($uploaded_file['error'] == UPLOAD_ERR_EXTENSION) {\n\t\t\t\t\t$this->throwError('A PHP extension stopped the file upload.');\n\t\t\t\t}\t\t\t\t\n\n\t\t\t\treturn false;\n\t\t\t\n\t\t\t} else {\n\n\t\t\t\t// sometimes an invalid record gets into $_FILES where no tmp_name is specified\n\t\t\t\t// this normally happens when a javascript form validator has caused the file input to submit\n\t\t\t\t// even though there is no file!\n\t\t\t\t// we don't want to throw an error if this happens, we just want to silently ignore this record.\n\n\t\t\t\t//$file->set('description',$description);\n\t\t\t\t//$file->save();\n\t\t\t\t\n\t\t\t\t$this->success = true;\n\t\t\t}\n\t\t\n\t\t\treturn $this->success;\n\t\t\n\t\t}",
"public function testGetAttachment()\n {\n }",
"function add_file($file) {\n if(isset($_POST[\"submit\"])) {\n $check = getimagesize($file[\"tmp_name\"]);\n if($check == false) {\n throw new Exception(\"File is not an image.\");\n }\n }\n\n // Check file size\n if ($file[\"size\"] > $this->max_size) {\n throw new Exception(\"Sorry, your file is too large.\");\n }\n\n // Allow certain file formats\n $ext = strtolower(pathinfo($file[\"name\"],PATHINFO_EXTENSION));\n $allowed = in_array($ext,explode(\",\",$this->allowed_files));\n if(!$allowed) {\n throw new Exception(\"Sorry, only {$this->allowed_files} files are allowed.\");\n }\n\n # find a free path in the archive\n do{\n $target_file = $this->get_path($file[\"name\"]);\n } while(file_exists($target_file));\n\n // Create the directory if it does not exist\n $target_path = substr($target_file,0,strripos($target_file,\"/\"));\n if(!is_dir($target_path)) mkdir($target_path,0750,true); \n\n if (!move_uploaded_file($file[\"tmp_name\"], $target_file)) {\n throw new Exception(\"Sorry, there was an error uploading your file.\");\n }\n return $target_file;\n }",
"public function _curl_storeFile ( $url, $file, $content_type ) {\n\t\tif ( !strlen($url) )\tthrow new InvalidArgumentException(\"Attachment URL can't be empty\");\n\t\tif ( !strlen($file) OR !is_file($file) OR !is_readable($file) )\tthrow new InvalidArgumentException(\"Attachment file does not exist or is not readable\");\n\t\tif ( !strlen($content_type) ) throw new InvalidArgumentException(\"Attachment Content Type can't be empty\");\n\t\t$url = $this->dsn.$url;\n\t\t$http = curl_init($url);\n\t\t$http_headers = array('Accept: application/json,text/html,text/plain,*/*','Content-Type: '.$content_type,'Expect: ') ;\n\t\tcurl_setopt($http, CURLOPT_PUT, 1);\n\t\tcurl_setopt($http, CURLOPT_HTTPHEADER,$http_headers);\n\t\tcurl_setopt($http, CURLOPT_UPLOAD, true);\n\t\tcurl_setopt($http, CURLOPT_HEADER, true);\n\t\tcurl_setopt($http, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($http, CURLOPT_FOLLOWLOCATION, true);\n\t\t$fstream=fopen($file,'r');\n\t\tcurl_setopt($http, CURLOPT_INFILE, $fstream);\n\t\tcurl_setopt($http, CURLOPT_INFILESIZE, filesize($file));\n\t\t$response = curl_exec($http);\n\t\tfclose($fstream);\n\t\tcurl_close($http);\n\t\treturn $response;\n\t}",
"public function addAttachment()\n {\n global $injector, $notification;\n\n $result = new stdClass;\n $result->action = 'addAttachment';\n if (isset($this->vars->file_id)) {\n $result->file_id = $this->vars->file_id;\n }\n $result->success = 0;\n\n /* A max POST size failure will result in ALL HTTP parameters being\n * empty. Catch that here. */\n if (!isset($this->vars->composeCache)) {\n $notification->push(_(\"Your attachment was not uploaded. Most likely, the file exceeded the maximum size allowed by the server configuration.\"), 'horde.warning');\n } else {\n $imp_compose = $injector->getInstance('IMP_Factory_Compose')->create($this->vars->composeCache);\n\n if ($imp_compose->canUploadAttachment()) {\n try {\n foreach ($imp_compose->addAttachmentFromUpload('file_upload') as $val) {\n if ($val instanceof IMP_Compose_Exception) {\n $notification->push($val, 'horde.error');\n } else {\n $result->success = 1;\n\n /* This currently only occurs when\n * pasting/dropping image into HTML editor. */\n if ($this->vars->img_data) {\n $result->img = new stdClass;\n $result->img->src = strval($val->viewUrl()->setRaw(true));\n\n $temp1 = new DOMDocument();\n $temp2 = $temp1->createElement('span');\n $imp_compose->addRelatedAttachment($val, $temp2, 'src');\n $result->img->related = array(\n $imp_compose::RELATED_ATTR,\n $temp2->getAttribute($imp_compose::RELATED_ATTR)\n );\n } else {\n $this->_base->queue->attachment($val);\n $notification->push(sprintf(_(\"Added \\\"%s\\\" as an attachment.\"), $val->getPart()->getName()), 'horde.success');\n }\n }\n }\n\n $this->_base->queue->compose($imp_compose);\n } catch (IMP_Compose_Exception $e) {\n $notification->push($e, 'horde.error');\n }\n } else {\n $notification->push(_(\"Uploading attachments has been disabled on this server.\"), 'horde.error');\n }\n }\n\n return $this->vars->json_return\n ? $result\n : new Horde_Core_Ajax_Response_HordeCore_JsonHtml($result);\n }",
"public function add_attachment(Attachment $attachment);",
"function target_add_attachment($att)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $att['original_name']);\n\n\tif (!@file_exists($att['file'])) {\n\t\tif (@file_exists($GLOBALS['CONVERT_FROM_DIR'] .'/'. $att['file'])) {\n\t\t\t$att['file'] = $GLOBALS['CONVERT_FROM_DIR'] .'/'. $att['file'];\n\t\t} else {\n\t\t\tpf('WARNING: Skip file attachment ['. $att['file'] .']. File doesn\\'t exist.');\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif ($att['user_id'] == 1 && isset($GLOBALS['hack_id'])) {\n\t\t$att['user_id'] = $GLOBALS['hack_id'];\n\t}\n\n\t$mime = q_singleval('SELECT id FROM '. $GLOBALS['DBHOST_TBL_PREFIX'] .'mime WHERE fl_ext='. _esc(substr(strrchr($att['original_name'], '.'), 1)));\n\n\t$att_id = db_qid('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'attach \n\t\t(original_name, owner, message_id, dlcount, mime_type, fsize\n\t) VALUES (\n\t\t'. _esc($att['original_name']) .',\n\t\t'. (int)$att['user_id'] .',\n\t\t'. (int)$att['post_id'] .',\n\t\t'. (int)$att['download_count'] .',\n\t\t'. (int)$mime .',\n\t\t'. (int)filesize($att['file']) .')'\n\t);\n\n\t$old_umask = umask(0111);\n\tif (!copy($att['file'], $GLOBALS['FILE_STORE'] . $att_id .'.atch')) {\n\t\tpf('WARNING: Cannot copy attachment ['. $att['file'] .'] to ['. $GLOBALS['FILE_STORE']. $att_id .'.atch]!');\n\t\treturn;\n\t}\n\tumask($old_umask);\n}",
"protected function ___install($filename) {\n\t\n\t\t$basename = $filename;\n\t\t\n\t\tif(strpos($basename, '?') !== false) {\n\t\t\tlist($basename, $queryString) = explode('?', $basename); \t\n\t\t\tif($queryString) {} // do not use in basename\n\t\t} \n\t\n\t\tif(empty($basename)) throw new WireException(\"Empty filename\");\n\n\t\t$basename = $this->pagefiles->cleanBasename($basename, true, false, true); \n\t\t$pathInfo = pathinfo($basename); \n\t\t$basename = basename($basename, \".$pathInfo[extension]\"); \n\n\t\t$basenameNoExt = $basename; \n\t\t$basename .= \".$pathInfo[extension]\"; \n\n\t\t// ensure filename is unique\n\t\t$cnt = 0; \n\t\twhile(file_exists($this->pagefiles->path() . $basename)) {\n\t\t\t$cnt++;\n\t\t\t$basename = \"$basenameNoExt-$cnt.$pathInfo[extension]\";\n\t\t}\n\t\t\n\t\t$destination = $this->pagefiles->path() . $basename; \n\t\t\n\t\tif(strpos($filename, '://') === false) {\n\t\t\tif(!is_readable($filename)) throw new WireException(\"Unable to read: $filename\");\n\t\t\tif(!copy($filename, $destination)) throw new WireException(\"Unable to copy: $filename => $destination\");\n\t\t} else {\n\t\t\t$http = $this->wire(new WireHttp());\n\t\t\t// note: download() method throws excepton on failure\n\t\t\t$http->download($filename, $destination);\n\t\t\t// download was successful\n\t\t}\n\t\t\n\t\t$this->wire('files')->chmod($destination);\n\t\t$this->changed('file');\n\t\t$this->isNew(true);\n\t\tparent::set('basename', $basename);\n\t}",
"public function testUpdatePackingPlan()\n {\n }",
"function plugin_package() {\n\t\t$this->response['package'] = site_url( '/wp-content/shopp-uploads/adsanity.zip' );\n\t}",
"function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)\n {\n }",
"public function testDeleteExternalShipmentFile()\n {\n }",
"function http_put_file($url, $file = null, ?array $options = null, ?array &$info = null) {}",
"public function fileUpload($file,$url,$orderid)\n\t{\n\t\t$ext = pathinfo($file['name'], PATHINFO_EXTENSION);\n\t\tif ($file[\"error\"] > 0)\n \t\t{\n \t\t\treturn 0;\n \t\t}\n \t\telse\n \t\t{\n if(move_uploaded_file($file[\"tmp_name\"],$url . $orderid . '.' . $ext ))\n {\n return 1;\n }\n else\n {\n return 0;\n }\n\t\t}\n \t}",
"public function testCreateAttachment()\n {\n }",
"public function testAddPackingPlanAudit()\n {\n }",
"public function add_case_study_via_file($deal_id,$mem_id,$partner_id,$partner_type,$caption,$access_rule_code,$file_field_name,$file_destination_path,$is_approved,&$validation_passed,&$err_arr){\n\t\t$validation_passed = true;\n\t\t\n\t\t//validation\n\t\tif($partner_id == \"\"){\n\t\t\t$validation_passed = false;\n\t\t\t$err_arr['partner_id'] = \"Please specify the partner\";\n\t\t}\n\t\tif($caption == \"\"){\n\t\t\t$validation_passed = false;\n\t\t\t$err_arr['caption'] = \"Please specify a caption\";\n\t\t}\n\t\tif($_FILES[$file_field_name]['name']==\"\"){\n\t\t\t$validation_passed = false;\n\t\t\t$err_arr['filename'] = \"Please specify the file\";\n\t\t}else{\n\t\t\t/*******************************************************************\n\t\t\tsng:17/Nov/2011\n\t\t\tfilename specified, get the extension and check against the list\n\t\t\tof accepted extensions\n\t\t\t***********/\n\t\t\t$file_extension = get_file_extension($_FILES[$file_field_name]['name']);\n\t\t\t$valid_filetypes = $this->file_extensions_for_case_studies();\n\t\t\tif(!array_key_exists($file_extension,$valid_filetypes)){\n\t\t\t\t$validation_passed = false;\n\t\t\t\t$err_arr['filename'] = \"Files of this type is not accepted\";\n\t\t\t}\n\t\t}\n\t\tif(!$validation_passed){\n\t\t\treturn true;\n\t\t}\n\t\t//basic validation passed passed, now check if the firm was in the deal\n\t\t$q = \"select count(*) as cnt from \".TP.\"transaction_partners where transaction_id='\".$deal_id.\"' and partner_id='\".$partner_id.\"' and partner_type='\".$partner_type.\"'\";\n\t\t$res = mysql_query($q);\n\t\tif(!$res){\n\t\t\treturn false;\n\t\t}\n\t\t$row = mysql_fetch_assoc($res);\n\t\tif(0 == $row['cnt']){\n\t\t\t//not found, this firm did not worked in this deal\n\t\t\t$validation_passed = false;\n\t\t\t$err_arr['partner_id'] = \"This firm was not involved in the deal\";\n\t\t}\n\t\t//check again\n\t\tif(!$validation_passed){\n\t\t\treturn true;\n\t\t}\n\t\t//validation passed\n\t\t//be careful with space in file name\n\t\t$upload_file_name = time().\"_\".clean_filename(basename($_FILES[$file_field_name]['name']));\n\t\t$upload_path = $file_destination_path.\"/\".$upload_file_name;\n\t\t$upload_src = $_FILES[$file_field_name]['tmp_name'];\n\t\t$success = move_uploaded_file($upload_src,$upload_path);\n\t\tif(!$success){\n\t\t\treturn false;\n\t\t}\n\t\t//file uploaded, insert data\n\t\t$q = \"insert into \".TP.\"transaction_case_studies set transaction_id='\".$deal_id.\"',mem_id='\".$mem_id.\"',partner_id='\".$partner_id.\"',partner_type='\".$partner_type.\"',caption='\".$caption.\"',access_rule_code='\".$access_rule_code.\"',filename='\".$upload_file_name.\"',uploaded_on='\".date('Y-m-d').\"',is_approved='\".$is_approved.\"'\";\n\t\t$result = mysql_query($q);\n\t\tif(!$result){\n\t\t\t//echo mysql_error();\n\t\t\treturn false;\n\t\t}\n\t\t//data inserted\n\t\t/*******************************\n\t\tsng:18/nov/2011\n\t\tNotify admin that a case study has been uploaded. Problem is, we have many admins.\n\t\tSo let us send the email to a site email. We cannot use the curent admin id because\n\t\tnow admin no longer upload case study. This code is triggered by front end.\n\t\t*******************************/\n\t\t\n\t\trequire_once(\"classes/class.sitesetup.php\");\n\t\tglobal $g_site;\n\t\t$site_emails = NULL;\n\t\t$success = $g_site->get_site_emails($site_emails);\n\t\tif(!$success){\n\t\t\t//do not bother\n\t\t\treturn true;\n\t\t}\n\t\t$to = $site_emails['contact_email'];\n\t\t$from = $site_emails['mem_related_email'];\n\t\t\n\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t$headers .= 'Content-type: text/plain;charset=iso-8859-1' . \"\\r\\n\";\n\t\t$headers .= \"From: \".$from.\"\\r\\n\";\n\t\t\n\t\t$subject = \"data-cx.com case study uploaded\";\n\t\t\n\t\t\n\t\t$msg = \"A case study has been uploaded. The details are:\\r\\n\";\n\t\t$msg.=\"Caption: \".$caption.\"\\r\\n\";\n\t\t$msg.=\"Filename: \".$upload_file_name.\"\\r\\n\";\n\t\t\n\t\trequire_once(\"classes/class.mailer.php\");\n\t\t$mailer = new mailer();\n\t\t\n\t\t$to = $work_email;\n\t\t/**********\n\t\tsng:18/nov/2011\n\t\tIgnore mailer exception\n\t\t**************/\n\t\ttry{\n\t\t\t$mailer->mail($to,$subject,$msg);\n\t\t}catch(Exception $e){}\n\t\treturn true;\n\t}",
"public function test_addExternalShipment() {\n\n }",
"function add_img_tour($type,$item,$file){\n\tif($type == 'belarus'){\n\t\t$patch = '../../jsdb/JSON/tours/belarus.json';\n\t}\n\tif($type == 'belarus_pref'){\n\t\t$patch = '../../jsdb/JSON/tours/belarus_pref.json';\n\t}\n\tif($type == 'foreigners'){\n\t\t$patch = '../../jsdb/JSON/tours/foreigners.json';\n\t}\n\tif($type == 'foreigners_pref'){\n\t\t$patch = '../../jsdb/JSON/tours/foreigners_pref.json';\n\t}\n\t$exItem = explode('%',$item);\n\t$type = $exItem[0];\n\t$tour = (int)$exItem[1];\n\t$object = json_decode(file_get_contents($patch));\n\t$object_item = $object[0]->$type;\n\t$folder = $object_item[$tour]->img;\n\tdo{\n\t\t$img = randomName(10);\n\t\t$extension = explode('.',$file['name']);\n\t\t$imgName = $img.'.'.$extension[1];\n\t} while(file_exists('../../'.$folder.'/'.$imgName));\n\tmove_uploaded_file($file['tmp_name'], '../../'.$folder.'/'.$imgName);\n\treturn true;\n}",
"function pushFile($source,$hash);",
"private function add($type, $file)\n {\n array_push($this->asset[$type], $file);\n }",
"public function addFile($fileName, $fileLoc, $Description, $groups, $type) {\n\t\t$fid = 0;\n\n\t\tglobal $ODODBO;\r\n\n\t\t//verify file exists\n\t\tif(!file_exists($fileLoc)) {\n\t\t\t//log error\r\n\t\t\t$comment = \"File not found {$fileLoc}\";\r\n\t\t\t$GLOBALS['globalref'][4]->LogEvent(\"FILEUTIL\", $comment, 3);\r\n\n\t\t\treturn -1;\n\t\t}\n\n\t\t//get group ids\n\t\t$groupIDs = array();\n\n\t\tif(($groups != null)&&(count($groups)>0)) {\r\n\r\n\t\t\tforeach($groups as $group) {\n\t\t\t\t$query = \"SELECT GID FROM ODOGroups WHERE GroupName='{$group}'\";\n\n\t\t\t\t$tempRecords = $ODODBO->Query($query);\r\n\r\n\t\t\t\tif($row = mysqli_fetch_assoc($tempRecords)) {\r\n\n\t\t\t\t\tarray_push($groupIDs,$row[\"GID\"]);\n\n\t\t\t\t} else {\n\t\t\t\t\t//log error\r\n\t\t\t\t\t$comment = \"Group passed not found {$group}\";\r\n\t\t\t\t\t$GLOBALS['globalref'][4]->LogEvent(\"FILEUTIL\", $comment, 3);\r\n\n\t\t\t\t}\n\r\n\r\n\t\t\t}\n\r\n\t\t}\n\n\t\t//get fileType id first\n\t\t$query = \"SELECT FTypeID FROM FileTypes WHERE Type='{$type}'\";\n\n\t\t$tempRecords = $ODODBO->Query($query);\r\n\n\t\tif(!($row = mysqli_fetch_assoc($tempRecords))) {\n\n\t\t\t//log error\n\t\t\t$comment = \"FileUtil error missing type:{$type}\";\n\t\t\t$GLOBALS['globalref'][4]->LogEvent(\"FILEUTIL\", $comment, 3);\r\n\r\n\t\t\treturn -1;\r\n\t\t}\n\n\t\t$typeID = $row[\"FTypeID\"];\n\n\n\n\t\t//get md5sum and size of file\n\t\t$md5sum = md5_file($fileLoc);\n\n\t\t$size = filesize($fileLoc);\n\t\t\n\t\t//read in file as blob\n\t\t$handle = fopen($fileLoc, \"r\");\r\n\t\t$contents = fread($handle, $size);\n\n\t\t$contents = $ODODBO->EscapeMe($contents);\n\t\t\r\n\t\tfclose($handle);\n\r\n\t\t$ODODBO->startTransaction();\r\n\n\t\t$query = \"INSERT INTO ODOFiles(Name, BFile, Description, chksum, Size, PermFlag, FTypeID) values('{$fileName}',\";\n\t\t$query .= \"'{$contents}',\";\n\t\t$query .= \"'{$Description}','{$md5sum}',{$size},\";\r\n\n\t\tif(($groups != null)&&(count($groups)>0)) {\n\t\t\t$query .= \"1,\";\n\t\t} else {\n\t\t\t$query .= \"0,\";\n\t\t}\r\n\n\t\t$query .= \"{$typeID})\";\n\r\n\t\t$tempRecords = $ODODBO->Query($query);\r\n\n\t\tif($ODODBO->GetNumRowsAffected() < 1) {\r\n\t\t\t$ODODBO->rollBack();\n\t\t\t$_SESSION[\"ODOLoggingO\"]->LogEvent(\"FILEUTIL\", \"Insert failed for file {$fileLoc}\", 5);\r\n\t\t\treturn -1;\r\n\t\t}\n\n\t\t//get last insert id\n\t\t$tempFID = $ODODBO->LastInsertID();\n\n\t\tif(count($groupIDs)>0) {\r\n\n\t\t\tforeach($groupIDs as $GID) {\n\t\t\t\t$query = \"INSERT INTO GroupsForFiles(GID,FID) values({$GID},{$tempFID})\";\n\t\t\t\t$tempRecords = $ODODBO->Query($query);\r\n\r\n\t\t\t\tif($ODODBO->GetNumRowsAffected() < 1) {\r\n\t\t\t\t\t$ODODBO->rollBack();\n\t\t\t\t\t$_SESSION[\"ODOLoggingO\"]->LogEvent(\"FILEUTIL\", \"Insert failed for file {$fileLoc}\", 5);\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t}\n\t\t\t}\r\n\t\t}\n\r\n\t\tif(!$ODODBO->commit()) {\r\n\t\t\t$_SESSION[\"ODOLoggingO\"]->LogEvent(\"FILEUTIL\", \"Commit failed for inserting file.\", 5);\r\n\t\t\treturn -1;\r\n\t\t}\r\n\n\t\t$fid = $tempFID;\n\n\t\treturn $fid;\n\t}",
"public function testComAdobeCqSocialFilelibraryClientEndpointsFilelibraryDownloadGe()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.social.filelibrary.client.endpoints.FilelibraryDownloadGetServlet';\n\n $crawler = $client->request('POST', $path);\n }",
"public function uploadBannerFile() {\n\t\ttry {\n\t\t\t$data = json_decode(file_get_contents('php://input'), true);\n\n\t\t\t// TODO: Organize files in sub-dirs by group name.\n\t\t\t\n\t\t\t$file = base64_decode($data['file']);\n\t\t\t// TODO: If the directory doesn't exist create it.\n\t\t\t$success = @file_put_contents(BASE_PATH . '/public/banners/' . $data['name'], $file);\n\t\t\tif ($success === false) {\n\t\t\t\tthrow new Exception(\"Could not write to file \" . BASE_PATH . '/public/banners/' . $data['name']);\n\t\t\t}\n\t\t\t\n\t\t\t$user = $this->getUserFromAccessToken($_GET['access_token']);\n\t\t\tif ($user == null) {\n\t\t\t\tthrow new Exception(\"Invalid access token.\");\n\t\t\t}\n\t\t\t\n\t\t\t$group = '';\n\t\t\tif ($user->getGroup() !== null) {\n\t\t\t\t$group = $user->getGroup()->getMachineName() . '/';\n\t\t\t}\n\n\t\t\t$response = array(\n\t\t\t\t'url' => BASE_URL . '/banners/' . $group . rawurlencode($data['name'])\n\t\t\t);\n\n\t\t\t$this->respond($response);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t$this->respondError($e->getMessage() . \" in \" . $e->getFile() . \" on line \" . $e->getLine() . \"\\n\" . $e->getTraceAsString());\n\t\t}\n\t}",
"public function test_addExternalShipmentTag() {\n\n }",
"private function _addFile($file, $params)\n {\n $this->_files[basename($file)] = $this->_element->insertFile(\n basename($file),\n $params['role'],\n $this->_getFileInsertionPoint(basename($file))\n );\n }",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function testAddVendorComplianceSurveyFile()\n {\n }",
"function put_file_from_url($sourceUrl, $folderId, $filename){\n\n\t\t$r2s = skydrive_base_url.$folderId.\"/files/\".$filename.\"?access_token=\".$this->access_token;\n\n\t\t\n\n\t\t$chunkSizeBytes = 1 * 1024 * 1024; //1MB\n\n\t\t\n\n\t\t//download file first to tempfile\n\n\t\t$tempFilename = tempnam(\"/tmp\", \"UPLOAD\");\n\n\t\t$temp = fopen($tempFilename, \"w\");\n\n\t\t\n\n\t\t$handle = @fopen($sourceUrl, \"rb\");\n\n\t\tif($handle === FALSE){\n\n\t\t\tthrow new Exception(\"Unable to download file from \" . $sourceUrl);\n\n\t\t}\n\n\t\t\n\n\t\twhile (!feof($handle)) {\n\n\t\t\t$chunk = fread($handle, $chunkSizeBytes);\n\n\t\t\tfwrite($temp, $chunk);\n\n\t\t}\t\t\n\n\t\t\n\n\t\tfclose($handle);\n\n\t\tfclose($temp);\n\n\t\t\n\n\t\t//upload to OneDrive\n\n\t\t$response = $this->curl_put($r2s, $tempFilename);\n\n\t\tif (@array_key_exists('error', $response)) {\n\n\t\t\tthrow new Exception($response['error'].\" - \".$response['description']);\n\n\t\t\texit;\n\n\t\t} else {\n\n\t\t\tunlink($tempFilename);\n\n\t\t\treturn $response;\n\n\t\t}\n\n\t}",
"public function test_servefile_route() {\n global $CFG;\n list($user, , $talkpoint) = $this->_setup_single_user_in_single_talkpoint();\n\n // current time\n $now = time();\n\n // create a talkpoint\n $this->loadDataSet($this->createArrayDataSet(array(\n 'talkpoint_talkpoint' => array(\n array('id', 'instanceid', 'userid', 'title', 'uploadedfile', 'nimbbguid', 'mediatype', 'closed', 'timecreated', 'timemodified'),\n array(1, $talkpoint->id, $user->id, 'Talkpoint 001', 'mod_talkpoint_web_test.txt', null, 'file', 0, $now, $now),\n ),\n )));\n\n // spit a dummy existing file\n check_dir_exists($CFG->dataroot . '/into/mod_talkpoint/' . $talkpoint->id . '/1');\n file_put_contents($CFG->dataroot . '/into/mod_talkpoint/' . $talkpoint->id . '/1/mod_talkpoint_web_test.txt', 'dummy contents');\n\n // request the file\n $client = new Client($this->_app);\n $client->request('GET', '/servefile/1');\n $this->assertTrue($client->getResponse()->isOk());\n }",
"function push_file($remote_file, $file, $format = null)\n {\n $only = null;\n if ($format != '') {\n $only = $this->only_format($remote_file, $format);\n if ($only == false) {\n echo \"Толькo формати jpg, png, gif\\n\";\n\n return false;\n }\n }\n\n if (ftp_put($this->connect, $remote_file, $file, FTP_ASCII)) {\n echo \"$file успешно загружен на сервер\\n\";\n } else {\n echo \"Не удалось загрузить $file на сервер\\n\";\n }\n }",
"public function gavias_sliderlayer_upload_file(){\n global $base_url;\n $allowed = array('png', 'jpg', 'gif','zip');\n $_id = gavias_sliderlayer_makeid(6);\n if(isset($_FILES['upl']) && $_FILES['upl']['error'] == 0){\n\n $extension = pathinfo($_FILES['upl']['name'], PATHINFO_EXTENSION);\n\n if(!in_array(strtolower($extension), $allowed)){\n echo '{\"status\":\"error extension\"}';\n exit;\n } \n $path_folder = \\Drupal::service('file_system')->realpath(gva_file_default_scheme(). \"://gva-sliderlayer-upload\");\n \n //$file_path = $path_folder . '/' . $_id . '-' . $_FILES['upl']['name'];\n //$file_url = str_replace($base_url, '',file_create_url(gva_file_default_scheme(). \"://gva-sliderlayer-upload\") . '/' . $_id .'-'. $_FILES['upl']['name']); \n \n $ext = end(explode('.', $_FILES['upl']['name']));\n $image_name = basename($_FILES['upl']['name'], \".{$ext}\");\n\n $file_path = $path_folder . '/' . $image_name . \"-{$_id}\" . \".{$ext}\";\n $file_url = str_replace($base_url, '',file_create_url(gva_file_default_scheme(). \"://gva-sliderlayer-upload\"). '/' . $image_name . \"-{$_id}\" . \".{$ext}\"); \n\n if (!is_dir($path_folder)) {\n @mkdir($path_folder); \n }\n if(move_uploaded_file($_FILES['upl']['tmp_name'], $file_path)){\n $result = array(\n 'file_url' => $file_url,\n 'file_url_full' => $base_url . $file_url\n );\n print json_encode($result);\n exit;\n }\n }\n\n echo '{\"status\":\"error\"}';\n exit;\n\n }",
"function local_banner_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array()) {\n global $CFG, $DB, $USER;\n\n if ($context->contextlevel != CONTEXT_COURSE) {\n return false;\n }\n\n // Ensure the filearea is the one used by this plugin.\n if ($filearea !== 'banners') {\n return false;\n }\n\n require_login($course, false, $cm);\n\n // When the file is stored, we use the $item id is the requestid.\n $itemid = array_shift($args);\n $filename = array_pop($args);\n\n if (!$args) {\n $filepath = '/';\n } else {\n $filepath = '/' . implode('/', $args) . '/';\n }\n\n $fs = get_file_storage();\n $file = $fs->get_file($context->id, 'local_banner', $filearea, $itemid, $filepath, $filename);\n if (!$file || $file->is_directory()) {\n return false;\n }\n\n send_stored_file($file, 0, 0, false);\n}",
"public function create( $url );",
"public function testAddExternalShipment()\n {\n }",
"public function testUploadFile()\n {\n // initialize the API client\n $config = (new Configuration())->setHost('http://petstore.swagger.io/v2');\n $api_client = new ApiClient($config);\n $pet_api = new Api\\PetApi($api_client);\n // upload file\n $pet_id = 10001;\n $response = $pet_api->uploadFile($pet_id, \"test meta\", \"./composer.json\");\n // return ApiResponse\n $this->assertInstanceOf('Swagger\\Client\\Model\\ApiResponse', $response);\n }",
"function add_file_obj($path = null, $media_type = null, $size = null, $duration = null, \n $container = null, $bitrate = null, $width = null, $height = null, \n $frames = null, $framerate = null, $samplerate = null)\n {\n array_push($this->file_objs, new FileObj($path, $media_type, $size, $duration, $container, $bitrate, $width, $height, $frames, $framerate, $samplerate));\n $this->update_files = 1;\n }",
"public function testFileRefs() {}"
] | [
"0.719052",
"0.6704658",
"0.6700121",
"0.6331982",
"0.6223605",
"0.6202839",
"0.6042983",
"0.6011462",
"0.5978323",
"0.5866754",
"0.5808024",
"0.5804502",
"0.573996",
"0.5668431",
"0.56314516",
"0.5616567",
"0.5586306",
"0.55138797",
"0.55037266",
"0.5491123",
"0.54792",
"0.5473093",
"0.5453068",
"0.5424763",
"0.5419783",
"0.5410384",
"0.5367066",
"0.5363042",
"0.5353803",
"0.53100115",
"0.5305836",
"0.5292005",
"0.5278013",
"0.52734816",
"0.52521217",
"0.52217895",
"0.52213097",
"0.5212301",
"0.5211823",
"0.5190476",
"0.5174658",
"0.51733273",
"0.51721007",
"0.51621914",
"0.51598233",
"0.5155087",
"0.51174533",
"0.5105119",
"0.5098166",
"0.5097087",
"0.5096243",
"0.50866747",
"0.5077011",
"0.5069083",
"0.5067684",
"0.5066933",
"0.50336576",
"0.50289613",
"0.50283563",
"0.5025224",
"0.50194687",
"0.49918023",
"0.49886283",
"0.4987058",
"0.49702352",
"0.49690956",
"0.49648327",
"0.49526682",
"0.49485922",
"0.49464065",
"0.49448818",
"0.49362296",
"0.49359664",
"0.49326804",
"0.49255964",
"0.49188277",
"0.49169797",
"0.49158233",
"0.49147022",
"0.49036768",
"0.4901975",
"0.49018168",
"0.489575",
"0.48865083",
"0.48820454",
"0.48701757",
"0.48642457",
"0.4860413",
"0.48559663",
"0.48555136",
"0.48537788",
"0.48525307",
"0.48513192",
"0.48452693",
"0.484495",
"0.48141116",
"0.47974312",
"0.47960797",
"0.47910932",
"0.4790686"
] | 0.80135447 | 0 |
Test case for addPackingPlanTag Add new tags for a packingPlan.. | public function testAddPackingPlanTag()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetPackingPlanTags()\n {\n }",
"function TestPlan_add_tag($plan_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.add_tag', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($tag_name, \"string\")), \"array\");\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testDeletePackingPlanTag()\n {\n }",
"public function test_addExternalShipmentTag() {\n\n }",
"public function test_addReplenishmentProcessTag() {\n\n }",
"public function testAddPackingPlan()\n {\n }",
"public function testAddExternalShipmentTag()\n {\n }",
"public function test_addLowStockTag() {\n\n }",
"public function testAddReplenishmentTag()\n {\n }",
"public function testAddPackingPlanAudit()\n {\n }",
"public function testAddOrderTag()\n {\n }",
"public function testAddLowStockTag()\n {\n }",
"public function test_addOrderLineActivityTag() {\n\n }",
"public function testAddVendorComplianceSurveyTag()\n {\n }",
"function TestCase_add_tag($case_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.add_tag', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testAddPackingPlanFile()\n {\n }",
"public function test_addItemCategoryTag() {\n\n }",
"public function test_addCustomerTag() {\n\n }",
"public function testGetExternalShipmentTags()\n {\n }",
"public function test_createTagRequest() {\n\n }",
"public function test_attachTagRequest() {\n\n }",
"private function addTag()\n {\n $params = array();\n $params['db_link'] = $this->db;\n $params['ticket_id'] = $_REQUEST['ticket_id'];\n \n $data = array();\n $tagTitle = stripslashes(trim($_REQUEST['tag']));\n $tag = Utils::sanitize($tagTitle);\n \n $Tickets = new Tickets($params);\n $Tickets->addTag($tag, $tagTitle);\n \n echo '[{\"isError\":0, \"message\":\"Successfully added tag\"}]';\n exit;\n }",
"public function testPostTag() : void\n {\n $request = [\n 'name' => static::$tagName\n ];\n\n $response = $this->actingAs(static::$user, 'api')\n ->post('/api/tag', $request);\n\n $response->assertStatus(201);\n\n $response->assertJsonStructure([\n 'id',\n 'name'\n ]);\n }",
"public function test_addBillingCodeTypeTag() {\n\n }",
"function TestRun_add_tag($run_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.add_tag', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testAddItemSubCategoryTag()\n {\n }",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function test_getReplenishmentProcessTags() {\n\n }",
"public function test_addLegacyLowstockContactTag() {\n\n }",
"public function test_addCartonActivityTag() {\n\n }",
"public function addNewTag($tagName) {\n $sql = \"INSERT INTO t_tags VALUES(?)\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"s\", $tagName);\n $select->execute();\n $select->close();\n }",
"public function testEditWithNewTag() {\n $this->markTestIncomplete('Not implemented yet.');\n }",
"public function testGetReplenishmentTags()\n {\n }",
"public function testGetPackingPlanById()\n {\n }",
"public function testUpdatePackingPlan()\n {\n }",
"public function test_getExternalShipmentTags() {\n\n }",
"public function testDeletePackingPlan()\n {\n }",
"public function testGetVendorComplianceSurveyTags()\n {\n }",
"public function testAddPackingPlanFileByURL()\n {\n }",
"public function testGetPackingPlanByFilter()\n {\n }",
"public function test_getTagRequest() {\n\n }",
"public function testTag()\n {\n $tag1 = $this->objFromFixture('Tag', 'tag1');\n $tag2 = $this->objFromFixture('Tag', 'tag2');\n $entry1 = $this->objFromFixture('News', 'item1');\n $entry2 = $this->objFromFixture('News', 'item2');\n $entry3 = $this->objFromFixture('News', 'item3');\n\n $this->assertEquals($tag1->News()->count(), 6, 'Tag 1 to items');\n $this->assertEquals($tag2->News()->count(), 4, 'Tag 2 to items');\n $this->assertEquals($entry1->Tags()->count(), 1, 'Tags on item 1');\n $this->assertEquals($entry2->Tags()->count(), 2, 'Tags on item 2');\n $this->assertEquals($entry3->Tags()->count(), 0, 'Tags on item 0');\n }",
"public function testGetTagByTagLabel() {\n\t\t// Count the number of rows and save this for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\n\t\t// Create a new tag and insert it into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAG_LABEL);\n\t\t$tag->insert($this->getPDO());\n\n\t\t// Grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Tag::getTagByTagLabel($this->getPDO(), $tag->getTagLabel());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\BrewCrew\\\\Tag\", $results);\n\n\t\t// Grab the result from the array and validate it\n\t\t$pdoTag = $results[0];\n\t\t$this->assertEquals($pdoTag->getTagLabel(), $this->VALID_TAG_LABEL);\n\t}",
"function add_tag($tag) {\n if (!is_object($tag)) {\n return false;\n }\n if (!isset($tag->name) or\n !isset($tag->value) or\n !isset($tag->ticketid) or\n isset($tag->id)){\n\n return false;\n }\n\n if (!insert_record('helpdesk_ticket_tag', $tag)) {\n return false;\n }\n\n // Lets make an update saying we added this tag.\n $dat = new stdClass;\n $dat->ticketid = $this->id;\n $dat->notes = get_string('tagaddedwithnameof', 'block_helpdesk') . $tag->name;\n $dat->status = HELPDESK_NATIVE_UPDATE_TAG;\n $dat->type = HELPDESK_UPDATE_TYPE_DETAILED;\n\n if(!$this->add_update($dat)) {\n notify(get_string('cantaddupdate', 'block_helpdesk'));\n }\n\n // Update modified time and refresh the ticket.\n $this->store();\n $this->fetch();\n return true;\n }",
"public function testGetLowStockTags()\n {\n }",
"public function testGetPackingPlanFiles()\n {\n }",
"function addCustomFieldPackage($lead_id, $astDB){\n\n\t$packages = $_POST['packages'];\n\t$astDB->where('lead_id', $lead_id);\n $query = $astDB->delete('field_package');\n\tif($packages != \"\"){\n\t\tforeach($packages as $key => $value){\n\t\t\t$newvalue = array_map(\"filterField\", $value);\n\t\t\t$newvalue['lead_id'] = $lead_id;\n\t\t\t$query = $astDB->insert('field_package', $newvalue);\n\t\t\t$newvalue = [];\n\t\t}\n\t}\n}",
"public function test_getOrderLineActivityTags() {\n\n }",
"public function test_listBundlesForTagsRequest() {\n\n }",
"public function testDeleteExternalShipmentTag()\n {\n }",
"public function testGetValidPostTagByPostTagTagId() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount( \"postTag\" );\n\n\t\t// create a new PostTag and insert to into mySQL\n\t\t$postTag = new PostTag( $this->post->getPostId(), $this->tag->getTagId() );\n\t\t$postTag->insert( $this->getPDO() );\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = PostTag::getPostTagsByPostTagTagId( $this->getPDO(), $postTag->getPostTagTagId() );\n\t\t$this->assertEquals( $numRows + 1, $this->getConnection()->getRowCount( \"postTag\" ) );\n\t\t$this->assertCount( 1, $results );\n\t\t$this->assertContainsOnlyInstancesOf( \"Edu\\\\Cnm\\\\GigHub\\\\PostTag\", $results );\n\n\t\t// grab the result from the array and validate it\n\t\t$pdoPostTag = $results[0];\n\t\t$this->assertEquals( $pdoPostTag->getPostTagPostId(), $postTag->getPostTagPostId() );\n\t\t$this->assertEquals( $pdoPostTag->getPostTagTagId(), $postTag->getPostTagTagId() );\n\t}",
"public function testGetOrderTags()\n {\n }",
"public function testAddElementToBag()\n {\n $this->populateBag();\n $this->assertEquals(3, $this->bag->count());\n\n }",
"public function testDeleteLowStockTag()\n {\n }",
"private function _addTags()\n {\n $metadata = $this->getRecordMetadata();\n $this->_record->addTags($metadata[self::TAGS]);\n }",
"public function testDeleteReplenishmentTag()\n {\n }",
"public function testUpdatePackingPlanCustomFields()\n {\n }",
"public function add_to_basket_new_post() {\n $user_id = $this -> post('user_id') ? $this -> post('user_id') : \"\";\n $special_id = (int) $this -> post('special_id') ? (int) $this -> post('special_id') : 0;\n $product_id = $this -> post('product_id') ? $this -> post('product_id') : \"\";\n $product_count = (int) $this -> post('product_count') ? (int) $this -> post('product_count') : \"1\";\n $addToShoppingList = trim($this -> post('add_to_shopping_list')) ? strtolower($this -> post('add_to_shopping_list')) : \"no\";\n $retailerId = (int) $this->post('retailer_id') ? (int)$this->post('retailer_id') : 0;\n $storeId = (int) $this->post('store_id') ? (int) $this->post('store_id') : 0;\n \n $allToAdd = \"No\";\n $isProductExist = \"No\";\n \n if($storeId > 0 )\n {\n $storeDetails = $this -> basketmodel -> get_store_retailer_details($storeId);\n $storeTypeId = $storeDetails['StoreTypeId'];\n }else{\n # Get user preference\n $user_preference = $this -> usermodel ->get_user_preference($user_id);\n\t\t\t\n if($user_preference)\n {\n $retailerId = $user_preference['RetailerId'];\n $storeTypeId = $user_preference['StoreTypeId'];\n $storeId = $user_preference['StoreId'];\n }\n }\n \n # Get products StorePrice \n $productStorePrice = $this -> productmodel ->get_product_store_price($product_id,$retailerId,$storeTypeId,$storeId);\n \n if($productStorePrice > 0 )\n {\n $allToAdd = \"Yes\"; \n }\n \n if($allToAdd == \"Yes\")\n {\n $result = $this -> basketmodel -> add_to_basket($special_id, $product_id, $user_id, $product_count);\n \n \n # Add to shopping list starts\n if($addToShoppingList == 'yes'){ \n \n # Get shopping list\n $shopping_list = $this -> quickshoppingmodel -> get_list($user_id);\n\n $shopping_list_array = array();\n if (!empty($shopping_list['ShoppingList'])) {\n $shopping_list_array = explode(\",\", $shopping_list['ShoppingList']);\n }\n\n $item_details = array();\n if (!empty($shopping_list_array)) {\n foreach ($shopping_list_array as $item) {\n $item = str_replace('|||', ',', $item);\n $item_array = explode(':::', $item);\n\n $item_array['name'] = $item_array[0];\n $item_array['product_id'] = $item_array[1];\n $item_array['retailer_id'] = $item_array[2];\n $item_array['store_type_id'] = $item_array[3];\n $item_array['store_id'] = $item_array[4];\n \n if( $item_array['product_id'] == $product_id){\n $item_array['count'] = $product_count;\n $isProductExist = \"Yes\";\n }else{\n $item_array['count'] = $item_array[5];\n }\n \n $item_array['bought'] = isset($item_array[6]) ? $item_array[6] : '0';\n\n unset($item_array[0], $item_array[1], $item_array[2], $item_array[3], $item_array[4], $item_array[5], $item_array[6]);\n $item_array['is_special'] = \"0\";\n\n $user_pref_retailer = $this -> basketmodel -> get_user_preferred_retailer($user_id);\n $product = $this -> productmodel -> product_details($item_array['product_id'], $user_pref_retailer -> Id, $user_id,$special_id);\n\n $product_price = $product['store_price'];\n if ($product['SpecialPrice'] > 0) {\n $product_price = $product['SpecialPrice'];\n $item_array['is_special'] = \"1\";\n }\n if ($product['SpecialPrice'] > 0 && $product['SpecialQty'] > 1) {\n $product_price = $product['SpecialPrice'] / $product['SpecialQty'];\n }\n if ($item_array['count'] > 1) {\n $product_price = $product_price * $item_array['count'];\n }\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n\n if ($product_price <= 0) {\n $product_price = '0.00';\n }\n else {\n $product_price = $product_price . '.00';\n }\n $item_array['price'] = $product_price;\n }\n else {\n $product_price = round($product_price, 2);\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n $product_price = $product_price . '.00';\n }\n elseif(strlen($prod_price_arr[1]) === 1){\n $product_price = $prod_price_arr[0].'.'.$prod_price_arr[1].'0';\n }\n $item_array['price'] = $product_price.'';\n }\n\n $item_details[] = $item_array;\n }\n }\n \n # Add new Item\n if( $isProductExist == \"No\" )\n { \n $userPreferrences = $this -> basketmodel -> get_user_preferred_retailer($user_id);\n $productDetails = $this -> productmodel -> product_details($product_id, $userPreferrences -> Id, $user_id,$special_id);\n\n $new_item_array = array ();\n $new_item_array['name'] = $productDetails['ProductName'];\n $new_item_array['product_id'] = $product_id;\n $new_item_array['retailer_id'] = $userPreferrences -> Id;\n $new_item_array['store_type_id'] = $userPreferrences -> StoreTypeId;\n $new_item_array['store_id'] = $userPreferrences -> StoreId;\n $new_item_array['count'] = $product_count;\n $new_item_array['bought'] = '0';\n $new_item_array['is_special'] = '0';\n\n $product_price = $productDetails['store_price'];\n if ($productDetails['SpecialPrice'] > 0) {\n $product_price = $productDetails['SpecialPrice'];\n $new_item_array['is_special'] = \"1\";\n }\n if ($productDetails['SpecialPrice'] > 0 && $productDetails['SpecialQty'] > 0) {\n $product_price = $productDetails['SpecialPrice'] / $productDetails['SpecialQty'];\n }\n if ($new_item_array['count'] > 1) {\n $product_price = $product_price * $new_item_array['count'];\n }\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n if ($product_price <= 0) {\n $product_price = '0.00';\n }\n else {\n $product_price = $product_price . '.00';\n }\n $new_item_array['price'] = $product_price;\n }\n else {\n $product_price = round($product_price, 2);\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n $product_price = $product_price . '.00';\n }\n elseif(strlen($prod_price_arr[1]) === 1){\n $product_price = $prod_price_arr[0].'.'.$prod_price_arr[1].'0';\n }\n $new_item_array['price'] = $product_price.'';\n }\n $item_details[] = $new_item_array;\n }//if( $isProductExist = \"No\" )\n\n $shopping_list_string = '';\n $i = 0;\n foreach($item_details as $singleItem)\n {\n if ($i == 0) {\n $shopping_list_string .= $singleItem['name'] . ':::' . $singleItem['product_id'] . ':::' . $singleItem['retailer_id'] . ':::' . $singleItem['store_type_id'] . ':::' . $singleItem['store_id'] . ':::' . $singleItem['count'] . ':::' . $singleItem['bought'];\n }\n else {\n $shopping_list_string .= ',' . $singleItem['name'] . ':::' . $singleItem['product_id'] . ':::' . $singleItem['retailer_id'] . ':::' . $singleItem['store_type_id'] . ':::' . $singleItem['store_id'] . ':::' . $singleItem['count'] . ':::' . $singleItem['bought'];\n }\n $i++; \n }\n\n $shoppingListData = array(\n 'UserId' => $user_id,\n 'ShoppingList' => $shopping_list_string,\n 'CreatedOn' => date('Y-m-d H:i:s'),\n );\n //Save the user shopping list\n $resultShoppingList = $this -> quickshoppingmodel -> save_list($user_id, $shoppingListData);\n \n } //if($addToShoppingList == 'yes')\n # Add product to shopping list ends\n \n //$basket_count = $this -> basketmodel -> get_basket_count($user_id);\n $basket_count = $this -> basketmodel -> get_user_basket_count($user_id,$retailerId,$storeId);\n \n if ($result == 'duplicate') {\n $message = \"Product already added to basket\";\n $result = 0;\n }\n else {\n $message = \"Product added to basket successfully\";\n }\n\n if ($result) {\n $retArr['status'] = SUCCESS;\n $retArr['message'] = $message;\n $retArr['basket_count'] = $basket_count;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n else {\n $retArr['status'] = FAIL;\n $retArr['message'] = $message;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n \n }else{\n $retArr['status'] = FAIL;\n $retArr['message'] = \"Not allow to add this product.\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die; \n }\n }",
"public function testDeleteOrderTag()\n {\n }",
"public function add() {\n\t\t$this->display ( 'admin/tag/add.html' );\n\t}",
"protected function addTags ($tagsToAdd, $objectType, $partnerId)\r\n\t{\r\n\t \r\n\t foreach ($tagsToAdd as $tagToAdd)\r\n\t {\r\n\t if (strlen($tagToAdd) >= TagSearchPlugin::MIN_TAG_SEARCH_LENGTH)\r\n\t {\r\n \t $tag = new Tag();\r\n \t $tag->setTag(trim($tagToAdd));\r\n \t $tag->setObjectType($objectType);\r\n \t $tag->setPartnerId($partnerId);\r\n \t $tag->save();\r\n\t }\r\n\t }\r\n\t}",
"private function runTag()\n {\n $num = (int) $this->ask('How many records do you want to create for the tags table?');\n factory(Tag::class, $num)->create();\n }",
"public function testAddExternalShipmentAudit()\n {\n }",
"public function test_getLowStockTags() {\n\n }",
"public function testInsertValidTag() {\n\t\t// Count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\n\t\t// Create a new tag and insert it into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAG_LABEL);\n\t\t$tag->insert($this->getPDO());\n\n\t\t//Grab the data from mySQL and check the fields against our expectations\n\t\t$pdoTag = Tag::getTagByTagId($this->getPDO(), $tag->getTagId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertEquals($pdoTag->getTagLabel(), $this->VALID_TAG_LABEL);\n\t}",
"public function testDeleteVendorComplianceSurveyTag()\n {\n }",
"public function addTag($tag) {\n $this->init(); //it would actually work without it\n\n if (!in_array($tag,$this->tags)) {\n $tag = trim($tag);\n\n $this->tags['new'][] = $tag;\n return true;\n }\n\n return false;\n }",
"public function testTags()\n\t{\n\t\t$this->call('GET', '/api/tags');\n\t}",
"public function testGetTag() {\n $expected = [\n 'tag' => 'example',\n 'htmlTag' => 'example',\n 'template' => '',\n 'displayType' => Decoda::TYPE_BLOCK,\n 'allowedTypes' => Decoda::TYPE_BOTH,\n 'aliasFor' => '',\n 'attributes' => [],\n 'mapAttributes' => [],\n 'htmlAttributes' => [],\n 'aliasAttributes' => [],\n 'escapeAttributes' => true,\n 'lineBreaks' => Decoda::NL_CONVERT,\n 'autoClose' => false,\n 'preserveTags' => false,\n 'onlyTags' => false,\n 'contentPattern' => '',\n 'stripContent' => false,\n 'parent' => [],\n 'childrenWhitelist' => [],\n 'childrenBlacklist' => [],\n 'maxChildDepth' => -1,\n 'persistContent' => true\n ];\n\n $this->assertEquals($expected, $this->object->getTag('example'));\n\n try {\n $this->object->getTag('fakeTag');\n $this->assertTrue(false);\n } catch (\\Exception $e) {\n $this->assertTrue(true);\n }\n }",
"public function testGetTagbyValidTagId() {\n\t\t// Count the number of rows and save this for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\n\t\t// Create a new tag and insert it into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAG_LABEL);\n\t\t$tag->insert($this->getPDO());\n\n\t\t// Grab the data from mySQL and check the fields against our expectations\n\t\t$pdoTag= Tag::getTagByTagId($this->getPDO(), $tag->getTagId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertLessThan($pdoTag->getTagId(), 0);\n\t\t$this->assertEquals($pdoTag->getTagLabel(), $this->VALID_TAG_LABEL);\n\t}",
"public function test_addExternalShipmentAudit() {\n\n }",
"public function testInsertValidPostTag() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount( \"postTag\" );\n\n//\t\tvar_dump($this->post);\n\n\t\t// create a new PostTag and insert to into mySQL\n\t\t$postTag = new PostTag( $this->post->getPostId(), $this->tag->getTagId() );\n\t\t$postTag->insert( $this->getPDO() );\n\n//\t\tvar_dump($postTag);\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoPostTag = PostTag::getPostTagByPostTagTagIdAndPostTagPostId( $this->getPDO(), $postTag->getPostTagTagId(), $postTag->getPostTagPostId() );\n\t\t$this->assertEquals( $numRows + 1, $this->getConnection()->getRowCount( \"postTag\" ) );\n\t\t$this->assertEquals( $pdoPostTag->getPostTagPostId(), $postTag->getPostTagPostId() );\n\t\t$this->assertEquals( $pdoPostTag->getPostTagTagId(), $postTag->getPostTagTagId() );\n\n\t}",
"public function test_addExternalShipment() {\n\n }",
"public function test_deleteExternalShipmentTag() {\n\n }",
"public function testGetValidPostTagByPostTagPostId() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount( \"postTag\" );\n\n\t\t// create a new PostTag and insert to into mySQL\n\t\t$postTag = new PostTag( $this->post->getPostId(), $this->tag->getTagId() );\n\t\t$postTag->insert( $this->getPDO() );\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = PostTag::getPostTagsByPostTagPostId( $this->getPDO(), $postTag->getPostTagPostId() );\n\t\t$this->assertEquals( $numRows + 1, $this->getConnection()->getRowCount( \"postTag\" ) );\n\t\t$this->assertCount( 1, $results );\n\t\t$this->assertContainsOnlyInstancesOf( \"Edu\\\\Cnm\\\\GigHub\\\\PostTag\", $results );\n\n\t\t// grab the result from the array and validate it\n\t\t$pdoPostTag = $results[0];\n\t\t$this->assertEquals( $pdoPostTag->getPostTagPostId(), $postTag->getPostTagPostId() );\n\t\t$this->assertEquals( $pdoPostTag->getPostTagTagId(), $postTag->getPostTagTagId() );\n\t}",
"public function test_getItemCategoryTags() {\n\n }",
"public function add_to_basket_post() {\n $user_id = $this -> post('user_id') ? $this -> post('user_id') : \"\";\n $special_id = $this -> post('special_id') ? $this -> post('special_id') : \"\";\n $product_id = $this -> post('product_id') ? $this -> post('product_id') : \"\";\n $product_count = (int) $this -> post('product_count') ? (int) $this -> post('product_count') : \"1\";\n \n $retailerId = (int) $this->post('retailer_id') ? (int)$this->post('retailer_id') : 0;\n $storeId = (int) $this->post('store_id') ? (int) $this->post('store_id') : 0;\n \n \n $allToAdd = \"No\";\n \n if($storeId > 0 )\n {\n $storeDetails = $this -> basketmodel -> get_store_retailer_details($storeId);\n $storeTypeId = $storeDetails['StoreTypeId'];\n }else{\n # Get user preference\n $user_preference = $this -> usermodel ->get_user_preference($user_id);\n if($user_preference)\n {\n $retailerId = $user_preference['RetailerId'];\n $storeTypeId = $user_preference['StoreTypeId'];\n $storeId = $user_preference['StoreId'];\n }\n }\n \n # Get products StorePrice \n $productStorePrice = $this -> productmodel ->get_product_store_price($product_id,$retailerId,$storeTypeId,$storeId);\n \n if($productStorePrice > 0 )\n {\n $allToAdd = \"Yes\"; \n }\n \n if($allToAdd == \"Yes\")\n {\n $result = $this -> basketmodel -> add_to_basket($special_id, $product_id, $user_id, $product_count);\n\n //$basket_count = $this -> basketmodel -> get_basket_count($user_id);\n $basket_count = $this -> basketmodel -> get_user_basket_count($user_id,$retailerId,$storeId);\n \n if ($result == 'duplicate') {\n $message = \"Product already added to basket\";\n $result = 0;\n }\n else {\n $message = \"Product added to basket successfully\";\n }\n\n if ($result) {\n $retArr['status'] = SUCCESS;\n $retArr['message'] = $message;\n $retArr['basket_count'] = $basket_count;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n else {\n $retArr['status'] = FAIL;\n $retArr['message'] = $message;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n \n }else{\n $retArr['status'] = FAIL;\n $retArr['message'] = \"Not allow to add this product.\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die; \n }\n }",
"public function testCreateTagAdmin(): void\n {\n // given\n $expectedStatusCode = 200;\n $admin = $this->createUser([User::ROLE_USER, User::ROLE_ADMIN]);\n $this->logIn($admin);\n\n // when\n $crawler = $this->httpClient->request('GET', '/tag/create');\n $resultStatusCode = $this->httpClient->getResponse()->getStatusCode();\n $form = $crawler->selectButton('stwórz')->form();\n $form['tag[name]']->setValue('Test Tag');\n $this->httpClient->submit($form);\n $this->httpClient->followRedirect();\n\n // then\n $this->assertEquals($expectedStatusCode, $resultStatusCode);\n $this->assertStringContainsString('Dodawanie powiodło się', $this->httpClient->getResponse()->getContent());\n }",
"function addTestSuite(&$tsuiteMgr,&$argsObj,$container,&$hash)\r\n{\r\n $new_order = null;\r\n\r\n // compute order\r\n //\r\n // $nt2exclude=array('testplan' => 'exclude_me','requirement_spec'=> 'exclude_me','requirement'=> 'exclude_me');\r\n // $siblings = $tsuiteMgr->tree_manager->get_children($argsObj->containerID,$nt2exclude);\r\n // if( !is_null($siblings) )\r\n //{\r\n // $dummy = end($siblings);\r\n // $new_order = $dummy['node_order']+1;\r\n //}\r\n $ret = $tsuiteMgr->create($argsObj->containerID,$container['container_name'],\r\n $container['details'],\r\n $new_order,config_get('check_names_for_duplicates'),'block');\r\n \r\n $op['messages']= array('msg' => $ret['msg'], 'user_feedback' => '');\r\n $op['status']=$ret['status_ok'];\r\n\r\n if($ret['status_ok'])\r\n {\r\n $op['messages']['user_feedback'] = lang_get('testsuite_created');\r\n if($op['messages']['msg'] != 'ok')\r\n {\r\n $op['messages']['user_feedback'] = $op['messages']['msg'];\r\n }\r\n\r\n if(trim($argsObj->assigned_keyword_list) != \"\")\r\n {\r\n $tsuiteMgr->addKeywords($ret['id'],explode(\",\",$argsObj->assigned_keyword_list));\r\n }\r\n writeCustomFieldsToDB($tsuiteMgr->db,$argsObj->tprojectID,$ret['id'],$hash);\r\n }\r\n return $op;\r\n}",
"function InfAddTag($inf_contact_id, $inf_tag_id) {\n\treturn Infusionsoft_ContactService::addToGroup($inf_contact_id, $inf_tag_id);\t\t\n}",
"function createVMPool($name, $tagid){\n\t// Get \"VM Cluster\" dict key\n\t$vmClusterTypeID = usePreparedSelectBlade(\"select * from Dictionary where dict_value = 'VM Cluster'\")->fetch(PDO::FETCH_ASSOC);\n\t$vmClusterTypeID = $vmClusterTypeID['dict_key'];\t\n\t// Add the pool, with the proper type and tags\n\t$taglist = array($tagid);\n\t$poolID = commitAddObject($name,$name,$vmClusterTypeID,'',$taglist);\n\t\n\t// return the pool ID\n\treturn $poolID;\n}",
"function addATag() {\n $query = \"INSERT INTO PushpinTags SET tags = '$this->tag', pushpin_ID = LAST_INSERT_ID();\";\n\n // prepare query\n $stmt = $this->conn->prepare($query);\n\n // execute query\n if($stmt->execute()){\n return true;\n }\n return false;\n }",
"public function testGetOrderPackData()\n {\n }",
"public function test_deleteLowStockTag() {\n\n }",
"public function test_listTagsRequest() {\n\n }",
"public function test_detachTagRequest() {\n\n }",
"static function addTag($tags){\n\t\t//fetch corresponding tagids\n\t\t$length = count($tags);\n\t\t$db = (new Database)->connectToDatabase();\n\t\tfor($i=0;$i<$length;$i++){\n\t\t\t$db->query(\"SELECT * FROM tag_table WHERE tag_name='$tags[i]'\");\n\t\t\tif($db->returned_rows==0){\n\t\t\t\t//no tag found in tag table... so add it\n\t\t\t\t$db->query(\"INSERT INTO tag_table (tag_name) VALUES ('$tag[i]')\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//check if tag already there with post?\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t\n\t}",
"function tagAdd($pid, $post = array('tag_list' => ''), $query = array(), $rawJson = false) {\n \t\t/**\n \t\t * We currently have to do the following to bypass a php to\n \t\t * rails conflict with the meaning of [] in form field names.\n \t\t * With the following, we only need to name our field \"taggable\",\n \t\t * or tag_list, but \"taggable[tag_list]\" is also supported\n \t\t */\n \t if ( isset($post['tagging']) ) {\n \t $tmp = $post['tagging'];\n \t\t unset($post['tagging']);\n \t\t if ( is_array($post['tagging']) ) {\n \t\t foreach ($tmp as $key => $value)\n \t\t $post[\"tagging[$key]\"] = $value;\n \t\t} else {\n \t\t $post['tagging[tag_list]'] = $tmp;\n \t\t}\n \t\t} elseif ( isset($post['tag_list']) ) {\n \t\t $tmp = $post['tag_list'];\n \t\t unset($post['tag_list']);\n \t\t $post['tagging[tag_list]'] = $tmp;\n \t\t}\n \t\t\n \t\t$post['tagging[tag_list]'] = stripslashes($post['tagging[tag_list]']);\n \t\t\n \t\tif ( $json = $this->_post('/merchants/'.$pid.'/taggings.json', $post, 'post', $query, true) )\n \t\t return $this->_parseApi($json, $rawJson);\n \t\telse\n \t\t\treturn false;\n \t}",
"public function testGetTags() {\n $this->assertEquals([\n 'example',\n 'template',\n 'templateMissing',\n 'inline',\n 'inlineAllowInline',\n 'inlineAllowBlock',\n 'inlineAllowBoth',\n 'block',\n 'blockAllowInline',\n 'blockAllowBlock',\n 'blockAllowBoth',\n 'attributes',\n 'fooBar',\n 'parent',\n 'parentNoPersist',\n 'parentWhitelist',\n 'parentBlacklist',\n 'whiteChild',\n 'blackChild',\n 'depth',\n 'lineBreaksRemove',\n 'lineBreaksPreserve',\n 'lineBreaksConvert',\n 'pattern',\n 'autoClose',\n 'aliasBase',\n 'aliased'\n ], array_keys($this->object->getTags()));\n }",
"public function testGetPostByTags()\n {\n $this->call('Get', '/post/tags/phpunit,test');\n $this->seeHeader('content-type', 'application/json');\n $this->seeStatusCode(200);\n }",
"public function testAddLowStockAudit()\n {\n }",
"public function testGetItemSubCategoryTags()\n {\n }",
"function add_tag($tag) {\n array_push($this->tags, $tag);\n }",
"function TestPlan_get_tags($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_tags', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function test_getBillingCodeTypeTags() {\n\n }",
"public function testJobAdd()\n {\n\n }",
"public function testAddExternalShipment()\n {\n }",
"public function testPingTreeAddTargets()\n {\n }",
"function test() {\n\t\t$batches_tags = array('1281421709'=>'Oregon',\n\t\t\t\t'1281422166'=>'SF Bay', \n\t\t\t\t'1281422334'=>'New England', \n\t\t\t\t'1281422998'=>'DC' );\n\n\t\t// get assets for user=2010\n\t\t$options = array(\n\t\t\t'conditions'=>array('Asset.owner_id'=>'4c5f9050-d8bc-4baa-ad2d-03b0f67883f5')\n\t\t\t, 'recursive'=>-1\n\t\t\t, 'fields'=>'Asset.id, Asset.batchId, Asset.json_src, Asset.dateTaken, Asset.owner_id'\n\t\t\t, 'order'=>'dateTaken'\n\t\t\t, 'permissionable'=>false\n\t\t);\n\t\t$data = $this->Asset->find('all', $options);\n\t\t$batchData = Set::combine($data, '/Asset/id', null, '/Asset/batchId');\n\t\tforeach ($batchData as $batchId=>$asset_keys){\n\t\t\t$assetIds = array_keys($asset_keys);\n\t\t\t$tagString = $batches_tags[$batchId];\n\t\t\t//\t\t\t\t\tdebug($assetIds);\n\t\t\tforeach($assetIds as $assetId) {\n\t\t\t\t$ret = $this->__addTag($tagString, $assetId);\n\t\t\t\tif (!$ret) {\n\t\t\t\t\t$errors[] = \"Error tagging: {$assetId} => {$tagString}\";\n\t\t\t\t} else $success[] = \"tagged: {$assetId} => {$tagString}\";\n\t\t\t}\n\t\t}\n\t\tdebug($errors);\n\t\tdebug($success);\n\t}",
"public function testQueueBuilding()\n {\n\n $contract = $this->getScenarioContract();\n $collection = $this->getScenarioCollection();\n\n $probFactory = new \\CsCannon\\MetadataProbeFactory();\n\n $probFactory->populateLocal();\n $probe = $probFactory->getOrCreate($collection,$contract,'null');\n\n\n $this->assertInstanceOf(\\CsCannon\\MetadataProbe::class,$probe,'Could not laod prob');\n\n\n $erc721_3 = \\CsCannon\\Blockchains\\Ethereum\\Interfaces\\ERC721::init(3);\n $erc721_4 = \\CsCannon\\Blockchains\\Ethereum\\Interfaces\\ERC721::init(4);\n $erc721_1 = \\CsCannon\\Blockchains\\Ethereum\\Interfaces\\ERC721::init(1); //this should exist already\n\n $probe->queue($erc721_3);\n\n // $probe->queue($erc721_3,$erc721_4,$erc721_1);\n while($probe->executeQueue()) {\n\n sleep(1);\n\n\n }\n\n\n }"
] | [
"0.7443316",
"0.7109381",
"0.69109",
"0.6716628",
"0.6704143",
"0.6696913",
"0.6470231",
"0.6455306",
"0.6453562",
"0.64048386",
"0.63709253",
"0.627634",
"0.6233461",
"0.6232321",
"0.6210739",
"0.6147645",
"0.6126428",
"0.6117921",
"0.61094236",
"0.60676575",
"0.6034293",
"0.60337037",
"0.6030296",
"0.602146",
"0.6005843",
"0.5987125",
"0.5966159",
"0.5866529",
"0.5833577",
"0.582163",
"0.5805809",
"0.5705257",
"0.5699573",
"0.56932265",
"0.5653043",
"0.5601677",
"0.55778",
"0.555091",
"0.5549418",
"0.55327564",
"0.5532041",
"0.55227005",
"0.55150473",
"0.54674673",
"0.545527",
"0.5439701",
"0.54291433",
"0.54251856",
"0.54204",
"0.5387917",
"0.53623044",
"0.53413004",
"0.5329377",
"0.532373",
"0.53210974",
"0.5303742",
"0.528965",
"0.5268981",
"0.52540916",
"0.5250679",
"0.52499807",
"0.5249666",
"0.5232936",
"0.5224769",
"0.5212317",
"0.51824164",
"0.51697195",
"0.51664907",
"0.5160904",
"0.51592475",
"0.5154629",
"0.51499236",
"0.5133815",
"0.5132383",
"0.513136",
"0.51309687",
"0.5124492",
"0.5118221",
"0.51109546",
"0.51080513",
"0.5098079",
"0.5096842",
"0.50880486",
"0.50843954",
"0.5079989",
"0.50798553",
"0.50777435",
"0.5063308",
"0.5061353",
"0.5060813",
"0.5055308",
"0.5052057",
"0.5048285",
"0.5047089",
"0.5031976",
"0.50317615",
"0.502667",
"0.50069636",
"0.49873945",
"0.49830762"
] | 0.8144903 | 0 |
Test case for deletePackingPlan Delete a packingPlan. | public function testDeletePackingPlan()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testDeletePackingPlanTag()\n {\n }",
"public function testDeletePackingPlanFile()\n {\n }",
"function delete($id_plan) {\r\n $sql = \"DELETE FROM planes WHERE planes.id_plan ='\" . $id_plan . \"'\";\r\n\r\n $response = getResultSQL($sql);\r\n if (!$response) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }",
"public function delete_plan() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n # Set up query\n $q = \"DELETE FROM plans\n\t\t\t WHERE plan_id=\".$_POST['plan_id'];\n $plans = DB::instance(DB_NAME)->query($q);\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n print json_encode($jTableResult);\n }",
"public function plan_delete( $plan_id ) {\r\n\t\treturn $this->_send_request( 'plans/'.$plan_id, array(), STRIPE_METHOD_DELETE );\r\n\t}",
"public function deletePlan(Plan $plan){\n $this->open();\n\n $result = $this->query('DELETE FROM '.$this->TABLE_NAME.' WHERE id=:id', array(\n new QueryParam(':id', $plan->id, PDO::PARAM_INT)\n )\n );\n\n $this->close();\n\n return $result;\n }",
"public function deletePlan($plan)\n {\n Stripe\\Plan::retrieve($plan->level)->delete();\n }",
"public function deleted(PlanSubscription $planSubscription)\n {\n //\n }",
"public function delete_plan($planId){\n try {\n $createdPlan = new Plan();\n $createdPlan->setId($planId);\n $result = $createdPlan->delete($this->_api_context);\n $returnArray['RESULT'] = 'Success';\n $returnArray['DELETE_PLAN'] = $result->toArray();\n $returnArray['RAWREQUEST']='{id:'.$planId.'}';\n $returnArray['RAWRESPONSE']=$result->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }",
"public function destroy(Plan $plan) {\n \n }",
"public function destroy(Plan $plan)\n {\n //\n }",
"public function Deleteplan() {\n $plan_id = $this->input->post('plan_id');\n $data = array(\n 'plan_id' => $plan_id\n );\n $this->load->view('admin/plan/delete_plan', $data);\n }",
"function TestCase_unlink_plan($case_id, $plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.unlink_plan', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"function delete_plan()\n {\n #check user access\n check_user_access($this, 'delete_procurement_plan', 'redirect');\n\n # Get the passed details into the url data array if any\n $urldata = $this->uri->uri_to_assoc(3, array('m', 's'));\n\n # Pick all assigned data\n $data = assign_to_data($urldata);\n\n if(!empty($data['i'])){\n $result = $this->db->query($this->Query_reader->get_query_by_code('deactivate_item', array('item'=>' procurement_plans', 'id'=>decryptValue($data['i'])) ));\n \n #deactivate the entries\n if($result)\n {\n $this->db->where('procurement_plan_id', decryptValue($data['i']));\n $this->db->update('procurement_plan_entries', array('isactive'=>'N'));\n }\n }\n\n if(!empty($result) && $result){\n $this->session->set_userdata('dbid', \"The plan and it's entries have been successfully deleted.\");\n }\n else if(empty($data['msg']))\n {\n $this->session->set_userdata('dbid', \"ERROR: The procurement plan could not be deleted or were not deleted correctly.\");\n }\n\n if(!empty($data['t']) && $data['t'] == 'super'){\n $tstr = \"/t/super\";\n }else{\n $tstr = \"\";\n }\n redirect(base_url().\"procurement/page/m/dbid\".$tstr);\n }",
"function deletePlanModules($conn, $planID){\n\n\t\n\t$sql = \"DELETE FROM plancomponent WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n\n}",
"public function deleteFlatplan ($slug, $plan){\n\t\ttry{\n\t\t\t$org = Organization::where('slug', '=', $slug)->firstOrFail();\n\t\t\t$flatplan = Flatplan::where('organization_id', '=', $org->id)->where('slug', '=', $plan)->firstOrFail();\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\treturn View::make('fourOhFour');\n\t\t}\n\t\ttry{\n\t\t\t$role = Role::where('organization_id', '=', $org->id)->where('user_id', '=', Auth::user()->id)->firstOrFail();\n\t\t}\n\t\tcatch (Exception $e){\n\t\t\treturn Redirect::to('/'.$org->slug)->with('flash_message', 'You do not have permission to edit this organization');\n\t\t}\n\t\tif($role->permissions == 'edit'){\n\t\t\t$pages = Page::where('flatplan_id', '=', $flatplan->id)->get();\n\t\t\tif($pages){\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\t\t\t\tforeach ($pages as $page) {\n\t\t\t\t\t$assignments = Assignment::where('page_id', '=', $page->id)->get();\n\t\t\t\t\tif($assignments){\n\t\t\t\t\t\tforeach($assignments as $assignment){\n\t\t\t\t\t\t\t$assignment->delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$page->delete();\n\t\t\t\t}\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\t\t\t}\n\t\t\t$flatplan->delete();\n\t\t\treturn Redirect::to('/'.$org->slug)->with('flash_message', 'Flatplan deleted successfully');\n\t\t}\n\t\telse{\n\t\t\treturn Redirect::to('/'.$org->slug.'/'.$flatplan->slug.'/'.$page->page_number)->with('flash_message', 'You do not have permission to delete this flatplan');\n\t\t}\t\n\t}",
"public function eliminar($idplan)\n {\n include_once 'controlador/util/bd_conexion_pdo.php';\n\n $conexion = (new Conexion())->conectarPDO();\n\n $sentencia = $conexion->prepare(\"DELETE FROM plan WHERE idplan = :idplan\");\n $sentencia->bindParam(':idplan', $idplan);\n\n $sentencia->execute();\n\n $sentencia->closeCursor();\n\n $resultado = $sentencia->rowCount();\n\n $sentencia = null;\n $conexion = null;\n\n return $resultado;\n }",
"public function delete()\n {\n //recuperation des informations pour la suppression d'une matière\n $data = $this->request->data;\n $id_planing = (int)$data['id_planing'] ?? null;\n \n if (empty($id_planing)) {\n $this->_return('Veillez spécifier l\\'identifiant du programme à supprimer', false);\n }\n\n if (true === $this->model->exist('id_planing', (int)$data['id_planing'], 'Presences')) {\n $this->_return('impossible de supprimer ce planing car il comporte encore des presences ', false);\n }\n\n try {\n $this->model->remove($id_planing);\n $this->_return('La matière a étè supprimer avec succès', true);\n //code...\n } catch (Exception $e) {\n $this->_exception($e);\n }\n }",
"function deletePlan($conn){\n\n\tsession_start();\n\t\t$planID = $_SESSION['planID'];\n\tsession_write_close();\n\t\n\tdeletePlanModules($conn, $planID);\n\t\n\t$sql = \"DELETE FROM plan WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n\t\n\tsession_start();\n\t\tunset($_SESSION['planID']);\n\tsession_write_close();\n\t\n\t$return = ['message' => 'Successfully deleted the report'];\n\treturn $return;\n\n}",
"public function testGetPackingPlanById()\n {\n }",
"public function testCompanyManagementBackupsIdDelete()\n {\n\n }",
"public function destroy(Plancompta $plancompta)\n {\n //\n }",
"public function testDeleteProductUsingDELETE()\n {\n }",
"public function testDeleteReport() {\n $operator = $this->createOperator();\n $patient = $this->createPatient();\n $report = $this->createReport($patient);\n $this->actingAs($operator)->visit(\"dashboard\")->see(\"delete_$report->id\")\n ->press(\"delete_$report->id\")\n ->seePageIs(\"dashboard\")\n ->dontSee($patient->name)\n ->dontSee($report->report_name)\n ->dontSee(\"delete_$report->id\")\n ->dontSee($report->case_number);\n \n $this->deleteReport($report);\n $this->deleteUser($patient);\n $this->deleteUser($operator);\n }",
"public function deleteTest()\n {\n $this->assertEquals(true, $this->object->delete(1));\n }",
"public function testDebtorDelete()\n {\n $oDebtorDAO = new DebtorDAO();\n $oDebtor = $oDebtorDAO->findByCpfCnpj('01234567890');\n\n $this->assertTrue(!is_null($oDebtor->getId()));\n\n $oDebtor->delete();\n\n $oDebtor = $oDebtorDAO->findByCpfCnpj('01234567890');\n $this->assertFalse(!is_null($oDebtor->getId()));\n }",
"public function delete_business_package($post_data) {\n//echo \"<pre>\";print_r($data);exit();\n $this->db->where('id', $post_data['package_id']);\n $this->db->delete('business_programs');\n\n return true;\n }",
"function deleteInspectedBy($conn, $planID){\n\t$sql = \"DELETE FROM inspectedby WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n}",
"public function testDeleteExternalShipment()\n {\n }",
"public function test_delete() {\n global $DB;\n\n $startcount = $DB->count_records('course_modules');\n\n // Delete the course module.\n course_delete_module($this->quiz->cmid);\n\n // Now, run the course module deletion adhoc task.\n phpunit_util::run_all_adhoc_tasks();\n\n // Try purging.\n $recyclebin = new \\tool_recyclebin\\course_bin($this->course->id);\n foreach ($recyclebin->get_items() as $item) {\n $recyclebin->delete_item($item);\n }\n\n // Item was deleted, so no course module was restored.\n $this->assertEquals($startcount - 1, $DB->count_records('course_modules'));\n $this->assertEquals(0, count($recyclebin->get_items()));\n }",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function testProjectProjectIDInviteeInviteIDDelete()\n {\n }",
"public function destroy(Plan $plan)\n {\n foreach ($plan->grupos as $grupo) {\n $grupo->pivot->delete();\n }\n $plan->delete();\n return $this->index();\n }",
"public function testDelete()\n {\n \t$player_factory = factory(KillingMode::class)->create();\n\n \tKillingMode::first()->delete();\n\n $this->assertDatabaseMissing($player_factory->getTable(), [ 'mode' => $player_factory->mode ]);\n }",
"function testDelete()\r\n\t{\r\n\t\t$olap = new Olap($this->dbh);\r\n\t\t$cube = $olap->getCube($this->testCubeName);\r\n\t\t$cid = $cube->id;\r\n\t\t$olap->deleteCube($this->testCubeName);\r\n\t\t$this->assertFalse($this->dbh->TableExists(\"facts_\".$cid));\r\n\t\t$this->assertFalse($this->dbh->TableExists(\"dimdat_\".$cid));\r\n\t\t$this->assertEquals($this->dbh->GetNumberRows($this->dbh->Query(\"select id from dataware_olap_cubes where name='\".$this->testCubeName.\"'\")), 0);\r\n\t}",
"public function forceDeleted(PlanSubscription $planSubscription)\n {\n //\n }",
"public function testDeleteSupplierGroup()\n {\n }",
"public function test_deleteExternalShipment() {\n\n }",
"public function deleted(Plant $plant)\n {\n //\n }",
"function deleteContinueReport($conn, $planID){\n\t$sql = \"DELETE FROM temporaryreport WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n}",
"public function testAddPackingPlan()\n {\n }",
"public function testDeleteCampaignFromPromotionUsingDELETE()\n {\n }",
"public function testShouldDeleteAPayout()\n {\n $data = [\n 'customer' => ['id' => 1],\n 'currency' => ['iso' => 'XOF'],\n 'amount' => 1000,\n ];\n\n $body = [\n 'v1/payout' => [\n 'id' => 1,\n 'klass' => 'v1/payout',\n 'reference' => '109329828',\n 'amount' => 1000,\n 'status' => 'pending',\n 'customer' => [\n 'id' => 1,\n 'klass' => 'v1/customer',\n ],\n 'currency' => [\n 'id' => 1,\n 'klass' => 'v1/currency',\n 'iso' => 'XOF'\n ],\n 'mode' => 'mtn',\n 'created_at' => '2018-03-12T09:09:03.969Z',\n 'updated_at' => '2018-03-12T09:09:03.969Z',\n ]\n ];\n\n $this->mockRequest('post', '/v1/payouts', $data, $body);\n $payout = \\FedaPay\\Payout::create($data);\n\n $this->mockRequest('delete', '/v1/payouts/1');\n $payout->delete();\n }",
"public function testProjectAssignmentsDelete()\n {\n }",
"public function testDeleteChargeable()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->delete($this->url('chargeables/1'));\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'message'\n ]);\n }",
"static public function ctrBorrarPlan()\n\t{\n\t\tif(isset($_GET[\"idCurricular\"]))\n\t\t{\n\t\t\t$tabla = \"planes\";\n\t\t\t$datos = $_GET[\"idCurricular\"];\n\t\t\t$respuesta = ModeloPlanes::mdlBorrarPlanes($tabla,$datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo '<script> \n\t \t\t\t\t\tswal({\n\t \t\t\t\t\t\ttype: \"success\",\n\t \t\t\t\t\t\ttitle: \"Plan curricular ha sido borrado correctamente\",\n\t \t\t\t\t\t\tshowConfirmButton: true,\n\t \t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t \t\t\t\t\t\tcloseOnConfirm: false\n\t \t\t\t\t\t}).then((result)=>{\n\t \t\t\t\t\t\tif(result.value)\n\t \t\t\t\t\t\t{\n\t \t\t\t\t\t\t\twindow.location = \"PlanCurricular\";\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t\t})\n\n\t \t\t\t\t \t</script>';\n\t\t\t}\n\t\t}\n\t}",
"public function getConfirmDelete ($slug, $plan){\n\t\ttry{\n\t\t\t$org = Organization::where('slug', '=', $slug)->firstOrFail();\n\t\t\t$flatplan = Flatplan::where('organization_id', '=', $org->id)->where('slug', '=', $plan)->firstOrFail();\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\treturn View::make('fourOhFour');\n\t\t}\n\t\ttry{\n\t\t\t$role = Role::where('organization_id', '=', $org->id)->where('user_id', '=', Auth::user()->id)->firstOrFail();\n\t\t}\n\t\tcatch (Exception $e){\n\t\t\treturn Redirect::to('/'.$org->slug)->with('flash_message', 'You do not have permission to edit this organization');\n\t\t}\n\t\tif($role->permissions == 'edit'){\n\t\t\t$action = 'delete flatplan '.$flatplan->name;\n\t\t\t$additional = 'This will also delete all associated pages and assignments';\n\t\t\t$back = '/'.$org->slug;\n\t\t\t$url = '/'.$org->slug.'/'.$flatplan->slug.'/delete';\n\t\t\treturn View::make('confirmDelete')->with('action', $action)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->with('additional', $additional)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->with('back', $back)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->with('url', $url);\n\t\t}\n\t\telse{\n\t\t\treturn Redirect::to('/'.$org->slug.'/'.$flatplan->slug.'/'.$page->page_number)->with('flash_message', 'You do not have permission to delete this flatplan');\n\t\t}\n\t}",
"public function testDeletePromotionCampaignApplicationUsingDELETE()\n {\n }",
"public function deletePackage1($package_id)\r\n {\r\n $where = $this->getAdapter()->quoteInto('package_id = ?',$package_id);\r\n $this->delete($where);\r\n }",
"function delete_predefined_innovation_plan($id)\n {\n $status = $this->db->delete('predefined_innovation_plan', array(\n 'id' => $id\n ));\n $db_error = $this->db->error();\n if (! empty($db_error['code'])) {\n echo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n exit();\n }\n return $status;\n }",
"public function testDeletACart(){\n //$this->markTestSkipped('making a skipped AssertionTest');\n $result = self::$cart->delCustomerCart();\n $this->assertNull($result);\n // if it did not delete the item an exception occurs\n }",
"public function testDeleteFinancialStatementUsingDelete()\n {\n }",
"public function destroy($id)\n {\n Log::debug(\"DESTROY PLAN\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->deletePlan($id);\n\n if ($result['message'] == 'Success'){\n\n //return new StripeDeletedPlanResource($result['plan']);\n\n session()->flash('success', 'Plan deleted successfully.');\n \n return redirect( route ('plans.index') );\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n\n }",
"public function testDeleteVendorComplianceSurvey()\n {\n }",
"public function testDelete()\n {\n // test data\n $this->fixture->query('INSERT INTO <http://example.com/> {\n <http://s> <http://p1> \"baz\" .\n <http://s> <http://xmlns.com/foaf/0.1/name> \"label1\" .\n }');\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(2, \\count($res['result']['rows']));\n\n // remove graph\n $this->fixture->delete(false, 'http://example.com/');\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(0, \\count($res['result']['rows']));\n }",
"public function test_deleteExternalShipmentTag() {\n\n }",
"protected function deletePatch() {\n\t\t$sql = \"DELETE FROM\t\twcf\".WCF_N.\"_\".$this->type.\"template_patch \n\t\t\tWHERE\t\t\tpackageID = \".$this->packageID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t}",
"function deleteUnfinishedModules($conn, $planID){\n\t$sql = \"DELETE FROM incompletecomponents WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n}",
"public function testPingTreeDeletePingTree()\n {\n }",
"public function deleted(GroupProject $groupProject)\n {\n //\n }",
"public function destroy(PostponePlan $postpone)\n {\n $this->postponeRepository->delete($postpone);\n \n return redirect(\"users/{$postpone->plan_user->user->id}\")\n ->with('success', 'Plan reanudado correctamente');\n }",
"public function destroy($id) \n {\n try {\n\n // Get plan subscribers count\n $subscribers = PlanSubscription::where(['plan_id' => $id, 'canceled_immediately' => null, 'canceled_at' => null])->count();\n $plan = Plan::find($id);\n\n // Only delete if the plan has no subscribers\n if ( $subscribers >= 1 ) {\n \n $plan->active = 0;\n $plan->save();\n\n $message = 'This plan currently have active subscribers therefore it was only disabled';\n\n } \n else {\n\n // Delete from Stripe\n if ( config('services.stripe.key') && config('services.stripe.secret') ) {\n Stripe::plans()->delete($id);\n }\n\n\n // Delete From PayPal\n if ( config('services.paypal.enable') ) {\n\n $paypalPlan = \\PayPal\\Api\\Plan::get($plan->paypal_plan_id, $this->paypalApiContext);\n $paypalPlan->delete($this->paypalApiContext);\n \n }\n\n\n // Delete DB plan\n $plan->delete();\n\n\n $message = 'The plan was successfully deleted';\n\n }\n \n\n return response(['message' => $message], 200);\n \n } catch (Exception $e) {\n return response(['message' => $e->getMessage()], 500);\n }\n }",
"public function testDeleteAuthorizationDivision()\n {\n }",
"public function testUpdatePackingPlan()\n {\n }",
"public function destroy(Plan $tariff)\n {\n try {\n $tariff->delete();\n\n return redirect()->route('tariffs.index')->with('flash_message', 'با موفقیت حذف شد');\n }catch (\\Exception $e){\n return redirect()->back()->with('err_message', 'خطایی رخ داده است، لطفا مجددا تلاش نمایید');\n }\n }",
"public function testDeleteTask()\n {\n }",
"public function testDeleteGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function test_deleteQueue() {\n\n }",
"public function testDeleteOrder()\n {\n }",
"public function delete_posting($id_posting)\n {\n $response = $this->db->query(\"call group_kelas('delete_posting','{$id_posting}','','')\");\n $this->set_response($response, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }",
"public function testDeleteSurvey0()\n {\n }",
"public function testDeleteSurvey0()\n {\n }",
"public function testDeleteExternalShipmentFile()\n {\n }",
"public function Sumilla_Delete()\n {\n\t\t$datos = [\n\t\t\t\t\t\"cod_curso\"=> \"100048\", \n\t\t\t\t\t\"plan\" => env('PLAN'),\n\t\t\t\t\t\"texto\" => \"Lorem Ipsum\"\n\t\t\t\t]; \t\n \t$sumilla = Sumilla::create($datos);\n\t\t$request = [\n\t\t\t\"data\"=> [\n\t\t\t\t\"tipo\"=>\"sumillas\",\n\t\t\t\t\"id\"=> \"1\",\n\t\t\t\t\"cod_curso\"=> \"100048\",\n\t\t\t\t\"plan\" => env('PLAN'), \n\t\t\t\t\"semestre\" => env('SEMESTRE'),\n\t\t\t\t],\n\t\t\t];\n\t\t$this->post('api/deleteData', $request);\n\n\t\t$this->assertDatabaseMissing('sumillas',[ \n\t\t\t\t\t\"id\"=>1, \n\t\t\t\t\t\"cod_curso\"=> \"100048\", \n\t\t\t\t\t\"plan\" => env('PLAN'),\n \t\t\t\t\"texto\"=>\"Nuevo texto\"\n\t\t\t\t]);\n\n\n }",
"public function testDeleteProduct()\n // Ici je fais un test de suppression de produit\n {\n $response = $this->json('GET', '/api/products');\n // Vérifier le status de réussite.\n $response->assertStatus(200);\n // Je prend le premier produit [0]\n $product = $response->getData()[0];\n //Il faut etre connecté pour pouvoir supprimer\n $user = factory(\\App\\User::class)->create();\n //C'est une demande en DELETE à la place de POST \n $delete = $this->actingAs($user, 'api')->json('DELETE', '/api/products/'.$product->id);\n $delete->assertStatus(200);\n $delete->assertJson(['message' => \"Produit supprimé!\"]);\n }",
"public function testDelete()\n\t{\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/saddles/' . $saddle->id)\n\t\t\t ->assertStatus(200);\n\n\t\t$this->assertDatabaseMissing('saddles', ['id' => $saddle->id]);\n\t}",
"public function testWebinarPollDelete()\n {\n }",
"public function delete()\n\t{\n\t\t$id = $this->input->post('primary_id');\n\t\tif($this->mdl_plant->delete($id)) {\n\t\t\techo true;\n\t\t} else {\n\t\t\techo false;\n\t\t}\n\t}",
"public function test_delete_task()\n {\n Project::create([\n 'id' => 1,\n 'name' => 'Project nae', \n 'description' => 'Project description'\n ]);\n Task::create([\n 'id' => 200,\n 'name' => 'Task ndfame', \n 'priority' => 'high', \n 'schedule_date' => '2020-12-12 12:22:00',\n 'project_id' => 200\n ]);\n $response = $this->delete('/task/200');\n $response->assertStatus(302);\n }",
"public function testDeleteExternalShipmentTag()\n {\n }",
"public function testWebinarPanelistsDelete()\n {\n }",
"public function deleting(assignment $assignment)\n {\n //code...\n }",
"public function testDeleteChallengeTemplate()\n {\n }",
"public function test_deleteBillingCodeType() {\n\n }",
"private function deleteProject() {\r\n $this->clientOwnsProject();\r\n\r\n $q = $this->db->select('code')\r\n ->from('landingpage_collection')\r\n ->where('landingpage_collectionid', $this->project)\r\n ->get();\r\n $code = $q->row()->code;\r\n\r\n $this->db->where('landingpage_collectionid', $this->project)\r\n ->delete('mvt_level_to_page');\r\n\r\n $this->db->where('landingpage_collectionid', $this->project)\r\n ->delete('mvt_level');\r\n\r\n $this->db->where('landingpage_collectionid', $this->project)\r\n ->delete('mvt_factor');\r\n\r\n $this->db->where('landingpage_collectionid', $this->project)\r\n ->delete('collection_goals');\r\n\r\n $this->db->where('landingpage_collectionid', $this->project)\r\n ->delete('collection_goal_conversions');\r\n\r\n $this->db->where('landingpage_collectionid', $this->project)\r\n ->delete('page_group');\r\n\r\n $this->db->where('landingpage_collectionid', $this->project)\r\n ->delete('landing_page');\r\n\r\n $this->db->where('landingpage_collectionid', $this->project)\r\n ->delete('landingpage_collection');\r\n\r\n $this->syncCollectionGoals();\r\n $this->optimisation->flushCollectionCacheByCode($code);\r\n return $this->successResponse(200);\r\n }",
"public function testDeletePurchase()\n {\n $headers = $this->authenticate();\n\n $response = $this->json('DELETE', '/api/user/products/battery-4', [], $headers);\n $response->assertStatus(200);\n }",
"public function testDSTIdDelete()\n {\n }",
"public function testDelete()\n {\n }",
"public function testDeleteBrandUsingDELETE()\n {\n }",
"public function testDelete() {\n $this->initializePurgersService(['c']);\n $this->drupalLogin($this->adminUser);\n $this->drupalGet(Url::fromRoute($this->route, ['id' => 'id0']));\n $this->assertRaw('Yes, delete this purger!');\n $this->assertTrue(array_key_exists('id0', $this->purgePurgers->getPluginsEnabled()));\n $json = $this->drupalPostAjaxForm(Url::fromRoute($this->route, ['id' => 'id0'])->toString(), [], ['op' => 'Yes, delete this purger!']);\n $this->assertEqual('closeDialog', $json[1]['command']);\n $this->assertEqual('redirect', $json[2]['command']);\n $this->purgePurgers->reload();\n $this->assertTrue(is_array($this->purgePurgers->getPluginsEnabled()));\n $this->assertTrue(empty($this->purgePurgers->getPluginsEnabled()));\n $this->assertEqual(3, count($json));\n // Assert that deleting a purger that does not exist, passes silently.\n $json = $this->drupalPostAjaxForm(Url::fromRoute($this->route, ['id' => 'doesnotexist'])->toString(), [], ['op' => 'Yes, delete this purger!']);\n $this->assertEqual('closeDialog', $json[1]['command']);\n $this->assertEqual(2, count($json));\n }",
"public function testJobDelete()\n {\n\n }",
"public function testDeleteStmt()\n {\n $delete = $this->getConnection()\n ->delete()\n ('dummy_posts')\n ('blog_id = :id');\n return $this->assertEquals($delete, \"DELETE FROM dummy_posts WHERE blog_id = :id\");\n }",
"public function destroy(Peternak $peternak)\n {\n //\n }",
"public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/transaction/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Transaction', 'transactionId', self::$objectId);\n }",
"public function delete()\n {\n echo '客户要求减少一个需求' . PHP_EOL;\n }",
"public function testDeleteMessageOkay()\n {\n $this->deleteMessageTest(true);\n }",
"public function testDeleteGroupMember()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function deleteWithType(string $aggregateType): void;",
"public function delete($project_id)\n{\n $deleteQuery = \"DELETE FROM $this->table WHERE project_id = '$project_id'\";\n $selectQuery = \"SELECT * FROM $this->table WHERE project_id = '$project_id'\";\n\n $stmt = $this->link->prepare($selectQuery);\n $stmt->execute();\n $check = $stmt->rowCount();\n\n if ($check == 1) {\n $stmt = $this->link->prepare($deleteQuery);\n $stmt->execute();\n echo \"record deleted\";\n }else\n {\n echo \"record doesn't exists!\";\n }\n}",
"public function testWebinarPanelistDelete()\n {\n }"
] | [
"0.7143373",
"0.7074826",
"0.68252337",
"0.656634",
"0.6563426",
"0.65526646",
"0.65000063",
"0.6320457",
"0.61559975",
"0.6149151",
"0.6058827",
"0.6050592",
"0.6044464",
"0.60418653",
"0.59389263",
"0.58917886",
"0.5835245",
"0.5801051",
"0.5733828",
"0.5711874",
"0.56990176",
"0.56924707",
"0.56868625",
"0.5674415",
"0.5670732",
"0.56644344",
"0.56614",
"0.5658314",
"0.56303555",
"0.5594683",
"0.55945635",
"0.5584267",
"0.55821025",
"0.55765116",
"0.5570712",
"0.5568539",
"0.5567257",
"0.5563164",
"0.55591977",
"0.55517066",
"0.5530196",
"0.5520678",
"0.5517931",
"0.54979914",
"0.5474429",
"0.5447868",
"0.5445082",
"0.5439297",
"0.54342484",
"0.5430363",
"0.5416838",
"0.5413174",
"0.5406426",
"0.53833836",
"0.5374938",
"0.5372224",
"0.53570616",
"0.5349305",
"0.5348296",
"0.5345803",
"0.53456223",
"0.53010213",
"0.5295626",
"0.52946997",
"0.5283141",
"0.5280828",
"0.52791625",
"0.52784425",
"0.5272888",
"0.52714187",
"0.5271376",
"0.5271376",
"0.527017",
"0.52689624",
"0.5267649",
"0.5263449",
"0.5257429",
"0.5254114",
"0.52521664",
"0.52474463",
"0.5245988",
"0.5241336",
"0.5241009",
"0.5236563",
"0.5227936",
"0.52261436",
"0.52209723",
"0.52206147",
"0.52204126",
"0.5218655",
"0.5215485",
"0.5213852",
"0.52129567",
"0.52119374",
"0.5210597",
"0.521014",
"0.5201063",
"0.51918733",
"0.51909125",
"0.51874715"
] | 0.7878823 | 0 |
Test case for deletePackingPlanFile Delete a file for a packingPlan.. | public function testDeletePackingPlanFile()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testDeleteExternalShipmentFile()\n {\n }",
"public function testDeletePackingPlan()\n {\n }",
"public function testDeleteReplenishmentFile()\n {\n }",
"public function testDeleteOrderFile()\n {\n }",
"public function testDeleteFile()\n {\n\n }",
"public function testDeleteFile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testDeleteVendorComplianceSurveyFile()\n {\n }",
"public function testDeletePackingPlanTag()\n {\n }",
"public function testDeleteLowStockFile()\n {\n }",
"function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}",
"public function testDeleteItemSubCategoryFile()\n {\n }",
"public function delete($file) {\n\t}",
"public function deleteFile($adapter)\n {\n }",
"public function testDeleteWhenDepotFileDeleted()\n {\n $services = $this->getApplication()->getServiceManager();\n // Override the service container to set depot_storage_path\n $config = $services->get('config');\n $config['depot_storage']['base_path'] = '//depot/swarm-attachments';\n $services->setService('config', $config);\n $depot = $services->get('depot_storage');\n $services->get('p4_admin')->setService('depot_storage', $depot);\n $attachment = new Attachment($this->p4);\n $attachment->set(\n array(\n 'name' => 'test.txt',\n 'size' => 4,\n 'type' => 'text/plain',\n )\n );\n\n $tempFile = tempnam(DATA_PATH, 'attachtest');\n file_put_contents($tempFile, 'test');\n\n $attachment->save($tempFile);\n\n $attachmentId = $attachment->getId();\n $attachment = Attachment::fetch($attachmentId, $this->p4);\n\n $fileSpec = $attachment->get('depotFile');\n\n // certain conditions might cause $attachment->delete() to fail unexpectedly. Here, we try to simulate one.\n // the call to $depot->delete() that is *inside* $attachment->delete() will fail, but failure\n // should be caught and ignored.\n $depot->delete($fileSpec);\n $attachment->delete();\n\n // then, when an attempt is made to fetch the attachment record, it shouldn't exist.\n // this verifies that the attachment records are deleted cleanly.\n $attachmentRefetch = false;\n try {\n $attachmentRefetch = Attachment::fetch($attachmentId, $this->p4);\n } catch (NotFoundException $e) {\n if ($e->getMessage() != 'Cannot fetch entry. Id does not exist.') {\n throw $e;\n }\n }\n\n $this->assertSame(false, $attachmentRefetch);\n }",
"function Trigger_FileDelete1(&$tNG) {\r\r\n $deleteObj = new tNG_FileDelete($tNG);\r\r\n $deleteObj->setFolder(\"../assets/images/magasins/\");\r\r\n $deleteObj->setDbFieldName(\"photo2\");\r\r\n return $deleteObj->Execute();\r\r\n}",
"function Trigger_FileDelete2(&$tNG) {\r\r\n $deleteObj = new tNG_FileDelete($tNG);\r\r\n $deleteObj->setFolder(\"../assets/images/magasins/\");\r\r\n $deleteObj->setDbFieldName(\"photo3\");\r\r\n return $deleteObj->Execute();\r\r\n}",
"public function testAddPackingPlanFile()\n {\n }",
"protected function deleteProtocolFile() {}",
"abstract function delete_file($filepath);",
"public function testDeleteAttachment()\n {\n }",
"function delete() {\n\t\tif (!forge_check_perm ('tracker', $this->Artifact->ArtifactType->getID(), 'tech')) {\n\t\t\t$this->setPermissionDeniedError();\n\t\t\treturn false;\n\t\t}\n\t\t$res = db_query_params ('DELETE FROM artifact_file WHERE id=$1',\n\t\t\t\t\tarray ($this->getID())) ;\n\t\tif (!$res || db_affected_rows($res) < 1) {\n\t\t\t$this->setError('ArtifactFile: Unable to Delete');\n\t\t\treturn false;\n\t\t} else {\n\t\t\tArtifactStorage::instance()->delete($this->getID())->commit();\n\n\t\t\t$this->Artifact->addHistory('File Deleted',$this->getID().': '.$this->getName());\n\t\t\treturn true;\n\t\t}\n\t}",
"function Trigger_FileDelete(&$tNG) {\r\r\n $deleteObj = new tNG_FileDelete($tNG);\r\r\n $deleteObj->setFolder(\"../assets/images/magasins/\");\r\r\n $deleteObj->setDbFieldName(\"photo1\");\r\r\n return $deleteObj->Execute();\r\r\n}",
"public function testGetPackingPlanFiles()\n {\n }",
"function Trigger_FileDelete(&$tNG) {\n $deleteObj = new tNG_FileDelete($tNG);\n $deleteObj->setFolder(\"../images/quangcao/\");\n $deleteObj->setDbFieldName(\"taptinquangcao\");\n return $deleteObj->Execute();\n}",
"public function delete($filepath);",
"private function delete_file( $param ) {\n global $wpdb;\n $file_id = $param['file_id'];\n\n // unset other params first\n unset( $param['action'] );\n unset( $param['type'] );\n unset( $param['file_id'] );\n\n // add dtupdate to the parameter\n $param['dtupdate'] = $this->dtcreate();\n $param['deleteflg'] = 1;\n $param['file_id'] = (int)$file_id;\n\n $sql = <<<__SQL\nUPDATE\n hc_file\nSET\n dtupdate = %s,\n deleteflg = %d\nWHERE\n ID = %d\n__SQL;\n\n // prepare the sql\n $prepare = $wpdb->prepare( $sql, $param );\n\n try {\n // start the transaction\n $wpdb->query( 'START TRANSACTION' );\n // queue the query\n $res = $wpdb->query( $prepare );\n // commit the query\n $wpdb->query( 'COMMIT' );\n\n // check if unsuccessful insert\n if ( $res === false ) {\n $wpdb->query( 'ROLLBACK' );\n return false;\n }\n\n return true;\n } catch ( \\Exception $e ) {\n return false;\n }\n }",
"function deleteFile($db, $strDetailID = \"\")\n{\n global $words;\n $bolNewData = true;\n if ($strDetailID != \"\") {\n $strSQL = \"SELECT * FROM hrd_training_request \";\n $strSQL .= \"WHERE id = '$strDetailID' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strFile = $rowDb['doc'];\n if ($strFile != \"\") {\n if (file_exists(\"trainingdoc/\" . $strFile)) {\n unlink(\"trainingdoc/\" . $strFile);\n }\n $strSQL = \"UPDATE hrd_training_request SET doc = '' WHERE id = '$strDetailID' \";\n $resExec = $db->execute($strSQL);\n //writeLog(ACTIVITY_DELETE, MODULE_PAYROLL,\"file $strDetailID\",0);\n }\n }\n }\n return true;\n}",
"public function file_delete($filename);",
"function filecabinet_delete_file($file_id, $min = 0) {\n // The passed $min parameter is the smallest count value that allows file deletion\n // if the file is not used, delete it (it may still be used in old revisions)\n $count = db_result(db_query(\"SELECT COUNT(afid) FROM {org_documents} WHERE afid = %d\", $file_id));\n if ($count <= $min) {\n $filepath = db_result(db_query(\"SELECT filepath FROM {files} WHERE fid = %d\", $file_id));\n if ($filepath) {\n file_delete($filepath);\n }\n }\n}",
"abstract public function deleteFile(FileData $fileData);",
"public function testCompanyManagementBackupsIdDelete()\n {\n\n }",
"function deleteArtifactAttachedFile($sessionKey,$group_id,$group_artifact_id,$artifact_id,$file_id) {\n global $art_field_fact; \n if (session_continue($sessionKey)) {\n $pm = ProjectManager::instance();\n try {\n $grp = $pm->getGroupByIdForSoap($group_id, 'deleteArtifactAttachedFile');\n } catch (SoapFault $e) {\n return $e;\n }\n\n $at = new ArtifactTracker($grp,$group_artifact_id);\n if (!$at || !is_object($at)) {\n return new SoapFault(get_artifact_type_fault,'Could Not Get ArtifactTracker','deleteArtifactFile');\n } elseif ($at->isError()) {\n return new SoapFault(get_artifact_type_fault,$at->getErrorMessage(),'deleteArtifactFile');\n }\n\n $art_field_fact = new ArtifactFieldFactory($at);\n if (!$art_field_fact || !is_object($art_field_fact)) {\n return new SoapFault(get_artifact_field_factory_fault, 'Could Not Get ArtifactFieldFactory','deleteArtifactFile');\n } elseif ($art_field_fact->isError()) {\n return new SoapFault(get_artifact_field_factory_fault, $art_field_fact->getErrorMessage(),'deleteArtifactFile');\n }\n\n $a = new Artifact($at,$artifact_id);\n if (!$a || !is_object($a)) {\n return new SoapFault(get_artifact_fault,'Could Not Get Artifact','deleteArtifactFile');\n } elseif ($a->isError()) {\n return new SoapFault(get_artifact_fault,$a->getErrorMessage(),'deleteArtifactFile');\n }\n\n $af = new ArtifactFile($a, $file_id);\n if (!$af || !is_object($af)) {\n return new SoapFault(get_artifact_file_fault,'Could Not Create File Object','deleteArtifactFile');\n } else if ($af->isError()) {\n return new SoapFault(get_artifact_file_fault,$af->getErrorMessage(),'deleteArtifactFile');\n }\n\n if (!$af->delete()) {\n return new SoapFault(get_artifact_file_fault,$af->getErrorMessage(),'deleteArtifactFile');\n }\n\n return $file_id;\n } else {\n return new SoapFault(invalid_session_fault, 'Invalid Session', 'deleteArtifactFile');\n }\n}",
"public function delete($filename);",
"function _webform_delete_file($data, $component) {\r\n // Delete an individual submission file.\r\n $filedata = unserialize($data['value']['0']);\r\n if (isset($filedata['filepath']) && is_file($filedata['filepath'])) {\r\n unlink($filedata['filepath']);\r\n db_query(\"DELETE FROM {files} WHERE filepath = '%s'\", $filedata['filepath']);\r\n }\r\n}",
"public function delete_file(){\n\t\t$api_url \t= \"https://api002.backblazeb2.com\";\n\t\t$auth_token = \"4_002147cd01b5a680000000000_018d4c36_d47af5_acct_8SQ4r2LRCypwp1wl0rPo1ySwDm4=\"; \n\t\t$file_id \t= \"4_zd184771c8d50b17b65ba0618_f10273ca4a9b98700_d20190704_m095545_c002_v0001126_t0048\"; \n\t\t$file_name = \"main.html\"; \n\n\t\t$session = curl_init($api_url . \"/b2api/v2/b2_delete_file_version\");\n\t\n\t\t$data = array(\"fileId\" => $file_id, \"fileName\" => $file_name);\n\t\t$post_fields = json_encode($data);\n\t\tcurl_setopt($session, CURLOPT_POSTFIELDS, $post_fields); \n\n\t\t$headers = array();\n\t\t$headers[] = \"Authorization: \" . $auth_token;\n\t\tcurl_setopt($session, CURLOPT_HTTPHEADER, $headers); \n\n\t\tcurl_setopt($session, CURLOPT_POST, true); \n\t\tcurl_setopt($session, CURLOPT_RETURNTRANSFER, true); \n\t\t$server_output = curl_exec($session); \n\t\tcurl_close ($session); \n\t\techo ($server_output); \n\t}",
"function TestCase_unlink_plan($case_id, $plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.unlink_plan', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"function delete($id_plan) {\r\n $sql = \"DELETE FROM planes WHERE planes.id_plan ='\" . $id_plan . \"'\";\r\n\r\n $response = getResultSQL($sql);\r\n if (!$response) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }",
"function deleteAssignFile($id,$conn){\r\n\r\n //get file path\r\n\r\n $sql3 = \"SELECT * FROM assignmentFiles\r\n WHERE assignmentID = '\".$id.\"'\";\r\n\r\n $result3 = mysqli_query($conn, $sql3);\r\n\r\n if (mysqli_num_rows($result3) > 0) {\r\n // output data of each row\r\n while($row = mysqli_fetch_assoc($result3)){\r\n\r\n\r\n $Path = \"../assignment/\".$row3['file'];\r\n if (file_exists($Path)){\r\n unlink($Path); \r\n } \r\n\r\n }\r\n }\r\n\r\n //end of unlinking \r\n\r\n\r\n\r\n $sql = \"DELETE FROM assignmentFiles\r\n WHERE assignmentID = '\".$id.\"'\";\r\n\r\n mysqli_query($conn, $sql);\r\n\r\n\r\n}",
"function FTPdelete($file,$path,$parent=''){\n}",
"public function delete_file(){\n if($this->file_name != 'sample.jpg'){\n unlink($this->dir_location . $this->file_name);\n }\n }",
"public function testDeleteExternalShipment()\n {\n }",
"static function deleteFiles($pool) {\n $path = JPATH_COMPONENT.DS.\"data\".DS.$pool;\n system(\"rm -rf \".$path);\n $path = JPATH_COMPONENT.DS.\"private\".DS.$pool;\n system(\"rm -rf \".$path);\n }",
"public function test_deleteExternalShipment() {\n\n }",
"public function test_deleteExternalShipmentTag() {\n\n }",
"public function deleted(File $file)\n {\n //\n }",
"function cemhub_delete_file($file_name) {\n $successfully_deleted = FALSE;\n\n $file_details = cemhub_retrieve_file_details($file_name);\n if (!empty($file_details)) {\n $successfully_deleted = file_delete($file_details, TRUE);\n }\n else {\n $repository_path = cemhub_get_files_repository_path(TRUE);\n $successfully_deleted = file_unmanaged_delete($repository_path . '/' . $file_name);\n }\n\n if ($successfully_deleted) {\n watchdog('cemhub', 'The file \"' . $file_name . '\" was deleted successfully.');\n }\n else {\n watchdog('cemhub', 'It was not possible to delete file \"' . $file_name . '\", checks the Drupal file log to view more details.');\n }\n\n return $successfully_deleted;\n}",
"public function deletefile($id)\n\t{\n\t\t//\n $paths = Config::get('uploads');\n\n $file = McFile::find($id);\n $product = ProductCategory::find(Input::get('product_category_id'));\n\n\n\n\n //$full = $filepath.\"/\".$file->file_name;\n //echo $full;\n\n //Delete from Files Table\n $file->delete();\n\n //Delete from Files/Product Table\n $product->files()->where('file_id','=',$id)->delete();\n\n //Delete Files\n foreach($paths as $path) {\n $filepath = $path .\"/\".$file->file_name;\n if(File::exists($filepath)) {\n\n File::delete($filepath);\n\n // echo \"Deleted: \".$filepath.\"<br>\";\n }\n }\n\n Session::flash('message', 'Successfully deleted files for ' .$product->title );\n\n return Redirect::to('admin/products/'.Input::get('product_category_id').'/files');\n\n\t}",
"public function delete($id) {\n try {\n $this->pdo->beginTransaction();\n // select the file data from the database\n $stmt = $this->pdo->prepare('SELECT file_data '\n . 'FROM company_files '\n . 'WHERE id=:id');\n $stmt->execute([$id]);\n $stmt->bindColumn('file_data', $fileData, \\PDO::PARAM_STR);\n $stmt->closeCursor();\n \n // delete the large object\n $this->pdo->pgsqlLOBUnlink($fileData);\n $stmt = $this->pdo->prepare(\"DELETE FROM company_files WHERE id = :id\");\n $stmt->execute([$id]);\n \n $this->pdo->commit();\n } catch (\\Exception $e) {\n $this->pdo->rollBack();\n throw $e;\n }\n }",
"function Trigger_FileDelete(&$tNG) {\n $deleteObj = new tNG_FileDelete($tNG);\n $deleteObj->setFolder(\"uploads/fotos/\");\n $deleteObj->setDbFieldName(\"foto1\");\n return $deleteObj->Execute();\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}",
"private function _deleteFile($fileResource)\n {\n $store = $this->_owApp->erfurt->getStore();\n\n // remove file from file system (silently)\n $pathHashed = $this->getFullPath($fileResource);\n if (is_readable($pathHashed)) {\n unlink($pathHashed);\n }\n\n // remove all statements from sysconfig\n $store->deleteMatchingStatements(\n (string)$this->_getConfigModelUri(),\n $fileResource,\n null,\n null\n );\n }",
"function DeleteFile()\n{\n\t$sFileUrl = '';\n\t\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t\n\t$sFileUrl = $_REQUEST['file-path']; \n\t\n\tif(file_exists($sFileUrl) === false)\n\t{\n\t\techo '<fail>file not exist</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$bIsFileDelete = false; \n\t\n\tif(is_dir($sFileUrl) === true)\n\t{\n\t\t$bIsFileDelete = UnlinkRecursive($sFileUrl);\n\t} else\n\t{\n\t\t$bIsFileDelete = unlink($sFileUrl);\n\t}\n\t\n\tif($bIsFileDelete === true)\n\t{\n\t\tif(file_exists($sFileUrl) === false)\n\t\t{\n\t\t\techo '<correct>correct delete file</correct>';\n\t\t}\n\t} else\n\t{\n\t\techo '<fail>cant delete file</fail>';\n\t}\n\t\n\treturn;\n}",
"private function delete_file($file){\n\t\t$fileLink = fopen($file,'w');\n\t\tfclose($fileLink);\n\t\tunlink($file);\n\t}",
"function DeleteFile($id, $CheminU) {\r\n if (is_file($CheminU.\"/\".$id)) unlink($CheminU.\"/\".$id);\r\n}",
"function deleteFile($adressZip, $operation)\n{\n //on récupère l'adresse et nom du fichier\n $adressServer = './' . $adressZip;\n //On le supprime\n unlink($adressServer);\n // Si une erreur est survenu et que le fichier existe toujours\n if (file_exists($adressServer)) {\n $operation = '<div class=\"alert alert-danger result container\">Le fichier n\\'a pas pu être supprimé du serveur</div>';\n } else {\n //sinon on affiche qu'il a bien été supprimé\n $operation = '<div class=\"alert alert-success result container\">Le fichier a été supprimé du serveur</div>';\n }\n\n //on retourne le message de réponse\n return $operation;\n}",
"public function testAddPackingPlanFileByURL()\n {\n }",
"function unlink_file($bean_id,$file_name) {\n\t\tglobal $log, $root_directory, $upload_dir;\n\t\t$log->debug(\"Entering unlink_file(\".$bean_id.\",\".$file_name.\") method ...\");\n\t\t$log->debug(\"Exiting unlink_file method ...\");\n\t\treturn unlink($root_directory.\"/\".$upload_dir.$bean_id.$file_name);\n\t}",
"function deleteUploadedFile($args) {\t\t\r\n\t\t$meetingId = isset($args[0]) ? (int) $args[0] : 0;\r\n\t\t$fileId = isset($args[1]) ? (int) $args[1] : 0;\r\n\t\t\r\n\t\t$this->validate($meetingId);\r\n\t\t\r\n\t\timport('classes.file.MinutesFileManager');\r\n\t\t$minutesFileManager = new MinutesFileManager($meetingId);\r\n\t\t$minutesFileManager->deleteFile($fileId);\t\t\r\n\t\tRequest::redirect(null, null, 'manageMinutes', $meetingId);\r\n\t}",
"public function deleteFile(){\n\t\t$db = $this->db;\n\t\t$id = $_GET[\"id\"];\n\t\t\n\t\t$file = $db->fetchRow($db->select()->from(array(\"tbf\"=>\"tb_applicant_files\"))->where(\"id = ?\", $id));\n\t\tif ($file){\n\t\t\tif ($file[\"userid\"]!=$_SESSION[\"userid\"]){\n\t\t\t\treturn array(\"success\"=>false);\n\t\t\t}\n\t\t\t//$db->delete(\"tb_applicant_files\", $db->quoteInto(\"id = ?\", $id));\n\t\t\t$db->update(\"tb_applicant_files\", array(\"is_deleted\" => 1), $db->quoteInto(\"id = ?\", $id));\n $db->delete(\"solr_candidates\", $db -> quoteInto(\"userid=?\",$_SESSION[\"userid\"]));\n\t\t\t\n\t\t\tglobal $base_api_url;\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/solr-index/sync-candidates/\");\n\t\t\t\n\t\t\tif (file_exists(getcwd().\"/../applicants_files/\".$file[\"name\"])){\n\t\t\t\tunlink(getcwd().\"/../applicants_files/\".$file[\"name\"]);\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/mongo-index/sync-candidates-files/?userid=\" . $_SESSION[\"userid\"]);\n\t\t\t\n\t\t\t\n\t\t\treturn array(\"success\"=>true);\n\t\t}else{\n\t\t\treturn array(\"success\"=>false);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"public function delete_file_file($uuid)\n\t{\n\t\tif (!$this->is_allowed('dokumentasi_bendungan_delete', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'error' => cclang('sorry_you_do_not_have_permission_to_access')\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\techo $this->delete_file([\n 'uuid' => $uuid, \n 'delete_by' => $this->input->get('by'), \n 'field_name' => 'file', \n 'upload_path_tmp' => './uploads/tmp/',\n 'table_name' => 'dokumentasi_bendungan',\n 'primary_key' => 'kode_dbd',\n 'upload_path' => 'uploads/dokumentasi_bendungan/'\n ]);\n\t}",
"public function testRemoveDummyTestFileAfterDoneTest()\n {\n unlink(TESTING_STORE);\n\n // boolean result must be === false\n $this->assertFalse(file_exists(TESTING_STORE));\n }",
"public function executeDeletefile(sfWebRequest $request)\n {\n if (!$this->getUser()->getGuardUser()->getIsSuperAdmin())\n $this->redirect('ingreso');\n\n $archivo = Doctrine_Core::getTable('Actualizacionestrat')->find(array($request['id']));\n\n $archivo_nombre = sfConfig::get('app_pathfiles_folder').\"/../actualizacionestrat\".'/'.$archivo->getImagefile();\n\n if (file_exists($archivo_nombre)) unlink($archivo_nombre);\n\n $archivo->delete();\n\n return true;\n\n }",
"public function testDeleteExternalShipmentTag()\n {\n }",
"public function delete_file($key)\n {\n }",
"public function deleteAsset($path_to_file)\n\t{\n\t\t$path_to_file = rawurlencode(urldecode($path_to_file));\n\t\t\n\t\t$url = \"http://{$this->wnServer}/webnative/portalDI?action=filemgr&filemgraction=delete&filename=\".$path_to_file;\n\t\t$result = json_decode($this->curlObj->fetch_url($url),true);\n \n\t\treturn $result[\"MSG\"];\n\t}",
"function deleteFile($file_id) {\n global $pdo;\n $statement = $pdo->prepare('DELETE FROM `file` WHERE `sid` = :id');\n $statement->bindParam(\":id\", $file_id);\n return $statement->execute();\n}",
"public function delete_file() {\n $post_data = $_POST;\n $where_cond = array(\n \"id\" => $post_data['id'],\n );\n $update_data = array(\n \"row_status\" => 0\n );\n $status = $this->fileupload_model->update_fileupload_data($where_cond, $update_data);\n if ($status) {\n echo json_encode(array(\n \"status\" => \"success\",\n \"message\" => \"File delted successfully.\"\n ));\n exit;\n }\n echo json_encode(array(\n \"status\" => \"success\",\n \"message\" => \"File deltion failed.\"\n ));\n exit;\n }",
"public function test_deleteReplenishmentProcessTag() {\n\n }",
"public function deleteAction() {\n $fileID = (int) $this->params()->fromRoute('id', 0);\n $request = $this->getRequest();\n\n if ($fileID and $request->isXmlHttpRequest()) {\n try {\n\n $file = $this->getFileTable()->getFile($fileID);\n $filePath = $this->getOptions()->getUploadFolderPath() . '/' . $file->url;\n\n if (file_exists($filePath)) {\n if (!unlink($filePath)) {\n throw new \\Exception('Could not delete file');\n }\n }\n\n $this->getFileTable()->deleteFile($fileID);\n\n echo json_encode(array('state' => true));\n exit();\n } catch (\\Exception $e) {\n echo json_encode(array('state' => false));\n exit();\n }\n }\n }",
"function deleteContinueReport($conn, $planID){\n\t$sql = \"DELETE FROM temporaryreport WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n}",
"public function deleteFile(){\r\n\t\t//Get the storage name\r\n\t\t$storage_name = $this->uri->segment(3);\r\n\r\n\t\t//Check if the file exists\r\n\t\tif(!$this->DataModel->fileExists($storage_name) == TRUE){\r\n\t\t\t//File doesn't exist\r\n\t\t\tredirect('dashboard');\r\n\t\t}\r\n\r\n\t\t//Check if the user has permission to delete the file\r\n\t\tif(!$this->DataModel->userPermission('edit', $storage_name, $this->authentication->uid)){\r\n\t\t\t//User doesn't has permission to edit / delete this file\r\n\t\t\tredirect('dashboard');\r\n\t\t}\r\n\r\n\t\t//Get information of file\r\n\t\t$file = $this->DataModel->fileInformation($storage_name);\r\n\r\n\t\t//Mark the file as deleted in the database so they get displayed in the trashcan\r\n\t\t$this->DataModel->fileIntoTrash($file['id']);\r\n\t\t$this->successMessage($this->lang->line('success_file_deleted'));\r\n\r\n\t\t//Check if the file was deleted by the original owner or by a user who has access\r\n\t\tif($this->authentication->uid == $file['user_id']){\r\n\t\t\tif($file['parent'] == 0 ){\r\n\t\t\t\tredirect('/dashboard');\r\n\t\t\t}else{\r\n\t\t\t\t//Get parent information\r\n\t\t\t\t$parent = $this->DataModel->getFolderInfo(array('id' => $file['parent']), $this->authentication->uid);\r\n\t\t\t\tredirect('folders/'.$parent['public_key']);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$parent = $this->DataModel->getFolderInfo(array('id' => $file['parent']));\r\n\t\t\tredirect('sharedFolder/'.$parent['public_key']);\r\n\t\t}\r\n\t}",
"function DeleteUploadFile(){\n\n}",
"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}",
"function deleteFile($uuid) {\r\n $sql = '\r\n DELETE FROM\r\n files\r\n WHERE\r\n uuid = ?\r\n ';\r\n\r\n return $this->query_exec($sql, array($uuid));\r\n }",
"public function testDeleteSupplierGroup()\n {\n }",
"public function delete($filename){\n\t\t$file = $this->$dirname.'/'.$filename;\n\t\tif (file_exists($file)){\n\t\t\tunlink($file);\t\t\t\n\t\t}\n\t}",
"public function testDeleteChallengeTemplate()\n {\n }",
"public function plan_delete( $plan_id ) {\r\n\t\treturn $this->_send_request( 'plans/'.$plan_id, array(), STRIPE_METHOD_DELETE );\r\n\t}",
"public function delete($id = null) {\n $this->layout = 'admin';\n \n $id = $_GET['id']; \n if($this->ContentPiece->delete($id)){ \n Controller::loadModel('ContentPiecesFiles'); \n $file_ids = $this->ContentPiece->query('select file_id from content_pieces_files where content_piece_id ='.$id);\n \n foreach($file_ids as $file){\n $fids[] = $file['content_pieces_files']['file_id'];\n \n $paths = $this->ContentPiece->query('select file_path from files where id ='.$file['content_pieces_files']['file_id']);\n $html ='';\n foreach($paths as $path){\n $f = new File(WWW_ROOT.$path['files']['file_path']); \n if($f->delete()){\n $html .= '<br/><h2>'.$path['files']['file_path'].' deleted</h2>';\n }\n }\n }\n $this->set('result',$html); \n \n } \n}",
"public function DeleteFile()\r\n\t{\r\n\t\t$queryDeleteFile = \"UPDATE files SET status=\\\"DELETED\\\" WHERE file_id=\".$this->fileId;\r\n\t\t$this->sqlDataBase->nonSelectQuery($queryDeleteFile);\r\n\t\tunlink(UPLOAD_PATH. DIRECTORY_SEPARATOR .$this->fileId);\r\n\t}",
"public function testDeleteReport() {\n $operator = $this->createOperator();\n $patient = $this->createPatient();\n $report = $this->createReport($patient);\n $this->actingAs($operator)->visit(\"dashboard\")->see(\"delete_$report->id\")\n ->press(\"delete_$report->id\")\n ->seePageIs(\"dashboard\")\n ->dontSee($patient->name)\n ->dontSee($report->report_name)\n ->dontSee(\"delete_$report->id\")\n ->dontSee($report->case_number);\n \n $this->deleteReport($report);\n $this->deleteUser($patient);\n $this->deleteUser($operator);\n }",
"public function test_purge() {\n\t\t$purgedFilesInt = Cdnmd5::purge('-1 day');\n\t\t// ensure THIS file exists as a valid hash\n\t\t$this->assertEqual($this->testfile_js_hash, Cdnmd5::makeHash($this->testfile_js));\n\t\t$purgedFilesInt = Cdnmd5::purge('-1 day');\n\t\t$this->assertEqual(0, $purgedFilesInt);\n\t\t// remove THIS file as a valid hash\n\t\t@unlink(Cdnmd5::getConfigFile($this->testfile_js));\n\t\t$purgedFilesInt = Cdnmd5::purge('+1 day');\n\t\t// NOTE: this may not work, if this file was modified and uploaded in\n\t\t// less than 1 sec... (hash/modified timstampes will differ)\n\t\t// also there are a few hours timezone discrepancies...\n\t\t#$this->assertEqual(1, $purgedFilesInt);\n\t\t$this->assertTrue($purgedFilesInt > 0 && $purgedFilesInt < 10);\n\t\t// TODO: idea for better test, upload some \"trash\" files and ensure those are purged\n\t}",
"function deleteFile($hash);",
"function configurationDeleteFile($fileToDelete){\n\n\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $fileToDelete))\n\t\t\t{\n\t\t\tunlink($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $fileToDelete);\n\t\t\t}\t\t\t\t\n\t}",
"public function actionDeleteFile() \r\n {\r\n extract($_POST);\r\n $res=0;\r\n\r\n $res = FileMaster::model()->findByAttributes(array('FileID'=>$FileID));\r\n $pathToFile = Yii::app()->basePath.\"/../images/uploads/\";\r\n $fileToDelete = $res->Image;\r\n print \"path and file is\".$pathToFile.$fileToDelete;\r\n unlink($pathToFile.$fileToDelete) or die(\"File not deleted\");\r\n print $query = \"Delete From `filemaster` where `FileID`='$FileID'\";//AND LandID = '$LandID'\r\n $command =Yii::app()->db->createCommand($query);\r\n \r\n if($command->execute()) $res=1;\r\n print CJSON::encode($res);\r\n }",
"public function deleteFileById($conn, $id){\n\t\t//Preparo lo statement che permette di eliminare\n\t\t//una determinata record dalla tabella Filmato_Presentazione\n\t\t$sth = $conn->prepare('delete from Filmato_Presentazione where id = :id');\n\t\t//Inserisco i dati\n\t\t$sth->bindParam(':id', $id, PDO::PARAM_INT);\n\t\t$sth->execute();\n\t}",
"public function deleteFile($filename) {\r\n global $db;\r\n\r\n $userId= $this->userId;\r\n $trackingId = $this->trackingFormId;\r\n\r\n $basePath = FILEPATH . $userId. '/' . $trackingId;\r\n $filePath = $basePath . '/' . $filename;\r\n\r\n\r\n if(!isset($userId) || !isset($trackingId)) {\r\n throw new Exception(\"Unable to delete file \" . $filePath . \". Missing tracking form information.\");\r\n }\r\n\r\n\r\n $basePath = FILEPATH . $userId. '/' . $trackingId;\r\n $filePath = $basePath . '/' . $filename;\r\n\r\n $filePath = realpath($filePath);\r\n if(is_readable($filePath)){\r\n unlink($filePath);\r\n $sql = \"DELETE FROM `forms_tracking_files` WHERE `name` = '\" . $filename . \"' AND `trackingId` = \" . $trackingId;\r\n $db->Execute($sql);\r\n }\r\n\r\n $this->loadFilesFromDir($basePath); // refresh what files are associated with this trackingform\r\n }",
"function deleteDownloadDocument($doc_id) {\n global $pdo;\n\n $document = getDownloadDocument($doc_id); // get information for file delete\n\n $statement = $pdo->prepare('DELETE FROM `download` WHERE `id` = :id');\n $statement->bindParam(\":id\", $doc_id);\n $statement->execute();\n\n deleteFile($document['file']); // delete file out of database\n}",
"private function _deleteFile($file)\n {\n $this->_files[basename($file)]->delete();\n unset($this->_files[basename($file)]);\n $this->_prune();\n }",
"function DeleteFile($class, $key, $id)\r\n\t{\r\n\t\tswitch($this->MyClasses[$class]['db'][$key])\r\n\t\t{\r\n\t\t\tcase \"img\":\r\n\t\t\t{\r\n\t\t\t\t$Reek = $this->GetRecord($class, $id);\r\n\t\t\t\t$Reek = $Reek[0];\r\n\t\t\t\t \r\n\t\t\t\t$upload_dir = ROOT_DIR.$this->GetImg($Reek[$key], \"raw\");\r\n\t\t\t $upload_dir_thumb = ROOT_DIR.$this->GetImgThumb($Reek[$key], \"raw\");\r\n\t\t\t\tif(file_exists($upload_dir))\r\n\t\t\t {\r\n\t\t\t\t\tunlink($upload_dir);\r\n\t\t\t\t}\r\n\t\t\t\tif(file_exists($upload_dir_thumb))\r\n\t\t\t {\r\n\t\t\t\t\tunlink($upload_dir_thumb);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcase \"unlimg\":\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"static public function deleteFile($file = false) {\n\n if ($file)\n unlink($file);\n else\n unlink($this->filePath);\n }",
"protected function delete($name){\r\n $this->file->{\"$this->command\"}([$this->handler, $name]);\r\n }",
"protected function tearDown()\n {\n unlink($this->filename);\n }",
"public function testDeleteTemplate()\n {\n\n }",
"function wp_delete_attachment_files($post_id, $meta, $backup_sizes, $file)\n {\n }",
"public function testDeleteTask()\n {\n }",
"public function delete_file_file($uuid)\n\t{\n\t\tif (!$this->is_allowed('dokumentasi_tol_delete', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'error' => cclang('sorry_you_do_not_have_permission_to_access')\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\techo $this->delete_file([\n 'uuid' => $uuid, \n 'delete_by' => $this->input->get('by'), \n 'field_name' => 'file', \n 'upload_path_tmp' => './uploads/tmp/',\n 'table_name' => 'dokumentasi_tol',\n 'primary_key' => 'kode_dtl',\n 'upload_path' => 'uploads/dokumentasi_tol/'\n ]);\n\t}",
"function delete_plan()\n {\n #check user access\n check_user_access($this, 'delete_procurement_plan', 'redirect');\n\n # Get the passed details into the url data array if any\n $urldata = $this->uri->uri_to_assoc(3, array('m', 's'));\n\n # Pick all assigned data\n $data = assign_to_data($urldata);\n\n if(!empty($data['i'])){\n $result = $this->db->query($this->Query_reader->get_query_by_code('deactivate_item', array('item'=>' procurement_plans', 'id'=>decryptValue($data['i'])) ));\n \n #deactivate the entries\n if($result)\n {\n $this->db->where('procurement_plan_id', decryptValue($data['i']));\n $this->db->update('procurement_plan_entries', array('isactive'=>'N'));\n }\n }\n\n if(!empty($result) && $result){\n $this->session->set_userdata('dbid', \"The plan and it's entries have been successfully deleted.\");\n }\n else if(empty($data['msg']))\n {\n $this->session->set_userdata('dbid', \"ERROR: The procurement plan could not be deleted or were not deleted correctly.\");\n }\n\n if(!empty($data['t']) && $data['t'] == 'super'){\n $tstr = \"/t/super\";\n }else{\n $tstr = \"\";\n }\n redirect(base_url().\"procurement/page/m/dbid\".$tstr);\n }",
"function delete_package()\r\n{\r\n\t$SQL=\"SELECT * FROM package WHERE package_id = $_REQUEST[package_id]\";\r\n\t$rs=mysql_query($SQL);\r\n\t$data=mysql_fetch_assoc($rs);\r\n\t\r\n\t/////////Delete the record//////////\r\n\t$SQL=\"DELETE FROM package WHERE package_id = $_REQUEST[package_id]\";\r\n\tmysql_query($SQL) or die(mysql_error());\r\n\t\r\n\t//////////Delete the image///////////\r\n\tif($data[package_image])\r\n\t{\r\n\t\tunlink(\"../uploads/\".$data[package_image]);\r\n\t}\r\n\theader(\"Location:../package-report.php?msg=Deleted Successfully.\");\r\n}",
"public function tearDown()\n {\n parent::tearDown();\n\n //Deletes the file\n safe_unlink($this->file);\n }"
] | [
"0.737229",
"0.7365223",
"0.72413445",
"0.71475613",
"0.7139573",
"0.7068676",
"0.6961639",
"0.6852623",
"0.6636421",
"0.64679205",
"0.63812435",
"0.6374441",
"0.6262466",
"0.6213497",
"0.6207218",
"0.61939514",
"0.6192248",
"0.61883134",
"0.61622506",
"0.61516905",
"0.60975873",
"0.6074966",
"0.6064233",
"0.60360914",
"0.60232913",
"0.5998549",
"0.5990916",
"0.5989541",
"0.5939363",
"0.5921322",
"0.5915031",
"0.59131885",
"0.59054893",
"0.59013635",
"0.58969337",
"0.58741164",
"0.5865974",
"0.58638495",
"0.5858347",
"0.5857705",
"0.5841894",
"0.58285004",
"0.58267266",
"0.58221686",
"0.5792804",
"0.57784444",
"0.57621795",
"0.57596755",
"0.57571363",
"0.57464564",
"0.57452536",
"0.5742814",
"0.5722714",
"0.57175386",
"0.5712877",
"0.5712157",
"0.5706994",
"0.5702709",
"0.57004964",
"0.5698531",
"0.56971693",
"0.56800145",
"0.56713486",
"0.5653734",
"0.5647304",
"0.56463945",
"0.56446475",
"0.56412673",
"0.5638772",
"0.5632929",
"0.5615198",
"0.5603638",
"0.5602234",
"0.56006676",
"0.56005347",
"0.5585001",
"0.5581668",
"0.55791986",
"0.5576141",
"0.5575186",
"0.55678713",
"0.5557748",
"0.555678",
"0.5554324",
"0.55514044",
"0.5547325",
"0.5543875",
"0.55425775",
"0.5541788",
"0.55412406",
"0.5539867",
"0.5529253",
"0.55255705",
"0.552478",
"0.55247265",
"0.55110687",
"0.5502434",
"0.55019885",
"0.5498832",
"0.5492551"
] | 0.84973305 | 0 |
Test case for deletePackingPlanTag Delete a tag for a packingPlan.. | public function testDeletePackingPlanTag()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testDeleteReplenishmentTag()\n {\n }",
"public function testDeletePackingPlan()\n {\n }",
"public function testDeleteExternalShipmentTag()\n {\n }",
"public function test_deleteReplenishmentProcessTag() {\n\n }",
"public function testDeleteOrderTag()\n {\n }",
"public function test_deleteExternalShipmentTag() {\n\n }",
"public function testDeleteVendorComplianceSurveyTag()\n {\n }",
"public function testDeletePackingPlanFile()\n {\n }",
"public function testDeleteLowStockTag()\n {\n }",
"public function test_deleteBillingCodeTypeTag() {\n\n }",
"function TestPlan_remove_tag($plan_id, $tag_name) {\n\t// Create call\n//\t$call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval(array(\"plan_id\" => new xmlrpcval($plan_id, \"int\"), \"tag_name\" => new xmlrpcval($tag_name, \"string\")), \"struct\")));\n\t$call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function test_deleteLowStockTag() {\n\n }",
"public function test_deleteTagRequest() {\n\n }",
"public function test_deleteCustomerTag() {\n\n }",
"public function test_deleteOrderLineActivityTag() {\n\n }",
"public function testDeleteBucketTagging()\n\t{\n\t\t$expectedResult = $this->commonDeleteTestOperations(\"?tagging\");\n\t\t$this->assertThat(\n\t\t\t$this->object->delete->deleteBucketTagging($this->options->get(\"testBucket\")),\n\t\t\t$this->equalTo($expectedResult)\n\t\t);\n\t}",
"public function test_deleteItemCategoryTag() {\n\n }",
"public function test_deleteCartonActivityTag() {\n\n }",
"public function testDeleteItemSubCategoryTag()\n {\n }",
"public function testAddPackingPlanTag()\n {\n }",
"public function testDeleted()\n {\n // Make a tag, then request it's deletion\n $tag = $this->resources->tag();\n $result = $this->writedown->getService('api')->tag()->delete($tag->id);\n\n // Attempt to grab the tag from the database\n $databaseResult = $this->writedown->getService('entityManager')\n ->getRepository('ByRobots\\WriteDown\\Database\\Entities\\Tag')\n ->findOneBy(['id' => $tag->id]);\n\n $this->assertTrue($result['success']);\n $this->assertNull($databaseResult);\n }",
"public function delete_tag($tag);",
"public function test_deleteLegacyLowstockContactTag() {\n\n }",
"public function test_detachTagRequest() {\n\n }",
"public function testDeleteTagAdmin(): void\n {\n // given\n $expectedStatusCode = 200;\n $adminUser = $this->createUser([User::ROLE_USER, User::ROLE_ADMIN]);\n $this->logIn($adminUser);\n\n $expectedTag = new Tag();\n $expectedTag->setName('Test Tag To Delete');\n $tagRepository = self::$container->get(TagRepository::class);\n $tagRepository->save($expectedTag);\n\n // when\n $crawler = $this->httpClient->request('GET', '/tag/'.$expectedTag->getId().'/delete');\n $resultStatusCode = $this->httpClient->getResponse()->getStatusCode();\n $form = $crawler->selectButton('usuń')->form();\n $this->httpClient->submit($form);\n $this->httpClient->followRedirect();\n\n // then\n $this->assertEquals($expectedStatusCode, $resultStatusCode);\n $this->assertStringContainsString('Usuwanie powiodło się', $this->httpClient->getResponse()->getContent());\n }",
"public function testGetPackingPlanTags()\n {\n }",
"function TestCase_remove_tag($case_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.remove_tag', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testDeleteProductUsingDELETE()\n {\n }",
"public function testCompanyManagementBackupsIdDelete()\n {\n\n }",
"public function testDeleteInvalidTag() {\n\t\t// Create a tag and then try to delete it without inserting it into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAG_LABEL);\n\t\t$tag->delete($this->getPDO());\n\t}",
"public function testDeleteTemplate()\n {\n\n }",
"public function testProjectProjectIDInviteeInviteIDDelete()\n {\n }",
"public function testDeleteInvalidPostTag() {\n\t\t// create a PostTag and try to delete it without actually inserting it\n\t\t$postTag = new PostTag( GigHubTest::INVALID_KEY, GigHubTest::INVALID_KEY );\n\t\t$postTag->delete( $this->getPDO() );\n\t}",
"public function testDeleteExternalShipment()\n {\n }",
"public function testDeleteSupplierGroup()\n {\n }",
"public function testDeleteValidTag() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\t\t// create a new Tag and insert to into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAGCONTENT);\n\t\t$tag->insert($this->getPDO());\n\t\t// delete the Tag from mySQL\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$tag->delete($this->getPDO());\n\t\t// grab the data from mySQL and enforce the Tag does not exist\n\t\t$pdoTag = Tag::getTagByTagId($this->getPDO(), $tag->getTagId());\n\t\t$this->assertNull($pdoTag);\n\t\t$this->assertEquals($numRows, $this->getConnection()->getRowCount(\"tag\"));\n\t}",
"public function test_deleteExternalShipment() {\n\n }",
"public function testDeleteGlobalTemplate()\n {\n\n }",
"public function testPingTreeDeletePingTree()\n {\n }",
"public function testDeleteInvalidTag() {\n\t\t// create a Tag and try to delete it without actually inserting it\n\t\t$tag = new Tag(null, $this->VALID_TAGCONTENT);\n\t\t$tag->delete($this->getPDO());\n\t}",
"public function testPingTreeDeleteTarget()\n {\n }",
"public function testDeleteValidTag() {\n\t\t// Count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\n\t\t// Create a new tag and insert it into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAG_LABEL);\n\t\t$tag->insert($this->getPDO());\n\n\t\t// Delete the tag from mySQL\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$tag->delete($this->getPDO());\n\n\t\t// Grab the data from MySQL and enforce the tag does not exist\n\t\t$pdoTag = Tag::getTagByTagId($this->getPDO(), $tag->getTagId());\n\t\t$this->assertNull($pdoTag);\n\t\t$this->assertSame($numRows, $this->getConnection()->getRowCount(\"tag\"));\n\t}",
"function delete($id_plan) {\r\n $sql = \"DELETE FROM planes WHERE planes.id_plan ='\" . $id_plan . \"'\";\r\n\r\n $response = getResultSQL($sql);\r\n if (!$response) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }",
"public function testDeleteChallengeTemplate()\n {\n }",
"public function testDeletePromotionCampaignApplicationUsingDELETE()\n {\n }",
"function TestRun_remove_tag($run_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.remove_tag', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function test_deleteQueue() {\n\n }",
"public function testDeleteCampaignFromPromotionUsingDELETE()\n {\n }",
"public function testDeleteExternalShipmentFile()\n {\n }",
"public function testDeletePet()\n {\n\n }",
"public function deleteTag($imageID, $tagName) {\n $sql = \"DELETE FROM t_tags_included WHERE fk_pk_tags=? AND fk_pk_bild_id=?\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"ss\", $tagName, $imageID);\n $select->execute();\n $select->close();\n }",
"public function testDeleteVendorComplianceSurvey()\n {\n }",
"public function testDeleteAttachment()\n {\n }",
"public function testMissing()\n {\n $result = $this->writedown->getService('api')->tag()->delete(mt_rand(1000, 9999));\n\n $this->assertFalse($result['success']);\n $this->assertEquals(['Not found.'], $result['data']);\n }",
"public function testJobDelete()\n {\n\n }",
"public function test_deleteBillingCodeType() {\n\n }",
"public function testDeleteVendorComplianceSurveyFile()\n {\n }",
"#[@test]\n public function deleteFlag() {\n $action= $this->parseCommandSetFrom('\n if size :over 500K {\n addflag \"\\\\Deleted\";\n }\n ')->commandAt(0)->commands[0];\n $this->assertClass($action, 'peer.sieve.action.AddFlagAction');\n $this->assertEquals(array('\\Deleted'), $action->flags);\n }",
"public function testDeleteBrandUsingDELETE()\n {\n }",
"public function testDeleteMetadata1UsingDELETE()\n {\n }",
"public function delete_business_package($post_data) {\n//echo \"<pre>\";print_r($data);exit();\n $this->db->where('id', $post_data['package_id']);\n $this->db->delete('business_programs');\n\n return true;\n }",
"public function tag_delete($id)\n{\n $productstag = ProductTag::where('product_id','=',$id)->get();\n\n foreach ($productstag as $key => $protag) {\n\n $productTag = ProductTag::find($protag->id);\n $productTag->delete();\n }\n\n}",
"public function test_delete_item() {}",
"public function test_delete_item() {}",
"public function testDeletesPostTagRelationship()\n {\n // Create the post and tag\n $post = $this->resources->post();\n $tag = $this->resources->tag();\n\n // Add the tag to the post\n $result = $this->writedown->getService('api')->postTag()->create([\n 'post_id' => $post->id,\n 'tag_id' => $tag->id,\n ]);\n\n // Now delete the tag\n $this->writedown->getService('api')->tag()->delete($tag->id);\n\n // Check the relationship no longer exists\n $databaseResult = $this->writedown->getService('entityManager')\n ->getRepository('ByRobots\\WriteDown\\Database\\Entities\\PostTag')\n ->findOneBy(['post_id' => $post->id, 'tag_id' => $tag->id]);\n\n $this->assertNull($databaseResult);\n }",
"public function deleteTag($tag){\n\t\tif(is_array($tag)){\n\t\t\t$success = true;\n\t\t\tforeach($tag as $t){\n\t\t\t\tif(!$this->deleteTag($t)){\n\t\t\t\t\t$success = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $success;\n\t\t}else{\n\t\t\t$user = $this->getUser();\n\t\t\t$singletag = $this->getTag($tag);\n\t\t\tif(!isset($user[\"id\"])||!isset($singletag[\"tagid\"])){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif($user[\"status\"] == DBConfig::$userStatus[\"admin\"]){\n\t\t\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") deletes tag '\".$tag.\"'\");\n\t\t\t\t$query = Queries::deletetag($singletag[\"tagid\"]);\n\t\t\t\tif(!$this->query($query))return false;\n\t\t\t\t$query = Queries::removetag($singletag[\"tagid\"]);\n\t\t\t\treturn $this->query($query);\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"public function testDeleteSurvey0()\n {\n }",
"public function testDeleteSurvey0()\n {\n }",
"public function testDeleteValidImageTag() {\n\t\t//Count the number of rows for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"imageTag\");\n\t\t$imageTag = new ImageTag($this->imageTagImage->getImageId(), $this->imageTagTag->getTagId());\n\t\t$imageTag->insert($this->getPDO());\n\n\t\t//Delete the ImageTag from mySQL\n\t\t$this->assertEquals($numRows+1, $this->getConnection()->getRowCount(\"imageTag\"));\n\t\t$imageTag->delete($this->getPDO());\n\n\t\t//Grab the data from mySQL to make sure it is really dead\n\t\t$pdoImageTag = ImageTag::getImageTagByImageIdAndTagId($this->getPDO(), $this->imageTagImage->getImageId(), $this->imageTagTag->getTagId());\n\t\t$this->assertNull($pdoImageTag);\n\t\t$this->assertEquals($numRows, $this->getConnection()->getRowCount(\"imageTag\"));\n\t}",
"protected function deletePatch() {\n\t\t$sql = \"DELETE FROM\t\twcf\".WCF_N.\"_\".$this->type.\"template_patch \n\t\t\tWHERE\t\t\tpackageID = \".$this->packageID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t}",
"public function delete($GUN_BBL_CODE);",
"private static function DeleteTag($tag)\n {\n global $SESSDB;\n \n // First delete entries in sdat\n $q = $SESSDB->prepare(\"DELETE FROM `sdat` WHERE sdat.id IN(SELECT smap.id FROM `smap` WHERE tag=:tag)\");\n $q->bindParam(':tag', $tag);\n $q->execute();\n\n // Now smap...\n $q = $SESSDB->prepare(\"DELETE FROM `smap` WHERE tag=:tag\");\n $q->bindParam(':tag', $tag);\n $q->execute();\n }",
"public function testCompanyConfigurationsStatusesIdDelete()\n {\n\n }",
"public function testDeleteCategoryUsingDELETE()\n {\n }",
"public function testDeleteTask()\n {\n }",
"public function testWebinarPollDelete()\n {\n }",
"public function testDeleteMetadata3UsingDELETE()\n {\n }",
"public function testDeleteOrder()\n {\n }",
"public function testDeleteTagUser(): void\n {\n // given\n $expectedStatusCode = 302;\n $user = $this->createUser([User::ROLE_USER]);\n $this->logIn($user);\n\n $expectedTag = new Tag();\n $expectedTag->setName('Test Tag');\n $tagRepository = self::$container->get(TagRepository::class);\n $tagRepository->save($expectedTag);\n\n // when\n $this->httpClient->request('GET', '/tag/'.$expectedTag->getId().'/delete');\n $resultStatusCode = $this->httpClient->getResponse()->getStatusCode();\n\n // then\n $this->assertEquals($expectedStatusCode, $resultStatusCode);\n }",
"public function testDeleteGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testDSTIdDelete()\n {\n }",
"public function testWorkflowsWorkflowIdDelete()\n {\n }",
"public function testDeleteMetadata()\n {\n }",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function testDeleteMetadata2UsingDELETE()\n {\n }",
"public function testDeleteFinancialStatementUsingDelete()\n {\n }",
"public function testDelete()\n {\n }",
"public function testDeleteSnippet()\n {\n\n }",
"public function delete($tag)\n {\n getAuthentication()->requireAuthentication();\n $res = $this->tag->delete($tag);\n if($res)\n return $this->noContent('Tag deleted successfully', true);\n else\n return $this->error('Tag could not be deleted', false);\n }",
"public function testDeleteChallengeActivityTemplate()\n {\n }",
"public function delete($tag)\n {\n $builder = $this->git->getProcessBuilder()\n ->add('tag')\n ->add('-d');\n\n if (!is_array($tag) && !($tag instanceof \\Traversable)) {\n $tag = [$tag];\n }\n\n foreach ($tag as $value) {\n $builder->add($value);\n }\n\n $this->git->run($builder->getProcess());\n }",
"public function testDeleteOrderFile()\n {\n }",
"function deleteProTag($id)\n{\n global $conn;\n \n $sql = \"DELETE FROM products_tags WHERE id = '$id' \";\n if (mysqli_query($conn, $sql)) {\n $msg = \"Delete Successfully\";\n return $msg;\n }\n}",
"public function testQuarantineDeleteById()\n {\n\n }",
"public function testMarketingCampaignsTypesIdSubTypesSubTypeIdDelete()\n {\n\n }",
"public function test_addReplenishmentProcessTag() {\n\n }",
"public function test_P_DeleteSubscriptionAction_1() \n {\n $kuchi = parent::$repositoryKuchi->findOneByName(\"P_DeleteSubscriptionAction_1\");\n \n $komi = parent::$repositoryKomi->findOneByRandomId(\"P_DeleteSubscriptionAction_1_Android_1\");\n $this->template_test_P_DeleteSubscriptionAction_1($kuchi, $komi, Subscription::TYPE_NFC);\n \n $komi = parent::$repositoryKomi->findOneByRandomId(\"P_DeleteSubscriptionAction_1_Android_2\");\n $this->template_test_P_DeleteSubscriptionAction_1($kuchi, $komi, Subscription::TYPE_QRCode);\n \n $komi = parent::$repositoryKomi->findOneByRandomId(\"P_DeleteSubscriptionAction_1_Android_3\");\n $this->template_test_P_DeleteSubscriptionAction_1($kuchi, $komi, Subscription::TYPE_WEB);\n\n $komi = parent::$repositoryKomi->findOneByRandomId(\"P_DeleteSubscriptionAction_1_iOS_1\");\n $this->template_test_P_DeleteSubscriptionAction_1($kuchi, $komi, Subscription::TYPE_NFC);\n \n $komi = parent::$repositoryKomi->findOneByRandomId(\"P_DeleteSubscriptionAction_1_iOS_2\");\n $this->template_test_P_DeleteSubscriptionAction_1($kuchi, $komi, Subscription::TYPE_QRCode);\n \n $komi = parent::$repositoryKomi->findOneByRandomId(\"P_DeleteSubscriptionAction_1_iOS_3\");\n $this->template_test_P_DeleteSubscriptionAction_1($kuchi, $komi, Subscription::TYPE_WEB);\n \n }",
"function system_delete_group($paramv)\n{\n}",
"public function delete_posting($id_posting)\n {\n $response = $this->db->query(\"call group_kelas('delete_posting','{$id_posting}','','')\");\n $this->set_response($response, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }",
"function delProduct($dt) {\n $payload = $dt;\n\n $this->sql = \"DELETE FROM inventory_tb WHERE item_id = '$dt->item_id'\"; \n // $this->sql = \"UPDATE inventory_tb SET is_Archive = 1 WHERE item_id =$dt->item_id\";\n\n $this->conn->query($this->sql);\n\n $this->data = $payload;\n\n return array(\n 'status'=>$this->status,\n 'payload'=>$this->data,\n 'prepared_by'=>'Inventory Admin',\n 'timestamp'=>date('D M j, Y h:i:s e')\n );\n }"
] | [
"0.75049424",
"0.74548256",
"0.73071057",
"0.72864676",
"0.72135395",
"0.71300733",
"0.71039486",
"0.69620395",
"0.67902803",
"0.6778699",
"0.6758027",
"0.6744535",
"0.665486",
"0.65008515",
"0.64844185",
"0.64660484",
"0.64602417",
"0.6387559",
"0.6356673",
"0.63381916",
"0.63351935",
"0.63177603",
"0.6303695",
"0.6296019",
"0.62928367",
"0.6116152",
"0.6098171",
"0.6037905",
"0.6037369",
"0.5991421",
"0.5944866",
"0.5933293",
"0.59190786",
"0.59120685",
"0.5899117",
"0.587713",
"0.5874241",
"0.5860669",
"0.58455646",
"0.5837857",
"0.5822146",
"0.5822104",
"0.5793308",
"0.57866496",
"0.5783772",
"0.5774803",
"0.5769301",
"0.57650405",
"0.5763877",
"0.57116073",
"0.5704931",
"0.5702587",
"0.56982046",
"0.56916225",
"0.5684442",
"0.5676402",
"0.5658382",
"0.5657595",
"0.5645856",
"0.5635357",
"0.56172884",
"0.56033343",
"0.560081",
"0.560081",
"0.5599021",
"0.55932385",
"0.5592735",
"0.5592735",
"0.5587892",
"0.55735075",
"0.556679",
"0.55642825",
"0.55639625",
"0.55439985",
"0.5538923",
"0.552657",
"0.55231297",
"0.5517718",
"0.5514535",
"0.5501883",
"0.5501808",
"0.54958785",
"0.5493818",
"0.5492452",
"0.54883546",
"0.54854167",
"0.54822546",
"0.5478295",
"0.5477949",
"0.5468791",
"0.5462157",
"0.5449945",
"0.5449728",
"0.5445721",
"0.5441456",
"0.5435536",
"0.543553",
"0.54285306",
"0.5426313",
"0.5424882"
] | 0.8673388 | 0 |
Test case for getDuplicatePackingPlanById Get a duplicated a packingPlan by id. | public function testGetDuplicatePackingPlanById()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPlanById()\n {\n // Arrange\n // Act\n if (! isset($this->plans)) {\n $this->getsAListOfPlans();\n }\n $plans = $this->plans;\n $plan = $plans['data'][0];\n\n $plan = Ezypay::getPlan($plan['id']);\n\n // Assert\n $this->assertNotNull($plan);\n $this->assertEquals($plan['id'], $plan['id']);\n }",
"public function testGetPackingPlanById()\n {\n }",
"abstract public function isDuplicatePIMAddition($id);",
"public function testGetDuplicateExternalShipmentById()\n {\n }",
"protected function callPlanDuplicateRequest($id, $accountid)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling callPlanDuplicate'\n );\n }\n // verify the required parameter 'accountid' is set\n if ($accountid === null || (is_array($accountid) && count($accountid) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $accountid when calling callPlanDuplicate'\n );\n }\n\n $resourcePath = '/{accountid}/callplan/duplicate/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($accountid !== null) {\n $resourcePath = str_replace(\n '{' . 'accountid' . '}',\n ObjectSerializer::toPathValue($accountid),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function testGetDuplicateReplenishmentById()\n {\n }",
"public function test_getDuplicateExternalShipmentById() {\n\n }",
"public function duplicate( $id ) {\r\r\n global $wpdb;\r\r\n\r\r\n $this->refresh = true;\r\r\n\r\r\n return $wpdb->query(\r\r\n $wpdb->prepare(\"\r\r\n INSERT INTO \" . wd_asp()->db->table('main') . \"( name, data )\r\r\n SELECT CONCAT(name, ' duplicate'), data FROM \" . wd_asp()->db->table('main') . \"\r\r\n WHERE id=%d;\"\r\r\n , $id)\r\r\n );\r\r\n }",
"public function test_getDuplicateReplenishmentProcessById() {\n\n }",
"public function testDuplicate()\n {\n $this->duplicate(\n [\n 'tabId' => 1,\n ],\n [\n 'tabId' => 1,\n ]\n );\n }",
"public function getPlanById(int $id){\n $this->open();\n\n $result = $this->query('SELECT * FROM '.$this->TABLE_NAME.' WHERE id=:id', array(\n new QueryParam(':id', $id, PDO::PARAM_INT)\n ));\n\n // Close connection\n $this->close();\n\n // Check if is found\n if($result->rowCount() > 0){\n\n // Check result\n while($row = $result->fetch(PDO::FETCH_OBJ)){\n $foundPlan = new Plan(\n $row->id,\n $row->name,\n $row->price,\n $row->detail,\n $row->docsUrl\n );\n\n return $foundPlan;\n }\n\n }\n else{\n // It isn't found so return false\n return false;\n }\n\n }",
"public function planFind($id);",
"public function getPlanById($id)\n {\n try {\n return $this->plan->find($id);\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return false;\n }\n }",
"public function dataProcessingsDuplicateRequest($id, $workspace_id, $tenant_id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling dataProcessingsDuplicate'\n );\n }\n // verify the required parameter 'workspace_id' is set\n if ($workspace_id === null || (is_array($workspace_id) && count($workspace_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $workspace_id when calling dataProcessingsDuplicate'\n );\n }\n // verify the required parameter 'tenant_id' is set\n if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $tenant_id when calling dataProcessingsDuplicate'\n );\n }\n\n $resourcePath = '/v1/tenant/{tenantId}/ws/{workspaceId}/DataProcessings/{id}/duplicate';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($workspace_id !== null) {\n $resourcePath = str_replace(\n '{' . 'workspaceId' . '}',\n ObjectSerializer::toPathValue($workspace_id),\n $resourcePath\n );\n }\n // path params\n if ($tenant_id !== null) {\n $resourcePath = str_replace(\n '{' . 'tenantId' . '}',\n ObjectSerializer::toPathValue($tenant_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"private function get_product_to_duplicate( $id ) {\r\n $id = absint( $id );\r\n if ( ! $id ){\r\n return false;\r\n }\r\n\r\n global $wpdb;\r\n\r\n $post = $wpdb->get_results( \"SELECT * FROM $wpdb->posts WHERE ID=$id\" );\r\n\r\n if ( isset( $post->post_type ) && $post->post_type == \"revision\" ) {\r\n $id = $post->post_parent;\r\n $post = $wpdb->get_results( \"SELECT * FROM $wpdb->posts WHERE ID=$id\" );\r\n }\r\n return $post[0];\r\n }",
"public function testDuplicateSurvey()\n {\n $year = 2018;\n $currentYear = current_year();\n $origSurvey = Survey::factory()->create(['year' => $year, 'title' => \"$year Survey Title\"]);\n $origGroup = SurveyGroup::factory()->create(['survey_id' => $origSurvey->id]);\n $origQuestion = SurveyQuestion::factory()->create(['survey_id' => $origSurvey->id, 'survey_group_id' => $origGroup->id]);\n\n $response = $this->json('POST', \"survey/{$origSurvey->id}/duplicate\");\n $response->assertStatus(200);\n $newId = $response->json('survey_id');\n\n $this->assertDatabaseHas('survey', ['id' => $newId, 'title' => \"$currentYear Survey Title\"]);\n $this->assertDatabaseHas('survey_group', ['survey_id' => $newId, 'title' => $origGroup->title]);\n $this->assertDatabaseHas('survey_question', ['survey_id' => $newId, 'description' => $origQuestion->description]);\n }",
"public function testDuplicate()\n {\n $this->duplicate(\n [\n 'catalogId' => 1,\n 'catalogInstanceId' => 1,\n 'count' => 1,\n 'status' => 0,\n ],\n [\n 'count' => ['minValue']\n ]\n );\n }",
"public function duplicar($id) \n {\n $qry_terminos = $this->M_politicas->obtener_terminos($id);\n if($qry_terminos->num_rows() > 0)\n {\n $terminos = $qry_terminos->row();\n $this->data['acc'] = DUPLICAR;\n $this->data['politicas'] = $terminos; \n $this->_vista('comun');\n }\n else\n {\n echo false;\n }\n }",
"public function packingFind($id);",
"public function createDuplicate();",
"public function testGetDuplicateLowStockById()\n {\n }",
"public function testDeletePackingPlan()\n {\n }",
"public function testGetDuplicateVendorComplianceSurveyById()\n {\n }",
"function TestPlan_get($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testGetDuplicateOrderById()\n {\n }",
"function copy_article($newlyPlanId,$plan_id){\n \n {//Plan_Article Block\n \n $queryPlanArticle = \"SELECT * FROM plan_article WHERE status = 1 AND plan_id = '{$plan_id}' \" ;\n $resultPlanArticle = $this->execute_query($queryPlanArticle);\n \n if($this->num_rows($resultPlanArticle)!= 0)\n {\n while($row = $this->fetch_array($resultPlanArticle))\n { \n \n $insertArr = array(\n 'plan_id'=> $newlyPlanId,\n 'article_id' => $row['article_id'], \n 'creation_date' => date('Y-m-d H:i:s',time()), \n 'status'=> $row['status'] \n );\n \n $result = $this->insert('plan_article',$insertArr);\n \n }\n }\n }\n }",
"public function duplicateInvoice($id) {\n\t\ttry{\n\t\t\t$invoiceTbl = $this->_serviceManager->get('Invoice\\Model\\InvoiceTable');\n\t\n\t\t\t$invoiceItems = $invoiceTbl->fetchInvoiceItemsById($id);\n\t\t\t\n\t\t\t$invoiceData = $invoiceTbl->getInvoiceDetailsById($id);\n\t\t\t\n\t\t\t$xml = $this->generateDuplicateXml($invoiceData, $invoiceItems);\n\t\t\t\n\t\t\t$response = $this->_XeroOAuth->request('POST', $this->_XeroOAuth->url('Invoices', 'core'), array(), $xml);\n\t\t\t\n\t\t\tif ($this->_XeroOAuth->response['code'] == 200) {\n\t\t\t\t$invoice = $this->_XeroOAuth->parseResponse($this->_XeroOAuth->response['response'], $this->_XeroOAuth->response['format']);\n\t\t\t\t\n\t\t\t\tif (count($invoice->Invoices[0]) > 0) {\n\t\t\t\t\t$data = (array) $invoiceTbl->getInvoiceById($id);\n\t\t\t\t\tunset($data['id']);\n\t\t\t\t\t$data['invoice_id'] = $invoice->Invoices[0]->Invoice->InvoiceID;\n\t\t\t\t\t$data['invoice_number'] = $invoice->Invoices[0]->Invoice->InvoiceNumber;\n\t\t\t\t\t\n\t\t\t\t\t$invoice_id = $this->saveDuplicateData($data, $invoiceItems);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false; \n\t\t}catch(\\Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . urldecode($response['response']) . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n }",
"public function testAddPackingPlan()\n {\n }",
"function copy_plan($userId,$planId,$new_name=\"\"){\n if( is_numeric($userId) && is_numeric($planId) ){\n \n if($new_name == \"\" ){\n // Retrive plan from plan table.\n $query = \"select * from plan where plan_id = '{$planId}' \";\n $result = @mysql_query($query);\n $row = @mysql_fetch_array($result);\n $new_name = $row['plan_name'];\n }\n \n // Create array for inserting record.\n $insertArr = array(\n 'plan_name'=> $new_name,\n 'parent_template_id' => NULL,\n 'user_id' => $userId,\n 'patient_id' => NULL,\n 'user_type' => 2,\n 'is_public' => NULL,\n 'creation_date' => $row['creation_date'], \n 'status' => 1\n );\n \n // Insert record.\n $result = $this->insert('plan',$insertArr);\n \n //Get new plan id\n $newlyPlanId = $this->insert_id();\n \n // Copy treatments associated with planId.\n if(is_numeric($newlyPlanId)){\n // copy treatments in the plan.\n $this->copy_plan_treatment($newlyPlanId,$planId);\n // copy articles in the plan.\n $this->copy_article($newlyPlanId,$planId);\n }\n } \n \n }",
"public function find($id)\n {\n foreach ($this->plans as $plan) {\n if ($plan->id === $id) {\n return $plan;\n }\n }\n\n throw new Exception(\"Unable to find plan with ID [{$id}].\");\n }",
"public function show($id)\n {\n Log::debug(\"SHOW PLAN IN CONTROLLER\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->findPlan($id);\n\n if ($result['message'] == 'Success'){\n\n return new StripePlanResource($result['plan']);\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n\n }",
"static function checkPlan($id){\n $db = JFactory::getDbo();\n $nullDate = $db->quote($db->getNullDate());\n $nowDate = $db->quote(JHtml::_('date', 'now', 'Y-m-d H:i:s', false));\n $query = $db->getQuery(true);\n $query->select('count(tbl.id)')->from('#__osmembership_plans as tbl');\n $query->where('tbl.id = \"'.$id.'\"')\n ->where('tbl.published = 1')\n ->where('tbl.access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')')\n ->where('(tbl.publish_up = ' . $nullDate . ' OR tbl.publish_up <= ' . $nowDate . ')')\n ->where('(tbl.publish_down = ' . $nullDate . ' OR tbl.publish_down >= ' . $nowDate . ')');\n $db->setQuery($query);\n $count = $db->loadResult();\n if($count > 0){\n return true;\n }else{\n return false;\n }\n }",
"public static function getPlantById($id)\n {\n\t\t$key = '1PlantById_' . $id;\n\t\t$cache = Hapyfish_Cache_Memcached::getInstance();\n\t\t$plant= $cache->get($key);\n\t\tif ($plant === false) {\n\t\t\t//load from database\n\t\t\t$db = Hapyfish_Island_Dal_Plant::getDefaultInstance();\n\t\t\t$plant = $db->getNbPlantById($id);\n\t\t\tif ($plant) {\n\t\t\t\t$cache->add($key, $plant, Hapyfish_Cache_Memcached::LIFE_TIME_ONE_MONTH);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $plant;\n }",
"public function duplicate() {\n \t\t\n \t\ttry {\n\t\t\t\n\t \t\t// start duplicate\n\t\t\t$class = get_class($this);\n \t\t\t$duplicate = new $class;\n \t\t\t\n\t \t\t// duplicate row fields\n\t \t\t$this->duplicateRow($duplicate);\n\t \t\t\n \t\t\t// duplicate data\n\t \t\t$this->duplicateData($duplicate);\n\t \t\t\n\t \t\t// duplicate items\n\t \t\t$this->duplicateChildren($duplicate);\n\t \t\t\n\t \t\t$duplicate->setDuplicate($this->getId());\n \t\t\n \t\t\treturn $duplicate;\n \t\t\t\n \t\t} catch (Exception $e) {\n \t\t\n \t\t\treturn false;\n \t\t\t\n \t\t}\n \t\t\n \t}",
"public function testDuplicate()\n {\n $this->duplicate(\n [\n 'imageModel' => $this->_imageModelCreateData(),\n 'tabModel' => $this->_tabModelCreateData(),\n 'fieldModel' => $this->_fieldModelCreateData(),\n 'descriptionTextModel'\n => $this->_descriptionTextModelCreateData(),\n 'designCatalogModel' => array_merge(\n $this->_designCatalogModelCreateData1(),\n $this->_designCatalogModelCreateData2()\n ),\n 'hasImages' => true,\n 'useAutoload' => true,\n 'pageNavigationSize' => 10,\n 'shortCardDateType' => 1,\n 'fullCardDateType' => 1,\n 'hasRelations' => true,\n 'relationsLabel' => 'Relations label',\n 'hasBin' => true,\n ],\n [\n 'imageModel' => $this->_imageModelExpectData(),\n 'tabModel' => $this->_tabModelExpectData(),\n 'descriptionTextModel'\n => $this->_descriptionTextModelExpectData(),\n 'designCatalogModel'\n => $this->_designCatalogModelExpectData(),\n 'hasImages' => true,\n 'useAutoload' => true,\n 'pageNavigationSize' => 10,\n 'shortCardDateType' => 1,\n 'fullCardDateType' => 1,\n 'hasRelations' => true,\n 'relationsLabel' => 'Relations label',\n 'hasBin' => true,\n ],\n null,\n [\n 'imageModel',\n 'tabModel',\n 'fieldModel',\n 'descriptionTextModel',\n 'designCatalogModel',\n ]\n );\n }",
"public function actionDuplicate($id) {\n $model = $this->loadModel($id); // record that we want to duplicate\n $this->render('duplicate', [\n 'model' => $model,\n ]);\n }",
"public function test_getDuplicateCartonActivityById() {\n\n }",
"function edd_get_product_to_duplicate($id) {\n\tglobal $wpdb;\n\n\t$post = $wpdb->get_results( \"SELECT * FROM $wpdb->posts WHERE ID=$id\" );\n\tif ( isset( $post->post_type ) && $post->post_type == \"revision\" ){\n\t\t$id = $post->post_parent;\n\t\t$post = $wpdb->get_results( \"SELECT * FROM $wpdb->posts WHERE ID=$id\" );\n\t}\n\treturn $post[0];\n}",
"public function test_getDuplicateLowStockById() {\n\n }",
"public function CheckPlanExist($planID) {\n\t\t$planID = mysqli_real_escape_string($this->db, $planID);\n\t\t$query = mysqli_query($this->db, \"SELECT plan_id FROM i_premium_plans WHERE plan_id = '$planID'\") or die(mysqli_error($this->db));\n\t\tif (mysqli_num_rows($query) == 1) {\n\t\t\treturn true;\n\t\t} else {return false;}\n\t}",
"function delete($id_plan) {\r\n $sql = \"DELETE FROM planes WHERE planes.id_plan ='\" . $id_plan . \"'\";\r\n\r\n $response = getResultSQL($sql);\r\n if (!$response) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }",
"public function duplicate($id, EstAsistencium $estAsistencium)\n\t{\n\t\t$estAsistencium=$estAsistencium->find($id);\n\t\treturn view('estAsistencias.duplicate', compact('estAsistencium'))\n\t\t\t->with( 'list', EstAsistencium::getListFromAllRelationApps() );\n\t}",
"public function duplicateCurriculumSetting($id)\n {\n }",
"public function shouldGetProductWhenGivenIdExist()\n {\n $product = factory(Product::class)->create();\n\n $this->json($this->method, str_replace(':id', $product->id, $this->endpoint))\n ->assertOk()\n ->assertJsonPath('data.id', $product->id)\n ->assertJsonPath('data.short_name', $product->short_name)\n ->assertJsonPath('data.internal_code', $product->internal_code)\n ->assertJsonPath('data.customer_code', $product->customer_code)\n ->assertJsonPath('data.wire_gauge_in_bwg', $product->wire_gauge_in_bwg)\n ->assertJsonPath('data.wire_gauge_in_mm', $product->wire_gauge_in_mm);\n }",
"public function test_getDuplicateOrderLineActivityById() {\n\n }",
"public static function duplicate($service) {\n\n $serviceid = $service->id;\n\n // duplicate service\n $newservice = ORM::forTable('service')->create();\n Admin::duplicateRecord($service, $newservice);\n $newservice->code = \"CHANGE\";\n $newservice->date = date(\"Y-m-d\");\n $newservice->visible = 0;\n $newservice->save();\n $newserviceid = $newservice->id();\n\n // duplicate destinations\n // create a map of old to new ids\n $destmap = array();\n $destinations = ORM::forTable('destination')->where('serviceid', $serviceid)->findMany();\n if ($destinations) {\n foreach ($destinations as $destination) {\n $newdestination = ORM::forTable('destination')->create();\n Admin::duplicateRecord($destination, $newdestination);\n $newdestination->serviceid = $newserviceid;\n $newdestination->save();\n $destmap[$destination->id] = $newdestination->id();\n }\n }\n\n // duplicate pricebandgroup\n // create a map of old to new ids\n $pbmap = array();\n $pricebandgroups = ORM::forTable('pricebandgroup')->where('serviceid', $serviceid)->findMany();\n if ($pricebandgroups) {\n foreach ($pricebandgroups as $pricebandgroup) {\n $newpricebandgroup = ORM::forTable('pricebandgroup')->create();\n $newpricebandgroup->serviceid = $newserviceid;\n $newpricebandgroup->name = $pricebandgroup->name;\n $newpricebandgroup->save();\n $pbmap[$pricebandgroup->id] = $newpricebandgroup->id();\n }\n }\n\n // duplicate joining\n $joinings = ORM::forTable('joining')->where('serviceid', $serviceid)->findMany();\n if ($joinings) {\n foreach ($joinings as $joining) {\n $newjoining = ORM::forTable('joining')->create();\n Admin::duplicateRecord($joining, $newjoining);\n $newjoining->serviceid = $newserviceid;\n if (empty($pbmap[$joining->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $joining->pricebandgroupid);\n }\n $newjoining->pricebandgroupid = $pbmap[$joining->pricebandgroupid];\n $newjoining->save();\n }\n }\n\n // duplicate pricebands\n $pricebands = ORM::forTable('priceband')->where('serviceid', $serviceid)->findMany();\n if ($pricebands) {\n foreach ($pricebands as $priceband) {\n if (empty($pbmap[$priceband->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $priceband->pricebandgroupid);\n }\n $newpriceband = ORM::forTable('priceband')->create();\n Admin::duplicateRecord($priceband, $newpriceband);\n $newpriceband->serviceid = $newserviceid;\n if (empty($destmap[$priceband->destinationid])) {\n throw new Exception('No destination mapping exists for id = ' . $priceband->destinationid);\n }\n $newpriceband->destinationid = $destmap[$priceband->destinationid];\n if (empty($pbmap[$priceband->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $priceband->pricebandgroupid);\n }\n $newpriceband->pricebandgroupid = $pbmap[$priceband->pricebandgroupid];\n $newpriceband->save();\n }\n }\n\n // duplicate limits\n $limits = ORM::forTable('limits')->where('serviceid', $serviceid)->findOne();\n if ($limits) {\n $newlimits = ORM::forTable('limits')->create();\n Admin::duplicateRecord($limits, $newlimits);\n $newlimits->serviceid = $newserviceid;\n $newlimits->save();\n }\n\n return $newservice;\n }",
"abstract public function getUnique($id);",
"public function find($id) {\n\t\t$sql = \"select * from t_packinglist where pl_id=?\";\n\t\t$row = $this->getDb()->fetchAssoc($sql, array($id));\n\n\t\tif ($row)\n\t\t\treturn $this->buildDomainObject($row);\n\t\t\telse\n\t\t\t\tthrow new \\Exception(\"No PackingList matching id \" . $id);\n\t}",
"public function edit($id)\n {\n\n Log::debug(\"EDIT PLAN IN CONTROLLER\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->findPlan($id);\n\n if ($result['message'] == 'Success'){\n\n $plan = $result['plan'];\n\n $amountLen = strlen($plan->amount_decimal); \n $amount = substr_replace( $plan->amount_decimal, '.', $amountLen - 2, 0 ); \n\n $planArray[0]['id'] = $plan->id;\n $planArray[0]['product'] = $plan->product;\n $planArray[0]['interval'] = $plan->interval;\n $planArray[0]['amount'] = $amount;\n $planArray[0]['nickname'] = $plan->nickname;\n \n $plan = json_decode(json_encode($planArray), FALSE);\n \n return view('stripe.plan.create', ['plan' => $plan ]);\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n }",
"public function create($name, $id)\n {\n return $this->add(new Plan($name, $id));\n }",
"public function show($id)\n {\n $plan = Plan::find($id);\n return $plan;\n }",
"public function duplicateAction($id)\n {\n $contentManager = $this->get('opifer.content.content_manager');\n $content = $contentManager->getRepository()->find($id);\n\n if ( ! $content) {\n throw $this->createNotFoundException('No content found for id ' . $id);\n }\n\n $duplicateContentId = $contentManager->duplicate($content);\n\n return $this->redirect($this->generateUrl('opifer_content_content_edit', [\n 'id' => $duplicateContentId,\n ]));\n }",
"public function test_getDuplicateCustomerById() {\n\n }",
"public function testUpdatePackingPlan()\n {\n }",
"function duplicate_product($src_products_id, $dest_categories_id) {\n\n\t\t$product_query = xtDBquery(\"SELECT *\n\t\t\t\t \t FROM \".TABLE_PRODUCTS.\"\n\t\t\t\t \t WHERE products_id = '\".olc_db_input($src_products_id).\"'\");\n\n\t\t$product = olc_db_fetch_array($product_query);\n\t\tif ($dest_categories_id == 0) { $startpage = 1; $products_status = 1; } else { $startpage= 0; $products_status = $product['products_status'];}\n\t\t\n\t\t$sql_data_array=array('products_quantity'=>$product['products_quantity'],\n\t\t\t\t\t\t'products_model'=>$product['products_model'],\n\t\t\t\t\t\t'products_ean'=>$product['products_ean'],\n\t\t\t\t\t\t'products_shippingtime'=>$product['products_shippingtime'],\n\t\t\t\t\t\t'products_sort'=>$product['products_sort'],\n\t\t\t\t\t\t'products_startpage'=>$startpage,\n\t\t\t\t\t\t'products_sort'=>$product['products_sort'],\n\t\t\t\t\t\t'products_price'=>$product['products_price'],\n\t\t\t\t\t\t'products_discount_allowed'=>$product['products_discount_allowed'],\n\t\t\t\t\t\t'products_date_added'=>'now()',\n\t\t\t\t\t\t'products_date_available'=>$product['products_date_available'],\n\t\t\t\t\t\t'products_weight'=>$product['products_weight'],\n\t\t\t\t\t\t'products_status'=>$products_status,\n\t\t\t\t\t\t'products_tax_class_id'=>$product['products_tax_class_id'],\n\t\t\t\t\t\t'manufacturers_id'=>$product['manufacturers_id'],\n\t\t\t\t\t\t'product_template'=>$product['product_template'],\n\t\t\t\t\t\t'options_template'=>$product['options_template'],\n\t\t\t\t\t\t'products_fsk18'=>$product['products_fsk18'],\n\t\t\t\t\t\t);\t\t\n\t\t\t\t\t\t\n\t\t$customers_statuses_array = olc_get_customers_statuses();\n\n\t\tfor ($i = 0; $n = sizeof($customers_statuses_array), $i < $n; $i ++) {\n\t\t\tif (isset($customers_statuses_array[$i]['id']))\n\t\t\t\t$sql_data_array = array_merge($sql_data_array, array ('group_permission_'.$customers_statuses_array[$i]['id'] => $product['group_permission_'.$customers_statuses_array[$i]['id']]));\n\n\t\t}\n\t\t\n\t\tolc_db_perform(TABLE_PRODUCTS, $sql_data_array);\n\n\t\t//get duplicate id\n\t\t$dup_products_id = olc_db_insert_id();\n\t\t\n\t\t//duplicate image if there is one\n\t\tif ($product['products_image'] != '') {\n\n\t\t\t//build new image_name for duplicate\n\t\t\t$pname_arr = explode('.', $product['products_image']);\n\t\t\t$nsuffix = array_pop($pname_arr);\n\t\t\t$dup_products_image_name = $dup_products_id.'_0'.'.'.$nsuffix;\n\n\t\t\t//write to DB\n\t\t\txtDBquery(\"SQL_UPDATE \".TABLE_PRODUCTS.\" SET products_image = '\".$dup_products_image_name.\"' WHERE products_id = '\".$dup_products_id.\"'\");\n\n\t\t\t@ copy(DIR_FS_CATALOG_ORIGINAL_IMAGES.'/'.$product['products_image'], DIR_FS_CATALOG_ORIGINAL_IMAGES.'/'.$dup_products_image_name);\n\t\t\t@ copy(DIR_FS_CATALOG_INFO_IMAGES.'/'.$product['products_image'], DIR_FS_CATALOG_INFO_IMAGES.'/'.$dup_products_image_name);\n\t\t\t@ copy(DIR_FS_CATALOG_THUMBNAIL_IMAGES.'/'.$product['products_image'], DIR_FS_CATALOG_THUMBNAIL_IMAGES.'/'.$dup_products_image_name);\n\t\t\t@ copy(DIR_FS_CATALOG_POPUP_IMAGES.'/'.$product['products_image'], DIR_FS_CATALOG_POPUP_IMAGES.'/'.$dup_products_image_name);\n\n\t\t} else {\n\t\t\tunset ($dup_products_image_name);\n\t\t}\n\n\t\t$description_query = olc_db_query(\"SELECT *\n\t\t\t\t \t FROM \".TABLE_PRODUCTS_DESCRIPTION.\"\n\t\t\t\t \t WHERE products_id = '\".olc_db_input($src_products_id).\"'\");\n\n\t\t$old_products_id = olc_db_input($src_products_id);\n\t\twhile ($description = olc_db_fetch_array($description_query)) {\n\t\t\tolc_db_query(\"INSERT INTO \".TABLE_PRODUCTS_DESCRIPTION.\"\n\t\t\t\t\t\t \t\t SET products_id = '\".$dup_products_id.\"', \n\t\t\t\t\t\t \t\t language_id = '\".$description['language_id'].\"', \n\t\t\t\t\t\t \t\t products_name = '\".addslashes($description['products_name']).\"', \n\t\t\t\t\t\t \t\t products_description = '\".addslashes($description['products_description']).\"', \n\t\t\t\t\t\t \t\t products_keywords = '\".addslashes($description['products_keywords']).\"',\n\t\t\t\t\t\t \t\t products_short_description = '\".addslashes($description['products_short_description']).\"',\n\t\t\t\t\t\t \t\t products_meta_title = '\".addslashes($description['products_meta_title']).\"', \n\t\t\t\t\t\t \t\t products_meta_description = '\".addslashes($description['products_meta_description']).\"', \n\t\t\t\t\t\t \t\t products_meta_keywords = '\".addslashes($description['products_meta_keywords']).\"', \n\t\t\t\t\t\t \t\t products_url = '\".$description['products_url'].\"', \n\t\t\t\t\t\t \t\t products_viewed = '0'\");\n\t\t}\n\n\t\tolc_db_query(\"INSERT INTO \".TABLE_PRODUCTS_TO_CATEGORIES.\"\n\t\t\t\t \t SET products_id = '\".$dup_products_id.\"',\n\t\t\t\t \t categories_id = '\".olc_db_input($dest_categories_id).\"'\");\n\n\t\t//mo_images by [email protected]\n\t\t$mo_images = olc_get_products_mo_images($src_products_id);\n\t\tif (is_array($mo_images)) {\n\t\t\tforeach ($mo_images AS $dummy => $mo_img) {\n\n\t\t\t\t//build new image_name for duplicate\n\t\t\t\t$pname_arr = explode('.', $mo_img['image_name']);\n\t\t\t\t$nsuffix = array_pop($pname_arr);\n\t\t\t\t$dup_products_image_name = $dup_products_id.'_'.$mo_img['image_nr'].'.'.$nsuffix;\n\n\t\t\t\t//copy org images to duplicate\n\t\t\t\t@ copy(DIR_FS_CATALOG_ORIGINAL_IMAGES.'/'.$mo_img['image_name'], DIR_FS_CATALOG_ORIGINAL_IMAGES.'/'.$dup_products_image_name);\n\t\t\t\t@ copy(DIR_FS_CATALOG_INFO_IMAGES.'/'.$mo_img['image_name'], DIR_FS_CATALOG_INFO_IMAGES.'/'.$dup_products_image_name);\n\t\t\t\t@ copy(DIR_FS_CATALOG_THUMBNAIL_IMAGES.'/'.$mo_img['image_name'], DIR_FS_CATALOG_THUMBNAIL_IMAGES.'/'.$dup_products_image_name);\n\t\t\t\t@ copy(DIR_FS_CATALOG_POPUP_IMAGES.'/'.$mo_img['image_name'], DIR_FS_CATALOG_POPUP_IMAGES.'/'.$dup_products_image_name);\n\n\t\t\t\tolc_db_query(\"INSERT INTO \".TABLE_PRODUCTS_IMAGES.\"\n\t\t\t\t\t\t\t\t \t\t\t SET products_id = '\".$dup_products_id.\"',\n\t\t\t\t\t\t\t\t \t\t\t image_nr = '\".$mo_img['image_nr'].\"',\n\t\t\t\t\t\t\t\t \t\t\t image_name = '\".$dup_products_image_name.\"'\");\n\t\t\t}\n\t\t}\n\t\t//mo_images EOF\n\n\t\t$products_id = $dup_products_id;\n\n\t\t$i = 0;\n\t\t$group_query = olc_db_query(\"SELECT customers_status_id\n\t\t\t\t \t FROM \".TABLE_CUSTOMERS_STATUS.\"\n\t\t\t\t \t WHERE language_id = '\".(int) $_SESSION['languages_id'].\"'\n\t\t\t\t \t AND customers_status_id != '0'\");\n\n\t\twhile ($group_values = olc_db_fetch_array($group_query)) {\n\t\t\t// load data into array\n\t\t\t$i ++;\n\t\t\t$group_data[$i] = array ('STATUS_ID' => $group_values['customers_status_id']);\n\t\t}\n\n\t\tfor ($col = 0, $n = sizeof($group_data); $col < $n +1; $col ++) {\n\t\t\tif ($group_data[$col]['STATUS_ID'] != '') {\n\n\t\t\t\t$copy_query = olc_db_query(\"SELECT quantity,\n\t\t\t\t\t\t\t\t \t\t\t personal_offer\n\t\t\t\t\t\t\t\t \t\t\t FROM personal_offers_by_customers_status_\".$group_data[$col]['STATUS_ID'].\"\n\t\t\t\t\t\t\t\t \t\t\t WHERE products_id = '\".$old_products_id.\"'\");\n\n\t\t\t\twhile ($copy_data = olc_db_fetch_array($copy_query)) {\n\t\t\t\t\tolc_db_query(\"INSERT INTO personal_offers_by_customers_status_\".$group_data[$col]['STATUS_ID'].\"\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t SET price_id = '',\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t products_id = '\".$products_id.\"',\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t quantity = '\".$copy_data['quantity'].\"',\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t personal_offer = '\".$copy_data['personal_offer'].\"'\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}",
"public function store(PlanCreateRequest $request , $id)\n {\n $validated = $request->validated();\n $plan = new Plan;\n $plan->name = $request->name;\n $plan->price = $request->price;\n $plan->shop_id = $id;\n $plan->save();\n return redirect()->route('shops.show' , ['shop' => $id])->\n with(['done' => 'Plan Added To The Shop Successfully']);\n\n }",
"public function billingPlan($id)\n {\n $this->shellshock(request(), [\n 'number' => 'required|numeric',\n 'exp_month' => 'required|numeric',\n 'exp_year' => 'required|numeric',\n 'cvc' => 'required|numeric',\n ]);\n\n Stripe::setApiKey(config('turtle.billing.stripe_secret_key'));\n\n // create card token\n $token = Token::create([\n 'card' => [\n 'number' => request()->input('number'),\n 'exp_month' => request()->input('exp_month'),\n 'exp_year' => request()->input('exp_year'),\n 'cvc' => request()->input('cvc'),\n ],\n ]);\n\n // create/update customer\n if (!auth()->user()->billing_customer) {\n $customer = Customer::create([\n 'source' => $token->id,\n 'email' => auth()->user()->email,\n ]);\n }\n else {\n $customer = Customer::retrieve(auth()->user()->billing_customer);\n $customer->source = $token->id;\n $customer->save();\n }\n\n // create/update subscription\n if (!auth()->user()->billing_subscription) {\n $subscription = Subscription::create([\n 'customer' => $customer->id,\n 'items' => [['plan' => $id]],\n ]);\n }\n else {\n $subscription = Subscription::retrieve(auth()->user()->billing_subscription);\n Subscription::update($subscription->id, [\n 'items' => [[\n 'id' => $subscription->items->data[0]->id,\n 'plan' => $id,\n ]],\n ]);\n }\n\n // update user\n auth()->user()->update([\n 'billing_customer' => $customer->id,\n 'billing_subscription' => $subscription->id,\n 'billing_plan' => $id,\n 'billing_cc_last4' => $token->card->last4,\n 'billing_period_ends' => Carbon::createFromTimestamp($subscription->current_period_end),\n ]);\n\n activity('Subscribed to '.$id);\n flash('success', 'Thanks for subscribing!');\n\n return response()->json(['reload_page' => true]);\n }",
"function copyExistingEhsPlan(){\n\t\t\tif( $this->value('type') == \"finish\" ){\n\n\t\t\t\t$_SESSION['type'] = 'finish';\n\n\t\t\t\t$replace['type'] = \"finish\";\n }\n\n\t\t\telse{\n\n\t\t\t\tif(isset($_SESSION['type'])){\n\n\t\t\t\t\tsession_unregister('type');\n\n\t\t\t\t}\n\n\t\t\t\t$replace['type'] = \"\";\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\t$replace['plan_name'] = \"\";\n\n\t\t\t$replace['plan_id'] = \"\";\n\n\t\t\tif($this->value('act') == \"plan_edit\" && $this->value('plan_id') != \"\" ){\n\n\t\t\t\t$query = \"select * from plan where plan_id = '{$this->value('plan_id')}' \";\n\n\t\t\t\t$result = $this->execute_query($query);\n\n\t\t\t\tif($row = $this->fetch_array($result)){\n\n\t\t\t\t\t$replace['plan_name'] = $row['plan_name'];\n\n\t\t\t\t\t$replace['plan_id'] = $row['plan_id'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telseif ($this->value('plan_id') != \"\"){\n\n\t\t\t\t$replace['plan_name'] = $this->value('plan_name');\n\n\t\t\t\t$replace['plan_id'] = $this->value('plan_id');\n\t\t\t}\n\n\t\t\tif( $this->value('submitted_x') != \"\" ){\n\n\t\t\t\t//print_r($_POST);exit;\n\n\t\t\t\tif( $this->value('plan_name') == \"\"){\n\n\t\t\t\t\t$error[] = \"Please enter Plan name.\";\n\n\t\t\t\t}\n\n\t\t\t\telse{\n\t\t\t\t\t\t$query = \" select * from plan where plan_name = '\".addslashes($this->value('plan_name')).\"'\";\n\t\t\t\t\t\t$result = $this->execute_query($query);\n\t\t\t\t\t\tif($this->num_rows($result) > 0 ){\n\t\t\t\t\t\t\t$error[] = \"The plan name already exists. Please use a different one.\"; \n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(isset($error) && count($error) > 0){\n\n\t\t\t\t\t$replace['error'] = $this->show_error($error);\n\n\t\t\t\t}\n\n\t\t\t\telse{\n $notify = $this->value('notify');\n if($notify > 0) {\n $notify = $this->value('notify');\n\n } else {\n $notify = '0';\n } \t\t\t\t\t \n $query = \" select * from plan where plan_id = \".$this->value('plan_id');\n\t\t\t\t\t\t$sourceResult = $this->execute_query($query);\n\t\t\t\t\t\t$sourceRow = $this->fetch_array($sourceResult);\n\t\t\t\t\t\t$sourceData = array(\n\t\t\t\t\t\t\t\t\t'plan_name' => $this->value('plan_name'),\n\t\t\t\t\t\t\t\t\t'parent_template_id' => $sourceRow['parent_template_id'],\n\t\t\t\t\t\t\t\t\t'user_id' => $this->userInfo('user_id'),\n\t\t\t\t\t\t\t\t\t'patient_id' => $sourceRow['patient_id'],\n\t\t\t\t\t\t\t\t\t'user_type' => 2,\n\t\t\t\t\t\t\t\t\t'status' => 4,\n 'ehsFlag' => '1',\n 'schdulerAction' => '1',\n\t\t\t\t\t\t\t\t\t'unread_plan'=>1\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\n $sourceData['old_plan_id'] = $this->value('plan_id');\n\t\t\t\t\t\t$sourceData['creation_date'] = date(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t$sourceData['modified'] = date(\"Y-m-d H:i:s\");\n $sourceData['is_public'] = null;\n\n\t\t\t\t\t\tif($this->insert($this->config['table']['plan'],$sourceData)){\n\t\t\t\t\t\t\t$new_plan_id = $this->insert_id();\n /* check for plan_article */\n $sqlPlanArticle=\"select * from plan_article where plan_id=\".$this->value('plan_id');\n $resPlanArtical=$this->execute_query($sqlPlanArticle);\n $numPlanArtical=$this->num_rows($resPlanArtical);\n if($numPlanArtical>0){\n while($rowPlanArtical=$this->fetch_array($resPlanArtical)){\n $arrayPlanArtical=array(\n 'plan_id'=>$new_plan_id,\n 'article_id'=>$rowPlanArtical['article_id'],\n 'creation_date'=>date(\"Y-m-d H:i:s\"),\n 'status'=>1\n );\n $this->insert('plan_article',$arrayPlanArtical); \n \n }\n \n }\n /* check for plan_treatment */\n $sqlplanTreatment=\"select * from plan_treatment where plan_id=\".$this->value('plan_id');\n $resplanTreatment=$this->execute_query($sqlplanTreatment);\n $numplanTreatment=$this->num_rows($resplanTreatment);\n if($numplanTreatment>0){\n while($rowplanTreatment=$this->fetch_array($resplanTreatment)){\n $arrayPlanTreatment=array(\n 'plan_id' => $new_plan_id,\n 'treatment_id' => $rowplanTreatment['treatment_id'],\n 'instruction' => $rowplanTreatment['instruction'],\n 'sets' => $rowplanTreatment['sets'],\n 'reps' => $rowplanTreatment['reps'],\n 'hold' => $rowplanTreatment['hold'],\n 'benefit' => $rowplanTreatment['benefit'],\n 'lrb' => $rowplanTreatment['lrb'],\n 'treatment_order' => $rowplanTreatment['treatment_order'],\n 'creation_date' => date(\"Y-m-d H:i:s\"),\n 'status' => 1\n );\n $this->insert('plan_treatment',$arrayPlanTreatment); \n }\n }\n \n \n \n //Updating the copied plan to status archive '2'\n\t\t\t\t\t\t\t$where = \" plan_id = '{$this->value('plan_id')}' \";\n\t\t\t\t\t\t\t//$updateData['status'] = '2';\n //$updateData['old_plan_id'] = $this->value('plan_id');\n\t\t\t\t\t\t\t$updateData['modified'] = date(\"Y-m-d\");\n\t\t\t\t\t\t\t$this->update($this->config['table']['plan'],$updateData,$where);\n\t\t\t\t\t\t\theader(\"location:index.php?action=selectEhsTreatment&plan_id={$new_plan_id}\");\n\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$replace['header'] = $this->build_template($this->get_template(\"header\"));\n\n\t\t\t$replace['footer'] = $this->build_template($this->get_template(\"footer\"));\n\n\t\t\t$replace['sidebar'] = $this->sidebar();\n\n\t\t\t$replace['footer'] = $this->build_template($this->get_template(\"footer\"));\n\t\t\t\n\t\t \n\t\t\t$replace['get_satisfaction'] = $this->get_satisfaction();\n\t\t\t \n\n\t\t\t$nav_bar = array(\n\n\t\t\t\t\t\t\t\t'plan' => ($this->value('plan_id') != \"\")?'<a href=\"index.php?action=createNewEhsPlan&act=plan_edit&plan_id='.$this->value(\"plan_id\").'&type='.$_SESSION['type'].'\"><img src=\"images/01_plan_gray.gif\" /></a>':'<img src=\"images/01_plan_gray.gif\" />',\n\n\t\t\t\t\t\t\t\t'step1' => ($this->value('plan_id') != \"\")?'<img src=\"images/stepIcons_1_red_sm.gif\">':'<img src=\"images/stepIcons_1_red_sm.gif\">',\n\n\t\t\t\t\t\t\t\t'step2' => ($this->value('plan_id') != \"\")?'<a href=\"index.php?action=selectEhsTreatment&plan_id='.$this->value(\"plan_id\").'&type='.$_SESSION['type'].'\"><img src=\"images/stepIcons_2_gray_sm.gif\"></a>':'<img src=\"images/stepIcons_2_gray_sm.gif\">',\n\n\t\t\t\t\t\t\t\t'step3' => ($this->value('plan_id') != \"\")?'<a href=\"index.php?action=customize_instruction_ehs&plan_id='.$this->value(\"plan_id\").'&type='.$_SESSION['type'].'\"><img src=\"images/stepIcons_3_gray_sm.gif\"></a>':'<img src=\"images/stepIcons_3_gray_sm.gif\">',\n\n\t\t\t\t\t\t\t\t'step4' => ($this->value('plan_id') != \"\")?'<a href=\"index.php?action=customize_articles_ehs&plan_id='.$this->value(\"plan_id\").'&type='.$_SESSION['type'].'\"><img src=\"images/stepIcons_4_gray_sm.gif\"></a>':'<img src=\"images/stepIcons_4_gray_sm.gif\">',\n\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t);\n\n\t\t\tif(is_array($replace)){\n\n\t\t\t\t$replace = $replace + $nav_bar;\n\n\t\t\t}\n\n\t\t\t\n\n\n\n\t\t\t$replace['patient_image'] = '<img src=\"images/03_patient_gray.gif\" />';\n\n\t\t\t$replace['assign_image'] = '<img src=\"images/04_assign_gray.gif\" />';\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t$replace['body'] = $this->build_template($this->get_template(\"createNewPlan\"),$replace);\n\n\t\t\t$replace['browser_title'] = \"Tx Xchange: Create New Plan\";\n\n\t\t\t$this->output = $this->build_template($this->get_template(\"main\"),$replace);\n\n\t\t}",
"public function leer($idplan)\n {\n include_once 'controlador/util/bd_conexion_pdo.php';\n\n $conexion = (new Conexion())->conectarPDO();\n\n $sentencia = $conexion->prepare(\"SELECT * FROM plan WHERE idplan = :idplan\");\n $sentencia->bindParam(\":idplan\", $idplan, PDO::PARAM_INT);\n $sentencia->execute();\n\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n\n $sentencia = null;\n $conexion = null;\n\n return $resultado;\n }",
"public function findEagerly($id)\n {\n $query = $this->getEntityManager()->createQuery('\n SELECT bp\n FROM VeniceAppBundle:BillingPlan AS bp\n WHERE bp.id = :id\n ')\n ->setParameter('id', $id);\n\n return $query->getOneOrNullResult();\n }",
"public function duplicateQuote($id) {\n\t\ttry{\n\t\t\t$invoiceTbl = $this->_serviceManager->get('Invoice\\Model\\InvoiceTable');\n\t\n\t\t\t$invoiceItems = $invoiceTbl->fetchInvoiceItemsById($id);\n\t\t\t\n\t\t\t$data = (array) $invoiceTbl->getInvoiceById($id);\n\t\t\tunset($data['id']);\n\t\t\tunset($data['invoice_id']);\n\t\t\tunset($data['invoice_number']);\n\t\t\t\n\t\t\t$invoice_id = $this->saveDuplicateData($data, $invoiceItems);\n\n\t\t\treturn false; \n\t\t}catch(\\Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . urldecode($response['response']) . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n }",
"private function getPromotionId($plan_id){\n $promotion = Promotion::where('plan_id',$plan_id)->where('status', 'active')->first();\n if(!$promotion){\n return 0;\n }\n return $promotion->id;\n }",
"public function duplicate($id, Aviso $aviso)\n\t{\n\t\t$aviso=$aviso->find($id);\n\t\treturn view('avisos.duplicate', compact('aviso'))\n\t\t\t->with( 'list', Aviso::getListFromAllRelationApps() );\n\t}",
"public function show($id)\n {\n $plan = Plan::where(['id' => $id])->with([\n 'programaAcademico',\n 'planesActividades.actividad.indicador',\n 'planesActividades.actividad.proyecto.programas.programa.linea.eje'\n ])->get()->toArray()[0];\n\n $planesActividades = $plan['planes_actividades'];\n $proyectos = [];\n\n for ($i = 0, $long = count($planesActividades); $i < $long; $i++) {\n $actividad = $planesActividades[$i]['actividad'];\n $proyecto = $actividad['proyecto'];\n $encontro = false;\n\n $actividad_data = [\n 'nombre' => $actividad['nombre'],\n 'descripcion' => $actividad['descripcion'],\n 'fecha_inicio' => $planesActividades[$i]['fecha_inicio'],\n 'fecha_fin' => $planesActividades[$i]['fecha_inicio'],\n 'costo' => $planesActividades[$i]['costo'],\n 'unidad_medida' => $actividad['descripcion'],\n 'peso' => $planesActividades[$i]['peso'],\n 'incidacor' => $actividad['indicador']\n ];\n\n for ($j=0; $j < count($proyectos); $j++) {\n $encontro = $proyectos[$j]['id'] == $proyecto['id'];\n\n if($proyectos[$j]['id'] == $proyecto['id']){\n array_push($proyectos[$j]['actividades'], $actividad_data);\n break;\n }\n }\n\n if(!$encontro){\n $proyecto['actividades'] = [$actividad_data];\n array_push($proyectos, $proyecto);\n }\n }\n\n $data = [];\n $data['nombre'] = $plan['nombre'];\n $data['url_documento'] = $plan['url_documento'];\n $data['periodo_inicio'] = $plan['periodo_inicio'];\n $data['periodo_fin'] = $plan['periodo_fin'];\n $data['fecha_cierre'] = $plan['fecha_cierre'];\n $data['programa_academico'] = $plan['programa_academico'];\n $data['proyectos'] = $proyectos;\n\n if (count($plan) > 0)\n return response()->json([\n 'message' => 'Consulta exitosa',\n 'data' => $data,\n 'status' => 'ok'\n ], 200);\n\n return response()->json([\n 'message' => 'No existen registros',\n 'data' => [],\n 'status' => 'error'\n ], 404);\n }",
"function duplicate($p_archive)\n {\n }",
"public function dupliquer($id) {\n $projet = new Projet();\n \n $old = Projet::findOrFail($id);\n \n $projet->nom = $old->nom;\n $projet->projet_start = $old->projet_start;\n $projet->projet_end = $old->projet_end;\n $projet->nombre_max = $old->nombre_max;\n $projet->projet_html = $old->projet_html;\n $projet->list_champs = $old->list_champs;\n $projet->libelles = $old->libelles;\n $projet->champs_croises = $old->champs_croises;\n\n $projet->reponses_table =\"\";\n \n \n $projet->save();\n \n $projet->clients()->attach($old->clients()->get());\n $projet->enqueteurs()->attach($old->enqueteurs()->get());\n $projet->administrateurs()->attach($old->administrateurs()->get());\n \n return redirect(route('edit-projet', $projet->id));\n \n }",
"public function duplicateAction($serviceid) {\n $this->require_login('ROLE_ADMIN', 'service/duplicate/' . $serviceid);\n\n $service = Admin::getService($serviceid);\n\n $newservice = Admin::duplicate($service);\n\n $this->redirect('service/edit/' . $newservice->id);\n }",
"public function test_getDuplicateBillingCodeTypeById() {\n\n }",
"public function check_duplicate()\n {\n }",
"public function testGetDuplicateItemSubCategoryById()\n {\n }",
"public function test_getDuplicateItemCategoryById() {\n\n }",
"public function savePlan($plan)\n {\n return Stripe\\Plan::create(array(\n \"amount\" => $plan->price,\n \"interval\" => $plan->interval,\n \"name\" => $plan->name,\n \"currency\" => \"usd\",\n 'id' => $plan->level\n ));\n }",
"public function testDuplicate()\n {\n $this->duplicate(\n array_merge(\n $this->_createData1(),\n $this->_createData2()\n ),\n array_merge(\n $this->_expectData1(),\n $this->_expectData2()\n )\n );\n }",
"function copyObject($target_questionpool_id, $title = \"\")\n\t{\n\t\tif ($this->id <= 0)\n\t\t{\n\t\t\t// The question has not been saved. It cannot be duplicated\n\t\t\treturn;\n\t\t}\n\t\t// duplicate the question in database\n\t\t$clone = $this;\n\t\tinclude_once (\"./Modules/TestQuestionPool/classes/class.assQuestion.php\");\n\t\t$original_id = assQuestion::_getOriginalId($this->id);\n\t\t$clone->id = -1;\n\t\t$source_questionpool_id = $this->getObjId();\n\t\t$clone->setObjId($target_questionpool_id);\n\t\tif ($title)\n\t\t{\n\t\t\t$clone->setTitle($title);\n\t\t}\n\t\t$clone->saveToDb();\n\t\t// copy question page content\n\t\t$clone->copyPageOfQuestion($original_id);\n\t\t// copy XHTML media objects\n\t\t$clone->copyXHTMLMediaObjectsOfQuestion($original_id);\n\n\t\t$clone->onCopy($source_questionpool_id, $original_id, $clone->getObjId(), $clone->getId());\n\n\t\treturn $clone->id;\n\t}",
"function duplicateQuestionForSurvey($question_id, $a_force = false)\n\t{\n\t\tglobal $ilUser;\n\t\t\n\t\t$questiontype = $this->getQuestionType($question_id);\n\t\t$question_gui = $this->getQuestionGUI($questiontype, $question_id);\n\n\t\t// check if question is a pool question at all, if not do nothing\n\t\tif($this->getId() == $question_gui->object->getObjId() && !$a_force)\n\t\t{\n\t\t\treturn $question_id;\n\t\t}\n\n\t\t$duplicate_id = $question_gui->object->duplicate(true);\n\t\treturn $duplicate_id;\n\t}",
"public function add_to_plan(Request $request, $id)\n {\n $rules = [\n 'plan_id' => 'required|numeric',\n ];\n $attrs = [\n 'plan_id' => '出团计划id',\n ];\n $this->validate($request, $rules, [], $attrs);\n\n $obj = SaleOrder::find($id);\n $obj->fill($request->all());\n $obj->save();\n return redirect('/sale_order');\n \n }",
"public function add_individual_plan($individual_id) \n\t{\n\t\t$data = array(\n\t\t\t'individual_id'=>$individual_id,\n\t\t\t'savings_plan_id'=>$this->input->post('savings_plan_id'),\n\t\t\t'individual_savings_status'=>$this->input->post('individual_savings_status'),\n\t\t\t'individual_savings_opening_balance'=>$this->input->post('individual_savings_opening_balance'),\n\t\t\t'start_date'=>$this->input->post('start_date'),\n\t\t\t'created'=>date('Y-m-d H:i:s'),\n\t\t\t'created_by'=>$this->session->userdata('personnel_id'),\n\t\t\t'modified_by'=>$this->session->userdata('personnel_id')\n\t\t);\n\t\t\n\t\tif($this->db->insert('individual_savings', $data))\n\t\t{\n\t\t\treturn $this->db->insert_id();\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function testAddPackingPlanFileByURL()\n {\n }",
"function getPackName($id){\r global $bdd;\r $req4=$bdd->prepare(\"select * from packs where idpack=? \");\r $req4->execute(array($val));\r while($ar = $req4->fetch()){return $ar['packname'];}\r return 1;\r}",
"public\r\n function Duplicata(Fiche $id)\r\n {\r\n // $em2 = $this->getDoctrine()->getManager('analytics');\r\n $em1 = $this->getDoctrine()->getManager('default');\r\n\r\n $ficheacloner = $em1->getRepository(Fiche::class)->find($id);\r\n\r\n $ficheclonee = clone $ficheacloner;\r\n\r\n $radioacloner = $ficheacloner->getRadio(); //ICI LES ONE TO ONE CAR DUPLIQUER ID IMPOSSIBLE\r\n $filaireacloner = $ficheacloner->getFilaire();\r\n\r\n if ($radioacloner) {\r\n $nouvelleRadio = clone $radioacloner;\r\n $ficheclonee->setRadio($nouvelleRadio);\r\n $em1->persist($nouvelleRadio);\r\n }\r\n\r\n if ($filaireacloner) {\r\n $newFilaire = clone $filaireacloner;\r\n $ficheclonee->setFilaire($newFilaire);\r\n $em1->persist($newFilaire);\r\n }\r\n\r\n $operateurTP = $this->getUser()->getUsername();\r\n $ficheclonee->setOperateurTP($operateurTP);\r\n $ficheclonee->setDate(new Datetime());\r\n $ficheclonee->setStatut('en cours');\r\n\r\n $em1->persist($ficheclonee);\r\n $em1->flush();\r\n return $ficheclonee;\r\n }",
"function db_duplicate($table, $id) {\r\n\r\n\t$fieldQuery = db_query(\"DESCRIBE $table\");\r\n\t\r\n\tif (db_numrows($fieldQuery) > 1) {\r\n\t\r\n\t\t$sourceQuery = db_query(\"SELECT * FROM $table WHERE id=\".escapeValue($id));\r\n\t\t\r\n\t\tif (db_numrows($sourceQuery) == 1) {\r\n\t\r\n\t\t\t$sourceResult = db_fetch($sourceQuery);\r\n\t\t\t$sql = \"UPDATE $table SET \";\r\n\t\t\t$first = 1;\r\n\t\r\n\t\t\twhile ($fieldResult = db_fetch($fieldQuery)) {\r\n\t\t\r\n\t\t\t\tif (strtolower($fieldResult[\"Field\"]) != \"id\") {\r\n\t\t\t\t\r\n\t\t\t\t\tif (!$first) $sql .= \",\";\r\n\t\t\t\t\tif (substr(strtolower($fieldResult[\"Type\"]),0,7) == \"varchar\" || strtolower($fieldResult[\"Type\"]) == \"text\")\r\n\t\t\t\t\t\t$sql .= $fieldResult[\"Field\"].\"=\".escapeQuote($sourceResult[$fieldResult[\"Field\"]],0);\r\n\t\t\t\t\telse\t\t\t\t\r\n\t\t\t\t\t\t$sql .= $fieldResult[\"Field\"].\"=\".escapeValue($sourceResult[$fieldResult[\"Field\"]]);\r\n\t\t\t\t\t$first = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//echo $sql;\r\n\t\t\t//exit;\r\n\t\t\t$newId = db_insert($table);\r\n\t\t\tdb_query($sql.\" WHERE id=$newId\");\t\r\n\t\t\treturn $newId;\r\n\r\n\t\t} else return 0;\r\n\r\n\t} else return 0;\r\n\t\r\n}",
"public function UsePlan($plan_id) {\n\t\t$this->Param('plan_id', $plan_id, 'recur');\n\n\t\treturn true;\n\t}",
"public function plan_delete( $plan_id ) {\r\n\t\treturn $this->_send_request( 'plans/'.$plan_id, array(), STRIPE_METHOD_DELETE );\r\n\t}",
"public function duplicate($id){\n $db = team::find($id);\n $newDb = $db->replicate(); \n $newDb->img = 'rename';\n $newDb->save();\n return redirect()->to('team')->with('toast_success', 'Duplicate Successfully'); \n }",
"public function test_admin_ban_by_id()\n {\n $this->assertTrue($this->postScriptumServer->adminBanById(1, '1h', 'Test'));\n }",
"function TestCase_link_plan($case_id, $plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.link_plan', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public static function isPack($id_product)\n {\n }",
"public function getPOCopyForEdit($id);",
"function TestRun_get_test_plan($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_plan', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testCreateDuplicateEntry()\n {\n\n $this->call('POST', '/api/role', array(\n 'action' => $this->createAction,\n 'name' => $this->testRoleName,\n 'description' => $this->testRoleDesc\n ));\n\n $this->assertDatabaseHas('roles', [\n 'name' => $this->testRoleName,\n 'description' => $this->testRoleDesc\n ]);\n\n $this->call('POST', '/api/role', array(\n 'action' => $this->createAction,\n 'name' => $this->testRoleName,\n 'description' => \"duplicate\"\n ));\n\n $this->assertDatabaseMissing('roles', [\n 'name' => $this->testRoleName,\n 'description' => \"duplicate\"\n ]);\n\n }",
"public function setPlanId($val)\n {\n $this->plan_id = $val;\n return $this;\n }",
"function copy_plan_to_all_clinic_therapists($clinic_id, $plan_id){\n if( is_numeric($plan_id) && $plan_id > 0 && is_numeric($clinic_id) && $clinic_id > 0 ){\n \n $privateKey = $this->config['private_key'];\n $query = \" select u.*,\n AES_DECRYPT(UNHEX(u.name_title),'{$privateKey}') as name_title, \n AES_DECRYPT(UNHEX(u.name_first),'{$privateKey}') as name_first,\n AES_DECRYPT(UNHEX(u.name_last),'{$privateKey}') as name_last \n from clinic_user cu\n inner join user u on cu.user_id = u.user_id and u.usertype_id = 2 and u.status = 1 and u.user_id != '{$this->userInfo('user_id')}'\n where cu.clinic_id = '{$clinic_id}' \";\n $result = @mysql_query($query);\n while( $row = @mysql_fetch_array($result) ){\n $this->copy_plan($row['user_id'],$plan_id); \n } \n }\n }",
"public function get( $id ) {\n\n\t\t$instance = new \\Maven\\Core\\Domain\\VariationGroup();\n\n\t\tif ( ! $id ) {\n\t\t\tthrow new \\Maven\\Exceptions\\MissingParameterException( 'Id: is required' );\n\t\t}\n\n\t\t$row = $this->getRowById( $id );\n\n\t\tif ( ! $row ) {\n\t\t\tthrow new \\Maven\\Exceptions\\NotFoundException();\n\t\t}\n\n\n\t\t$this->fillObject( $instance, $row );\n\n\t\treturn $instance;\n\t}",
"public function duplicate($id, CombinacionEmpresa $combinacionEmpresa)\r\n\t{\r\n\t\t$combinacionEmpresa=$combinacionEmpresa->find($id);\r\n\t\treturn view('combinacionEmpresas.duplicate', compact('combinacionEmpresa'))\r\n\t\t\t->with( 'list', CombinacionEmpresa::getListFromAllRelationApps() );\r\n\t}",
"public function addCartItem($rateplanId, $quantity){\r\n\t\terror_log('cart.php rateplanId is: ' . $rateplanId, 0);\r\n\t\terror_log('cart.php quantity is: ' . $quantity, 0);\r\n\t\t//$newCartItem = new Cart_Item($rateplanId, $quantity, $this->latestItemId);\r\n\r\n\r\n\r\n\t\t$newCartItem = new Cart_Item();\r\n\t\t$newCartItem->ratePlanId = $rateplanId;\r\n\t\terror_log('cart.php ratePlanId2 is: ' . $newCartItem->ratePlanId, 0);\r\n\t\t$newCartItem->itemId = $this->latestItemId++;\r\n\t\terror_log('cart.php itemId is: ' . $newCartItem->itemId, 0);\r\n\t\t$newCartItem->quantity = $quantity;\r\n\r\n\t\t//$plan = Catalog::getRatePlan($newCartItem->ratePlanId);\r\n\t\t$rpId = $newCartItem->ratePlanId;\r\n\r\n\t\r\n\r\n\r\n\t\t$catalog_groups = self::readCache();\t//should be in associative array already.\r\n\r\n\t\t$catalog_products = $catalog_groups->products;\t//returns enture product array.\r\n\t\t//error_log(print_r($catalog_products, true));\r\n\t\t//error_log(print_r($catalog_products[2], true));\t//returns a product array with productrateplan and productrateplancharges arrays embedded inside.\r\n\t\t$catalog_rateplans = $catalog_products[0]->productRatePlans;\r\n\t\t//error_log(print_r($catalog_rateplans, true));\r\n\r\n\r\n\r\n\t\t//Commented out for DEMO\r\n\t\t// foreach($catalog_groups as $group){\r\n\t\t// \t\r\n\t\t// \tforeach($group->products as $product){\r\n\t\t// \t\t\r\n\t\t// \t\tforeach($product->productRatePlans as $ratePlan){\r\n\t\t// \t\t\tif($ratePlan->id == $rpId){\r\n\t\t// \t\t\t\t$plan = $ratePlan;\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// $plan = NULL;\r\n\r\n\t/**\r\n\t * Given a RatePlan ID, retrieves all rateplan information by searching through the cached catalog file\r\n\t * @return RatePlan model\r\n\t */\r\n\t// public static function getRatePlan($rpId){\r\n\t// \t$catalog_groups = self::readCache();\r\n\t// \tforeach($catalog_groups as $group){\r\n\t// \t\tforeach($group->products as $product){\r\n\t// \t\t\tforeach($product->ratePlans as $ratePlan){\r\n\t// \t\t\t\tif($ratePlan->Id == $rpId){\r\n\t// \t\t\t\t\treturn $ratePlan;\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// \treturn NULL;\r\n\t// }\r\n\r\n\r\n/*\t\t//Not needed? no Uom. \r\n\t\tif(isset($plan->Uom)){\r\n\t\t\t$newCartItem->uom = $plan->Uom;\r\n\t\t} else {\r\n\t\t\t$newCartItem->uom = null;\t\t\t\r\n\t\t}\r\n*/\t\r\n\t\t// $newCartItem->ratePlanName = $plan!=null ? $plan->Name : 'Invalid Product';\r\n\t\t// $newCartItem->ProductName = $plan!=null ? $plan->productName : 'Invalid Product';\r\n\r\n\t\t//Commented out for DEMO\r\n\t\t// $newCartItem->ratePlanName = $plan!=null ? $plan->name : 'Invalid Product';\r\n\t\t// $newCartItem->productName = $plan!=null ? $plan->productName : 'Invalid Product';\r\n\t\tarray_push($this->cart_items, $newCartItem);\r\n\t}",
"public function testGetProjectByID()\n {\n echo \"\\nTesting the project retrieval by ID...\";\n $response = $this->getProject(\"P1\");\n \n //echo \"\\ntestGetProjectByID------\".$response;\n \n \n $result = json_decode($response);\n $prj = $result->Project;\n $this->assertTrue((!is_null($prj)));\n return $result;\n }",
"function fill_form_bp_plan($gml_id) {\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\t\" . \n\t\t\t\t\"'\" . $this->trim_gml_prefix_if_exists($gml_id) . \"'::text::uuid AS plan_gml_id,\n\t\t\t\tgmlas.xplan_name AS name,\n\t\t\t\tgmlas.nummer AS nummer,\n\t\t\t\tgmlas.internalid AS internalid,\n\t\t\t\tgmlas.beschreibung AS beschreibung,\n\t\t\t\tgmlas.kommentar AS kommentar,\n\t\t\t\tto_char(gmlas.technherstelldatum, 'DD.MM.YYYY') AS technherstelldatum,\n\t\t\t\tto_char(gmlas.genehmigungsdatum, 'DD.MM.YYYY') AS genehmigungsdatum,\n\t\t\t\tto_char(gmlas.untergangsdatum, 'DD.MM.YYYY') AS untergangsdatum,\n\t\t\t\tCASE WHEN vpa.planname IS NOT NULL OR vpa.rechtscharakter IS NOT NULL OR vpa.nummer IS NOT NULL OR vpa.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpa.planname, vpa.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpa.nummer, vpa.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS aendert,\n\t\t\t\tCASE WHEN vpwgv.planname IS NOT NULL OR vpwgv.rechtscharakter IS NOT NULL OR vpwgv.nummer IS NOT NULL OR vpwgv.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpwgv.planname, vpwgv.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpwgv.nummer, vpwgv.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS wurdegeaendertvon,\n\t\t\t\tgmlas.erstellungsmassstab AS erstellungsmassstab,\n\t\t\t\tgmlas.bezugshoehe AS bezugshoehe,\n\t\t\t\tst_assvg(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\"), 0, 8) AS newpath,\n\t\t\t\tst_astext(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\")) AS newpathwkt,\n\t\t\t\tCASE WHEN vm.xp_verfahrensmerkmal_vermerk IS NOT NULL OR vm.xp_verfahrensmerkmal_datum IS NOT NULL OR vm.xp_verfahrensmerkmal_signatur IS NOT NULL OR vm.xp_verfahrensmerkmal_signiert IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vm.xp_verfahrensmerkmal_vermerk, vm.xp_verfahrensmerkmal_datum, vm.xp_verfahrensmerkmal_signatur, vm.xp_verfahrensmerkmal_signiert)]::xplan_gml.xp_verfahrensmerkmal[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS verfahrensmerkmale,\n\t\t\t\tCASE\n\t\t\t\t\tWHEN count_externeref > 0\n\t\t\t\t\tTHEN array_to_json(externeref.externereferenz)\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS externereferenz,\n\t\t\t\tto_char(gmlas.veraenderungssperredatum, 'DD.MM.YYYY') AS veraenderungssperredatum,\n\t\t\t\tarray_to_json(ARRAY[(g.ags,g.rs,g.gemeindename,g.ortsteilname)]::xplan_gml.xp_gemeinde[]) AS gemeinde,\n\t\t\t\tgmlas.verfahren::xplan_gml.bp_verfahren AS verfahren,\n\t\t\t\tto_char(gmlas.inkrafttretensdatum, 'DD.MM.YYYY') AS inkrafttretensdatum,\n\t\t\t\tgmlas.durchfuehrungsvertrag AS durchfuehrungsvertrag,\n\t\t\t\tgmlas.staedtebaulichervertrag AS staedtebaulichervertrag,\n\t\t\t\tgmlas.rechtsverordnungsdatum AS rechtsverordnungsdatum,\n\t\t\t\tgmlas.rechtsstand::xplan_gml.bp_rechtsstand AS rechtsstand,\n\t\t\t\tgmlas.hoehenbezug AS hoehenbezug,\n\t\t\t\tto_char(gmlas.aufstellungsbeschlussdatum, 'DD.MM.YYYY') AS aufstellungsbeschlussdatum,\n\t\t\t\tto_char(gmlas.ausfertigungsdatum, 'DD.MM.YYYY') AS ausfertigungsdatum,\n\t\t\t\tto_char(gmlas.satzungsbeschlussdatum, 'DD.MM.YYYY') AS satzungsbeschlussdatum,\n\t\t\t\tgmlas.veraenderungssperre AS veraenderungssperre,\n\t\t\t\tarray_to_json(ARRAY[to_char(aled.value, 'DD.MM.YYYY')]::date[]) AS auslegungsenddatum,\n\t\t\t\t(gmlas.sonstplanart_codespace, gmlas.sonstplanart, NULL)::xplan_gml.bp_sonstplanart AS sonstplanart,\n\t\t\t\tgmlas.gruenordnungsplan AS gruenordnungsplan,\n\t\t\t\tto_json((pg.name, pg.kennziffer)::xplan_gml.xp_plangeber) AS plangeber,\n\t\t\t\tarray_to_json(ARRAY[to_char(alsd.value, 'DD.MM.YYYY')]::date[]) AS auslegungsstartdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbsd.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsstartdatum,\n\t\t\t\tto_char(gmlas.aenderungenbisdatum, 'DD.MM.YYYY') AS aenderungenbisdatum,\n\t\t\t\tto_json((gmlas.status_codespace, gmlas.status, NULL)::xplan_gml.bp_status) AS status,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbed.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsenddatum,\n\t\t\t\tarray_to_json(gmlas.planart) AS planart,\n\t\t\t\tgmlas.erschliessungsvertrag AS erschliessungsvertrag\n\t\t\tFROM\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan gmlas LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_gemeinde gemeindelink ON gmlas.id = gemeindelink.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_gemeinde g ON gemeindelink.xp_gemeinde_pkid = g.ogr_pkid LEFT JOIN\n\t\t\t\t(\n\t\t\t\t\tSElECT\n\t\t\t\t\t\tCOUNT(*) AS count_externeref,\n\t\t\t\t\t\texternereferenzlink_sub.parent_id,\n\t\t\t\t\t\tarray_agg((e_sub.georefurl,\n\t\t\t\t\t\t\t\t(e_sub.georefmimetype_codespace, e_sub.georefmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.art::xplan_gml.xp_externereferenzart,\n\t\t\t\t\t\t\t\te_sub.informationssystemurl,\n\t\t\t\t\t\t\t\te_sub.referenzname,\n\t\t\t\t\t\t\t\te_sub.referenzurl,\n\t\t\t\t\t\t\t\t(e_sub.referenzmimetype_codespace, e_sub.referenzmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.beschreibung,\n\t\t\t\t\t\t\t\tto_char(e_sub.datum, 'DD.MM.YYYY'),\n\t\t\t\t\t\t\t\te_sub.typ::xplan_gml.xp_externereferenztyp\n\t\t\t\t\t\t\t)::xplan_gml.xp_spezexternereferenz) AS externereferenz\n\t\t\t\t\tFROM\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_externereferenz externereferenzlink_sub LEFT JOIN\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".xp_spezexternereferenz e_sub ON externereferenzlink_sub.xp_spezexternereferenz_pkid = e_sub.ogr_pkid\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\texternereferenzlink_sub.parent_id\n\t\t\t\t) externeref ON gmlas.id = externeref.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_aendert_aendert aendertlink ON gmlas.id = aendertlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".aendert aendertlinktwo ON aendertlink.child_pkid = aendertlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpa ON aendertlinktwo.xp_verbundenerplan_pkid = vpa.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_wurdegeaendertvon_wurdegeaendertvon wurdegeaendertvonlink ON gmlas.id = wurdegeaendertvonlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".wurdegeaendertvon wurdegeaendertvonlinktwo ON wurdegeaendertvonlink.child_pkid = wurdegeaendertvonlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpwgv ON wurdegeaendertvonlinktwo.xp_verbundenerplan_pkid = vpwgv.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_verfahrensmerkmale_verfahrensmerkmale verfahrensmerkmalelink ON gmlas.id = verfahrensmerkmalelink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".verfahrensmerkmale vm ON verfahrensmerkmalelink.child_pkid = vm.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_plangeber pg ON gmlas.plangeber_xp_plangeber_pkid = pg.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_auslegungsstartdatum alsd ON gmlas.id = alsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_auslegungsenddatum aled ON gmlas.id = aled.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_traegerbeteiligungsstartdatum tbsd ON gmlas.id = tbsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_traegerbeteiligungsenddatum tbed ON gmlas.id = tbed.parent_id\n\t\t\tWHERE\n\t\t\t\tgmlas.id ='\" . $gml_id . \"'\n\t\t\t;\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$result = pg_fetch_assoc($ret[1]);\n\t\treturn $result;\n\t}",
"public function show($id)\n {\n $Planning = Planning::findOrFail($id);\n\n return new PlanningResource($Planning);\n }",
"public function show($id)\n {\n $planpackage = $this->packagemodel->getById($id); \n return response()->json($planpackage);\n }",
"public function generate($id)\n {\n $plan = Testplan::find($id);\n\n return View::make('core::testplans.generating')\n ->with('attempt', 1)\n ->with('max_attempts', $plan->max_attempts)\n ->with('testplan_id', $id);\n }"
] | [
"0.6362934",
"0.6326791",
"0.5976135",
"0.5921401",
"0.58511144",
"0.58135414",
"0.58023816",
"0.5753263",
"0.56158876",
"0.55545306",
"0.55315685",
"0.54724145",
"0.5409555",
"0.5407465",
"0.5402911",
"0.5362996",
"0.5341648",
"0.52647996",
"0.5260013",
"0.5235977",
"0.5228203",
"0.51953",
"0.51816744",
"0.515188",
"0.51378024",
"0.51264775",
"0.51181394",
"0.50837165",
"0.50355625",
"0.50050676",
"0.5002223",
"0.49926865",
"0.49841222",
"0.498273",
"0.49777338",
"0.49481422",
"0.49321806",
"0.48968264",
"0.48926863",
"0.48915085",
"0.48837206",
"0.48834494",
"0.48804545",
"0.4875585",
"0.4867026",
"0.48665908",
"0.48609278",
"0.48597693",
"0.48470807",
"0.48447856",
"0.48391598",
"0.48372734",
"0.48354718",
"0.48161882",
"0.4807711",
"0.4775711",
"0.47636846",
"0.47622797",
"0.4746416",
"0.47291818",
"0.47286764",
"0.4721727",
"0.47142425",
"0.4713172",
"0.4691665",
"0.46856317",
"0.46752667",
"0.46746653",
"0.4674431",
"0.46712017",
"0.46649295",
"0.46559057",
"0.46515468",
"0.4643906",
"0.4643131",
"0.46410477",
"0.46382028",
"0.46094307",
"0.4599222",
"0.45870736",
"0.45698762",
"0.45691636",
"0.45684463",
"0.45681414",
"0.45639884",
"0.45623624",
"0.45616895",
"0.4560984",
"0.45579973",
"0.455577",
"0.45522243",
"0.45499748",
"0.4548219",
"0.45428208",
"0.453868",
"0.45358145",
"0.45309365",
"0.45263338",
"0.4516986",
"0.45163986"
] | 0.7463125 | 0 |
Test case for getPackingPlanByFilter Search packingPlans by filter. | public function testGetPackingPlanByFilter()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetPackingPlanById()\n {\n }",
"public function getsAListOfPlans()\n {\n // Arrange\n // Act\n $plans = Ezypay::getPlans();\n\n // Assert\n //$this->assertEquals(3, sizeof($plans->data)); // Causing issues as there are aditional plans\n $this->assertNotNull($plans);\n\n $this->plans = $plans;\n }",
"public function getPlan();",
"public function testGetExternalShipmentByFilter()\n {\n }",
"public function testAddPackingPlan()\n {\n }",
"public static function get_payment_plan_search_field() {\n\n check_ajax_referer( 'sumo-pp-get-payment-plan-search-field' , 'security' ) ;\n\n wp_send_json( array (\n 'search_field' => _sumo_pp_wc_search_field( array (\n 'class' => 'wc-product-search' ,\n 'action' => '_sumo_pp_json_search_sumo_payment_plans' ,\n 'id' => isset( $_POST[ 'loop' ] ) ? \"selected_{$_POST[ 'col' ]}_payment_plan_{$_POST[ 'rowID' ]}{$_POST[ 'loop' ]}\" : \"selected_{$_POST[ 'col' ]}_payment_plan_{$_POST[ 'rowID' ]}\" ,\n 'name' => isset( $_POST[ 'loop' ] ) ? \"_sumo_pp_selected_plans[{$_POST[ 'loop' ]}][{$_POST[ 'col' ]}][{$_POST[ 'rowID' ]}]\" : \"_sumo_pp_selected_plans[{$_POST[ 'col' ]}][{$_POST[ 'rowID' ]}]\" ,\n 'type' => 'payment_plans' ,\n 'selected' => false ,\n 'multiple' => false ,\n 'placeholder' => __( 'Search for a payment plan…' , _sumo_pp()->text_domain ) ,\n ) , false ) ,\n ) ) ;\n }",
"public function buscar_plans() {\n $pla = $_POST['p'];\n $places = $_POST['pl'];\n $preu_min = $_POST['pmi'];\n $preu_max = $_POST['pma'];\n \n $sql = \"SELECT DISTINCT plans.descrip AS descripcio, serveis.id AS servei_id,\n reserves.idusuari AS reservesidusuari, serveis.preu AS serveipreu, \n serveis_reservats.idreserva AS idreserva, reserves.status AS status \n FROM plans \n LEFT JOIN serveis ON plans.id = serveis.id\n LEFT JOIN serveis_reservats ON serveis.id = serveis_reservats.idservei\n LEFT JOIN reserves ON serveis_reservats.idreserva = reserves.id\n \n WHERE plans.descrip = '\".utf8_decode($pla).\"' AND serveis.nplaces >= \".$places.\" AND serveis.preu >= \".$preu_min.\" \n AND serveis.preu <= \".$preu_max.\";\";\n \n $query=$this->db->prepare($sql);\n $query->execute();\n $res=$query->fetchAll();\n \n return $res;\n }",
"public function planes_listar(){\n\t\t$params = array();\n\t\ttry {\n\t\t\t$flow = $this->send('plans/list', $params, 'GET');\t \t\t\t\n\t\t\treturn $flow;\n\t\t} catch (Exception $e) { return $e->getCode().\" - \".$e->getMessage(); }\n\t}",
"function AvailablePlans()\n\t{\n\t\t// Check user authorization and permissions\n\t\tAuthenticatedUser()->CheckAuth();\n\t\tAuthenticatedUser()->PermissionOrDie(PERMISSION_OPERATOR_VIEW);\n\n\t\t// Context menu\n\t\t// (Nothing to add)\n\n\t\t// DEBUG\n\t\tif (DBO()->RatePlan->Status->Value == RATE_STATUS_DRAFT) {\n\t\t\t//throw new Exception(\"Filtered to Drafts\");\n\t\t}\n\n\t\t// Breadcrumb menu\n\t\tBreadcrumb()->Employee_Console();\n\t\tBreadCrumb()->SetCurrentPage(\"Available Plans\");\n\n\t\tif (!(DBO()->RatePlan->GetLast->IsSet && DBO()->RatePlan->GetLast->Value))\n\t\t{\n\t\t\t// Don't base the plan retrieval on the constraints stored in the session\n\t\t\tunset($_SESSION['AvailablePlansPage']['Filter']);\n\t\t}\n\n\t\t// Update the Session details with the current filter, if one has been specified\n\t\tif (DBO()->RatePlan->ServiceType->IsSet)\n\t\t{\n\t\t\t// A valid ServiceType filter has been specified\n\t\t\ttry {\n\t\t\t\t// A specific ServiceType has been requested\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['ServiceType'] = Service_Type::getForId(DBO()->RatePlan->ServiceType->Value)->id;\n\t\t\t} catch (Exception_ORM_LoadById $oException) {\n\t\t\t\t// Show all services types\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['ServiceType'] = 0;\n\t\t\t}\n\t\t}\n\t\telseif (!isset($_SESSION['AvailablePlansPage']['Filter']['ServiceType']))\n\t\t{\n\t\t\t// A ServiceType filter hasn't been specified, and one isn't currently cached, set it to view all ServiceTypes\n\t\t\t$_SESSION['AvailablePlansPage']['Filter']['ServiceType'] = 0;\n\t\t}\n\n\t\tif (DBO()->RatePlan->CustomerGroup->IsSet)\n\t\t{\n\t\t\tif (array_key_exists(DBO()->RatePlan->CustomerGroup->Value, Customer_Group::getAll()))\n\t\t\t{\n\t\t\t\t// A specific CustomerGroup filter has been specified\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['CustomerGroup'] = DBO()->RatePlan->CustomerGroup->Value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Show all CustomerGroups\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['CustomerGroup'] = 0;\n\t\t\t}\n\t\t}\n\t\telseif (!isset($_SESSION['AvailablePlansPage']['Filter']['ServiceType']))\n\t\t{\n\t\t\t// A CustomerGroup filter hasn't been specified, and one isn't currently cached, set it to view all CustomerGroups\n\t\t\t$_SESSION['AvailablePlansPage']['Filter']['CustomerGroup'] = 0;\n\t\t}\n\n\t\tif (DBO()->RatePlan->Status->IsSet)\n\t\t{\n\t\t\t// A valid ServiceType filter has been specified\n\t\t\tif (array_key_exists(DBO()->RatePlan->Status->Value, $GLOBALS['*arrConstant']['RateStatus']))\n\t\t\t{\n\t\t\t\t// A specific RateStatus has been requested\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['Status'] = DBO()->RatePlan->Status->Value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Show all RatePlans\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['Status'] = -1;\n\t\t\t}\n\n\t\t}\n\t\telseif (!isset($_SESSION['AvailablePlansPage']['Filter']['Status']))\n\t\t{\n\t\t\t// A Status filter hasn't been specified, and one isn't currently cached, set it to view all Active RatePlans\n\t\t\t$_SESSION['AvailablePlansPage']['Filter']['Status'] = 0;\n\t\t}\n\n\t\t// Retrieve all RatePlans that satisfy the filter conditions\n\t\t$strServiceTypeFilter\t= \"TRUE\";\n\t\t$strCustomerGroupFilter\t= \"TRUE\";\n\t\t$strStatusFilter\t\t= \"TRUE\";\n\t\tif ($_SESSION['AvailablePlansPage']['Filter']['ServiceType'])\n\t\t{\n\t\t\t$strServiceTypeFilter = \"RP.ServiceType = <ServiceType>\";\n\t\t}\n\t\tif ($_SESSION['AvailablePlansPage']['Filter']['CustomerGroup'])\n\t\t{\n\t\t\t$strCustomerGroupFilter = \"RP.customer_group = <CustomerGroup>\";\n\t\t}\n\t\tif (array_key_exists($_SESSION['AvailablePlansPage']['Filter']['Status'], $GLOBALS['*arrConstant']['RateStatus']))\n\t\t{\n\t\t\t$strStatusFilter = \"RP.Archived = <Status>\";\n\t\t}\n\n\t\t$strWhere = \"$strServiceTypeFilter AND $strCustomerGroupFilter AND $strStatusFilter\";\n\t\t$arrWhere = array(\n\t\t\t\t\t\t\t\"ServiceType\"\t=> $_SESSION['AvailablePlansPage']['Filter']['ServiceType'],\n\t\t\t\t\t\t\t\"CustomerGroup\"\t=> $_SESSION['AvailablePlansPage']['Filter']['CustomerGroup'],\n\t\t\t\t\t\t\t\"Status\"\t\t=> $_SESSION['AvailablePlansPage']['Filter']['Status']\n\t\t\t\t\t\t);\n\n\t\t/*$arrColumns = array(\n\t\t\t\t\t\t\t\"Id\"\t\t\t\t\t=> \"RP.Id\",\n\t\t\t\t\t\t\t\"ServiceType\"\t\t\t=> \"RP.ServiceType\",\n\t\t\t\t\t\t\t\"Name\"\t\t\t\t\t=> \"RP.Name\",\n\t\t\t\t\t\t\t\"Description\"\t\t\t=> \"RP.Description\",\n\t\t\t\t\t\t\t\"CarrierFullService\"\t=> \"RP.CarrierFullService\",\n\t\t\t\t\t\t\t\"CarrierPreselection\"\t=> \"RP.CarrierPreselection\",\n\t\t\t\t\t\t\t\"customer_group\"\t\t=> \"RP.customer_group\",\n\t\t\t\t\t\t\t\"Archived\"\t\t\t\t=> \"RP.Archived\",\n\t\t\t\t\t\t\t\"IsDefault\"\t\t\t\t=> \"CASE WHEN drp.Id IS NOT NULL THEN TRUE ELSE FALSE END\",\n\t\t\t\t\t\t\t\"DealerCount\"\t\t\t=> \"COALESCE(DRP.DealerCount, 0)\"\n\t\t\t\t\t\t\t);*/\n\t\t$strColumns\t\t= \"RP.*, CASE WHEN drp.Id IS NOT NULL THEN TRUE ELSE FALSE END AS IsDefault, COALESCE(DRP.DealerCount, 0) AS DealerCount\";\n\t\t$strTables\t\t= \"RatePlan AS RP LEFT JOIN default_rate_plan AS drp ON RP.Id = drp.rate_plan AND RP.customer_group = drp.customer_group AND RP.ServiceType = drp.service_type LEFT OUTER JOIN (SELECT rate_plan_id AS RatePlanId, COUNT(id) AS DealerCount FROM dealer_rate_plan GROUP BY rate_plan_id) AS DRP ON RP.Id = DRP.RatePlanId\";\n\t\t$strOrderBy\t\t= \"ServiceType, Name, customer_group\";\n\t\t$selRatePlans\t= new StatementSelect($strTables, $strColumns, $strWhere, $strOrderBy);\n\t\tif ($selRatePlans->Execute($arrWhere) === FALSE)\n\t\t{\n\t\t\tDBO()->Error->Message = \"Unexpected database error occurred when trying to retrieve RatePlans. Please notify your system administrator\";\n\t\t\t$this->LoadPage('error');\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tDBO()->RatePlans->AsArray = $selRatePlans->FetchAll();\n\n\n\t\t$this->LoadPage('plans_list');\n\n\t\treturn TRUE;\n\t}",
"public static function json_search_sumo_payment_plans() {\n ob_start() ;\n\n $term = ( string ) wc_clean( stripslashes( isset( $_GET[ 'term' ] ) ? $_GET[ 'term' ] : '' ) ) ;\n $exclude = array () ;\n\n if ( isset( $_GET[ 'exclude' ] ) && ! empty( $_GET[ 'exclude' ] ) ) {\n $exclude = array_map( 'intval' , explode( ',' , $_GET[ 'exclude' ] ) ) ;\n }\n\n $args = array (\n 'type' => 'sumo_payment_plans' ,\n 'status' => 'publish' ,\n 'return' => 'posts' ,\n 'order' => 'ASC' ,\n 'orderby' => 'parent title' ,\n 's' => $term ,\n 'exclude' => $exclude ,\n ) ;\n\n $posts = _sumo_pp()->query->get( $args ) ;\n $found_plans = array () ;\n\n if ( ! empty( $posts ) ) {\n foreach ( $posts as $post ) {\n $found_plans[ $post->ID ] = $post->post_title ;\n }\n }\n wp_send_json( $found_plans ) ;\n }",
"public function run()\n {\n $plans =\n array(\n array(\n \"product_id\"=>1,\n \"title\" => \"Basic\",\n \"pricing\" => 6850,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 5 User accounts;\n 1 Free system admin account;\n 500 SMS notifications in a month;\n A maximum of 500,000 customer records;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>1,\n \"title\" => \"Standard\",\n \"pricing\" => 11800,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 15 User accounts;\n 1 Free system admin account;\n 1000 SMS notifications in a month;\n A maximum of 1,500,000 customer records;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>1,\n \"title\" => \"Enterprise\",\n \"pricing\" => 21550,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 100 User accounts;\n 1 Free system admin account;\n 5000 SMS notifications in a month;\n A maximum of 500,000 customer records;\n Organization with multiple receptions\n All reports;\",\n \"note\" => \"Extra functionality will be charged at 2% of the Basic\"\n ),\n\n /******************module 2*****************/\n\n array(\n \"product_id\"=>2,\n \"title\" => \"Basic\",\n \"pricing\" => 18000,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 5 User accounts;\n 1 Free system admin account;\n A maximum of 500,000 customer records;\n Free end user android mobile application on 5 devices;\n A maximum of 5 E-Security desk;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>2,\n \"title\" => \"Standard\",\n \"pricing\" => 25800,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 15 User accounts;\n 1 Free system admin account;\n A maximum of 1,500,000 customer records;\n Free end user android mobile application on 15 devices;\n A maximum of 15 E-Security desk;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>2,\n \"title\" => \"Enterprise\",\n \"pricing\" => 50550,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 100 User accounts;\n 1 Free system admin account;\n A maximum of 5,000,000 customer records;\n Free end user android mobile application on 100 devices;\n A maximum of 100 E-Security desk;\n All reports;\",\n \"note\" => \"Extra functionality will be charged at 2% of the Basic\"\n )\n );\n\n DB::table('plans')->delete();\n DB::table('plans')->insert($plans);\n\n }",
"public function test_getExternalShipmentByFilter() {\n\n }",
"public function getBillingPlans(User $user, StandardProduct $product);",
"public function testFilter()\n {\n // so here we just verify that the params are passed correctly internally\n $project_repository = $this->getMockBuilder(ProjectRepository::class)\n ->disableOriginalConstructor()\n ->setMethods(['scopeByDate', 'scopeWithTags', 'scopeWithoutTags',\n 'scopeByField', 'search'])->getMock();\n\n // with tags\n $project_repository->expects($this->once())->method('scopeWithTags')\n ->with($this->equalTo('badabing'));\n $project_repository->filter(['withTags' => 'badabing']);\n\n // without tags\n $project_repository->expects($this->once())->method('scopeWithoutTags')\n ->with($this->equalTo('badabeng'));\n $project_repository->filter(['withoutTags' => 'badabeng']);\n\n // with date\n $project_repository->expects($this->once())->method('scopeByDate')\n ->with($this->equalTo('27.01.2018'));\n $project_repository->filter(['date' => '27.01.2018']);\n\n // with search\n $project_repository->expects($this->once())->method('search')\n ->with($this->equalTo('jahade'));\n $project_repository->filter(['search' => 'jahade']);\n\n // default\n $project_repository->expects($this->once())->method('scopeByField')\n ->with(\n $this->equalTo('budget_price'),\n $this->equalTo('65000')\n );\n $project_repository->filter(['budget_price' => '65000']);\n }",
"public function getAdsPlans()\r\n {\r\n /*$content_type = [];\r\n $objectManager = $this->blockObjectManager();\r\n $customerSession = $objectManager->create('Magento\\Customer\\Model\\Session');\r\n $customerid = $customerSession->getCustomerId();\r\n $model = $objectManager->create('Webkul\\MpAdvertisementManager\\Model\\Block')->getCollection();\r\n $data = $model->addFieldToFilter('seller_id', array('eq'=> $customerid));\r\n foreach ($data as $collections) {\r\n $content_type[] = $collections->getContentType();\r\n }\r\n $dataCollection = $this->_adsHelper->getAdsPlans()->addFieldToFilter('content_type', array('in'=> array_unique($content_type)));*/\r\n return $this->_adsHelper->getAdsPlans();\r\n // return $dataCollection;\r\n }",
"public function getPlansBySearch(string $toSearch){\n $this->open();\n\n $result = $this->query('SELECT * FROM '.$this->TABLE_NAME.' WHERE name LIKE :name', array(\n new QueryParam(':name', '%'.$toSearch.'%'),\n ));\n\n // Close connection\n $this->close();\n\n // Check if is found\n if($result->rowCount() > 0){\n\n $plans = array();\n\n // Check result\n while($row = $result->fetch(PDO::FETCH_OBJ)){\n $foundPlan = new Plan(\n $row->id,\n $row->name,\n $row->price,\n $row->detail,\n $row->docsUrl\n );\n\n array_push($plans, $foundPlan);\n }\n\n return $plans;\n\n }\n else{\n // It isn't found so return false\n return array();\n }\n\n }",
"static function getAllPlans(){\n global $configClass;\n if($configClass['integrate_membership'] == 1){\n $db = JFactory::getDbo();\n $nullDate = $db->quote($db->getNullDate());\n $nowDate = $db->quote(JHtml::_('date', 'now', 'Y-m-d H:i:s', false));\n $query = $db->getQuery(true);\n $query->select('tbl.*')->from('#__osmembership_plans as tbl');\n $query->where('tbl.published = 1')\n ->where('tbl.access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')')\n ->where('(tbl.publish_up = ' . $nullDate . ' OR tbl.publish_up <= ' . $nowDate . ')')\n ->where('(tbl.publish_down = ' . $nullDate . ' OR tbl.publish_down >= ' . $nowDate . ')');\n $db->setQuery($query);\n $allPlans = $db->loadObjectList();\n return $allPlans;\n }\n }",
"public function getAllPlans()\n {\n try {\n return $this->plan->all();\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return false;\n }\n }",
"public function testGetPackingPlanFiles()\n {\n }",
"public function planFindByField($field,$condition,$value,$orderBy= 'asc');",
"protected function rawFilter($filter) {\n //Log::debug('query: ',$filter);\n\t\t// Build a query based on filter $filter\n\t\t$query = Pallet::query()\n ->select('Pallet.objectID', 'Pallet.Pallet_ID', 'Pallet.x', 'Pallet.y', 'Pallet.z', 'Pallet.Status')\n ->orderBy('Pallet_ID', 'asc');\n if(isset($filter['Pallet_ID']) && strlen($filter['Pallet_ID']) > 2) {\n $query->where('Pallet_ID', 'like', ltrim($filter['Pallet_ID'],'0') . '%');\n\t\t}\n\t\tif(isset($filter['Pallet_ID.prefix']) && is_array($filter['Pallet_ID.prefix'])) {\n $query->whereRaw(\"substring(Pallet_ID,1,3) in ('\".implode(\"','\", $filter['Pallet_ID.prefix']).\"')\");\n\t\t}\n if(isset($filter['Status']) && is_array($filter['Status'])) {\n $query->whereRaw(\"Status in ('\".implode(\"','\", $filter['Status']).\"')\");\n }\n elseif(isset($filter['Status']) && strlen($filter['Status']) > 3) {\n $query->where('Status', '=', $filter['Status']);\n }\n /*\n * container.parent should generate this sql request\n * select Pallet.* from Pallet join container plt on plt.objectID = Pallet.objectID where plt.parentID = 6213292055;\n */\n if(isset($filter['container.parent']) && strlen($filter['container.parent']) > 3) {\n $query\n ->join('container as plt', 'plt.objectID', '=', 'Pallet.objectID')\n ->where('plt.parentID',$filter['container.parent']);\n }\n /*\n * container.child should generate this sql request\n * select Pallet.* from Pallet join container gc on gc.parentID = Pallet.objectID where gc.objectID = 6226111054;\n */\n if(isset($filter['container.child']) && strlen($filter['container.child']) > 3) {\n $query\n ->join('container as gc', 'gc.parentID', '=', 'Pallet.objectID')\n ->where('gc.objectID',$filter['container.child']);\n }\n return $query;\n }",
"public function testFetchAllPlans()\n {\n $plan = new Plan(\"Test Plan\", 3000, \"weekly\");\n $plan->save();\n\n $plans = Plan::fetchAll();\n $this->assertNotNull($plans);\n $this->assertContainsOnlyInstancesOf(Plan::class, $plans);\n }",
"public function getFormatedPlans()\n {\n $currencySymbol = config('app.currency');\n\n $data = [];\n\n foreach ($this->planRepository->all() as $plan) {\n if (! (float) $plan->monthly_amount) {\n continue;\n }\n\n $data['month'][$plan->id] = [\n 'id' => $plan->id,\n 'name' => $plan->name,\n 'label' => trans('saassubscription::app.admin.checkout.plan-option-label', [\n 'plan' => $plan->name,\n 'amount' => core()->formatPrice($plan->monthly_amount, $currencySymbol)\n ]),\n 'amount' => core()->formatPrice($plan->monthly_amount, $currencySymbol),\n 'total' => core()->formatPrice($plan->monthly_amount, $currencySymbol),\n ];\n\n $data['year'][$plan->id] = [\n 'id' => $plan->id,\n 'name' => $plan->name,\n 'label' => trans('saassubscription::app.admin.checkout.plan-option-label', [\n 'plan' => $plan->name,\n 'amount' => core()->formatPrice($plan->yearly_amount, $currencySymbol)\n ]),\n 'amount' => core()->formatPrice($plan->yearly_amount, $currencySymbol),\n 'total' => core()->formatPrice($plan->yearly_amount * 12, $currencySymbol),\n ];\n }\n\n return $data;\n }",
"public function getPlanById()\n {\n // Arrange\n // Act\n if (! isset($this->plans)) {\n $this->getsAListOfPlans();\n }\n $plans = $this->plans;\n $plan = $plans['data'][0];\n\n $plan = Ezypay::getPlan($plan['id']);\n\n // Assert\n $this->assertNotNull($plan);\n $this->assertEquals($plan['id'], $plan['id']);\n }",
"public function test_getReplenishmentProcessByFilter() {\n\n }",
"public function testGetReplenishmentByFilter()\n {\n }",
"public function test_getFilters()\n {\n /**\n * @var $builder TransactionFilterOptionsBuilder\n */\n $builder = app( TransactionFilterOptionsBuilder::class );\n $viewModel = $builder->GetModel();\n $response = $this->get('/api/transactions/filters');\n $response\n ->assertStatus(200)\n ->assertJson([\n 'types' => [\n [\n 'id' => $viewModel->types[0]->id,\n 'label' => $viewModel->types[0]->label,\n 'key' => $viewModel->types[0]->key\n ]\n ],\n 'categories' => [\n [\n 'id' => $viewModel->categories[0]->id,\n 'label' => $viewModel->categories[0]->label,\n 'key' => $viewModel->categories[0]->key\n ]\n ]\n ]);\n }",
"public function testGetLowStockByFilter()\n {\n }",
"public function testUpdatePackingPlan()\n {\n }",
"public function rawFilter($filter) {\n\t\t$query = InventorySummary::orderBy('Client_SKU', 'asc');\n\t\tif(isset($filter['objectID']) && strlen($filter['objectID']) > 3) {\n\t\t\t$query = $query->where('objectID', 'like', $filter['objectID'] . '%');\n\t\t}\n\t\tif(isset($filter['Client_SKU']) && strlen($filter['Client_SKU']) > 3) {\n\t\t\t$query = $query->where('Client_SKU', 'like', $filter['Client_SKU'] . '%');\n\t\t}\n\t\tif(isset($filter['Description']) && strlen($filter['Description']) > 3) {\n\t\t\t$query = $query->where('Description', 'like', $filter['Description'] . '%');\n\t\t}\n\n /*\n * Pick face quantity choices\n */\n if(isset($filter['pickQty_rb'])) {\n if($filter['pickQty_rb'] == 'zero') {\n $query = $query->where('pickQty', '=', '0');\n } elseif($filter['pickQty_rb'] == 'belowMin') {\n $query = $query->where('pickQty', '<', '3');\n } elseif($filter['pickQty_rb'] == 'aboveMin') {\n $query = $query->where('pickQty', '>', '2');\n }\n }\n\n /*\n * Activity location quantity choices\n */\n if(isset($filter['actQty_rb'])) {\n if($filter['actQty_rb'] == 'zero') {\n $query = $query->where('actQty', '=', '0');\n } elseif($filter['actQty_rb'] == 'aboveZero') {\n $query = $query->where('actQty', '>', '0');\n }\n }\n\n /*\n * Reserve quantity choices\n */\n if(isset($filter['resQty_rb'])) {\n if($filter['resQty_rb'] == 'zero') {\n $query = $query->where('resQty', '=', '0');\n } elseif($filter['resQty_rb'] == 'aboveZero') {\n $query = $query->where('resQty', '>', '0');\n }\n }\n\n /*\n * Replen Priority choices\n */\n if(isset($filter['replenPrty_cb_noReplen'])\n or isset($filter['replenPrty_cb_20orBelow'])\n or isset($filter['replenPrty_cb_40orBelow'])\n or isset($filter['replenPrty_cb_60orBelow'])) {\n $query->where(function ($query) use ($filter) {\n if (isset($filter['replenPrty_cb_noReplen']) && $filter['replenPrty_cb_noReplen'] == 'on') {\n $query->orWhereNull('replenPrty')\n ->orWhere('replenPrty', '=', '0');\n }\n if (isset($filter['replenPrty_cb_20orBelow']) && $filter['replenPrty_cb_20orBelow'] == 'on') {\n $query->orWhereBetween('replenPrty', ['1', '20']);\n }\n if (isset($filter['replenPrty_cb_40orBelow']) && $filter['replenPrty_cb_40orBelow'] == 'on') {\n $query->orWhereBetween('replenPrty', ['21', '40']);\n }\n if (isset($filter['replenPrty_cb_60orBelow']) && $filter['replenPrty_cb_60orBelow'] == 'on') {\n $query->orWhereBetween('replenPrty', ['41', '60']);\n }\n });\n }\n //dd(__METHOD__.\"(\".__LINE__.\")\", compact('filter', 'query'));\n\n\t\tif(isset($filter['created_at']) && strlen($filter['created_at']) > 1) {\n\t\t\t$query = $query->where('created_at', 'like', $filter['created_at'] . '%');\n\t\t}\n\t\tif(isset($filter['updated_at']) && strlen($filter['updated_at']) > 1) {\n\t\t\t$query = $query->where('updated_at', 'like', $filter['updated_at'] . '%');\n\t\t}\n return $query;\n }",
"public function getCaracteristicasPlan( $where , $params ){\r\t\t\r\t\t$db = JFactory::getDbo();\r\t\r\t\tif( !is_array( $where ) )\r\t\t\t$where = array();\r\t\t\r\t\t$db = JFactory::getDbo();\r\t\t$query = $db->getQuery(true);\r\t\t\r\t\t$query->select( '*' );\r\t\t$query->from( self::TABLE.' AS a' );\r\t\t$query->innerJoin( '#__caracteristicas_planes AS b ON a.id_plan = b.id_plan' );\r\t\t$query->innerJoin( '#__caracteristicas AS c ON b.id_caracteristica = c.id_caracteristica' );\r\t\t\r\t\t$query->where( 'a.id_plan = '.$this->id_plan , 'AND');\r\t\t\r\t\tforeach( $where as $key=>$obj ){\r\t\t\t\r\t\t\tif( !is_object($obj) )\r\t\t\t\tcontinue;\r\t\t\t\r\t\t\t$consulta = $obj->key . $obj->condition . $obj->value . $obj->glue;\r\t\t\t$query->where( $consulta );\r\t\t\t\r\t\t}\r\t\t\r\t\t// Order ASC default\r\t\tif( isset( $params[ 'order' ] ) )\r\t\t\t$query->order( $params[ 'order' ] );\r\t\t\t\r\t\t// Group By\r\t\tif( isset( $params[ 'group' ] ) )\t\r\t\t\t$query->group( $params[ 'group' ] );\r\t\t\r\t\t$db->setQuery( $query );\r\t\t\r\t\t// loadObject Or loadObjectList\r\t\tif( !isset($params[ 'load' ]) )\r\t\t\t$params[ 'load' ] = 'loadObject';\r\t\t\r\t\treturn $db->$params[ 'load' ]();\r\t}",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function checkFilterParametersForTariff($tariff, $filterParameters){\n\n // network check\n if($filterParameters['networkID'] !=0){ // 0 means all networks. No filter.\n if( $tariff->network_id != $filterParameters['networkID']){\n return 0;\n }\n }\n\n // maxBasePrice check\n if( !($tariff->base_price <= $filterParameters['maxBasePrice'])){\n return 0;\n }\n\n/**\n // max-Bandbreite check\n // find the value of the property (max-Bandbreite) in pivot table for the tariff.\n $minBandWidthObject = DB::table('property_tariff')\n ->where('tariff_id', $tariff->id)\n ->where('property_id', '=', Property\n ::where('name', 'max-Bandbreite')\n ->first()\n ->id)\n ->first();\n\n if($minBandWidthObject){\n if( !($minBandWidthObject->amount_of_value >= $filterParameters['minBandWidth'])){\n return 0;\n }\n }\n else\n //return 0;\n\n // Datenvolumen check\n // find the value of the property (Datenvolumen) in pivot table for the tariff.\n $minDataVolumeObject = DB::table('property_tariff')\n ->where('tariff_id',$tariff->id)\n ->where('property_id', '=', Property\n ::where('name', 'Datenvolumen')\n ->first()\n ->id)\n ->first();\n\n if($minDataVolumeObject){\n if( !($minDataVolumeObject->amount_of_value >= $filterParameters['minDataVolume'])){\n return 0;\n }\n }\n else\n //return 0;\n\n */\n // allNetFlatTelephony check\n if($filterParameters['allNetFlatTelephony'] != \"false\"){ // \"false\" means, \"no filter\" for \"allNetFlatTelephony\" parameter...\n // find the value of the property (allNetFlatTelephony) in pivot table for the tariff.\n $allNetFlatTelephonyObject = DB::table('property_tariff')\n ->where('tariff_id',$tariff->id)\n ->where('property_id', '=', Property\n ::where('name', 'Telefonie')\n ->first()\n ->id)\n ->first();\n\n\n if($allNetFlatTelephonyObject){\n if($allNetFlatTelephonyObject->amount_of_value != 1){\n return 0;\n }\n }\n else{\n return 0;\n }\n }\n\n\n // allNetFlatInternet check\n if($filterParameters['allNetFlatInternet'] != \"false\"){ // \"false\" means, \"no filter\" for \"allNetFlatInternet\" parameter...\n // find the value of the property (allNetFlatInternet) in pivot table for the tariff.\n $allNetFlatInternetObject = DB::table('property_tariff')\n ->where('tariff_id',$tariff->id)\n ->where('property_id', '=', Property\n ::where('name', 'Internet')\n ->first()\n ->id)\n ->first();\n\n if($allNetFlatInternetObject){\n if($allNetFlatInternetObject->amount_of_value != 1){\n return 0;\n }\n }\n else\n return 0;\n }\n\n // allNetFlatSMS check\n if($filterParameters['allNetFlatSMS'] != \"false\"){ // \"false\" means, \"no filter\" for \"allNetFlatSMS\" parameter...\n // find the value of the property (allNetFlatSMS) in pivot table for the tariff.\n $allNetFlatSMSObject = DB::table('property_tariff')\n ->where('tariff_id',$tariff->id)\n ->where('property_id', '=', Property\n ::where('name', 'SMS')\n ->first()\n ->id)\n ->first();\n\n if($allNetFlatSMSObject){\n if($allNetFlatSMSObject->amount_of_value != 1){\n return 0;\n }\n }\n else\n return 0;\n }\n\n\n // if all property of the tariff meet all filter parameters, then return 1. Otherwise function sends return 0 in above codes...\n return 1;\n\n }",
"public function getApproved(Filter $filter): Collection;",
"public function get_plans()\n {\n //\n\n \n $user_id = Auth::user()->id;\n\n $listing_code = Session::get('listing_code');\n\n\n $listing = Listing::where('listing_code', $listing_code)->where('agent_id', $user_id)->first();\n\n try {\n //code...\n\n $floor_plans = ListingFloorPLan::where('listing_id', $listing->id)->latest()->get();\n\n } catch (\\Throwable $th) {\n //throw $th;\n\n return $th;\n }\n\n \n\n\n\n return $floor_plans;\n }",
"public function testDeletePackingPlan()\n {\n }",
"public function getPlans()\n {\n try{\n \n $aPlans = $this->request('plans', 'GET');\n if( $aPlans->status ){\n throw new Exception( $aPlans->status.'-'.$aPlans->details[0]->message );\n }else{\n return $aPlans;\n }\n }catch(Exception $e){\n $this->exception($e);\n }\n }",
"function listarPlanArb()\n {\n $node = $this->objParam->getParametro('node');\n\n //$clasificacion = $this->objParam->getParametro('clasificacion');\n $id_plan = $this->objParam->getParametro('id_plan');\n //\n $tipo_nodo = $this->objParam->getParametro('tipo_nodo');\n\n\n if ($node == 'id') {\n $this->objParam->addParametro('id_padre', '%');\n } else {\n $this->objParam->addParametro('id_padre', $id_plan);\n }\n\n\n //$this->objParam->addParametro('clasificacion', $clasificacion);\n\n //creamos el modelo\n $this->objFunc = $this->create('MODPlan');\n $this->res = $this->objFunc->listarPlanArb();\n\n $this->res->setTipoRespuestaArbol();\n\n $arreglo = array();\n\n //$arreglo_valores=array();\n\n //para cambiar un valor por otro en una variable\n // array_push($arreglo_valores,array('variable'=>'checked','val_ant'=>'true','val_nue'=>true));\n // array_push($arreglo_valores,array('variable'=>'checked','val_ant'=>'false','val_nue'=>false));\n // $this->res->setValores($arreglo_valores);\n\n\n array_push($arreglo, array('nombre' => 'id', 'valor' => 'id_plan'));\n array_push($arreglo, array('nombre' => 'id_p', 'valor' => 'id_plan_padre'));\n\n array_push($arreglo, array('nombre' => 'text', 'valores' => '#nombre_plan# <font color=\"blue\">PESO:#peso#%</font> #porcentaje_acum# #porcentaje_rest#'));\n array_push($arreglo, array('nombre' => 'cls', 'valor' => 'peso'));\n array_push($arreglo, array('nombre' => 'qtip', 'valores' => '<b>ID PLAN:</b> #id_plan# <br><b>NOMBRE:</b> #nombre_plan#<br/><b>PESO:</b> #peso# %'));\n\n /*Estas funciones definen reglas para los nodos en funcion a los tipo de nodos que contenga cada uno*/\n $this->res->addNivelArbol('tipo_nodo', 'raiz', array('leaf' => false, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'cls' => 'folder', 'tipo_nodo' => 'raiz', 'icon' => '../../../lib/imagenes/orga32x32.png'), $arreglo);\n\n $this->res->addNivelArbol('tipo_nodo', 'hijo', array('leaf' => false, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'tipo_nodo' => 'hijo', 'icon' => '../../../lib/imagenes/alma32x32.png'), $arreglo);\n\n $this->res->addNivelArbol('tipo_nodo', 'hoja', array('leaf' => true, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'tipo_nodo' => 'hoja', 'icon' => '../../../lib/imagenes/a_form.png'), $arreglo);\n \n\n //Se imprime el arbol en formato JSON\n //var_dump($this->res->generarJson());exit;\n $this->res->imprimirRespuesta($this->res->generarJson());\n }",
"public function test_getLowStockByFilter() {\n\n }",
"function tariffplan_old() {\n $this->layout = 'public-package';\n $this->loadModel('Package');\n $this->loadModel('Psetting');\n if ($this->request->is('post')) {\n\n// http://production.shippingapis.com/ShippingAPI.dll?API= CityStateLookup&XML=<CityStateLookupRequest USERID=\"138TOTAL1122\"><ZipCode ID=\"0\">\n//<Zip5>90210</Zip5>\n//</ZipCode></CityStateLookupRequest>\n //90210\n\n $params = '<CityStateLookupRequest USERID=\"138TOTAL1122\"><ZipCode ID=\"0\"><Zip5>' . $this->request->data['Usps']['zipcode'] . '</Zip5></ZipCode></CityStateLookupRequest>';\n $HttpSocket = new HttpSocket();\n $results = $HttpSocket->post('http://production.shippingapis.com/ShippingAPI.dll', array('API' => 'CityStateLookup',\n 'XML' => $params\n )\n );\n $xml = new SimpleXMLElement($results);\n $state = (string) $xml->ZipCode->State;\n $this->loadModel('TariffCountry');\n\n\n $countries = $this->TariffCountry->find('list');\n if (in_array($state, $countries)) {\n $sql = \"SELECT psettings.* FROM packages\n LEFT JOIN psettings ON packages.id=psettings.package_id \n WHERE packages.name = 'Full package'\n \";\n $packageName = 'Full package';\n $packages = $this->Package->query($sql);\n // $packages = $this->Package->find('all');\n } else {\n $sql = \"SELECT psettings.*,packages.name FROM packages\n LEFT JOIN psettings ON packages.id=psettings.package_id \n WHERE packages.name = 'NABC special package'\n \";\n $packages = $this->Package->query($sql);\n $packageName = 'NABC special package';\n }\n $this->set(compact('packages', 'packageName'));\n } else {\n $sql = \"SELECT psettings.*,packages.name FROM packages\n LEFT JOIN psettings ON packages.id=psettings.package_id \n WHERE packages.name = 'NABC special package'\n \";\n $packages = $this->Package->query($sql);\n $packageName = 'NABC special package';\n $this->set(compact('packages', 'packageName'));\n }\n }",
"public function testFilterOptimizer(): void\n {\n $optimizer = new FilterOptimizer();\n $collection = LaRepo::newFiltersCollection();\n $nestedIdleCollection = LaRepo::newFiltersCollection();\n\n $filter1 = LaRepo::newFilter(\n 'attr1',\n FilterOperator::IS_LIKE,\n 'val1',\n BooleanOperator::OR\n );\n\n $filter2 = LaRepo::newFilter(\n 'attr2',\n FilterOperator::IS_LIKE,\n 'val2',\n BooleanOperator::AND\n );\n\n $filter3Sub = LaRepo::newFilter(\n 'attr3',\n FilterOperator::EQUALS_TO,\n 'testing',\n BooleanOperator::OR\n );\n\n $filter3 = LaRepo::newFilter(\n 'rel1',\n FilterOperator::EXISTS,\n LaRepo::newFiltersCollection(BooleanOperator::OR, $filter3Sub),\n BooleanOperator::AND\n );\n\n $nestedIdleCollection->setItems($filter1, $filter2, $filter3);\n $collection->setItems($nestedIdleCollection);\n\n $optimizer->optimize($collection);\n\n $this->assertCount(3, $collection);\n $this->assertEquals($filter1, $collection[0]);\n $this->assertEquals($filter2, $collection[1]);\n $this->assertEquals($filter3Sub, $collection[2]);\n $this->assertEquals('rel1.attr3', $collection[2]->getAttr()->getName());\n $this->assertEquals(BooleanOperator::AND, $collection[2]->getBoolean());\n }",
"public function testFilter()\n {\n // so here we just verify that the params are passed correctly internally\n $timeslice_repository = $this->getMockBuilder(TimesliceRepository::class)\n ->disableOriginalConstructor()\n ->setMethods(['scopeByDate', 'scopeWithTags', 'scopeWithoutTags',\n 'scopeByLatest', 'scopeByField', 'scopeByActivityData'])->getMock();\n\n // with date\n $timeslice_repository->expects($this->once())->method('scopeByDate')\n ->with($this->equalTo('dadum'));\n $timeslice_repository->filter(['date' => 'dadum']);\n\n // with customer / project / service\n $value_map = [\n ['customer' => 'dadum'], ['project' => 'dadum'], ['service' => 'dadum'] ];\n $timeslice_repository->expects($this->exactly(3))->method('scopeByActivityData')\n ->will($this->returnValueMap($value_map));\n $timeslice_repository->filter(['customer' => 'dadum']);\n $timeslice_repository->filter(['project' => 'dadum']);\n $timeslice_repository->filter(['service' => 'dadum']);\n\n // with tags\n $timeslice_repository->expects($this->once())->method('scopeWithTags')\n ->with($this->equalTo('dadum'));\n $timeslice_repository->filter(['withTags' => 'dadum']);\n\n // without tags\n $timeslice_repository->expects($this->once())->method('scopeWithoutTags')\n ->with($this->equalTo('dadum'));\n $timeslice_repository->filter(['withoutTags' => 'dadum']);\n\n // with latest\n $timeslice_repository->expects($this->once())->method('scopeByLatest');\n $timeslice_repository->filter(['latest' => null]);\n\n // default\n $timeslice_repository->expects($this->once())->method('scopeByField')\n ->with(\n $this->equalTo('value'),\n $this->equalTo(7200)\n );\n $timeslice_repository->filter(['value' => 7200]);\n }",
"public function get_plans() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n // extract passed parameters from jtable\n $query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);\n parse_str($query, $params);\n \n\n // count all records query\n $q = \"SELECT COUNT(*) as count\n FROM plans AS p inner join\n users as u on p.modified_by=u.user_id\n inner JOIN contacts AS c ON u.user_id=c.user_id\n and c.modified_date = (select max(modified_date) from\n contacts as c where c.user_id=p.modified_by)\n \";\n // run query\n $count = DB::instance(DB_NAME)->select_row($q);\n $order = isset($params['jtSorting']) ? $params['jtSorting'] : 'plan_id DESC';\n \n # Set up query\n $q = \"SELECT\n p.plan_id, p.description,p.time,p.public, c.first_name, c.last_name, p.modified_date, p.show\n FROM plans AS p inner join\n users as u on p.modified_by=u.user_id\n inner JOIN contacts AS c ON u.user_id=c.user_id\n and c.modified_date = (select max(modified_date) from\n contacts as c where c.user_id=p.modified_by)\n ORDER BY {$order} \n LIMIT {$params['jtStartIndex']}, {$params['jtPageSize']}\n \";\n \n # Run query\n $plans = DB::instance(DB_NAME)->select_rows($q);\n $items = array();\n $i = 0;\n foreach($plans as $plan) {\n $items[] = array(\n \"plan_id\" => $plan[\"plan_id\"],\n \"modified_date\" => Time::display($plan['modified_date'],'Y-m-d H:m:s'),\n \"first_name\" => $plan[\"first_name\"],\n \"last_name\" => $plan[\"last_name\"],\n \"public\" => $plan[\"public\"],\n \"show\" => $plan[\"show\"],\n \"description\" => $plan[\"description\"],\n \"time\" => $plan[\"time\"]\n );\n }\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n $jTableResult['TotalRecordCount'] = $count['count'];\n $jTableResult['Records'] = $items;\n print json_encode($jTableResult);\n }",
"public function testGetVendorComplianceSurveyByFilter()\n {\n }",
"public function product_is_in_plans( $product_id ) {\n $product = wc_get_product( $product_id );\n if ( !$product )\n return array();\n\n $plan_ids = array();\n\n $restrict_access_plan = get_post_meta( $product_id, '_yith_wcmbs_restrict_access_plan', true );\n if ( !empty( $restrict_access_plan ) ) {\n $plan_ids = $restrict_access_plan;\n }\n\n $prod_cats_plans_array = array();\n $prod_tags_plans_array = array();\n $plans_info = YITH_WCMBS_Manager()->get_plans_info_array();;\n extract( $plans_info );\n\n // FILTER PRODUCT CATS AND TAGS IN PLANS\n if ( !empty( $prod_cats_plans_array ) ) {\n //$this_product_cats = wp_get_post_terms( $product_id, 'product_cat', array( 'fields' => 'ids' ) );\n $this_product_cats = yith_wcmbs_get_post_term_ids( $product_id, 'product_cat', array(), true );\n foreach ( $prod_cats_plans_array as $cat_id => $c_plan_ids ) {\n if ( !empty( $c_plan_ids ) && in_array( $cat_id, (array) $this_product_cats ) ) {\n $plan_ids = array_merge( $plan_ids, $c_plan_ids );\n }\n }\n }\n if ( !empty( $prod_tags_plans_array ) ) {\n $this_product_tags = wp_get_post_terms( $product_id, 'product_tag', array( 'fields' => 'ids' ) );\n foreach ( $prod_tags_plans_array as $tag_id => $t_plan_ids ) {\n if ( !empty( $t_plan_ids ) && in_array( $tag_id, (array) $this_product_tags ) ) {\n $plan_ids = array_merge( $plan_ids, $t_plan_ids );\n }\n }\n }\n\n foreach ( $plan_ids as $key => $plan_id ) {\n $allowed = YITH_WCMBS_Manager()->exclude_hidden_items( array( $product_id ), $plan_id );\n $is_hidden_in_plan = empty( $allowed );\n if ( $is_hidden_in_plan )\n unset( $plan_ids[ $key ] );\n }\n\n return array_unique( $plan_ids );\n }",
"public function runPlanningAction(Request $request) {\n set_time_limit(0);\n\n $resource = $this->findOr404($request);\n $productPlanningsNet = $resource->getProductPlanningsNet(); //Presupuesto de produccion neto\n $productPlanningsGross = $resource->getProductPlanningsGross(); //Presupuesto de bruta\n//Construir o completar presupuesto neta en base a bruta\n foreach ($productPlanningsGross as $productPlanningGross) {\n if (!isset($productPlanningsNet[$productPlanningGross->getMonth()])) {\n $cloneNet = clone $productPlanningGross;\n $cloneNet->setType(\\Pequiven\\SEIPBundle\\Entity\\DataLoad\\Production\\ProductPlanning::TYPE_NET);\n $productPlanningsNet[$productPlanningGross->getMonth()] = $cloneNet;\n\n//Porcentaje de la produccion bruta que va para la neta\n $netProductionPercentage = $productPlanningGross->getNetProductionPercentage();\n $dailyProductionCapacity = $cloneNet->getDailyProductionCapacity();\n//Calcular produccion neta en base al porcentaje de la bruta\n $total = ($dailyProductionCapacity * $netProductionPercentage) / 100;\n $cloneNet->setDailyProductionCapacity($total);\n\n foreach ($cloneNet->getRanges() as $range) {\n if ($range->getType() == \\Pequiven\\SEIPBundle\\Model\\DataLoad\\Production\\Range::TYPE_FIXED_VALUE) {\n $range->setValue($total);\n } elseif ($range->getType() == \\Pequiven\\SEIPBundle\\Model\\DataLoad\\Production\\Range::TYPE_CAPACITY_FACTOR) {\n $range->setValue($netProductionPercentage);\n }\n }\n $resource->addProductPlanning($cloneNet);\n if ($netProductionPercentage == 0) {\n $cloneNet->setTotalMonth(0);\n }\n } else {\n\n//Porcentaje de la produccion bruta que va para la neta\n $netProductionPercentage = $productPlanningGross->getNetProductionPercentage();\n $dailyProductionCapacity = $productPlanningGross->getDailyProductionCapacity();\n//Calcular produccion neta en base al porcentaje de la bruta\n $total = ($dailyProductionCapacity * $netProductionPercentage) / 100;\n $productPlanningsNet[$productPlanningGross->getMonth()]->setDailyProductionCapacity($total);\n $presupuestoTotalBrutaMes = $productPlanningGross->getTotalMonth();\n $totalPresupuestoNetaMes = ($presupuestoTotalBrutaMes * $netProductionPercentage) / 100;\n $productPlanningsNet[$productPlanningGross->getMonth()]->setTotalMonth($totalPresupuestoNetaMes);\n\n if (count($productPlanningsNet[$productPlanningGross->getMonth()]->getRanges()) > 0) {\n foreach ($productPlanningsNet[$productPlanningGross->getMonth()]->getRanges() as $range) {\n if ($range->getType() == \\Pequiven\\SEIPBundle\\Model\\DataLoad\\Production\\Range::TYPE_FIXED_VALUE) {\n $total = ($range->getValue() * $netProductionPercentage) / 100;\n $range->setValue($total);\n } elseif ($range->getType() == \\Pequiven\\SEIPBundle\\Model\\DataLoad\\Production\\Range::TYPE_CAPACITY_FACTOR) {\n $range->setValue($netProductionPercentage);\n }\n }\n } else {\n foreach ($productPlanningGross->getRanges() as $range) {\n $cloneRange = clone $range;\n if ($cloneRange->getType() == \\Pequiven\\SEIPBundle\\Model\\DataLoad\\Production\\Range::TYPE_FIXED_VALUE) {\n $total = ($range->getValue() * $netProductionPercentage) / 100;\n $cloneRange->setValue($total);\n } elseif ($cloneRange->getType() == \\Pequiven\\SEIPBundle\\Model\\DataLoad\\Production\\Range::TYPE_CAPACITY_FACTOR) {\n $cloneRange->setValue($netProductionPercentage);\n }\n $productPlanningsNet[$productPlanningGross->getMonth()]->addRange($cloneRange);\n }\n }\n\n if ($netProductionPercentage == 0) {\n $productPlanningsNet[$productPlanningGross->getMonth()]->setTotalMonth(0);\n }\n $this->save($productPlanningsNet[$productPlanningGross->getMonth()], true);\n }\n }\n $this->save($resource);\n \n\n//Planificacion de productos\n $productPlannings = $resource->getProductPlannings();\n//Planificacion de Paradas por mes\n $plantStopPlanningsByMonths = $resource->getPlantReport()->getPlantStopPlanningSortByMonth();\n//Planificacion de Consumo de materia prima por productos\n $rawMaterialConsumptionPlannings = $resource->getRawMaterialConsumptionPlannings();\n\n $propertyAccessor = \\Symfony\\Component\\PropertyAccess\\PropertyAccess::createPropertyAccessor();\n $countProduct = 0;\n $productDetailDailyMonthsCache = $resource->getProductDetailDailyMonthsSortByMonth();\n//Iteramos la planificacion de la produccion\n foreach ($productPlannings as $productPlanning) {\n $daysStopsArray = array();\n//Buscamos el mes\n $month = $productPlanning->getMonth();\n//Buscamos los dias de paradas del mes\n if (isset($plantStopPlanningsByMonths[$month])) {\n $plantStopPlanning = $plantStopPlanningsByMonths[$month];\n $daysStops = $plantStopPlanning->getDayStopsByDay();\n//Dias de paradas del mes\n foreach ($daysStops as $daysStop) {\n $daysStopsArray[] = $daysStop->getNroDay();\n }\n }\n//Ragos de planificacion\n $ranges = $productPlanning->getRanges();\n\n if (!isset($productDetailDailyMonthsCache[$productPlanning->getMonth()])) {\n $productDetailDailyMonth = new \\Pequiven\\SEIPBundle\\Entity\\DataLoad\\Production\\ProductDetailDailyMonth();\n $productDetailDailyMonth->setMonth($productPlanning->getMonth());\n $productDetailDailyMonth->setProductReport($resource);\n $productDetailDailyMonthsCache[$productPlanning->getMonth()] = $productDetailDailyMonth;\n } else {\n $productDetailDailyMonth = $productDetailDailyMonthsCache[$productPlanning->getMonth()];\n }\n\n $typeProductPlanning = $productPlanning->getType();\n $prefix = \"\";\n if ($typeProductPlanning === \\Pequiven\\SEIPBundle\\Model\\DataLoad\\Production\\ProductPlanning::TYPE_GROSS) {\n $prefix = \"Gross\";\n } else if ($typeProductPlanning === \\Pequiven\\SEIPBundle\\Model\\DataLoad\\Production\\ProductPlanning::TYPE_NET) {\n $prefix = \"Net\";\n }\n\n foreach ($ranges as $range) {\n $dateFrom = $range->getDateFrom();\n $dateEnd = $range->getDateEnd();\n\n $dayFrom = $dateFrom->format(\"d\");\n $dayEnd = $dateEnd->format(\"d\");\n $type = $range->getType();\n $originalValue = $range->getValue();\n $value = 0;\n\n if ($type === \\Pequiven\\SEIPBundle\\Model\\DataLoad\\Production\\Range::TYPE_FIXED_VALUE) {\n $value = $originalValue;\n } else if ($type === \\Pequiven\\SEIPBundle\\Model\\DataLoad\\Production\\Range::TYPE_CAPACITY_FACTOR) {\n $productPlanning = $range->getProductPlanning();\n $value = ($productPlanning->getDailyProductionCapacity() / 100) * $originalValue;\n }\n\n for ($day = $dayFrom; $day <= $dayEnd; $day++) {\n $dayInt = (int) $day;\n $propertyDayPlanProduction = sprintf(\"day%s%sPlan\", $dayInt, $prefix);\n $propertyDayPlan = sprintf(\"day%sPlan\", $dayInt);\n $dayInStop = false; //Es dia de parada\n if (in_array($dayInt, $daysStopsArray)) {\n $dayInStop = true;\n }\n\n//Solo si es bruta se calcula la meteria prima\n if ($typeProductPlanning === \\Pequiven\\SEIPBundle\\Model\\DataLoad\\Production\\ProductPlanning::TYPE_GROSS) {\n//Recorremos las meterias primas para calcular el valor por el alicuota\n foreach ($rawMaterialConsumptionPlannings as $rawMaterialConsumptionPlanning) {\n//Detalle de consumo de materia prima por mes\n $detailRawMaterialConsumptions = $rawMaterialConsumptionPlanning->getDetailByMonth();\n if (!isset($detailRawMaterialConsumptions[$month])) {\n//Si no esta el mes de consumo declarado lo creamos\n $detailRawMaterialConsumption = new \\Pequiven\\SEIPBundle\\Entity\\DataLoad\\RawMaterial\\DetailRawMaterialConsumption();\n $detailRawMaterialConsumption\n ->setMonth($month)\n ;\n $rawMaterialConsumptionPlanning->addDetailRawMaterialConsumption($detailRawMaterialConsumption);\n } else {\n//Tomamos el mes que ya existe para actualizar los valores del plan\n $detailRawMaterialConsumption = $detailRawMaterialConsumptions[$month];\n }\n if ($dayInStop === true) {\n $propertyAccessor->setValue($detailRawMaterialConsumption, $propertyDayPlan, 0);\n } else {\n if ($rawMaterialConsumptionPlanning->isAutomaticCalculationPlan() === true) {\n//Calcular el consumo de materia prima del dia en base la alicuota\n $aliquot = $rawMaterialConsumptionPlanning->getAliquot();\n $totalByAliquot = $value * $aliquot;\n $propertyAccessor->setValue($detailRawMaterialConsumption, $propertyDayPlan, $totalByAliquot);\n }\n }\n $this->save($rawMaterialConsumptionPlanning);\n }\n }//Fin de calculo de materia prima\n\n if ($dayInStop === true) {\n $propertyAccessor->setValue($productDetailDailyMonth, $propertyDayPlanProduction, 0);\n continue;\n }\n//Sete o actualiza el valor\n $propertyAccessor->setValue($productDetailDailyMonth, $propertyDayPlanProduction, $value);\n }\n }\n $this->save($productDetailDailyMonth, false);\n $countProduct++;\n }\n if ($countProduct > 0) {\n foreach ($productDetailDailyMonthsCache as $productDetailDailyMonth) {\n $this->save($productDetailDailyMonth, false);\n }\n $this->flush();\n }\n foreach ($rawMaterialConsumptionPlannings as $rawMaterialConsumptionPlanning) {\n $rawMaterialConsumptionPlanning->calculate();\n $this->save($rawMaterialConsumptionPlanning);\n }\n $months = \\Pequiven\\SEIPBundle\\Service\\ToolService::getMonthsLabels();\n//Completar los inventarios\n $inventorys = $resource->getInventorySortByMonth();\n $unrealizedProductions = $resource->getUnrealizedProductionsSortByMonth();\n foreach ($months as $month => $label) {\n//Si el inventario no esta lo agrega\n if (!isset($inventorys[$month])) {\n $inventory = new \\Pequiven\\SEIPBundle\\Entity\\DataLoad\\Inventory\\Inventory();\n $inventory->setMonth($month);\n $resource->addInventory($inventory);\n\n $this->save($inventory, false);\n }\n//Si la pnr no esta lo agrega\n if (!isset($unrealizedProductions[$month])) {\n $unrealizedProduction = new \\Pequiven\\SEIPBundle\\Entity\\DataLoad\\Production\\UnrealizedProduction();\n $unrealizedProduction->setMonth($month);\n\n $resource->addUnrealizedProduction($unrealizedProduction);\n $this->save($unrealizedProduction, false);\n }\n }\n\n $this->flush();\n\n return $this->redirectHandler->redirectTo($resource);\n }",
"public function get_plans($fields = null, $where = array(), $offset = null, $limit = null) {\n\n\t\t/*if($fields){\n\t\t\t$this->db->select($fields);\n\t\t}*/\n $concat_result = \"CONCAT('{', GROUP_CONCAT( CONCAT( CONCAT('\\\"', cs.setting_id, '\\\"'), ':{\\\"', cs.setting_name, '\\\":\\\"', cpm.feature_value, '\\\",', '\\\"setting_id\\\":\\\"',cs.setting_id, '\\\"}') ), '}') AS plan_features \";\n $this->db->select('cb_plans.*, '. $concat_result);\n $this->db->join('cb_plan_meta AS cpm', 'cpm.plan_id = cb_plans.plan_id', 'left');\n $this->db->join('cb_setting AS cs', \"cs.setting_id = cpm.feature_type AND cs.setting_status\", 'left');\n\n $this->db->order_by(\"cb_plans.plan_id\", \"ASC\");\n $this->db->group_by(\"cb_plans.plan_id\");\n\t\treturn $this->db->get_where($this->table, $where, $limit, $offset)->result();\n // echo $this->db->last_query();\n }",
"public function filterPlayerByTeamAction() {\r\r $this->_helper->layout()->disableLayout();\r $this->_helper->viewRenderer->setNoRender(true);\r\r if ($this->getRequest()->isPost()) {\r $method = $this->getRequest()->getParam('method');\r\r //echo \"Method: \".$method;die();\r switch ($method) {\r case 'teamfilter':\r $teamfilter = $this->getRequest()->getPost('team');\r $searchValue = $this->getRequest()->getPost('searchValue');\r $playerListArray = $this->getRequest()->getPost('playerList');\r $searchKey = $this->getRequest()->getPost('searchKey');\r\r // with team filter\r $filterPlayerList = $this->filterArray($searchValue, $playerListArray, $searchKey, $teamfilter);\r // echo \"<pre>\"; print_r( $filterPlayerList); echo \"</pre>\"; die;\r if ($filterPlayerList) {\r echo json_encode($filterPlayerList);\r }\r\r break;\r\r case 'playerfilter':\r\t\t\t\t\t\r $searchValue = $this->getRequest()->getPost('searchValue');\r $filterValue = $this->getRequest()->getPost('filterValue');\r $playerListArray = $this->view->session->playerListArray;\r\t\t\t\t\t//echo print_r($this->getRequest()->getPost()); die;\r\t\t\t\t //added code by alok on 21/07/2017 used for search player with listing and search carry in another tab\r\t\t\t\t if(isset($filterValue) && !empty($filterValue) && $filterValue != null && $searchValue != 'ALL'){\r\t\t\t\t $objGamePlayers = Application_Model_GamePlayers::getInstance();\r\t\t\t\t $playerListArray = $objGamePlayers->getPlayersByGameTeamWithSearch($this->getRequest()->getPost('sportId'), $filterValue);\r\t\t\t\t }\r\t\t\t\t \r $searchKey = $this->getRequest()->getPost('searchKey');\r $teamfilter = $this->getRequest()->getPost('selectedTeam');\r $sportId = $this->getRequest()->getPost('sportId');\r if (($searchValue == \"FLEX\" && $sportId == 1 ) || ($searchValue == \"F\" && $sportId == 3 ) || ($searchValue == \"G\" && $sportId == 3 ) || $searchValue == \"UTIL\") {\r if ($teamfilter[0] != \"All Games\") { \r\t\t\t\t\t \r //$playerListArray = $this->specialPlayer($sportId, $searchValue, $searchKey, $teamfilter);\r $playerListArray = $this->specialPlayer($sportId, $searchValue, $searchKey, $teamfilter,$filterValue);\r\t\t\t\t\t\t\t\r } else {\r\t\t\t\t\t\t //$playerListArray = $this->specialPlayer($sportId, $searchValue, $searchKey);\r $playerListArray = $this->specialPlayer($sportId, $searchValue, $searchKey,$filterValue);\r }\r $value = array();\r foreach ($playerListArray as $key => $row) {\r $value[$key] = $row['plr_value'];\r }\r array_multisort($value, SORT_DESC, $playerListArray);\r\t\t\t\t\t\t\r echo json_encode($playerListArray);\r } else {\r\r if ($searchValue == \"ALL\" && empty($teamfilter)) {\r $value = array();\r\t\t\t\t\t\t\t$nfl_pos = array('QB','RB','WR','K','DST','TE');\r\t\t\t\t\t\t\t$mlb_pos = array('1B','2B','3B','C','SS','SP');\r\t\t\t\t\t\t\t$nba_pos = array('PG','SG','SF','PF','C');\r\t\t\t\t\t\t\t$nhl_pos = array('C','RW','LW','D','G','W');\r\t\t\t\t\t\t\t$newPlayerArray = array();\r foreach ($playerListArray as $key => $row) {\r\t\t\t\t\t\t\t\tif($sportId==1){\r\t\t\t\t\t\t\t\t\tif(in_array($row['pos_code'],$nfl_pos)){\r\t\t\t\t\t\t\t\t\t\t$newPlayerArray[] = $row;\r\t\t\t\t\t\t\t\t\t\t$value[$key] = $row['plr_value'];\r\t\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\t}elseif($sportId==2){\r\t\t\t\t\t\t\t\t\tif(in_array($row['pos_code'],$mlb_pos)){\r\t\t\t\t\t\t\t\t\t\t$newPlayerArray[] = $row;\r\t\t\t\t\t\t\t\t\t\t$value[$key] = $row['plr_value'];\r\t\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\t}elseif($sportId==3){\r\t\t\t\t\t\t\t\t\tif(in_array($row['pos_code'],$nba_pos)){\r\t\t\t\t\t\t\t\t\t\t$newPlayerArray[] = $row;\r\t\t\t\t\t\t\t\t\t\t$value[$key] = $row['plr_value'];\r\t\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\t}elseif($sportId==4){\r\t\t\t\t\t\t\t\t\tif(in_array($row['pos_code'],$nhl_pos)){\r\t\t\t\t\t\t\t\t\t\t$newPlayerArray[] = $row;\r\t\t\t\t\t\t\t\t\t\t$value[$key] = $row['plr_value'];\r\t\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\t}else{\r\t\t\t\t\t\t\t\t\t$newPlayerArray = $playerListArray;\r\t\t\t\t\t\t\t\t} \r }\r\t\t\t\t\t\t\t\r array_multisort($value, SORT_DESC, $newPlayerArray);\r\t\t\t\t\t\t\t\r echo json_encode($newPlayerArray);\r } else {\r if ($teamfilter[0] != \"All Games\") { \r\t\t\t\t\t\t\t \r $filterPlayerList = $this->filterArray($searchValue, $playerListArray, $searchKey, $teamfilter);\r\t\t\t\t\t\t\t\t\r } else {\r $filterPlayerList = $this->filterArray($searchValue, $playerListArray, $searchKey);\r }\r\r $value = array();\r foreach ($filterPlayerList as $key => $row) {\r $value[$key] = $row['plr_value'];\r }\r array_multisort($value, SORT_DESC, $filterPlayerList);\r if ($filterPlayerList) {\r echo json_encode($filterPlayerList);\r }\r }\r }\r\r break;\r\r case 'playerByTeam':\r\r $searchPos = $this->getRequest()->getPost('searchPos');\r $searchTeam = $this->getRequest()->getPost('searchTeam');\r $playerListArray = $this->view->session->playerListArray;\r $searchKey = $this->getRequest()->getPost('searchKey');\r\r $sportId = $this->getRequest()->getPost('sportId');\r if (($searchPos == \"FLEX\" && $sportId == 1 ) || ($searchPos == \"F\" && $sportId == 3 ) || ($searchPos == \"G\" && $sportId == 3 ) || $searchPos == \"UTIL\") {\r if ($searchTeam[0] != \"All Games\") {\r $playerListArray = $this->specialPlayer($sportId, $searchPos, $searchKey, $searchTeam);\r } else {\r $playerListArray = $this->specialPlayer($sportId, $searchPos, $searchKey);\r }\r\r echo json_encode($playerListArray);\r } else {\r\r if ($searchPos == \"ALL\") {\r echo json_encode($playerListArray);\r } else {\r\r if ($searchTeam[0] != \"All Games\") {\r $filterPlayerList = $this->filterTeamArray($searchPos, $playerListArray, $searchKey, $searchTeam);\r } else {\r $filterPlayerList = $this->filterTeamArray($searchPos, $playerListArray, $searchKey);\r }\r\r if ($filterPlayerList) {\r echo json_encode($filterPlayerList);\r }\r }\r }\r break;\r default:\r break;\r }\r }\r }",
"public function testAddPackingPlanFileByURL()\n {\n }",
"public function testFilterBedrooms()\n {\n $this->visit('/properties')\n ->select('#bedrooms', 1)\n ->press('Update results')\n ->see('Shack in the desert');\n $this->notSee('Five bedroom mill conversion');\n $this->notSee('Victorian townhouse');\n }",
"public function testFilterByTitle()\n {\n $response = $this->runApp('GET', '/v1/products?q=.net&password=' . $this->apiPassword);\n\n $this->assertEquals(StatusCode::HTTP_OK, $response->getStatusCode());\n $result = (array)json_decode($response->getBody())->result;\n $this->assertEquals(count($result), 7);\n }",
"public function plansSearch() {\n return view('admin.billing.plans');\n }",
"public function show(Plan $plan)\n {\n //\n }",
"function getListFilter($col,$key,$tahun='',$bulan='') {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'periode': \n\t\t\t\t\treturn \"datepart(year,p.tglperolehan) = '$tahun' and datepart(month,p.tglperolehan) = '$bulan' \"; \n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once('m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"infoleft >= \".(int)$row['infoleft'].\" and inforight <= \".(int)$row['inforight'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"public function testGetPackingPlanTags()\n {\n }",
"public function list_plan($parameters){\n try {\n $planList = Plan::all(array_filter($parameters), $this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLANS'] = $planList->toArray();\n $returnArray['RAWREQUEST']= json_encode($parameters);\n $returnArray['RAWRESPONSE']=$planList->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n } \n }",
"public function test_getBillingCodeTypeByFilter() {\n\n }",
"function fill_form_bp_plan($gml_id) {\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\t\" . \n\t\t\t\t\"'\" . $this->trim_gml_prefix_if_exists($gml_id) . \"'::text::uuid AS plan_gml_id,\n\t\t\t\tgmlas.xplan_name AS name,\n\t\t\t\tgmlas.nummer AS nummer,\n\t\t\t\tgmlas.internalid AS internalid,\n\t\t\t\tgmlas.beschreibung AS beschreibung,\n\t\t\t\tgmlas.kommentar AS kommentar,\n\t\t\t\tto_char(gmlas.technherstelldatum, 'DD.MM.YYYY') AS technherstelldatum,\n\t\t\t\tto_char(gmlas.genehmigungsdatum, 'DD.MM.YYYY') AS genehmigungsdatum,\n\t\t\t\tto_char(gmlas.untergangsdatum, 'DD.MM.YYYY') AS untergangsdatum,\n\t\t\t\tCASE WHEN vpa.planname IS NOT NULL OR vpa.rechtscharakter IS NOT NULL OR vpa.nummer IS NOT NULL OR vpa.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpa.planname, vpa.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpa.nummer, vpa.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS aendert,\n\t\t\t\tCASE WHEN vpwgv.planname IS NOT NULL OR vpwgv.rechtscharakter IS NOT NULL OR vpwgv.nummer IS NOT NULL OR vpwgv.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpwgv.planname, vpwgv.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpwgv.nummer, vpwgv.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS wurdegeaendertvon,\n\t\t\t\tgmlas.erstellungsmassstab AS erstellungsmassstab,\n\t\t\t\tgmlas.bezugshoehe AS bezugshoehe,\n\t\t\t\tst_assvg(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\"), 0, 8) AS newpath,\n\t\t\t\tst_astext(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\")) AS newpathwkt,\n\t\t\t\tCASE WHEN vm.xp_verfahrensmerkmal_vermerk IS NOT NULL OR vm.xp_verfahrensmerkmal_datum IS NOT NULL OR vm.xp_verfahrensmerkmal_signatur IS NOT NULL OR vm.xp_verfahrensmerkmal_signiert IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vm.xp_verfahrensmerkmal_vermerk, vm.xp_verfahrensmerkmal_datum, vm.xp_verfahrensmerkmal_signatur, vm.xp_verfahrensmerkmal_signiert)]::xplan_gml.xp_verfahrensmerkmal[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS verfahrensmerkmale,\n\t\t\t\tCASE\n\t\t\t\t\tWHEN count_externeref > 0\n\t\t\t\t\tTHEN array_to_json(externeref.externereferenz)\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS externereferenz,\n\t\t\t\tto_char(gmlas.veraenderungssperredatum, 'DD.MM.YYYY') AS veraenderungssperredatum,\n\t\t\t\tarray_to_json(ARRAY[(g.ags,g.rs,g.gemeindename,g.ortsteilname)]::xplan_gml.xp_gemeinde[]) AS gemeinde,\n\t\t\t\tgmlas.verfahren::xplan_gml.bp_verfahren AS verfahren,\n\t\t\t\tto_char(gmlas.inkrafttretensdatum, 'DD.MM.YYYY') AS inkrafttretensdatum,\n\t\t\t\tgmlas.durchfuehrungsvertrag AS durchfuehrungsvertrag,\n\t\t\t\tgmlas.staedtebaulichervertrag AS staedtebaulichervertrag,\n\t\t\t\tgmlas.rechtsverordnungsdatum AS rechtsverordnungsdatum,\n\t\t\t\tgmlas.rechtsstand::xplan_gml.bp_rechtsstand AS rechtsstand,\n\t\t\t\tgmlas.hoehenbezug AS hoehenbezug,\n\t\t\t\tto_char(gmlas.aufstellungsbeschlussdatum, 'DD.MM.YYYY') AS aufstellungsbeschlussdatum,\n\t\t\t\tto_char(gmlas.ausfertigungsdatum, 'DD.MM.YYYY') AS ausfertigungsdatum,\n\t\t\t\tto_char(gmlas.satzungsbeschlussdatum, 'DD.MM.YYYY') AS satzungsbeschlussdatum,\n\t\t\t\tgmlas.veraenderungssperre AS veraenderungssperre,\n\t\t\t\tarray_to_json(ARRAY[to_char(aled.value, 'DD.MM.YYYY')]::date[]) AS auslegungsenddatum,\n\t\t\t\t(gmlas.sonstplanart_codespace, gmlas.sonstplanart, NULL)::xplan_gml.bp_sonstplanart AS sonstplanart,\n\t\t\t\tgmlas.gruenordnungsplan AS gruenordnungsplan,\n\t\t\t\tto_json((pg.name, pg.kennziffer)::xplan_gml.xp_plangeber) AS plangeber,\n\t\t\t\tarray_to_json(ARRAY[to_char(alsd.value, 'DD.MM.YYYY')]::date[]) AS auslegungsstartdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbsd.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsstartdatum,\n\t\t\t\tto_char(gmlas.aenderungenbisdatum, 'DD.MM.YYYY') AS aenderungenbisdatum,\n\t\t\t\tto_json((gmlas.status_codespace, gmlas.status, NULL)::xplan_gml.bp_status) AS status,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbed.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsenddatum,\n\t\t\t\tarray_to_json(gmlas.planart) AS planart,\n\t\t\t\tgmlas.erschliessungsvertrag AS erschliessungsvertrag\n\t\t\tFROM\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan gmlas LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_gemeinde gemeindelink ON gmlas.id = gemeindelink.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_gemeinde g ON gemeindelink.xp_gemeinde_pkid = g.ogr_pkid LEFT JOIN\n\t\t\t\t(\n\t\t\t\t\tSElECT\n\t\t\t\t\t\tCOUNT(*) AS count_externeref,\n\t\t\t\t\t\texternereferenzlink_sub.parent_id,\n\t\t\t\t\t\tarray_agg((e_sub.georefurl,\n\t\t\t\t\t\t\t\t(e_sub.georefmimetype_codespace, e_sub.georefmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.art::xplan_gml.xp_externereferenzart,\n\t\t\t\t\t\t\t\te_sub.informationssystemurl,\n\t\t\t\t\t\t\t\te_sub.referenzname,\n\t\t\t\t\t\t\t\te_sub.referenzurl,\n\t\t\t\t\t\t\t\t(e_sub.referenzmimetype_codespace, e_sub.referenzmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.beschreibung,\n\t\t\t\t\t\t\t\tto_char(e_sub.datum, 'DD.MM.YYYY'),\n\t\t\t\t\t\t\t\te_sub.typ::xplan_gml.xp_externereferenztyp\n\t\t\t\t\t\t\t)::xplan_gml.xp_spezexternereferenz) AS externereferenz\n\t\t\t\t\tFROM\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_externereferenz externereferenzlink_sub LEFT JOIN\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".xp_spezexternereferenz e_sub ON externereferenzlink_sub.xp_spezexternereferenz_pkid = e_sub.ogr_pkid\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\texternereferenzlink_sub.parent_id\n\t\t\t\t) externeref ON gmlas.id = externeref.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_aendert_aendert aendertlink ON gmlas.id = aendertlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".aendert aendertlinktwo ON aendertlink.child_pkid = aendertlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpa ON aendertlinktwo.xp_verbundenerplan_pkid = vpa.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_wurdegeaendertvon_wurdegeaendertvon wurdegeaendertvonlink ON gmlas.id = wurdegeaendertvonlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".wurdegeaendertvon wurdegeaendertvonlinktwo ON wurdegeaendertvonlink.child_pkid = wurdegeaendertvonlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpwgv ON wurdegeaendertvonlinktwo.xp_verbundenerplan_pkid = vpwgv.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_verfahrensmerkmale_verfahrensmerkmale verfahrensmerkmalelink ON gmlas.id = verfahrensmerkmalelink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".verfahrensmerkmale vm ON verfahrensmerkmalelink.child_pkid = vm.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_plangeber pg ON gmlas.plangeber_xp_plangeber_pkid = pg.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_auslegungsstartdatum alsd ON gmlas.id = alsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_auslegungsenddatum aled ON gmlas.id = aled.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_traegerbeteiligungsstartdatum tbsd ON gmlas.id = tbsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_traegerbeteiligungsenddatum tbed ON gmlas.id = tbed.parent_id\n\t\t\tWHERE\n\t\t\t\tgmlas.id ='\" . $gml_id . \"'\n\t\t\t;\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$result = pg_fetch_assoc($ret[1]);\n\t\treturn $result;\n\t}",
"public function testFilterByTitle2()\n {\n $response = $this->runApp('GET', '/v1/products?q=tremblay&password=' . $this->apiPassword);\n\n $this->assertEquals(StatusCode::HTTP_OK, $response->getStatusCode());\n $sJson = '[{\"id\":\"12\",\"title\":\"tremblay.com\",\"brand\":\"dolorem\",\"price\":\"94953540.00\",\"stock\":\"4\"}]';\n $result = (array)json_decode($response->getBody())->result;\n\n $this->assertEquals(json_decode($sJson), $result);\n }",
"public function testCompanyApiFilterParams()\n {\n $params = [\n 'scoreTotal' => 13,\n 'exchangeSymbols' => 'NYSE',\n ];\n $this->call('GET', '/companies', $params);\n\n $this->assertResponseStatus(200);\n $this->seeJsonContains([\n \"exchangeSymbol\" => \"NYSE\",\n \"snowFlakeScoreTotal\" => 13,\n ]);\n $this->seeJsonDoesntContains([\"snowFlakeScoreTotal\" => 20]);\n $this->seeJsonDoesntContains([\"snowFlakeScoreTotal\" => 9]);\n $this->seeJsonDoesntContains([\"snowFlakeScoreTotal\" => 12]);\n $this->seeJsonDoesntContains([\"snowFlakeScoreTotal\" => 18]);\n }",
"private static function _getFilter() {}",
"public function planFind($id);",
"function editPackage($argPkgID, $varPortalFilter) {\n $varWhr = 'pkPackageId =' . $argPkgID . $varPortalFilter;\n $arrClms = array('pkPackageId', 'fkWholesalerID', 'PackageName', 'PackagePrice', 'PackageImage');\n $arrPackage = $this->select(TABLE_PACKAGE, $arrClms, $varWhr);\n\n $varWhrTo = 'ptp.fkPackageId =' . $argPkgID;\n $varTable = TABLE_PRODUCT_TO_PACKAGE . ' as ptp INNER JOIN ' . TABLE_PRODUCT . ' as p ON ptp.fkProductId=p.pkProductID INNER JOIN ' . TABLE_CATEGORY . ' ON fkCategoryID = pkCategoryId ';\n\n $arrClmsTo = array('fkProductId', 'fkCategoryID', 'fkWholesalerID');\n $arrRowTo = $this->select($varTable, $arrClmsTo, $varWhrTo);\n foreach ($arrRowTo as $k => $val) {\n $varWhrPro = 'fkCategoryID =' . $val['fkCategoryID'] . ' AND ProductStatus = 1 AND fkWholesalerID = \"' . $val['fkWholesalerID'] . '\"';\n $arrClmsPro = array('pkProductID', 'ProductName', 'FinalPrice');\n $arrRowTo[$k]['ProductList'] = $this->select(TABLE_PRODUCT, $arrClmsPro, $varWhrPro);\n }\n $arrRow['Package'] = $arrPackage;\n $arrRow['PackageToProduct'] = $arrRowTo;\n return $arrRow;\n }",
"private function init_andWhereFilter()\n {\n // RETURN : $this->andWhereFilter was set before\n if ( !( $this->andWhereFilter === null ) )\n {\n return $this->andWhereFilter;\n }\n // RETURN : $this->andWhereFilter was set before\n // RETURN : there isn't any filter\n if ( !$this->bool_isFilter )\n {\n $this->andWhereFilter = false;\n return $this->andWhereFilter;\n }\n // RETURN : there isn't any filter\n\n $arr_andWhereFilter = null;\n\n // Init area\n $this->pObj->objCal->area_init();\n $conf = $this->pObj->conf;\n $viewWiDot = $this->view . '.';\n $conf_view = $conf[ 'views.' ][ $viewWiDot ][ $this->mode . '.' ];\n // Init area\n // LOOP: filter tableFields\n//$this->pObj->dev_var_dump( $this->arr_tsFilterTableFields );\n foreach ( $this->arr_tsFilterTableFields as $tableField )\n {\n list( $table ) = explode( '.', $tableField );\n $str_andWhere = null;\n\n // Get nice_piVar\n $arr_result = $this->zz_getNicePiVar( $tableField );\n $arr_piVar = $arr_result[ 'data' ][ 'arr_piVar' ];\n//var_dump( __METHOD__, __LINE__, $tableField, $arr_piVar );\n unset( $arr_result );\n // Get nice_piVar\n // CONTINUE : There isn't any piVar\n if ( empty( $arr_piVar ) )\n {\n continue;\n }\n // CONTINUE : There isn't any piVar\n // SWITCH : manual mode versus auto mode\n switch ( true )\n {\n case( $this->pObj->b_sql_manual ):\n // SQL manual mode\n $str_andWhere = $this->init_andWhereFilter_manualMode( $arr_piVar, $tableField, $conf_view );\n//$this->pObj->dev_var_dump( $str_andWhere );\n break;\n // SQL manual mode\n case(!$this->pObj->b_sql_manual ):\n default:\n // SQL auto mode\n // SWITCH : local table versus foreign table\n switch ( true )\n {\n case( $table == $this->pObj->localTable ):\n $str_andWhere = $this->init_andWhereFilter_localTable( $arr_piVar, $tableField );\n//$this->pObj->dev_var_dump( $str_andWhere );\n break;\n case( $table != $this->pObj->localTable ):\n default:\n $str_andWhere = $this->init_andWhereFilter_foreignTable( $arr_piVar, $tableField );\n//var_dump( __METHOD__, __LINE__, $str_andWhere );\n break;\n }\n // SWITCH : local table versus foreign table\n break;\n // SQL auto mode\n }\n // SWITCH : manual mode versus auto mode\n\n if ( !empty( $str_andWhere ) )\n {\n $arr_andWhereFilter[ $tableField ] = $str_andWhere;\n // #56329, 140227, dwildt, 1+\n $this->arr_andWhereFilter[ $tableField ] = \" AND \" . $str_andWhere;\n }\n // Build the andWhere statement\n }\n // LOOP: filter tableFields\n // andWhere statement\n $strAndWhere = implode( \" AND \", ( array ) $arr_andWhereFilter );\n\n // #52486, 131002, dwildt, 6+\n if ( $this->radialsearchTable )\n {\n $strAndWhere = $strAndWhere\n . $this->init_andWhereFilter_radialsearch()\n ;\n }\n // #52486, 131002, dwildt, 6+\n // RETURN : there isn't any andWhere statement\n if ( empty( $strAndWhere ) )\n {\n $this->andWhereFilter = false;\n return $this->andWhereFilter;\n }\n // RETURN : there isn't any andWhere statement\n\n $this->andWhereFilter = \" AND \" . $strAndWhere;\n\n // DRS\n if ( $this->pObj->b_drs_filter || $this->pObj->b_drs_sql )\n {\n if ( is_array( $arr_andWhereFilter ) )\n {\n $prompt = 'andWhere statement: ' . $this->andWhereFilter;\n t3lib_div :: devlog( '[INFO/FILTER+SQL] ' . $prompt, $this->pObj->extKey, 0 );\n }\n }\n // DRS\n\n return $this->andWhereFilter;\n }",
"static function get_plan_revenue()\n {\n $cond_str = RestaurantTotalReportDB::get_month_year_string($_REQUEST['from_date'],$_REQUEST['to_date']);\n $sql = 'select\n (bar.name || \\'_\\' || pim.bar_index) as id,\n sum(pim.value) as value,\n pim.portal_id,\n pim.bar_index\n from\n plan_in_month pim\n inner join bar on bar.id = pim.bar\n where\n (pim.month || pim.year) in ('.$cond_str.')\n and pim.bar is not null\n and pim.bar_index is not null\n group by \n bar.name,\n pim.portal_id,\n pim.bar_index\n ';\n $items = DB::fetch_all($sql);\n return $items;\n }",
"public function parseUrlUsingFilterEnabled()\n {\n $query = new ControllerQuery($this->enabledFilters, '/test');\n $url = $query->setFilters(['name' => 'Batman', 'alias' => 'Fatherless'])\n ->build();\n\n $this->assertEquals(\n 'http://www.comicvine.com/api/test/?limit=100&offset=0&filter=name:Batman,alias:Fatherless',\n $url\n );\n }",
"public function getBanners($perPage = 20, array $filter = array(), array $sort = array(), $paginate = true);",
"private function loadOfferFilters() {\n\n // buscando usuários\n $companyId = $this->Session->read('CompanyLoggedIn.Company.id');\n $params = array(\n 'CompaniesUser' => array(\n 'fields' => array(\n 'CompaniesUser.user_id'\n ),\n 'conditions' => array(\n 'CompaniesUser.company_id' => $companyId,\n 'CompaniesUser.status' => 'ACTIVE'\n )\n )\n );\n $userIds = $this->Utility->urlRequestToGetData('companies', 'list', $params);\n\n if (!empty($userIds) && empty($userIds ['status'])) {\n $_SESSION ['addOffer'] ['userIds'] = $userIds;\n\n // conta público alvo\n $this->offerFilters ['target'] = count($userIds);\n\n // busca os filtros\n foreach ($this->offerFilters as $key => $value) {\n if ($key == 'gender') {\n $Paramsgenero = array(\n 'CompaniesUser' => array(\n 'fields' => array(\n \"COUNT(User.id) AS count\",\n \"User.gender AS filter\"\n ),\n 'group' => array(\n \"User.gender\"\n ),\n 'conditions' => array(\n 'CompaniesUser.company_id' => $companyId,\n 'CompaniesUser.status' => 'ACTIVE'\n ),\n 'order' => array(\n 'COUNT(User.id)' => 'DESC'\n )\n ),\n 'User' => array()\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'all', $Paramsgenero);\n } else if ($key == 'age_group') {\n // busca faixa etária\n $query = \"SELECT\n\t\t\t\t\t SUM(IF(age < 20,1,0)) AS '{$this->ageGroupRangeKeys['0_20']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 20 AND 29,1,0)) AS '{$this->ageGroupRangeKeys['20_29']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 30 AND 39,1,0)) AS '{$this->ageGroupRangeKeys['30_39']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 40 AND 49,1,0)) AS '{$this->ageGroupRangeKeys['40_49']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 50 AND 59,1,0)) AS '{$this->ageGroupRangeKeys['50_59']}',\n\t\t\t\t\t SUM(IF(age BETWEEN 60 AND 120,1, 0)) AS '{$this->ageGroupRangeKeys['60_120']}',\n\t\t\t\t\t SUM(IF(age >= 121, 1, 0)) AS '{$this->ageGroupRangeKeys['empty']}'\n\t\t\t\t\t\tFROM (SELECT YEAR(CURDATE())-YEAR(birthday) AS age FROM users as a, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcompanies_users as b where a.id=b.user_id and b.status='ACTIVE' and b.company_id = {$this->Session->read('CompanyLoggedIn.Company.id')}) AS derived\";\n\n $filterParams = array(\n 'FacebookProfile' => array(\n 'query' => $query\n )\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'query', $filterParams);\n } else {\n $filterParams = array(\n 'FacebookProfile' => array(\n 'fields' => array(\n \"COUNT(FacebookProfile.{$key}) AS count\",\n \"FacebookProfile.{$key} AS filter\"\n ),\n 'conditions' => array(\n 'FacebookProfile.user_id' => $userIds\n ),\n 'group' => array(\n \"FacebookProfile.{$key}\"\n ),\n 'order' => array(\n \"FacebookProfile.{$key}\" => 'ASC'\n )\n )\n );\n $filter = $this->Utility->urlRequestToGetData('users', 'all', $filterParams);\n }\n if (!empty($filter) && empty($filter ['status'])) {\n $this->offerFilters [$key] = $this->formatOfferFilters($filter);\n }\n }\n return $this->offerFilters;\n } else {\n $this->Session->setFlash('Houve um problema para carregar os filtros. Tente novamente.');\n }\n }",
"protected function getVendorComplianceSurveyByFilterRequest($filter = null, $page = null, $limit = null, $sort = null)\n {\n\n $resourcePath = '/beta/vendorComplianceSurvey/search';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($filter !== null) {\n $queryParams['filter'] = ObjectSerializer::toQueryValue($filter);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n // query params\n if ($sort !== null) {\n $queryParams['sort'] = ObjectSerializer::toQueryValue($sort);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function testSearchWithFilters()\n {\n $filters = [\n \"from_date\" => \"2011-12-05\",\n \"to_date\" => \"2011-12-05\",\n \"city\" => \"CAI\",\n \"adults_ number\" => 5\n ];\n // Stub a JSON response for api.bestHotels.com/ endpoint.\n Http::fake([\n 'api.topHotels.com/*' => Http::response(['data' => $this->topHotelsDataFactory->getItems()], 200),\n 'api.bestHotels.com/*' => Http::response(['data' => $this->bestHotelsDataFactory->getItems()], 200)\n ]);\n $response = $this->json('get', 'api/search', $filters);\n $response->assertStatus(200);\n $response->assertJsonStructure([\n 'data' => [\n '*' => [\n 'provider',\n 'hotelName',\n 'rate',\n 'discount',\n 'fare',\n 'amenities',\n ]\n ],\n ]);\n }",
"function select($table, $filter_data) {\n\t\t\t$this->sql = \"SELECT * FROM $table WHERE is_Archive = 0\";\n\n\t\t\t\n\t\t\tif($result = $this->conn->query($this->sql)){\n\t\t\t\tif($result->num_rows>0){\n\t\t\t\t\twhile($res = $result->fetch_assoc()){\n\t\t\t\t\t\tarray_push($this->data, $res);\n\t\t\t\t\t}\n\t\t\t\t\t$this->status = $this->success_stat;\n\t\t\t\t\thttp_response_code(200);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn array(\n\t\t\t\t'status'=>$this->status,\n\t\t\t\t'payload'=>$this->data,\n\t\t\t\t'prepared_by'=>'Inventory bois',\n\t\t\t\t'timestamp'=>date('D M j, Y G:i:s T')\n\t\t\t);\n\t\t}",
"public function getAllPlans($paramArray = [])\n {\n $ret = $this->exec($this->uri.$this->toHttpQueryParameter($paramArray), null);\n\n $prjs = $this->json_mapper->mapArray(\n json_decode($ret, false), new \\ArrayObject(), '\\BambooRestApi\\Plan\\Plan'\n );\n\n return $prjs;\n }",
"function getListFilter($col, $key) {\n switch ($col) {\n case 'unit':\n global $conn, $conf;\n require_once($conf['gate_dir'] . 'model/m_unit.php');\n\n $row = mUnit::getData($conn, $key);\n\n return \"u.infoleft >= \" . (int) $row['infoleft'] . \" and u.inforight <= \" . (int) $row['inforight'];\n break;\n case 'tahun':\n if ($key != 'all')\n return \"date_part('year', tmtmulai) = '$key'\";\n else\n return \"(1=1)\";\n\n break;\n case 'tunjangan':\n if ($key != 'all')\n return \"g.kodetunjangan = '$key'\";\n else\n return \"(1=1)\";\n\n break;\n case 'tahunpot':\n if ($key != 'all')\n return \"date_part('year', g.tglmulai) = '$key'\";\n else\n return \"(1=1)\";\n\n break;\n case 'potonganparam':\n if ($key != 'all')\n return \"g.kodepotongan = '$key'\";\n else\n return \"(1=1)\";\n\n break;\n case 'jenispegawai':\n if ($key != 'all')\n return \"p.idjenispegawai = '$key'\";\n else\n return \"(1=1)\";\n\n break;\n case 'periodegaji':\n return \"g.periodegaji = '$key'\";\n break;\n case 'periodetarif':\n return \"g.periodetarif = '$key'\";\n break;\n case 'golongan':\n return \"g.idpangkat = '$key'\";\n break;\n case 'jnstunjangan':\n return \"g.kodetunjangan = '$key'\";\n break;\n case 'periodehist':\n return \"g.gajiperiode = '$key'\";\n break;\n case 'hubungankerja':\n if ($key != 'all')\n return \"p.idhubkerja = '$key'\";\n else\n return \"(1=1)\";\n \n break;\n case 'tunda':\n if (!empty($key)) {\n if ($key == 'Y')\n return \"g.istunda = 'Y'\";\n else\n return \"(g.istunda = 'T' or g.istunda is null)\";\n }\n break;\n case 'bayar':\n if (!empty($key)) {\n if ($key == 'Y')\n return \"g.isfinish = 'Y'\";\n else\n return \"(g.isfinish = 'T' or g.isfinish is null)\";\n }\n break;\n case 'bayartunj':\n if (!empty($key)) {\n if ($key == 'Y')\n return \"g.isdibayar = 'Y'\";\n else\n return \"(g.isdibayar = 'T' or g.isdibayar is null)\";\n }\n break;\n case 'bayarlembur':\n if (!empty($key)) {\n if ($key == 'Y')\n return \"g.isbayar = 'Y'\";\n else\n return \"(g.isbayar = 'T' or g.isbayar is null)\";\n }\n break;\n case 'periodepenilaian':\n return \"kodeperiode='$key'\";\n break;\n case 'pendidikan':\n return \"idpendidikan='$key'\";\n break;\n case 'tipepegawai':\n if ($key != 'all')\n return \"p.idtipepeg = '$key'\";\n else\n return \"(1=1)\";\n\n break;\n }\n }",
"public function get_listing_plans($id, $type)\n {\n header('Content-Type: application/json');\n $output['token'] = $this->security->get_csrf_hash();\n $data = $this->database->_get_row_data('tbl_purchases', array('plan_id' => $id, 'listing_type' => $type));\n if (!empty($data)) {\n $output['response'] = $data;\n } else {\n $output['response'] = false;\n }\n\n exit(json_encode($output));\n }",
"public function availablePlans()\n {\n return Spark::teamPlans();\n }",
"public function getSubscriptionPlan() {\n $categoryId = Config::get('custom_config.WOOCOMMERCE_CATEGORY_ID');\n if (empty($categoryId)) {\n return response()->json(\n ['error' => __('woocommerce category ID not set')\n ],\n 400\n );\n }\n $data = $this->wooCommerceService->getSubscriptionPlan();\n \\Log::info(\"===== data \", ['subscription_package' => $data]);\n\n if ($data) {\n return response()->json(['data' => $data], 200);\n }\n\n return response()->json(\n ['error' => __('messages.un_processable_request')\n ],\n 400\n );\n }",
"public function filterProvider()\n {\n $entity1 = $this->createMock(EntityInterface::class);\n $entity2 = $this->createMock(EntityInterface::class);\n $entity3 = $this->createMock(EntityInterface::class);\n $entity4 = $this->createMock(EntityInterface::class);\n $entity5 = $this->createMock(EntityInterface::class);\n $entity6 = $this->createMock(EntityInterface::class);\n\n $entity1->foo = 'bar';\n $entity2->foo = 123;\n $entity4->foo = '123';\n $entity5->foo = ['1230'];\n $entity6->foo = [1234, 123, 'teta'];\n\n $entities = [$entity1, $entity2, $entity3, $entity4, $entity5, $entity6];\n\n $filter = function($entity) {\n return isset($entity->foo) && $entity->foo == 123;\n };\n\n return [\n [$entities, ['foo' => 123], false, [1 => $entity2, 3 => $entity4, 5 => $entity6]],\n [$entities, ['foo' => 123], true, [1 => $entity2, 5 => $entity6]],\n [$entities, $filter, false, [1 => $entity2, 3 => $entity4]],\n [$entities, $filter, true, [1 => $entity2, 3 => $entity4]],\n [$entities, [], false, $entities],\n [$entities, [], true, $entities],\n [[], ['foo' => 123], true, []],\n [[], ['foo' => 123], false, []],\n [[], $filter, true, []],\n [[], $filter, false, []],\n ];\n }",
"public function filterMyBookingsAction()\n {\n $request = Request::createFromGlobals();\n $data = array();\n $data2 = array();\n $fromDate = $request->request->get('fromDay', '');\n $toDate = $request->request->get('toDay', '');\n $accountId = $request->request->get('accountId', '');\n $userId = $request->request->get('userId', '');\n $currencyCode = $request->request->get('currencyCode', '');\n $types = $request->request->get('types', '');\n $pg_start_page = $request->request->get('start', '');\n \n if(!$pg_start_page)\n $pg_start_page = 1;\n \n $commonCode = $this->commonCode();\n $countItem = $commonCode['countItem'];\n \n if($fromDate){\n $fromDate = new \\DateTime($fromDate);\n $fromDate = $fromDate->format('Y-m-d');\n }\n if($toDate){\n $toDate = new \\DateTime($toDate);\n $toDate = $toDate->format('Y-m-d');\n }\n $class = $commonCode['class'];\n $pg_limit_records = $commonCode['pg_limit_records'];\n $page = $pg_start_page;\n $count = $commonCode['count'];\n $pagination = '';\n $pg_start_page = ( $pg_start_page * $pg_limit_records ) - $pg_limit_records;\n $modules = $commonCode['modules'];\n $accountId = $commonCode['accountId'];\n if(!$userId){\n $userId = $commonCode['userId'];\n }\n $parameters['accountId'] = $accountId;\n $parameters['userId'] = $userId;\n $status = $commonCode['status'];\n $data2['preferredAccountCurrency'] = $commonCode['preferredAccountCurrency'];\n $data2['hotelModuleId'] = $commonCode['hotelModuleId'];\n $data2['flightModuleId'] = $commonCode['flightModuleId'];\n $data2['dealModuleId'] = $commonCode['dealModuleId'];\n $data2['approvedStatus'] = $commonCode['approvedStatus'];\n $data2['accountId'] = $accountId;\n $data2['modules'] = $modules;\n $params = array(\n 'accountId' => $accountId,\n 'userId' => $userId,\n 'currencyCode' => $currencyCode,\n 'fromDate' => $fromDate,\n 'toDate' => $toDate,\n 'types' => $types,\n 'status' => $status,\n 'start' => $pg_start_page,\n 'limit' => $pg_limit_records\n );\n $approvalFlow = $this->get('CorpoApprovalFlowServices')->getAllApprovalFlowList($params);\n \n $params['count']= 1;\n $countApprovalFlowList = $this->get('CorpoApprovalFlowServices')->getAllApprovalFlowList($params);\n if($countApprovalFlowList){\n $countItem = $countApprovalFlowList;\n $pagination = $this->getRelatedDiscoverPagination($countItem, $pg_limit_records, $page,$count ,$class );\n }\n \n $data2['allApprovalFlowList'] = $approvalFlow;\n $data['allApprovalFlow'] = $this->render('@Corporate/corporate/corporate-my-bookingsInfo.twig', $data2)->getContent();\n \n if($pagination){\n $data['pagination'] = $pagination;\n }\n\n $res = new Response(json_encode($data));\n $res->headers->set('Content-Type', 'application/json');\n\n return $res;\n }",
"function automap_filter_by_group(&$obj, $params) {\n if(!isset($params['filter_group']) || $params['filter_group'] == '')\n return;\n\n global $_BACKEND;\n $_BACKEND->checkBackendExists($params['backend_id'][0], true);\n $_BACKEND->checkBackendFeature($params['backend_id'][0], 'getHostNamesInHostgroup', true);\n $hosts = $_BACKEND->getBackend($params['backend_id'][0])->getHostNamesInHostgroup($params['filter_group']);\n\n $allowed_ids = array_flip(automap_hostnames_to_object_ids($hosts));\n automap_filter_tree($allowed_ids, $obj);\n}",
"function fill_form_rp_plan($gml_id) {\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\t\" . \n\t\t\t\t\"'\" . $this->trim_gml_prefix_if_exists($gml_id) . \"'::text::uuid AS plan_gml_id,\n\t\t\t\tgmlas.xplan_name AS name,\n\t\t\t\tgmlas.nummer AS nummer,\n\t\t\t\tgmlas.internalid AS internalid,\n\t\t\t\tgmlas.beschreibung AS beschreibung,\n\t\t\t\tgmlas.kommentar AS kommentar,\n\t\t\t\tto_char(gmlas.technherstelldatum, 'DD.MM.YYYY') AS technherstelldatum,\n\t\t\t\tto_char(gmlas.genehmigungsdatum, 'DD.MM.YYYY') AS genehmigungsdatum,\n\t\t\t\tto_char(gmlas.untergangsdatum, 'DD.MM.YYYY') AS untergangsdatum,\n\t\t\t\tCASE WHEN vpa.planname IS NOT NULL OR vpa.rechtscharakter IS NOT NULL OR vpa.nummer IS NOT NULL OR vpa.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpa.planname, vpa.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpa.nummer, vpa.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS aendert,\n\t\t\t\tCASE WHEN vpwgv.planname IS NOT NULL OR vpwgv.rechtscharakter IS NOT NULL OR vpwgv.nummer IS NOT NULL OR vpwgv.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpwgv.planname, vpwgv.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpwgv.nummer, vpwgv.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS wurdegeaendertvon,\n\t\t\t\tgmlas.erstellungsmassstab AS erstellungsmassstab,\n\t\t\t\tgmlas.bezugshoehe AS bezugshoehe,\n\t\t\t\tst_assvg(st_transform(gmlas.raeumlichergeltungsbereich,\". $this->epsg .\"), 0, 8) AS newpath,\n\t\t\t\tst_astext(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\")) AS newpathwkt,\n\t\t\t\tCASE WHEN vm.xp_verfahrensmerkmal_vermerk IS NOT NULL OR vm.xp_verfahrensmerkmal_datum IS NOT NULL OR vm.xp_verfahrensmerkmal_signatur IS NOT NULL OR vm.xp_verfahrensmerkmal_signiert IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vm.xp_verfahrensmerkmal_vermerk, vm.xp_verfahrensmerkmal_datum, vm.xp_verfahrensmerkmal_signatur, vm.xp_verfahrensmerkmal_signiert)]::xplan_gml.xp_verfahrensmerkmal[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS verfahrensmerkmale,\n\t\t\t\tCASE\n\t\t\t\t\tWHEN count_externeref > 0\n\t\t\t\t\tTHEN array_to_json(externeref.externereferenz)\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS externereferenz,\n\t\t\t\tgmlas.planungsregion AS planungsregion,\n\t\t\t\tgmlas.teilabschnitt AS teilabschnitt,\n\t\t\t\tgmlas.amtlicherschluessel AS amtlicherschluessel,\n\t\t\t\tgmlas.verfahren::xplan_gml.rp_verfahren AS verfahren,\n\t\t\t\tgmlas.rechtsstand::xplan_gml.rp_rechtsstand AS rechtsstand,\n\t\t\t\tto_char(gmlas.datumdesinkrafttretens, 'DD.MM.YYYY') AS datumdesinkrafttretens,\n\t\t\t\tto_char(gmlas.planbeschlussdatum, 'DD.MM.YYYY') AS planbeschlussdatum,\n\t\t\t\tto_char(gmlas.aufstellungsbeschlussdatum, 'DD.MM.YYYY') AS aufstellungsbeschlussdatum,\n\t\t\t\tto_char(gmlas.entwurfsbeschlussdatum, 'DD.MM.YYYY') AS entwurfsbeschlussdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(aled.value, 'DD.MM.YYYY')]::date[]) AS auslegungsenddatum,\n\t\t\t\t(gmlas.sonstplanart_codespace, gmlas.sonstplanart)::xplan_gml.rp_sonstplanart AS sonstplanart,\n\t\t\t\tarray_to_json(ARRAY[to_char(alsd.value, 'DD.MM.YYYY')]::date[]) AS auslegungsstartdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbsd.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsstartdatum,\n\t\t\t\tto_char(gmlas.aenderungenbisdatum, 'DD.MM.YYYY') AS aenderungenbisdatum,\n\t\t\t\tto_json((gmlas.status_codespace, gmlas.status)::xplan_gml.rp_status) AS status,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbed.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsenddatum,\n\t\t\t\tgmlas.planart::xplan_gml.rp_art AS planart\n\t\t\tFROM\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan gmlas LEFT JOIN\n\t\t\t\t(\n\t\t\t\t\tSElECT\n\t\t\t\t\t\tCOUNT(*) AS count_externeref,\n\t\t\t\t\t\texternereferenzlink_sub.parent_id,\n\t\t\t\t\t\tarray_agg((e_sub.georefurl,\n\t\t\t\t\t\t\t\t(e_sub.georefmimetype_codespace, e_sub.georefmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.art::xplan_gml.xp_externereferenzart,\n\t\t\t\t\t\t\t\te_sub.informationssystemurl,\n\t\t\t\t\t\t\t\te_sub.referenzname,\n\t\t\t\t\t\t\t\te_sub.referenzurl,\n\t\t\t\t\t\t\t\t(e_sub.referenzmimetype_codespace, e_sub.referenzmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.beschreibung,\n\t\t\t\t\t\t\t\tto_char(e_sub.datum, 'DD.MM.YYYY'),\n\t\t\t\t\t\t\t\te_sub.typ::xplan_gml.xp_externereferenztyp\n\t\t\t\t\t\t\t)::xplan_gml.xp_spezexternereferenz) AS externereferenz\n\t\t\t\t\tFROM\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_externereferenz externereferenzlink_sub LEFT JOIN\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".xp_spezexternereferenz e_sub ON externereferenzlink_sub.xp_spezexternereferenz_pkid = e_sub.ogr_pkid\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\texternereferenzlink_sub.parent_id\n\t\t\t\t) externeref ON gmlas.id = externeref.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_aendert_aendert aendertlink ON gmlas.id = aendertlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".aendert aendertlinktwo ON aendertlink.child_pkid = aendertlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpa ON aendertlinktwo.xp_verbundenerplan_pkid = vpa.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_wurdegeaendertvon_wurdegeaendertvon wurdegeaendertvonlink ON gmlas.id = wurdegeaendertvonlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".wurdegeaendertvon wurdegeaendertvonlinktwo ON wurdegeaendertvonlink.child_pkid = wurdegeaendertvonlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpwgv ON wurdegeaendertvonlinktwo.xp_verbundenerplan_pkid = vpwgv.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_verfahrensmerkmale_verfahrensmerkmale verfahrensmerkmalelink ON gmlas.id = verfahrensmerkmalelink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".verfahrensmerkmale vm ON verfahrensmerkmalelink.child_pkid = vm.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_auslegungsstartdatum alsd ON gmlas.id = alsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_auslegungsenddatum aled ON gmlas.id = aled.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_traegerbeteiligungsstartdatum tbsd ON gmlas.id = tbsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_traegerbeteiligungsenddatum tbed ON gmlas.id = tbed.parent_id\n\t\t\tWHERE\n\t\t\t\tgmlas.id = '\" . $gml_id . \"'\n\t\t\t;\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$result = pg_fetch_assoc($ret[1]);\n\t\treturn $result;\n\t}",
"public function buscar_comprobantes($tipo_oper = 'V', $filter = NULL, $number_items = '', $offset = '')\n {\n $compania = $this->somevar['compania'];\n\n $where = '';\n\n if (isset($filter->fechai) && $filter->fechai != '' && isset($filter->fechaf) && $filter->fechaf != '')\n $where = ' and cp.CRED_Fecha BETWEEN \"' . human_to_mysql($filter->fechai) . '\" AND \"' . human_to_mysql($filter->fechaf) . '\"';\n\n if (isset($filter->serie) && $filter->serie != '')\n $where .= ' and cp.CRED_Serie=\"' . $filter->serie . '\"';\n\n if (isset($filter->numero) && $filter->numero != '')\n $where .= ' AND cp.CRED_Numero=\"'.$filter->numero.'\"';\n\n if ($tipo_oper != 'C') {\n if (isset($filter->cliente) && $filter->cliente != '')\n $where .= ' and cp.CLIP_Codigo=' . $filter->cliente;\n } else {\n if (isset($filter->proveedor) && $filter->proveedor != '')\n $where .= ' and cp.PROVP_Codigo=' . $filter->proveedor;\n }\n \n #if (isset($filter->producto) && $filter->producto != '')\n # $where .= ' and cpd.PROD_Codigo=' . $filter->producto;\n\n if (isset($filter->CRED_TipoNota) && $filter->CRED_TipoNota != '')\n $where .= \" and cp.CRED_TipoNota = '$filter->CRED_TipoNota'\";\n\n $limit = \"\";\n\n if ((string)$offset != '' && $number_items != '') {\n $limit = 'LIMIT ' . $offset . ',' . $number_items;\n }\n\n $sql = \"SELECT cp.CRED_Fecha,\n cp.CRED_TipoOperacion,\n cp.CRED_Codigo,\n cp.CRED_Serie,\n cp.CRED_Numero,\n (SELECT CLIC_CodigoUsuario FROM cji_cliente WHERE cji_cliente.CLIP_Codigo = cp.CLIP_Codigo LIMIT 1) as CLIC_CodigoUsuario,\n (CASE \" . ($tipo_oper != 'C' ? \"c.CLIC_TipoPersona\" : \"c.PROVC_TipoPersona\") . \" WHEN '1'THEN e.EMPRC_RazonSocial ELSE CONCAT(pe.PERSC_Nombre , ' ', pe.PERSC_ApellidoPaterno, ' ', pe.PERSC_ApellidoMaterno) end) nombre,\n m.MONED_Simbolo,\n cp.CRED_total,\n cp.CRED_FlagEstado,\n cp.CRED_Flag,\n cp.CRED_TipoDocumento_inicio,\n cp.CRED_TipoDocumento_fin,\n cp.CRED_ComproInicio,\n cp.CRED_ComproFin,\n cp.CRED_NumeroInicio,\n cp.CRED_NumeroFin,\n cp.CRED_Observacion\n FROM cji_nota cp\n LEFT JOIN cji_moneda m ON m.MONED_Codigo=cp.MONED_Codigo\n \" . ($tipo_oper != 'C' ? \"LEFT JOIN cji_cliente c ON c.CLIP_Codigo=cp.CLIP_Codigo\" : \"INNER JOIN cji_proveedor c ON c.PROVP_Codigo=cp.PROVP_Codigo\") . \"\n LEFT JOIN cji_persona pe ON pe.PERSP_Codigo=c.PERSP_Codigo AND \" . ($tipo_oper != 'C' ? \"c.CLIC_TipoPersona\" : \"c.PROVC_TipoPersona\") . \" = '0'\n LEFT JOIN cji_empresa e ON e.EMPRP_Codigo=c.EMPRP_Codigo AND \" . ($tipo_oper != 'C' ? \"c.CLIC_TipoPersona\" : \"c.PROVC_TipoPersona\") . \" = '1'\n WHERE cp.CRED_TipoOperacion='\" . $tipo_oper . \"'\n \n AND cp.COMPP_Codigo =\" . $compania . \" \" . $where . \"\n ORDER BY cp.CRED_FechaRegistro DESC \" . $limit; //cp.CPC_Serie DESC, cp.CPC_Numero DESC\n\n # AND cp.CRED_FlagEstado = 1 OLD\n $query = $this->db->query($sql);\n\n if ($query->num_rows > 0) {\n foreach ($query->result() as $fila) {\n $data[] = $fila;\n }\n return $data;\n }\n return array();\n }",
"public function execute()\n {\n /** @var \\Unit4\\Retailer\\Model\\ResourceModel\\Retailer\\Collection $collection */\n $collection = $this->collectionFactory->create();\n// $collection->addFieldToFilter('region_id',['eq'=>2]);\n $collection->addFilterByProduct(3);\n \\Zend_Debug::dump($collection->getData());\n\n }",
"public function getMaintPlanWorkTime($date, $filter = array())\n\t{\n\t\t$where = '';\n\t\t$group = '';\n\t\t$idField = 'cvbt.Ref_Ten';\n\t\t\n\t\t$solar = new Qss_Model_Calendar_Solar();\n\t\t$date = date_create($date);\n\t\t\n\t\t$day = $date->format('d');\n\t\t$month = $date->format('m');\n\t\t$wday = $date->format('w');\n\t\t\n\t\t$quarter = $solar->getQuarter((int) $month);\n\t\t$monthNo = $solar->getMonthNo((int) $month);\n\t\t\n\t\t// Loc theo workcenter\n\t\tif(isset($filter['workcenter']))\n\t\t{\n\t\t\tif(is_array($filter['workcenter']))\n\t\t\t{\n\t\t\t\t$where .= count($filter['workcenter'])?\n\t\t\t\t\tsprintf(' and cm.Ref_DVBT in (%1$s)',implode(',', $filter['workcenter'])):'';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$where .= ($filter['workcenter'])?sprintf(' and cm.Ref_DVBT = %1$d',$filter['workcenter']):'';\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Group: Mac dinh theo cong viec\n\t\tif(isset($filter['group']))\n\t\t{\n\t\t\tswitch ($filter['group'])\n\t\t\t{\n\t\t\t\tcase 'wc':\n\t\t\t\t\t$group = ' GROUP BY cm.Ref_DVBT ';\n\t\t\t\t\t$idField = 'ifnull(cm.Ref_DVBT,0)';\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$group = ' GROUP BY cvbt.Ref_Ten ';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$group = ' GROUP BY cvbt.Ref_Ten ';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$group = ' GROUP BY cvbt.Ref_Ten ';\n\t\t}\n\n\t\t$sql = sprintf('\n\t\t\tSELECT\n\t\t\t\t%8$s AS Work\n\t\t\t\t, sum(ifnull(cvbt.ThoiGian,0)) as ThoiGian\n\t\t\tFROM OBaoTriDinhKy AS cm\n\t\t\tLEFT JOIN OChuKyBaoTri AS ChuKy ON cm.IFID_M724 = ChuKy.IFID_M724\n\t\t\tLEFT JOIN OCongViecBT AS cvbt ON cm.IFID_M724 = cvbt.IFID_M724\n\t\t\tWHERE\n\t\t\t\t(\n\t\t\t\t(ChuKy.KyBaoDuong = \\'D\\' and IFNULL(TIMESTAMPDIFF(DAY,cm.NgayBatDau,%4$s)%%ChuKy.`LapLai`,0) = 0)\n\t\t\t\tor\n\t\t\t\t(ChuKy.KyBaoDuong = \\'W\\' and ChuKy.Thu=%3$d and IFNULL(TIMESTAMPDIFF(WEEK,cm.NgayBatDau,%4$s)%%ChuKy.`LapLai`,0) = 0)\n\t\t\t\tor\n\t\t\t\t(ChuKy.KyBaoDuong = \\'M\\' and ChuKy.Ngay=%1$d and IFNULL(TIMESTAMPDIFF(MONTH,cm.NgayBatDau,%4$s)%%ChuKy.`LapLai`,0) = 0)\n\t\t\t\tor\n\t\t\t\t(ChuKy.KyBaoDuong = \\'Y\\' and ChuKy.Ngay=%1$d and Thang=%2$d and IFNULL(TIMESTAMPDIFF(YEAR,cm.NgayBatDau,%4$s)%%ChuKy.`LapLai`,0) = 0)\n\t\t\t\t/*or cm.IFID_M724 in (select IFID_M724 from OBaoTriTheoNgay where Ngay = %4$s)*/\n\t\t\t\t)\n\t\t\t\tand (%4$s >= cm.NgayBatDau or ifnull(cm.NgayBatDau, 0) = \\'\\')\n\t\t\t\tand (%4$s <= cm.NgayKetThuc or ifnull(cm.NgayKetThuc, 0) = \\'\\')\n\t\t\t\t%6$s\n\t\t\t\t%7$s\n\t\t\tLIMIT 8000'\n\t\t, $day, $month, $wday\n\t\t, $this->_o_DB->quote($date->format('Y-m-d'))\n\t\t, $monthNo, $where, $group, $idField);\n\t\t// echo '<pre>'; echo $sql;die;\n\t\treturn $this->_o_DB->fetchAll($sql);\n\n\t}",
"private function filterRecvParam($p){\n\t\t$lang = $this -> lang;\n\t\t$bikeCatDB = $this -> loadBikeCat();\n\t\t\n\t\tinclude_once (System_Properties::ADMIN_MOD_PATH.'/models/bike/db_selBikeBrand.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/bike/db_selBikeModel.php');\n\t\t\n\t\tinclude_once('default/views/filters/FilterMySQLInt.php');\n\t\tinclude_once('default/views/filters/FilterMySQLMInt.php');\n\t\tinclude_once('default/views/filters/FilterMonth.php');\n\t\tinclude_once('default/views/filters/FilterYear.php');\n\t\tinclude_once('default/views/filters/FilterValidEmail.php');\n\t\tinclude_once('default/views/filters/FilterString100.php');\n\t\tinclude_once('default/views/filters/FilterString20.php');\n\t\tinclude_once('default/views/filters/FilterIsEmptyString.php');\n\t\t\n\t\t$fInt = new FilterMySQLInt();\n\t\t$fMInt = new FilterMySQLMInt();\n\t\t$fMonth = new FilterMonth();\n\t\t$fYear = new FilterYear();\n\t\t$fEMail = new FilterValidEmail();\n\t\t$fString100 = new FilterString100();\n\t\t$fString20 = new FilterString20();\n\t\t$fIsEmptyStr = new FilterIsEmptyString();\n\t\t$bikeBrand = db_selBikeBrand(array('bikeBrandID'=>$p['bikeBrand']\n\t\t\t\t\t\t\t\t\t, 'active' => 1));\n\t\t\n\t\t//Check bikeBrand\n\t\tif (!isset($p['bikeBrand'])\n\t\t\t|| ($bikeBrand == false)\n\t\t\t){\n\t\t\t\t$p['error'] = $lang['ERR_2'];\n\t\t}\n\t\t//Check bikePrice\n\t\telse if (!isset($p['bikePrice']) || ($fInt -> isValid($p['bikePrice']) == false)){\n\t\t\t\t$p['error'] = $lang['ERR_2'];\n\t\t}\n\t\t//Check bikePower\n\t\telse if (!isset($p['bikePower']) || ($fMInt -> isValid($p['bikePower']) == false)){\n\t\t\t\t$p['error'] = $lang['ERR_2'];\t\t\t\t\n\t\t}\n\t\t//Check bikeKM\n\t\telse if (!isset($p['bikeKM']) || ($fMInt -> isValid($p['bikeKM']) == false)){\n\t\t\t\t$p['error'] = $lang['ERR_2'];\n\t\t}\n\t\t//Check bikeEZ\n\t\telse if (!isset($p['bikeEZM']) || !isset($p['bikeEZY'])\n\t\t\t\t|| ($fMonth -> isValid($p['bikeEZM']) == false)\n\t\t\t\t|| ($fYear -> isValid($p['bikeEZY']) == false)){\n\t\t\t\t$p['error'] = $lang['ERR_2'];\n\t\t}\n\t\t//Check userEmail\n\t\telse if ( !isset($p['userEMail']) || $fEMail->filter($p['userEMail']) == false){\n\t\t\t$p['error'] = $lang['ERR_2'];\n\t\t}/*\n\t\t//Check bikeLocPLZ\n\t\telse if ( !isset($p['bikeLocPLZ']) || $fString20->filter($p['bikeLocPLZ']) == false){\n\t\t\t$p['error'] = $lang['ERR_2'];\n\t\t}*/ \t\n\t\t//Check userNName\n\t\telse if (isset($p['userAds']) && ($p['userAds'] == 2) \n\t\t\t\t&& ( !isset($p['userNName']) || ($fString100 -> isValid($p['userNName']) == false)) ){\n\t\t\t$p['error'] = $lang['ERR_2'];\n\t\t}\n\t\t//Check userVName\n\t\telse if (isset($p['userAds']) && ($p['userAds'] == 2) \n\t\t\t\t&& ( !isset($p['userVName']) || ($fString100 -> isValid($p['userVName']) == false)) ){\n\t\t\t$p['error'] = $lang['ERR_2'];\n\t\t}\t\t\n\t\t//Check additional user information, if vendor is a vehicle dealer\n\t\telseif (isset($p['userAds']) && ($p['userAds'] == 1)\n\t\t\t\t&& ($fString100->isValid($p['userFirm']) == false\n\t\t\t\t\t|| $fIsEmptyStr->filter($p['userFirm']) == true)){\n\t\t\t$p['error'] = $lang['ERR_54'];\n\t\t}\n\t\telseif (isset($p['userAds']) && ($p['userAds'] == 1)\n\t\t\t\t&& ($fString100->isValid($p['userTel1']) == false\n\t\t\t\t\t|| $fIsEmptyStr->filter($p['userTel1']) == true)){\n\t\t\t$p['error'] = $lang['ERR_55'];\n\t\t}\n\t\telseif (isset($p['userAds']) && ($p['userAds'] == 1)\n\t\t\t\t&& ($fString20->isValid($p['userPLZ']) == false\n\t\t\t\t\t|| $fIsEmptyStr->filter($p['userPLZ']) == true)){\n\t\t\t$p['error'] = $lang['ERR_56'];\n\t\t}\n\t\telseif (isset($p['userAds']) && ($p['userAds'] == 1)\n\t\t\t\t&& ($fString100->isValid($p['userOrt']) == false\n\t\t\t\t\t|| $fIsEmptyStr->filter($p['userOrt']) == true)){\n\t\t\t$p['error'] = $lang['ERR_57'];\n\t\t}\n\t\telseif (isset($p['userAds']) && ($p['userAds'] == 1)\n\t\t\t\t&& ($fString100->isValid($p['userAdress']) == false\n\t\t\t\t\t|| $fIsEmptyStr->filter($p['userAdress']) == true)){\n\t\t\t$p['error'] = $lang['ERR_58'];\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\t//Include and instantiate diverse filter\n\t\t\tinclude_once('default/views/filters/FilterMySQLSInt.php');\n\t\t\tinclude_once('default/views/filters/FilterMySQLTInt.php');\n\t\t\tinclude_once('default/views/filters/FilterString10.php');\n\t\t\tinclude_once('default/views/filters/FilterString50.php');\n\t\t\tinclude_once('default/views/filters/FilterString1000.php');\n\t\t\t$fSInt = new FilterMySQLSInt();\n\t\t\t$fTInt = new FilterMySQLTInt();\n\t\t\t$fString10 = new FilterString10();\n\t\t\t$fString50 = new FilterString50();\n\t\t\t$fString1000 = new FilterString1000();\n\t\t\t\n\t\t\t$p['bikeBrandID'] = $bikeBrand[0]['bikeBrandID'];\n\t\t\t\n\t\t\t//Check Model\n\t\t\t$p['bikeModelTxt'] = null;\n\t\t\tif (isset($p['bikeModel']) && ($p['bikeModel'] != -1)){\t\t\t\t\n\t\t\t\t$bikeModel = db_selBikeModel(array(\t'bikeBrandID' => $bikeBrand[0]['bikeBrandID'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'bikeModelID' => $p['bikeModel'])\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\tif(($bikeModel != false) && is_array($bikeModel) && (count($bikeModel) > 0)){\n\t\t\t\t\t$bikeModel = $bikeModel[0];\n\t\t\t\t\t$p['bikeModelTxt'] = $bikeModel['bikeModelName'];\n\t\t\t\t\t$p['bikeModelID'] = $bikeModel['bikeModelID'];\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$p['bikeModel'] = -1;\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($p['bikeModelVar'])){\n\t\t\t\t$p['bikeModelVar'] = $fString100 -> filter($p['bikeModelVar']);\n\t\t\t}else{\n\t\t\t\t$p['bikeModelVar'] = '';\n\t\t\t}\n\t\t\t\n\t\t\t$p['bikeBrandTxt'] = $bikeBrand[0]['brandName'];\n\t\t\t\n\t\t\tif(!isset($p['bikePriceType']) || ($p['bikePriceType'] == null)){\n\t\t\t\t$p['bikePriceType'] = 0;\n\t\t\t}else{\n\t\t\t\t$p['bikePriceType'] = $fTInt->filter($p['bikePriceType']);\n\t\t\t}\n\t\t\t\n\t\t\tif (!isset($p['bikePriceCurr']) || ($p['bikePriceCurr'] == null)){\n\t\t\t\t$p['bikePriceCurr'] = 0;\n\t\t\t}else{\n\t\t\t\t$p['bikePriceCurr'] = $fTInt->filter($p['bikePriceCurr']);\n\t\t\t\tif (!isset($lang['TXT_74'][$p['bikePriceCurr']])){\n\t\t\t\t\t$p['bikePriceCurr'] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//MwSt\n\t\t\tif(isset($p['mwst']) && ($p['mwst'] !== '0')){\n\t\t\t\t$p['mwst'] = 1;\n\t\t\t}\n\t\t\tif(isset($p['mwstSatz']) && isset($lang['V_MWST']) && is_array($lang['V_MWST'])){\n\t\t\t\t$p['mwstSatz'] = str_replace(',', '.', $p['mwstSatz']);\n\t\t\t\tif(!in_array($p['mwstSatz'], $lang['V_MWST']) && ($p['mwst'] === '0')){\n\t\t\t\t\t$p['mwstSatz'] = 19;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($p['bikePowerType']) || ($p['bikePowerType'] == null)){\n\t\t\t\t$p['bikePowerType'] = 0;\n\t\t\t}else{\n\t\t\t\t$p['bikePowerType'] = $fMInt->filter($p['bikePowerType']);\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($p['bikeKMType']) || ($p['bikeKMType'] == null)){\n\t\t\t\t$p['bikeKMType'] = 0;\n\t\t\t}else{\n\t\t\t\t$p['bikeKMType'] = $fTInt->filter($p['bikeKMType']);\n\t\t\t\tif (!isset($lang['TXT_75'][$p['bikeKMType']])){\n\t\t\t\t\t$p['bikeKMType'] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tif (isset($p['bikeHSN'])){\n\t\t\t\t$p['bikeHSN'] = $fString10 -> filter($p['bikeHSN']);\n\t\t\t}\n\t\t\n\t\t\tif (isset($p['bikeTSN'])){\n\t\t\t\t$p['bikeTSN'] = $fString10 -> filter($p['bikeTSN']);\n\t\t\t}\n\t\t\n\t\t\tif (isset($p['bikeFIN'])){\n\t\t\t\t$p['bikeFIN'] = $fString20 -> filter($p['bikeFIN']);\n\t\t\t}\n\t\t\t\t\n\t\t\tif(!isset($p['bikeTUVM']) || ($p['bikeTUVM'] == null)){\n\t\t\t\t$p['bikeTUVM'] = 1;\n\t\t\t}else{\n\t\t\t\t$p['bikeTUVM'] = $fMonth->filter($p['bikeTUVM']);\t\t\n\t\t\t}\t\t\n\t\t\tif(!isset($p['bikeTUVY']) || ($p['bikeTUVY'] == null)){\n\t\t\t\t$p['bikeTUVY'] = date('Y');\n\t\t\t}else{\t\t\t\t\t\n\t\t\t\t$p['bikeTUVY'] = $fYear->filter($p['bikeTUVY']);\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif(!isset($p['bikeAUM']) || ($p['bikeAUM'] == null)){\n\t\t\t\t$p['bikeAUM'] = 1;\n\t\t\t}else{\n\t\t\t\t$p['bikeAUM'] = $fMonth->filter($p['bikeAUM']);\n\t\t\t}\n\t\t\tif(!isset($p['bikeAUY']) || ($p['bikeAUY'] == null)){\n\t\t\t\t$p['bikeAUY'] = date('Y');\n\t\t\t}else{\n\t\t\t\t$p['bikeAUY'] = $fYear->filter($p['bikeAUY']);\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($p['bikeShift']) || ($p['bikeShift'] == null)){\n\t\t\t\t$p['bikeShift'] = -1;\n\t\t\t}else{\n\t\t\t\t$p['bikeShift'] = $fTInt->filter($p['bikeShift']);\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($p['bikeWeight']) || ($p['bikeWeight'] == null)){\n\t\t\t\t$p['bikeWeight'] = 0;\n\t\t\t}else{\n\t\t\t\t$p['bikeWeight'] = $fMInt->filter($p['bikeWeight']);\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($p['bikeCyl']) || ($p['bikeCyl'] == null)){\n\t\t\t\t$p['bikeCyl'] = 0;\n\t\t\t}else{\n\t\t\t\t$p['bikeCyl'] = $fTInt->filter($p['bikeCyl']);\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($p['bikeCub']) || ($p['bikeCub'] == null)){\n\t\t\t\t$p['bikeCub'] = 0;\n\t\t\t}else{\n\t\t\t\t$p['bikeCub'] = $fSInt->filter($p['bikeCub']);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t$p['bikeUseIn'] = $fString50->filter($p['bikeUseIn']);\n\t\t\t$p['bikeUseOut'] = $fString50->filter($p['bikeUseOut']);\n\t\t\t$p['bikeCO2'] = $fString50->filter($p['bikeCO2']);\n\t\t\t\n\t\t\tif(!isset($p['bikeState']) || ($p['bikeState'] == null)){\n\t\t\t\t$p['bikeState'] = -1;\n\t\t\t}else{\n\t\t\t\t$p['bikeState'] = $fTInt->filter($p['bikeState']);\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($p['bikeCat']) || ($p['bikeCat'] == null)){\n\t\t\t\t$p['bikeCat'] = -1;\n\t\t\t}else{\n\t\t\t\t$found = false;\n\t\t\t\t$p['bikeCat'] = $fTInt->filter($p['bikeCat']);\n\t\t\t\tforeach ($bikeCatDB as $key=>$kVal){\n\t\t\t\t\tif ($kVal['bikeCatID'] == $p['bikeCat']){\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($found == false){\n\t\t\t\t\t$p['bikeCat'] = -1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($p['bikeFuel']) || ($p['bikeFuel'] == null)){\n\t\t\t\t$p['bikeFuel'] = -1;\n\t\t\t}else{\n\t\t\t\t$p['bikeFuel'] = $fTInt->filter($p['bikeFuel']);\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($p['bikeClr']) || ($p['bikeClr'] == null)){\n\t\t\t\t$p['bikeClr'] = -1;\n\t\t\t}else{\n\t\t\t\t$p['bikeClr'] = $fTInt->filter($p['bikeClr']);\n\t\t\t}\n\t\t\tif(isset($p['bikeClrMet'])){\n\t\t\t\t$p['bikeClrMet'] = '1';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$p['bikeClrMet'] = '0';\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($p['bikeEmissionNorm']) || ($p['bikeEmissionNorm'] == null)){\n\t\t\t\t$p['bikeEmissionNorm'] = -1;\n\t\t\t}else{\n\t\t\t\t$p['bikeEmissionNorm'] = $fTInt->filter($p['bikeEmissionNorm']);\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($p['bikeEcologicTag']) || ($p['bikeEcologicTag'] == null)){\n\t\t\t\t$p['bikeEcologicTag'] = -1;\n\t\t\t}else{\n\t\t\t\t$p['bikeEcologicTag'] = $fTInt->isValid($p['bikeEcologicTag']);\n\t\t\t}\n\t\t\t\n\t\t\t$p['bikeDesc'] = $fString1000->filter($p['bikeDesc']);\n\t\t\t\n\t\t\tif(!isset($p['userAds']) || ($p['userAds'] == null) || ($p['userAds'] == -1)){\n\t\t\t\t$p['userAds'] = -1;\n\t\t\t}else{\n\t\t\t\tif (!isset($lang['TXT_33'][$p['userAds']])){\n\t\t\t\t\t$p['userAds'] = -1;\n\t\t\t\t\t//$p['userAds'] = $fTInt->isValid($p['userAds']);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//check userFirm\n\t\t\tisset($p['userFirm']) ? $p['userFirm'] = $fString100->filter($p['userFirm']) : $p['userFirm'] = '';\n\t\t\t\n\t\t\t//check userNName\n\t\t\tisset($p['userNName']) ? $p['userNName'] = $fString100->filter($p['userNName']) : $p['userNName'] = '';\n\t\t\t\n\t\t\t//check userVName\n\t\t\tisset($p['userVName']) ? $p['userVName'] = $fString100->filter($p['userVName']) : $p['userVName'] = '';\n\t\t\t\n\t\t\t//userPLZ\n\t\t\tisset($p['userPLZ']) ? $p['userPLZ'] = $fString20->filter($p['userPLZ']) : $p['userPLZ'] = '';\n\t\t\t\n\t\t\t//userOrt\n\t\t\tisset($p['userOrt']) ? $p['userOrt'] = $fString100->filter($p['userOrt']) : $p['userOrt'] = '';\n\t\t\t\n\t\t\t//userTel1\n\t\t\tisset($p['userTel1']) ? $p['userTel1'] = $fString100->filter($p['userTel1']) : $p['userTel1'] = '';\n\t\t\t\n\t\t\t//userTel2\n\t\t\tisset($p['userTel2']) ? $p['userTel2'] = $fString100->filter($p['userTel2']) : $p['userTel2'] = '';\n\t\t\t\n\t\t\t//userAdress\n\t\t\tisset($p['userAdress']) ? $p['userAdress'] = $fString100->filter($p['userAdress']) : $p['userAdress'] = '';;\n\t\t\t\n\t\t\t//check bikeLocOrt\n\t\t\t//isset($p['bikeLocOrt']) ? $p['bikeLocOrt'] = $fString100->filter($p['bikeLocOrt']) : $p['bikeLocOrt'] = '';\n\t\t\tif ( isset($p['bikeLocPLZ']) ){\n\t\t\t\t$p['bikeLocPLZ'] = $fString20->filter($p['bikeLocPLZ']);\n\t\t\t}\n\t\t\t\n\t\t\t//Check bikeLocOrt\n\t\t\tif ( isset($p['bikeLocOrt']) ){\n\t\t\t\t$p['bikeLocOrt'] = $fString100->filter($p['bikeLocOrt']);\n\t\t\t}\n\t\t\t\n\t\t\t//Check bikeLocCountry\n\t\t\tif ( !isset($p['bikeLocCountry']) || !isset($lang['COUNTRY'][$p['bikeLocCountry']])){\n\t\t\t\t$p['bikeLocCountry'] = 'DE';\n\t\t\t}\n\t\t\t\n\t\t\t//check userAdsLength\n\t\t\tif (!isset($p['userAdsLength']) || !in_array($p['userAdsLength'], $lang['USER_ADS_LENGTH']) ){\n\t\t\t\t$p['userAdsLength'] = $lang['USER_ADS_LENGTH'][count($lang['USER_ADS_LENGTH'])-1];\n\t\t\t}\n\t\t\t\n\t\t\t//Bike Extra\n\t\t\t$bikeExt = '';\n\t\t\tif (isset($p['bikeExt'])){\n\t\t\t\tinclude_once (System_Properties::ADMIN_MOD_PATH.'/models/bike/db_selBikeExt.php');\t\t\t\n\t\t\t\t$bikeExt = db_selBikeExt(array('vextID'=>$p['bikeExt']));\n\t\t\t}\n\t\t\t$p['bikeExtDB'] = $bikeExt;\n\t\t}\n\t\treturn $p;\n\t}",
"function fill_form_fp_plan($gml_id) {\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\t\" . \n\t\t\t\t\"'\" . $this->trim_gml_prefix_if_exists($gml_id) . \"'::text::uuid AS plan_gml_id,\n\t\t\t\tgmlas.xplan_name AS name,\n\t\t\t\tgmlas.nummer AS nummer,\n\t\t\t\tgmlas.internalid AS internalid,\n\t\t\t\tgmlas.beschreibung AS beschreibung,\n\t\t\t\tgmlas.kommentar AS kommentar,\n\t\t\t\tto_char(gmlas.technherstelldatum, 'DD.MM.YYYY') AS technherstelldatum,\n\t\t\t\tto_char(gmlas.genehmigungsdatum, 'DD.MM.YYYY') AS genehmigungsdatum,\n\t\t\t\tto_char(gmlas.untergangsdatum, 'DD.MM.YYYY') AS untergangsdatum,\n\t\t\t\tCASE WHEN vpa.planname IS NOT NULL OR vpa.rechtscharakter IS NOT NULL OR vpa.nummer IS NOT NULL OR vpa.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpa.planname, vpa.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpa.nummer, vpa.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS aendert,\n\t\t\t\tCASE WHEN vpwgv.planname IS NOT NULL OR vpwgv.rechtscharakter IS NOT NULL OR vpwgv.nummer IS NOT NULL OR vpwgv.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpwgv.planname, vpwgv.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpwgv.nummer, vpwgv.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS wurdegeaendertvon,\n\t\t\t\tgmlas.erstellungsmassstab AS erstellungsmassstab,\n\t\t\t\tgmlas.bezugshoehe AS bezugshoehe,\n\t\t\t\tst_assvg(st_transform(gmlas.raeumlichergeltungsbereich,\". $this->epsg .\"), 0, 8) AS newpath,\n\t\t\t\tst_astext(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\")) AS newpathwkt,\n\t\t\t\tCASE WHEN vm.xp_verfahrensmerkmal_vermerk IS NOT NULL OR vm.xp_verfahrensmerkmal_datum IS NOT NULL OR vm.xp_verfahrensmerkmal_signatur IS NOT NULL OR vm.xp_verfahrensmerkmal_signiert IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vm.xp_verfahrensmerkmal_vermerk, vm.xp_verfahrensmerkmal_datum, vm.xp_verfahrensmerkmal_signatur, vm.xp_verfahrensmerkmal_signiert)]::xplan_gml.xp_verfahrensmerkmal[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS verfahrensmerkmale,\n\t\t\t\tCASE\n\t\t\t\t\tWHEN count_externeref > 0\n\t\t\t\t\tTHEN array_to_json(externeref.externereferenz)\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS externereferenz,\n\t\t\t\tarray_to_json(ARRAY[to_char(aled.value, 'DD.MM.YYYY')]::date[]) AS auslegungsenddatum,\n\t\t\t\tarray_to_json(ARRAY[(g.ags,g.rs,g.gemeindename,g.ortsteilname)]::xplan_gml.xp_gemeinde[]) AS gemeinde,\n\t\t\t\tto_json((gmlas.status_codespace, gmlas.status, NULL)::xplan_gml.fp_status) AS status,\n\t\t\t\tgmlas.sachgebiet AS sachgebiet,\n\t\t\t\tto_json((pg.name, pg.kennziffer)::xplan_gml.xp_plangeber) AS plangeber,\n\t\t\t\tgmlas.rechtsstand::xplan_gml.fp_rechtsstand AS rechtsstand,\n\t\t\t\tto_char(gmlas.wirksamkeitsdatum, 'DD.MM.YYYY') AS wirksamkeitsdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(alsd.value, 'DD.MM.YYYY')]::date[]) AS auslegungsstartdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbsd.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsstartdatum,\n\t\t\t\tto_char(gmlas.entwurfsbeschlussdatum, 'DD.MM.YYYY') AS entwurfsbeschlussdatum,\n\t\t\t\tto_char(gmlas.aenderungenbisdatum, 'DD.MM.YYYY') AS aenderungenbisdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbed.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsenddatum,\n\t\t\t\tgmlas.verfahren::xplan_gml.fp_verfahren AS verfahren,\n\t\t\t\t(gmlas.sonstplanart_codespace, gmlas.sonstplanart, NULL)::xplan_gml.fp_sonstplanart AS sonstplanart,\n\t\t\t\tgmlas.planart::xplan_gml.fp_planart AS planart,\n\t\t\t\tto_char(gmlas.planbeschlussdatum, 'DD.MM.YYYY') AS planbeschlussdatum,\n\t\t\t\tto_char(gmlas.aufstellungsbeschlussdatum, 'DD.MM.YYYY') AS aufstellungsbeschlussdatum\n\t\t\tFROM\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan gmlas LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_gemeinde gemeindelink ON gmlas.id = gemeindelink.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_gemeinde g ON gemeindelink.xp_gemeinde_pkid = g.ogr_pkid LEFT JOIN\n\t\t\t\t(\n\t\t\t\t\tSElECT\n\t\t\t\t\t\tCOUNT(*) AS count_externeref,\n\t\t\t\t\t\texternereferenzlink_sub.parent_id,\n\t\t\t\t\t\tarray_agg((e_sub.georefurl,\n\t\t\t\t\t\t\t\t(e_sub.georefmimetype_codespace, e_sub.georefmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.art::xplan_gml.xp_externereferenzart,\n\t\t\t\t\t\t\t\te_sub.informationssystemurl,\n\t\t\t\t\t\t\t\te_sub.referenzname,\n\t\t\t\t\t\t\t\te_sub.referenzurl,\n\t\t\t\t\t\t\t\t(e_sub.referenzmimetype_codespace, e_sub.referenzmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.beschreibung,\n\t\t\t\t\t\t\t\tto_char(e_sub.datum, 'DD.MM.YYYY'),\n\t\t\t\t\t\t\t\te_sub.typ::xplan_gml.xp_externereferenztyp\n\t\t\t\t\t\t\t)::xplan_gml.xp_spezexternereferenz) AS externereferenz\n\t\t\t\t\tFROM\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_externereferenz externereferenzlink_sub LEFT JOIN\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".xp_spezexternereferenz e_sub ON externereferenzlink_sub.xp_spezexternereferenz_pkid = e_sub.ogr_pkid\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\texternereferenzlink_sub.parent_id\n\t\t\t\t) externeref ON gmlas.id = externeref.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_aendert_aendert aendertlink ON gmlas.id = aendertlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".aendert aendertlinktwo ON aendertlink.child_pkid = aendertlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpa ON aendertlinktwo.xp_verbundenerplan_pkid = vpa.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_wurdegeaendertvon_wurdegeaendertvon wurdegeaendertvonlink ON gmlas.id = wurdegeaendertvonlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".wurdegeaendertvon wurdegeaendertvonlinktwo ON wurdegeaendertvonlink.child_pkid = wurdegeaendertvonlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpwgv ON wurdegeaendertvonlinktwo.xp_verbundenerplan_pkid = vpwgv.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_verfahrensmerkmale_verfahrensmerkmale verfahrensmerkmalelink ON gmlas.id = verfahrensmerkmalelink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".verfahrensmerkmale vm ON verfahrensmerkmalelink.child_pkid = vm.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_plangeber pg ON gmlas.plangeber_xp_plangeber_pkid = pg.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_auslegungsstartdatum alsd ON gmlas.id = alsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_auslegungsenddatum aled ON gmlas.id = aled.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_traegerbeteiligungsstartdatum tbsd ON gmlas.id = tbsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_traegerbeteiligungsenddatum tbed ON gmlas.id = tbed.parent_id\n\t\t\tWHERE\n\t\t\t\tgmlas.id ='\" . $gml_id . \"'\n\t\t\t;\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$result = pg_fetch_assoc($ret[1]);\n\t\treturn $result;\n\t}",
"public function testAddPackingPlanFile()\n {\n }",
"public function testAddPackingPlanTag()\n {\n }",
"function loadSurfersComplex($filter, $order = NULL, $by = NULL,\n $limit = NULL, $offset = NULL) {\n $results = array();\n $sql = 'SELECT surfer_id,\n surfer_handle,\n surfer_givenname,\n surfer_surname,\n surfer_registration\n FROM %s %s %s';\n\n $condition = str_replace('%', '%%', $this->databaseGetSQLCondition($filter));\n if ($condition) {\n $condition = 'WHERE ' . $condition;\n } else {\n $condition = '';\n }\n if ($order != NULL) {\n $by = ($by == NULL || $by != 'DESC') ? 'ASC' : 'DESC';\n $order = sprintf(' ORDER BY %s %s', $order, $by);\n } else {\n $order = '';\n }\n\n $params = array($this->tableSurfer, $condition, $order);\n if ($res = $this->databaseQueryFmt($sql, $params, $limit, $offset)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $results[$row['surfer_id']] = $row;\n }\n\n $this->surfersAbsCount = $res->absCount();\n }\n\n return $results;\n }",
"public function listar_salidas_detalle($filter,$filter_not,$order_by=\"\",$number_items='',$offset=''){\n if($this->entidad=='01'){\n $filtroinicio = \"\";\n $filtrofinal = \"\";\n $filtroorden = \"\";\n $filtroot = \"\";\n $filtroserie = \"\";\n $filtronumero = \"\";\n $filtrolinea_not = \"\";\n if(isset($filter->codot) && $filter->codot!=''){\n if(is_array($filter->codot) && count($filter->codot)>0){\n $interv = 20;\n for($i=0;$i<ceil(count($filter->codot)/$interv);$i++){\n $arrcodot = array_slice($filter->codot,$i*$interv,$interv);\n $filtroot .= ($i==0?\"and (\":\"or\").\" k.codot in ('\".str_replace(\",\",\"','\",implode(',',$arrcodot)).\"')\";\n }\n $filtroot .= \")\";\n }\n else{\n $filtroot = \"and k.codot='\".$filter->codot.\"'\"; \n }\n }\n if(isset($filter->fechai) && $filter->fechai!='') $filtroinicio = \"and k.Fecha >= CTOD('\".date_dbf($filter->fechai).\"') \";\n if(isset($filter->fechaf) && $filter->fechaf!='') $filtrofinal = \"and k.Fecha <= CTOD('\".date_dbf($filter->fechaf).\"') \";\n if(isset($filter->serie) && $filter->serie!='') $filtroserie = \"and k.Serie = '\".$filter->serie.\"'\";\n if(isset($filter->numero) && $filter->numero!='') $filtronumero = \"and k.Numero = '\".$filter->numero.\"'\";\n if(isset($filter_not->linea) && $filter_not->linea!=''){\n if(is_array($filter_not->linea) && count($filter_not->linea)>0){\n $interv = 20;\n for($i=0;$i<ceil(count($filter_not->linea)/$interv);$i++){\n $arrlinea = array_slice($filter_not->linea,$i*$interv,$interv);\n $filtrolinea_not .= ($i==0?\"and \":\" and\").\" SUBSTR(k.Codigo,1,4) not in ('\".str_replace(\",\",\"','\",implode(',',$arrlinea)).\"')\";\n }\n }\n else{\n $filtrolinea_not = \"and SUBSTR(k.Codigo,1,4)!='\".$filter_not->linea.\"'\"; \n }\n } \n if(isset($order_by) && count($order_by)>0 && $order_by!=\"\"){\n $cad = \"\";\n foreach($order_by as $indice=>$value){\n $cad = $cad .\",\".$value;\n }\n $cad = substr($cad,1,strlen($cad)-1);\n $filtroorden = \"order by \".$cad; \n } \n $cadena = \"\n select \n k.codot,\n k.Moneda,\n k.Preprom,\n k.Cantidad,\n k.Tcambio,\n k.Codigo,\n k.Fecha,\n k.Tip_movmto,\n k.Documento,\n k.Serie,\n k.Numero,\n k.peso_total,\n k.Numero,\n k.Serreq,\n k.Numreq\n from kardex as k \n where ((k.Tip_movmto='S' AND k.Documento='G') OR ( k.Tip_movmto='I' AND k.Documento='DV')) \n \".$filtroot.\"\n \".$filtroinicio.\"\n \".$filtrofinal.\"\n \".$filtroserie.\"\n \".$filtronumero.\" \n \".$filtrolinea_not.\"\n \".$filtroorden.\"\n \";\n $query = $this->dbase->query($cadena);\n $resultado = $query->result();\n }\n elseif($this->entidad=='02'){\n $this->db->select('*');\n $this->db->from($this->table,$number_items,$offset);\n $this->db->where('CodEnt',$this->entidad);\n $this->db->where_in('TipOt',$tipOt);\n $this->db->where_not_in('Estado','A');\t\t\n $this->db->order_by('NroOt','desc');\n $query = $this->db->get();\n $resultado = array();\n if($query->num_rows>0){\n $resultado = $query->result();\n } \n }\n return $resultado;\n }",
"protected function openFilterDialog() {\n $assert_session = $this->assertSession();\n $page = $this->getSession()->getPage();\n $dropbutton = $page->find('css', '.views-ui-display-tab-bucket.filter .dropbutton-toggle button');\n $dropbutton->click();\n $add_link = $page->findById('views-rearrange-filter');\n $this->assertTrue($add_link->isVisible(), 'And/Or Rearrange button found.');\n $add_link->click();\n $assert_session->assertWaitOnAjaxRequest();\n }",
"public function plan_list( $count = 10, $offset = 0 ) {\r\n\t\t$params['count'] = $count;\r\n\t\t$params['offset'] = $offset;\r\n\t\t$vars = http_build_query( $params, NULL, '&' );\r\n\t\t\r\n\t\treturn $this->_send_request( 'plans?'.$vars );\r\n\t}",
"public function filtro3pack(Request $request) {\r\n\r\n if ($request->all() == []) {\r\n $response = [\r\n 'msj' => 'Debe seleccionar algun criterio de busqueda (Recibe: rubro, SubRubro1, SubRubro2)',\r\n ];\r\n\r\n return response()->json($response, 401);\r\n\r\n } else {\r\n\r\n $busqueda_rubro = $request->rubro;\r\n $busqueda_SubRubro1 = $request->subRubroA;\r\n $busqueda_SubRubro2 = $request->subRubroB;\r\n $result = [];\r\n\r\n\r\n $sql = \"SELECT * FROM tb_productos where fk_idSatate != 3 \";\r\n\r\n if (! is_null($busqueda_rubro)) {\r\n //$f1 = Producto::where('rubro', $busqueda_rubro)->where('fk_idSatate','!=','3')->groupBy('Agrupacion')->get();\r\n $sql = $sql.\" and rubro = '\".$busqueda_rubro.\"' \";\r\n /*DB::connection('mysql')->select($sql);\r\n foreach ($f1 as $f) {\r\n $result[] = $f;\r\n }*/\r\n }\r\n\r\n if (! is_null($busqueda_SubRubro1)) {\r\n //$f2 = Producto::where('SubRubro1', $busqueda_SubRubro1)->where('fk_idSatate','!=','3')->groupBy('Agrupacion')->get();\r\n\r\n $sql = $sql.\" and SubRubro1 = '\".$busqueda_SubRubro1.\"' \";\r\n\r\n /* foreach ($f2 as $f) {\r\n $result[] = $f;\r\n }*/\r\n\r\n }\r\n\r\n if (! is_null($busqueda_SubRubro2)) {\r\n //$f3 = Producto::where('SubRubro2', $busqueda_SubRubro2)->where('fk_idSatate','!=','3')->groupBy('Agrupacion')->get();\r\n $sql = $sql.\" and SubRubro2 = '\".$busqueda_SubRubro2.\"' \";\r\n\r\n /*foreach ($f3 as $f) {\r\n $result[] = $f;\r\n }*/\r\n }\r\n\r\n $sql = $sql.\" group by Agrupacion \";\r\n\r\n $result_unico = DB::connection('mysql')->select($sql);\r\n\r\n $result = $this->getAgrupation($result_unico);\r\n\r\n\r\n //$result_unico = array_unique($result);\r\n\r\n\r\n $response = [\r\n 'msj' => 'Lista de productos',\r\n 'productos' => $result,\r\n ];\r\n\r\n return response()->json($response, 201);\r\n\r\n\r\n }\r\n\r\n }",
"public function listPlans()\n\t{\n\t\t\n\t\t/* If 1.4 and no backward, then leave */\n\t\tif (!$this->backward)\n\t\t\treturn;\n\t\t\t\n\t include_once(dirname(__FILE__).'/lib/Stripe.php');\n\t\t\\Stripe\\Stripe::setApiKey(Configuration::get('STRIPE_MODE') ? Configuration::get('STRIPE_PRIVATE_KEY_LIVE') : Configuration::get('STRIPE_PRIVATE_KEY_TEST'));\n\n\t\t/* Try to process the capture and catch any error message */\n\t\ttry\n\t\t{\n\t\t\t$result_json = \\Stripe\\Plan::all();\n\t\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\n\t\t\t$this->_errors['stripe_subscription_error'] = $e->getMessage();\n\t\t\tif (class_exists('Logger'))\n\t\t\t\tLogger::addLog($this->l('Stripe - Plans list update failed').' '.$e->getMessage(), 1, null, 'Customer', (int)Tools::getIsset('id_customer'), true);\n\t\t}\n\t\t\n\t\tif(!isset($this->_errors['stripe_subscription_error'])){\n\t\t\tDb::getInstance()->Execute('TRUNCATE TABLE '._DB_PREFIX_.'stripepro_plans');\n\t\t\tfor($i=0;$i<count($result_json->data); $i++){\n\t\t\t Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'stripepro_plans (`stripe_plan_id`, `name`, `interval`, `amount`, `currency`, `interval_count`, `trial_period_days`) VALUES (\\''.$result_json->data[$i]->id.'\\', \\''.$result_json->data[$i]->name.'\\', \\''.$result_json->data[$i]->interval.'\\','.sprintf(\"%.2f\", $result_json->data[$i]->amount / 100).', \\''.$result_json->data[$i]->currency.'\\', '.(int)$result_json->data[$i]->interval_count.','.(int)$result_json->data[$i]->trial_period_days.')');\n\t\t\t }\n\t\t\t}\n\t\n\treturn true;\n\t\n\t}",
"public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }",
"public function actioncheckPlanMot()\n\t{\n\t $valores=OperaCodep::getEp();\n $codigobarco=$valores['barco'];\n $codofi=$valores['ofic'];\n //var_dump($codigobarco);var_dump($codofi);die();\n if(!is_null($codigobarco)){\n $model=new OperaPlanes('search_por_mot');\n\t\t$model->unsetAttributes(); // clear any default values\n\t\tif(isset($_GET['OperaPlanes']))\n\t\t\t$model->attributes=$_GET['OperaPlanes'];\n\n\t\t$this->render('admin_por_mot',array(\n\t\t\t'model'=>$model,'codep'=>$codigobarco,'codof'=>$codofi\n\t\t));\n }else{\n $this->render('reject',array(\n\t\t\t'model'=>$model,\n\t\t)); \n }\n \n\t}",
"abstract protected function getFilters();",
"public static function getAll($filter) {\n global $lC_Database, $lC_Language;\n\n $media = $_GET['media'];\n \n $filterArray = lC_Templates_modules_layout_Admin::getFilterArray($filter);\n\n $Qlayout = $lC_Database->query('select b2p.*, b.title as box_title from :table_templates_boxes_to_pages b2p, :table_templates_boxes b where b2p.templates_id = :templates_id and b2p.templates_boxes_id = b.id and b.modules_group = :modules_group order by b2p.page_specific desc, b2p.boxes_group, b2p.sort_order, b.title');\n $Qlayout->bindTable(':table_templates_boxes_to_pages', TABLE_TEMPLATES_BOXES_TO_PAGES);\n $Qlayout->bindTable(':table_templates_boxes', TABLE_TEMPLATES_BOXES);\n $Qlayout->bindInt(':templates_id', $filterArray['filter_id']);\n $Qlayout->bindValue(':modules_group', $_GET['set']);\n $Qlayout->execute();\n\n $result = array('aaData' => array());\n $result['filterArray'] = $filterArray;\n while ( $Qlayout->next() ) {\n $check = '<td><input class=\"batch\" type=\"checkbox\" name=\"batch[]\" value=\"' . $Qlayout->valueInt('id') . '\" id=\"' . $Qlayout->valueInt('id') . '\"></td>';\n $modules = '<td>' . $Qlayout->value('box_title') . '</td>';\n $pages = '<td>' . $Qlayout->value('content_page') . '</td>';\n $specific = '<td>' . (($Qlayout->valueInt('page_specific') === 1) ? '<span class=\"icon-tick icon-green icon-size2\">' : '<span class=\"icon-cross icon-red icon-size2\">') . '</span></td>';\n $group = '<td>' . (($Qlayout->value('boxes_group') == 'left') ? '<small class=\"tag red-bg\">' . $Qlayout->value('boxes_group') : (($Qlayout->value('boxes_group') != 'left') ? '<small class=\"tag orange-bg\">' . $Qlayout->value('boxes_group') : '<small class=\"tag\">' . $Qlayout->value('boxes_group'))) . '</small></td>';\n $sort = '<td>' . $Qlayout->valueInt('sort_order') . '</td>';\n $action = '<td class=\"align-right vertical-center\"><span class=\"button-group compact\">\n <a href=\"' . ((int)($_SESSION['admin']['access']['templates_modules_layout'] < 3) ? '#' : 'javascript://\" onclick=\"editModule(\\'' . $Qlayout->valueInt('id') . '\\')') . '\" class=\"button icon-pencil' . ((int)($_SESSION['admin']['access']['templates_modules_layout'] < 3) ? ' disabled' : NULL) . '\">' . (($media === 'mobile-portrait' || $media === 'mobile-landscape') ? NULL : $lC_Language->get('icon_edit')) . '</a>\n <a href=\"' . ((int)($_SESSION['admin']['access']['templates_modules_layout'] < 4) ? '#' : 'javascript://\" onclick=\"deleteModule(\\'' . $Qlayout->valueInt('id') . '\\', \\'' . urlencode($Qlayout->valueProtected('box_title')) . '\\')') . '\" class=\"button icon-trash with-tooltip' . ((int)($_SESSION['admin']['access']['templates_modules_layout'] < 4) ? ' disabled' : NULL) . '\" title=\"' . $lC_Language->get('icon_delete') . '\"></a>\n </span></td>';\n\n $result['aaData'][] = array(\"$check\", \"$modules\", \"$pages\", \"$specific\", \"$group\", \"$sort\", \"$action\");\n $result['entries'][] = $Qlayout->toArray();\n }\n\n $Qlayout->freeResult();\n\n return $result;\n }",
"public function buscarPorFiltros($filters, $personalShopper = 0) {\n// echo \"<pre>\";\n// print_r($filters);\n// echo \"</pre>\";\n// Yii::app()->end();\n\n $criteria = new CDbCriteria;\n \n $criteria->with = array();\n //$criteria->select = array();\n //$criteria->select[] = \"t.*\";\n \n $havingPrecio = '';\n \n for ($i = 0; $i < count($filters['fields']); $i++) {\n \n $column = $filters['fields'][$i];\n $value = $filters['vals'][$i];\n $comparator = $filters['ops'][$i];\n \n if($i == 0){\n $logicOp = 'AND'; \n }else{ \n $logicOp = $filters['rels'][$i-1]; \n } \n \n if($column == 'campana')\n {\n \n $value = ($comparator == '=') ? \"=\".$value.\"\" : $value;\n \n $criteria->compare('campana.nombre', $value,\n true, $logicOp);\n \n \n $criteria->with[] = 'campana';\n \n \n continue;\n }\n \n if($column == 'precio')\n {\n $criteria->addCondition('(select sum(precios.precioDescuento) from `tbl_look_has_producto` `productos_productos`, `tbl_producto` `productos`, `tbl_precio` `precios` \n where `t`.`id`=`productos_productos`.`look_id` and `productos`.`id`=`productos_productos`.`producto_id` and \n `precios`.`tbl_producto_id`=`productos`.`id`) '\n .$comparator.' '.$value.'', $logicOp); \n \n \n continue;\n } \n \n if($column == 'marca')\n { \n \n $criteria->with['productos'] = array(\n 'select'=> false,\n //'joinType'=>'INNER JOIN',\n //'condition'=>'productos.nombres = 8',\n ); \n \n //having\n if(!strpos($criteria->group, \"t.id\")){\n $criteria->group = 't.id';\n }\n \n //agregar condicion marca_id\n $criteria->addCondition('productos.marca_id'\n .$comparator.' '.$value.'', $logicOp); \n \n continue;\n } \n \n if($column == 'prendas')\n {\n $criteria->addCondition('(select count(look_id) \n from `tbl_look_has_producto` `productos_productos`\n where `t`.`id`=`productos_productos`.`look_id`)'\n .$comparator.' '.$value.'', $logicOp);\n \n continue; \n } \n \n if($column == 'cantidad')\n {\n /*\n * Por cada orden se esta contando el look como vendido una \n * sola vez asi aparezca dos veces en la misma orden\n * \n * Luego se debe corregir para que cuente correctamente si \n * el look ha sido pedido mas de una vez en una orden\n */\n \n $criteria->addCondition('\n (select count(distinct(orden.id)) from tbl_orden_has_productotallacolor o_ptc, tbl_orden orden\n where o_ptc.tbl_orden_id = orden.id\n and\n o_ptc.look_id > 0\n and\n o_ptc.look_id = t.id\n and\n orden.estado IN (3, 4, 8))'\n .$comparator.' '.$value.'', $logicOp);\n \n continue; \n } \n \n if($column == 'monto')\n {\n \n $criteria->addCondition('\n (select count(distinct(orden.id)) from tbl_orden_has_productotallacolor o_ptc, tbl_orden orden\n where o_ptc.tbl_orden_id = orden.id\n and\n o_ptc.look_id > 0\n and\n o_ptc.look_id = t.id\n and\n orden.estado IN (3, 4, 8)) \n *\n (select sum(precios.precioDescuento) from `tbl_look_has_producto` `productos_productos`, `tbl_producto` `productos`, `tbl_precio` `precios` \n where `t`.`id`=`productos_productos`.`look_id` and `productos`.`id`=`productos_productos`.`producto_id` and \n `precios`.`tbl_producto_id`=`productos`.`id`)\n '\n .$comparator.' '.$value.'', $logicOp);\n \n continue; \n } \n\n\t\t\t\tif($column == 'ocasion')\n {\n \t\n\t\t\t\t\t$criteria->compare('categoriahaslook.categoria_id', $comparator.\" \".$value,\n\t false, $logicOp);\n\t\t\t\t\t$criteria->with[] = 'categoriahaslook';\n\t\t\t\t\t\n\t\t\t\t\t continue; \n\t\t\t\t \n }\n\n\t\t\t\tif($column == 'activo')\n {\t \n\t\t\t\t\t \t $criteria->compare(\"t.activo\", $comparator.$value, \n\t false, $logicOp);\n\t\t\t\t\t \t\t\t\t\n\t\t\t\t\t continue; \n\t\t\t\t \n }\n\t\t\t\t\n\t\t\t\tif($column == 'inactivo')\n {\n\t\t\t\t\t$value = ($value == 1) ? 0 : 1; // el contrario\n\t\t\t\t\t\n\t\t\t\t\t $criteria->compare(\"t.activo\", $comparator.$value, \n\t false, $logicOp);\n\t\t\t\t\t\n\t\t\t\t\t continue; \n\t\t\t\t \n } \n \n if($column == 'created_on')\n {\n $value = strtotime($value);\n $value = date('Y-m-d H:i:s', $value);\n }\n\n\n\n $criteria->compare(\"t.\".$column, $comparator.\" \".$value,\n false, $logicOp);\n \n }\n \n// $criteria->select = 't.*';\n $criteria->having .= $havingPrecio;\n //$criteria->with = array('categorias', 'preciotallacolor', 'precios');\n $criteria->together = true;\n \n //si se estan usando los filtros en Mis Looks\n if($personalShopper){\n $criteria->compare('t.user_id', $personalShopper); //siempre los no eliminados\n }\n \n \n// echo \"Criteria:\";\n// \n// echo \"<pre>\";\n// print_r($criteria->toArray());\n// echo \"</pre>\"; \n //exit();\n\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function testGetOrderByFilter()\n {\n }",
"public function test_getCartonActivityByFilter() {\n\n }"
] | [
"0.58953774",
"0.5631039",
"0.549957",
"0.54921854",
"0.54473865",
"0.5440574",
"0.54392135",
"0.54009104",
"0.53968537",
"0.53416896",
"0.5280663",
"0.5257933",
"0.51928085",
"0.5184721",
"0.5144235",
"0.5115523",
"0.5068483",
"0.5067525",
"0.5060737",
"0.5035444",
"0.50144255",
"0.5010142",
"0.50096077",
"0.50074613",
"0.49787915",
"0.49656874",
"0.49620628",
"0.495757",
"0.49320468",
"0.4917799",
"0.49125564",
"0.49051544",
"0.49018478",
"0.48882666",
"0.487876",
"0.48752886",
"0.48707396",
"0.48686016",
"0.48556453",
"0.48540086",
"0.4841195",
"0.48404956",
"0.48346367",
"0.48279244",
"0.4827252",
"0.48212174",
"0.48187697",
"0.48147798",
"0.47903773",
"0.47841153",
"0.4768859",
"0.4766348",
"0.47608808",
"0.476012",
"0.47597757",
"0.47588196",
"0.47582412",
"0.47447962",
"0.47331145",
"0.4732029",
"0.4726015",
"0.47229597",
"0.47094673",
"0.47078925",
"0.47057447",
"0.4693882",
"0.46937177",
"0.46875367",
"0.4681888",
"0.46770605",
"0.46714464",
"0.4669104",
"0.46600443",
"0.46531165",
"0.46461183",
"0.46448904",
"0.46436447",
"0.46419215",
"0.46359366",
"0.46357706",
"0.4618795",
"0.4609946",
"0.46084154",
"0.46082792",
"0.46064538",
"0.46031436",
"0.4601383",
"0.4599438",
"0.4597386",
"0.45959318",
"0.45936918",
"0.4585379",
"0.4575562",
"0.45701542",
"0.45688814",
"0.45666412",
"0.4562432",
"0.45623332",
"0.45480776",
"0.4547694"
] | 0.7464687 | 0 |
Test case for getPackingPlanById Get a packingPlan by id. | public function testGetPackingPlanById()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPlanById()\n {\n // Arrange\n // Act\n if (! isset($this->plans)) {\n $this->getsAListOfPlans();\n }\n $plans = $this->plans;\n $plan = $plans['data'][0];\n\n $plan = Ezypay::getPlan($plan['id']);\n\n // Assert\n $this->assertNotNull($plan);\n $this->assertEquals($plan['id'], $plan['id']);\n }",
"public function getPlanById($id)\n {\n try {\n return $this->plan->find($id);\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return false;\n }\n }",
"public function getPlanById(int $id){\n $this->open();\n\n $result = $this->query('SELECT * FROM '.$this->TABLE_NAME.' WHERE id=:id', array(\n new QueryParam(':id', $id, PDO::PARAM_INT)\n ));\n\n // Close connection\n $this->close();\n\n // Check if is found\n if($result->rowCount() > 0){\n\n // Check result\n while($row = $result->fetch(PDO::FETCH_OBJ)){\n $foundPlan = new Plan(\n $row->id,\n $row->name,\n $row->price,\n $row->detail,\n $row->docsUrl\n );\n\n return $foundPlan;\n }\n\n }\n else{\n // It isn't found so return false\n return false;\n }\n\n }",
"function TestPlan_get($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function planFind($id);",
"public function show($id)\n {\n $plan = Plan::find($id);\n return $plan;\n }",
"public function show($id)\n {\n Log::debug(\"SHOW PLAN IN CONTROLLER\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->findPlan($id);\n\n if ($result['message'] == 'Success'){\n\n return new StripePlanResource($result['plan']);\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n\n }",
"public function getBillingPlan(User $user, $id);",
"public function show($id)\n {\n $planpackage = $this->packagemodel->getById($id); \n return response()->json($planpackage);\n }",
"public function show($id)\n {\n return Planodetrabalho::find($id);\n }",
"public function billingPlan($id)\n {\n $this->shellshock(request(), [\n 'number' => 'required|numeric',\n 'exp_month' => 'required|numeric',\n 'exp_year' => 'required|numeric',\n 'cvc' => 'required|numeric',\n ]);\n\n Stripe::setApiKey(config('turtle.billing.stripe_secret_key'));\n\n // create card token\n $token = Token::create([\n 'card' => [\n 'number' => request()->input('number'),\n 'exp_month' => request()->input('exp_month'),\n 'exp_year' => request()->input('exp_year'),\n 'cvc' => request()->input('cvc'),\n ],\n ]);\n\n // create/update customer\n if (!auth()->user()->billing_customer) {\n $customer = Customer::create([\n 'source' => $token->id,\n 'email' => auth()->user()->email,\n ]);\n }\n else {\n $customer = Customer::retrieve(auth()->user()->billing_customer);\n $customer->source = $token->id;\n $customer->save();\n }\n\n // create/update subscription\n if (!auth()->user()->billing_subscription) {\n $subscription = Subscription::create([\n 'customer' => $customer->id,\n 'items' => [['plan' => $id]],\n ]);\n }\n else {\n $subscription = Subscription::retrieve(auth()->user()->billing_subscription);\n Subscription::update($subscription->id, [\n 'items' => [[\n 'id' => $subscription->items->data[0]->id,\n 'plan' => $id,\n ]],\n ]);\n }\n\n // update user\n auth()->user()->update([\n 'billing_customer' => $customer->id,\n 'billing_subscription' => $subscription->id,\n 'billing_plan' => $id,\n 'billing_cc_last4' => $token->card->last4,\n 'billing_period_ends' => Carbon::createFromTimestamp($subscription->current_period_end),\n ]);\n\n activity('Subscribed to '.$id);\n flash('success', 'Thanks for subscribing!');\n\n return response()->json(['reload_page' => true]);\n }",
"public function find($id)\n {\n foreach ($this->plans as $plan) {\n if ($plan->id === $id) {\n return $plan;\n }\n }\n\n throw new Exception(\"Unable to find plan with ID [{$id}].\");\n }",
"public function edit($id)\n {\n\n Log::debug(\"EDIT PLAN IN CONTROLLER\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->findPlan($id);\n\n if ($result['message'] == 'Success'){\n\n $plan = $result['plan'];\n\n $amountLen = strlen($plan->amount_decimal); \n $amount = substr_replace( $plan->amount_decimal, '.', $amountLen - 2, 0 ); \n\n $planArray[0]['id'] = $plan->id;\n $planArray[0]['product'] = $plan->product;\n $planArray[0]['interval'] = $plan->interval;\n $planArray[0]['amount'] = $amount;\n $planArray[0]['nickname'] = $plan->nickname;\n \n $plan = json_decode(json_encode($planArray), FALSE);\n \n return view('stripe.plan.create', ['plan' => $plan ]);\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n }",
"function TestRun_get_test_plan($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_plan', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"function TestCase_get_plans($case_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.get_plans', array(new xmlrpcval($case_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function show($id)\n {\n $plan = App\\Plan::findOrFail($id);\n //carpeta plan, dentro show.blade.php\n //return view('plan.show', compact('plan'));\n return $plan;\n }",
"public function plan_info( $plan_id ) {\r\n\t\treturn $this->_send_request( 'plans/'.$plan_id );\r\n\t}",
"public function show($idPlan)\n\t{\n\t\t$this->db->select('Block.idBlock');\n\t\t$this->db->select('Block.name as name');\n\t\t$this->db->select('Block.state');\n\t\t$this->db->select('Block.idPlan');\n\t\t$this->db->select('Plan.name as planName');\n\t\t$this->db->from('Block');\n\t\t$this->db->join('Plan', 'Block.idPlan = Plan.idPlan');\n\n\t\tif ($idPlan)\n\t\t{\n\t\t\t$this->db->where('Block.idPlan', $idPlan);\n\t\t}\n\n\t\t$query = $this->db->get();\n\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\treturn $query;\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function show($id)\n {\n $Planning = Planning::findOrFail($id);\n\n return new PlanningResource($Planning);\n }",
"public function showPlan($id){\n $plan = App\\Plan::findOrFail($id);\n return view('plan.show',compact('plan'));\n }",
"public function leer($idplan)\n {\n include_once 'controlador/util/bd_conexion_pdo.php';\n\n $conexion = (new Conexion())->conectarPDO();\n\n $sentencia = $conexion->prepare(\"SELECT * FROM plan WHERE idplan = :idplan\");\n $sentencia->bindParam(\":idplan\", $idplan, PDO::PARAM_INT);\n $sentencia->execute();\n\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n\n $sentencia = null;\n $conexion = null;\n\n return $resultado;\n }",
"public function find($id) {\n\t\t$sql = \"select * from t_packinglist where pl_id=?\";\n\t\t$row = $this->getDb()->fetchAssoc($sql, array($id));\n\n\t\tif ($row)\n\t\t\treturn $this->buildDomainObject($row);\n\t\t\telse\n\t\t\t\tthrow new \\Exception(\"No PackingList matching id \" . $id);\n\t}",
"public static function getPlantById($id)\n {\n\t\t$key = '1PlantById_' . $id;\n\t\t$cache = Hapyfish_Cache_Memcached::getInstance();\n\t\t$plant= $cache->get($key);\n\t\tif ($plant === false) {\n\t\t\t//load from database\n\t\t\t$db = Hapyfish_Island_Dal_Plant::getDefaultInstance();\n\t\t\t$plant = $db->getNbPlantById($id);\n\t\t\tif ($plant) {\n\t\t\t\t$cache->add($key, $plant, Hapyfish_Cache_Memcached::LIFE_TIME_ONE_MONTH);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $plant;\n }",
"public function billingPlanModal($id)\n {\n return view('turtle::auth.billing.plan', compact('id'));\n }",
"public function packingFind($id);",
"public function findEagerly($id)\n {\n $query = $this->getEntityManager()->createQuery('\n SELECT bp\n FROM VeniceAppBundle:BillingPlan AS bp\n WHERE bp.id = :id\n ')\n ->setParameter('id', $id);\n\n return $query->getOneOrNullResult();\n }",
"public function show($id)\n {\n $plan = Plan::findOrFail($id);\n\n if ( $plan->user->first()->id != Auth::user()->id ) {\n if ( trans('globals.teacher') == Auth::user()->role->id ) {\n abort(403);\n }\n }\n\n $user = $plan->user->first();\n\n $conceptual = ConceptualSection::findOrFail($plan->conceptual_section_id);\n\n $completion = $plan->completion_time;\n\n if ( $completion == trans('globals.evaluation.early.completion') ) {\n $completion = trans('plan.evaluation.early.completion');\n }\n elseif ( $completion == trans('globals.evaluation.expected.completion') ) {\n $completion = trans('plan.evaluation.expected.completion');\n }\n elseif ( $completion == trans('globals.evaluation.delayed.completion') ) {\n $completion = trans('plan.evaluation.delayed.completion');\n }\n else {\n $completion = trans('plan.evaluation.na.completion');\n }\n\n $data = array(\n 'plan' => $plan,\n 'teacher' => $user,\n 'conceptual' => $conceptual->conceptual_section,\n 'knowledge' => $conceptual->knowledge_area->knowledge_area,\n 'completion' => $completion\n );\n\n return view('plans.show', $data);\n }",
"static function checkPlan($id){\n $db = JFactory::getDbo();\n $nullDate = $db->quote($db->getNullDate());\n $nowDate = $db->quote(JHtml::_('date', 'now', 'Y-m-d H:i:s', false));\n $query = $db->getQuery(true);\n $query->select('count(tbl.id)')->from('#__osmembership_plans as tbl');\n $query->where('tbl.id = \"'.$id.'\"')\n ->where('tbl.published = 1')\n ->where('tbl.access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')')\n ->where('(tbl.publish_up = ' . $nullDate . ' OR tbl.publish_up <= ' . $nowDate . ')')\n ->where('(tbl.publish_down = ' . $nullDate . ' OR tbl.publish_down >= ' . $nowDate . ')');\n $db->setQuery($query);\n $count = $db->loadResult();\n if($count > 0){\n return true;\n }else{\n return false;\n }\n }",
"public function getPlan();",
"public function buy(string $id)\n {\n $plan = Plan::active()\n ->where('id', id_decode($id))\n ->firstOrFail(['id', 'price', 'months', 'type', 'status']);\n\n if ($plan->type == Plan::FREE) {\n auth()\n ->user()\n ->plans()\n ->attach($plan, ['ends_at' => now()->addMonths($plan->months)]);\n\n $type = trans('plans.type.' . $plan->getType());\n\n flash(trans('plans.ready', ['plan' => $type]))->success();\n\n return redirect()->route('home');\n }\n\n $types = IdentificationType::all(['id', 'type']);\n $currencies = Currency::all(['id', 'code']);\n\n return view('app.plans.buy', compact('plan', 'types', 'currencies'));\n }",
"function TestPlan_get_builds($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_builds', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function show($id)\n {\n $user = Auth::user();\n if (!$user || !$user->is_back_user()) {\n return redirect()->intended(route('admin/login'));\n }\n\n $the_plan = MembershipPlan::with('price')->with('restrictions')->where('id','=',$id)->get()->first();\n if (!$the_plan){\n $the_plan = false;\n }\n\n $activities = ShopResourceCategory::all()->sortBy('name');\n $restrictions = array();\n $plan_restrictions = MembershipRestriction::with('restriction_title')->where('membership_id','=',$the_plan->id)->orderBy('restriction_id','asc')->get();\n foreach($plan_restrictions as $restriction){\n $formatted = $restriction->format_for_display_boxes();\n\n $restrictions[] = [\n 'id' => $restriction->id,\n 'title' => $restriction->restriction_title->title,\n 'description' => $formatted['description'],\n 'color' => $formatted['color']\n ];\n }\n\n $breadcrumbs = [\n 'Home' => route('admin'),\n 'Administration' => route('admin'),\n 'Back End User' => route('admin'),\n 'Permissions' => '',\n ];\n $text_parts = [\n 'title' => 'Edit Plane - Full month free',\n 'subtitle' => '',\n 'table_head_text1' => 'Backend Roles Permissions List'\n ];\n $sidebar_link= 'admin-backend-memberships-all_plans';\n\n return view('admin/membership_plans/view_plan', [\n 'breadcrumbs' => $breadcrumbs,\n 'text_parts' => $text_parts,\n 'in_sidebar' => $sidebar_link,\n 'membership_plan' => $the_plan,\n 'activities' => $activities,\n 'restrictions' => $restrictions\n ]);\n }",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function show($id)\n {\n $plan = Plan::find($id);\n return view('admin.plans.show', compact('plan'));\n }",
"public function show($id)\n {\n $memberShipPlan = $this->memberShipPlanRepository->findWithoutFail($id);\n\n if (empty($memberShipPlan)) {\n Flash::error('Member Ship Plan not found');\n\n return redirect(route('admin.memberShipPlans.index'));\n }\n\n return view('admin.member_ship_plans.show')->with('memberShipPlan', $memberShipPlan);\n }",
"public static function data_for_plan_page($planid) {\n global $PAGE;\n $params = self::validate_parameters(self::data_for_plan_page_parameters(), array(\n 'planid' => $planid\n ));\n $plan = api::read_plan($params['planid']);\n self::validate_context($plan->get_context());\n\n $renderable = new output\\plan_page($plan);\n $renderer = $PAGE->get_renderer('tool_lp');\n\n $data = $renderable->export_for_template($renderer);\n\n return $data;\n }",
"public function plan_delete( $plan_id ) {\r\n\t\treturn $this->_send_request( 'plans/'.$plan_id, array(), STRIPE_METHOD_DELETE );\r\n\t}",
"public function GetPlanDetails($planID) {\n\t\t$planID = mysqli_real_escape_string($this->db, $planID);\n\t\tif ($this->CheckPlanExist($planID) == '1') {\n\t\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_premium_plans WHERE plan_id = '$planID'\") or die(mysqli_error($this->db));\n\t\t\t$data = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\t\treturn $data;\n\t\t} else {return false;}\n\t}",
"static function getById($id)\n {\n global $objDatabase;\n\n if (!$id) return NULL;\n $arrSql = \\Text::getSqlSnippets(\n '`product`.`id`', FRONTEND_LANG_ID, 'Shop',\n array(\n 'name' => self::TEXT_NAME,\n 'short' => self::TEXT_SHORT,\n 'long' => self::TEXT_LONG,\n 'keys' => self::TEXT_KEYS,\n 'code' => self::TEXT_CODE,\n 'uri' => self::TEXT_URI,\n )\n );\n $query = \"\n SELECT `product`.`id`, `product`.`category_id`,\n `product`.`ord`, `product`.`active`, `product`.`weight`,\n `product`.`picture`,\n `product`.`normalprice`, `product`.`resellerprice`,\n `product`.`discountprice`, `product`.`discount_active`,\n `product`.`stock`, `product`.`stock_visible`,\n `product`.`distribution`,\n `product`.`date_start`, `product`.`date_end`,\n `product`.`manufacturer_id`,\n `product`.`b2b`, `product`.`b2c`,\n `product`.`vat_id`,\n `product`.`flags`,\n `product`.`usergroup_ids`,\n `product`.`group_id`, `product`.`article_id`, \n `product`.`minimum_order_quantity`, \".\n $arrSql['field'].\"\n FROM `\".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_products` AS `product`\".\n $arrSql['join'].\"\n WHERE `product`.`id`=$id\";\n $objResult = $objDatabase->Execute($query);\n if (!$objResult) return self::errorHandler();\n if ($objResult->RecordCount() != 1) return false;\n $id = $objResult->fields['id'];\n $strCode = $objResult->fields['code'];\n if ($strCode === null) {\n $strCode = \\Text::getById($id, 'Shop', self::TEXT_CODE)->content();\n }\n $strName = $objResult->fields['name'];\n if ($strName === null) {\n $strName = \\Text::getById($id, 'Shop', self::TEXT_NAME)->content();\n }\n $strShort = $objResult->fields['short'];\n if ($strShort === null) {\n $strShort = \\Text::getById($id, 'Shop', self::TEXT_SHORT)->content();\n }\n $strLong = $objResult->fields['long'];\n if ($strLong === null) {\n $strLong = \\Text::getById($id, 'Shop', self::TEXT_LONG)->content();\n }\n $strUri = $objResult->fields['uri'];\n if ($strUri === null) {\n $strUri = \\Text::getById($id, 'Shop', self::TEXT_URI)->content();\n }\n $strKeys = $objResult->fields['keys'];\n if ($strKeys === null) {\n $strKeys = \\Text::getById($id, 'Shop', self::TEXT_KEYS)->content();\n }\n $objProduct = new Product(\n $strCode,\n $objResult->fields['category_id'],\n $strName,\n $objResult->fields['distribution'],\n $objResult->fields['normalprice'],\n $objResult->fields['active'],\n $objResult->fields['ord'],\n $objResult->fields['weight'],\n $objResult->fields['id']\n );\n $objProduct->pictures = $objResult->fields['picture'];\n $objProduct->resellerprice = floatval($objResult->fields['resellerprice']);\n $objProduct->short = $strShort;\n $objProduct->long = $strLong;\n $objProduct->stock($objResult->fields['stock']);\n $objProduct->stock_visible($objResult->fields['stock_visible']);\n $objProduct->discountprice = floatval($objResult->fields['discountprice']);\n $objProduct->discount_active($objResult->fields['discount_active']);\n $objProduct->b2b($objResult->fields['b2b']);\n $objProduct->b2c($objResult->fields['b2c']);\n $objProduct->date_start($objResult->fields['date_start']);\n $objProduct->date_end($objResult->fields['date_end']);\n $objProduct->manufacturer_id = $objResult->fields['manufacturer_id'];\n $objProduct->uri = $strUri;\n $objProduct->vat_id = $objResult->fields['vat_id'];\n $objProduct->flags = $objResult->fields['flags'];\n $objProduct->usergroup_ids = $objResult->fields['usergroup_ids'];\n $objProduct->group_id = $objResult->fields['group_id'];\n $objProduct->article_id = $objResult->fields['article_id'];\n $objProduct->keywords = $strKeys;\n $objProduct->minimum_order_quantity = $objResult->fields['minimum_order_quantity'];\n // Fetch the Product Attribute relations\n $objProduct->arrRelations =\n Attributes::getRelationArray($objProduct->id);\n//die(\"dfhreh: \".$objProduct->category_id());\n return $objProduct;\n }",
"public function show($id)\n {\n return view('admin.plan.show', ['plan' => Plan::findOrFail($id)]);\n }",
"public function smsPlanFeature($id)\n {\n $sms_plan = SMSPricePlan::where('status', 'Active')->find($id);\n\n if ($sms_plan) {\n $plan_feature = SMSPlanFeature::where('pid', $id)->get();\n $payment_gateways = PaymentGateways::where('status', 'Active')->get();\n return view('client.sms-plan-feature', compact('sms_plan', 'plan_feature', 'payment_gateways'));\n } else {\n return redirect('user/sms/purchase-sms-plan')->with([\n 'message' => language_data('SMS plan not found', Auth::guard('client')->user()->lan_id),\n 'message_important' => true\n ]);\n }\n }",
"public function get($planIdOrKey)\n {\n $ret = $this->exec($this->uri.\"/$planIdOrKey?expand=plans\", null);\n\n $this->log->addInfo('Result='.$ret);\n\n $prj = $this->json_mapper->map(\n json_decode($ret), new Plan()\n );\n\n return $prj;\n }",
"public function show( $planId )\n\t{\n\t\t$plan = Plan::with('website', 'product')\n\t\t\t->findOrFail($planId);\n\n\t\treturn view('admin/products/billingplans/show', [\n\t\t\t'website' => $plan->product->website,\n\t\t\t'product' => $plan->product,\n\t\t\t'plan' => $plan,\n\t\t\t'periodicity' => $this->periodicity,\n\t\t]);\n\t}",
"public function get_plan($planId){\n try {\n $plan = Plan::get($planId, $this->_api_context);\n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $plan->toArray();\n $returnArray['RAWREQUEST']='{id:'.$planId.'}';\n $returnArray['RAWRESPONSE']=$plan->toJSON();\n return $returnArray;\n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }",
"public function UsePlan($plan_id) {\n\t\t$this->Param('plan_id', $plan_id, 'recur');\n\n\t\treturn true;\n\t}",
"public function show($id){\n $data = UserPlan::where('user_id', '=', $id)\n ->get();\n\n return response()->json($data);\n }",
"protected function detail($id)\n {\n $show = new Show(Plan::findOrFail($id));\n\n $show->field('id', __('ID'));\n $show->field('count', __('Количество'));\n $show->field('month_name', __('Месяц'));\n $show->field('year', __('Год'));\n\n return $show;\n }",
"function fill_form_bp_plan($gml_id) {\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\t\" . \n\t\t\t\t\"'\" . $this->trim_gml_prefix_if_exists($gml_id) . \"'::text::uuid AS plan_gml_id,\n\t\t\t\tgmlas.xplan_name AS name,\n\t\t\t\tgmlas.nummer AS nummer,\n\t\t\t\tgmlas.internalid AS internalid,\n\t\t\t\tgmlas.beschreibung AS beschreibung,\n\t\t\t\tgmlas.kommentar AS kommentar,\n\t\t\t\tto_char(gmlas.technherstelldatum, 'DD.MM.YYYY') AS technherstelldatum,\n\t\t\t\tto_char(gmlas.genehmigungsdatum, 'DD.MM.YYYY') AS genehmigungsdatum,\n\t\t\t\tto_char(gmlas.untergangsdatum, 'DD.MM.YYYY') AS untergangsdatum,\n\t\t\t\tCASE WHEN vpa.planname IS NOT NULL OR vpa.rechtscharakter IS NOT NULL OR vpa.nummer IS NOT NULL OR vpa.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpa.planname, vpa.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpa.nummer, vpa.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS aendert,\n\t\t\t\tCASE WHEN vpwgv.planname IS NOT NULL OR vpwgv.rechtscharakter IS NOT NULL OR vpwgv.nummer IS NOT NULL OR vpwgv.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpwgv.planname, vpwgv.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpwgv.nummer, vpwgv.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS wurdegeaendertvon,\n\t\t\t\tgmlas.erstellungsmassstab AS erstellungsmassstab,\n\t\t\t\tgmlas.bezugshoehe AS bezugshoehe,\n\t\t\t\tst_assvg(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\"), 0, 8) AS newpath,\n\t\t\t\tst_astext(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\")) AS newpathwkt,\n\t\t\t\tCASE WHEN vm.xp_verfahrensmerkmal_vermerk IS NOT NULL OR vm.xp_verfahrensmerkmal_datum IS NOT NULL OR vm.xp_verfahrensmerkmal_signatur IS NOT NULL OR vm.xp_verfahrensmerkmal_signiert IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vm.xp_verfahrensmerkmal_vermerk, vm.xp_verfahrensmerkmal_datum, vm.xp_verfahrensmerkmal_signatur, vm.xp_verfahrensmerkmal_signiert)]::xplan_gml.xp_verfahrensmerkmal[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS verfahrensmerkmale,\n\t\t\t\tCASE\n\t\t\t\t\tWHEN count_externeref > 0\n\t\t\t\t\tTHEN array_to_json(externeref.externereferenz)\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS externereferenz,\n\t\t\t\tto_char(gmlas.veraenderungssperredatum, 'DD.MM.YYYY') AS veraenderungssperredatum,\n\t\t\t\tarray_to_json(ARRAY[(g.ags,g.rs,g.gemeindename,g.ortsteilname)]::xplan_gml.xp_gemeinde[]) AS gemeinde,\n\t\t\t\tgmlas.verfahren::xplan_gml.bp_verfahren AS verfahren,\n\t\t\t\tto_char(gmlas.inkrafttretensdatum, 'DD.MM.YYYY') AS inkrafttretensdatum,\n\t\t\t\tgmlas.durchfuehrungsvertrag AS durchfuehrungsvertrag,\n\t\t\t\tgmlas.staedtebaulichervertrag AS staedtebaulichervertrag,\n\t\t\t\tgmlas.rechtsverordnungsdatum AS rechtsverordnungsdatum,\n\t\t\t\tgmlas.rechtsstand::xplan_gml.bp_rechtsstand AS rechtsstand,\n\t\t\t\tgmlas.hoehenbezug AS hoehenbezug,\n\t\t\t\tto_char(gmlas.aufstellungsbeschlussdatum, 'DD.MM.YYYY') AS aufstellungsbeschlussdatum,\n\t\t\t\tto_char(gmlas.ausfertigungsdatum, 'DD.MM.YYYY') AS ausfertigungsdatum,\n\t\t\t\tto_char(gmlas.satzungsbeschlussdatum, 'DD.MM.YYYY') AS satzungsbeschlussdatum,\n\t\t\t\tgmlas.veraenderungssperre AS veraenderungssperre,\n\t\t\t\tarray_to_json(ARRAY[to_char(aled.value, 'DD.MM.YYYY')]::date[]) AS auslegungsenddatum,\n\t\t\t\t(gmlas.sonstplanart_codespace, gmlas.sonstplanart, NULL)::xplan_gml.bp_sonstplanart AS sonstplanart,\n\t\t\t\tgmlas.gruenordnungsplan AS gruenordnungsplan,\n\t\t\t\tto_json((pg.name, pg.kennziffer)::xplan_gml.xp_plangeber) AS plangeber,\n\t\t\t\tarray_to_json(ARRAY[to_char(alsd.value, 'DD.MM.YYYY')]::date[]) AS auslegungsstartdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbsd.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsstartdatum,\n\t\t\t\tto_char(gmlas.aenderungenbisdatum, 'DD.MM.YYYY') AS aenderungenbisdatum,\n\t\t\t\tto_json((gmlas.status_codespace, gmlas.status, NULL)::xplan_gml.bp_status) AS status,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbed.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsenddatum,\n\t\t\t\tarray_to_json(gmlas.planart) AS planart,\n\t\t\t\tgmlas.erschliessungsvertrag AS erschliessungsvertrag\n\t\t\tFROM\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan gmlas LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_gemeinde gemeindelink ON gmlas.id = gemeindelink.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_gemeinde g ON gemeindelink.xp_gemeinde_pkid = g.ogr_pkid LEFT JOIN\n\t\t\t\t(\n\t\t\t\t\tSElECT\n\t\t\t\t\t\tCOUNT(*) AS count_externeref,\n\t\t\t\t\t\texternereferenzlink_sub.parent_id,\n\t\t\t\t\t\tarray_agg((e_sub.georefurl,\n\t\t\t\t\t\t\t\t(e_sub.georefmimetype_codespace, e_sub.georefmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.art::xplan_gml.xp_externereferenzart,\n\t\t\t\t\t\t\t\te_sub.informationssystemurl,\n\t\t\t\t\t\t\t\te_sub.referenzname,\n\t\t\t\t\t\t\t\te_sub.referenzurl,\n\t\t\t\t\t\t\t\t(e_sub.referenzmimetype_codespace, e_sub.referenzmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.beschreibung,\n\t\t\t\t\t\t\t\tto_char(e_sub.datum, 'DD.MM.YYYY'),\n\t\t\t\t\t\t\t\te_sub.typ::xplan_gml.xp_externereferenztyp\n\t\t\t\t\t\t\t)::xplan_gml.xp_spezexternereferenz) AS externereferenz\n\t\t\t\t\tFROM\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_externereferenz externereferenzlink_sub LEFT JOIN\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".xp_spezexternereferenz e_sub ON externereferenzlink_sub.xp_spezexternereferenz_pkid = e_sub.ogr_pkid\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\texternereferenzlink_sub.parent_id\n\t\t\t\t) externeref ON gmlas.id = externeref.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_aendert_aendert aendertlink ON gmlas.id = aendertlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".aendert aendertlinktwo ON aendertlink.child_pkid = aendertlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpa ON aendertlinktwo.xp_verbundenerplan_pkid = vpa.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_wurdegeaendertvon_wurdegeaendertvon wurdegeaendertvonlink ON gmlas.id = wurdegeaendertvonlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".wurdegeaendertvon wurdegeaendertvonlinktwo ON wurdegeaendertvonlink.child_pkid = wurdegeaendertvonlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpwgv ON wurdegeaendertvonlinktwo.xp_verbundenerplan_pkid = vpwgv.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_verfahrensmerkmale_verfahrensmerkmale verfahrensmerkmalelink ON gmlas.id = verfahrensmerkmalelink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".verfahrensmerkmale vm ON verfahrensmerkmalelink.child_pkid = vm.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_plangeber pg ON gmlas.plangeber_xp_plangeber_pkid = pg.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_auslegungsstartdatum alsd ON gmlas.id = alsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_auslegungsenddatum aled ON gmlas.id = aled.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_traegerbeteiligungsstartdatum tbsd ON gmlas.id = tbsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".bp_plan_traegerbeteiligungsenddatum tbed ON gmlas.id = tbed.parent_id\n\t\t\tWHERE\n\t\t\t\tgmlas.id ='\" . $gml_id . \"'\n\t\t\t;\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$result = pg_fetch_assoc($ret[1]);\n\t\treturn $result;\n\t}",
"function payplan($id=0){\r\n\t\t$row = $this->accounts_model->getAccountById($id);\r\n\r\n\t\tif(count($row) <= 0){\r\n\t\t\t$this->session->set_flashdata('error_msg', 'Account info incorrect');\r\n\t\t\tredirect('/');\r\n\t\t}\r\n\r\n\t\tif (strpos($row['role'], 'pro_artist')) {\r\n\t\t\t$price = $row['pay_plan'] == 'annually' ? 12*12 : 18;//us$\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$price = $row['pay_plan'] == 'annually' ? 25*12 : 32;//us$\t\r\n\t\t}\r\n\r\n\t\t$this->load->view('header/header');\r\n\t\t$this->load->view('payplan_view', ['row'=>$row, 'price'=>$price]);\r\n\t\t$this->load->view('footer');\r\n\t}",
"public function show($id)\n {\n $plan = Plan::where(['id' => $id])->with([\n 'programaAcademico',\n 'planesActividades.actividad.indicador',\n 'planesActividades.actividad.proyecto.programas.programa.linea.eje'\n ])->get()->toArray()[0];\n\n $planesActividades = $plan['planes_actividades'];\n $proyectos = [];\n\n for ($i = 0, $long = count($planesActividades); $i < $long; $i++) {\n $actividad = $planesActividades[$i]['actividad'];\n $proyecto = $actividad['proyecto'];\n $encontro = false;\n\n $actividad_data = [\n 'nombre' => $actividad['nombre'],\n 'descripcion' => $actividad['descripcion'],\n 'fecha_inicio' => $planesActividades[$i]['fecha_inicio'],\n 'fecha_fin' => $planesActividades[$i]['fecha_inicio'],\n 'costo' => $planesActividades[$i]['costo'],\n 'unidad_medida' => $actividad['descripcion'],\n 'peso' => $planesActividades[$i]['peso'],\n 'incidacor' => $actividad['indicador']\n ];\n\n for ($j=0; $j < count($proyectos); $j++) {\n $encontro = $proyectos[$j]['id'] == $proyecto['id'];\n\n if($proyectos[$j]['id'] == $proyecto['id']){\n array_push($proyectos[$j]['actividades'], $actividad_data);\n break;\n }\n }\n\n if(!$encontro){\n $proyecto['actividades'] = [$actividad_data];\n array_push($proyectos, $proyecto);\n }\n }\n\n $data = [];\n $data['nombre'] = $plan['nombre'];\n $data['url_documento'] = $plan['url_documento'];\n $data['periodo_inicio'] = $plan['periodo_inicio'];\n $data['periodo_fin'] = $plan['periodo_fin'];\n $data['fecha_cierre'] = $plan['fecha_cierre'];\n $data['programa_academico'] = $plan['programa_academico'];\n $data['proyectos'] = $proyectos;\n\n if (count($plan) > 0)\n return response()->json([\n 'message' => 'Consulta exitosa',\n 'data' => $data,\n 'status' => 'ok'\n ], 200);\n\n return response()->json([\n 'message' => 'No existen registros',\n 'data' => [],\n 'status' => 'error'\n ], 404);\n }",
"public function show($id)\n {\n $bill = BillSettings::findOrFail($id);\n $billGroup = [];\n if(count($bill->available_special) > 0){\n $billGroup = collect($bill->available_special)->sortBy('pay_type')->groupBy('adv_type', true);\n }\n $data['billGroup'] = $billGroup;\n $data['bill'] = $bill;\n $data['unit'] = unit_by_id();\n $data['location'] = location_by_id();\n $data['department'] = department_by_id();\n $data['designation'] = designation_by_id();\n $data['section'] = section_by_id();\n $data['subSection'] = subSection_by_id();\n return view('hr.setup.bill.show', $data);\n }",
"public function show($id)\n {\n $data['payplan'] = $this->payplan->getById($id);\n $data['payplanFees'] = $this->fee->where('payplan_id', $id , '=');\n return view('payplans.show', $data);\n }",
"public function enablePlan($id) \n {\n try {\n\n $plan = Plan::find($id);\n $plan->active = 1;\n $plan->save();\n\n return response(['message' => 'The plan has been enabled'], 200);\n \n } catch (Exception $e) {\n return response(['message' => $e->getMessage()], 500);\n }\n }",
"function TestCase_link_plan($case_id, $plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.link_plan', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"function get_predefined_innovation_plan($id)\n {\n $result = $this->db->get_where('predefined_innovation_plan', array(\n 'id' => $id\n ))->row_array();\n if (! (array) $result) {\n $fields = $this->db->list_fields('predefined_innovation_plan');\n foreach ($fields as $field) {\n $result[$field] = '';\n }\n }\n $db_error = $this->db->error();\n if (! empty($db_error['code'])) {\n echo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n exit();\n }\n return $result;\n }",
"public function show(Plan $plan)\n {\n //\n }",
"public function get_listing_plans($id, $type)\n {\n header('Content-Type: application/json');\n $output['token'] = $this->security->get_csrf_hash();\n $data = $this->database->_get_row_data('tbl_purchases', array('plan_id' => $id, 'listing_type' => $type));\n if (!empty($data)) {\n $output['response'] = $data;\n } else {\n $output['response'] = false;\n }\n\n exit(json_encode($output));\n }",
"public function findByProductId($id)\n {\n $query = $this->getEntityManager()->createQuery('\n SELECT bp\n FROM VeniceAppBundle:BillingPlan AS bp\n JOIN bp.product product\n WHERE product.id = :id\n ')\n ->setParameter('id', $id);\n\n return $query->getResult();\n }",
"function fill_form_rp_plan($gml_id) {\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\t\" . \n\t\t\t\t\"'\" . $this->trim_gml_prefix_if_exists($gml_id) . \"'::text::uuid AS plan_gml_id,\n\t\t\t\tgmlas.xplan_name AS name,\n\t\t\t\tgmlas.nummer AS nummer,\n\t\t\t\tgmlas.internalid AS internalid,\n\t\t\t\tgmlas.beschreibung AS beschreibung,\n\t\t\t\tgmlas.kommentar AS kommentar,\n\t\t\t\tto_char(gmlas.technherstelldatum, 'DD.MM.YYYY') AS technherstelldatum,\n\t\t\t\tto_char(gmlas.genehmigungsdatum, 'DD.MM.YYYY') AS genehmigungsdatum,\n\t\t\t\tto_char(gmlas.untergangsdatum, 'DD.MM.YYYY') AS untergangsdatum,\n\t\t\t\tCASE WHEN vpa.planname IS NOT NULL OR vpa.rechtscharakter IS NOT NULL OR vpa.nummer IS NOT NULL OR vpa.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpa.planname, vpa.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpa.nummer, vpa.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS aendert,\n\t\t\t\tCASE WHEN vpwgv.planname IS NOT NULL OR vpwgv.rechtscharakter IS NOT NULL OR vpwgv.nummer IS NOT NULL OR vpwgv.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpwgv.planname, vpwgv.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpwgv.nummer, vpwgv.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS wurdegeaendertvon,\n\t\t\t\tgmlas.erstellungsmassstab AS erstellungsmassstab,\n\t\t\t\tgmlas.bezugshoehe AS bezugshoehe,\n\t\t\t\tst_assvg(st_transform(gmlas.raeumlichergeltungsbereich,\". $this->epsg .\"), 0, 8) AS newpath,\n\t\t\t\tst_astext(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\")) AS newpathwkt,\n\t\t\t\tCASE WHEN vm.xp_verfahrensmerkmal_vermerk IS NOT NULL OR vm.xp_verfahrensmerkmal_datum IS NOT NULL OR vm.xp_verfahrensmerkmal_signatur IS NOT NULL OR vm.xp_verfahrensmerkmal_signiert IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vm.xp_verfahrensmerkmal_vermerk, vm.xp_verfahrensmerkmal_datum, vm.xp_verfahrensmerkmal_signatur, vm.xp_verfahrensmerkmal_signiert)]::xplan_gml.xp_verfahrensmerkmal[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS verfahrensmerkmale,\n\t\t\t\tCASE\n\t\t\t\t\tWHEN count_externeref > 0\n\t\t\t\t\tTHEN array_to_json(externeref.externereferenz)\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS externereferenz,\n\t\t\t\tgmlas.planungsregion AS planungsregion,\n\t\t\t\tgmlas.teilabschnitt AS teilabschnitt,\n\t\t\t\tgmlas.amtlicherschluessel AS amtlicherschluessel,\n\t\t\t\tgmlas.verfahren::xplan_gml.rp_verfahren AS verfahren,\n\t\t\t\tgmlas.rechtsstand::xplan_gml.rp_rechtsstand AS rechtsstand,\n\t\t\t\tto_char(gmlas.datumdesinkrafttretens, 'DD.MM.YYYY') AS datumdesinkrafttretens,\n\t\t\t\tto_char(gmlas.planbeschlussdatum, 'DD.MM.YYYY') AS planbeschlussdatum,\n\t\t\t\tto_char(gmlas.aufstellungsbeschlussdatum, 'DD.MM.YYYY') AS aufstellungsbeschlussdatum,\n\t\t\t\tto_char(gmlas.entwurfsbeschlussdatum, 'DD.MM.YYYY') AS entwurfsbeschlussdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(aled.value, 'DD.MM.YYYY')]::date[]) AS auslegungsenddatum,\n\t\t\t\t(gmlas.sonstplanart_codespace, gmlas.sonstplanart)::xplan_gml.rp_sonstplanart AS sonstplanart,\n\t\t\t\tarray_to_json(ARRAY[to_char(alsd.value, 'DD.MM.YYYY')]::date[]) AS auslegungsstartdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbsd.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsstartdatum,\n\t\t\t\tto_char(gmlas.aenderungenbisdatum, 'DD.MM.YYYY') AS aenderungenbisdatum,\n\t\t\t\tto_json((gmlas.status_codespace, gmlas.status)::xplan_gml.rp_status) AS status,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbed.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsenddatum,\n\t\t\t\tgmlas.planart::xplan_gml.rp_art AS planart\n\t\t\tFROM\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan gmlas LEFT JOIN\n\t\t\t\t(\n\t\t\t\t\tSElECT\n\t\t\t\t\t\tCOUNT(*) AS count_externeref,\n\t\t\t\t\t\texternereferenzlink_sub.parent_id,\n\t\t\t\t\t\tarray_agg((e_sub.georefurl,\n\t\t\t\t\t\t\t\t(e_sub.georefmimetype_codespace, e_sub.georefmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.art::xplan_gml.xp_externereferenzart,\n\t\t\t\t\t\t\t\te_sub.informationssystemurl,\n\t\t\t\t\t\t\t\te_sub.referenzname,\n\t\t\t\t\t\t\t\te_sub.referenzurl,\n\t\t\t\t\t\t\t\t(e_sub.referenzmimetype_codespace, e_sub.referenzmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.beschreibung,\n\t\t\t\t\t\t\t\tto_char(e_sub.datum, 'DD.MM.YYYY'),\n\t\t\t\t\t\t\t\te_sub.typ::xplan_gml.xp_externereferenztyp\n\t\t\t\t\t\t\t)::xplan_gml.xp_spezexternereferenz) AS externereferenz\n\t\t\t\t\tFROM\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_externereferenz externereferenzlink_sub LEFT JOIN\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".xp_spezexternereferenz e_sub ON externereferenzlink_sub.xp_spezexternereferenz_pkid = e_sub.ogr_pkid\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\texternereferenzlink_sub.parent_id\n\t\t\t\t) externeref ON gmlas.id = externeref.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_aendert_aendert aendertlink ON gmlas.id = aendertlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".aendert aendertlinktwo ON aendertlink.child_pkid = aendertlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpa ON aendertlinktwo.xp_verbundenerplan_pkid = vpa.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_wurdegeaendertvon_wurdegeaendertvon wurdegeaendertvonlink ON gmlas.id = wurdegeaendertvonlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".wurdegeaendertvon wurdegeaendertvonlinktwo ON wurdegeaendertvonlink.child_pkid = wurdegeaendertvonlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpwgv ON wurdegeaendertvonlinktwo.xp_verbundenerplan_pkid = vpwgv.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_verfahrensmerkmale_verfahrensmerkmale verfahrensmerkmalelink ON gmlas.id = verfahrensmerkmalelink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".verfahrensmerkmale vm ON verfahrensmerkmalelink.child_pkid = vm.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_auslegungsstartdatum alsd ON gmlas.id = alsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_auslegungsenddatum aled ON gmlas.id = aled.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_traegerbeteiligungsstartdatum tbsd ON gmlas.id = tbsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".rp_plan_traegerbeteiligungsenddatum tbed ON gmlas.id = tbed.parent_id\n\t\t\tWHERE\n\t\t\t\tgmlas.id = '\" . $gml_id . \"'\n\t\t\t;\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$result = pg_fetch_assoc($ret[1]);\n\t\treturn $result;\n\t}",
"public function show($id)\n {\n return Pabellones::findOrFail($id);\n }",
"public function setPlanId($val)\n {\n $this->plan_id = $val;\n return $this;\n }",
"public function create($name, $id)\n {\n return $this->add(new Plan($name, $id));\n }",
"public static function byPlan($plan_id)\n {\n $payload = [\n 'recurringplan' => [\n 'recurringplanid' => $plan_id,\n ],\n ];\n\n return static::all($payload);\n }",
"public function edit(string $id)\n {\n $plan = Plan::findOrFail(id_decode($id), ['id', 'price', 'months', 'type', 'status']);\n\n return view('app.plans.edit', compact('plan'));\n }",
"public function update(Request $request, $id)\n {\n $this->authorize('update', Plan::class);\n\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'duration' => 'required',\n ]);\n\n $plan = Plan::findOrFail($id);\n // Generate plan slug from plan name\n $slug = str_replace(' ','-', $request->input('name'));\n $gateway_id = str_replace(' ','_', $request->input('name'));\n $team_enable = !empty($request->input('teams_limit')) ? 1 : 0;\n $teams_limit = !empty($request->input('teams_limit')) ? $request->input('teams_limit') : NULL;\n $price = (float) $request->input('price') * 100;\n \n // Delete the plan on stripe \n $stripe_plan = \\Stripe\\Plan::retrieve($plan->gateway_id);\n $stripe_plan->delete();\n\n $interval=explode(',',$request->duration);\n //Add the Stripe Api key to\n // Recrete a new plan on stripe\n \\Stripe\\Plan::create([\n \"amount\" => $price,\n \"interval\" => $interval[1],\n \"interval_count\"=>$interval[0], \n \"product\" => [\n \"name\" => $request->input('name'),\n ],\n \"currency\" => \"usd\",\n \"id\" => $gateway_id,\n \"trial_period_days\" => $request->input('trial'),\n ]);\n\n $plan->name = $request->input('name');\n $plan->gateway_id = $gateway_id;\n $plan->price = $request->input('price');\n $plan->brand = $request->input('brand');\n $plan->contest = $request->input('contest');\n $plan->duration = $request->input('duration');\n $plan->other_info_1 =$request->input('plan_info_1');\n $plan->other_info_2 = $request->input('plan_info_2');\n //$plan->teams_enabled = $team_enable;\n //$plan->teams_limit = $teams_limit;\n $plan->active =1;\n $plan->slug = $slug;\n //$plan->trial_period_days = $request->input('trial');\n $plan->save();\n\n return redirect()->back()->with(\"status\", \"Your plan has been updated.\");\n }",
"public function edit($id)\n {\n $memberShipPlan = $this->memberShipPlanRepository->findWithoutFail($id);\n\n if (empty($memberShipPlan)) {\n Flash::error('Member Ship Plan not found');\n\n return redirect(route('admin.memberShipPlans.index'));\n }\n\n return view('admin.member_ship_plans.edit')->with('memberShipPlan', $memberShipPlan);\n }",
"public function edit($id)\n {\n $plan = Plan::findOrFail($id);\n\n if ( $plan->condition->state_id != trans('globals.condition.pending') ||\n $plan->user->first()->id != Auth::user()->id ) {\n abort(403);\n }\n\n $courses = Auth::user()->courses;\n $knowledge_areas = KnowledgeArea::all();\n $plan_knowledge = $plan->conceptual_section->knowledge_area;\n\n $data = array(\n 'plan' => $plan,\n 'courses' => $courses,\n 'knowledge_areas' => $knowledge_areas,\n 'plan_knowledge' => $plan_knowledge\n );\n\n return view('plans.edit', $data);\n }",
"private function getPlanInfo($account_id)\n {\n if (!$account_id) {\n trigger_error('Unable to get get plan info, no $account_id parameter provided', E_USER_ERROR);\n return;\n }\n\n if ($this->planType == 'account') {\n if ($GLOBALS['account_info']['plan']) {\n $plan = $GLOBALS['account_info']['plan'];\n } else {\n $plan = $this->plans[$this->planID];\n }\n } else {\n $GLOBALS['reefless']->loadClass('Plan');\n $plan = $GLOBALS['rlPlan']->getPlan($this->planID, $account_id);\n }\n\n return $plan;\n }",
"public function show($id)\n {\n $plan = Plan::find($id);\n $clients = $plan->clients;\n return view('plans.show' , ['plan' => $plan , 'clients' => $clients]);\n }",
"public function show($id)\n { \n $package = Packages::findOrFail($id);\n\n //Return single package as a resource\n return new PackageResource($package);\n }",
"public static function getBuildingById($id)\n {\n\t\t$key = '1BuildingById_' . $id;\n\t\t$cache = Hapyfish_Cache_Memcached::getInstance();\n\t\t$building= $cache->get($key);\n\t\tif ($building === false) {\n\t\t\t//load from database\n\t\t\t$db = Hapyfish_Island_Dal_Building::getDefaultInstance();\n\t\t\t$building = $db->getBuildingById($id);\n\t\t\tif ($building) {\n\t\t\t\t$cache->add($key, $building, Hapyfish_Cache_Memcached::LIFE_TIME_ONE_MONTH);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $building;\n }",
"function getPackName($id){\r global $bdd;\r $req4=$bdd->prepare(\"select * from packs where idpack=? \");\r $req4->execute(array($val));\r while($ar = $req4->fetch()){return $ar['packname'];}\r return 1;\r}",
"public static function getByID($id)\n\t{\n\t\t$db = UserConfig::getDB();\n\t\t$account = null;\n\n\t\tif ($stmt = $db->prepare('SELECT name, plan FROM '.UserConfig::$mysql_prefix.'accounts WHERE id = ?'))\n\t\t{\n\t\t\tif (!$stmt->bind_param('i', $id))\n\t\t\t{\n\t\t\t\t throw new Exception(\"Can't bind parameter\".$stmt->error);\n\t\t\t}\n\t\t\tif (!$stmt->execute())\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Can't execute statement: \".$stmt->error);\n\t\t\t}\n\t\t\tif (!$stmt->bind_result($name, $plan_id))\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Can't bind result: \".$stmt->error);\n\t\t\t}\n\n\t\t\tif ($stmt->fetch() === TRUE)\n\t\t\t{\n\t\t\t\t$account = new self($id, $name, Plan::getByID($plan_id), Account::ROLE_USER);\n\t\t\t}\n\n\t\t\t$stmt->close();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception(\"Can't prepare statement: \".$db->error);\n\t\t}\n\n\t\treturn $account;\n\t}",
"function fill_form_so_plan($gml_id) {\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\t\" . \n\t\t\t\t\"'\" . $this->trim_gml_prefix_if_exists($gml_id) . \"'::text::uuid AS plan_gml_id,\n\t\t\t\tgmlas.xplan_name AS name,\n\t\t\t\tgmlas.nummer AS nummer,\n\t\t\t\tgmlas.internalid AS internalid,\n\t\t\t\tgmlas.beschreibung AS beschreibung,\n\t\t\t\tgmlas.kommentar AS kommentar,\n\t\t\t\tto_char(gmlas.technherstelldatum, 'DD.MM.YYYY') AS technherstelldatum,\n\t\t\t\tto_char(gmlas.genehmigungsdatum, 'DD.MM.YYYY') AS genehmigungsdatum,\n\t\t\t\tto_char(gmlas.untergangsdatum, 'DD.MM.YYYY') AS untergangsdatum,\n\t\t\t\tCASE WHEN vpa.planname IS NOT NULL OR vpa.rechtscharakter IS NOT NULL OR vpa.nummer IS NOT NULL OR vpa.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpa.planname, vpa.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpa.nummer, vpa.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS aendert,\n\t\t\t\tCASE WHEN vpwgv.planname IS NOT NULL OR vpwgv.rechtscharakter IS NOT NULL OR vpwgv.nummer IS NOT NULL OR vpwgv.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpwgv.planname, vpwgv.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpwgv.nummer, vpwgv.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS wurdegeaendertvon,\n\t\t\t\tgmlas.erstellungsmassstab AS erstellungsmassstab,\n\t\t\t\tgmlas.bezugshoehe AS bezugshoehe,\n\t\t\t\tst_assvg(st_transform(gmlas.raeumlichergeltungsbereich,\". $this->epsg .\"), 0, 8) AS newpath,\n\t\t\t\tst_astext(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\")) AS newpathwkt,\n\t\t\t\tCASE WHEN vm.xp_verfahrensmerkmal_vermerk IS NOT NULL OR vm.xp_verfahrensmerkmal_datum IS NOT NULL OR vm.xp_verfahrensmerkmal_signatur IS NOT NULL OR vm.xp_verfahrensmerkmal_signiert IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vm.xp_verfahrensmerkmal_vermerk, vm.xp_verfahrensmerkmal_datum, vm.xp_verfahrensmerkmal_signatur, vm.xp_verfahrensmerkmal_signiert)]::xplan_gml.xp_verfahrensmerkmal[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS verfahrensmerkmale,\n\t\t\t\tCASE\n\t\t\t\t\tWHEN count_externeref > 0\n\t\t\t\t\tTHEN array_to_json(externeref.externereferenz)\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS externereferenz,\n\t\t\t\tto_json((pg.name, pg.kennziffer)::xplan_gml.xp_plangeber) AS plangeber,\n\t\t\t\tto_json((gmlas.planart_codespace, gmlas.planart, NULL)::xplan_gml.so_planart) AS planart\n\t\t\t\t/*ARRAY[(g.ags,g.rs,g.gemeindename,g.ortsteilname)]::xplan_gml.xp_gemeinde[] AS gemeinde*/\n\t\t\tFROM\n\t\t\t\t\" . $this->gmlas_schema . \".so_plan gmlas LEFT JOIN\n\t\t\t\t/*\" . $this->gmlas_schema . \".so_plan_gemeinde gemeindelink ON gmlas.id = gemeindelink.parent_id LEFT JOIN*/\n\t\t\t\t/*\" . $this->gmlas_schema . \".xp_gemeinde g ON gemeindelink.xp_gemeinde_pkid = g.ogr_pkid LEFT JOIN*/\n\t\t\t\t(\n\t\t\t\t\tSElECT\n\t\t\t\t\t\tCOUNT(*) AS count_externeref,\n\t\t\t\t\t\texternereferenzlink_sub.parent_id,\n\t\t\t\t\t\tarray_agg((e_sub.georefurl,\n\t\t\t\t\t\t\t\t(e_sub.georefmimetype_codespace, e_sub.georefmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.art::xplan_gml.xp_externereferenzart,\n\t\t\t\t\t\t\t\te_sub.informationssystemurl,\n\t\t\t\t\t\t\t\te_sub.referenzname,\n\t\t\t\t\t\t\t\te_sub.referenzurl,\n\t\t\t\t\t\t\t\t(e_sub.referenzmimetype_codespace, e_sub.referenzmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.beschreibung,\n\t\t\t\t\t\t\t\tto_char(e_sub.datum, 'DD.MM.YYYY'),\n\t\t\t\t\t\t\t\te_sub.typ::xplan_gml.xp_externereferenztyp\n\t\t\t\t\t\t\t)::xplan_gml.xp_spezexternereferenz) AS externereferenz\n\t\t\t\t\tFROM\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".so_plan_externereferenz externereferenzlink_sub LEFT JOIN\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".xp_spezexternereferenz e_sub ON externereferenzlink_sub.xp_spezexternereferenz_pkid = e_sub.ogr_pkid\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\texternereferenzlink_sub.parent_id\n\t\t\t\t) externeref ON gmlas.id = externeref.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_plangeber pg ON gmlas.plangeber_xp_plangeber_pkid = pg.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".so_plan_aendert_aendert aendertlink ON gmlas.id = aendertlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".aendert aendertlinktwo ON aendertlink.child_pkid = aendertlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpa ON aendertlinktwo.xp_verbundenerplan_pkid = vpa.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".so_plan_wurdegeaendertvon_wurdegeaendertvon wurdegeaendertvonlink ON gmlas.id = wurdegeaendertvonlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".wurdegeaendertvon wurdegeaendertvonlinktwo ON wurdegeaendertvonlink.child_pkid = wurdegeaendertvonlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpwgv ON wurdegeaendertvonlinktwo.xp_verbundenerplan_pkid = vpwgv.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".so_plan_verfahrensmerkmale_verfahrensmerkmale verfahrensmerkmalelink ON gmlas.id = verfahrensmerkmalelink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".verfahrensmerkmale vm ON verfahrensmerkmalelink.child_pkid = vm.ogr_pkid\n\t\t\tWHERE\n\t\t\t\tgmlas.id ='\" . $gml_id . \"'\n\t\t\t;\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$result = pg_fetch_assoc($ret[1]);\n\t\treturn $result;\n\t}",
"public function edit($id)\n {\n $this->authorize('update', Plan::class);\n\n $plan = Plan::findOrFail($id);\n\n return view('admin.plans.edit', compact('plan', $plan));\n }",
"function fill_form_fp_plan($gml_id) {\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\t\" . \n\t\t\t\t\"'\" . $this->trim_gml_prefix_if_exists($gml_id) . \"'::text::uuid AS plan_gml_id,\n\t\t\t\tgmlas.xplan_name AS name,\n\t\t\t\tgmlas.nummer AS nummer,\n\t\t\t\tgmlas.internalid AS internalid,\n\t\t\t\tgmlas.beschreibung AS beschreibung,\n\t\t\t\tgmlas.kommentar AS kommentar,\n\t\t\t\tto_char(gmlas.technherstelldatum, 'DD.MM.YYYY') AS technherstelldatum,\n\t\t\t\tto_char(gmlas.genehmigungsdatum, 'DD.MM.YYYY') AS genehmigungsdatum,\n\t\t\t\tto_char(gmlas.untergangsdatum, 'DD.MM.YYYY') AS untergangsdatum,\n\t\t\t\tCASE WHEN vpa.planname IS NOT NULL OR vpa.rechtscharakter IS NOT NULL OR vpa.nummer IS NOT NULL OR vpa.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpa.planname, vpa.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpa.nummer, vpa.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS aendert,\n\t\t\t\tCASE WHEN vpwgv.planname IS NOT NULL OR vpwgv.rechtscharakter IS NOT NULL OR vpwgv.nummer IS NOT NULL OR vpwgv.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpwgv.planname, vpwgv.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpwgv.nummer, vpwgv.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS wurdegeaendertvon,\n\t\t\t\tgmlas.erstellungsmassstab AS erstellungsmassstab,\n\t\t\t\tgmlas.bezugshoehe AS bezugshoehe,\n\t\t\t\tst_assvg(st_transform(gmlas.raeumlichergeltungsbereich,\". $this->epsg .\"), 0, 8) AS newpath,\n\t\t\t\tst_astext(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\")) AS newpathwkt,\n\t\t\t\tCASE WHEN vm.xp_verfahrensmerkmal_vermerk IS NOT NULL OR vm.xp_verfahrensmerkmal_datum IS NOT NULL OR vm.xp_verfahrensmerkmal_signatur IS NOT NULL OR vm.xp_verfahrensmerkmal_signiert IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vm.xp_verfahrensmerkmal_vermerk, vm.xp_verfahrensmerkmal_datum, vm.xp_verfahrensmerkmal_signatur, vm.xp_verfahrensmerkmal_signiert)]::xplan_gml.xp_verfahrensmerkmal[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS verfahrensmerkmale,\n\t\t\t\tCASE\n\t\t\t\t\tWHEN count_externeref > 0\n\t\t\t\t\tTHEN array_to_json(externeref.externereferenz)\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS externereferenz,\n\t\t\t\tarray_to_json(ARRAY[to_char(aled.value, 'DD.MM.YYYY')]::date[]) AS auslegungsenddatum,\n\t\t\t\tarray_to_json(ARRAY[(g.ags,g.rs,g.gemeindename,g.ortsteilname)]::xplan_gml.xp_gemeinde[]) AS gemeinde,\n\t\t\t\tto_json((gmlas.status_codespace, gmlas.status, NULL)::xplan_gml.fp_status) AS status,\n\t\t\t\tgmlas.sachgebiet AS sachgebiet,\n\t\t\t\tto_json((pg.name, pg.kennziffer)::xplan_gml.xp_plangeber) AS plangeber,\n\t\t\t\tgmlas.rechtsstand::xplan_gml.fp_rechtsstand AS rechtsstand,\n\t\t\t\tto_char(gmlas.wirksamkeitsdatum, 'DD.MM.YYYY') AS wirksamkeitsdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(alsd.value, 'DD.MM.YYYY')]::date[]) AS auslegungsstartdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbsd.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsstartdatum,\n\t\t\t\tto_char(gmlas.entwurfsbeschlussdatum, 'DD.MM.YYYY') AS entwurfsbeschlussdatum,\n\t\t\t\tto_char(gmlas.aenderungenbisdatum, 'DD.MM.YYYY') AS aenderungenbisdatum,\n\t\t\t\tarray_to_json(ARRAY[to_char(tbed.value, 'DD.MM.YYYY')]::date[]) AS traegerbeteiligungsenddatum,\n\t\t\t\tgmlas.verfahren::xplan_gml.fp_verfahren AS verfahren,\n\t\t\t\t(gmlas.sonstplanart_codespace, gmlas.sonstplanart, NULL)::xplan_gml.fp_sonstplanart AS sonstplanart,\n\t\t\t\tgmlas.planart::xplan_gml.fp_planart AS planart,\n\t\t\t\tto_char(gmlas.planbeschlussdatum, 'DD.MM.YYYY') AS planbeschlussdatum,\n\t\t\t\tto_char(gmlas.aufstellungsbeschlussdatum, 'DD.MM.YYYY') AS aufstellungsbeschlussdatum\n\t\t\tFROM\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan gmlas LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_gemeinde gemeindelink ON gmlas.id = gemeindelink.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_gemeinde g ON gemeindelink.xp_gemeinde_pkid = g.ogr_pkid LEFT JOIN\n\t\t\t\t(\n\t\t\t\t\tSElECT\n\t\t\t\t\t\tCOUNT(*) AS count_externeref,\n\t\t\t\t\t\texternereferenzlink_sub.parent_id,\n\t\t\t\t\t\tarray_agg((e_sub.georefurl,\n\t\t\t\t\t\t\t\t(e_sub.georefmimetype_codespace, e_sub.georefmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.art::xplan_gml.xp_externereferenzart,\n\t\t\t\t\t\t\t\te_sub.informationssystemurl,\n\t\t\t\t\t\t\t\te_sub.referenzname,\n\t\t\t\t\t\t\t\te_sub.referenzurl,\n\t\t\t\t\t\t\t\t(e_sub.referenzmimetype_codespace, e_sub.referenzmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.beschreibung,\n\t\t\t\t\t\t\t\tto_char(e_sub.datum, 'DD.MM.YYYY'),\n\t\t\t\t\t\t\t\te_sub.typ::xplan_gml.xp_externereferenztyp\n\t\t\t\t\t\t\t)::xplan_gml.xp_spezexternereferenz) AS externereferenz\n\t\t\t\t\tFROM\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_externereferenz externereferenzlink_sub LEFT JOIN\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".xp_spezexternereferenz e_sub ON externereferenzlink_sub.xp_spezexternereferenz_pkid = e_sub.ogr_pkid\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\texternereferenzlink_sub.parent_id\n\t\t\t\t) externeref ON gmlas.id = externeref.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_aendert_aendert aendertlink ON gmlas.id = aendertlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".aendert aendertlinktwo ON aendertlink.child_pkid = aendertlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpa ON aendertlinktwo.xp_verbundenerplan_pkid = vpa.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_wurdegeaendertvon_wurdegeaendertvon wurdegeaendertvonlink ON gmlas.id = wurdegeaendertvonlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".wurdegeaendertvon wurdegeaendertvonlinktwo ON wurdegeaendertvonlink.child_pkid = wurdegeaendertvonlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpwgv ON wurdegeaendertvonlinktwo.xp_verbundenerplan_pkid = vpwgv.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_verfahrensmerkmale_verfahrensmerkmale verfahrensmerkmalelink ON gmlas.id = verfahrensmerkmalelink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".verfahrensmerkmale vm ON verfahrensmerkmalelink.child_pkid = vm.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_plangeber pg ON gmlas.plangeber_xp_plangeber_pkid = pg.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_auslegungsstartdatum alsd ON gmlas.id = alsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_auslegungsenddatum aled ON gmlas.id = aled.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_traegerbeteiligungsstartdatum tbsd ON gmlas.id = tbsd.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".fp_plan_traegerbeteiligungsenddatum tbed ON gmlas.id = tbed.parent_id\n\t\t\tWHERE\n\t\t\t\tgmlas.id ='\" . $gml_id . \"'\n\t\t\t;\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$result = pg_fetch_assoc($ret[1]);\n\t\treturn $result;\n\t}",
"function TestPlan_get_test_cases($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_cases', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function getEditarPlanilla($id)\n {\n $planilla = Planilla::where('id', $id)->where('estado', 'Activa')->first();\n\n if (empty($planilla)) {\n session()->flash('danger', 'La planilla no existe');\n return redirect()->action('HomeController@index');\n }\n\n //el usuario debe ser encargado, pertenecer al local, no estar desvinculado, si no redirecciona al index\n $locales = Local_User::where('user_id', Auth::user()->id)\n ->where('estado', '!=', 'Desvinculado')\n ->where('local_id', $planilla->local_id)\n ->where('rol', 'Encargado')\n ->first(); \n\n if (empty($locales)) {\n session()->flash('danger', 'Usted no tiene privilegios suficientes.');\n return redirect()->action('HomeController@index');\n }\n\n //Si esta bloqueado redirigir\n if($locales->Local->estado == 'Bloqueado'){\n session()->flash('danger', 'El local se encuentra temporalmente bloqueado.');\n return redirect()->route('usuario.mis-locales');\n } \n\n return view('usuario.planilla.editar')\n ->with('planilla', $planilla);\n }",
"public function getPlan( $name ) {\n\t\t\treturn $this->_tablePlans->fetchRow( array (\n\t\t\t\t'name = ?' => $name\n\t\t\t) );\n\t\t}",
"private function get_plan()\n\t{\n\t\treturn $this->m_plan;\n\t}",
"public function getPortletById($id) {\n try {\n $client = new Zend_Soap_Client($this->PORTLETS_WSDL);\n $options = array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n );\n $client->setOptions($options);\n $client->action = 'findByPortletId';\n $result = $client->findByPortletId($id);\n return $result;\n } catch (Exception $e) {\n //return false;\n }\n }",
"public function show($id)\n {\n return Plantilla::where('plTipoServicio',$id)->where('plEstado','=','ACTIVO')\n ->select('plCodigo', 'plDescripcion', 'plTipoServicio', 'plValorProveedor', 'plValorCliente')->get();\n }",
"public function show($id)\n\t{\n\t\t$plan_task = $this->plan_task->findOrFail($id);\n\n\t\treturn View::make('admin.plan_tasks.show', compact('plan_task'));\n\t}",
"public function get(string $id);",
"public function show($id)\n {\n $ProjectCase = ProjectCase::find($id);\n $ProjectCase->case_status_id = 4;\n $ProjectCase->save();\n $pdf = PDF::loadView('billing.pdf', ['ProjectCase' => $ProjectCase]);\n return $pdf->stream('billing.pdf');\n }",
"function get($id)\n {\n return $this->specs->get($id);\n }",
"public function testAddPackingPlan()\n {\n }",
"public function generate($id)\n {\n $plan = Testplan::find($id);\n\n return View::make('core::testplans.generating')\n ->with('attempt', 1)\n ->with('max_attempts', $plan->max_attempts)\n ->with('testplan_id', $id);\n }",
"public function getLayoutById($id) {\n try {\n $client = new Zend_Soap_Client($this->LAYOUT_WSDL_URI);\n $options = array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n );\n $client->setOptions($options);\n $client->action = 'findByLayoutId';\n $result = $client->findByLayoutId($id);\n return $result;\n } catch (Exception $e) {\n //return false;\n }\n }",
"public function add_to_plan(Request $request, $id)\n {\n $rules = [\n 'plan_id' => 'required|numeric',\n ];\n $attrs = [\n 'plan_id' => '出团计划id',\n ];\n $this->validate($request, $rules, [], $attrs);\n\n $obj = SaleOrder::find($id);\n $obj->fill($request->all());\n $obj->save();\n return redirect('/sale_order');\n \n }",
"public function getPlanPriceDetail($planId, $month)\n {\n return PlanPrice::where(['plan_id' => $planId, 'plan_month' => $month])->first(['id', 'price', 'regular_price']);\n }",
"public function show($id)\n {\n return $this->bannerService->find($id);\n }",
"function delete($id_plan) {\r\n $sql = \"DELETE FROM planes WHERE planes.id_plan ='\" . $id_plan . \"'\";\r\n\r\n $response = getResultSQL($sql);\r\n if (!$response) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }",
"public function show($id)\n {\n $plane = Plane::find($id);\n return $plane;\n }",
"public function test_admin_ban_by_id()\n {\n $this->assertTrue($this->postScriptumServer->adminBanById(1, '1h', 'Test'));\n }",
"public function testUpdatePackingPlan()\n {\n }",
"public function test_admin_ban_by_id()\n {\n $this->assertTrue($this->btwServer->adminBanById(1, '1h', 'Test'));\n }",
"public function show($id){\n return \\App\\Models\\Puzzel::where(\"id\", \"=\", $id)->get()->first();\n }",
"public function getBudgetObjectById($id) {\n\t\t$dbh = Database::getPdo();\n\t\ttry {\n\t\t\t$sql = \"SELECT * FROM \" . self::DB_TABLE . \" WHERE id = :id LIMIT 1\";\n\t\t\t$stmt = $dbh->prepare($sql);\n\t\t\t$stmt->bindParam(':id', $id, PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t\t$budget = new Budget();\n\t\t\t$stmt->setFetchMode(PDO::FETCH_INTO, $budget);\n\t\t\t$result = $stmt->fetch();\n\t\t\treturn $result;\n\t\t} catch (PDOException $e) {\n\t\t\techo 'Unable to retrieve record ' . $e->getMessage();\n\t\t}\n\t}",
"public function edit($id)\n {\n if (!Auth::user()->isAdmin() && !Auth::user()->isTech() && !Auth::user()->isManager() && !Auth::user()->isPlanneur() && !Auth::user()->isFM()) {\n return redirect()->back();\n }\n\n $planning = Planning::find($id);\n\n return response::json($planning);\n }"
] | [
"0.77702576",
"0.72825444",
"0.72723746",
"0.6831339",
"0.6782894",
"0.67447287",
"0.6649196",
"0.64445394",
"0.6245478",
"0.6219346",
"0.6130191",
"0.6126213",
"0.61237174",
"0.6088018",
"0.60769147",
"0.60667604",
"0.6017432",
"0.60142",
"0.6013399",
"0.6007578",
"0.6003456",
"0.59946144",
"0.5978065",
"0.5968885",
"0.5939564",
"0.5865152",
"0.5788015",
"0.5740003",
"0.5715456",
"0.57033527",
"0.56916267",
"0.56908107",
"0.56797993",
"0.5679339",
"0.56765556",
"0.5672096",
"0.56644225",
"0.56551063",
"0.5631879",
"0.56181514",
"0.5592608",
"0.55891466",
"0.557427",
"0.55715364",
"0.55690914",
"0.5560227",
"0.5557822",
"0.5542791",
"0.5535718",
"0.55339724",
"0.5532735",
"0.552444",
"0.55019385",
"0.5490391",
"0.5472375",
"0.54450256",
"0.5444702",
"0.54393065",
"0.54199135",
"0.5416324",
"0.54047245",
"0.54028875",
"0.53876567",
"0.53815794",
"0.53805053",
"0.53751147",
"0.5371947",
"0.5363321",
"0.53608805",
"0.5354923",
"0.53426206",
"0.53340733",
"0.5327509",
"0.53210443",
"0.5320207",
"0.5311299",
"0.5296966",
"0.5295073",
"0.5285805",
"0.52830726",
"0.5282564",
"0.52768487",
"0.5273369",
"0.52422506",
"0.5237832",
"0.52346265",
"0.5230719",
"0.52262837",
"0.5226123",
"0.5218375",
"0.521833",
"0.521741",
"0.521616",
"0.52110773",
"0.5209513",
"0.52035713",
"0.5191387",
"0.5188173",
"0.51848894",
"0.51836544"
] | 0.7068605 | 3 |
Test case for getPackingPlanFiles Get the files for a packingPlan.. | public function testGetPackingPlanFiles()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFiles() {}",
"public function getFiles ();",
"public function testAddPackingPlanFile()\n {\n }",
"public function getFiles();",
"public function getFiles();",
"public function getFiles();",
"private function getTestFileList() {\n\t\treturn [\n\t\t\tself::makeFileInfo('a.txt', 4, 2.3 * \\pow(10, 9)),\n\t\t\tself::makeFileInfo('q.txt', 5, 150),\n\t\t\tself::makeFileInfo('subdir2', 87, 128, true),\n\t\t\tself::makeFileInfo('b.txt', 2.2 * \\pow(10, 9), 800),\n\t\t\tself::makeFileInfo('o.txt', 12, 100),\n\t\t\tself::makeFileInfo('subdir', 88, 125, true),\n\t\t];\n\t}",
"public function testAddPackingPlanFileByURL()\n {\n }",
"public function get_files()\n {\n }",
"abstract protected function getFilesDestination();",
"function _generateFilesList() {\n return array();\n }",
"protected static function _getPackageFiles($sName)\r\n\t{\r\n\t\t$aParams = self::$_aParams[$sName];\r\n\r\n\t\t$sType = $aParams['type'];\r\n\t\t$sBaseFolder = (empty($aParams['folder']) ? $sType : $aParams['folder']) . '/';\r\n\r\n\t\t// Files are listed as array, return them\r\n\t\tif (is_array($aParams['files']))\r\n\t\t{\r\n\t\t\t$aRet = array();\r\n\t\t\tforeach ($aParams['files'] as $sFile)\r\n\t\t\t\t$aRet[] = $sBaseFolder . $sFile;\r\n\t\t\treturn $aRet;\r\n\t\t}\r\n\r\n\t\t// User wants all files to be included\r\n\t\tif ($aParams['files'] == '*')\r\n\t\t{\r\n\t\t\t$sFileType = '.' . $sType;\r\n\t\t\t$iFileTypeLen = strlen($sFileType);\r\n\t\t\t$aAllFiles = array();\r\n\t\t\t$aFiles = scandir(ASAP_DIR_WEB . $sBaseFolder);\r\n\t\t\tforeach ($aFiles as $sFile)\r\n\t\t\t\tif ($sFile != '.' && $sFile != '..' && substr($sFile, -$iFileTypeLen) == $sFileType && strpos($sFile, '.asap_pack.') === false)\r\n\t\t\t\t\t$aAllFiles[] = $sFile;\r\n\t\t\treturn $aAllFiles;\r\n\t\t}\r\n\r\n\t\t// Strange config, thus we return nothing\r\n\t\treturn array();\r\n\t}",
"public function files();",
"public function files();",
"public function files();",
"protected function getFilesInDirCreateTestDirectory() {}",
"public function buildFilesForFilterTest()\n {\n // are used as the test method arguments. If we want to use an array\n // as a test data set, we need to return a nested array\n return array(\n array(\n $this->buildFilesSet1()[0],\n array(\n 'internal' => array(\n 'example/image2',\n ),\n 'external' => array(\n 'example/image1',\n ),\n ),\n ),\n array(\n $this->buildFilesSet2()[0],\n array(\n 'internal' => array(\n 'example/image2',\n 'example/image3',\n 'example/image4',\n ),\n 'external' => array(\n 'example/image1',\n 'example/image5',\n ),\n ),\n ),\n );\n }",
"function get_request_files($surveyid, $requestid)\n\t{\t\n\t\t//get all survey licensed files\n\t\t$files=$this->get_survey_licensed_files($surveyid);\t\t\n\t\t\t\n\t\t//get download options already set\n\t\t$options=$this->get_request_download_options($requestid);\t\t\n\t\t$result=NULL;\t\t\n\t\tif ($files)\n\t\t{\n\t\t\tforeach($files as $file)\n\t\t\t{\n\t\t\t\tif ($options)\n\t\t\t\t{\n\t\t\t\t\tforeach($options as $option)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($file['resource_id']==$option['fileid'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$file['download']=$option;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t$result[]=$file;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn $result;\n\t}",
"public function testGetFiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function getAllFiles()\n {\n }",
"public function getFiles(): array;",
"public function testGetExternalShipmentFiles()\n {\n }",
"public function getFiles()\n {\n return $this->getConfig('stubs.files');\n }",
"public function getFiles() {\r\n\r\n $files = array();\r\n\r\n $userId= $this->userId;\r\n $trackingId = $this->trackingFormId;\r\n $dir = FILEPATH . $userId. '/' . $trackingId;\r\n\r\n if (is_dir($dir)) {\r\n if ($dh = opendir($dir)) {\r\n while (($file = readdir($dh)) !== false) {\r\n if($file != '.' && $file != '..') {\r\n $size = $this->Size($dir . '/' . $file);\r\n array_push($files, array('name'=>$file,\r\n 'urlfilename'=>urlencode($file),\r\n 'size'=>$size));\r\n }\r\n }\r\n closedir($dh);\r\n }\r\n }\r\n\r\n return $files;\r\n }",
"public function gatherFileData()\n {\n $files = get_included_files();\n\n $fileList = array();\n\n $fileTotals = array(\n \"count\" => count($files),\n \"size\" => 0,\n \"largest\" => 0,\n );\n\n foreach($files as $key => $file) {\n $size = filesize($file);\n\n $fileList[] = array(\n 'name' => str_replace(BASEPATH, '/', $file),\n 'size' => $this->getReadableFileSize($size)\n );\n\n $fileTotals['size'] += $size;\n\n if($size > $fileTotals['largest']) $fileTotals['largest'] = $size;\n }\n\n $fileTotals['size'] = $this->getReadableFileSize($fileTotals['size']);\n $fileTotals['largest'] = $this->getReadableFileSize($fileTotals['largest']);\n\n $this->output['files'] = $fileList;\n $this->output['fileTotals'] = $fileTotals;\n }",
"protected function zipFiles()\n {\n $cacheDir = $this->getCacheDir();\n $zipFile = $cacheDir . '/' . date('Ymd-His');\n $zipCommand = 'zip - ' . implode(' ', $this->folders) . ' | split -b ' . $this->filePartSize . ' - ' . $zipFile;\n\n $this->stdout($zipCommand);\n\n //exec( $zipCommand, $out );\n\n $files = FileHelper::findFiles($cacheDir . '/');\n $uploadedFiles = [];\n\n foreach ($files as $file) {\n $this->dumpFiles[] = $uploadedFiles[] = $file;\n }\n\n return $uploadedFiles;\n }",
"public function testGetPackingPlanByFilter()\n {\n }",
"public function testShouldGetFileInfo() {\n\t\t$this->assertEquals(\n\t\t\t$this->_testFilesId[0],\n\t\t\t$this->_Files->run(['ids' => $this->_testFilesId])[0]['id']\n\t\t);\n\t}",
"protected function getAvailableFiles() {\n\t\t$sql = \"SELECT\tfilename\n\t\t\tFROM\twcf\".WCF_N.'_'.$this->tableName.\"\n\t\t\tWHERE\tpackageID = \".$this->installation->getPackageID();\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\n\t\t$availableFiles = array();\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$availableFiles[] = $row['filename'];\n\t\t}\n\t\t\n\t\treturn $availableFiles;\n\t}",
"protected function _getSubsetFile() {}",
"public function testFiles() {\n\t\t$repoSrc = ROOT . DS . 'src';\n\n\t\t$this->shell->args = [$repoSrc];\n\n\t\t$files = $this->shell->Stage->files();\n\t\tforeach ($files as &$file) {\n\t\t\t$file = str_replace(DS, '/', substr($file, strlen($repoSrc) + 1));\n\t\t}\n\n\t\t$expected = [\n\t\t\t'Shell/UpgradeShell.php',\n\t\t\t'Shell/Task/BaseTask.php',\n\t\t\t'Shell/Task/RenameCollectionsTask.php',\n\t\t\t'Shell/Task/NamespacesTask.php',\n\t\t\t'Shell/Task/StageTask.php',\n\t\t\t'Shell/Task/TestsTask.php',\n\t\t\t'Shell/Task/AppUsesTask.php',\n\t\t\t'Shell/Task/FixturesTask.php',\n\t\t\t'Shell/Task/RenameClassesTask.php',\n\t\t\t'Shell/Task/MethodNamesTask.php',\n\t\t\t'Shell/Task/MethodSignaturesTask.php',\n\t\t\t'Shell/Task/HelperTrait.php',\n\t\t\t'Shell/Task/ChangeTrait.php',\n\t\t\t'Shell/Task/LocationsTask.php',\n\t\t\t'Shell/Task/I18nTask.php',\n\t\t\t'Shell/Task/SkeletonTask.php',\n\t\t\t'Shell/Task/TemplatesTask.php',\n\t\t\t'Shell/Task/ModelToTableTask.php',\n\t\t\t'Shell/Task/CleanupTask.php',\n\t\t\t'Shell/Task/PrefixedTemplatesTask.php',\n\t\t\t'Shell/Task/CustomTask.php',\n\t\t\t'Shell/Task/LocaleTask.php',\n\t\t\t'Shell/Task/UrlTask.php',\n\t\t\t'Shell/Task/TableToEntityTask.php',\n\t\t\t'Shell/Task/FixtureLoadingTask.php',\n\t\t\t'Shell/Task/FixtureCasingTask.php',\n\t\t];\n\n\t\tforeach ($expected as $file) {\n\t\t\t$this->assertTrue(in_array($file, $files, true), 'The files to process should be all files in the src folder - ' . $file);\n\t\t}\n\t}",
"public function directoryWithFilesDataProvider(): array\n {\n $multiMap = ['OtherFile' => 'other_file.json', 'JSONFile' => 'j_s_o_n_file.json'];\n $multiDirMap = ['FileFirst' => 'first/file_first.exe', 'FileSecond' => 'first/file_second.exe'];\n $multiDirMap['FileThird'] = 'second/file_third.exe';\n $multiDirMap['SomeExt'] = 'some_ext.exe';\n $singleLoadData = ['OneFile' => ['param1' => 'some_value']];\n $multiLoadData = ['OtherFile' => ['param2' => 'other_value'], 'JSONFile' => ['param3' => 'last_value']];\n $multiDirLoadData = ['FileFirst' => ['param4' => 'no_value'], 'FileSecond' => ['param5' => 'ext_value']];\n $multiDirLoadData['FileThird'] = ['param6' => 'this_value'];\n $multiDirLoadData['SomeExt'] = ['param7' => 'that_value'];\n\n return [\n 'single file' => ['single', '/^.*\\..*$/', ['OneFile' => 'one_file.json'], $singleLoadData],\n 'multiple files with mask' => ['multi', '/^.*\\.json$/', $multiMap, $multiLoadData],\n 'multiple directories' => ['container', '/^.*\\.exe$/', $multiDirMap, $multiDirLoadData],\n ];\n }",
"public function getTaskFiles($task_id){\n\n $files=array();\n $folder_path=REPOSITORY_PATH . '/'. $task_id .'/';\n if (is_dir($folder_path)) {\n if($folder = opendir($folder_path)){\n while(false !== ($file = readdir($folder))){\n if($file != '.' && $file != '..' && $file != 'index.php'){\n $files[]=array(\n \"folder_path\" => $folder_path,\n \"filename\" => $file\n );\n }\n }\n }\n }\n\n return $files;\n }",
"public function loadFilesProduction()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalFiles = $project->filesByType(array('vendor','university','designer','writer','attorney','2d'));\r\n foreach($internalFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'date'=>$file->created_at];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"public static function passing_files() : array {\n\t\t$directory = dirname( __DIR__ ) . '/fixtures/ruleset/Lipe/pass';\n\n\t\treturn static::get_files_from_dir( $directory );\n\t}",
"public function loadFilesLaunch()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalAndPublicFiles = $project->filesByType(array('public','clientVendor'));\r\n foreach($internalAndPublicFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'projectId'=>$id];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"function getFilesFromPath($itemid, $fieldid, $exts=null, $pending = false)\n\t{\n\t\t// Set pending FLAG\n\t\t$this->_pending = $pending;\n\n\t\t// Retrieving files from a folder , do not use pagination\n\t\t$this->_total_pending = 0;\n\t\t$this->_total = 0;\n\n\t\t$app = JFactory::getApplication();\n\t\t$jinput = $app->input;\n\t\t$option = $jinput->get('option', '', 'cmd');\n\t\t$cparams = JComponentHelper::getParams('com_flexicontent');\n\n\t\t$exts = $exts ?: $cparams->get('upload_extensions', 'bmp,wbmp,csv,doc,docx,webp,gif,ico,jpg,jpeg,odg,odp,ods,odt,pdf,png,ppt,pptx,txt,xcf,xls,xlsx,zip,ics');\n\t\t$imageexts = array('png', 'gif', 'jpeg', 'jpg', 'webp', 'wbmp', 'bmp', 'ico'); // Common image extensions\n\t\t$options = array();\n\t\t$gallery_folder = $this->getFieldFolderPath($itemid, $fieldid, $options);\n\t\t//echo $gallery_folder .\"<br />\";\n\n\t\t// Create field's folder if it does not exist already\n\t\tif (!is_dir($gallery_folder))\n\t\t{\n\t\t\tmkdir($gallery_folder, $mode = 0755, $recursive=true);\n\t\t}\n\n\t\t// Get file list according to filtering\n\t\t$exts = preg_replace(\"/[\\s]*,[\\s]*/\", '|', $exts);\n\t\t$it = new RegexIterator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($gallery_folder)), '#(.*\\.)('.$exts.')#i');\n\t\t$it->rewind();\n\n\t\tif ($this->_pending)\n\t\t{\n\t\t\tif (!$itemid)\n\t\t\t{\n\t\t\t\treturn array();\n\t\t\t}\n\t\t\t$upload_context = 'fc_upload_history.item_' . $itemid . '_field_' . $fieldid;\n\t\t\t$session_files = JFactory::getSession()->get($upload_context, array());\n\n\t\t\t$names_pending = isset($session_files['names_pending'])\n\t\t\t\t? $session_files['names_pending']\n\t\t\t\t: array();\n\t\t\t$names_pending = array_flip($names_pending);\n\t\t}\n\n\t\tif ( $options['image_source'] === 1 )\n\t\t{\n\t\t\t$this->cleanUpFolderModeFolders($options['base_path']);\n\t\t}\n\n\t\t// Get file information\n\t\tstatic $mime_icons = array();\n\t\t$rows = array();\n\t\t$i = 1;\n\t\twhile($it->valid())\n\t\t{\n\t\t\tif ($it->isDot())\n\t\t\t{\n\t\t\t\t$it->next();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$filesubpath = $it->getSubPathName(); // filename including the folder subpath\n\t\t\t$filepath = $it->key();\n\t\t\t$pinfo = pathinfo($filepath);\n\t\t\t$row = new stdClass();\n\t\t\t$row->ext = $pinfo['extension'];\n\n\t\t\t// Convert directory separators inside the subpath\n\t\t\t$row->filename = str_replace('\\\\', '/', $filesubpath); //$pinfo['filename'].\".\".$pinfo['extension'];\n\n\t\t\t// Lets load the files if it doesn't already exist\n\t\t\tif ($this->_pending)\n\t\t\t{\n\t\t\t\tif ( !isset($names_pending[$row->filename]))\n\t\t\t\t{\n\t\t\t\t\t$it->next();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Try to create a UTF8 filename\n\t\t\t$row->filename_original = iconv(mb_detect_encoding($row->filename, mb_detect_order(), true), \"UTF-8\", $row->filename);\n\t\t\t$row->filename_original = $row->filename_original ? $row->filename_original : $row->filename;\n\n\t\t\t$row->size = sprintf(\"%.0f KB\", (filesize($filepath) / 1024) );\n\t\t\t$row->altname = $pinfo['filename'];\n\n\t\t\t$row->uploader = '-';\n\t\t\t$row->uploaded = date(\"F d Y H:i:s.\", filectime($filepath) );\n\n\t\t\t$row->url = 0;\n\t\t\t$row->id = $i;\n\n\t\t\tif ( in_array(strtolower($row->ext), $imageexts))\n\t\t\t{\n\t\t\t\t$row->icon = JUri::root().\"components/com_flexicontent/assets/images/mime-icon-16/image.png\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$exists = $row->ext && isset($mime_icons[$row->ext])\n\t\t\t\t\t? $mime_icons[$row->ext]\n\t\t\t\t\t: null;\n\n\t\t\t\t// Check exists only once\n\t\t\t\tif ($row->ext && $exists === null)\n\t\t\t\t{\n\t\t\t\t\t$exists = $mime_icons[$row->ext] = file_exists(JPATH_SITE . '/components/com_flexicontent/assets/images/mime-icon-16/' . $row->ext . '.png');\n\t\t\t\t}\n\n\t\t\t\t$row->icon = $exists\n\t\t\t\t\t? JUri::root() . 'components/com_flexicontent/assets/images/mime-icon-16/' . $row->ext . '.png'\n\t\t\t\t\t: JUri::root() . 'components/com_flexicontent/assets/images/mime-icon-16/unknown.png';\n\t\t\t}\n\n\t\t\tif ($this->_pending)\n\t\t\t{\n\t\t\t\t$rows[$row->filename] = $row;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\n\t\t\t$i++;\n\t\t\t$it->next();\n\t\t}\n\n\t\t// Lets load the files if it doesn't already exist\n\t\tif ($this->_pending)\n\t\t{\n\t\t\t$_rows = array();\n\t\t\tforeach($names_pending as $filename => $file)\n\t\t\t{\n\t\t\t\t$_rows[] = $rows[$filename];\n\t\t\t}\n\t\t\t$rows = $_rows;\n\t\t}\n\n\t\treturn $rows;\n\t}",
"public function get_codehandin_submission_assignfiles($assignmentid) {\r\n $result = array();\r\n $fs = get_file_storage();\r\n\r\n $files = $fs->get_area_files(\r\n $this->assignment->get_context()->id, 'assignsubmission_codehandin', ASSIGNSUBMISSION_CODEHANDIN_FILEAREA, $assignmentid, 'timemodified', false);\r\n\r\n foreach ($files as $file) {\r\n $result[$file->get_filename()] = $file;\r\n echo $file->get_filename();\r\n }\r\n return $result;\r\n }",
"function getFiles(){\n\t\treturn $this->used_files;\n\t}",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/trickstr.php',\n 'sources_custom/programe/.htaccess',\n 'sources_custom/programe/aiml/.htaccess',\n 'sources_custom/programe/aiml/index.html',\n 'sources_custom/programe/index.html',\n 'sources_custom/hooks/modules/chat_bots/knowledge.txt',\n 'sources_custom/hooks/modules/chat_bots/trickstr.php',\n 'sources_custom/programe/aiml/readme.txt',\n 'sources_custom/programe/aiml/startup.xml',\n 'sources_custom/programe/aiml/std-65percent.aiml',\n 'sources_custom/programe/aiml/std-pickup.aiml',\n 'sources_custom/programe/botloaderfuncs.php',\n 'sources_custom/programe/customtags.php',\n 'sources_custom/programe/db.sql',\n 'sources_custom/programe/graphnew.php',\n 'sources_custom/programe/respond.php',\n 'sources_custom/programe/util.php',\n );\n }",
"function getFiles($folder) {\n\t\tif (!file_exists($folder)) {\n\t\t\tLogger(\"ERR\", \"Folder not found\");\n\t\t}\n\t\t$src_files = $this->listFiles($folder);\n\t\treturn $src_files;\n\t}",
"public function testDeletePackingPlanFile()\n {\n }",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/idolisr.php',\n 'sources_custom/hooks/modules/members/idolisr.php',\n 'sources_custom/miniblocks/main_stars.php',\n 'sources_custom/miniblocks/side_recent_points.php',\n 'themes/default/templates_custom/POINTS_GIVE.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_STARS.tpl',\n 'themes/default/templates_custom/BLOCK_SIDE_RECENT_POINTS.tpl',\n );\n }",
"public function buildFileSets()\n {\n // are used as the test method arguments. If we want to use an array\n // as a test data set, we need to return a nested array\n return array(\n $this->buildFilesSet1(), // data set for test run #1\n $this->buildFilesSet2(), // data set for test run #2\n );\n }",
"public function getFiles() {\n return $this->getPartFiles(0);\n }",
"public function testGetPhpFiles()\n {\n // Files arrays\n $files = [];\n $phpFiles = [];\n\n // For every specified folder\n foreach ($this->phpFolders as $folder) {\n\n // Get files from directory\n $files = array_merge($files, FileHelper::directoryFiles($folder));\n }\n\n // Select php only files\n foreach ($files as $file) {\n if (substr($file, -4) === '.php') {\n $phpFiles[] = $file;\n }\n }\n\n // Check that we have at least 10 php files across all collected\n $count = count($phpFiles);\n $this->assertTrue($count > 10, json_encode([\n 'count' => $count,\n 'expected' => 'total number of php files must exceed 10 files',\n ], JSON_UNESCAPED_SLASHES));\n\n // Return end point data\n return $phpFiles;\n }",
"function &getFiles() {\n\t\tif (!isset($this->files)) {\n\t\t\t$res = db_query_params ('SELECT id,artifact_id,description,filename,filesize,' .\n\t\t\t\t\t'filetype,adddate,submitted_by,user_name,realname\n\t\t\t\t\t FROM artifact_file_user_vw WHERE artifact_id=$1',\n\t\t\t\t\t\tarray ($this->getID())) ;\n\t\t\t$rows=db_numrows($res);\n\t\t\tif ($rows > 0) {\n\t\t\t\tfor ($i=0; $i < $rows; $i++) {\n\t\t\t\t\t$this->files[$i]=new ArtifactFile($this,db_fetch_array($res));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->files=array();\n\t\t\t}\n\t\t}\n\t\treturn $this->files;\n\t}",
"public function getFiles()\n {\n return FileInfo::findBy( Condition::EQ(FileInfo::TABLE, 'module_id', $this->getId()),\n new ArrayObject(array('sort'=>$this->getSortBy(), 'ord'=>'asc')) );\n }",
"public static function passing_files() {\n\t\t$directory = __DIR__ . '/fixtures/pass';\n\n\t\treturn static::get_files_from_dir( $directory );\n\t}",
"protected function _getFiles() {\n\t\t$Directory = new RecursiveDirectoryIterator(BACKUPS);\n\t\t$It = new RecursiveIteratorIterator($Directory);\n\t\t$Regex = new RegexIterator($It, '/dbdump_.*?[\\.sql|\\.gz]$/', RecursiveRegexIterator::GET_MATCH);\n\t\t$files = array();\n\t\tforeach ($Regex as $v) {\n\t\t\t$files[] = $v[0];\n\t\t}\n\t\t$files = array_reverse($files);\n\t\treturn $files;\n\t}",
"protected function getFiles() {\n\t\tif ($this->_files === null) {\n\t\t\t$files = array(\n\t\t\t\t\"test.txt\" => uniqid(),\n\t\t\t\t\"test2.txt\" => uniqid(),\n\t\t\t\t\"test3.txt\" => uniqid(),\n\t\t\t);\n\t\t\tforeach($files as $file => $content) {\n\t\t\t\tfile_put_contents($this->path.\"/\".$file,$content);\n\t\t\t\t$this->assertTrue(file_exists($this->path.\"/\".$file));\n\t\t\t}\n\t\t\t$this->_files = array_keys($files);\n\t\t}\n\t\treturn $this->_files;\n\t}",
"protected function getBasicFiles(): array\n {\n $array = [\n $this->folderPaths['logs'] . DIRECTORY_SEPARATOR . '.gitignore' => \"!.gitignore\\n\",\n $this->folderPaths['framework'] . DIRECTORY_SEPARATOR . '.gitignore' => 'down' . \"\\n\",\n $this->folderPaths['tests'] . DIRECTORY_SEPARATOR . 'AbstractTestCase.php' => $this->generateAbstractTestCaseClass(),\n $this->folderPaths['tests'] . DIRECTORY_SEPARATOR . 'bootstrap.php' => $this->generateBootstrapFile(),\n ];\n\n if (! self::$isTest) {\n $array['phpunit.xml'] = $this->getPhpunitXml();\n }\n\n return $array;\n }",
"public function getOtherFiles(): array;",
"public function lookForFiles()\n\t{\n\t\t$this->_jobOptions = [];\n\n\t\tforeach ($this->getProject()->jobs as $job) {\n\t\t\tif ($job->paramountProjectJob instanceof ParamountProjectJob){\n\n\t\t\t\t$this->setProjectJob($job);\n\n\t\t\t\t$this->buildJobOptionsForService();\n\t\t\t}\n\t\t}\n\n\t}",
"function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}",
"function getFiles($searchdir) {\n\tglobal $jlistConfig;\n $up_files = array();\n\n\tif(file_exists(JPATH_SITE.'/'.$jlistConfig['files.uploaddir'])){\n $startdir = JPATH_SITE.'/'.$jlistConfig['files.uploaddir'].'/';\n $dir_len = strlen($startdir);\n $dir = $startdir;\n $type = array(\"zip\",\"txt\",\"pdf\");\n $only = FALSE;\n $allFiles = TRUE;\n $recursive = TRUE;\n $onlyDir = TRUE;\n $files = array();\n $file = array();\n\n $all_dirs = scan_dir($dir, $typ, $only, $allFiles, $recursive, $onlyDir, $files);\n if ($all_dirs != FALSE) {\n reset ($files);\n foreach($files as $key => $array) {\n // ist dirname > startdir?\n if ($startdir <> $files[$key]['path']) {\n // unterverzeichnis vorhanden - nur pfadnamen ab download root + dateinamen\n $restpath = substr($files[$key]['path'], $dir_len);\n $files[$key]['path'] = $restpath;\n } else { // dir ist startdir - also nur filenamen\n $files[$key]['path'] = '';\n }\n }\n\n // list all files\n foreach($files as $key3 => $array2) {\n if ($files[$key3]['file'] <> '') {\n // no files in tempzifiles directory\n if(strpos($files[$key3]['path'], 'tempzipfiles') === FALSE) {\n $up_files[] = $files[$key3]['path'].$files[$key3]['file'];\n }\n }\n }\n }\n }\n\treturn $up_files;\n}",
"function _fillFiles()\n\t{\n\t\t// directory from which we import (real path)\n\t\t$importDirectory = ereg_replace(\n\t\t\t\t\"^(.*)/$\", \n\t\t\t\t'\\1', \n\t\t\t\tereg_replace(\"^(.*)/$\", '\\1', $_SERVER[\"DOCUMENT_ROOT\"]) . $this->from);\n\t\t\n\t\t// when running on windows we have to change slashes to backslashes\n\t\tif (runAtWin()) {\n\t\t\t$importDirectory = str_replace(\"/\", \"\\\\\", $importDirectory);\n\t\t}\n\t\t$this->_files = array();\n\t\t$this->_depth = 0;\n\t\t$this->_postProcess = array();\n\t\t$this->_fillDirectories($importDirectory);\n\t\t// sort it so that webEdition files are at the end (that templates know about css and js files)\n\t\t\n\n\t\t$tmp = array();\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] == \"folder\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] != \"folder\" && $e[\"contentType\"] != \"text/webedition\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] == \"text/webedition\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_files = $tmp;\n\t\t\n\t\tforeach ($this->_postProcess as $e) {\n\t\t\tarray_push($this->_files, $e);\n\t\t}\n\t}",
"public function getFileInfo();",
"function getFiles()\r\n\t{\r\n\t\treturn $this->files;\r\n\t}",
"function turnitintooltwo_getfiles($moduleid) {\n global $DB, $CFG, $OUTPUT;\n\n $secho = optional_param('sEcho', 1, PARAM_INT);\n $moduleid = (int)$moduleid;\n\n $queryparams = array();\n\n $query = \"SELECT fl.id AS id, cm.id AS cmid, tu.id AS activityid, tu.name AS activity, tu.anon AS anon_enabled, \".\n \"sb.submission_unanon AS unanon, sb.id AS submission_id, us.firstname AS firstname, us.lastname AS lastname, \".\n \"us.email AS email, us.id AS userid, fl.mimetype AS mimetype, fl.filesize AS filesize, fl.timecreated AS created, \".\n \"fl.pathnamehash AS hash, fl.filename AS rawfilename, fl.itemid AS itemid, fl.contextid AS contextid, \".\n \"cs.fullname AS coursetitle, cs.shortname AS courseshort, cs.id AS course, sb.submission_filename AS filename, \".\n \"sb.submission_objectid AS objectid \".\n \"FROM {files} fl \".\n \"LEFT JOIN {turnitintooltwo_submissions} sb ON fl.itemid = sb.id \".\n \"LEFT JOIN {user} us ON sb.userid = us.id \".\n \"LEFT JOIN {context} cx ON fl.contextid = cx.id \".\n \"LEFT JOIN {course_modules} cm ON cx.instanceid = cm.id \".\n \"LEFT JOIN {turnitintooltwo} tu ON cm.instance = tu.id \".\n \"LEFT JOIN {course} cs ON tu.course = cs.id \".\n \"WHERE fl.component = 'mod_turnitintooltwo' AND fl.filesize != 0 AND cm.module = :moduleid \";\n\n $params = array_merge(array('moduleid' => $moduleid), $queryparams);\n $files = $DB->get_records_sql($query, $params);\n $totalfiles = count($files);\n\n $return = array(\"sEcho\" => $secho, \"iTotalRecords\" => count($files), \"iTotalDisplayRecords\" => $totalfiles,\n \"aaData\" => array());\n\n foreach ($files as $file) {\n\n if (!empty($ssearch) AND ($file->anon_enabled == 1 AND !is_null($file->unanon) AND !$file->unanon)) {\n $return['iTotalDisplayRecords'] = $return['iTotalDisplayRecords'] - 1;\n continue; // If these are search results and this is anonymised skip it.\n }\n\n if (is_null($file->activityid)) {\n $assignment = html_writer::tag(\"span\", get_string('assigngeterror', 'turnitintooltwo'),\n array(\"class\" => \"italic bold\"));\n } else {\n $assignment = html_writer::link($CFG->wwwroot.'/mod/turnitintooltwo/view.php?id='.$file->cmid,\n $file->coursetitle . ' (' . $file->courseshort . ') - ' . $file->activity);\n }\n\n $filenametodisplay = (empty($file->filename) ? $file->rawfilename : $file->filename);\n $submission = html_writer::link($CFG->wwwroot.'/pluginfile.php/'.$file->contextid.'/mod_turnitintooltwo/submissions/'.\n $file->itemid.'/'.$file->rawfilename,\n $OUTPUT->pix_icon('fileicon', 'open '.$filenametodisplay, 'mod_turnitintooltwo').\" \".\n $filenametodisplay);\n\n if (($file->anon_enabled == 1 && $file->unanon == 1) ||\n ($file->anon_enabled == 0 && (!empty($file->firstname) || !empty($file->lastname)))) {\n $user = html_writer::link($CFG->wwwroot.'/user/view.php?id='.$file->userid,\n fullname($file) . '</a> (' . $file->email . ')');\n } else if ($file->anon_enabled == 1 && empty($file->unanon)) {\n $user = get_string('anonenabled', 'turnitintooltwo');\n } else {\n $user = get_string('nosubmissiondataavailable', 'turnitintooltwo');\n }\n\n $delete = '';\n if (!empty($file->objectid) OR empty($file->filename)) {\n $fnd = array(\"\\n\", \"\\r\");\n $rep = array('\\n', '\\r');\n $attributes[\"onclick\"] = \"return confirm('\".str_replace($fnd, $rep,\n get_string('filedeleteconfirm', 'turnitintooltwo')).\"');\";\n $delete = html_writer::link($CFG->wwwroot.'/mod/turnitintooltwo/settings_extras.php?cmd=files&file='.\n $file->id.'&filehash='.$file->hash,\n html_writer::tag('i', '', array('title' => get_string('deletesubmission', 'turnitintooltwo'),\n 'class' => 'fa fa-trash-o fa-lg')), $attributes);\n }\n\n $return[\"aaData\"][] = array($assignment, $file->courseshort, $file->coursetitle, $submission,\n \" \", $user, \" \", userdate($file->created), $delete);\n }\n\n return $return;\n}",
"private function _get_files($ext=false)\n\t{\n\t\t\n\t\t$files = PerchUtil::get_dir_contents(PERCH_RESFILEPATH);\n\n\t\t$returnfiles = array();\n\t\tif(PerchUtil::count($files) > 0) {\n\t\t\tforeach($files as $file) {\n\t\t\t\t// if a file extension has been provided only add files with that extension\n\t\t\t\tif($ext) {\n\t\t\t\t\tif(strtolower(trim($ext)) == strtolower(PerchUtil::file_extension($file))) {\n\t\t\t\t\t\t$returnfiles[] = array('label'=>$file, 'value'=>$file);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// prepare all files for display\n\t\t\t\t\t$returnfiles[] = array('label'=>$file, 'value'=>$file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(PerchUtil::count($returnfiles) > 0) {\n\t\t\treturn $returnfiles;\n\t\t} else {\t\n\t\t\treturn false;\n\t\t}\n\t}",
"public function buildFilesSet1()\n {\n // are used as the test method arguments. If we want to use an array\n // as a test data set, we need to return a nested array\n return array(array(\n 'example/image2' =>\n (new DebianImage())->from('example/image1'),\n 'example/image1' =>\n (new DebianImage())->from('ubuntu')\n ,\n ));\n }",
"public static function filelist()\n\t{\n\t\tglobal $g_relative_file_directory;\t// '../../UPLOADS/';\n\t\tglobal $g_relative_root_directory;\t// 'UPLOADS/';\n\n\t\t$actualdirectory = $_POST['actualdir'];\n\t\tif(!$actualdirectory)\n\t\t\t$actualdirectory='';\n\n\t\t$result = [];\n\t\t$result['directory'] = $g_relative_root_directory;\n\t\t$result['actualdir'] = $actualdirectory;\n\n\t\tif(strlen($actualdirectory)>0)\n\t\t\t$actualdirectory.=\"/\";\n\n\t\t$reldir = $g_relative_file_directory.$actualdirectory;\n\t\t$dirs=[];\n\t\tforeach(glob($reldir.'*', GLOB_ONLYDIR) as $d)\n\t\t{\n\t\t\t$fn=str_replace($reldir,'',$d);\n\t\t\t$dirs[] = $fn;\n\t\t}\n\t\t$result['dirs']=$dirs;\n\t\t//$result['reldir']=$reldir;\n\n\t\t$filenames = [];\n\t\tforeach(array_filter(glob($reldir.'*.*'), 'is_file') as $file)\n\t\t{\n\t\t\t$farray = [];\n\t\t\t$fn=str_replace($reldir,'',$file);\n\n\t\t\t$f=filesize($file);\n\t\t\t$fe=\"bytes\";\n\t\t\tif($f/1024 > 1)\n\t\t\t{\n\t\t\t\t$f/=1024;\n\t\t\t\t$fe=\"kb\";\n\t\t\t\tif($f/1024 > 1)\n\t\t\t\t{\n\t\t\t\t\t$f/=1024;\n\t\t\t\t\t$fe=\"Mb\";\n\t\t\t\t\tif($f/1024 > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$f/=1024;\n\t\t\t\t\t\t$fe=\"GB\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$farray['Filename'] = $fn;\n\t\t\t$farray['Filesize'] = number_format($f,1);\n\t\t\t$farray['FilesizeDeterminant'] = $fe;\n\n\t\t\t$filenames[] = $farray;\n\t\t}\n\t\t$result['files']=$filenames;\n\n\t\theader('Content-Type: application/json');\n\t\techo(json_encode($result));\n\t}",
"public function getFiles(): array\n {\n return [$this->file];\n }",
"function fm_zip_files ($originalfiles, $destination, $zipname=\"zip01\", $rootdir=0, $groupid=0) {\r\n//Zip an array of files/dirs to a destination zip file\r\n//Both parameters must be FULL paths to the files/dirs\r\n// Modded for Myfiles \r\n// Michael Avelar 1/19/06\r\n\r\n global $CFG, $USER;\r\n\r\n //Extract everything from destination\r\n $path_parts = pathinfo(cleardoubleslashes($destination));\r\n $destpath = $path_parts['dirname']; //The path of the zip file\r\n $destfilename = $path_parts['basename']; //The name of the zip file\r\n\t// To put the zipped file into the current directory\r\n\t$destpath = $destpath.\"/\".$destfilename;\r\n\t// To allow naming of zipfiles\r\n\t$destfilename = $zipname;\r\n //If no file, error\r\n if (empty($destfilename)) {\r\n return false;\r\n }\r\n\r\n //If no extension, add it\r\n if (empty($path_parts['extension'])) {\r\n $extension = 'zip';\r\n $destfilename = $destfilename.'.'.$extension;\r\n } else {\r\n $extension = $path_parts['extension']; //The extension of the file\r\n }\r\n\r\n //Check destination path exists\r\n if (!is_dir($destpath)) {\r\n return false;\r\n }\r\n\r\n //Check destination path is writable. TODO!!\r\n\r\n //Clean destination filename\r\n $destfilename = clean_filename($destfilename);\r\n\r\n //Now check and prepare every file\r\n $files = array();\r\n $origpath = NULL;\r\n\r\n foreach ($originalfiles as $file) { //Iterate over each file\r\n //Check for every file\r\n $tempfile = cleardoubleslashes($file); // no doubleslashes!\r\n //Calculate the base path for all files if it isn't set\r\n if ($origpath === NULL) {\r\n $origpath = rtrim(cleardoubleslashes(dirname($tempfile)), \"/\");\r\n }\r\n //See if the file is readable\r\n if (!is_readable($tempfile)) { //Is readable\r\n continue;\r\n }\r\n //See if the file/dir is in the same directory than the rest\r\n if (rtrim(cleardoubleslashes(dirname($tempfile)), \"/\") != $origpath) {\r\n continue;\r\n }\r\n //Add the file to the array\r\n $files[] = $tempfile;\r\n }\r\n\r\n //Everything is ready:\r\n // -$origpath is the path where ALL the files to be compressed reside (dir).\r\n // -$destpath is the destination path where the zip file will go (dir).\r\n // -$files is an array of files/dirs to compress (fullpath)\r\n // -$destfilename is the name of the zip file (without path)\r\n\r\n //print_object($files); //Debug\r\n\r\n if (empty($CFG->zip)) { // Use built-in php-based zip function\r\n\r\n include_once(\"$CFG->libdir/pclzip/pclzip.lib.php\");\r\n $archive = new PclZip(cleardoubleslashes(\"$destpath/$destfilename\"));\r\n if (($list = $archive->create($files, PCLZIP_OPT_REMOVE_PATH,$origpath) == 0)) {\r\n notice($archive->errorInfo(true));\r\n return false;\r\n }\r\n\r\n } else { // Use external zip program\r\n\r\n $filestozip = \"\";\r\n foreach ($files as $filetozip) {\r\n $filestozip .= escapeshellarg(basename($filetozip));\r\n $filestozip .= \" \";\r\n }\r\n //Construct the command\r\n $separator = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? ' &' : ' ;';\r\n $command = 'cd '.escapeshellarg($origpath).$separator.\r\n escapeshellarg($CFG->zip).' -r '.\r\n escapeshellarg(cleardoubleslashes(\"$destpath/$destfilename\")).' '.$filestozip;\r\n //All converted to backslashes in WIN\r\n if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {\r\n $command = str_replace('/','\\\\',$command);\r\n }\r\n Exec($command);\r\n }\r\n\t// Adds an entry into myfiles api\r\n\t$newentry = NULL;\r\n\tif($groupid == 0){\r\n\t\t$newentry->owner = $USER->id;\r\n\t}else{\r\n\t\t$newentry->owner = $groupid;\r\n\t}\r\n\t$newentry->type = TYPE_ZIP;\r\n\t$newentry->folder = $rootdir;\r\n\t$newentry->category = 0;\r\n\t$newentry->name = substr($destfilename,0,-4);\r\n\t$newentry->description = '';\r\n\t$newentry->link = $destfilename;\r\n\t$newentry->timemodified = time();\r\n\tif (!fm_update_link($newentry,$groupid)) {\r\n\t\terror(get_string(\"errnoupdate\",'block_file_manager'));\r\n\t}\r\n return true;\r\n}",
"public function extractPacks(){\n\n\t\t$this->load->model('functions');\n\n $newdir = NEW_DIRECTORY;\n\t\t$scandir = SCANNING_DIRECTORY;\n\t\t$sql = \"SELECT * from Packs where `scanned` = '0' AND `filetype` = 'zip'\";\n\t\t$query = $this->db->query($sql);\n\t\t$i=0;\n\t\tforeach($query->result_array() as $pack){\n\t\t\tif ($pack['filetype'] == 'zip'){\n\n\t\t\t\t$file = $newdir.$pack['packname'].\".\".$pack['filetype'];\n\t\t\t\t$zip = new ZipArchive;\n\n\t\t\t\t//This is much better, only extract sm and dwi files, nothing else.\n\t\t\t\t//this fixed broken zips with incorrect directories\n\t\t\t\tif ($zip->open($file) === TRUE) {\n \t\t\t\t\t//$zip->extractTo($scandir);\n\t\t\t\t\tfor ($i = 0; $i < $zip->numFiles; $i++){\n\t\t\t\t\t\tif(stripos($zip->getNameIndex($i), \".png\") || stripos($zip->getNameIndex($i), \".jpg\") ||\n\t\t\t\t\t \t \tstripos($zip->getNameIndex($i), \".sm\") || stripos($zip->getNameIndex($i), \".dwi\") ||\n\t\t\t\t\t\t\tstripos($zip->getNameIndex($i), \".ssc\")){\n\t\t\t\t \t\t//Packs with sm.old files....\n\t\t\t\t\t\t\tif(!stripos($zip->getNameIndex($i), \".old\")){\n\t\t\t\t\t\t\t\t$zip->extractTo($scandir, array($zip->getNameIndex($i)));\n\t\t\t\t\t\t\t\t//echo $zip->getNameIndex($i).\"\\n\";\n\t\t\t\t\t\t\t\t$foldername = explode('/', $zip->getNameIndex($i))[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//echo $foldername;\n\t\t\t\t\t$zip->close();\n\t\t\t\t\t//exit();\n\t\t\t\t\t//echo $pack['packname'];\n\t\t\t\t\t//If ZIP extracted correctly, scan the directory.\n\t\t\t\t\techo \"Scanning: $pack[packname]\\n\";\n\t\t\t\t\t$this->scanDirectory($scandir.$foldername, $pack['id']);\n\t\t\t\t\t//exit();\n\t\t\t\t\t$sql = \"UPDATE Packs SET `scanned` = '1' WHERE id = $pack[id]\";\n\t\t\t\t\t$query = $this->db->query($sql);\n\n\t\t\t\t\t//Delete extracted directory\n\t\t\t\t\t$this->functions->rrmdir($scandir.$foldername);\n\t\t\t\t\techo \"Scanned: \".$pack['packname'].\"\\n\";\n\t\t\t\t} else\n \t\t\t\t\techo 'Failed to open: '.$pack['packname'].\"\\n\";\n\t\t\t//one pack at a time\n\t\t\t//exit();\n\t\t\t}//end if pack is zip\n\t\t}//end foreach pack\n\n\n\n\n\n\t}",
"public function getFiles()\n {\n return isset($this->source['files']) && is_array($this->source['files']) ? $this->source['files'] : [];\n }",
"public function findFiles();",
"public function buildFilesSet2()\n {\n // are used as the test method arguments. If we want to use an array\n // as a test data set, we need to return a nested array\n return array(array(\n 'example/image4' =>\n (new DebianImage())->from('example/image2'),\n 'example/image2' =>\n (new DebianImage())->from('example/image1'),\n 'example/image1' =>\n (new DebianImage())->from('ubuntu'),\n 'example/image3' =>\n (new DebianImage())->from('example/image2'),\n 'example/image5' =>\n (new DebianImage())->from('debian'),\n ));\n }",
"public abstract function getStagedFiles();",
"private function packFiles()\n {\n // load core\n $this->builder->putVehicle($this->builder->createVehicle('xPDOFileVehicle', [\n 'vehicle_class' => 'xPDOFileVehicle',\n 'object' => [\n 'source' => __DIR__ . '/../core/components/' . self::PKG_NAME,\n 'target' => \"return MODX_CORE_PATH . 'components/';\"\n ]\n ]));\n\n // load assets\n $this->builder->putVehicle($this->builder->createVehicle('xPDOFileVehicle', [\n 'vehicle_class' => 'xPDOFileVehicle',\n 'object' => [\n 'source' => __DIR__ . '/../assets/components/' . self::PKG_NAME,\n 'target' => \"return MODX_ASSETS_PATH . 'components/';\"\n ]\n ]));\n }",
"function __testObjectFilesFromGroupFile($groupFile, $isApp = true) {\n\t\t$manager = CodeCoverageManager::getInstance();\n\t\t$testManager = new TestManager();\n\n\t\t$path = TESTS;\n\t\tif (!$isApp) {\n\t\t\t$path = CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS . 'tests';\n\t\t}\n\t\tif (!!$manager->pluginTest) {\n\t\t\t$path = App::pluginPath($manager->pluginTest) . DS . 'tests';\n\t\t}\n\n\t\t$result = array();\n\t\tif ($groupFile == 'all') {\n\t\t\t$files = array_keys($testManager->getTestCaseList());\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$file = str_replace(DS . 'tests' . DS . 'cases' . DS, DS, $file);\n\t\t\t\t$file = str_replace('.test.php', '.php', $file);\n\t\t\t\t$file = str_replace(DS . DS, DS, $file);\n\t\t\t\t$result[] = $file;\n\t\t\t}\n\t\t} else {\n\t\t\t$path .= DS . 'groups' . DS . $groupFile . $testManager->_groupExtension;\n\t\t\tif (!file_exists($path)) {\n\t\t\t\ttrigger_error(__('This group file does not exist!', true));\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\t$result = array();\n\t\t\t$groupContent = file_get_contents($path);\n\t\t\t$ds = '\\s*\\.\\s*DS\\s*\\.\\s*';\n\t\t\t$pluginTest = 'APP\\.\\'plugins\\'' . $ds . '\\'' . $manager->pluginTest . '\\'' . $ds . '\\'tests\\'' . $ds . '\\'cases\\'';\n\t\t\t$pluginTest .= '|App::pluginPath\\(\\'' . $manager->pluginTest . '\\'\\)' . $ds . '\\'tests\\'' . $ds . '\\'cases\\'';\n\t\t\t$pattern = '/\\s*TestManager::addTestFile\\(\\s*\\$this,\\s*(' . $pluginTest . '|APP_TEST_CASES|CORE_TEST_CASES)' . $ds . '(.*?)\\)/i';\n\t\t\tpreg_match_all($pattern, $groupContent, $matches);\n\n\t\t\tforeach ($matches[2] as $file) {\n\t\t\t\t$patterns = array(\n\t\t\t\t\t'/\\s*\\.\\s*DS\\s*\\.\\s*/',\n\t\t\t\t\t'/\\s*APP_TEST_CASES\\s*/',\n\t\t\t\t\t'/\\s*CORE_TEST_CASES\\s*/',\n\t\t\t\t);\n\n\t\t\t\t$replacements = array(DS, '', '');\n\t\t\t\t$file = preg_replace($patterns, $replacements, $file);\n\t\t\t\t$file = str_replace(\"'\", '', $file);\n\t\t\t\t$result[] = $manager->__testObjectFileFromCaseFile($file, $isApp) . '.php';\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}",
"function getTechFiles($mission = array())\n\t{\n\t\t$exploded_file_paths = array_filter(explode(\"|\",$mission['documents_path']));\n\t\t$exploded_file_names = explode(\"|\",$mission['documents_name']);\n\t\t$zip = \"\";\n\t\t\n\t\t$files = '<table class=\"table\">';\n\t\t$k=0;\n\t\tif($mission['delete']):\n\t\tforeach($exploded_file_paths as $row)\n\t\t{\n\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t{\n\t\t\t\t$zip = true;\n\t\t\t\t$fname = $exploded_file_names[$k];\n\t\t\t\tif($fname==\"\")\n\t\t\t\t\t$fname = basename($row);\n\t\t\t\t$ofilename = pathinfo($file_path);\n\t\t\t\t$files .= '<tr><td width=\"30%\">'.$fname.'</td><td width=\"35%\">'.substr($ofilename['filename'],0,-3).\".\".$ofilename['extension'].'</td><td width=\"20%\">'.formatSizeUnits(filesize($file_path)).'</td><td>Tech</td><td align=\"center\" width=\"15%\"><a href=\"/quote/download-document?type=tech_mission&mission_id='.$mission['id'].'&index='.$k.'\"><i style=\"margin-right:5px\" class=\"splashy-download\"></i></a><span class=\"deletetech\" rel=\"'.$k.'_'.$mission['id'].'\"> <i class=\"icon-adt_trash\"></i></span></td></tr>';\t\n\t\t\t}\n\t\t\t$k++;\n\t\t}\n\t\telse:\n\t\tforeach($exploded_file_paths as $row)\n\t\t{\n\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t{\n\t\t\t\t$zip = true;\n\t\t\t\t$fname = $exploded_file_names[$k];\n\t\t\t\tif($fname==\"\")\n\t\t\t\t\t$fname = basename($row);\n\t\t\t\t$ofilename = pathinfo($file_path);\n\t\t\t\t$files .= '<tr><td width=\"30%\">'.$fname.'</td><td width=\"35%\">'.substr($ofilename['filename'],0,-3).\".\".$ofilename['extension'].'</td><td width=\"20%\">'.formatSizeUnits(filesize($file_path)).'</td><td>Tech</td><td align=\"center\" width=\"15%\"><a href=\"/quote/download-document?type=tech_mission&mission_id='.$mission['id'].'&index='.$k.'\"><i style=\"margin-right:5px\" class=\"splashy-download\"></i></a></td></tr>';\t\n\t\t\t}\n\t\t\t$k++;\n\t\t}\n\t\tendif;\t\t\t\n\t\tif($zip)\n\t\t\t$zip = '<thead><tr><td colspan=\"5\"><a href=\"/quote/download-document?type=tech_mission&index=-1&mission_id='.$mission['id'].'\" class=\"btn btn-small pull-right\">Download Zip</a></td></tr></thead>';\n\t\t$files .=$zip.\"</table>\";\n\t\treturn $files;\n\t}",
"public function testReadingFiles()\n {\n $dir = __DIR__;\n $f = $this->adapter->java('java.io.File', $dir);\n $paths = $f->listFiles();\n foreach ($paths as $path) {\n self::assertFileExists((string) $path);\n }\n }",
"public function getUploadedFiles() {}",
"private function add_file()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t\n \t$file = $serviceManager->get('PM/Model/Files');\n \t\n \t$result = $file->getFileById($this->pk);\n \tif($result)\n \t{\n \t\tif($result['company_name'] != '' && $result['company_id'] && $result['company_id'] > 0)\n \t\t{\n \t\t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t}\n \t\t\n \t\tif($result['project_name'] != '' && $result['project_id'] && $result['project_id'] > 0)\n \t\t{ \t\t\n \t\t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t}\n \t\t\n \t\tif($result['task_name'] != '' && $result['task_id'] && $result['task_id'] > 0)\n \t\t{\n \t\t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['task_id']));\n \t\t\t$this->add_breadcrumb($task_url, $result['task_name']);\n \t\t}\n \t\t\n \t\t$file_url = $this->view->url('pm', array('module' => 'pm','controller' => 'files','action'=>'view', 'id' => $result['file_id']), null, TRUE);\n \t\t$this->add_breadcrumb($file_url, 'File: '.$result['name'], TRUE); \t\t\n \t}\n }",
"public function files()\n {\n if(isset($_GET['img']) || isset($_GET['js']) || isset($_GET['css']) || isset($_GET['pdf'])){\n if(isset($_GET['img'])){\n return $this->filesManager($_GET['img'], false, 'img');\n }\n if(isset($_GET['js'])){\n return $this->filesManager($this->nombreModulo, $_GET['js'], 'js');\n }\n if(isset($_GET['css'])){\n return $this->filesManager($this->nombreModulo, $_GET['css'], 'css');\n }\n if(isset($_GET['pdf'])){\n\n }\n }else{\n exit('Método no disponible');\n\n }\n }",
"function getExportFiles()\n\t{\n\t\t$dir = $this->getExportDirectory();\n\n\t\t// quit if export dir not available\n\t\tif (!@is_dir($dir) or\n\t\t\t!is_writeable($dir))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// open directory\n\t\t$dir = dir($dir);\n\n\t\t// initialize array\n\t\t$file = array();\n\n\t\t// get files and save the in the array\n\t\twhile ($entry = $dir->read())\n\t\t{\n\t\t\tif ($entry != \".\" and\n\t\t\t\t$entry != \"..\" and\n\t\t\t\tpreg_match(\"/^[0-9]{10}_{2}[0-9]+_{2}([a-z0-9]{3})_usrf\\.[a-z]{1,3}\\$/\", $entry, $matches))\n\t\t\t{\n\t\t\t\t$filearray[\"filename\"] = $entry;\n\t\t\t\t$filearray[\"filesize\"] = filesize($this->getExportDirectory().\"/\".$entry);\n\t\t\t\tarray_push($file, $filearray);\n\t\t\t}\n\t\t}\n\n\t\t// close import directory\n\t\t$dir->close();\n\n\t\t// sort files\n\t\tsort ($file);\n\t\treset ($file);\n\n\t\treturn $file;\n\t}",
"public function getFiles() {\n\t\tif ($this->_files === null) {\n\t\t\t$command = 'show --pretty=\"format:\" --name-only '.$this->hash;\n\t\t\tforeach(explode(\"\\n\",$this->branch->repository->run($command)) as $line) {\n\t\t\t\t$this->_files[] = trim($line);\n\t\t\t}\n\t\t}\n\t\treturn $this->_files;\n\t}",
"public function get_test_file_uploads()\n {\n }",
"public function loadFilesProject()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalAndPublicFiles = $project->filesByType(array('internal','public'));\r\n foreach($internalAndPublicFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'date'=>$file->created_at];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"function getfoldercontent($folder, &$dir_array, &$pic_array, &$expic_array)\r\n{\r\n global $xoopsModuleConfig;\r\n\r\n $dir = opendir(XOOPS_ROOT_PATH.\"/modules/xcgal/\".$xoopsModuleConfig['fullpath'].$folder);\r\n while($file = readdir($dir)){\r\n if(is_dir(XOOPS_ROOT_PATH.\"/modules/xcgal/\".$xoopsModuleConfig['fullpath'].$folder.$file)) {\r\n if ($file != \".\" && $file != \"..\")\r\n $dir_array[] = $file;\r\n }\r\n if(is_file(XOOPS_ROOT_PATH.\"/modules/xcgal/\".$xoopsModuleConfig['fullpath'].$folder.$file)) {\r\n if(strncmp($file, $xoopsModuleConfig['thumb_pfx'], strlen($xoopsModuleConfig['thumb_pfx'])) != 0\r\n && strncmp($file, $xoopsModuleConfig['normal_pfx'], strlen($xoopsModuleConfig['normal_pfx'])) != 0)\r\n $pic_array[] = $file;\r\n }\r\n }\r\n closedir($dir);\r\n\r\n natcasesort($dir_array);\r\n natcasesort($pic_array);\r\n}",
"protected function _FILES()\n\t{\n\t\t\n\t}",
"function get_file_objs() {\n return $this->file_objs;\n }",
"public function testAddPackingPlan()\n {\n }",
"public function getFiles()\n {\n echo json_encode($this->galery->getFiles());\n }",
"public function testGetPackingPlanById()\n {\n }",
"public function files(): array\n {\n $list = $this->getUnitsList($this->requestFilesParameters());\n\n foreach($list as $unit) {\n $this->parameters[$unit->getUnitKey()] = $unit->getUnitParameter();\n }\n\n return $this->parameters;\n }",
"function checkFiles($task) {\n\tglobal $jlistConfig;\n\tini_set('max_execution_time', '600');\n ignore_user_abort(true);\n\n jimport('joomla.filesystem.folder');\n jimport('joomla.filesystem.file');\n \n $database = &JFactory::getDBO();\n\t//check if all files and dirs in the uploaddir directory are listed\n\tif($jlistConfig['files.autodetect'] || $task == 'restore.run' || $task == 'scan.files'){\n\t\tif(file_exists(JPATH_SITE.'/'.$jlistConfig['files.uploaddir']) && $jlistConfig['files.uploaddir'] != ''){\n $startdir = JPATH_SITE.'/'.$jlistConfig['files.uploaddir'].'/';\n $dir_len = strlen($startdir);\n $dir = $startdir;\n $only = FALSE;\n $type = array();\n if ($jlistConfig['all.files.autodetect']){\n $allFiles = true;\n } else { \n $allFiles = FALSE;\n $type = explode(',', $jlistConfig['file.types.autodetect']);\n } \n $recursive = TRUE;\n $onlyDir = TRUE;\n $files = array();\n $file = array();\n \n $dirlist = array();\n \n $new_files\t = 0;\n $new_dirs_found = 0;\n $new_dirs_create = 0;\n $new_dirs_errors = 0;\n $new_dirs_exists = 0;\n $new_cats_create = 0;\n $log_message = '';\n $success = FALSE; \n \n $log_array = array(); \n\n // zuerst neue cats suchen\n clearstatcache();\n $searchdir = JPATH_SITE.'/'.$jlistConfig['files.uploaddir'].'/';\n $searchdirs = array();\n $dirlist = searchdir($searchdir);\n $no_writable = 0;\n for ($i=0; $i < count($dirlist); $i++) {\n // no tempzifiles directory\n if(strpos($dirlist[$i], 'tempzipfiles') === FALSE) {\n if (!is_writable($dirlist[$i])){\n $no_writable++;\n }\n $dirlist[$i] = str_replace($searchdir, '', $dirlist[$i]);\n // am ende / loeschen\n if ($pos = strrpos($dirlist[$i], '/')){\n $searchdirs[] = substr($dirlist[$i], 0, $pos);\n }\n // $dirlist[$i] = substr($dirlist[$i], 0, $pos);\n // $searchdirs[] = $dirlist[$i];\n }\n } \n for ($i=0; $i < count($searchdirs); $i++) {\n $dirs = explode('/', $searchdirs[$i]);\n $sum = count($dirs);\n // this characters are not allowed in foldernames\n if (!eregi(\"[?!:;\\*@#%~=\\+\\$\\^'\\\"\\(\\)\\<\\>]\", $searchdirs[$i])) { \n // pruefen ob dir als cat vorhanden\n $database->setQuery(\"SELECT COUNT(*) FROM #__jdownloads_cats WHERE cat_dir = '$searchdirs[$i]'\");\n $cat_da = $database->loadResult(); \n // wenn nicht - hinzufuegen\n if (!$cat_da) {\n $new_dirs_found++;\n // neue cat anlegen\n $row = new jlist_cats($database);\n // bind it to the table\n if (!$row -> bind($_POST)) {\n echo \"<script> alert('\".$row -> getError().\"'); window.history.go(-1); </script>\\n\";\n exit();\n }\n $row->cat_description = ''; \n $row->cat_title = $dirs[$sum - 1];\n $row->cat_pic = $jlistConfig['cat.pic.default.filename']; \n if ($sum > 1) {\n // cat_id fuer parent_id holen\n $parent = substr($searchdirs[$i], 0, strrpos($searchdirs[$i] , '/') );\n $database->setQuery(\"SELECT cat_id, cat_access, cat_group_access FROM #__jdownloads_cats WHERE cat_dir = '$parent'\");\n $row_parent = $database->loadObject(); \n $row->parent_id = $row_parent->cat_id;\n $row->cat_access = $row_parent->cat_access;\n $row->cat_group_access = $row_parent->cat_group_access; \n } else {\n $row->parent_id = 0;\n $row->cat_access = '00';\n $row->cat_group_access = 0; \n } \n if ($row->cat_alias == ''){\n $row->cat_alias = $row->cat_title;\n $row->cat_alias = JFilterOutput::stringURLSafe($row->cat_alias);\n if(trim(str_replace('-','',$row->cat_alias)) == '') {\n $datenow =& JFactory::getDate();\n $row->cat_alias = $datenow->toFormat(\"%Y-%m-%d-%H-%M-%S\");\n }\n } \n // when file autopublish is set on - also categories autopublished\n if ($jlistConfig['autopublish.founded.files']){\n $row->published = 1;\n } else {\n $row->published = 0;\n }\n \n $row->cat_dir = $searchdirs[$i];\n // get a correct ordering value\n if (!$row->ordering) {\n $row->ordering = $row->getNextOrder();\n } \n if (!$row -> store()) {\n echo \"<script> alert('\".$row -> getError().\"'); window.history.go(-1); </script>\\n\";\n exit();\n } else {\n if(!$row->cat_id) $row->cat_id = mysql_insert_id();\n }\n \n $new_cats_create++;\n // copy index.html to the new folder\n $index_copied = JFile::copy(JPATH_SITE.DS.$jlistConfig['files.uploaddir'].DS.'index.html', JPATH_SITE.DS.$jlistConfig['files.uploaddir'].DS.$searchdirs[$i].DS.'index.html');\n $log_array[] = date($jlistConfig['global.datetime']).' - '.JText::_('COM_JDOWNLOADS_AUTO_CAT_CHECK_ADDED').' <b>'.$searchdirs[$i].'</b><br />';\n }\n } else {\n // folder with illegal characters in name founded - create msg\n $log_array[] = date($jlistConfig['global.datetime']).' - <b>'.$searchdirs[$i].'</b><font color=\"red\"> '.JText::_('COM_JDOWNLOADS_AUTO_CAT_CHECK_ILLEGAL_NAME_FOUND_MSG').'</font><br />';\n } \n }\n \n // Pruefen ob alle publishte cat-dirs existieren\n $mis_cats = 0;\n $database->setQuery(\"SELECT * FROM #__jdownloads_cats WHERE published=1\");\n $cats = $database->loadObjectList();\n foreach($cats as $cat){\n $cat_dir = $searchdir.$cat->cat_dir;\n // wenn nicht da - unpublishen\n if(!is_dir($cat_dir)){\n $database->setQuery(\"UPDATE #__jdownloads_cats SET published = 0 WHERE cat_id = '$cat->cat_id'\");\n $database->query();\n $mis_cats++;\n $log_array[] = date($jlistConfig['global.datetime']).' - '.JText::_('COM_JDOWNLOADS_AUTO_CAT_CHECK_DISABLED').' <b>'.$cat->cat_dir.'</b><br />';\n } \n }\n \n // when add categories - the access rigts must checked from all\n //if ($new_cats_create){\n // $sum = set_rights_of_cat (0, '00', 0, $sum); // all cats will checked \n // } \n \n // alle files suchen und mit jdownloads_files abgleichen\n $all_dirs = scan_dir($dir, $type, $only, $allFiles, $recursive, $onlyDir, $files);\n if ($all_dirs != FALSE) {\n reset ($files);\n $new_files = 0;\n foreach($files as $key3 => $array2) {\n $filename = $files[$key3]['file'];\n if ($filename <> '' && substr($filename, 0, 1) !== '.') {\n // no files in tempzipfiles and jD root directory\n if(strpos($files[$key3]['path'], 'tempzipfiles') === FALSE && $files[$key3]['path'] != $startdir) {\n $dir_path_total = $files[$key3]['path'];\n $restpath = substr($files[$key3]['path'], $dir_len);\n $only_dirs = substr($restpath, 0, strlen($restpath) - 1);\n $upload_dir = '/'.$jlistConfig['files.uploaddir'].'/'.$only_dirs.'/';\n \n // existiert filename in files?\n $exist_file = false;\n $database->setQuery(\"SELECT * FROM #__jdownloads_files WHERE url_download = '\".$filename.\"'\");\n $row_file_exists = $database->loadObjectList();\n // wenn da - in cats suchen\n if ($row_file_exists) {\n foreach ($row_file_exists as $row_file_exist) {\n if (!$exist_file) { \n $database->setQuery(\"SELECT COUNT(*) FROM #__jdownloads_cats WHERE cat_dir = '$only_dirs' AND cat_id = '$row_file_exist->cat_id'\" );\n $row_cat_find = $database->loadResult(); \n \n if ($row_cat_find) {\n $exist_file = true;\n } else {\n $exist_file = false; \n } \n }\n } \n } else {\n $exist_file = false;\n } \n \n if(!$exist_file) {\n // not check the filename when restore backup file\n if ($task != 'restore.run'){\n $filename_new = checkFileName($filename);\n \n if ($filename_new != $filename){\n $success = @rename($startdir.$only_dirs.'/'.$filename, $startdir.$only_dirs.'/'.$filename_new); \n if ($success) {\n $filename = $filename_new; \n } else {\n // could not rename filename\n }\n } else {\n $filename = $filename_new;\n } \n \n }\n $target_path = JPATH_SITE.$upload_dir.$filename; \n $database->setQuery(\"SELECT cat_id FROM #__jdownloads_cats WHERE cat_dir = '$only_dirs'\");\n $cat_id = $database->loadResult();\n if ($cat_id) {\n $date =& JFactory::getDate();\n $date->setOffset(JFactory::getApplication()->getCfg('offset'));\n \n $file_extension = strtolower(substr(strrchr($filename,\".\"),1)); \n $file_obj = new jlist_files($database);\n $file_obj->url_download = $filename;\n $file_obj->file_title = str_replace('.'.$file_extension, '', $filename); \n $file_obj->size = $files[$key3]['size'];\n $file_obj->description = ''; \n $file_obj->date_added = $date->toFormat('%Y-%m-%d %H:%M:%S'); \n $file_obj->cat_id = $cat_id;\n $file_obj->file_alias = $file_obj->file_title;\n $file_obj->file_alias = JFilterOutput::stringURLSafe($file_obj->file_alias);\n if(trim(str_replace('-','',$file_obj->file_alias)) == '') {\n $datenow =& JFactory::getDate();\n $file_obj->file_alias = $datenow->toFormat(\"%Y-%m-%d %H:%M:%S\");\n }\n $filepfad = JPATH_SITE.'/images/jdownloads/fileimages/'.$file_extension.'.png';\n if(file_exists(JPATH_SITE.'/images/jdownloads/fileimages/'.$file_extension.'.png')){\n $file_obj->file_pic = $file_extension.'.png';\n } else {\n $file_obj->file_pic = $jlistConfig['file.pic.default.filename'];\n }\n $file_obj->created_by = JText::_('COM_JDOWNLOADS_AUTO_FILE_CHECK_IMPORT_BY');\n \n // create thumbs form pdf\n if ($jlistConfig['create.pdf.thumbs'] && $jlistConfig['create.pdf.thumbs.by.scan'] && $file_extension == 'pdf'){\n $only_name = substr($filename_new, 0, strrpos($filename_new, '.'));\n $thumb_path = JPATH_SITE.'/images/jdownloads/screenshots/thumbnails/';\n $screenshot_path = JPATH_SITE.'/images/jdownloads/screenshots/';\n $pdf_tumb_name = create_new_pdf_thumb($target_path, $only_name, $thumb_path, $screenshot_path);\n if ($pdf_tumb_name){\n // add thumb file name to thumbnail data field\n if ($file_obj->thumbnail == ''){\n $file_obj->thumbnail = $pdf_tumb_name;\n } elseif ($file_obj->thumbnail2 == '') {\n $file_obj->thumbnail2 = $pdf_tumb_name; \n } else {\n $file_obj->thumbnail3 = $pdf_tumb_name; \n } \n } \n }\n // create auto thumb when extension is a pic\n if ($jlistConfig['create.auto.thumbs.from.pics'] && $jlistConfig['create.auto.thumbs.from.pics.by.scan'] && ($file_extension == 'gif' || $file_extension == 'png' || $file_extension == 'jpg')){\n $thumb_created = create_new_thumb($target_path); \n if ($thumb_created){\n // add thumb file name to thumbnail data field\n $file_obj->thumbnail = $filename_new; \n }\n // create new big image for full view\n $image_created = create_new_image($target_path);\n }\n \n \n \n // set to published when option is set\n if ($jlistConfig['autopublish.founded.files']){\n $file_obj->published = 1;\n } else {\n $file_obj->published = 0;\n } \n if ($jlistConfig['be.new.files.order.first']){\n $file_obj->ordering = 0;\n $reorder = true; \n } else { \n $file_obj->ordering = $file_obj->getNextOrder(); \n $reorder = false; \n }\n \n $file_obj->store();\n \n if ($reorder){\n $res = $file_obj->reorder('');\n }\n\n/* $database->setQuery(\"INSERT INTO #__jdownloads_files (`file_id`, `file_title`, `file_alias`, `description`, `description_long`, `file_pic`, `thumbnail`, `price`, `release`, `language`, `system`, `license`, `url_license`, `update_active`, `cat_id`, `metakey`, `metadesc`, `size`, `date_added`, `file_date`, `publish_from`, `publish_to`, `url_download`, `extern_file`, `url_home`, `author`, `url_author`, `created_by`, `created_mail`, `modified_by`, `modified_date`, `submitted_by`, `downloads`, `ordering`, `published`, `checked_out`, `checked_out_time`)\n VALUES ('', ' $file_obj->file_title', '$file_obj->file_alias', '', '', '$file_obj->file_pic', '', '', '', '', '', '', '', '', '$file_obj->cat_id', '', '', '$file_obj->size ', '$file_obj->date_added', '', '', '', '$file_obj->url_download', '', '', '', '', '$file_obj->created_by', '', '', '', '', '', '$file_obj->ordering', '$file_obj->published', '0', '0000-00-00 00:00:00')\");\n if (!$database->query()) {\n echo $database->stderr();\n exit;\n }\n */\n\n\n $new_files++;\n $log_array[] = date($jlistConfig['global.datetime']).' - '.JText::_('COM_JDOWNLOADS_AUTO_FILE_CHECK_ADDED').' <b>'.$only_dirs.'/'.$filename.'</b><br />';\n } else {\n // cat dir not exist or invalid name\n \n } \n } \n }\n }\n } \n }\t\t\t\t\t\n\t \n //pruefen ob download dateien alle physisch vorhanden - sonst unpublishen\n $mis_files = 0;\n\t $database->setQuery(\"SELECT * FROM #__jdownloads_files WHERE published=1\");\n $files = $database->loadObjectList();\n\t foreach($files as $file){\n\t\t // nur interne files testen\n if ($file->url_download <> ''){ \n $database->setQuery(\"SELECT cat_dir FROM #__jdownloads_cats WHERE cat_id = '$file->cat_id'\");\n $cat_dir = $database->loadResult(); \n $cat_dir_long = $startdir.$cat_dir.'/'.$file->url_download;\n // wenn nicht da - unpublishen\n if(!is_file($cat_dir_long)){\n $database->setQuery(\"UPDATE #__jdownloads_files SET published = 0 WHERE file_id = '$file->file_id'\");\n $database->query();\n $mis_files++;\n $log_array[] = date($jlistConfig['global.datetime']).' - '.JText::_('COM_JDOWNLOADS_AUTO_FILE_CHECK_DISABLED').' <b>'.$cat_dir.'/'.$file->url_download.'</b><br />';\n } \n }\n }\n \n // save log\n if ($log_array) {\n foreach ($log_array as $log) {\n $log_message .= $log;\n }\n if ($task != 'restore.run'){\n $database->setQuery(\"UPDATE #__jdownloads_config SET setting_value = '$log_message' WHERE setting_name = 'last.log.message'\");\n $database->query();\n $jlistConfig['last.log.message'] = $log_message;\n } \n } \n \n if ($task == 'restore.run'){\n return $log_message;\n } \n \n if ($task == '' or $task == 'scan.files') {\n echo '<table width=\"100%\" bgcolor=\"#FFFFCC\" cellpadding=\"10px\" cellspacing=\"5px\"><tr><td align=\"left\">'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_TITLE').'<br />';\n if ($new_cats_create > 0){\n echo '<font color=\"#FF6600\"><b>'.$new_cats_create.' '.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NEW_CATS').'</b></font><br />';\n } else {\n echo '<font color=\"green\"><b>'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NO_NEW_CATS').'</b></font><br />';\n }\n \n if ($new_files > 0){\n echo '<font color=\"#FF6600\"><b>'.$new_files.' '.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NEW_FILES').'</b></font><br />';\n } else {\n echo '<font color=\"green\"><b>'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NO_NEW_FILES').'</b></font><br />';\n } \n \n if ($mis_cats > 0){\n echo '<font color=\"##990000\"><b>'.$mis_cats.' '.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_MISSING_CATS').'</b></font><br />';\n } else {\n echo '<font color=\"green\"><b>'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NO_MISSING_CATS').'</b></font><br />';\n } \n \n \n if ($mis_files > 0){\n echo '<font color=\"#990000\"><b>'.$mis_files.' '.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_MISSING_FILES').'</b><br /></td></tr></table>';\n } else {\n echo '<font color=\"green\"><b>'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NO_MISSING_FILES').'</b><br /></td></tr></table>';\n }\n \n if ($log_message) echo '<table width=\"100%\" bgcolor=\"#FFFFCC\" cellpadding=\"10px\" cellspacing=\"0px\"><tr><td align=\"left\">'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_LOG_TITLE').'<br />'.$log_message.'</td></tr></table>';\n\n } else {\n \n if ($task == 'files.list') {\n echo '<table width=\"100%\" bgcolor=\"#FFFFCC\" cellpadding=\"10px\" cellspacing=\"0px\"><tr><td>'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_TITLE').'</td>';\n if ($new_files > 0){\n echo '<td><font color=\"#FF6600\"><b>'.$new_files.' '.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NEW_FILES').'<br />'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_REFRESH_MESSAGE').'</b></font></td>';\n } else {\n echo '<td><font color=\"green\"><b>'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NO_NEW_FILES').'</b></font></td>';\n }\n if ($mis_files > 0){\n echo '<td><font color=\"#990000\"><b>'.$mis_files.' '.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_MISSING_FILES').'<br />'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_REFRESH_MESSAGE').'</b></td></tr></table>';\n } else {\n echo '<td><font color=\"green\"><b>'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NO_MISSING_FILES').'</b></td></tr></table>';\n }\n \n if ($log_message) echo '<table width=\"100%\" bgcolor=\"#FFFFCC\" cellpadding=\"10px\" cellspacing=\"0px\"><tr><td align=\"center\">'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_LOG_TITLE').'<br />'.$log_message.'</td></tr></table>';\n }\n \n if ($task == 'categories.list') {\n echo '<table width=\"100%\" bgcolor=\"#FFFFCC\" cellpadding=\"10px\" cellspacing=\"0px\"><tr><td>'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_TITLE').'</td>';\n if ($new_cats_create > 0){\n echo '<td><font color=\"#FF6600\"><b>'.$new_cats_create.' '.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NEW_CATS').'<br />'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_REFRESH_MESSAGE').'</b></font></td>';\n } else {\n echo '<td><font color=\"green\"><b>'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NO_NEW_CATS').'</b></font></td>';\n }\n if ($mis_cats > 0){\n echo '<td><font color=\"#990000\"><b>'.$mis_cats.' '.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_MISSING_CATS').'<br />'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_REFRESH_MESSAGE').'</b></td></tr></table>';\n } else {\n echo '<td><font color=\"green\"><b>'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_NO_MISSING_CATS').'</b></td></tr></table>';\n }\n \n if ($log_message) echo '<table width=\"100%\" bgcolor=\"#FFFFCC\" cellpadding=\"10px\" cellspacing=\"0px\"><tr><td align=\"center\">'.JText::_('COM_JDOWNLOADS_BACKEND_AUTOCHECK_LOG_TITLE').'<br />'.$log_message.'</td></tr></table>';\n }\n \n \n }\n \n\t\t} else {\n\t\t\t// error upload dir not exists\n echo '<font color=\"red\"><b>'.JText::_('COM_JDOWNLOADS_AUTOCHECK_DIR_NOT_EXIST').'<br /><br />'.JText::_('COM_JDOWNLOADS_AUTOCHECK_DIR_NOT_EXIST_2').'</b></font>';\n\t\t\t\n\t\t}\n } \n}",
"function cemhub_get_generated_flat_files() {\n return file_scan_directory(cemhub_get_files_repository_path(TRUE), '/.*\\.txt|.pgp$/');\n}",
"function MyMod_Data_Groups_Files_GetFiles($singular)\n {\n return $this->ExistentPathsFiles\n (\n $this->MyMod_Data_Groups_Files_Paths($singular),\n $this->MyMod_Data_Groups_Files_Files($singular)\n );\n }",
"function getFileMatrix()\r\n\t{\r\n\t\t$files = array( );\r\n\t\t$files['name'] = array();\r\n\t\t$files['size'] = array();\r\n\t\t$files['type'] = array();\r\n\t\t$files['date'] = array();\r\n\t\t$counFiles = 0;\r\n\r\n\t\tfor( $x=0; $x < $this->filesCollection->size( ); $x++ )\r\n\t\t{\r\n\t\t\tif( ( $this->filesCollection->get( $x )->getType( ) ) == 'folderFile' )\r\n\t\t\t{\r\n\t\t\t\t$files['name'][$counFiles] = $this->filesCollection->get( $x )->getName( );\r\n\t\t\t\t$files['date'][$counFiles] = date( \"d/m/Y\", $this->filesCollection->get( $x )->getDate( ) );\r\n\t\t\t\t$files['size'][$counFiles] = ' ';\r\n\t\t\t\t$files['type'][$counFiles] = $this->filesCollection->get( $x )->getType( );\r\n\t\t\t\t$counFiles++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor( $x=0; $x < $this->filesCollection->size( ); $x++ )\r\n\t\t{\r\n\t\t\tif( ( $this->filesCollection->get( $x )->getType( ) ) != 'folderFile' )\r\n\t\t\t{\r\n\t\t\t\t$files['name'][$counFiles] = $this->filesCollection->get( $x )->getName( );\r\n\t\t\t\t$files['date'][$counFiles] = date( \"d/m/Y\", $this->filesCollection->get( $x )->getDate( ) );\r\n\t\t\t\t$files['size'][$counFiles] = bcdiv( $this->filesCollection->get( $x )->getSize( ), 1024, 1 ).' Kb';\r\n\t\t\t\t$files['type'][$counFiles] = $this->filesCollection->get( $x )->getType( );\r\n\t\t\t\t$counFiles++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $files;\r\n\t}",
"public function getConcatenateFiles() {}",
"function fm_view_zipped($file, $groupid) {\r\n\tglobal $CFG, $USER;\r\n\t\r\n\tif ($file->folder == 0) {\r\n\t\tif ($groupid == 0){\r\n\t\t\t$ziploc = $CFG->dataroot.\"/\".fm_get_user_dir_space();//.\"/\".$file->link;\r\n\t\t} else {\r\n\t\t\t$ziploc = $CFG->dataroot.\"/\".fm_get_group_dir_space($groupid);//.\"/\".$file->link;\r\n\t\t}\r\n\t} else {\r\n\t\tif ($groupid == 0){\r\n\t\t\t$ziploc = $CFG->dataroot.\"/\".fm_get_user_dir_space().fm_get_folder_path($file->folder, false, $goupid);//.\"/\".$file->link;\r\n\t\t} else {\r\n\t\t\t$ziploc = $CFG->dataroot.\"/\".fm_get_group_dir_space($groupid).fm_get_folder_path($file->folder, false, $goupid);//.\"/\".$file->link;\r\n\t\t}\r\n\t}\r\n\r\n\t$filelist = array();\r\n\t$zip = zip_open($ziploc);\r\n\tif ($zip) {\r\n\t\t$count = 0;\r\n\t\twhile ($zip_entry = zip_read($zip)) {\r\n\t\t $filelist[$count]->name = zip_entry_name($zip_entry);\r\n\t\t $filelist[$count]->actualsize = zip_entry_filesize($zip_entry);\r\n\t\t $filelist[$count]->compsize = zip_entry_compressedsize($zip_entry);\r\n\t\t $count++;\r\n\t\t}\r\n\t\tzip_close($zip);\r\n\t}\r\n\treturn $filelist;\r\n}",
"function getTestFilesForAllProjects(): array\n {\n $ret = array();\n foreach (config::$projects as $project) {\n $testFiles = $this->getDirContents($project[\"dir\"], config::$excludeFiles);\n foreach ($testFiles as $idx => $testFile) {\n $tests = $this->getTestClassMethodsFromFile($testFile[\"dir\"] . $testFile[\"file\"]);\n $asserts=0;\n foreach ($tests as $count) {\n $asserts +=$count;\n }\n $testFiles[$idx][\"tests\"] = sizeof($tests);\n $testFiles[$idx][\"asserts\"] = $asserts;\n $testFiles[$idx][\"name\"] = $project[\"name\"];\n }\n $ret=array_merge($ret, $testFiles);\n }\n return $ret;\n }",
"public function getFiles()\n\t{\n\t\tif ($this->_files === null) {\n\t\t\t$command = 'show --pretty=\"format:\" --name-only '.$this->hash;\n\t\t\tforeach(explode(\"\\n\",$this->repository->run($command)) as $line) {\n\t\t\t\t$this->_files[] = trim($line);\n\t\t\t}\n\t\t}\n\t\treturn $this->_files;\n\t}",
"private function loadSubmissionFiles() {\n $submitter_id = $this->graded_gradeable->getSubmitter()->getId();\n $gradeable = $this->graded_gradeable->getGradeable();\n $course_path = $this->core->getConfig()->getCoursePath();\n $config = $gradeable->getAutogradingConfig();\n\n // Get the path to load files from (based on submission type)\n $dirs = $gradeable->isVcs() ? ['submissions', 'checkout'] : ['submissions'];\n\n\n foreach ($dirs as $dir) {\n $this->meta_files[$dir] = [];\n $this->files[$dir][0] = [];\n\n $path = FileUtils::joinPaths($course_path, $dir, $gradeable->getId(), $submitter_id, $this->version);\n\n // Now load all files in the directory, flattening the results\n $submitted_files = FileUtils::getAllFiles($path, [], true);\n foreach ($submitted_files as $file => $details) {\n if (substr(basename($file), 0, 1) === '.') {\n $this->meta_files[$dir][$file] = $details;\n }\n else {\n $this->files[$dir][0][$file] = $details;\n }\n }\n // If there is only one part (no separation of upload files),\n // be sure to set the \"Part 1\" files to the \"all\" files\n if ($config->getNumParts() === 1 && !$config->isNotebookGradeable()) {\n $this->files[$dir][1] = $this->files[$dir][0];\n }\n\n $part_names = $config->getPartNames();\n $notebook_model = null;\n if ($config->isNotebookGradeable()) {\n $notebook_model = $config->getUserSpecificNotebook($submitter_id);\n\n $part_names = range(1, $notebook_model->getNumParts());\n }\n\n // A second time, look through the folder, but now split up based on part number\n foreach ($part_names as $i => $name) {\n foreach ($submitted_files as $file => $details) {\n $dir_name = \"part{$i}/\";\n $index = $i;\n if ($config->isNotebookGradeable() && isset($notebook_model->getFileSubmissions()[$i])) {\n $dir_name = $notebook_model->getFileSubmissions()[$i][\"directory\"];\n $index = $name;\n }\n\n if (substr($file, 0, strlen($dir_name)) === $dir_name) {\n $this->files[$dir][$index][substr($file, strlen($dir_name))] = $details;\n }\n }\n }\n }\n }",
"protected function getFiles(): array\n {\n return [];\n }",
"public function getUploadedFiles()\n {\n }",
"public function provideFileInfos()\n {\n return array(\n array('someName', 'someContent')\n );\n }"
] | [
"0.6358665",
"0.6284666",
"0.6281518",
"0.6195965",
"0.6195965",
"0.6195965",
"0.6157322",
"0.60981625",
"0.59759873",
"0.585842",
"0.5834721",
"0.581556",
"0.5802916",
"0.5802916",
"0.5802916",
"0.580035",
"0.57596576",
"0.5733025",
"0.56986207",
"0.5646056",
"0.56386656",
"0.5619917",
"0.56116676",
"0.55926573",
"0.5583072",
"0.5580719",
"0.55553365",
"0.5543435",
"0.55373055",
"0.55364805",
"0.55256146",
"0.55195695",
"0.5503626",
"0.55004966",
"0.5499153",
"0.54915726",
"0.5485811",
"0.5477906",
"0.54771",
"0.545981",
"0.5456987",
"0.54399747",
"0.5425705",
"0.5425581",
"0.541001",
"0.5393427",
"0.5392433",
"0.5388656",
"0.5385745",
"0.53759813",
"0.53625625",
"0.5359795",
"0.53590924",
"0.53498113",
"0.53483707",
"0.5346792",
"0.5342967",
"0.53333616",
"0.53294027",
"0.5323975",
"0.5317821",
"0.5312467",
"0.53123075",
"0.53105646",
"0.53084385",
"0.5307559",
"0.53036445",
"0.5301468",
"0.528351",
"0.52700466",
"0.526596",
"0.5259074",
"0.5254164",
"0.52540123",
"0.52477634",
"0.5232796",
"0.52302146",
"0.5227096",
"0.522696",
"0.5225472",
"0.5221815",
"0.5215321",
"0.5215235",
"0.5211596",
"0.5210223",
"0.52092636",
"0.5206332",
"0.5202137",
"0.51899624",
"0.5188447",
"0.5187222",
"0.51800764",
"0.5179857",
"0.5177438",
"0.517739",
"0.51754326",
"0.51707715",
"0.5168126",
"0.5164755",
"0.51613754"
] | 0.7125844 | 0 |
Test case for getPackingPlanTags Get the tags for a packingPlan.. | public function testGetPackingPlanTags()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function TestPlan_get_tags($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_tags', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testAddPackingPlanTag()\n {\n }",
"public function getTags() {}",
"public function getTags();",
"public function getTags();",
"public function getTags();",
"public function getTags();",
"public function getTags();",
"public function testGetExternalShipmentTags()\n {\n }",
"public function getTags(){\n\t\tif (!is_array($this->_known_tags)){\n\t\t\t$desc = $this->getDescription();\n\t\t}\n\t\treturn $this->_known_tags;\n\t}",
"public function test_getReplenishmentProcessTags() {\n\n }",
"function TestCase_get_tags($case_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.get_tags', array(new xmlrpcval($case_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testGetTags() {\n $this->assertEquals([\n 'example',\n 'template',\n 'templateMissing',\n 'inline',\n 'inlineAllowInline',\n 'inlineAllowBlock',\n 'inlineAllowBoth',\n 'block',\n 'blockAllowInline',\n 'blockAllowBlock',\n 'blockAllowBoth',\n 'attributes',\n 'fooBar',\n 'parent',\n 'parentNoPersist',\n 'parentWhitelist',\n 'parentBlacklist',\n 'whiteChild',\n 'blackChild',\n 'depth',\n 'lineBreaksRemove',\n 'lineBreaksPreserve',\n 'lineBreaksConvert',\n 'pattern',\n 'autoClose',\n 'aliasBase',\n 'aliased'\n ], array_keys($this->object->getTags()));\n }",
"function TestRun_get_tags($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_tags', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function tags();",
"function gtags_group_tags() {\n\techo gtags_get_group_tags();\n}",
"public function getTagList();",
"private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}",
"private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}",
"public function getTags() {\n\t\t$tags = array();\n\n\t\ttry {\n\t\t\t/** @var Thrive_Dash_Api_KlickTipp $api */\n\t\t\t$api = $this->get_api();\n\t\t\t$tags = $api->getTags();\n\t\t} catch ( Exception $e ) {\n\n\t\t}\n\n\t\treturn $tags;\n\t}",
"public function getTags():array;",
"protected function getTagsInfo() {\n $smapFilter = '';\n if(!empty($this->filterId)) {\n $smapFilter = ' AND ct.smap_id = ' . $this->filterId;\n }\n $result = $this->dbh->select('SELECT COUNT(ctl.' . $this->bindedBlock->getPK() . ') as frq,ctl.tag_id FROM '\n . $this->dbh->getTagsTablename($this->bindedBlock->getTableName())\n . ' ctl INNER JOIN ' . $this->bindedBlock->getTableName() . ' ct '\n . 'WHERE ctl.' . $this->bindedBlock->getPK() . ' = ct.' . $this->bindedBlock->getPK()\n . $smapFilter\n . ' GROUP BY tag_id');\n return $result;\n }",
"public function testDeletePackingPlanTag()\n {\n }",
"public function testTags()\n\t{\n\t\t$this->call('GET', '/api/tags');\n\t}",
"function tags() {\n\n\t\t$preloader = pb_query_preloader::getInstance();\n\t\t$preloadRow = $preloader->getPreloadArticleTag($this->id);\n\n\t\tif ($preloadRow) {\n\t\t\t$rows = $preloadRow;\n\t\t} else {\n\t\t\tglobal $polarbear_db;\n\t\t\t$sql = \"SELECT tagID FROM \" . POLARBEAR_DB_PREFIX . \"_article_tag_relation WHERE articleID = '$this->id'\";\n\t\t\t$rows = $polarbear_db->get_results($sql);\n\t\t}\n\n\t\t$arrTags = array();\n\t\tif ($rows) {\n\t\t\tforeach ($rows as $row) {\n\t\t\t\t$arrTags[] = polarbear_tag::getInstance($row->tagID);\n\t\t\t}\n\t\t}\n\n\t\tpb_pqp_log_speed(\"article tags()\");\n\n\t\treturn $arrTags;\n\t}",
"public static function get_tags() {\n\t\treturn [\n\t\t\t'{pro}',\n\t\t\t'{contra}',\n\t\t\t'{total}',\n\t\t\t'{pro_percent}',\n\t\t\t'{contra_percent}',\n\t\t\t'{permalink}',\n\t\t\t'{author}',\n\t\t];\n\t}",
"public function getTagsValues() {}",
"public function getTagsValues() {}",
"public function getTagsValues() {}",
"public function getTagsValues() {}",
"public function testGetTags()\n {\n $helix = new Helix(self::$tokenProvider);\n $tagsApi = $helix->tags;\n $tags = $tagsApi->getTags();\n \n $this->assertNotNull($tags);\n $this->assertIsArray($tags);\n\n // Twitch should have more than 20 available tags, so we check that the cursor is available\n $hasMoreResults = $tagsApi->hasMoreTags();\n $this->assertTrue($hasMoreResults);\n\n // Try to get a specific tag by its ID, using the previous results to get the ID.\n $firstTag = reset($tags);\n $onlyTag = $tagsApi->getTags([$firstTag->tag_id]);\n\n $this->assertCount(1, $onlyTag);\n $this->assertEquals($firstTag, reset($onlyTag));\n\n return $firstTag->tag_id;\n }",
"public function get_tags(){\n\t \n\t return $this->tags;\n\t}",
"public static function get_tags()\n\t{\n\t\treturn [\n\t\t\t'{pro}',\n\t\t\t'{contra}',\n\t\t\t'{total}',\n\t\t\t'{pro_percent}',\n\t\t\t'{contra_percent}',\n\t\t\t'{permalink}',\n\t\t\t'{author}',\n\t\t];\n\t}",
"public function tag_list()\n {\n $this->pushpin_id = $_GET['pushpinId'];\n\n $query = \"SELECT tags\nFROM PushpinTags\nWHERE pushpin_ID= '$this->pushpin_id'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }",
"public function test_getExternalShipmentTags() {\n\n }",
"function db_get_tags($snuuid=NULL)\n{\n $sql = \"SELECT project_tags.tag, description, COUNT(project_tagging.tag)\n FROM project_tags\n LEFT JOIN project_tagging ON project_tagging.tag=project_tags.tag \";\n if ($snuuid) {\n $sql .= \"WHERE project_tagging.snuuid=$1 \";\n }\n $sql .= \"GROUP BY project_tags.tag, description, project_tagging.tag\n ORDER BY project_tags.tag\";\n if ($snuuid) {\n $result = pg_query_params($sql, array($snuuid));\n } else {\n $result = pg_query($sql);\n }\n return $result;\n}",
"public function testGetLowStockTags()\n {\n }",
"public function test_getBillingCodeTypeTags() {\n\n }",
"public function test_getLowStockTags() {\n\n }",
"function get_all_tags($decks) {\n\t$all_tags = array();\n\tforeach ($decks as $key => $value) {\n\t\t$all_tags[] = $value['tag'];\n\t}\t\n\treturn $all_tags;\n}",
"public function tags(){\n return $this->tags;\n }",
"public function getTag()\n {\n }",
"public function test_getTagRequest() {\n\n }",
"function db_get_tags_project($snuuid, $projid)\n{\n\t$sql = \"SELECT\n\t\tproject_tags.tag,\n\t\tdescription,\n\t\tCOUNT(project_tagging.tag) as selected\n\t\tFROM\n\t\tproject_tags\n\t\tLEFT JOIN project_tagging ON\n\t\t(project_tags.tag=project_tagging.tag\n\t\tAND projid=$2\n\t\tAND snuuid=$1)\n\t\tGROUP BY\n\t\tproject_tags.tag,\n\t\tproject_tags.description,\n\t\tproject_tagging.tag\n\t\tORDER BY project_tags.description;\";\n\t$result = pg_query_params($sql, array($snuuid, $projid));\n\treturn $result;\n}",
"public function testGetVendorComplianceSurveyTags()\n {\n }",
"public function testGetReplenishmentTags()\n {\n }",
"private function get_packing_items() {\n\t\t$product_pane = $this->dom->find( '#j-product-desc' );\n\t\tif ( ! $product_pane ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$packaging_list = $product_pane[0]->find( '.product-packaging-list' );\n\t\tif ( ! $packaging_list ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$items = $packaging_list[0]->find( 'li.packaging-item' );\n\t\tif ( ! $items ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn $items;\n\t}",
"public function getTag();",
"public function getTag();",
"function get_tag_names() \n\t{\t\n\t\tlog_message('debug', 'Support/get_tag_names');\n\t\techo get_option_list($this, 'tagNames', 'select', $_GET[\"copy_from_repo\"]);\n\t}",
"public function getTags($object);",
"public function generateTags() : array\n {\n return ['purchase_order'];\n }",
"public function getTag() \n { \n return array(\"type\" => $this->getType(), \"name\" => $this->getName(), \"parameters\" => $this->getParameters());\n }",
"function getTags() {\n\t\t$db = Database::getInstance();\n\t\t$mysqli = $db->getConnection();\n\t\t\n\t\t$tagsArray = array();\n\t\t\t$sql_query = \"select tagnaam,tagid from tag where status=6\";\n\t\t\t$result = $mysqli->query($sql_query);\n\t\t\t\n\t\t\twhile ( $row = $result->fetch_object () ) {\n\t\t\t\t$Tag = new Tag();\n\t\t\t\t$Tag->tagId = $row->tagid;\n\t\t\t\t$Tag->tagName = $row->tagnaam;\n\t\t\t\tarray_push($tagsArray, $Tag);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$result->close();\n\t\t\treturn $tagsArray;\n\t}",
"public function testGetOrderTags()\n {\n }",
"public function tags()\r\n {\r\n }",
"function get_tags(){\n global $DB;\n\n $collection = $DB->get_record('tag_coll',['name' => PLUGINNAME]);\n if (!$collection->id) {\n throw new moodle_exception('pluginname', 'local_tematica');\n }\n $tags = $DB->get_records('tag', ['tagcollid' => $collection->id]);\n return $tags;\n}",
"final public function getTagSets(): array {}",
"public function getTags($param){\n\tif(!isset($param['type']) OR !isset($param['tag_group_id']) OR !isset($param['account_id'])){\n\t return false;\n\t}\n\t$this->load->model('Logic_tag_relation');\n\t$result = $this->Logic_tag_relation->getTags($param);\n\treturn $result;\n }",
"function fetchTplTags($srcfile) {\r\n\r\n if(@include_once($srcfile)) {\r\n reset ($vorlage);\r\n $vl = array();\r\n\r\n while (list($key, $value) = each ($vorlage)) {\r\n $tag->cp_tag = $key;\r\n $tag->cp_desc = $value;\r\n array_push($vl,$tag);\r\n unset($tag);\r\n }\r\n return $vl;\r\n } else {\r\n return \"\";\r\n }\r\n}",
"function getTags($talentID)\r\n\t{\r\n\t\t$db = Database::getInstance ();\r\n\t\t$mysqli = $db->getConnection ();\r\n\t\t$tagArray = array();\r\n\t\t$sql_query = \"select * from talent_has_tag where talent_talentid = \".$talentID;\r\n\t\t$result = $mysqli->query ( $sql_query );\r\n\t\twhile ( $row = $result->fetch_object () ) {\r\n\t\t\t$sql_query2 = \"select * from tag where tagid = \" . $row->tag_tagid;\r\n\t\t\t$result2 = $mysqli->query ( $sql_query2 );\r\n\t\t\t\r\n\t\t\twhile ( $row2 = $result2->fetch_object () ) {\r\n\t\t\tarray_push ( $tagArray, $row2->tagnaam);\r\n\t\t\t}\t\t\t\r\n\t\t}\t\r\n\t\t\r\n\t\t// return an array with tags\r\n\t\treturn $tagArray;\r\n\t}",
"public function part_tags() {\n return array('placeholder', 'answermark', 'answertype', 'numbox', 'vars1', 'answer', 'vars2', 'correctness'\n , 'unitpenalty', 'postunit', 'ruleid', 'otherrule');\n }",
"public function testGetPackingPlanByFilter()\n {\n }",
"public function getGroupTagsList()\r\n {\r\n $tmpGroup = new Warecorp_Group_Base();\r\n $EntityTypeId = $tmpGroup->EntityTypeId;\r\n $EntityTypeName = $tmpGroup->EntityTypeName;\r\n unset($tmpGroup);\r\n\r\n $query = $this->_db->select();\r\n if ( $this->isAsAssoc() ) {\r\n $fields = array();\r\n $fields[] = ( $this->getAssocKey() === null ) ? 'ztd.id' : $this->getAssocKey();\r\n $fields[] = ( $this->getAssocValue() === null ) ? 'ztd.name' : $this->getAssocValue();\r\n $query->from(array('ztr' => 'zanby_tags__relations'), $fields);\r\n } else {\r\n $query->from(array('ztr' => 'zanby_tags__relations'), new Zend_Db_Expr('DISTINCT ztd.id'));\r\n }\r\n $query->joininner(array('ztd' => 'zanby_tags__dictionary'), 'ztr.tag_id = ztd.id');\r\n\r\n if ( $this->getWhere() ) $query->where($this->getWhere());\r\n $query->where('entity_type_id = ?', $EntityTypeId);\r\n $query->where('entity_id = ?', $this->getGroupId());\r\n $query->where('ztr.status IN (?)', $this->getTagStatus());\r\n\r\n if ( $this->getCurrentPage() !== null && $this->getListSize() !== null ) {\r\n $query->limitPage($this->getCurrentPage(), $this->getListSize());\r\n }\r\n if ( $this->getOrder() !== null ) $query->order($this->getOrder());\r\n else $query->order('ztd.name');\r\n\r\n\t\t$items = $this->getTagListFromSQL($query, false);\r\n return $items;\r\n }",
"public function getTags() {\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tAn array containing all of the spin tags\n\t\t$artist = $this->getArtist();\n\t\tif($artist) { return $artist->spin_tags; }\n\t}",
"public function getResultTag();",
"function gettags($mask=\"\")\r\n\t{\r\n\t\t$where = ($mask!=\"\")?\" name like '%$mask%' AND\":\"\";\r\n\t\t$query = 'SELECT * FROM #__flexicontent_tags WHERE '.$where.' published = 1 ORDER BY name';\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$tags = $this->_db->loadObjectlist();\r\n\t\treturn $tags;\r\n\t}",
"public function getTags(): Collection;",
"function TestPlan_add_tag($plan_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.add_tag', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($tag_name, \"string\")), \"array\");\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function test_listBundlesForTagsRequest() {\n\n }",
"public function tags() {\n\t\treturn $this->get_tags();\n\t}",
"public function getTags()\n {\n return $this->_tags;\n }",
"function get_tags() {\n return $this->tags;\n }",
"public function getTagsTable() {}",
"public function getList()\r\n {\r\n\t\tif (defined(\"WITH_SPHINX_TAGS\") && WITH_SPHINX_TAGS)\r\n\t\t{\r\n\t\t\t$tags = parent::getList();\r\n\t\t} else {\r\n\t\t\t$tags = $this->getGroupTagsList() +\r\n\t\t\t\t$this->getMembersTagsList() +\r\n\t\t\t\t$this->getDocumentsTagsList() +\r\n\t\t\t\t$this->getEventsTagsList() +\r\n\t\t\t\t$this->getPhotosTagsList() +\r\n\t\t\t\t$this->getListsTagsList();\r\n\t\t}\r\n return $tags;\r\n }",
"public function getPPTags()\n {\n $this->postParseTags;\n }",
"public function getTags()\n\t{\n\t\treturn $this->tags;\n\t}",
"public function get_tag()\n {\n }",
"public function getTagList() {\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tThe tags table as a multi-dimensional array\n\t\t$sql = <<<EOD\n\t\tSELECT\n\t\t\t{$this->wpdb->prefix}topspin_tags.name\n\t\tFROM {$this->wpdb->prefix}topspin_tags\n\t\tWHERE\n\t\t\t{$this->wpdb->prefix}topspin_tags.artist_id = %d\nEOD;\n\t\t$data = $this->wpdb->get_results($this->wpdb->prepare($sql,array($this->artist_id)),ARRAY_A);\n\t\t##\tSet Default Status\n\t\tforeach($data as $key=>$row) {\n\t\t\t$data[$key]['status'] = 0;\n\t\t}\n\t\treturn $data;\n\t}",
"protected function _getCacheTags()\n\t{\n\t\t$tags = array(\n\t\t\tself::CACHE_GROUP,\n\t\t\tMage_Catalog_Model_Product::CACHE_TAG,\n\t\t\tMage_Core_Model_Store_Group::CACHE_TAG,\n\t\t);\n\n\t\treturn $tags;\n\t}",
"public function testGetTags()\n {\n $objects = $this->loadTestFixtures(['@AppBundle/DataFixtures/ORM/Test/Tag/CrudData.yml']);\n\n // Test scope\n $this->restScopeTestCase('/api/tags', [\n 'list' => $this->getScopeConfig('tag/list.yml')\n ], true);\n\n // Test filters\n $listFilterCaseHandler = new ListFilterCaseHandler([\n 'tag-1' => $objects['tag-1']\n ]);\n \n $listFilterCaseHandler->addCase('name', '=Some name', 'tag-1', true);\n\n $this->restListFilterTestCase('/api/tags', $listFilterCaseHandler->getCases());\n }",
"public static function getArchivalTagList() {\n\t\t// $archival_tags = [];\n// \t\tforeach (self::$asset_tags as $tag=>$label){\n// \t\t\tif (strpos($label,'*') !== false){\n// \t\t\t\t$archive_tags[] = \"'$tag'\";\n// \t\t\t}\n// \t\t}\n\t\treturn \"'\" . implode(\"','\",array_keys(self::$asset_tags)) . \"'\" ;\n\t}",
"public function getTags()\n {\n return $this->data['fields']['tags'];\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags()\n {\n return $this->tags;\n }",
"public function getTags() {\n try {\n $getTagsOperation = new GetTags();\n\n $getTagsResponse = $this->apiCall($getTagsOperation);\n $tagsList = $getTagsResponse->getData();\n\n if ($getTagsResponse->isSuccess()) {\n\n $response = [];\n\n if(is_array($tagsList) && count($tagsList) > 0) {\n foreach ($tagsList as $item) {\n $response[] = [\n 'id' => $item['tagId'],\n 'name' => $item['name']\n ];\n }\n }\n return $response;\n }\n }catch (\\Exception $e){\n throw new \\Exception($e->getMessage());\n }\n }",
"public function getTag(): string;"
] | [
"0.71208864",
"0.6392587",
"0.6225167",
"0.6007116",
"0.6007116",
"0.6007116",
"0.6007116",
"0.6007116",
"0.5823012",
"0.579516",
"0.5794438",
"0.5788409",
"0.5757023",
"0.57225233",
"0.5714984",
"0.56988513",
"0.56901634",
"0.56783414",
"0.56783414",
"0.5649785",
"0.5606331",
"0.55636513",
"0.5497691",
"0.5493588",
"0.5473426",
"0.5449927",
"0.5448237",
"0.5448237",
"0.5448237",
"0.5448237",
"0.54337764",
"0.54326785",
"0.54266155",
"0.540334",
"0.5400033",
"0.53971297",
"0.53926504",
"0.5377015",
"0.5368038",
"0.5356145",
"0.5354055",
"0.53410137",
"0.5340398",
"0.53299505",
"0.53183156",
"0.53152627",
"0.53095645",
"0.53083986",
"0.53083986",
"0.52954626",
"0.5293732",
"0.52873117",
"0.5284763",
"0.5269395",
"0.52632433",
"0.52537537",
"0.5250898",
"0.5250052",
"0.52461344",
"0.5235775",
"0.52344173",
"0.52317256",
"0.5231586",
"0.5230849",
"0.5224318",
"0.52204186",
"0.52157515",
"0.52150947",
"0.5210482",
"0.5207863",
"0.5199107",
"0.5186652",
"0.5185904",
"0.51793915",
"0.5161747",
"0.51551074",
"0.51492614",
"0.5149126",
"0.5142624",
"0.51411986",
"0.51344955",
"0.51327246",
"0.51248527",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.51228815",
"0.5110327",
"0.51084334"
] | 0.73883945 | 0 |
Test case for updatePackingPlan Update a packingPlan. | public function testUpdatePackingPlan()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testUpdatePackingPlanCustomFields()\n {\n }",
"public function updateListingPackageUsage(&$plan_info)\n {\n global $rlDb, $account_info, $reefless, $lang;\n\n $paid_status = false;\n\n // Existing package mode\n if ($plan_info['Type'] == 'package' && $plan_info['Package_ID']) {\n if ($plan_info['Listings_remains'] > 0) {\n $update = array(\n 'fields' => array(\n 'Listings_remains' => $plan_info['Listings_remains'] - 1,\n ),\n 'where' => array(\n 'ID' => $plan_info['Package_ID'],\n ),\n );\n\n $prefix = ucfirst($this->adType);\n if ($plan_info[$prefix . '_listings'] > 0) {\n $update['fields'][$prefix . '_remains'] = $plan_info[$prefix . '_remains'] - 1;\n }\n\n $rlDb->update($update, 'listing_packages');\n }\n\n // Set paid status\n $paid_status = $lang['purchased_packages'];\n }\n // Newly free package mode\n elseif ($plan_info['Type'] == 'package' && !$plan_info['Package_ID'] && $plan_info['Price'] <= 0) {\n $insert = array(\n 'Account_ID' => $account_info['ID'],\n 'Plan_ID' => $plan_info['ID'],\n 'Listings_remains' => $plan_info['Listing_number'] - 1,\n 'Standard_remains' => $plan_info['Standard_listings'],\n 'Featured_remains' => $plan_info['Featured_listings'],\n 'Type' => 'package',\n 'Date' => 'NOW()',\n 'IP' => $reefless->getClientIpAddress(),\n );\n\n if ($plan_info['Featured'] && $plan_info['Advanced_mode'] && $this->adType == 'standard') {\n $insert['Standard_remains']--;\n }\n\n if ($plan_info['Featured'] && $plan_info['Advanced_mode'] && $this->adType == 'featured') {\n $insert['Featured_remains']--;\n }\n\n $rlDb->insert($insert, 'listing_packages');\n\n // Set paid status\n $paid_status = $lang['package_plan'] . '(' . $lang['free'] . ')';\n }\n // Limited listing mode\n elseif ($plan_info['Type'] == 'listing' && $plan_info['Limit'] > 0) {\n $usage_key = $plan_info['Using'] ? 'Using' : 'Limit';\n $plan_usage_insert = array(\n 'Account_ID' => $account_info['ID'],\n 'Plan_ID' => $plan_info['ID'],\n 'Listings_remains' => $plan_info[$usage_key] - 1,\n 'Type' => 'limited',\n 'Date' => 'NOW()',\n 'IP' => $reefless->getClientIpAddress(),\n );\n\n $rlDb->insert($plan_usage_insert, 'listing_packages');\n }\n\n return $paid_status;\n }",
"public function testDeletePackingPlan()\n {\n }",
"function TestPlan_update($plan_id, $author_id, $product_id = NULL, $default_product_version = NULL, $type_id = NULL, $name = NULL, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.update', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testAddPackingPlan()\n {\n }",
"public function testGetPackingPlanById()\n {\n }",
"public function update(Request $request, Plan $plan)\n {\n //\n }",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function update_plan($planId,$items,$state){ \n try {\n \n $createdPlan = new Plan();\n $createdPlan->setId($planId);\n\n $patch = new Patch();\n $value = new PayPalModel('{\n \"state\":\"'.$state.'\"\n }');\n $this->setArrayToMethods(array_filter($items), $patch);\n $patch->setValue($value); \n \n $patchRequest = new PatchRequest();\n $patchRequest->addPatch($patch);\n $requestArray = clone $createdPlan;\n $createdPlan->update($patchRequest, $this->_api_context);\n $plan = Plan::get($planId, $this->_api_context);\n \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $plan->toArray();\n $returnArray['RAWREQUEST'] =$requestArray;\n $returnArray['RAWRESPONSE']=$plan->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }",
"public function update(UpdateStripePlanRequest $request)\n {\n\n Log::debug(\"UPDATE PLAN\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->createPlan($request->amount, $request->name, $request->product, $request->interval);\n\n if ($result['message'] == 'Success'){\n\n session()->flash('success', 'Plan updated successfully.');\n \n return redirect( route ('plans.index') );\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n\n }",
"public function update($id, Request $request)\n {\n $customMessages = [\n 'name' => 'The Plan Name field is required.',\n 'description' => 'The description field is required.',\n ];\n $this->validate($request, [\n 'name' => 'required|unique:plans,name,'.$request->id.',id',\n 'description' => 'required',\n ], $customMessages);\n \n $plan = Plan::findOrFail($id);\n $plan->name = $request->get('name');\n $plan->description = $request->get('description');\n if($request->has('status')) $plan->status = $request->get('status');\n $plan->save();\n $mainmodules = MainModule::all();\n try{\n $datetime = date('Y-m-d H:i:s');\n $has_tally_integration = $request->has('tally');\n DB::beginTransaction();\n $plans_has_modules = DB::table('plan_has_modules')->where('plan_id', $plan->id)->first();\n if($plans_has_modules) DB::table('plan_has_modules')->where('plan_id', $plan->id)->delete();\n\n $insertData = array();\n $clientSettingUpdatedArray = array();\n foreach($mainmodules as $module){\n $field = $module->field;\n $enabled = $request->$field ? 1 : 0;\n $clientSettingUpdatedArray[$field] = $enabled;\n $data = array(\n 'plan_id'=>$plan->id,\n 'module_id'=>$module->id,\n 'enabled'=>$enabled\n ); \n array_push($insertData, $data);\n }\n if(!empty($insertData)) DB::table('plan_has_modules')->insert($insertData);\n $companiesIDs = DB::table('company_plan')->where('plan_id',$plan->id)->pluck('company_id');\n \n if(!empty($companiesIDs)){\n $clientSettings = ClientSetting::whereIn('company_id',$companiesIDs)->get();\n \n foreach($clientSettings as $clientSetting){\n $clientSetting->update($clientSettingUpdatedArray);\n $company_id = $clientSetting->company_id;\n // AssignFullAccessPermission::dispatch($company_id, $clientSetting);\n // $limited_access_assign_permission_name = array('PartyVisit-view', 'PartyVisit-create');\n \n // AssignLimitedAccessPermission::dispatch($company_id, $limited_access_assign_permission_name);\n\n $tallyInt = DB::table('tally_schedule')->where('company_id', $company_id)->first();\n $companyname = Company::find($company_id);\n \n $domain = $companyname ? $companyname->domain : NULL;\n if($domain){\n if (!$has_tally_integration && !empty($tallyInt)) {\n $affected = DB::table('tally_schedule')\n ->where('company_id', $company_id)\n ->update(['updated_at' => $datetime, 'deleted_at' => $datetime]);\n } elseif ($has_tally_integration) {\n if($tallyInt) $affected = DB::table('tally_schedule')->where('company_id', $company_id)->update(['updated_at' => $datetime, 'deleted_at' => NULL]);\n else $affected = DB::table('tally_schedule')->insert([\n 'company_id' => $company_id,\n 'company_name' => $domain,\n 'created_at' => $datetime]);\n }\n }\n }\n }\n DB::commit();\n if(isset($clientSettings)){\n foreach($clientSettings as $clientSetting){\n $fbIDs = DB::table('employees')->where(array(array('company_id', $clientSetting->company_id), array('status', 'Active')))->whereNotNull('firebase_token')->pluck('firebase_token');\n $dataPayload = array(\"data_type\" => \"company_setting\", \"company_setting\" => json_encode($clientSetting), \"action\" => \"update\");\n sendPushNotification_($fbIDs, 12, null, $dataPayload); \n }\n }\n return redirect()->route('app.plan')->with('success', 'Information has been Updated');\n }catch(\\Exception $e){\n DB::rollback();\n dd($e->getMessage());\n Log::error($e->getMessage());\n }\n }",
"public function setProposedPlanUpdate($plan) {\n $this->proposedPlanUpdate = $plan;\n }",
"public function updateListing($plan_info)\n {\n $is_free = false;\n\n // Define is listing is free\n if (\n $plan_info['Price'] <= 0\n || ($plan_info['Price'] > 0\n && (\n (\n $this->planType == 'listing'\n && $plan_info['Package_ID']\n && $plan_info['Listings_remains'] > 0\n )\n || (\n $this->planType == 'account'\n && $plan_info['Listings_remains'] > 0\n )\n )\n )\n ) {\n $is_free = true;\n\n // Redirect to the form if done step was initiated not by script\n if (!$this->listingData['Plan_ID']) {\n $this->redirectToStep('category');\n exit;\n }\n }\n // Checking for paid listing payment status\n elseif (strtotime($this->listingData['Pay_date']) === false) {\n if ($this->singleStep) {\n $this->redirectToStep('category');\n } else {\n $this->redirectToStep($this->listingData['Last_step'], $this->extendUrl());\n }\n exit;\n }\n\n // Change listing status\n $update = array(\n 'fields' => array(\n 'Last_step' => '',\n 'Last_type' => '',\n 'Cron' => '0',\n 'Cron_notified' => '0',\n 'Cron_featured' => '0',\n ),\n 'where' => array(\n 'ID' => $this->listingID,\n ),\n );\n\n if ($is_free) {\n // Define featured status\n if (($plan_info['Featured'] || $plan_info['Featured_listing'])\n && (!$plan_info['Advanced_mode']\n || ($plan_info['Advanced_mode'] && $this->adType == 'featured')\n )\n ) {\n $featured = true;\n }\n\n $update['fields']['Status'] = $GLOBALS['config']['listing_auto_approval'] ? 'active' : 'pending';\n $update['fields']['Pay_date'] = 'NOW()';\n $update['fields']['Featured_ID'] = $featured ? $plan_info['ID'] : 0;\n $update['fields']['Featured_date'] = $featured ? 'NOW()' : 'NULL';\n }\n\n $GLOBALS['rlDb']->update($update, 'listings');\n\n /**\n * @since 4.7.2 - Hook moved after code \"rlDb->update()\"\n * @since 4.6.0 - All parameters\n */\n $GLOBALS['rlHook']->load('afterListingDone', $this, $update, $is_free);\n }",
"public function updated(PlanSubscription $planSubscription)\n {\n\n if($planSubscription->status==\"PENDING\"){\n $planSubscription->is_paid = false;\n $planSubscription->save();\n }\n if($planSubscription->status==\"SUSPENDED\"){\n $planSubscription->is_paid = false;\n $planSubscription->save();\n }\n if($planSubscription->status==\"CANCELLED\"){\n $planSubscription->is_paid = false;\n $planSubscription->cancelled_on = Carbon::now();\n $planSubscription->save();\n }\n if($planSubscription->status==\"CANCELLED_BY_RECEIVER\"){\n $planSubscription->is_paid = false;\n $planSubscription->cancelled_on = Carbon::now();\n $planSubscription->save();\n }\n if($planSubscription->status==\"CANCELLED_BY_SENDER\"){\n $planSubscription->is_paid = false;\n $planSubscription->cancelled_on = Carbon::now();\n $planSubscription->save();\n }\n }",
"public function update(Request $request, VendorSubscriptionPlans $vendorSubscriptionPlan)\n {\n $request->validate(\n [\n 'title' => 'required|max:100',\n 'price' => 'numeric|nullable',\n 'duration' => 'required|numeric',\n 'product_limitation' => 'required|numeric',\n 'description' => 'max:200',\n 'status' => 'required',\n\n ],\n [\n 'product_limitation.required' => 'No. of Product is required',\n 'product_limitation.numeric' => 'No. of Product must be a numeric value',\n ]\n );\n\n $vendorSubscriptionPlan->title = $request->title;\n $vendorSubscriptionPlan->price = $request->price ?? 0;\n $vendorSubscriptionPlan->duration = $request->duration;\n $vendorSubscriptionPlan->product_limitation = $request->product_limitation;\n $vendorSubscriptionPlan->description = $request->description;\n $vendorSubscriptionPlan->status = $request->status;\n\n if ($vendorSubscriptionPlan->save()){\n Session::flash('success','Vendor Subscription Plan Added');\n return redirect()->route('vendor-subscription-plan.index');\n }else{\n Session::flash('error','Vendor Subscription Plan Not Added');\n return redirect()->back()->withInput();\n }\n }",
"public function updating(Plan $plan)//troquei o update por updating\n {\n $plan->url = Str::kebab($plan->name);\n }",
"protected function syncPlan(Plan $plan): void\n {\n $this->info(\n PHP_EOL .\n Carbon::now() .\n ' Sync duration values for plan: ' .\n $plan->name\n );\n\n $bar_by_plan = new ProgressBar($this->output, $plan->num_items);\n $plan = Plan::where('id', $plan->id)->first();\n foreach ($plan->days as $day) {\n $playlist_items = PlaylistItems::where(\n 'playlist_id',\n $day->playlist_id\n )->get();\n\n foreach ($playlist_items as $playlist_item) {\n $playlist_item->calculateDuration()->save();\n $playlist_item->calculateVerses()->save();\n $bar_by_plan->advance();\n }\n }\n $bar_by_plan->finish();\n $this->info('');\n }",
"public function testDeletePackingPlanTag()\n {\n }",
"public function testAddPackingPlanAudit()\n {\n }",
"public function testGetPackingPlanFiles()\n {\n }",
"public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }",
"public function testDeletePackingPlanFile()\n {\n }",
"public function testAddPackingPlanFile()\n {\n }",
"public function update_plan() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n # Set up query\n $q = \"UPDATE plans SET\n\t\t\t description='\".$_POST['description'].\"', time='\".$_POST['time'].\"', public='\".(!empty($_POST['public'])?1:0).\"'\n\t\t\t WHERE plan_id=\".$_POST['plan_id'];\n $plans = DB::instance(DB_NAME)->query($q);\n\t\t\n\t\t#Adding action to System Log\n $data3 = Array (\n\n \"modified_date\" => Time::now(),\n \"FK_id\" => $_POST['plan_id'],\n \"FK_table\" => 'plans',\n \"login\" => false,\n \"modified_by\" => $this->user->user_id\n );\n DB::instance(DB_NAME)->insert('logs',$data3);\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n print json_encode($jTableResult);\n }",
"public function update(Request $request, $id)\n {\n $this->authorize('update', Plan::class);\n\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'duration' => 'required',\n ]);\n\n $plan = Plan::findOrFail($id);\n // Generate plan slug from plan name\n $slug = str_replace(' ','-', $request->input('name'));\n $gateway_id = str_replace(' ','_', $request->input('name'));\n $team_enable = !empty($request->input('teams_limit')) ? 1 : 0;\n $teams_limit = !empty($request->input('teams_limit')) ? $request->input('teams_limit') : NULL;\n $price = (float) $request->input('price') * 100;\n \n // Delete the plan on stripe \n $stripe_plan = \\Stripe\\Plan::retrieve($plan->gateway_id);\n $stripe_plan->delete();\n\n $interval=explode(',',$request->duration);\n //Add the Stripe Api key to\n // Recrete a new plan on stripe\n \\Stripe\\Plan::create([\n \"amount\" => $price,\n \"interval\" => $interval[1],\n \"interval_count\"=>$interval[0], \n \"product\" => [\n \"name\" => $request->input('name'),\n ],\n \"currency\" => \"usd\",\n \"id\" => $gateway_id,\n \"trial_period_days\" => $request->input('trial'),\n ]);\n\n $plan->name = $request->input('name');\n $plan->gateway_id = $gateway_id;\n $plan->price = $request->input('price');\n $plan->brand = $request->input('brand');\n $plan->contest = $request->input('contest');\n $plan->duration = $request->input('duration');\n $plan->other_info_1 =$request->input('plan_info_1');\n $plan->other_info_2 = $request->input('plan_info_2');\n //$plan->teams_enabled = $team_enable;\n //$plan->teams_limit = $teams_limit;\n $plan->active =1;\n $plan->slug = $slug;\n //$plan->trial_period_days = $request->input('trial');\n $plan->save();\n\n return redirect()->back()->with(\"status\", \"Your plan has been updated.\");\n }",
"public function update(Request $request, Plan $tariff)\n {\n try {\n $tariff->update([\n 'title' => $request->title,\n 'sub_title' => $request->sub_title,\n 'price' => $request->price,\n 'day' => $request->day,\n 'properties' => ($request->properties?serialize($request->properties):null),\n ]);\n\n return redirect()->route('tariffs.index')->with('flash_message', 'بروزرسانی با موفقیت انجام شد');\n }catch (\\Exception $e){\n return redirect()->back()->with('err_message', 'خطایی رخ داده است، لطفا مجددا تلاش نمایید');\n }\n }",
"public function update(PromoPackRequest $request, PromoPack $promoPack)\n\t{\n\t\tDB::beginTransaction();\n\t\ttry {\n\t\t\t$promoPack->fill($request->fillFormFields());\n\t\t\t$promoPack->save();\n\t\t\t$extra = array_map(function($course){\n\t\t\t\treturn ['course_id'=>$course['id'],'qty'=>$course['quantity']];\n\t\t\t}, $request->input('corsi'));\n\t\t\t$course_ids = array_pluck( $extra, 'course_id');\n\t\t\t$qtys = array_pluck( $extra, 'qty');\n\t\t\tforeach ($course_ids as $key=>$val){\n\t\t\t\t$store[$val] = ['qty'=>$qtys[$key]];\n\t\t\t}\n\t\t\t$promoPack->courses()->sync($store);\n DB::commit();\n\t\t\treturn response([\n\t\t\t\t'status' => 'success',\n\t\t\t\t'msg' => trans('messages.success'),\n\t\t\t\t'redirect'=>route('admin.promo.pack')\n\t\t\t]);\n\t\t} catch (\\Exception $exception) {\n\t\t\tDB::rollback();\n\t\t\tlogger($exception->getMessage());\n\t\t\treturn response([\n\t\t\t\t'status' => 'error',\n\t\t\t\t'msg' => trans('messages.error')\n\t\t\t]);\n\t\t}\n\n\t}",
"public function test_updateExternalShipment() {\n\n }",
"function updatePackage() {\n\n $sql = sprintf(\"UPDATE packages_new SET name = '%s',\n \t\t\t\t\t\t\t\t\t\tprice_per_month = '%s',\n \t\t\t\t\t\t\t\t\t\tprice_per_year = '%s',\n \t\t\t\t\t\t\t\t\t\tis_agency_or_builder = %d\n \t\t\t\t\t\t\t\t\t\tWHERE id = %d\t\n \t\t\t\t\t\t\t\t\t\",\n \t\t\t\t\t\t\t\t\t\t$this->package_name,\n \t\t\t\t\t\t\t\t\t\t$this->price_per_month,\n \t\t\t\t\t\t\t\t\t\t$this->price_per_year,\n \t\t\t\t\t\t\t\t\t\t$this->is_agency_or_builder,\n \t\t\t\t\t\t\t\t\t\t$this->package_id \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t);\n $this->conn->setsql($sql);\n $this->conn->updateDB();\n\n if($this->conn->error) {\n for(reset($this->conn->error); $key = key($this->conn->error); next($this->conn->error)) {\n $this->Error[\"SQL ERROR ClssCmpnCrt-\".$key] = $this->conn->error[$key];\n }\n return false;\n }\n\n \n \n\n return true;\n }",
"public function testGetPackingPlanByFilter()\n {\n }",
"public function update() {\n\n\t\tif (!empty($this->plan_model->return_plan_by_id($this->input->post('id_plan')))) {\n\t\t\t\n\t\t\t$this->data['plansUpdate'] = $this->plan_model->return_plan_by_id($this->input->post('id_plan'));\n\n\t\t\t$this->session->set_flashdata('succes_msg','Registered Plan Health!');\n\n\t\t}else {\n\n\t\t\t$this->session->set_flashdata('error_msg','Fail Register!');\n\t\t}\n\n\t\t$this->index();\n\n\t}",
"public function testUpdateExternalShipment()\n {\n }",
"public function create_or_update_plan( $plan_data ) {\n\t\t$item_id = $plan_data['id'];\n\t\t$all_items = MS_Factory::get_transient( 'ms_stripecheckout_plans' );\n\t\t$all_items = mslib3()->array->get( $all_items );\n\n\t\tif ( ! isset( $all_items[ $item_id ] )\n\t\t || ! is_a( $all_items[ $item_id ], 'StripeCheckoutPlan' )\n\t\t) {\n\t\t\ttry {\n\t\t\t\t$item = StripeCheckoutPlan::retrieve( $item_id );\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t// If the plan does not exist then stripe will throw an Exception.\n\t\t\t\t$item = false;\n\t\t\t}\n\t\t\t$all_items[ $item_id ] = $item;\n\t\t} else {\n\t\t\t$item = $all_items[ $item_id ];\n\t\t}\n\n\t\t/*\n\t\t * Stripe can only update the plan-name, so we have to delete and\n\t\t * recreate the plan manually.\n\t\t */\n\t\tif ( $item && is_a( $item, 'StripeCheckoutPlan' ) ) {\n\t\t\t$item->delete();\n\t\t\t$all_items[ $item_id ] = false;\n\t\t}\n\n\t\tif ( $plan_data['amount'] > 0 ) {\n\t\t\ttry {\n\t\t\t\t$item = StripeCheckoutPlan::create( $plan_data );\n\t\t\t\t$all_items[ $item_id ] = $item;\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t// Nothing.\n\t\t\t}\n\t\t}\n\n\t\tMS_Factory::set_transient(\n\t\t\t'ms_stripecheckout_plans',\n\t\t\t$all_items,\n\t\t\tHOUR_IN_SECONDS\n\t\t);\n\t}",
"public function testApplyOrderWarehouseFulfillmentPlan()\n {\n }",
"public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }",
"public function testUpdatePayrun()\n {\n }",
"public function testShouldUpdateAPayout()\n {\n $data = [\n 'customer' => ['id' => 1],\n 'currency' => ['iso' => 'XOF'],\n 'amount' => 1000\n ];\n $body = [\n 'v1/payout' => [\n 'id' => 1,\n 'klass' => 'v1/payout',\n 'reference' => '109329828',\n 'amount' => 1000,\n 'status' => 'pending',\n 'customer' => [\n 'id' => 1,\n 'klass' => 'v1/customer',\n ],\n 'currency' => [\n 'id' => 1,\n 'klass' => 'v1/currency',\n 'iso' => 'XOF'\n ],\n 'mode' => null,\n 'created_at' => '2018-03-12T09:09:03.969Z',\n 'updated_at' => '2018-03-12T09:09:03.969Z',\n ]\n ];\n\n $this->mockRequest('put', '/v1/payouts/1', $data, $body);\n\n $payout = \\FedaPay\\Payout::update(1, $data);\n\n $this->assertInstanceOf(\\FedaPay\\Payout::class, $payout);\n $this->assertEquals(1, $payout->id);\n $this->assertEquals('109329828', $payout->reference);\n $this->assertEquals(1000, $payout->amount);\n $this->assertEquals('pending', $payout->status);\n $this->assertInstanceOf(\\FedaPay\\Customer::class, $payout->customer);\n $this->assertEquals(1, $payout->customer->id);\n $this->assertInstanceOf(\\FedaPay\\Currency::class, $payout->currency);\n $this->assertEquals(1, $payout->currency->id);\n $this->assertEquals(null, $payout->mode);\n }",
"public function testRunFulfillmentPlan()\n {\n }",
"public function putEditFlatplan($slug, $plan){\n\t\ttry{\n\t\t\t$org = Organization::where('slug', '=', $slug)->firstOrFail();\n\t\t\t$flatplan = Flatplan::where('organization_id', '=', $org->id)->where('slug', '=', $plan)->firstOrFail();\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\treturn View::Make('fourOhFour');\n\t\t}\n\t\t$validator = Validator::make(Input::all(), $this->updateRules);\n\t\tif($validator->fails()){\n\t\t\treturn Redirect::back()->withInput()->withErrors($validator)->with('flash_message', 'There were errors with your update. See below.');\n\t\t}\n\t\telse{\n\t\t\t$flatplan->name = Input::get('name');\n\t\t\t$flatplan->pub_date = Input::get('publication_date');\n\t\t\t$flatplan->save();\n\t\t\treturn Redirect::to('/'.$org->slug.'/'.$flatplan->slug)->with('flash_message', 'Update Successful');\n\t\t}\n\t}",
"public function test_updateExternalShipmentCustomFields() {\n\n }",
"public function testAddPackingPlanTag()\n {\n }",
"public function updated(Plan $plan)\n {\n foreach ($plan->users as $user) {\n Mail::to($user)\n ->send(new PlanUpdated($user));\n }\n }",
"public function update(PlanCreateRequest $request, $id)\n {\n $validated = $request->validated();\n $plan = Plan::find($id);\n $plan->update($validated);\n return redirect()->route('shops.show' , ['shop' => $plan->shop_id])->\n with(['done' => 'Plan Edited Successfully']);\n }",
"private function _SavePlan()\n\t{\n\t\t/*\n\t\t * Saving process:\n\t\t *\t\tS1: Set up values for properties of the RatePlan object that are not already defined, or not in their database correct format\n\t\t *\t\tS2: Save the record to the RatePlan table\n\t\t *\t\tS3: Remove any records in the RatePlanRateGroup table\n\t\t *\t\tS4: For each RateGroup belonging to this RatePlan:\n\t\t *\t\t\t\tadd a record to the RatePlanRateGroup table\n\t\t *\t\tS5: If the RatePlan is being Committed: (not being saved as a draft)\n\t\t *\t\t\t\tFor each draft RateGroup belonging to this RatePlan:\n\t\t *\t\t\t\t\tupdate the Archived property of the RateGroup in the RateGroup table so that it is now a committed RateGroup, not a draft\n\t\t *\t\t\t\t\tFor each draft Rate belonging to the draft RateGroup:\n\t\t *\t\t\t\t\t\tupdate the Archived property of the Rate in the Rate table so that it is now a committed Rate, not a draft\n\t\t */\n\n\t\t// S1: Set up the remaing fields required of a RatePlan record\n\t\tDBO()->RatePlan->MinMonthly\t= ltrim(DBO()->RatePlan->MinMonthly->Value, \"$\");\n\t\tDBO()->RatePlan->ChargeCap\t= ltrim(DBO()->RatePlan->ChargeCap->Value, \"$\");\n\t\tDBO()->RatePlan->UsageCap\t= ltrim(DBO()->RatePlan->UsageCap->Value, \"$\");\n\n\t\tif (SubmittedForm('AddPlan', 'Save as Draft'))\n\t\t{\n\t\t\t// Flag the plan as being a draft\n\t\t\tDBO()->RatePlan->Archived = RATE_STATUS_DRAFT;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The plan is not being saved as a draft\n\t\t\tDBO()->RatePlan->Archived = RATE_STATUS_ACTIVE;\n\t\t}\n\n\t\tDBO()->RatePlan->modified_employee_id\t= Flex::getUserId();\n\t\tif (!DBO()->RatePlan->Id->Value)\n\t\t{\n\t\t\t// Plan has not been saved before\n\t\t\tDBO()->RatePlan->created_employee_id\t= Flex::getUserId();\n\t\t}\n\n\t\t// If the RatePlan has already been saved as a draft then load in the details that don't get edited here, so they don't get erased\n\t\tif (DBO()->RatePlan->Id->Value)\n\t\t{\n\t\t\tDBO()->RatePlan->LoadMerge();\n\t\t}\n\n\t\t// S2: Save the plan to the database\n\t\tif (!DBO()->RatePlan->Save())\n\t\t{\n\t\t\t// Saving failed\n\t\t\treturn \"ERROR: Saving the RatePlan to the RatePlan database table failed, unexpectedly\";\n\t\t}\n\n\t\t// S3: Remove all records from the RatePlanRateGroup table where RatePlan == DBO()->RatePlan->Id->Value\n\t\t$delRatePlanRateGroup = new Query();\n\t\t$delRatePlanRateGroup->Execute(\"DELETE FROM RatePlanRateGroup WHERE RatePlan = \" . DBO()->RatePlan->Id->Value);\n\n\t\t// S4: Save each of the RateGroups associated with the RatePlan to the RatePlanRateGroup table\n\t\tDBO()->RatePlanRateGroup->RatePlan = DBO()->RatePlan->Id->Value;\n\t\tforeach ($this->_arrRateGroups as $intRateGroup)\n\t\t{\n\t\t\tDBO()->RatePlanRateGroup->Id = 0;\n\t\t\tDBO()->RatePlanRateGroup->RateGroup = $intRateGroup;\n\n\t\t\tif (!DBO()->RatePlanRateGroup->Save())\n\t\t\t{\n\t\t\t\t// Saving failed\n\t\t\t\treturn \"ERROR: Saving one of the RateGroup - RatePlan associations failed, unexpectedly.<br />The RatePlan has not been saved\";\n\t\t\t}\n\t\t}\n\n\t\t// S5: Remove all records from the rate_plan_discount table where RatePlan == DBO()->RatePlan->Id->Value\n\t\t$delRatePlanDiscount\t= new Query();\n\t\t$delRatePlanDiscount->Execute(\"DELETE FROM rate_plan_discount WHERE rate_plan_id = \" . DBO()->RatePlan->Id->Value);\n\n\t\t// S6: Remove any records from the discount table which are no longer linked to any Rate Plans (Discounts cannot be shared between Plans)\n\t\t$delUnlinkedDiscounts\t= new Query();\n\t\t$delUnlinkedDiscounts->Execute(\"DELETE FROM discount WHERE (SELECT id FROM rate_plan_discount WHERE discount_id = discount.id LIMIT 1) IS NULL\");\n\n\t\t// S7: Save each of the Discounts which are linked between this Rate Plan and a Record Type\n\t\t$aDiscountReferenceMap\t= array();\n\t\tforeach (DBL()->RecordType as $dboRecordType)\n\t\t{\n\t\t\t$sRecordTypeObjectName\t\t= \"RecordType_{$dboRecordType->Id->Value}\";\n\t\t\t$iDiscountReference\t= (int)DBO()->{$sRecordTypeObjectName}->discount_id->Value;\n\n\t\t\t// Has the Discount already been created?\n\t\t\tif ($iDiscountReference && $iDiscountReference > 0)\n\t\t\t{\n\t\t\t\tif (!array_key_exists($iDiscountReference, $aDiscountReferenceMap))\n\t\t\t\t{\n\t\t\t\t\t// Create the Discount\n\t\t\t\t\t$sDiscountObjectName\t= \"discount_{$iDiscountReference}\";\n\n\t\t\t\t\t$oDiscount\t\t\t\t\t= new Discount();\n\t\t\t\t\t$oDiscount->name\t\t\t= trim(DBO()->{$sDiscountObjectName}->name->Value);\n\t\t\t\t\t$oDiscount->description\t\t= trim(DBO()->{$sDiscountObjectName}->description->Value);\n\n\t\t\t\t\tif (DBO()->{$sDiscountObjectName}->limit_type->Value === 'UNITS')\n\t\t\t\t\t{\n\t\t\t\t\t\t$oDiscount->charge_limit\t= null;\n\t\t\t\t\t\t$oDiscount->unit_limit\t\t= abs((int)trim(DBO()->{$sDiscountObjectName}->limit->Value));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$oDiscount->charge_limit\t= abs((float)trim(DBO()->{$sDiscountObjectName}->limit->Value));\n\t\t\t\t\t\t$oDiscount->unit_limit\t\t= null;\n\t\t\t\t\t}\n\t\t\t\t\t$oDiscount->charge_limit\t= ($oDiscount->charge_limit) ? $oDiscount->charge_limit : null;\n\t\t\t\t\t$oDiscount->unit_limit\t\t= ($oDiscount->unit_limit) ? $oDiscount->unit_limit : null;\n\n\t\t\t\t\t$oDiscount->save();\n\n\t\t\t\t\t// Create the Discount<->RatePlan Link\n\t\t\t\t\t$oRatePlanDiscount\t\t\t\t\t= new Rate_Plan_Discount();\n\t\t\t\t\t$oRatePlanDiscount->rate_plan_id\t= DBO()->RatePlan->Id->Value;\n\t\t\t\t\t$oRatePlanDiscount->discount_id\t\t= $oDiscount->id;\n\t\t\t\t\t$oRatePlanDiscount->save();\n\n\t\t\t\t\t$aDiscountReferenceMap[$iDiscountReference]\t= $oDiscount->id;\n\t\t\t\t}\n\n\t\t\t\t// Save Link\n\t\t\t\t$oDiscountRecordType\t\t\t\t\t= new Discount_Record_Type();\n\t\t\t\t$oDiscountRecordType->discount_id\t\t= $aDiscountReferenceMap[$iDiscountReference];\n\t\t\t\t$oDiscountRecordType->record_type_id\t= $dboRecordType->Id->Value;\n\t\t\t\t$oDiscountRecordType->save();\n\t\t\t}\n\t\t}\n\n\t\t// S8: If the RatePlan is being committed then all draft RateGroups used by it must be commited and all draft Rates\n\t\t// used by the draft RateGroups must be committed\n\t\tif ((SubmittedForm('AddPlan', 'Commit')) && (count($this->_arrRateGroups) > 0))\n\t\t{\n\t\t\t$strRateGroups \t= implode(',', $this->_arrRateGroups);\n\t\t\t$arrUpdate\t\t= Array(\"Archived\" => RATE_STATUS_ACTIVE);\n\t\t\t$updRateGroups \t= new StatementUpdate(\"RateGroup\", \"Archived = \". RATE_STATUS_DRAFT .\" AND Id IN ($strRateGroups)\", $arrUpdate);\n\t\t\t$updRates \t\t= new StatementUpdate(\"Rate\", \"Archived = \". RATE_STATUS_DRAFT .\" AND Id IN (SELECT Rate FROM RateGroupRate WHERE RateGroup IN ($strRateGroups))\", $arrUpdate);\n\n\t\t\tif ($updRateGroups->Execute($arrUpdate, NULL) === FALSE)\n\t\t\t{\n\t\t\t\treturn \"ERROR: Commiting one of the Draft Rate Groups, used by this Rate Plan, failed.<br />The RatePlan has not been saved\";\n\t\t\t}\n\n\t\t\tif ($updRates->Execute($arrUpdate, NULL) === FALSE)\n\t\t\t{\n\t\t\t\treturn \"ERROR: Commiting one of the Draft Rates, used by this Rate Plan, failed.<br />The RatePlan has not been saved\";\n\t\t\t}\n\t\t}\n\n\t\t// Everything has been saved\n\t\treturn TRUE;\n\t}",
"public function update(Request $request, MemberShipPlan $membeship_plan)\n {\n if(config('app.dev_mode') == false) \n return back()->with('warning', trans('messages.dev_restriction'));\n \n if( $membeship_plan->update($request->all()) )\n return back()->with('success', trans('messages.updated', ['model' => $this->model_name]));\n\n return back()->with('error', trans('messages.failed'));\n }",
"public function testUpdateAirport()\n {\n $db=new Db();\n $this->airport->setAirportFromDB($db, 8);\n $actual=$this->airport->updateAirport($db);\n $this->assertEquals(true,$actual);\n }",
"public function update(UpdatePlan $request, string $id)\n {\n $plan = Plan::findOrFail(id_decode($id), ['id', 'price', 'months', 'type', 'status']);\n\n $plan->fill($request->validated());\n\n if ($plan->save()) {\n flash(trans('common.updatedSuccessfully'))->success();\n\n return redirect()->route('plans.index');\n }\n\n flash(trans('common.error'))->error();\n\n return back();\n }",
"public function updateAccount(&$plan_info)\n {\n global $account_info;\n\n // Return if it's not a membership plab mode\n if ($this->planType != 'account') {\n return;\n }\n\n // Return if plan isn't free or current account already has a plan assigned\n if ($plan_info['Price'] > 0 || $account_info['Plan_ID']) {\n return;\n }\n\n $GLOBALS['reefless']->loadClass('Account');\n $GLOBALS['rlAccount']->upgrade($account_info['ID'], $plan_info['ID'], false, false);\n $account_info['Plan_ID'] = $plan_info['ID'];\n }",
"function tariffplan_old() {\n $this->layout = 'public-package';\n $this->loadModel('Package');\n $this->loadModel('Psetting');\n if ($this->request->is('post')) {\n\n// http://production.shippingapis.com/ShippingAPI.dll?API= CityStateLookup&XML=<CityStateLookupRequest USERID=\"138TOTAL1122\"><ZipCode ID=\"0\">\n//<Zip5>90210</Zip5>\n//</ZipCode></CityStateLookupRequest>\n //90210\n\n $params = '<CityStateLookupRequest USERID=\"138TOTAL1122\"><ZipCode ID=\"0\"><Zip5>' . $this->request->data['Usps']['zipcode'] . '</Zip5></ZipCode></CityStateLookupRequest>';\n $HttpSocket = new HttpSocket();\n $results = $HttpSocket->post('http://production.shippingapis.com/ShippingAPI.dll', array('API' => 'CityStateLookup',\n 'XML' => $params\n )\n );\n $xml = new SimpleXMLElement($results);\n $state = (string) $xml->ZipCode->State;\n $this->loadModel('TariffCountry');\n\n\n $countries = $this->TariffCountry->find('list');\n if (in_array($state, $countries)) {\n $sql = \"SELECT psettings.* FROM packages\n LEFT JOIN psettings ON packages.id=psettings.package_id \n WHERE packages.name = 'Full package'\n \";\n $packageName = 'Full package';\n $packages = $this->Package->query($sql);\n // $packages = $this->Package->find('all');\n } else {\n $sql = \"SELECT psettings.*,packages.name FROM packages\n LEFT JOIN psettings ON packages.id=psettings.package_id \n WHERE packages.name = 'NABC special package'\n \";\n $packages = $this->Package->query($sql);\n $packageName = 'NABC special package';\n }\n $this->set(compact('packages', 'packageName'));\n } else {\n $sql = \"SELECT psettings.*,packages.name FROM packages\n LEFT JOIN psettings ON packages.id=psettings.package_id \n WHERE packages.name = 'NABC special package'\n \";\n $packages = $this->Package->query($sql);\n $packageName = 'NABC special package';\n $this->set(compact('packages', 'packageName'));\n }\n }",
"function TestRun_update($run_id, $build_id, $environment_id, $manager_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.update', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function update(Request $request, Planet $planet)\n {\n //\n }",
"public function update(): Response\n {\n $state = $this->request->getQuery('state');\n\n switch ($state) {\n case 'success':\n $id = $this->request->getQuery('id');\n $hostedPage = HostedPage::createFromId($id);\n $planId = $hostedPage->getPlanId();\n break;\n case 'cancelled':\n $planId = null;\n break;\n default:\n throw new \\RuntimeException(sprintf('Unknown ChargeBee state \"%s\".', $state));\n }\n\n /** @var User $user */\n $user = $this->getIdentity();\n $user->persistPlan($planId);\n\n $this->refreshIdentity();\n\n return $this->redirect(['_name' => 'plans']);\n }",
"public function adminPlanItemConfigUpdate($planItem)\n {\n $settings = $_POST['auction'];\n\n if (is_array($settings) && isset($settings['form_submitted'])) {\n $allow_buy_now = (int)$settings['allow_buy_now'];\n $allow_buy_now_only = ($allow_buy_now) ? $settings['allow_buy_now_only'] : 0; // if allow_buy_now not on, force to be false\n $planItem->set('allow_buy_now', $allow_buy_now);\n $planItem->set('allow_buy_now_only', $allow_buy_now_only);\n\n $buy_now_only_none_left = (isset($settings['buy_now_only_none_left']) && in_array($settings['buy_now_only_none_left'], array('close','sold'))) ? $settings['buy_now_only_none_left'] : 'close';\n $planItem->set('buy_now_only_none_left', $buy_now_only_none_left);\n\n //reverse: note that can set to \"false\" since we do not default to be turned on\n $allow_reverse = (isset($settings['allow_reverse']) && $settings['allow_reverse']) ? 1 : false;\n $allow_reverse_buy_now = ($allow_reverse && isset($settings['allow_reverse_buy_now']) && $settings['allow_reverse_buy_now']) ? 1 : false;\n $charge_reverse_final_fees = ($allow_reverse && isset($settings['charge_reverse_final_fees']) && $settings['charge_reverse_final_fees']) ? 1 : false;\n\n $planItem->set('allow_reverse', $allow_reverse);\n $planItem->set('allow_reverse_buy_now', $allow_reverse_buy_now);\n $planItem->set('charge_reverse_final_fees', $charge_reverse_final_fees);\n\n $planItem->set('force_single_quantity', (int)$settings['force_single_quantity']);\n }\n\n return true;\n }",
"public function edit(Plan $plan)\n {\n //\n }",
"public function update(Request $request, Plancompta $plancompta)\n {\n //\n }",
"function testUpdatePackageTree() {\n\t\t$packages = array('cake', 'model', 'datasource', 'dbo');\n\t\t$result = (bool) $this->ApiPackage->updatePackageTree($packages);\n\t\t$this->assertTrue($result);\n\n\t\t$result = $this->ApiPackage->findAllByParentId(4);\n\t\t$this->assertEqual(count($result), 2);\n\n\t\t$packages = array('cake', 'model', 'datasource', 'dbo');\n\t\t$result = (bool) $this->ApiPackage->updatePackageTree($packages);\n\t\t$this->assertTrue($result);\n\n\t\t$result = $this->ApiPackage->findAllBySlug('model');\n\t\t$this->assertEqual(count($result), 1, 'Too many model slugs');\n\t}",
"public function testDebtorUpdate()\n {\n $this->saveDebtor();\n\n $oDebtor = (new DebtorDAO())->findByCpfCnpj('01234567890');\n $this->assertTrue(!is_null($oDebtor->getId()));\n\n $aDadosUpdate = [\n 'id' => $oDebtor->getId(),\n 'name' => 'Carlos Vinicius Atualização',\n 'email' => '[email protected]',\n 'cpf_cnpj' => '14725836905',\n 'birthdate' => '01/01/2000',\n 'phone_number' => '(79) 9 8888-8888',\n 'zipcode' => '11111-111',\n 'address' => 'Rua Atualização',\n 'number' => '005544',\n 'complement' => 'Conjunto Atualização',\n 'neighborhood' => 'Bairro Atualização',\n 'city' => 'Maceió',\n 'state' => 'AL'\n ];\n\n $oDebtorFound = (new DebtorDAO())->find($aDadosUpdate['id']);\n $oDebtorFound->update($aDadosUpdate);\n\n $oDebtorUpdated = (new DebtorDAO())->find($aDadosUpdate['id']);\n $this->assertTrue($oDebtorUpdated->getName() == 'Carlos Vinicius Atualização');\n $this->assertTrue($oDebtorUpdated->getEmail() == '[email protected]');\n $this->assertTrue($oDebtorUpdated->getCpfCnpj() == '14725836905');\n $this->assertTrue($oDebtorUpdated->getBirthdate()->format('d/m/Y') == '01/01/2000');\n $this->assertTrue($oDebtorUpdated->getPhoneNumber() == '79988888888');\n $this->assertTrue($oDebtorUpdated->getZipcode() == '11111111');\n $this->assertTrue($oDebtorUpdated->getAddress() == 'Rua Atualização');\n $this->assertTrue($oDebtorUpdated->getNumber() == '005544');\n $this->assertTrue($oDebtorUpdated->getComplement() == 'Conjunto Atualização');\n $this->assertTrue($oDebtorUpdated->getNeighborhood() == 'Bairro Atualização');\n $this->assertTrue($oDebtorUpdated->getCity() == 'Maceió');\n $this->assertTrue($oDebtorUpdated->getState() == 'AL');\n $this->assertTrue(!is_null($oDebtorUpdated->getUpdated()));\n $oDebtorUpdated->delete();\n }",
"public function edit(Plan $plan) {\n \n }",
"public function test_updateSettings() {\n\n }",
"public function test_can_update_loan_product()\n {\n $product = factory(LoanProduct::class)->create([\n 'financial_institution_id' => $this->user->institutable_id\n ]);\n $oldImage = $product->images()->save(factory(FileEntry::class)->make());\n\n // Update the product and its image\n $mockUpload = $this->getMockUploadedFile(__FILE__);\n $mockRequest = Mockery::mock($this->getRequest());\n\n $mockRequest->shouldReceive('hasFile')->once()->with('image')->andReturn(true);\n $mockRequest->shouldReceive('file')->with('image')->andReturn($mockUpload);\n\n $loanProduct = dispatch(new CreateLoanProductJob($mockRequest, $product));\n\n $this->assertInstanceOf(LoanProduct::class, $loanProduct);\n $this->assertEquals($product->id, $loanProduct->id);\n $this->assertEquals($mockRequest->get('name'), $loanProduct->name);\n $this->assertEquals($mockRequest->get('description'), $loanProduct->description);\n $this->assertEquals($mockRequest->get('min_amount'), $loanProduct->min_amount);\n $this->assertEquals($mockRequest->get('max_amount'), $loanProduct->max_amount);\n $this->assertEquals($mockRequest->get('interest_per_year'), $loanProduct->interest_per_year);\n $this->assertCount(1, $loanProduct->images);\n $this->assertNotEquals($oldImage->id, $loanProduct->images->first()->id);\n }",
"public function test_updateQueue() {\n\n }",
"public function testProjectAssignmentsUpdateAvailability()\n {\n }",
"public function actionSetup($plan)\n {\n // Redirect back to billing page if already has a plan active\n $isBillingActive = Yii::$app->user->identity->getBillingDaysLeft();\n if($isBillingActive){\n return $this->redirect(['billing/index']);\n }\n\n // Find the Pricing Option the user wants to setup\n $pricing = \\common\\models\\Pricing::findOne($plan);\n if(!$pricing){\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n\n // Check if is trial\n $isTrial = Yii::$app->user->identity->agent_trial_days > 0? true: false;\n\n // If user is attempting to setup a package which is for less than\n // the number of accounts he has attached, show error and redirect to billing\n $currentAccountCount = count(Yii::$app->ownedAccountManager->ownedAccounts);\n $planLimit = $pricing->pricing_account_quantity;\n if($planLimit < $currentAccountCount){\n Yii::$app->getSession()\n ->setFlash('warning', \"[Selected plan only allows $planLimit accounts. You have $currentAccountCount you administer. ] You may remove an account by clicking the <b>Remove</b> button on its right sidebar.\");\n\n return $this->redirect(['billing/index']);\n }\n\n // Calculate Discount if Available\n $discount = 0;\n if($isTrial){\n // Give 30% discount for trial users\n $discount = ($pricing->pricing_price - round($pricing->pricing_price * 0.7)) * -1;\n }\n\n // Setup new billing model\n $billingModel = new Billing();\n $billingModel->agent_id = Yii::$app->user->identity->agent_id;\n $billingModel->pricing_id = $pricing->pricing_id;\n $billingModel->billing_total = $pricing->pricing_price + $discount; // Store initial billed amount\n $billingModel->billing_email = Yii::$app->user->identity->agent_email;\n $billingModel->billing_name = Yii::$app->user->identity->agent_name;\n $billingModel->billing_currency = \"USD\";\n\n // Handle AJAX Validation\n if (Yii::$app->request->isAjax && $billingModel->load(Yii::$app->request->post())) {\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n return \\yii\\widgets\\ActiveForm::validate($billingModel);\n }\n\n if($billingModel->load(Yii::$app->request->post())){\n // Token returned from 2CO after creditcard input\n $billingModel->twoco_token = Yii::$app->request->post('token');\n\n // If Token exists and record of bill is saved\n if($billingModel->twoco_token && $billingModel->save()){\n $token = Yii::$app->request->post('token');\n\n // Your sellerId(account number) and privateKey are required to make the Payment API Authorization call.\n Twocheckout::privateKey(Yii::$app->params['2co.privateKey']);\n Twocheckout::sellerId(Yii::$app->params['2co.sellerId']);\n // Your username and password are required to make any Admin API call.\n Twocheckout::username(Yii::$app->params['2co.username']);\n Twocheckout::password(Yii::$app->params['2co.password']);\n // If you want to turn off SSL verification (Please don't do this in your production environment)\n Twocheckout::verifySSL(Yii::$app->params['2co.verifySSL']); // this is set to true by default\n // To use your sandbox account set sandbox to true\n Twocheckout::sandbox(Yii::$app->params['2co.isSandbox']);\n\n\n // Use the token to create a sale\n try {\n $charge = Twocheckout_Charge::auth([\n \"merchantOrderId\" => $billingModel->billing_id,\n \"token\" => $token,\n \"currency\" => $billingModel->billing_currency,\n \"billingAddr\" => [\n // Card holder’s name. (128 characters max)\n \"name\" => $billingModel->billing_name,\n // Card holder’s street address. (64 characters max) Required\n \"addrLine1\" => $billingModel->billing_address_line1,\n // Card holder’s street address line 2. (64 characters max)\n // Required if “country” value is: CHN, JPN, RUS - Optional for all other “country” values.\n \"addrLine2\" => $billingModel->billing_address_line1? $billingModel->billing_address_line1:\"\",\n // Card holder’s city. (64 characters max) Required\n \"city\" => $billingModel->billing_city,\n /**\n * Card holder’s state. (64 characters max) Required if “country” value is ARG, AUS, BGR, CAN, CHN, CYP,\n * EGY, FRA, IND, IDN, ITA, JPN, MYS, MEX, NLD, PAN, PHL, POL, ROU, RUS, SRB, SGP, ZAF, ESP, SWE, THA, TUR,\n * GBR, USA - Optional for all other “country” values.\n */\n \"state\" => $billingModel->billing_state? $billingModel->billing_state:\"\",\n /**\n * Card holder’s zip. (16 characters max) Required if “country” value is ARG, AUS, BGR, CAN, CHN, CYP, EGY, FRA,\n * IND, IDN, ITA, JPN, MYS, MEX, NLD, PAN, PHL, POL, ROU, RUS, SRB, SGP, ZAF, ESP, SWE, THA, TUR, GBR,\n * USA - Optional for all other “country” values.\n */\n \"zipCode\" => $billingModel->billing_zip_code? $billingModel->billing_zip_code:\"\",\n // Card holder’s country. (64 characters max) Required\n \"country\" => $billingModel->country->country_iso_code_3,\n // Card holder’s email. (64 characters max) Required\n \"email\" => $billingModel->billing_email,\n // Card holder’s phone. (16 characters max) Optional\n // \"phoneNumber\" => '555-555-5555'\n ],\n \"lineItems\" => [\n [\n \"type\" => \"product\",\n \"name\" => \"Plugn \".$pricing->pricing_title.\" Plan\",\n \"price\" => $pricing->pricing_price,\n \"tangible\" => \"N\",\n \"productId\" => $pricing->pricing_id,\n \"recurrence\" => \"1 Month\",\n \"duration\" => \"Forever\",\n \"startupFee\" => $discount?$discount:\"\"\n ]\n ]\n ]);\n\n $billingModel->processTwoCheckoutSuccess($charge);\n return $this->redirect(['billing/index']);\n } catch (Twocheckout_Error $e) {\n $billingModel->processTwoCheckoutError($e);\n }\n }\n }\n\n // List of Zip / State Required Countries\n $zipStateCountries = \\common\\models\\Country::find()->select('country_id')\n ->where(['country_zipstate_required' => 1])->asArray()->all();\n\n // List of Addr Line 2 required countries\n $addrCountries = \\common\\models\\Country::find()->select('country_id')\n ->where(['country_addrline2_required' => 1])->asArray()->all();\n\n\n return $this->render('setup', [\n // Form\n 'model' => $billingModel,\n 'zipStateCountries' => json_encode($zipStateCountries),\n 'addrCountries' => json_encode($addrCountries),\n\n // Pricing\n 'pricing' => $pricing,\n 'isTrial' => $isTrial,\n\n // 2 CO\n 'processFormUrl' => Url::to(['billing/process']),\n 'environment' => Yii::$app->params['2co.environment'],\n 'sellerId' => Yii::$app->params['2co.sellerId'],\n 'publishableKey' => Yii::$app->params['2co.publishableKey'],\n ]);\n }",
"public function testAddPackingPlanFileByURL()\n {\n }",
"function updateTest()\n {\n $this->cD->updateElement(new Product(1, \"Trang\"));\n }",
"public function update($id, UpdateMemberShipPlanRequest $request)\n {\n $memberShipPlan = $this->memberShipPlanRepository->findWithoutFail($id);\n\n if (empty($memberShipPlan)) {\n Flash::error('Member Ship Plan not found');\n\n return redirect(route('admin.memberShipPlans.index'));\n }\n\n $memberShipPlan = $this->memberShipPlanRepository->update($request->all(), $id);\n\n Flash::success('Member Ship Plan updated successfully.');\n\n return redirect(route('admin.memberShipPlans.index'));\n }",
"public function update(UpdatePackage $request, Package $package)\n {\n // check of user can update package status\n $this->authorize('update', $package);\n [\n 'name' => $name,\n 'amount' => $amount,\n 'returns' => $returns,\n 'status' => $status,\n ] = $request->validated();\n\n $package->name = $name;\n $package->amount = $amount;\n $package->returns = $returns;\n $package->status = $status;\n $package->save();\n\n return back()->with('success', 'Package Created');\n }",
"protected function updateNetworkFloorPlanRequest($network_id, $floor_plan_id, $update_network_floor_plan = null)\n {\n // verify the required parameter 'network_id' is set\n if ($network_id === null || (is_array($network_id) && count($network_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $network_id when calling updateNetworkFloorPlan'\n );\n }\n // verify the required parameter 'floor_plan_id' is set\n if ($floor_plan_id === null || (is_array($floor_plan_id) && count($floor_plan_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $floor_plan_id when calling updateNetworkFloorPlan'\n );\n }\n\n $resourcePath = '/networks/{networkId}/floorPlans/{floorPlanId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($network_id !== null) {\n $resourcePath = str_replace(\n '{' . 'networkId' . '}',\n ObjectSerializer::toPathValue($network_id),\n $resourcePath\n );\n }\n // path params\n if ($floor_plan_id !== null) {\n $resourcePath = str_replace(\n '{' . 'floorPlanId' . '}',\n ObjectSerializer::toPathValue($floor_plan_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($update_network_floor_plan)) {\n $_tempBody = $update_network_floor_plan;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function testRenderUpdateSuccess()\n {\n // Populate data\n $dealerAccountIDs = $this->_populate();\n \n // Set data\n $ID = $this->_pickRandomItem($dealerAccountIDs);\n $dealerAccount = $this->dealer_account->getOne($ID);\n \n // Request\n $this->withSession($this->adminSession)\n ->call('GET', '/dealer-account/edit', ['ID' => $ID]);\n \n // Verify\n $this->assertResponseOk();\n $this->assertViewHas('dealer_account', $dealerAccount);\n $this->assertViewHas('dataBranch');\n $this->assertPageContain('Edit Dealer Account');\n }",
"public function updatePlan($oldPlan, $newPlan)\n {\n $oldPlan->name = $newPlan->name;\n\n return $oldPlan;\n }",
"public function update($listingPlanId, UpdateListingPlanRequest $request)\r\n\t{\r\n\t\t$data = $request->all();\r\n\r\n\t\t//updates listing plan\r\n\t\t$this->listingPlanRepository->update($listingPlanId, $data, ['auto_conf']);\r\n\r\n\t\tflash()->success(trans('back.flash_successfully_updated'));\r\n\t\treturn redirect()->route('admin.listing-plans.index');\r\n\t}",
"public function testWebinarPollUpdate()\n {\n }",
"public function update(PlanningStoreRequest $request, $id)\n {\n \n$Planning=Planning::get()->where('id',$id)->first();\n if($Planning->update($request->toArray())) {\n return new PlanningResource($Planning);\n }\n }",
"public function testHandleUpdateSuccess()\n {\n // Populate data\n $dealerAccountID = $this->_populate();\n \n // Set params\n $params = $this->customDealerAccountData;\n \n // Add ID\n $ID = $this->_pickRandomItem($dealerAccountID);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $params, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHas('dealer-account-updated', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals($dealerAccount->name, $this->customDealerAccountData['name']);\n $this->assertEquals($dealerAccount->branch_ID, $this->customDealerAccountData['branch_ID']);\n }",
"public function testShouldUpdateAPayoutWithSave()\n {\n $data = [\n 'customer' => ['id' => 1],\n 'currency' => ['iso' => 'XOF'],\n 'amount' => 1000,\n ];\n\n $body = [\n 'v1/payout' => [\n 'id' => 1,\n 'klass' => 'v1/payout',\n 'reference' => '109329828',\n 'amount' => 1000,\n 'status' => 'pending',\n 'customer' => [\n 'id' => 1,\n 'klass' => 'v1/customer',\n ],\n 'currency' => [\n 'id' => 1,\n 'klass' => 'v1/currency',\n 'iso' => 'XOF'\n ],\n 'mode' => 'mtn',\n 'created_at' => '2018-03-12T09:09:03.969Z',\n 'updated_at' => '2018-03-12T09:09:03.969Z',\n ]\n ];\n\n $this->mockRequest('post', '/v1/payouts', $data, $body);\n\n $payout = \\FedaPay\\Payout::create($data);\n $payout->amount = 5000;\n\n $updateData = [\n 'klass' => 'v1/payout',\n 'reference' => '109329828',\n 'amount' => 5000,\n 'status' => 'pending',\n 'customer' => [\n 'klass' => 'v1/customer',\n ],\n 'currency' => [\n 'klass' => 'v1/currency',\n 'iso' => 'XOF'\n ],\n 'mode' => 'mtn',\n 'created_at' => '2018-03-12T09:09:03.969Z',\n 'updated_at' => '2018-03-12T09:09:03.969Z',\n ];\n\n $this->mockRequest('put', '/v1/payouts/1', $updateData, $body);\n $payout->save();\n }",
"public function test_update_item() {}",
"public function test_update_item() {}",
"public function testUpdate()\n\t{\n\t\t// Update just updates the given fields, let's the rest unchanged.\n\t\t// Use Replace to replace all fields.\n\t\t$updateProduct = [\n\t\t\t'description' => 'This is a product description.',\n\t\t\t'price' => 1150.00\n\t\t];\n\n\t\t$service = $this->getService();\n\n\t\t// Update product\n\t\t$this->mockResponseFromFile('products.update.success');\n\t\t$response = $service->update()->pin('AD8CCDD5F9')->area('work')->spn('MBA11')->product($updateProduct)->execute();\n\t\t$this->assertIsArray($response);\n\t\t$this->assertArrayHasKey('kind', $response);\n\t\t$this->assertArrayHasKey('link', $response);\n\t}",
"function updateSupplement() {\n\n $sql = sprintf(\"UPDATE supplements_new SET name = '%s' ,\n \t\t\t\t\t\t\t\t\t\tdescription = '%s',\n \t\t\t\t\t\t\t\t\t\tis_agency_or_builder = %d,\n \t\t\t\t\t\t\t\t\t\tin_package = %d,\n \t\t\t\t\t\t\t\t\t\twith_package = %d,\n \t\t\t\t\t\t\t\t\t\tprice ='%s'\n \t\t\t\t\t\t\t\t\t\tWHERE id = %d\t\t\n \t\t\t\t\t\t\t\t\t\t\",\n \t\t\t\t\t\t\t\t\t\t$this->supplement_name,\n \t\t\t\t\t\t\t\t\t\t$this->description,\n \t\t\t\t\t\t\t\t\t\t$this->is_agency_or_builder,\n \t\t\t\t\t\t\t\t\t\t$this->in_package,\n \t\t\t\t\t\t\t\t\t\t$this->with_package,\n \t\t\t\t\t\t\t\t\t\t$this->supplement_price ,\n \t\t\t\t\t\t\t\t\t\t$this->supplement_id \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t);\n $this->conn->setsql($sql);\n $this->conn->updateDB();\n\n if($this->conn->error) {\n for(reset($this->conn->error); $key = key($this->conn->error); next($this->conn->error)) {\n $this->Error[\"SQL ERROR ClssCmpnCrt-\".$key] = $this->conn->error[$key];\n }\n return false;\n }\n\n \n \n\n return true;\n }",
"function updateBilling()\n\t\t{\n\t\t\tif (is_object($this->Gateway)) {\n\t\t\t\treturn $this->Gateway->update( $this );\n\t\t\t}\n\t\t}",
"public function test_update_product_success()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit(new UpdateProduct)\n ->assertSee(__('product.admin.edit.title'))\n ->type('name', 'Milk Tea')\n ->attach('image[]', __DIR__.'/test/image1.jpg')\n ->type('describe', 'Sale off')\n ->type('price', '20000')\n ->press(__('product.admin.edit.update_product'))\n ->assertPathIs('/admin/products')\n ->assertSee(__('product.admin.edit.update_success'));\n $this->assertDatabaseHas('products', [\n 'name' => 'Milk Tea',\n 'describe' => 'Sale Off',\n 'price' => '20000',\n ]);\n });\n }",
"public function setPacking($packing) {\n $this->_packing = $packing;\n }",
"public function update(PlanSubTypeUpdateRequest $request, $id)\n {\n try {\n\n $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_UPDATE);\n\n $planSubType = $this->repository->update($request->all(), $id);\n\n $response = [\n 'message' => 'PlanSubType updated.',\n 'data' => $planSubType->toArray(),\n ];\n\n if ($request->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect()->back()->with('message', $response['message']);\n } catch (ValidatorException $e) {\n\n if ($request->wantsJson()) {\n\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }",
"function update_packagetype($pid) {\n $package_name = $_POST['package_name'];\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_publish = $_POST['publish'];\n $p_country = $_POST['country'];\n $p_image = $this->upload_package_image();\n if (empty($p_image)) {\n $sql = \"UPDATE packagetype SET package_name='$package_name',meta_title='$p_meta_title',meta_keywords='$p_meta_keywords',meta_description='$p_meta_description',description='$p_description',country_id='$p_country',publish='$p_publish' WHERE id='$pid'\";\n $this->mysqli->query($sql);\n } else {\n $sql = \"UPDATE packagetype SET package_name='$package_name',meta_title='$p_meta_title',meta_keywords='$p_meta_keywords',meta_description='$p_meta_description',description='$p_description',image='$p_image',country_id='$p_country',publish='$p_publish' WHERE id='$pid'\";\n $this->mysqli->query($sql);\n }\n\n if ($this->mysqli->error) {\n echo $this->mysqli->error;\n } else {\n echo \"<script language='javascript'>alert(' Package Updated successfully');</script>\";\n }\n }",
"public function testUpdateGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testQuarantineUpdateAll()\n {\n\n }",
"public function shouldUpdateProductSuccessfully()\n {\n $product = factory(Product::class)->create();\n $input = factory(Product::class)->make()->toArray();\n\n $this->json($this->method, str_replace(':id', $product->id, $this->endpoint), $input)\n ->assertOk()\n ->assertJsonPath('data', 'ok');\n\n $this->assertDatabaseHas('products', ['id' => $product->id] + $input);\n }",
"public function update(PackFormRequest $request, Pack $pack)\n {\n $this->updateService->handle($pack, $request->normalize());\n $this->alert->success(trans('admin/pack.notices.pack_updated'))->flash();\n\n return redirect()->route('admin.packs.view', $pack->id);\n }",
"public function postPlanChange(WebsitePlanChangeRequest $request)\n {\n var_dump($request->input('plan'));\n var_dump($request->input('password'));\n var_dump($request->input('website'));\n exit;\n $user = Auth::user();\n $website = Website::find($request->input('website'));\n $plan = Plan::find($request->input('plan'));\n if (!isset($website)) {\n Response::json(['success' => false, 'message' => trans('Site does not exist.')]);\n }\n\n if ($website->user_id != $user->id) {\n Response::json(['success' => false, 'message' => trans('Unauthorized.')]);\n }\n\n if (!Hash::check($request->input('password'), $user->password)) {\n Response::json(['success' => false, 'message' => trans('Wrong password.')]);\n }\n\n $website->subscription(lcfirst($plan->plan))->swap();\n $website->plan_id = $plan->id;\n $website->save();\n\n $emailVariables = [\n 'website' => $website->url,\n 'plan' => $plan\n ];\n\n Mail::send('emails.website.plan', $emailVariables, function($message) use ($user) {\n $message->to($user->email)->subject(trans('We have changed your plan.'));\n });\n\n Response::json(['success' => true, 'message' => trans('Your plan has changed')]);\n }",
"public function existingPackageHandler(&$plan_info)\n {\n if ($this->planType == 'account') {\n return;\n }\n\n if ((!$plan_info['Package_ID'] && $plan_info['Price'] <= 0)\n || ($plan_info['Package_ID']\n && ($plan_info['Listings_remains'] > 0\n || $plan_info['Listing_number'] == 0)\n )\n ) {\n $this->skipCheckout = true;\n unset($this->steps['checkout']);\n } else {\n $this->skipCheckout = false;\n }\n }",
"public function testJobUpdate()\n {\n\n }",
"public function postChangeSubscriptionPlan(ChangeSubscriptionPlanRequest $request)\n {\n try {\n if ($request->plan == 1) {\n $plan = config('constants.ThreeMonths');\n } else if ($request->plan == 2) {\n $plan = config('constants.SixMonths');\n } else {\n $plan = config('constants.OneYear');\n }\n $subscription = \\Stripe\\Subscription::retrieve($request->subscriptionId);\n $subscription->plan = $plan;\n $subscription->save();\n if ($request->type == config('constants.Resubscribe') || $request->type == config('constants.Change')) {\n RecruiterProfile::where(['user_id' => Auth::user()->id])->update(['is_subscribed' => config('constants.OneValue')]);\n }\n $this->response['success'] = true;\n $this->response['message'] = trans('messages.subscription_plan_changed');\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n $this->response['success'] = true;\n $this->response['message'] = $e->getMessage();\n }\n return $this->response;\n }",
"public function testSellerUpdatedSuccess()\n {\n $this->demoUserLoginIn();\n $spu = Spu::create([\n 'users_id' => '1',\n 'name' => 'test',\n 'description' => 'test',\n ]);\n $response = $this->call('PATCH', '/seller/4/update', [\n 'name' => 'testUpdate',\n 'description' => 'testUpdate',\n ]);\n $this->assertEquals(302, $response->status());\n }",
"public function updatePlan(array $parameters = array())\n {\n /**\n * @var \\Omnipay\\Vindicia\\Message\\CreatePlanRequest\n */\n return $this->createRequest('\\Omnipay\\Vindicia\\Message\\CreatePlanRequest', $parameters, true);\n }",
"public function test_if_failed_update()\n {\n }",
"public function adminPlanItemConfigUpdate($planItem)\n {\n $settings = $_POST['verify_account'];\n\n $planItem->setEnabled(isset($settings['enabled']) && $settings['enabled']);\n $planItem->set('amount', geoNumber::deformat($settings['amount']));\n $planItem->set('require_for_listing', isset($settings['require_for_listing']) && $settings['require_for_listing']);\n if (geoMaster::is('auctions')) {\n $planItem->set('require_for_bid', isset($settings['require_for_bid']) && $settings['require_for_bid']);\n }\n\n $planItem->set('apply_to_balance', isset($settings['apply_to_balance']) && $settings['apply_to_balance']);\n\n return true;\n }",
"public function testPingTreePatchItem()\n {\n }",
"public function update(Request $request, $id)\n {\n $plan = Plan::findOrFail($id);\n\n $json = $request->input('json', null);\n $params = json_decode($json);\n $params_array = json_decode($json, true);\n\n $validate = \\Validator::make($params_array, [\n 'price' => 'integer',\n ]);\n\n if ($validate->fails()) {\n return $this->errorResponse('Error al validar los datos', 400);\n }\n\n if (isset($params->name)) {\n $plan->name = $params->name;\n }\n\n if (isset($params->price)) {\n $plan->price = $params->price;\n }\n\n if (!$plan->isDirty()) {\n return $this->errorResponse('Se debe especificar al menos un valor diferente para actualizar',422);\n } \n\n $plan->save();\n\n return $this->showOne($plan);\n }",
"public function testRequestUpdateItem()\n {\n\t\t$response = $this\n\t\t\t\t\t->json('PUT', '/api/items/6', [\n\t\t\t\t\t\t'name' => 'Produkt zostal dodany i zaktualizowany przez test PHPUnit', \n\t\t\t\t\t\t'amount' => 0\n\t\t\t\t\t]);\n\n $response->assertJson([\n 'message' => 'Items updated.',\n\t\t\t\t'updated' => true\n ]);\n }",
"public function testUpdateSupplierGroup()\n {\n }"
] | [
"0.7085014",
"0.64787024",
"0.64551836",
"0.63667226",
"0.63057375",
"0.618564",
"0.60914385",
"0.6039051",
"0.5972267",
"0.59612525",
"0.58209085",
"0.58053815",
"0.5709977",
"0.5689258",
"0.5667135",
"0.5660933",
"0.56361514",
"0.5576673",
"0.555598",
"0.5493142",
"0.54791224",
"0.5468587",
"0.54626656",
"0.544143",
"0.5431873",
"0.54231167",
"0.54215956",
"0.5419873",
"0.54113114",
"0.53998524",
"0.538321",
"0.5378965",
"0.53438574",
"0.5343793",
"0.5322207",
"0.5309362",
"0.5279026",
"0.5240961",
"0.5210771",
"0.5202259",
"0.51783",
"0.5176349",
"0.51637244",
"0.5149752",
"0.513748",
"0.5133856",
"0.51312274",
"0.51195645",
"0.51132345",
"0.5110552",
"0.5097786",
"0.5097327",
"0.5092069",
"0.5082908",
"0.5074346",
"0.5051738",
"0.5038973",
"0.5029398",
"0.5022559",
"0.4989489",
"0.49888706",
"0.4978684",
"0.497835",
"0.49695513",
"0.49660864",
"0.49633452",
"0.4937502",
"0.49358356",
"0.49347684",
"0.49223533",
"0.49215728",
"0.4920874",
"0.49128744",
"0.49125814",
"0.49081922",
"0.49013537",
"0.49013537",
"0.49010384",
"0.48963547",
"0.4893805",
"0.48742002",
"0.48729807",
"0.48721978",
"0.48699388",
"0.4868781",
"0.48577434",
"0.48423725",
"0.48415932",
"0.48357975",
"0.48347166",
"0.48321083",
"0.48181468",
"0.48159924",
"0.4815525",
"0.4803432",
"0.4803391",
"0.48005673",
"0.4796971",
"0.4789557",
"0.47876024"
] | 0.8442888 | 0 |
Test case for updatePackingPlanCustomFields Update a packingPlan custom fields. | public function testUpdatePackingPlanCustomFields()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function test_updateReplenishmentProcessCustomFields() {\n\n }",
"public function testUpdateExternalShipmentCustomFields()\n {\n }",
"public function testUpdateReplenishmentCustomFields()\n {\n }",
"public function testUpdateOrderCustomFields()\n {\n }",
"public function test_updateExternalShipmentCustomFields() {\n\n }",
"public function testUpdateVendorComplianceSurveyCustomFields()\n {\n }",
"public function test_updateBillingCodeTypeCustomFields() {\n\n }",
"public function test_updateCustomerCustomFields() {\n\n }",
"public function testUpdatePackingPlan()\n {\n }",
"protected function _updatefields() {}",
"public function testUpdateExtraFields(): void { }",
"public function testCustomFields()\n {\n // create\n $customField = $this->_getCustomField();\n $createdCustomField = $this->_instance->addCustomField($customField);\n $this->_objects[] = $createdCustomField;\n $this->assertEquals($customField->name, $createdCustomField->name);\n $this->assertNotNull($createdCustomField->getId());\n \n // fetch\n $application = Tinebase_Application::getInstance()->getApplicationByName('Tinebase');\n $appCustomFields = $this->_instance->getCustomFieldsForApplication(\n $application->getId()\n );\n $this->assertGreaterThan(0, count($appCustomFields));\n $this->assertEquals($application->getId(), $appCustomFields[0]->application_id);\n\n // check with model name\n $appCustomFieldsWithModelName = $this->_instance->getCustomFieldsForApplication(\n $application->getId(),\n $customField->model\n );\n $this->assertGreaterThan(0, count($appCustomFieldsWithModelName));\n $this->assertEquals($customField->model, $appCustomFieldsWithModelName[0]->model, 'didn\\'t get correct model name');\n \n // check if grants are returned\n $this->_instance->resolveConfigGrants($appCustomFields);\n $accountGrants = $appCustomFields->getFirstRecord()->account_grants;\n sort($accountGrants);\n $this->assertEquals(Tinebase_Model_CustomField_Grant::getAllGrants(), $accountGrants);\n \n // delete\n $this->_instance->deleteCustomField($createdCustomField);\n $this->setExpectedException('Tinebase_Exception_NotFound');\n $this->_instance->getCustomField($createdCustomField->getId());\n $this->_objects = array();\n }",
"function TestPlan_update($plan_id, $author_id, $product_id = NULL, $default_product_version = NULL, $type_id = NULL, $name = NULL, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.update', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function applyCustomFields($project) {\n\n //custom fields\n $fields = \\App\\Models\\CustomField::Where('customfields_type', 'projects')->get();\n foreach ($fields as $field) {\n if ($field->customfields_status == 'enabled') {\n switch ($field->customfields_name) {\n case 'project_custom_field_1':\n $project->project_custom_field_1 = request('project_custom_field_1');\n break;\n case 'project_custom_field_2':\n $project->project_custom_field_2 = request('project_custom_field_2');\n break;\n case 'project_custom_field_3':\n $project->project_custom_field_3 = request('project_custom_field_3');\n break;\n case 'project_custom_field_4':\n $project->project_custom_field_4 = request('project_custom_field_4');\n break;\n case 'project_custom_field_5':\n $project->project_custom_field_5 = request('project_custom_field_5');\n break;\n case 'project_custom_field_6':\n $project->project_custom_field_6 = request('project_custom_field_6');\n break;\n case 'project_custom_field_7':\n $project->project_custom_field_7 = request('project_custom_field_7');\n break;\n case 'project_custom_field_8':\n $project->project_custom_field_8 = request('project_custom_field_8');\n break;\n case 'project_custom_field_9':\n $project->project_custom_field_9 = request('project_custom_field_9');\n break;\n case 'project_custom_field_10':\n $project->project_custom_field_10 = request('project_custom_field_10');\n break;\n }\n }\n }\n }",
"public function testFields()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$fdef = array(\r\n\t\t\t'title'=>'unittest_custom', \r\n\t\t\t'type'=>'text', \r\n\t\t\t'subtype'=>'32', \r\n\t\t\t'system'=>false, \r\n\t\t\t'use_when'=>\"owner_id:\".$this->user->id\r\n\t\t);\r\n\t\t$newName = $obj->addField(\"unittest_custom\", $fdef);\r\n\t\tunset($obj);\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$field = $obj->def->getField('unittest_custom_owner_id_minus1');\r\n\t\t$this->assertNotEquals($field, false);\r\n\t\t$this->assertEquals($field->getUseWhen(), \"owner_id:\".$this->user->id);\r\n\t\t$obj->removeField(\"unittest_custom_owner_id_minus1\");\r\n\t\t$field = $obj->def->getField('unittest_custom_owner_id_minus1');\r\n\t\t$this->assertTrue(empty($field));\r\n\t}",
"function pnAddressBook_admin_updatecustomfields() {\r\n\r\n\t$output = new pnHTML();\r\n\r\n // Security check\r\n if (!pnSecAuthAction(0, 'pnAddressBook::', '::', ACCESS_ADMIN)) {\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_NOAUTH));\r\n $output->Text(pnAddressBook_themetable('end'));\r\n\t\treturn $output->GetOutput();\r\n }\r\n\r\n\tlist($id,$del,$name,$cus_type,$newname,$newtype) = pnVarCleanFromInput('id','del','name','cus_type','newname','newtype');\r\n\tif(is_array($del)) {\r\n $dels = implode(',',$del);\r\n }\r\n\t$modID = $modName = array();\r\n\t$modType = array();\r\n\t$modDel = array();\r\n\t$modDelType = array();\r\n\r\n\tif(isset($id)) {\r\n\t\tforeach($id as $k=>$i) {\r\n \t$found = false;\r\n \tif(count($del)) {\r\n \tforeach($del as $d) {\r\n \tif($i == $d) {\r\n \t$found = true;\r\n\t\t\t\t\t\tarray_push($modDel,$i);\r\n\t\t\t\t\t\tarray_push($modDelType,$cus_type[$k]);\r\n \tbreak;\r\n \t}\r\n \t}\r\n \t}\r\n \tif(!$found) {\r\n \tarray_push($modID,$i);\r\n \tarray_push($modName,$name[$k]);\r\n\t\t\t\tarray_push($modType,$cus_type[$k]);\r\n }\r\n \t}\r\n\t}\r\n\r\n\t$pntable = pnDBGetTables();\r\n\t$cus_table = $pntable['pnaddressbook_customfields'];\r\n\t$cus_column = $pntable['pnaddressbook_customfields_column'];\r\n\t$adr_table = $pntable['pnaddressbook_address'];\r\n\t$adr_column = $pntable['pnaddressbook_address_column'];\r\n\r\n\t$updates = array();\r\n\r\n\tforeach($modID as $k=>$id) {\r\n \tarray_push($updates,\"UPDATE $cus_table\r\n SET $cus_column[name]='\".pnVarPrepForStore($modName[$k]).\"',\r\n\t\t\t\t\t\t\t $cus_column[type]='\".pnVarPrepForStore($modType[$k]).\"'\r\n WHERE $cus_column[nr]=$id\");\r\n\t\tif (($modType[$k] != 'smallint default NULL') && ($modType[$k] != 'tinyint default NULL')) {\r\n\t\t\tarray_push($updates,\"ALTER TABLE $adr_table CHANGE adr_custom_\".$id.\" adr_custom_\".$id.\" \".pnVarPrepForStore($modType[$k]));\r\n\t\t}\r\n\t}\r\n\r\n\t$error = '';\r\n\r\n\tif(pnModAPIFunc(__PNADDRESSBOOK__,'admin','updateCustomfields',array('updates'=>$updates))) {\r\n \tif (empty($error)) { $error .= 'UPDATE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\telse { $error .= ' - UPDATE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t}\r\n\r\n\tif (count($modDel)) {\r\n\t\t$deletes = array();\r\n\t\tforeach($modDel as $k=>$id) {\r\n\t\t\t\tarray_push($deletes,\"DELETE FROM $cus_table WHERE $cus_column[nr] = $id\");\r\n\t\t\t\tif (($modDelType[$k] != 'smallint default NULL') && ($modDelType[$k] != 'tinyint default NULL')) {\r\n\t\t\t\t\tarray_push($deletes,\"ALTER TABLE $adr_table DROP adr_custom_\".$id);\r\n\t\t\t\t}\r\n\t\t}\r\n \tif(pnModAPIFunc(__PNADDRESSBOOK__,'admin','deleteCustomfields',array('deletes'=>$deletes))) {\r\n \t\tif (empty($error)) { $error .= 'DELETE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t\telse { $error .= ' - DELETE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n \t}\r\n\t}\r\n\tif (isset($newtype) && ($newtype == 'tinyint default NULL')) {\r\n\t\t$newname = '[ ]';\r\n\t}\r\n\tif (isset($newtype) && ($newtype == 'smallint default NULL')) {\r\n\t\t$newname = '[------]';\r\n\t}\r\n\tif( (isset($newname)) && ($newname != '') ) {\r\n\t\tlist($dbconn) = pnDBGetConn();\r\n\t\t$result = $dbconn->Execute(\"SELECT MAX($cus_column[nr]) FROM $cus_table\");\r\n\t\tlist($nextID) = $result->fields;\r\n\t\t$nextID++;\r\n\t\t$result->close;\r\n\t\t$inserts = array();\r\n\t\tarray_push($inserts,\"INSERT INTO $cus_table ($cus_column[nr],$cus_column[name],$cus_column[type],$cus_column[position])\r\n VALUES ($nextID,'\".pnVarPrepForStore($newname).\"','\".pnVarPrepForStore($newtype).\"',9999999999)\");\r\n\t\tif (($newtype != 'smallint default NULL') && ($newtype != 'tinyint default NULL')) {\r\n\t\t\tarray_push($inserts,\"ALTER TABLE $adr_table ADD adr_custom_\".$nextID.\" \".pnVarPrepForStore($newtype));\r\n\t\t}\r\n\r\n if(pnModAPIFunc(__PNADDRESSBOOK__,'admin','addCustomfields',array('inserts'=>$inserts))) {\r\n if (empty($error)) { $error .= 'INSERT '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t\telse { $error .= ' - INSERT '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t}\r\n }\r\n\r\n\t$args=array('msg'=>$error);\r\n\r\n\tpnRedirect(pnModURL(__PNADDRESSBOOK__, 'admin', 'customfields',$args));\r\n\treturn true;\r\n}",
"public function testUpdateFieldsWrongType(): void { }",
"public function updateLocationBillingTypeCustomFields($body)\n {\n list($response, $statusCode, $httpHeader) = $this->updateLocationBillingTypeCustomFieldsWithHttpInfo ($body);\n return $response; \n }",
"protected function addOrderCustomFields(): void\n {\n $custom_field_set_id = md5('Viacash custom_field_set');\n\n $this->container->get('custom_field_set.repository')->upsert(\n [\n [\n 'id' => $custom_field_set_id,\n 'name' => 'custom_viacash',\n 'config' => [\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Viacash\", \"en-GB\" => \"Viacash\"]),\n \"translated\" => true\n ],\n 'active' => true,\n 'global' => false,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field_set_relation.repository')->upsert(\n [\n [\n 'id' => md5('Viacash custom_field_set_relation'),\n 'customFieldSetId' => $custom_field_set_id,\n 'entityName' => 'order',\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_checkout_token'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_checkout_token',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Checkout-Token\", \"en-GB\" => \"Viacash Checkout-Token\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 1\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_slip_id'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_slip_id',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Slip-ID\", \"en-GB\" => \"Viacash Slip-ID\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 2\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_division_id'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_division_id',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Interne Barzahlen Divisions-Nummer\", \"en-GB\" => \"Internal Viacash division number\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 3\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_is_sandboxed'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_is_sandboxed',\n 'type' => 'switch',\n 'config' => [\n 'type' => 'switch',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Sandbox-Transaktion\", \"en-GB\" => \"Viacash sandboxed transaction\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"switch\",\n \"customFieldPosition\" => 4\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_refundable_amount'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_refundable_amount',\n 'type' => 'number',\n 'config' => [\n 'type' => 'number',\n \"label\" => $this->injectFallbackLanguage([\n \"de-DE\" => \"Verbleibender per Barzahlen erstattbarer Betrag\",\n \"en-GB\" => \"Remaining amount that can be refunded with Viacash\",\n ]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"number\",\n \"customFieldPosition\" => 5\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_validity_days'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_validity_days',\n 'type' => 'number',\n 'config' => [\n 'type' => 'number',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Gültigkeitsdauer des Zahlscheins in Tagen\", \"en-GB\" => \"Days of payslip validity.\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"number\",\n \"customFieldPosition\" => 5\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n }",
"protected abstract function setFields();",
"function updateCustomFields($dbData, $xmlSAMLAssertion, $settings)\n\t{\n\t\t$customFields = $this->getCustomFields($settings, 'update');\n\n\t\tif (count($customFields) == 0)\n\t\t{\n\t\t\t$GLOBALS['log']->debug(\"No custom fields! So returning 0.\"); // JMH\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t$user = new User();\n\t\t$user->retrieve($dbData['id']);\n\t\t$GLOBALS['log']->debug(\"updateCF()... userid={$user->id}\"); // JMH\n\t\t\n\t\t$xmlDoc = new DOMDocument();\n\t\t$xmlDoc->loadXML(base64_decode($xmlSAMLAssertion));\n\t\t$xpath = new DOMXpath($xmlDoc);\n\t\t$GLOBALS['log']->debug(\"Created xpath object.\"); // JMH\n\t\t\n\t\t$customFieldUpdated = false;\n\t\t\n\t\tforeach ($customFields as $field)\n\t\t{\n\t\t\t$GLOBALS['log']->debug(\"Top of fields loop with $field.\"); // JMH\n\t\t\tif (!array_key_exists($field, $dbData))\n\t\t\t{\n\t\t\t\t$GLOBALS['log']->debug(\"$field is not in \\$dbData. \\n\\$dbData=\" . var_export($dbData, TRUE)); // JMH\n\t\t\t\t// custom field not listed in db query results!\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$customFieldValue = $dbData[$field];\n\t\t\t\n\t\t\t$xmlNodes = $xpath->query($settings->saml_settings['update'][$field]);\n\t\t\tif ($xmlNodes === false)\n\t\t\t{\n\t\t\t\t// malformed xpath!\n\t\t\t\t$GLOBALS['log']->debug(\"$field contains bad xpath: \" . $settings->saml_settings['update'][$field]); // JMH\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$GLOBALS['log']->debug(\"updateCF(): 3\"); // JMH\n\t\t\tif ($xmlNodes->length == 0)\n\t\t\t{\n\t\t\t\t// no nodes match xpath!\n\t\t\t\t$GLOBALS['log']->debug(\"$field no nodes match this xpath: \" . $settings->saml_settings['update'][$field]); // JMH\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$xmlValue = $xmlNodes->item(0)->nodeValue;\n\t\t\t$GLOBALS['log']->debug(\"$field xpath returned $xmlValue\"); // JMH\n\t\t\t\n\t\t\tif ($customFieldValue != $xmlValue)\n\t\t\t{\n\t\t\t\t// need to update our user record.\n\t\t\t\t$customFieldUpdated = true;\n\t\t\t\t$user->$field = $xmlValue;\n\t\t\t\t$GLOBALS['log']->debug(\"db is out of date. setting {$field} to {$xmlValue}\"); // JMH\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($customFieldUpdated)\n\t\t{\n\t\t\t$GLOBALS['log']->debug(\"updateCustomFields calling user->save() and returning 0\"); // JMH\n\t\t\t$user->save();\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t$GLOBALS['log']->debug(\"updateCustomFields found no fields to update. Returning -1\"); // JMH\n\t\treturn -1;\n\t}",
"public function modifyCustomFields(array $documentFields = array())\n {\n # PUT /accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields\n }",
"protected function updateVendorComplianceSurveyCustomFieldsRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling updateVendorComplianceSurveyCustomFields'\n );\n }\n\n $resourcePath = '/beta/vendorComplianceSurvey/customFields';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function saveCustomFields($fields, $category) {\n // usuwanie dotychczasowych powiazan\n if($this->getPrimaryKey()) {\n $q = Doctrine_Query::create()\n ->delete('ArticleCustomFieldValue acfv')\n ->where('acfv.article_id = ?', $this->getPrimaryKey());\n\n $q->execute();\n }\n\n // pobranie dozwolonych pol na podstawie kategorii\n $q = Doctrine::getTable('ArticleCustomFields2ArtCategories')\n ->createQuery('cf2ac')\n ->leftJoin('cf2ac.ArticleCustomField acf')\n// ->where('artcategory_id = ?', $category);\n ->andWhereIn('artcategory_id', array_keys(Doctrine::getTable('ArtCategories')->find($category)->getAncestorsArrayByIds(true)));\n\n $validFields = $q->execute();\n\n foreach($validFields as $validField) {\n\n foreach($fields as $field => $value) {\n\n if($field == $validField->ArticleCustomField->getName()) {\n $this->setCustomField($field, $value);\n }\n }\n }\n }",
"protected function handleCustomField()\n {\n // If this field is a custom field we'll assume it has it's child fields\n // under the `fields` key. Then we are gonna modify those child fields'\n // attribute `name`, `label` & `conditional_logics` properties using\n // the parent field. The current implementation will modify those\n // properties in a way so that we can use dot notation to access.\n $customFields = Arr::get($this->field, 'fields');\n\n if ($customFields) {\n $parentAttribute = Arr::get($this->field, 'attributes.name');\n\n $parentConditionalLogics = Arr::get($this->field, 'settings.conditional_logics', []);\n\n $isAddressOrNameField = in_array(Arr::get($this->field, 'element'), ['address', 'input_name']);\n\n $isRepeatField = Arr::get($this->field, 'element') === 'input_repeat' || Arr::get($this->field, 'element') == 'repeater_field';\n\n foreach ($customFields as $index => $customField) {\n // If the current field is in fact `address` || `name` field\n // then we have to only keep the enabled child fields\n // by the user from the form editor settings.\n if ($isAddressOrNameField) {\n if (!Arr::get($customField, 'settings.visible', false)) {\n unset($customFields[$index]);\n continue;\n }\n }\n\n // Depending on whether the parent field is a repeat field or not\n // the modified attribute name of the child field will vary.\n if ($isRepeatField) {\n $modifiedAttribute = $parentAttribute.'['.$index.'].*';\n } else {\n $modifiedAttribute = $parentAttribute.'['.Arr::get($customField, 'attributes.name').']';\n }\n\n $modifiedLabel = $parentAttribute.'['.Arr::get($customField, 'settings.label').']';\n\n $customField['attributes']['name'] = $modifiedAttribute;\n\n $customField['settings']['label'] = $modifiedLabel;\n\n // Now, we'll replace the `conditional_logics` property\n $customField['settings']['conditional_logics'] = $parentConditionalLogics;\n\n // Now that this field's properties are handled we can pass\n // it to the extract field method to extract it's data.\n $this->extractField($customField);\n }\n }\n\n return $this;\n }",
"public function updateVendorCustomFields($body)\n {\n list($response, $statusCode, $httpHeader) = $this->updateVendorCustomFieldsWithHttpInfo ($body);\n return $response; \n }",
"public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }",
"function acf_update_field($field, $specific = array())\n{\n}",
"public function testGetChangeField()\n {\n }",
"function test_update_by_field($urabe, $body)\n{\n $values = $body->update_params;\n $column_name = $body->column_name;\n $column_value = $body->column_value;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->update_by_field($table_name, $values, $column_name, $column_value);\n}",
"function pickup_field_update_order_meta( $order_id ) {\n\n //if(isset($_REQUEST['pickup_field_update_order_meta'])) return;\n //$_REQUEST['pickup_field_update_order_meta'] = 1;\n // dispatch_details\n\n print_r($_POST);\n\n //This prints out on order details after checkout\n if ( @$_POST['delivery_date'] ) {\n $str = \"Delivery scheduled for \".esc_attr( $_POST['delivery_date'] );\n $_POST['dispatch_details'] = $str;\n //new invoice field\n update_post_meta( $order_id, 'shippingMethod', sanitize_text_field( $str ) );\n\n // todo: remove these 2 lines, no longer used\n //for the field additional field in admin\n $updated = (update_post_meta( $order_id, '_dispatch_details', $str))?'true':'false'; //checkout field manager adds a _ to the front of the field name...\n hog(print_r(array('billycart', $order_id, \"_dispatch_details ($updated): \".$str),true));\n }\n\n if ( @$_POST['pickup_date'] && @$_POST['pickup_time'] ) {\n //pickup time = morning or arvo,\n $str = \"Pickup scheduled for: \".esc_attr( $_POST['pickup_time'] ).\" on \".esc_attr( $_POST['pickup_date'] );\n $_POST['dispatch_details'] = $str;\n //new invoice field\n update_post_meta( $order_id, 'shippingMethod', sanitize_text_field( $str ) );\n\n // todo: remove these 2 lines, no longer used\n $updated = (update_post_meta( $order_id, '_dispatch_details', $str))?'true':'false';\n hog(print_r(array('billycart', $order_id, \"_dispatch_details ($updated): \".$str),true));\n }\n\n\n\n if ( @$_POST['pickup_date'] ) {\n //It does: update post meta for this order\n update_post_meta( $order_id, 'pickup_date', esc_attr( $_POST['pickup_date'] ) );\n }\n if ( @$_POST['pickup_time'] ) {\n update_post_meta( $order_id, 'pickup_time', esc_attr( $_POST['pickup_time'] ) );\n }\n if ( @$_POST['delivery_date'] ) {\n update_post_meta( $order_id, 'delivery_date', esc_attr( $_POST['delivery_date'] ) );\n }\n if ( @$_POST['delivery_zone_id'] ) {\n update_post_meta( $order_id, 'delivery_zone_id', esc_attr( $_POST['delivery_zone_id'] ) );\n }\n if ( @$_POST['delivery_zone_title'] ) {\n update_post_meta( $order_id, 'delivery_zone_title', esc_attr( $_POST['delivery_zone_title'] ) );\n }\n\n }",
"function update($spec, $fields, $custom_fields=array()) {\n\t\t$set = array();\n\t\tforeach($fields as $field) $set[] = \"{{$field}}=?\";\n\t\t$set = array_merge($set, $custom_fields);\n\t\t$set = implode(', ', $set);\n\t\t$base = \"UPDATE {$spec['from']} SET {$set} \";\n\t\tif(isset($spec['join'])) {\n\t\t\t$spec['where'] = array(\"{$spec['select'][0]} IN ({$this->select($spec)})\");\n\t\t\t$spec['join'] = null;\n\t\t}\n\t\t$spec['select'] = $spec['from'] = $spec['order_by'] = $spec['offset'] = null; // irrelevant fields\n\t\treturn $this->quoteIdentifiers($this->aliasFields($base . $this->compile($spec), false));\n\t}",
"public function process()\n\t{\n\t\tPhpfox::getUserParam('custom.can_manage_custom_fields', true);\n\t\t$bOrderUpdated = false;\n\t\t\n\t\tif (($iDeleteId = $this->request()->getInt('delete')) && Phpfox::getService('custom.group.process')->delete($iDeleteId))\n\t\t{\n\t\t\t$this->url()->send('admincp.custom', null, Phpfox::getPhrase('custom.custom_group_successfully_deleted'));\n\t\t}\n\t\t\n\t\tif (($aFieldOrders = $this->request()->getArray('field')) && Phpfox::getService('custom.process')->updateOrder($aFieldOrders))\n\t\t{\t\t\t\n\t\t\t$bOrderUpdated = true;\n\t\t}\n\t\t\n\t\tif (($aGroupOrders = $this->request()->getArray('group')) && Phpfox::getService('custom.group.process')->updateOrder($aGroupOrders))\n\t\t{\t\t\t\n\t\t\t$bOrderUpdated = true;\n\t\t}\t\t\n\t\t\n\t\tif ($bOrderUpdated === true)\n\t\t{\n\t\t\t$this->url()->send('admincp.custom', null, Phpfox::getPhrase('custom.custom_fields_successfully_updated'));\n\t\t}\n\t\t\n\t\t$this->template()->setTitle(Phpfox::getPhrase('custom.manage_custom_fields'))\n\t\t\t->setBreadcrumb(Phpfox::getPhrase('custom.manage_custom_fields'))\n\t\t\t->setPhrase(array(\n\t\t\t\t\t'custom.are_you_sure_you_want_to_delete_this_custom_option'\n\t\t\t\t)\n\t\t\t)\t\t\t\n\t\t\t->setHeader(array(\n\t\t\t\t\t'admin.js' => 'module_custom',\n\t\t\t\t\t'<script type=\"text/javascript\">$Behavior.custom_set_url = function() { $Core.custom.url(\\'' . $this->url()->makeUrl('admincp.custom') . '\\'); };</script>',\n\t\t\t\t\t'jquery/ui.js' => 'static_script',\n\t\t\t\t\t'<script type=\"text/javascript\">$Behavior.custom_admin_addSort = function(){$Core.custom.addSort();};</script>'\n\t\t\t\t)\n\t\t\t)\n\t\t\t->assign(array(\n\t\t\t\t\t'aGroups' => Phpfox::getService('custom')->getForListing()\n\t\t\t\t)\n\t\t\t);\n\t}",
"function update( $update_fields ) {\n\n $query = \"UPDATE \" . $this->partner_code_table . \" \" .\n \"SET pc_name = '\" . $this->gCI->db->escape_string( $update_fields['pc_name'] ) . \"', \" .\n \"pc_code = '\" . $this->gCI->db->escape_string( $update_fields['pc_code'] ) . \"', \" .\n \"pc_location = '\" . $update_fields['pc_location'] . \"', \" .\n \"pc_order = '\" . $update_fields['pc_order'] . \"', \" .\n \"pc_exclusions = '\" . $update_fields['pc_exclusions'] . \"' \" .\n \"WHERE pc_id='\" . $update_fields['pc_id'] . \"'\";\n return ( $this->gCI->db->query( $query ) );\n }",
"public function saveCustom()\n {\n // Look through all of the updated fields to see if there are any Custom fields\n foreach ($this->updatedFields as $id => $updatedField) {\n\n // Translates WarrantyExpiration to \"Warranty Expiration\" for use with searching for the customID\n if (array_key_exists($updatedField, $this->customFieldMap)) {\n $realField = $this->customFieldMap[$updatedField];\n } else {\n $realField = $updatedField;\n }\n\n // Now see if Warranty Expiration is in the list of Custom fields\n if (array_key_exists($realField, $this->customFields)) {\n\n // If it is, get the ID needed for the API call\n $customID = $this->customFields[$realField];\n\n $args = [];\n $args['fieldId'] = $customID;\n // The value is stored in the main details array using WarrantyExpiration\n $args['value'] = $this->details->$updatedField;\n $args['id'] = $this->ID;\n $this->api->_request('POST', '/api/SetCustomFieldForAsset'.\"?\".http_build_query($args));\n // Remove it from the updatedFields list so the main save() doesn't try to update it\n unset($this->updatedFields[$id]);\n }\n }\n\n }",
"public function testGetCustomFields()\n {\n $expected = [\n 'Media Data Service' => [\n 'Media' => [\n 'http://www.example.com/xml' => new DiscoveredCustomField(\\stdClass::class, new CustomField()),\n ],\n ],\n ];\n /** @var \\PHPUnit_Framework_MockObject_MockObject|CustomFieldDiscoveryInterface $discovery */\n $discovery = $this->createMock(CustomFieldDiscoveryInterface::class);\n $discovery->expects($this->once())\n ->method('getCustomFields')\n ->willReturn($expected);\n $manager = new CustomFieldManager($discovery);\n $this->assertEquals($expected, $manager->getCustomFields());\n }",
"protected function setupUpdateOperation()\n {\n $plugin = $this->crud->getEntryWithLocale($this->crud->getCurrentEntryId());\n\n $fields = $plugin->options;\n\n CRUD::addField(['name' => 'fields', 'type' => 'hidden', 'value' => collect($fields)->implode('name', ',')]);\n\n foreach ($fields as $field) {\n CRUD::addField($field);\n }\n }",
"function custom_override_checkout_fields($fields) {\n //billing fields\n $args_billing = array(\n 'first_name' => __('First name','qode'),\n 'last_name' => __('Last name','qode'),\n 'company' => __('Company name','qode'),\n 'address_1' => __('Address','qode'),\n 'email' => __('Email','qode'),\n 'phone' => __('Phone','qode'),\n 'postcode' => __('Postcode / ZIP','qode'),\n 'city' \t => __('Town / City','qode'),\n 'state' \t => __('State','qode')\n );\n \n //shipping fields\n $args_shipping = array(\n 'first_name' => __('First name','qode'),\n 'last_name' => __('Last name','qode'),\n 'company' => __('Company name','qode'),\n 'address_1' => __('Address','qode'),\n 'postcode' => __('Postcode / ZIP','qode'),\n\t\t'city' \t => __('Town / City','qode'),\n 'state' \t => __('State','qode')\n );\n \n //override billing placeholder values\n foreach ($args_billing as $key => $value) {\n $fields[\"billing\"][\"billing_{$key}\"][\"placeholder\"] = $value;\n }\n \n //override shipping placeholder values\n foreach ($args_shipping as $key => $value) {\n $fields[\"shipping\"][\"shipping_{$key}\"][\"placeholder\"] = $value;\n }\n\n return $fields;\n}",
"function wppb_check_epf_rf_cptpms_update( $ep_r_posts, $cpt, $cpt_meta, $internal_id, $array_after_update ){\r\n\tforeach ( $ep_r_posts as $key => $value ){\r\n\t\tif ( $value->post_type == $cpt ){\r\n\t\t\t$post_meta = get_post_meta( $value->ID, $cpt_meta, true );\r\n\r\n\t\t\tif ( !empty( $post_meta ) ){\r\n\t\t\t\tforeach ( $post_meta as $this_post_meta_key => $this_post_meta_value ){\r\n\t\t\t\t\tif ( $this_post_meta_value['id'] == $internal_id ){\r\n\t\t\t\t\t\t$post_meta[$this_post_meta_key]['field'] = wppb_field_format( $array_after_update['field-title'], $array_after_update['field'] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tupdate_post_meta( $value->ID, $cpt_meta, $post_meta );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}",
"function pnAddressBook_admin_incCustomfields()\r\n{\r\n // Get parameters\r\n $id = pnVarCleanFromInput('id');\r\n\r\n // Confirm authorisation code\r\n if (!pnSecConfirmAuthKey()) {\r\n pnSessionSetVar('errormsg', _BADAUTHKEY);\r\n pnRedirect(pnModURL(__PNADDRESSBOOK__, 'admin', 'main'));\r\n return true;\r\n }\r\n\r\n // Pass to API\r\n if (pnModAPIFunc(__PNADDRESSBOOK__, 'admin', 'incCustomFields', array('id' => $id))) {\r\n // Success\r\n //pnSessionSetVar('statusmsg', _BLOCKLOWER);\r\n }\r\n\r\n // Redirect\r\n pnRedirect(pnModURL(__PNADDRESSBOOK__, 'admin', 'customfields'));\r\n return true;\r\n}",
"public function update_field_group($field_group)\n {\n }",
"private function setAdditionalFields($additionalFields)\n {\n $this->additionalFields = $additionalFields;\n }",
"public function test_updateBillingCodeType() {\n\n }",
"private function set_metafile_fields(){\n\n\t\t\t// add more fields for your requierements\n $custom_fields = array( \n\t\t\t\t'field_name1'\t=> __( 'field name 1', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name2'\t=> __( 'field name 2', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name3'\t=> __( 'field name 3', self::$plugin_obj->class_name ),\n\t\t\t );\n\n\n foreach( $custom_fields as $custom_attrname => $custom_value){\n self::$metafile_fields->$custom_attrname = $custom_value;\n } \n\n }",
"public function testUpdateDocumentFields()\n {\n $remoteDataFolder = self::$baseRemoteFolderPath . \"/DocumentElements/Fields\";\n $localFileName = \"test_multi_pages.docx\";\n $remoteFileName = \"TestUpdateDocumentFields.docx\";\n\n $this->uploadFile(\n realpath(__DIR__ . '/../../..') . \"/TestData/\" . \"Common/\" . $localFileName,\n $remoteDataFolder . \"/\" . $remoteFileName\n );\n\n $request = new UpdateFieldsRequest(\n $remoteFileName,\n $remoteDataFolder,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL\n );\n\n $result = $this->words->updateFields($request);\n Assert::assertTrue(json_decode($result, true) !== NULL);\n Assert::assertNotNull($result->getDocument());\n Assert::assertEquals(\"TestUpdateDocumentFields.docx\", $result->getDocument()->getFileName());\n }",
"public function test_listCustomFields() {\n\n }",
"public function updateVendorComplianceSurveyCustomFields($body)\n {\n $this->updateVendorComplianceSurveyCustomFieldsWithHttpInfo($body);\n }",
"public function setCustomFields(array $fields)\n {\n $this->customFields = $fields;\n }",
"public function testAddPackingPlan()\n {\n }",
"function custom_override_checkout_fields( $fields ) {\n unset($fields['billing']['billing_phone']);\n\n // REMOVING BILLING COMPANY\n unset($fields['billing']['billing_company']);\n\n // REMOVING ADDITIONAL INFORMATION FIELD\n unset($fields['order']['order_comments']);\n\n return $fields;\n}",
"protected function updateFulfillmentProcessCustomFieldsRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling updateFulfillmentProcessCustomFields'\n );\n }\n\n $resourcePath = '/beta/fulfillmentProcess/customFields';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function update($id, Request $request)\n {\n $customMessages = [\n 'name' => 'The Plan Name field is required.',\n 'description' => 'The description field is required.',\n ];\n $this->validate($request, [\n 'name' => 'required|unique:plans,name,'.$request->id.',id',\n 'description' => 'required',\n ], $customMessages);\n \n $plan = Plan::findOrFail($id);\n $plan->name = $request->get('name');\n $plan->description = $request->get('description');\n if($request->has('status')) $plan->status = $request->get('status');\n $plan->save();\n $mainmodules = MainModule::all();\n try{\n $datetime = date('Y-m-d H:i:s');\n $has_tally_integration = $request->has('tally');\n DB::beginTransaction();\n $plans_has_modules = DB::table('plan_has_modules')->where('plan_id', $plan->id)->first();\n if($plans_has_modules) DB::table('plan_has_modules')->where('plan_id', $plan->id)->delete();\n\n $insertData = array();\n $clientSettingUpdatedArray = array();\n foreach($mainmodules as $module){\n $field = $module->field;\n $enabled = $request->$field ? 1 : 0;\n $clientSettingUpdatedArray[$field] = $enabled;\n $data = array(\n 'plan_id'=>$plan->id,\n 'module_id'=>$module->id,\n 'enabled'=>$enabled\n ); \n array_push($insertData, $data);\n }\n if(!empty($insertData)) DB::table('plan_has_modules')->insert($insertData);\n $companiesIDs = DB::table('company_plan')->where('plan_id',$plan->id)->pluck('company_id');\n \n if(!empty($companiesIDs)){\n $clientSettings = ClientSetting::whereIn('company_id',$companiesIDs)->get();\n \n foreach($clientSettings as $clientSetting){\n $clientSetting->update($clientSettingUpdatedArray);\n $company_id = $clientSetting->company_id;\n // AssignFullAccessPermission::dispatch($company_id, $clientSetting);\n // $limited_access_assign_permission_name = array('PartyVisit-view', 'PartyVisit-create');\n \n // AssignLimitedAccessPermission::dispatch($company_id, $limited_access_assign_permission_name);\n\n $tallyInt = DB::table('tally_schedule')->where('company_id', $company_id)->first();\n $companyname = Company::find($company_id);\n \n $domain = $companyname ? $companyname->domain : NULL;\n if($domain){\n if (!$has_tally_integration && !empty($tallyInt)) {\n $affected = DB::table('tally_schedule')\n ->where('company_id', $company_id)\n ->update(['updated_at' => $datetime, 'deleted_at' => $datetime]);\n } elseif ($has_tally_integration) {\n if($tallyInt) $affected = DB::table('tally_schedule')->where('company_id', $company_id)->update(['updated_at' => $datetime, 'deleted_at' => NULL]);\n else $affected = DB::table('tally_schedule')->insert([\n 'company_id' => $company_id,\n 'company_name' => $domain,\n 'created_at' => $datetime]);\n }\n }\n }\n }\n DB::commit();\n if(isset($clientSettings)){\n foreach($clientSettings as $clientSetting){\n $fbIDs = DB::table('employees')->where(array(array('company_id', $clientSetting->company_id), array('status', 'Active')))->whereNotNull('firebase_token')->pluck('firebase_token');\n $dataPayload = array(\"data_type\" => \"company_setting\", \"company_setting\" => json_encode($clientSetting), \"action\" => \"update\");\n sendPushNotification_($fbIDs, 12, null, $dataPayload); \n }\n }\n return redirect()->route('app.plan')->with('success', 'Information has been Updated');\n }catch(\\Exception $e){\n DB::rollback();\n dd($e->getMessage());\n Log::error($e->getMessage());\n }\n }",
"public function testUpdateExternalShipment()\n {\n }",
"public function testCustomFieldAcl()\n {\n $createdCustomField = $this->_instance->addCustomField($this->_getCustomField());\n $this->_objects[] = $createdCustomField;\n $this->_instance->setGrants($createdCustomField);\n \n $application = Tinebase_Application::getInstance()->getApplicationByName('Tinebase');\n $appCustomFields = $this->_instance->getCustomFieldsForApplication(\n $application->getId()\n );\n \n $this->assertEquals(0, count($appCustomFields));\n }",
"public function testD_update() {\n\n $fname = self::$generator->firstName();\n $lname = self::$generator->lastName;\n\n $resp = $this->wrapper->update( self::$randomEmail, [\n 'FNAME' => $fname,\n 'LNAME' => $lname\n ]);\n\n $this->assertObjectHasAttribute('id', $resp);\n $this->assertObjectHasAttribute('merge_fields', $resp);\n\n $updated = $resp->merge_fields;\n\n $this->assertEquals($lname, $updated->LNAME);\n\n }",
"public function setCustomFields ($order) {\n \n }",
"public function compileUpdates($field = '');",
"public function addCustomFields()\n {\n if (!($enabled_custom_fields = $this->getDataManager()->getOption('custom_fields'))) {\n $enabled_custom_fields = array();\n }\n if (!($enabled_profile_fields = $this->getDataManager()->getOption('custom_fields_additional'))) {\n $enabled_profile_fields = array();\n }\n ?>\n <fieldset data-rm-target=\"#custom-fields .custom-field-select option\" id=\"profile-fields\" class=\"checkbox-list rm-ctrl syncstate\"<?php echo !$this->getDataManager()->getOption('enable_sync') ? ' disabled=\"disabled\"' : '' ?>>\n <?php foreach ($this->custom_fields as $custom_field): ?>\n <div>\n <label>\n <input class=\"profile-field-checkbox\" type=\"checkbox\" name=\"<?php echo $this->getViewKey().'[custom_fields_additional][]' ?>\" value=\"<?php echo $custom_field->getId() ?>\"<?php echo in_array($custom_field->getId(), $enabled_profile_fields) ? ' checked=\"checked\"' : '' ?> />\n <?php echo $custom_field->getName() ?> (<?php _e('customfield.type.'.$custom_field->getFieldType(), 'mgrt-wordpress') ?>)\n </label>\n </div>\n <?php endforeach; ?>\n </fieldset>\n <p class=\"description\"><?php _e('form.sync.field.custom.more.help', 'mgrt-wordpress') ?></p>\n <?php\n }",
"public function updateListingPackageUsage(&$plan_info)\n {\n global $rlDb, $account_info, $reefless, $lang;\n\n $paid_status = false;\n\n // Existing package mode\n if ($plan_info['Type'] == 'package' && $plan_info['Package_ID']) {\n if ($plan_info['Listings_remains'] > 0) {\n $update = array(\n 'fields' => array(\n 'Listings_remains' => $plan_info['Listings_remains'] - 1,\n ),\n 'where' => array(\n 'ID' => $plan_info['Package_ID'],\n ),\n );\n\n $prefix = ucfirst($this->adType);\n if ($plan_info[$prefix . '_listings'] > 0) {\n $update['fields'][$prefix . '_remains'] = $plan_info[$prefix . '_remains'] - 1;\n }\n\n $rlDb->update($update, 'listing_packages');\n }\n\n // Set paid status\n $paid_status = $lang['purchased_packages'];\n }\n // Newly free package mode\n elseif ($plan_info['Type'] == 'package' && !$plan_info['Package_ID'] && $plan_info['Price'] <= 0) {\n $insert = array(\n 'Account_ID' => $account_info['ID'],\n 'Plan_ID' => $plan_info['ID'],\n 'Listings_remains' => $plan_info['Listing_number'] - 1,\n 'Standard_remains' => $plan_info['Standard_listings'],\n 'Featured_remains' => $plan_info['Featured_listings'],\n 'Type' => 'package',\n 'Date' => 'NOW()',\n 'IP' => $reefless->getClientIpAddress(),\n );\n\n if ($plan_info['Featured'] && $plan_info['Advanced_mode'] && $this->adType == 'standard') {\n $insert['Standard_remains']--;\n }\n\n if ($plan_info['Featured'] && $plan_info['Advanced_mode'] && $this->adType == 'featured') {\n $insert['Featured_remains']--;\n }\n\n $rlDb->insert($insert, 'listing_packages');\n\n // Set paid status\n $paid_status = $lang['package_plan'] . '(' . $lang['free'] . ')';\n }\n // Limited listing mode\n elseif ($plan_info['Type'] == 'listing' && $plan_info['Limit'] > 0) {\n $usage_key = $plan_info['Using'] ? 'Using' : 'Limit';\n $plan_usage_insert = array(\n 'Account_ID' => $account_info['ID'],\n 'Plan_ID' => $plan_info['ID'],\n 'Listings_remains' => $plan_info[$usage_key] - 1,\n 'Type' => 'limited',\n 'Date' => 'NOW()',\n 'IP' => $reefless->getClientIpAddress(),\n );\n\n $rlDb->insert($plan_usage_insert, 'listing_packages');\n }\n\n return $paid_status;\n }",
"public function update(Request $request, VendorSubscriptionPlans $vendorSubscriptionPlan)\n {\n $request->validate(\n [\n 'title' => 'required|max:100',\n 'price' => 'numeric|nullable',\n 'duration' => 'required|numeric',\n 'product_limitation' => 'required|numeric',\n 'description' => 'max:200',\n 'status' => 'required',\n\n ],\n [\n 'product_limitation.required' => 'No. of Product is required',\n 'product_limitation.numeric' => 'No. of Product must be a numeric value',\n ]\n );\n\n $vendorSubscriptionPlan->title = $request->title;\n $vendorSubscriptionPlan->price = $request->price ?? 0;\n $vendorSubscriptionPlan->duration = $request->duration;\n $vendorSubscriptionPlan->product_limitation = $request->product_limitation;\n $vendorSubscriptionPlan->description = $request->description;\n $vendorSubscriptionPlan->status = $request->status;\n\n if ($vendorSubscriptionPlan->save()){\n Session::flash('success','Vendor Subscription Plan Added');\n return redirect()->route('vendor-subscription-plan.index');\n }else{\n Session::flash('error','Vendor Subscription Plan Not Added');\n return redirect()->back()->withInput();\n }\n }",
"public function testGetCustomField()\n {\n $expected = [\n 'Media Data Service' => [\n 'Media' => [\n 'http://www.example.com/xml' => new DiscoveredCustomField(\\stdClass::class, new CustomField()),\n ],\n ],\n ];\n /** @var \\PHPUnit_Framework_MockObject_MockObject|CustomFieldDiscoveryInterface $discovery */\n $discovery = $this->createMock(CustomFieldDiscoveryInterface::class);\n $discovery->expects($this->once())\n ->method('getCustomFields')\n ->willReturn($expected);\n $manager = new CustomFieldManager($discovery);\n $this->assertEquals($expected['Media Data Service']['Media']['http://www.example.com/xml'], $manager->getCustomField('Media Data Service', 'Media', 'http://www.example.com/xml'));\n }",
"public function testCustomerCustomFieldsAreInvalid(): void\n {\n $customer = $this->createConfiguredMock(CustomerEntity::class, [\n 'getCustomFields' => ['mollie_payments' => 'foo']\n ]);\n\n $search = $this->createConfiguredMock(EntitySearchResult::class, [\n 'first' => $customer\n ]);\n\n $this->customerRepository->entitySearchResults = [$search];\n\n $customerStruct = $this->customerService->getCustomerStruct('fakeId', $this->createMock(Context::class));\n\n $actual = json_encode($customerStruct);\n $expected = '{\"extensions\":[]}';\n\n $this->assertEquals($actual, $expected);\n }",
"function sv_wc_admin_custom_order_fields_add_to_notes( $order_id, $post) {\n\terror_log( 'sv_wc_admin_custom_order_fields_add_to_notes1 $order_id:' . print_r( $order_id, true ) );\n\n\t//error_log( 'method_name1 $var:' . print_r( $var, true ) );\n\n\t$updated_custom_fields = isset( $_POST['wc-admin-custom-order-fields'] ) ? $_POST['wc-admin-custom-order-fields'] : null;\n\n\tif ( empty( $updated_custom_fields ) ) {\n\t\treturn;\n\t}\n\terror_log( 'sv_wc_admin_custom_order_fields_add_to_notes2 $order_id:' . print_r( $order_id, true ) );\n\n\t$order = wc_get_order( $post );\n\t$order_fields = wc_admin_custom_order_fields()->get_order_fields();\n\n\tforeach ( $order_fields as $custom_field ) {\n\t\terror_log( 'sv_wc_admin_custom_order_fields_add_to_notes3 $order_id:' . print_r( $order_id, true ) );\n\n\t\t$field_id = $custom_field->get_id();\n\t\t$field_meta_key = $custom_field->get_meta_key();\n\t\t$updated_value = isset( $updated_custom_fields[ $field_id ] ) ? $updated_custom_fields[ $field_id ] : '';\n\n\t\t// Update a custom field value unless it's empty...\n\t\t// A value of 0 is valid, so check for that first.\n\t\t// Empty string is also allowed to clear out custom fields completely.\n\t\tif ( '0' === $updated_value || '' === $updated_value || ! empty( $updated_value ) ) {\n\t\t\terror_log( 'sv_wc_admin_custom_order_fields_add_to_notes4 $order_id:' . print_r( $order_id, true ) );\n\n\t\t\t// Special handling for date fields.\n\t\t\tif ( 'date' === $order_fields[ $field_id ]->get_type() ) {\n\t\t\t\terror_log( 'sv_wc_admin_custom_order_fields_add_to_notes5 $order_id:' . print_r( $order_id, true ) );\n\n\t\t\t\t$updated_value = strtotime( $updated_value );\n\t\t\t\t// Add Order Note\n\t\t\t\t$order->add_order_note( $order, 'updated value: ' . $updated_value);\n\n\t\t\t\t$order_fields[ $field_id ]->set_value( $updated_value );\n\n\t\t\t\t$order->update_meta_data( $field_meta_key, $order_fields[ $field_id ]->get_value() );\n\n\t\t\t\t// This column is used so that date fields can be searchable.\n\t\t\t\t$order->update_meta_data( $field_meta_key . '_formatted', $order_fields[ $field_id ]->get_value_formatted() );\n\n\t\t\t} else {\n\t\t\t\terror_log( 'sv_wc_admin_custom_order_fields_add_to_notes6 $order_id:' . print_r( $order_id, true ) );\n\n\t\t\t\t$order->update_meta_data( $field_meta_key, $updated_value );\n\t\t\t}\n\n\t\t// ...Or if it's empty, delete the custom field meta altogether.\n\t\t} else {\n\n\t\t\terror_log( 'sv_wc_admin_custom_order_fields_add_to_notes7 $order_id:' . print_r( $order_id, true ) );\n\n\t\t\t\t// Remove order note\n\t\t\t$order->add_order_note( $order, 'removed value/set blank: ' . $updated_value);\n\t\t\t\n\t\t\t$order->delete_meta_data( $field_meta_key );\n\t\t\t$order->delete_meta_data( $field_meta_key . '_formatted' );\n\t\t}\n\n\t\t$order->save_meta_data();\n\t}\n\t\n}",
"function update_growsumo_customer($update_grsm_cust_arr){\n if(isset($update_grsm_cust_arr['sent_from']) && $update_grsm_cust_arr['sent_from'] == 'masterclass'){\n if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {\n $update_grsm_cust_arr['ip_address'] = trim(end(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])));\n } else {\n $update_grsm_cust_arr['ip_address'] = $_SERVER['REMOTE_ADDR'];\n }\n }\n \n $ch = curl_init('https://api.growsumo.com/v1/customers/'.$update_grsm_cust_arr['old_customer_key']);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json'));\n $auth = GROWSUMO_PK.':'.GROWSUMO_SK;\n \n $data = json_encode(array('name' => $update_grsm_cust_arr['full_name'],'ip_address'=>$update_grsm_cust_arr['ip_address'],'key'=>$update_grsm_cust_arr['new_customer_key']));\n curl_setopt($ch, CURLOPT_USERPWD, $auth);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n $response = curl_exec($ch);\n curl_close($ch);\n if($response === false || $response['http_code'] != 200) {\n if (curl_error($ch)) {\n $response .= \"\\n \". curl_error($ch);\n @mail('[email protected]','Failed creating growsumo customer',$response.\"<br> Data:\".print_r($grsm_cust_data));\n }\n }\n }",
"public function updateMemberFormFields(FieldList $fields)\n {\n //\n }",
"function editSettings($field_name = '')\n {\n\n //profiling::\n $this->debug_methods_trail[] = __function__;\n\n//declare\n$conditional_sql = '';\n\n //validate field name param\n if (!in_array($field_name, array(\n 'clients_optionalfield1',\n 'clients_optionalfield2',\n 'clients_optionalfield3'))) {\n return false;\n }\n\n /*\n *--------------------------------------------------------------\n * VALIDATION OF POST DATA\n *\n * check if the values set in post are valid\n * if not, fall back to defaults\n * its cheating a bit, but as we are looping the updates...\n * ...for now its the easy way out\n *--------------------------------------------------------------\n */\n\n foreach ($_POST as $key => $value) {\n\n if ($key == 'clients_optionalfield_status' && (!in_array($value, array('enabled', 'disabled')))) {\n $_POST[$key] = 'disabled'; //just set to disabled\n }\n if ($key == 'clients_optionalfield_require' && (!in_array($value, array('yes', 'no')))) {\n $_POST[$key] = 'no'; //just set to disabled\n }\n if ($key == 'clients_optionalfield_title' && ($value == '')) {\n $_POST[$key] = 'Field'; //some place holder text\n }\n $$key = $this->db->escape($this->input->post($key));\n }\n\n //conditional sql\n $conditional_sql = \" AND clients_optionalfield_name = '$field_name'\";\n\n //----------sql & benchmarking start----------\n $this->benchmark->mark('code_start'); //_____SQL QUERY_______\n $query = $this->db->query(\"UPDATE clients_optionalfields\n SET\n clients_optionalfield_title = $clients_optionalfield_title,\n clients_optionalfield_status = $clients_optionalfield_status,\n clients_optionalfield_require = $clients_optionalfield_require\n WHERE 1 = 1\n $conditional_sql\");\n\n $results = $this->db->affected_rows(); //affected rows\n\n //----------benchmarking end------------------\n $this->benchmark->mark('code_end');\n $execution_time = $this->benchmark->elapsed_time('code_start', 'code_end');\n\n //debugging data\n $this->__debugging(__line__, __function__, $execution_time, __class__, $results);\n\n //---return\n if (is_numeric($results)) {\n return true;\n } else {\n return false;\n }\n }",
"function update_v9_to_v10() {\n\n $sqlScriptFilename = '../install/codevtt_update_v9_v10.sql';\n if (!file_exists($sqlScriptFilename)) {\n echo \"ERROR: SQL script not found:$sqlScriptFilename<br>\";\n exit;\n }\n\n // the CodevTT_Type field must be created before the DB update\n echo \"- Create CodevTT_Type customField<br>\";\n $mType_list = 6;\n $access_viewer = 10;\n $access_reporter = 25;\n $attributes = array();\n $attributes[\"access_level_r\"] = $access_viewer;\n $attributes[\"access_level_rw\"] = $access_reporter;\n $attributes[\"require_report\"] = 1;\n $attributes[\"display_report\"] = 1;\n $attributes[\"require_update\"] = 0;\n $attributes[\"display_update\"] = 1;\n $attributes[\"require_resolved\"] = 0;\n $attributes[\"display_resolved\"] = 0;\n $attributes[\"require_closed\"] = 0;\n $attributes[\"display_closed\"] = 0;\n $defaultValue = NULL;\n $possible_values = 'Bug|Task';\n createCustomField(\"CodevTT_Type\", $mType_list, \"customField_type\", $attributes, $defaultValue, $possible_values);\n\n // execute the SQL script\n //\n echo \"- Execute SQL script:$sqlScriptFilename<br>\";\n $retCode = Tools::execSQLscript2($sqlScriptFilename);\n if (0 != $retCode) {\n echo \"<span class='error_font'>Could not execSQLscript: $sqlScriptFilename</span><br/>\";\n exit;\n }\n\n echo \"<br>SUCCESS: Update 0.99.18 to 0.99.19 (DB v9 to DB v10)<br>\";\n return TRUE;\n\n}",
"function ciniki_customers_update(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'customer_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Customer'), \n 'parent_id'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Parent'), \n 'eid'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Customer ID'), \n 'status'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Status'),\n 'type'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Customer Type'), \n 'member_status'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Member Status'), \n 'member_lastpaid'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'datetimetoutc', 'name'=>'Member Last Paid'),\n 'member_expires'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'date', 'name'=>'Member Expires'),\n 'membership_length'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Membership Length'),\n 'membership_type'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Membership Type'),\n 'dealer_status'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Dealer Status'), \n 'distributor_status'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Distributor Status'), \n 'callsign'=>array('required'=>'no', 'trimblanks'=>'yes', 'blank'=>'yes', 'name'=>'Callsign'), \n 'prefix'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Name Prefix'), \n 'first'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'First Name'), \n 'middle'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Middle Name'), \n 'last'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Last Name'), \n 'suffix'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Name Suffix'), \n 'display_name_format'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Display Name Format'), \n 'company'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Company'), \n 'department'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Company Department'), \n 'title'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Company Title'), \n 'phone_home'=>array('required'=>'no', 'trimblanks'=>'yes', 'blank'=>'yes', 'name'=>'Home Phone'), \n 'phone_work'=>array('required'=>'no', 'trimblanks'=>'yes', 'blank'=>'yes', 'name'=>'Work Phone'), \n 'phone_cell'=>array('required'=>'no', 'trimblanks'=>'yes', 'blank'=>'yes', 'name'=>'Cell Phone'), \n 'phone_fax'=>array('required'=>'no', 'trimblanks'=>'yes', 'blank'=>'yes', 'name'=>'Fax Number'), \n 'primary_email'=>array('required'=>'no', 'trimblanks'=>'yes', 'blank'=>'yes', 'name'=>'Primary Email Address'), \n 'alternate_email'=>array('required'=>'no', 'trimblanks'=>'yes', 'blank'=>'yes', 'name'=>'Alternate Email Address'), \n 'notes'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Notes'), \n 'primary_image_id'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Image'), \n 'primary_image_caption'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Image Caption'), \n 'intro_image_id'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Intro Image'), \n 'intro_image_caption'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Intro Image Caption'), \n 'webflags'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Webflags'), \n 'short_bio'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Short Bio'), \n 'full_bio'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Full Bio'), \n 'birthdate'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'date', 'name'=>'Birthday'), \n 'connection'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Connection'), \n 'language'=>array('required'=>'no', 'default'=>'', 'blank'=>'yes', 'name'=>'Preferred Language'), \n 'tax_number'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Tax Number'), \n 'tax_location_id'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Tax Location'), \n 'discount_percent'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Discount Percent'), \n 'start_date'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'datetimetoutc', 'name'=>'Start Date'), \n 'subscriptions'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'idlist', 'name'=>'Subscriptions'),\n 'unsubscriptions'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'idlist', 'name'=>'Unsubscriptions'),\n 'customer_categories'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'list', 'delimiter'=>'::', 'name'=>'Customer Categories'),\n 'customer_tags'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'list', 'delimiter'=>'::', 'name'=>'Customer Tags'),\n 'member_categories'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'list', 'delimiter'=>'::', 'name'=>'Member Categories'),\n 'member_subcategories'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'list', 'delimiter'=>'::', 'name'=>'Member Subcategories'),\n 'dealer_categories'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'list', 'delimiter'=>'::', 'name'=>'Dealer Categories'),\n 'distributor_categories'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'list', 'delimiter'=>'::', 'name'=>'Distributor Categories'),\n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'checkAccess');\n $rc = ciniki_customers_checkAccess($ciniki, $args['tnid'], 'ciniki.customers.update', $args['customer_id']); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $modules = $rc['modules'];\n $perms = $rc['perms'];\n\n //\n // Filter arguments\n //\n if( isset($args['callsign']) ) {\n $args['callsign'] = strtoupper($args['callsign']);\n }\n\n //\n // Get the current settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'getSettings');\n $rc = ciniki_customers_getSettings($ciniki, $args['tnid']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $settings = $rc['settings'];\n\n //\n // Get the existing customer name\n //\n $strsql = \"SELECT status, type, callsign, prefix, first, middle, last, suffix, \"\n . \"display_name, display_name_format, sort_name, permalink, company, dealer_status, distributor_status, webflags \"\n . \"FROM ciniki_customers \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $args['customer_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.customers', 'customer');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['customer']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.143', 'msg'=>'Customer does not exist'));\n }\n $customer = $rc['customer'];\n\n //\n // Check if dealer status and distributor status should be changed\n //\n if( isset($args['status']) && $args['status'] == 60 ) {\n if( ($customer['webflags']&0x07) > 0 ) {\n $args['webflags'] = 0;\n }\n }\n\n if( isset($args['dealer_status']) && $args['dealer_status'] == 60 ) {\n if( ($customer['webflags']&0x02) > 0 ) {\n $args['webflags'] = ($customer['webflags'] & !0x02);\n }\n }\n if( isset($args['distributor_status']) && $args['distributor_status'] == 60 ) {\n if( ($customer['webflags']&0x04) > 0 ) {\n $args['webflags'] = ($customer['webflags'] & !0x04);\n }\n }\n\n //\n // Only allow owners to change status of customer to/from suspend/delete\n //\n if( isset($args['status']) \n && ($args['status'] >= 50 || $customer['status'] >= 50) ) {\n if( !isset($perms) || ($perms&0x01) != 1 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.144', 'msg'=>'You do not have permissions to change the customer status.'));\n }\n }\n\n //\n // Check to make sure eid is unique if specified\n //\n if( isset($args['eid']) && $args['eid'] != '' ) {\n $strsql = \"SELECT id \"\n . \"FROM ciniki_customers \"\n . \"WHERE eid = '\" . ciniki_core_dbQuote($ciniki, $args['eid']) . \"' \"\n . \"AND id <> '\" . ciniki_core_dbQuote($ciniki, $args['customer_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.customers', 'eid');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( $rc['num_rows'] > 0 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.145', 'msg'=>'The customer ID already exists.'));\n }\n }\n\n //\n // Check if trying to make a child customer\n //\n if( isset($args['parent_id']) && $args['parent_id'] > 0 ) {\n //\n // Make sure parent_id is not customer id\n //\n if( $args['parent_id'] == $args['customer_id'] ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.146', 'msg'=>'Parent cannot be the same as the child.'));\n }\n\n // \n // Check to make sure the parent is not a child\n //\n $strsql = \"SELECT id, parent_id \"\n . \"FROM ciniki_customers \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $args['parent_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.customers', 'parent');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['parent']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.147', 'msg'=>'The parent does not exist.'));\n }\n if( isset($rc['parent']) && $rc['parent']['parent_id'] > 0 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.148', 'msg'=>'The parent is already a child.'));\n }\n // \n // Check to make sure the customer does not have any children\n //\n $strsql = \"SELECT 'children', COUNT(*) AS num_children \"\n . \"FROM ciniki_customers \"\n . \"WHERE parent_id = '\" . ciniki_core_dbQuote($ciniki, $args['customer_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbCount');\n $rc = ciniki_core_dbCount($ciniki, $strsql, 'ciniki.customers', 'num');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['num']['children']) && $rc['num']['children'] > 0 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.149', 'msg'=>'This customer already has children and cannot become a parent.'));\n }\n }\n\n // \n // Turn off autocommit\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbInsert');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.customers');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Check for changes to display name, sort name or permalink\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'customerUpdateName');\n $rc = ciniki_customers_customerUpdateName($ciniki, $args['tnid'], $customer, $args['customer_id'], $args);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.413', 'msg'=>'Unable to update name', 'err'=>$rc['err']));\n }\n if( isset($rc['display_name']) && $rc['display_name'] != $customer['display_name'] ) {\n $args['display_name'] = $rc['display_name'];\n }\n if( isset($rc['sort_name']) && $rc['sort_name'] != $customer['sort_name'] ) {\n $args['sort_name'] = $rc['sort_name'];\n }\n if( isset($rc['permalink']) && $rc['permalink'] != $customer['permalink'] ) {\n $args['permalink'] = $rc['permalink'];\n }\n\n //\n // Update the customer\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $args['tnid'], 'ciniki.customers.customer', \n $args['customer_id'], $args, 0x06);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.150', 'msg'=>'Unable to updated customer', 'err'=>$rc['err']));\n }\n\n //\n // Hook into other modules when updating status incase orders or other items should be changed\n //\n if( isset($args['status']) && $args['status'] != '' ) {\n foreach($modules as $module => $m) {\n list($pkg, $mod) = explode('.', $module);\n $rc = ciniki_core_loadMethod($ciniki, $pkg, $mod, 'hooks', 'customerStatusUpdate');\n if( $rc['stat'] == 'ok' ) {\n $fn = $rc['function_call'];\n $rc = $fn($ciniki, $args['tnid'], array(\n 'customer_id'=>$args['customer_id'], \n 'status'=>$args['status'],\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.151', 'msg'=>'Unable to update customer status.', 'err'=>$rc['err']));\n }\n }\n }\n }\n\n //\n // Hook into other modules when updating name incase orders or other items should be changed\n //\n if( isset($args['display_name']) && $args['display_name'] != '' ) {\n foreach($modules as $module => $m) {\n list($pkg, $mod) = explode('.', $module);\n $rc = ciniki_core_loadMethod($ciniki, $pkg, $mod, 'hooks', 'customerNameUpdate');\n if( $rc['stat'] == 'ok' ) {\n $fn = $rc['function_call'];\n $rc = $fn($ciniki, $args['tnid'], array(\n 'customer_id'=>$args['customer_id'], \n 'display_name'=>$args['display_name'],\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.152', 'msg'=>'Unable to update customer name.', 'err'=>$rc['err']));\n }\n }\n }\n }\n\n //\n // Check for subscriptions\n //\n if( isset($args['subscriptions']) || isset($args['unsubscriptions']) ) {\n // incase one of the args isn't set, setup with blank arrays\n if( !isset($args['subscriptions']) ) { $args['subscriptions'] = array(); }\n if( !isset($args['unsubscriptions']) ) { $args['unsubscriptions'] = array(); }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'subscriptions', 'private', 'updateCustomerSubscriptions');\n $rc = ciniki_subscriptions_updateCustomerSubscriptions($ciniki, $args['tnid'], \n $args['customer_id'], $args['subscriptions'], $args['unsubscriptions']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n\n //\n // Update the customer categories\n //\n if( isset($args['customer_categories']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'tagsUpdate');\n $rc = ciniki_core_tagsUpdate($ciniki, 'ciniki.customers', 'tag', $args['tnid'],\n 'ciniki_customer_tags', 'ciniki_customer_history',\n 'customer_id', $args['customer_id'], 10, $args['customer_categories']);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.customers');\n return $rc;\n }\n }\n\n //\n // Update the customer tags\n //\n if( isset($args['customer_tags']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'tagsUpdate');\n $rc = ciniki_core_tagsUpdate($ciniki, 'ciniki.customers', 'tag', $args['tnid'],\n 'ciniki_customer_tags', 'ciniki_customer_history',\n 'customer_id', $args['customer_id'], 20, $args['customer_tags']);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.customers');\n return $rc;\n }\n }\n\n //\n // Update the member categories\n //\n if( isset($args['member_categories']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'tagsUpdate');\n $rc = ciniki_core_tagsUpdate($ciniki, 'ciniki.customers', 'tag', $args['tnid'],\n 'ciniki_customer_tags', 'ciniki_customer_history',\n 'customer_id', $args['customer_id'], 40, $args['member_categories']);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.customers');\n return $rc;\n }\n }\n\n //\n // Update the member subcategories\n //\n if( isset($args['member_subcategories']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'tagsUpdate');\n $rc = ciniki_core_tagsUpdate($ciniki, 'ciniki.customers', 'tag', $args['tnid'],\n 'ciniki_customer_tags', 'ciniki_customer_history',\n 'customer_id', $args['customer_id'], 45, $args['member_subcategories']);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.customers');\n return $rc;\n }\n }\n\n //\n // Update the dealer categories\n //\n if( isset($args['dealer_categories']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'tagsUpdate');\n $rc = ciniki_core_tagsUpdate($ciniki, 'ciniki.customers', 'tag', $args['tnid'],\n 'ciniki_customer_tags', 'ciniki_customer_history',\n 'customer_id', $args['customer_id'], 60, $args['dealer_categories']);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.customers');\n return $rc;\n }\n }\n\n //\n // Update the distributor categories\n //\n if( isset($args['distributor_categories']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'tagsUpdate');\n $rc = ciniki_core_tagsUpdate($ciniki, 'ciniki.customers', 'tag', $args['tnid'],\n 'ciniki_customer_tags', 'ciniki_customer_history',\n 'customer_id', $args['customer_id'], 80, $args['distributor_categories']);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.customers');\n return $rc;\n }\n }\n\n //\n // Update the short_description\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'customerUpdateShortDescription');\n $rc = ciniki_customers_customerUpdateShortDescription($ciniki, $args['tnid'], $args['customer_id'], 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.customers');\n return $rc;\n }\n\n //\n // Update the season membership\n //\n if( ($modules['ciniki.customers']['flags']&0x02000000) > 0 ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'customerUpdateSeasons');\n $rc = ciniki_customers_customerUpdateSeasons($ciniki, $args['tnid'], $args['customer_id']);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.customers');\n return $rc;\n }\n }\n\n //\n // Commit the database changes\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.customers');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n $rsp = array('stat'=>'ok');\n\n//\n// FIXME: Switch UI to use response for add/update to fill out details\n//\n// ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'customerDetails');\n// $rc = ciniki_customers__customerDetails($ciniki, $args['tnid'], $args['customer_id'], array('phones'=>'yes', 'emails'=>'yes', 'addresses'=>'yes', 'subscriptions'=>'no'));\n// if( $rc['stat'] == 'ok' && isset($rc['details']) ) {\n// $rsp['customer_details'] = $rc['details'];\n// }\n\n //\n // Update the web index if enabled\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'hookExec');\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.customer', 'object_id'=>$args['customer_id']));\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.members', 'object_id'=>$args['customer_id']));\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.dealers', 'object_id'=>$args['customer_id']));\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.distributors', 'object_id'=>$args['customer_id']));\n\n return $rsp;\n}",
"public function adminPlanItemConfigUpdate($planItem)\n {\n $settings = $_POST['verify_account'];\n\n $planItem->setEnabled(isset($settings['enabled']) && $settings['enabled']);\n $planItem->set('amount', geoNumber::deformat($settings['amount']));\n $planItem->set('require_for_listing', isset($settings['require_for_listing']) && $settings['require_for_listing']);\n if (geoMaster::is('auctions')) {\n $planItem->set('require_for_bid', isset($settings['require_for_bid']) && $settings['require_for_bid']);\n }\n\n $planItem->set('apply_to_balance', isset($settings['apply_to_balance']) && $settings['apply_to_balance']);\n\n return true;\n }",
"public function test_updateLegacyLowstockContact() {\n\n }",
"public function testCustomerPaymentMethodUpdateCustomerPaymentMethodBycustomerIdcustomerPaymentMethodId()\n {\n }",
"public function updateFulfillmentProcessCustomFields($body)\n {\n $this->updateFulfillmentProcessCustomFieldsWithHttpInfo($body);\n }",
"public function test_updateSettings() {\n\n }",
"public function saveCustomFields()\n\t{\n\t\t$state = $this->getStateVariables();\n\t\t$validation = $this->getValidation();\n\n\t\t$user = JFactory::getUser();\n\t\t$user = $this->getState('user', $user);\n\n\t\t// Find an existing record\n\t\t$list = FOFModel::getTmpInstance('Users','AkeebasubsModel')\n\t\t\t->user_id($user->id)\n\t\t\t->getItemList();\n\n\t\tif(!count($list)) {\n\t\t\t$id = 0;\n\t\t} else {\n\t\t\t$thisUser = array_pop($list);\n\t\t\t$id = $thisUser->akeebasubs_user_id;\n\t\t}\n\n\t\t$data = array(\n\t\t\t'akeebasubs_user_id' => $id,\n\t\t\t'user_id'\t\t=> $user->id,\n\t\t\t'isbusiness'\t=> $state->isbusiness ? 1 : 0,\n\t\t\t'businessname'\t=> $state->businessname,\n\t\t\t'occupation'\t=> $state->occupation,\n\t\t\t'vatnumber'\t\t=> $state->vatnumber,\n\t\t\t'viesregistered' => $validation->validation->vatnumber,\n\t\t\t// @todo Ask for tax authority\n\t\t\t'taxauthority'\t=> '',\n\t\t\t'address1'\t\t=> $state->address1,\n\t\t\t'address2'\t\t=> $state->address2,\n\t\t\t'city'\t\t\t=> $state->city,\n\t\t\t'state'\t\t\t=> $state->state,\n\t\t\t'zip'\t\t\t=> $state->zip,\n\t\t\t'country'\t\t=> $state->country,\n\t\t\t'params'\t\t=> $state->custom\n\t\t);\n\n\t\t// Allow plugins to post-process the fields\n\t\tJLoader::import('joomla.plugin.helper');\n\t\tJPluginHelper::importPlugin('akeebasubs');\n\t\t$app = JFactory::getApplication();\n\t\t$jResponse = $app->triggerEvent('onAKSignupUserSave', array((object)$data));\n\t\tif(is_array($jResponse) && !empty($jResponse)) foreach($jResponse as $pResponse) {\n\t\t\tif(!is_array($pResponse)) continue;\n\t\t\tif(empty($pResponse)) continue;\n\t\t\tif(array_key_exists('params', $pResponse)) {\n\t\t\t\tif(!empty($pResponse['params'])) foreach($pResponse['params'] as $k => $v) {\n\t\t\t\t\t$data['params'][$k] = $v;\n\t\t\t\t}\n\t\t\t\tunset($pResponse['params']);\n\t\t\t}\n\t\t\t$data = array_merge($data, $pResponse);\n\t\t}\n\n\t\t// Serialize custom fields\n\t\t$data['params'] = json_encode($data['params']);\n\n\t\t$status = FOFModel::getTmpInstance('Users','AkeebasubsModel')\n\t\t\t->setId($id)\n\t\t\t->getItem()\n\t\t\t->save($data);\n\n\t\treturn $status;\n\t}",
"function addCustomFieldPackage($lead_id, $astDB){\n\n\t$packages = $_POST['packages'];\n\t$astDB->where('lead_id', $lead_id);\n $query = $astDB->delete('field_package');\n\tif($packages != \"\"){\n\t\tforeach($packages as $key => $value){\n\t\t\t$newvalue = array_map(\"filterField\", $value);\n\t\t\t$newvalue['lead_id'] = $lead_id;\n\t\t\t$query = $astDB->insert('field_package', $newvalue);\n\t\t\t$newvalue = [];\n\t\t}\n\t}\n}",
"public function test_updateExternalShipment() {\n\n }",
"function pnAddressBook_admin_customfields($args) {\r\n\tglobal $bgcolor1,$bgcolor2,$bgcolor3,$bgcolor4;\r\n\r\n\t$output = new pnHTML();\r\n\t$output->SetInputMode(_PNH_VERBATIMINPUT);\r\n\t$output->Text(pnAddressBook_themetable('start'));\r\n\r\n\t// some design ;)\r\n\t$bc1 = $bgcolor1;\r\n\t$bc2 = $bgcolor2;\r\n\tif ($bgcolor1 == $bgcolor2) {\r\n\t\tif ($bgcolor1 == $bgcolor3) {\r\n\t\t\t$bc2 = $bgcolor4;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$bc2 = $bgcolor3;\r\n\t\t}\r\n\t}\r\n\r\n // Security check\r\n if (!pnSecAuthAction(0, 'pnAddressBook::', '::', ACCESS_ADMIN)) {\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_NOAUTH));\r\n $output->Text(pnAddressBook_themetable('end'));\r\n\t\treturn $output->GetOutput();\r\n }\r\n\t$authid = pnSecGenAuthKey();\r\n\r\n $output->Text(pnAddressBook_admin_menu());\r\n\t$output->Text(pnAddressBook_themetable('end'));\r\n\t$msg = pnVarCleanFromInput('msg');\r\n\tif ($msg) { $output->Text('<div align=\"center\">'.$msg.'</div>');}\r\n\telse {$output->Linebreak(1); }\r\n\r\n $custs = pnModAPIFunc(__PNADDRESSBOOK__,'admin','getCustomfields');\r\n if(!is_array($custs)) {\r\n $output->Text($custs);\r\n return $output->GetOutput();\r\n }\r\n\r\n\t// Start form\r\n $output->FormStart(pnModURL(__PNADDRESSBOOK__, 'admin', 'updatecustomfields'));\r\n\r\n // Add an authorisation ID\r\n $output->FormHidden('authid', pnSecGenAuthKey());\r\n\r\n\t$output->Text(pnAddressBook_themetable('start'));\r\n\t$output->Linebreak(1);\r\n\t$output->Text('<table align=\"center\" cellpadding=\"5\" cellspacing=\"1\" bgcolor=\"'.$bc2.'\">');\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Text('<b>'.pnVarPrepHTMLDisplay(_pnAB_CUSTOMLABEL).'</b>');\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Text('<b>'.pnVarPrepHTMLDisplay(_pnAB_DATATYPE).'</b>');\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Text('<b>'.pnVarPrepHTMLDisplay(_pnAB_CAT_DELETE).'</b>');\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Text('<b>'.pnVarPrepHTMLDisplay(_pnAB_ORDER).'</b>');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t$formdata[] = array('id'=>'varchar(60) default NULL', 'name'=>' Text, 60 chars, 1 line');\r\n\t$formdata[] = array('id'=>'varchar(120) default NULL', 'name'=>'Text, 120 chars, 2 lines');\r\n\t$formdata[] = array('id'=>'varchar(240) default NULL', 'name'=>'Text, 240 chars, 4 lines');\r\n\t$formdata[] = array('id'=>'int default NULL', 'name'=>'Integer numbers');\r\n $formdata[] = array('id'=>'decimal(10,2) default NULL', 'name'=>'Decimal numbers');\r\n//gehBEGIN\r\n $formdata[] = array('id'=>'int(1) default NULL', 'name'=>'Checkbox'); //gehINSERT\r\n//gehEND\r\n\t$formdata[] = array('id'=>'date default NULL', 'name'=>'Date');\r\n\t$formdata[] = array('id'=>'tinyint default NULL', 'name'=>'Blank line');\r\n\t$formdata[] = array('id'=>'smallint default NULL', 'name'=>'Horizontal rule');\r\n\r\n\tforeach($custs as $cust) {\r\n\t\t$output->TableRowStart();\r\n\t\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t\t$output->FormText('name[]',$cust['name'],20,30);\r\n\t\t$output->TableColEnd();\r\n\t\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t\t$output->FormSelectMultiple('cus_type[]',$formdata, 0, 1, $cust['type'], '');\r\n\t\t$output->TableColEnd();\r\n\t\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t\t$output->FormHidden('id[]',$cust['nr']);\r\n\t\tif ($cust['nr'] < 5) {\r\n\t\t\t$output->FormHidden('del[]',false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$output->FormCheckbox('del[]',false,$cust['nr']);\r\n\t\t}\r\n\t\t$output->TableColEnd();\r\n\t\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t\tif ($cust['position'] == '1') {\r\n\t\t\t$down = $output->URL(pnModURL(__PNADDRESSBOOK__,'admin','decCustomfields',array('id' => $cust['nr'],'authid' => $authid)),'<img src=\"modules/'.__PNADDRESSBOOK__.'/pnimages/down.gif\" alt=\"'.pnVarPrepHTMLDisplay(_pnAB_DOWN).'\" border=\"0\" hspace=\"4\">');\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($cust['position'] == sizeof($custs)) {\r\n\t\t\t\t$up = $output->URL(pnModURL(__PNADDRESSBOOK__,'admin','incCustomfields',array('id' => $cust['nr'],'authid' => $authid)),'<img src=\"modules/'.__PNADDRESSBOOK__.'/pnimages/up.gif\" alt=\"'.pnVarPrepHTMLDisplay(_pnAB_UP).'\" border=\"0\" hspace=\"4\">');\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$up = $output->URL(pnModURL(__PNADDRESSBOOK__,'admin','incCustomfields',array('id' => $cust['nr'],'authid' => $authid)),'<img src=\"modules/'.__PNADDRESSBOOK__.'/pnimages/up.gif\" alt=\"'.pnVarPrepHTMLDisplay(_pnAB_UP).'\" border=\"0\" hspace=\"4\">');\r\n\t\t\t\t$down = $output->URL(pnModURL(__PNADDRESSBOOK__,'admin','decCustomfields',array('id' => $cust['nr'],'authid' => $authid)),'<img src=\"modules/'.__PNADDRESSBOOK__.'/pnimages/down.gif\" alt=\"'.pnVarPrepHTMLDisplay(_pnAB_DOWN).'\" border=\"0\" hspace=\"4\">');\r\n\t\t\t}\r\n\t\t}\r\n\t\t$output->TableColEnd();\r\n\t\t$output->TableRowEnd();\r\n\t}\r\n\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormText('newname','',20,30);\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormSelectMultiple('newtype',$formdata, 0, 1,'', '');\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Text(_pnAB_CAT_NEW);\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\"><br>');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t$output->TableRowEnd();\r\n\t$output->Text('</table>');\r\n\t$output->Linebreak(1);\r\n\t$output->Text(pnAddressBook_themetable('end'));\r\n\r\n\t// End form\r\n\t$output->Linebreak(1);\r\n\t$output->Text(pnAddressBook_themetable('start'));\r\n\t$output->Text('<div align=\"center\"><br>');\r\n $output->FormSubmit(pnVarPrepHTMLDisplay(_pnAB_PNADDRESSBOOKUPDATE));\r\n\t$output->Text('<br><br></div>');\r\n\t$output->Text(pnAddressBook_themetable('end'));\r\n $output->FormEnd();\r\n\r\n\t// Return the output that has been generated by this function\r\n $output->SetInputMode(_PNH_PARSEINPUT);\r\n\treturn $output->GetOutput();\r\n}",
"public function adminPlanItemConfigUpdate($planItem)\n {\n $settings = $_POST['auction'];\n\n if (is_array($settings) && isset($settings['form_submitted'])) {\n $allow_buy_now = (int)$settings['allow_buy_now'];\n $allow_buy_now_only = ($allow_buy_now) ? $settings['allow_buy_now_only'] : 0; // if allow_buy_now not on, force to be false\n $planItem->set('allow_buy_now', $allow_buy_now);\n $planItem->set('allow_buy_now_only', $allow_buy_now_only);\n\n $buy_now_only_none_left = (isset($settings['buy_now_only_none_left']) && in_array($settings['buy_now_only_none_left'], array('close','sold'))) ? $settings['buy_now_only_none_left'] : 'close';\n $planItem->set('buy_now_only_none_left', $buy_now_only_none_left);\n\n //reverse: note that can set to \"false\" since we do not default to be turned on\n $allow_reverse = (isset($settings['allow_reverse']) && $settings['allow_reverse']) ? 1 : false;\n $allow_reverse_buy_now = ($allow_reverse && isset($settings['allow_reverse_buy_now']) && $settings['allow_reverse_buy_now']) ? 1 : false;\n $charge_reverse_final_fees = ($allow_reverse && isset($settings['charge_reverse_final_fees']) && $settings['charge_reverse_final_fees']) ? 1 : false;\n\n $planItem->set('allow_reverse', $allow_reverse);\n $planItem->set('allow_reverse_buy_now', $allow_reverse_buy_now);\n $planItem->set('charge_reverse_final_fees', $charge_reverse_final_fees);\n\n $planItem->set('force_single_quantity', (int)$settings['force_single_quantity']);\n }\n\n return true;\n }",
"function acf_update_field_group($field_group)\n{\n}",
"public function custom_edit(Request $request){\n $id=$request->id;\n $company_id = config('settings.company_id');\n\n $request->validate([\n 'title' => 'required|unique:custom_fields,title,' . $id,\n ]);\n // $validator=$request->validate([\n // 'title'=> 'required|title|unique:custom_fields,title,'. $id .'',\n // ]);\n // $validator = \\Validator::make($request->all(), [\n // 'title' => 'required|title|unique:custom_fields,title,'. $id .'',\n // ]);\n // if ($validator->fails())\n // {\n // return response()->json(['errors'=>$validator->errors()->all()]);\n // }\n \n $customFieldExists = CustomField::where('company_id',config('settings.company_id'))->where('title',$request->title)->where('id','!=',$id)->first();\n if($customFieldExists)\n return view('company.settings.ajaxCustomField')->with('custom_fields', CustomField::where('for', 'Party')->orderBy('id', 'DESC')->get());\n //return response(['status'=>false,'message'=>'This custom field already exists']);\n\n $customField = CustomField::where('company_id',$company_id)->where('id',$request->id)->first();\n if(!$customField)\n return response(['status'=>false,'message'=>'No Custom Field Found']);\n \n if ($customField->type == \"Single option\" || $customField->type == \"Multiple options\") {\n $request->validate([\n 'options' => 'required',\n ]);\n // $opt_json = array_filter(explode('%0A', str_replace('%2F','/',htmlspecialchars_decode($request->options))));\n // $customField->options = json_encode($opt_json);\n \n $customField->options = json_encode(array_filter($request->options,'strlen'));\n }\n\n $customField->title = $request->title;\n $customField->slug = Str::slug($request->title . '-' . $request->module);\n $customField->save();\n // $customField->slug = Str::slug($request->title . '-' . $request->module.'-'.$customField->id);\n // $customField->save();\n $dataPayload = array(\"data_type\" => \"custom_field\", \"custom_field\" => $customField, \"action\" => \"update\");\n $msgID = sendPushNotification_(getFBIDs($company_id), 34, null, $dataPayload);\n return view('company.settings.ajaxCustomField')->with('custom_fields', CustomField::where('company_id',$company_id)->where('for', 'Party')->orderBy('id', 'DESC')->get());\n }",
"public function updateAction() {\n $model = Mage::getModel('inventorypurchasing/purchaseorder_draftpo')\n ->load($this->getRequest()->getParam('id'));\n $field = $this->getRequest()->getParam('field');\n if (!$field) {\n return $this->getResponse()->setBody(json_encode(array('success' => 0)));\n }\n $value = $this->getRequest()->getParam('value');\n $updateData = Mage::helper('vendorsinventory/draftpo')->prepareUpdateData($field, $value);\n try {\n $returnObject = $model->update($updateData);\n $return = $returnObject->getData();\n $return['success'] = 1;\n return $this->getResponse()->setBody(json_encode($return));\n } catch (Exception $ex) {\n return $this->getResponse()->setBody(json_encode(array('success' => 0)));\n }\n }",
"function custom_override_checkout_fields( $fields ) {\n foreach ($fields as $category => $value) {\n // loop by fields\n foreach ($fields[$category] as $field => $property) {\n // remove label property\n $fields[$category][$field]['placeholder'] = $fields[$category][$field]['label'];\n }\n }\n return $fields;\n}",
"public function updateVendorComplianceSurveyCustomFieldsWithHttpInfo($body)\n {\n $returnType = '';\n $request = $this->updateVendorComplianceSurveyCustomFieldsRequest($body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }",
"function brag_rest_update_flamingo( $value, $object, $field_name ) {\n \n\tforeach ($value as $field => $data) {\n\t\tupdate_post_meta( $object->ID, $field, $data );\n\t}\n}",
"public function testAddCustomFields(){\n $constituentFields = new ConstituentFields();\n $constituentFields->addFields(array(1211=>\"test\"));\n $xml = $constituentFields->generateXML();\n $xmlObject = simplexml_load_string($xml);\n $consField = $xmlObject->children()->cons_field;\n $this->assertNotEquals(empty($consField), true);\n $consFieldXML = $consField->asXML();\n $expectation = '<cons_field id=\"1211\"><value>test</value></cons_field>';\n $this->assertEquals($expectation, $consFieldXML);\n }",
"public function updated(PlanSubscription $planSubscription)\n {\n\n if($planSubscription->status==\"PENDING\"){\n $planSubscription->is_paid = false;\n $planSubscription->save();\n }\n if($planSubscription->status==\"SUSPENDED\"){\n $planSubscription->is_paid = false;\n $planSubscription->save();\n }\n if($planSubscription->status==\"CANCELLED\"){\n $planSubscription->is_paid = false;\n $planSubscription->cancelled_on = Carbon::now();\n $planSubscription->save();\n }\n if($planSubscription->status==\"CANCELLED_BY_RECEIVER\"){\n $planSubscription->is_paid = false;\n $planSubscription->cancelled_on = Carbon::now();\n $planSubscription->save();\n }\n if($planSubscription->status==\"CANCELLED_BY_SENDER\"){\n $planSubscription->is_paid = false;\n $planSubscription->cancelled_on = Carbon::now();\n $planSubscription->save();\n }\n }",
"public function testUpdatePayloadInvalidFieldFeature()\n {\n $user = factory(User::class)->create();\n $webhook = factory(Webhook::class)->create(['user_id' => $user->id]);\n $payload = factory(Payload::class)->create(['webhook_id' => $webhook->id]);\n $this->actingAs($user);\n $response = $this->put(route('webhooks.payloads.update', ['webhook' => $webhook, 'payload' => $payload]), [\n 'params' => '{\"name\": \"rasmus\", \"age\": \"30\"}',\n 'fields' => ['name', 'asd'],\n ]);\n $errors = session('errors')->toArray();\n\n $response->assertStatus(302);\n $this->assertEquals($errors['fields'][0], ['field1' => 'This field is not match with params']);\n }",
"public function testUpdateProductUsingPOST()\n {\n }",
"public function updateCustom (\n\t)\t\t\t\t\t\t// RETURNS <bool> TRUE if the update is successful, FALSE if there is a failure.\n\t\n\t// $contentForm->updateCustom();\n\t{\n\t\treturn true;\n\t}",
"public function testHandleUpdateSuccess()\n {\n // Populate data\n $dealerAccountID = $this->_populate();\n \n // Set params\n $params = $this->customDealerAccountData;\n \n // Add ID\n $ID = $this->_pickRandomItem($dealerAccountID);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $params, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHas('dealer-account-updated', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals($dealerAccount->name, $this->customDealerAccountData['name']);\n $this->assertEquals($dealerAccount->branch_ID, $this->customDealerAccountData['branch_ID']);\n }",
"public function testUpdateField()\n {\n $remoteDataFolder = self::$baseRemoteFolderPath . \"/DocumentElements/Fields\";\n $fieldFolder = \"DocumentElements/Fields\";\n $localFileName = \"GetField.docx\";\n $remoteFileName = \"TestUpdateField.docx\";\n\n $this->uploadFile(\n realpath(__DIR__ . '/../../..') . \"/TestData/\" . $fieldFolder . \"/\" . $localFileName,\n $remoteDataFolder . \"/\" . $remoteFileName\n );\n\n $requestField = new FieldUpdate(array(\n \"field_code\" => \"{ NUMPAGES }\",\n ));\n $request = new UpdateFieldRequest(\n $remoteFileName,\n 0,\n $requestField,\n \"sections/0/paragraphs/0\",\n $remoteDataFolder,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL\n );\n\n $result = $this->words->updateField($request);\n Assert::assertTrue(json_decode($result, true) !== NULL);\n Assert::assertNotNull($result->getField());\n Assert::assertEquals(\"{ NUMPAGES }\", $result->getField()->getFieldCode());\n Assert::assertEquals(\"0.0.0.0\", $result->getField()->getNodeId());\n }",
"public function testUpdateVendorComplianceSurvey()\n {\n }",
"public function updateLocationBillingTypeCustomFieldsWithHttpInfo($body)\n {\n \n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $body when calling updateLocationBillingTypeCustomFields');\n }\n \n // parse inputs\n $resourcePath = \"/beta/locationBillingType/customFields\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));\n \n \n \n \n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('API-Key');\n if (strlen($apiKey) !== 0) {\n $headerParams['API-Key'] = $apiKey;\n }\n \n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'PUT',\n $queryParams, $httpBody,\n $headerParams\n );\n \n return array(null, $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n }\n \n throw $e;\n }\n }",
"function update_field($field)\n {\n }",
"function update_field($field)\n {\n }",
"function update_field($field)\n {\n }",
"function update_field($field)\n {\n }",
"public function update_field() {\n\n\t\t//init controller data\n\t\t$this->extensions->hk_InitData($this, __FUNCTION__);\n\n\t\tif (!$this->user->canModify('listing_grid/product')) {\n\t\t\t$error = new AError('');\n\t\t\treturn $error->toJSONResponse('NO_PERMISSIONS_402',\n\t\t\t\tarray( 'error_text' => sprintf($this->language->get('error_permission_modify'), 'listing_grid/product'),\n\t\t\t\t\t'reset_value' => true\n\t\t\t\t));\n\t\t}\n\n\t\t$this->loadLanguage('catalog/product');\n\n\t\t$this->loadModel('catalog/product');\n\t\tif (isset($this->request->get['id'])) {\n\t\t\t//request sent from edit form. ID in url\n\t\t\tforeach ($this->request->post as $key => $value) {\n\t\t\t\t$err = $this->_validateField($key, $value);\n\t\t\t\tif (!empty($err)) {\n\t\t\t\t\t$error = new AError('');\n\t\t\t\t\treturn $error->toJSONResponse('VALIDATION_ERROR_406', array( 'error_text' => $err ));\n\t\t\t\t}\n if($key=='date_available'){\n $value = dateDisplay2ISO($value);\n }\n $data = array( $key => $value );\n\t\t\t\t$this->model_catalog_product->updateProduct($this->request->get['id'], $data);\n\t\t\t\t$this->model_catalog_product->updateProductLinks($this->request->get['id'], $data);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\t//request sent from jGrid. ID is key of array\n\t\t$fields = array( 'product_id', 'product_description', /* 'model',*//* 'price',*//* 'call_to_order', *//* 'quantity',*/ 'status' );\n\t\tforeach ($fields as $f) {\n\t\t\tif (isset($this->request->post[ $f ]))\n\t\t\t\tforeach ($this->request->post[ $f ] as $k => $v) {\n\t\t\t\t\t$err = $this->_validateField($f, $v);\n\t\t\t\t\tif (!empty($err)) {\n\t\t\t\t\t\t$error = new AError('');\n\t\t\t\t\t\treturn $error->toJSONResponse('VALIDATION_ERROR_406', array( 'error_text' => $err ));\n\t\t\t\t\t}\n\t\t\t\t\t$this->model_catalog_product->updateProduct($k, array( $f => $v ));\n\t\t\t\t}\n\t\t}\n\n\t\t//update controller data\n\t\t$this->extensions->hk_UpdateData($this, __FUNCTION__);\n\t}",
"public function updateListing($plan_info)\n {\n $is_free = false;\n\n // Define is listing is free\n if (\n $plan_info['Price'] <= 0\n || ($plan_info['Price'] > 0\n && (\n (\n $this->planType == 'listing'\n && $plan_info['Package_ID']\n && $plan_info['Listings_remains'] > 0\n )\n || (\n $this->planType == 'account'\n && $plan_info['Listings_remains'] > 0\n )\n )\n )\n ) {\n $is_free = true;\n\n // Redirect to the form if done step was initiated not by script\n if (!$this->listingData['Plan_ID']) {\n $this->redirectToStep('category');\n exit;\n }\n }\n // Checking for paid listing payment status\n elseif (strtotime($this->listingData['Pay_date']) === false) {\n if ($this->singleStep) {\n $this->redirectToStep('category');\n } else {\n $this->redirectToStep($this->listingData['Last_step'], $this->extendUrl());\n }\n exit;\n }\n\n // Change listing status\n $update = array(\n 'fields' => array(\n 'Last_step' => '',\n 'Last_type' => '',\n 'Cron' => '0',\n 'Cron_notified' => '0',\n 'Cron_featured' => '0',\n ),\n 'where' => array(\n 'ID' => $this->listingID,\n ),\n );\n\n if ($is_free) {\n // Define featured status\n if (($plan_info['Featured'] || $plan_info['Featured_listing'])\n && (!$plan_info['Advanced_mode']\n || ($plan_info['Advanced_mode'] && $this->adType == 'featured')\n )\n ) {\n $featured = true;\n }\n\n $update['fields']['Status'] = $GLOBALS['config']['listing_auto_approval'] ? 'active' : 'pending';\n $update['fields']['Pay_date'] = 'NOW()';\n $update['fields']['Featured_ID'] = $featured ? $plan_info['ID'] : 0;\n $update['fields']['Featured_date'] = $featured ? 'NOW()' : 'NULL';\n }\n\n $GLOBALS['rlDb']->update($update, 'listings');\n\n /**\n * @since 4.7.2 - Hook moved after code \"rlDb->update()\"\n * @since 4.6.0 - All parameters\n */\n $GLOBALS['rlHook']->load('afterListingDone', $this, $update, $is_free);\n }",
"function createCustomField($fieldName, $fieldType, $configId, $attributes = NULL,\n $default_value = '', $possible_values = '') {\n global $fieldList;\n\n if (NULL == $attributes) {\n $attributes = array();\n\n $attributes[\"access_level_r\"] = 10;\n $attributes[\"access_level_rw\"] = 25;\n $attributes[\"require_report\"] = 1;\n $attributes[\"require_update\"] = 1;\n $attributes[\"require_resolved\"] = 0;\n $attributes[\"require_closed\"] = 0;\n $attributes[\"display_report\"] = 1;\n $attributes[\"display_update\"] = 1;\n $attributes[\"display_resolved\"] = 0;\n $attributes[\"display_closed\"] = 0;\n\n echo \"<span class='warn_font'>WARN: using default attributes for CustomField $fieldName</span><br/>\";\n }\n\n $query = \"SELECT id, name FROM `mantis_custom_field_table`\";\n $result = execQuery($query);\n while ($row = mysql_fetch_object($result)) {\n $fieldList[\"$row->name\"] = $row->id;\n }\n\n $fieldId = $fieldList[$fieldName];\n if (!$fieldId) {\n $query2 = \"INSERT INTO `mantis_custom_field_table` \" .\n \"(`name`, `type` ,`access_level_r`,\" .\n \" `access_level_rw` ,`require_report` ,`require_update` ,`display_report` ,`display_update` ,`require_resolved` ,`display_resolved` ,`display_closed` ,`require_closed` \";\n $query2 .= \", `possible_values`, `default_value`\";\n\n $query2 .= \") VALUES ('$fieldName', '$fieldType', '\" . $attributes[\"access_level_r\"] . \"', '\" .\n $attributes[\"access_level_rw\"] . \"', '\" .\n $attributes[\"require_report\"] . \"', '\" .\n $attributes[\"require_update\"] . \"', '\" .\n $attributes[\"display_report\"] . \"', '\" .\n $attributes[\"display_update\"] . \"', '\" .\n $attributes[\"require_resolved\"] . \"', '\" .\n $attributes[\"display_resolved\"] . \"', '\" .\n $attributes[\"display_closed\"] . \"', '\" .\n $attributes[\"require_closed\"] . \"'\";\n\n $query2 .= \", '$possible_values', '$default_value'\";\n $query2 .= \");\";\n\n #echo \"DEBUG INSERT $fieldName --- query $query2 <br/>\";\n\n $result2 = execQuery($query2);\n $fieldId = mysql_insert_id();\n\n #echo \"custom field '$configId' created.<br/>\";\n } else {\n echo \"<span class='success_font'>INFO: custom field '$configId' already exists.</span><br/>\";\n }\n\n // add to codev_config_table\n Config::getInstance()->setValue($configId, $fieldId, Config::configType_int);\n}"
] | [
"0.6866356",
"0.681878",
"0.676151",
"0.6522969",
"0.6496353",
"0.6493229",
"0.6392022",
"0.63785917",
"0.62884486",
"0.6207397",
"0.5950137",
"0.5714613",
"0.5666781",
"0.54865575",
"0.5420234",
"0.5369768",
"0.5338579",
"0.53100634",
"0.5309191",
"0.5246068",
"0.5223773",
"0.51483655",
"0.51456976",
"0.5131077",
"0.51106495",
"0.50933504",
"0.5066043",
"0.5022579",
"0.50206983",
"0.50176024",
"0.5015234",
"0.49767104",
"0.4973883",
"0.49701142",
"0.49692008",
"0.49567217",
"0.49507096",
"0.49387145",
"0.49157277",
"0.48797807",
"0.48645607",
"0.48639944",
"0.48562428",
"0.48559046",
"0.48460978",
"0.4834725",
"0.48255503",
"0.48234215",
"0.481085",
"0.47995096",
"0.47994936",
"0.4798141",
"0.479557",
"0.4790039",
"0.4781436",
"0.47731465",
"0.47709915",
"0.47651488",
"0.4754275",
"0.4752925",
"0.47521073",
"0.47489077",
"0.47483096",
"0.47405875",
"0.47355023",
"0.47324985",
"0.47306168",
"0.47210395",
"0.47181374",
"0.47174475",
"0.471068",
"0.4708214",
"0.46986222",
"0.46930936",
"0.468831",
"0.4688001",
"0.46824196",
"0.4672551",
"0.46629974",
"0.4659688",
"0.46592668",
"0.4633471",
"0.46323198",
"0.4627127",
"0.4627007",
"0.46156445",
"0.46148455",
"0.46125314",
"0.461183",
"0.46109536",
"0.45920277",
"0.4591067",
"0.45899528",
"0.45892537",
"0.45892537",
"0.45892537",
"0.45892537",
"0.4588992",
"0.4588376",
"0.45852205"
] | 0.84104824 | 0 |
Create the event listener. | public function __construct()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addRequestCreateListener($listener);",
"public function onEvent();",
"private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}",
"public function listener(Listener $listener);",
"protected function setupListeners()\n {\n //\n }",
"function eventRegister($eventName, EventListener $listener);",
"public function listen($event, $listener);",
"private function createStreamCallback()\n {\n $read =& $this->readListeners;\n $write =& $this->writeListeners;\n $this->streamCallback = function ($stream, $flags) use(&$read, &$write) {\n $key = (int) $stream;\n if (\\EV_READ === (\\EV_READ & $flags) && isset($read[$key])) {\n \\call_user_func($read[$key], $stream);\n }\n if (\\EV_WRITE === (\\EV_WRITE & $flags) && isset($write[$key])) {\n \\call_user_func($write[$key], $stream);\n }\n };\n }",
"public function addEventListener(string $eventClass, callable $listener, int $priority = 0): EnvironmentBuilderInterface;",
"public function setupEventListeners()\r\n\t{\r\n\t\t$blueprints = craft()->courier_blueprints->getAllBlueprints();\r\n\t\t$availableEvents = $this->getAvailableEvents();\r\n\r\n\t\t// Setup event listeners for each blueprint\r\n\t\tforeach ($blueprints as $blueprint) {\r\n\t\t\tif (!$blueprint->eventTriggers) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tforeach ($blueprint->eventTriggers as $event) {\r\n\t\t\t\t// Is event currently enabled?\r\n\t\t\t\tif (!isset($availableEvents[$event])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tcraft()->on($event, function(Event $event) use ($blueprint) {\r\n\t\t\t\t\tcraft()->courier_blueprints->checkEventConditions($event, $blueprint);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// On the event that an email is sent, create a successful delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailSent', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery'\r\n\t\t]);\r\n\r\n\t\t// On the event that an email fails to send, create a failed delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailFailed', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery',\r\n\t\t]);\r\n\t}",
"protected function registerListeners()\n {\n }",
"public function listen($listener);",
"public function listenForEvents()\n {\n Event::listen(DummyEvent::class, DummyListener::class);\n\n event(new DummyEvent);\n }",
"public function createEvent()\n {\n return new Event();\n }",
"public function attachEvents();",
"public function attachEvents();",
"public function add_event_handler($event, $callback);",
"function addListener(EventListener $listener): void;",
"public static function initListeners() {\n\t\t\n\t\tif(GO::modules()->isInstalled('files') && class_exists('\\GO\\Files\\Controller\\FolderController')){\n\t\t\t$folderController = new \\GO\\Files\\Controller\\FolderController();\n\t\t\t$folderController->addListener('checkmodelfolder', \"GO\\Projects2\\Projects2Module\", \"createParentFolders\");\n\t\t}\n\t\t\n\t\t\\GO\\Base\\Model\\User::model()->addListener('delete', \"GO\\Projects2\\Projects2Module\", \"deleteUser\");\n\n\t}",
"public function __create()\n {\n $this->eventPath = $this->data('event_path');\n $this->eventName = $this->data('event_name');\n $this->eventInstance = $this->data('event_instance');\n $this->eventFilter = $this->data('event_filter');\n }",
"private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"public function addEventListener($event, $callable){\r\n $this->events[$event] = $callable;\r\n }",
"public function testEventCallBackCreate()\n {\n }",
"public function listeners($event);",
"public function addListener($event, $listener, $priority = 0);",
"public function on($name, $listener, $data = null, $priority = null, $acceptedArgs = null);",
"public function createWatcher();",
"public function __construct()\n\t{\n\t\t$this->delegate = Delegate_1::fromMethod($this, 'onEvent');\n\t}",
"public function init_listeners( $callable ) {\n\t}",
"public static function events();",
"public static function __events () {\n \n }",
"public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}",
"public function addApplicationBuilderListener( \n MyFusesApplicationBuilderListener $listener );",
"public function addListener($eventName, $listener, $priority = 0);",
"public function __construct(){\n\n\t\t\t$this->listen();\n\n\t\t}",
"protected function registerListeners()\n {\n // Login event listener\n #Event::listen('auth.login', function($user) {\n //\n #});\n\n // Logout event subscriber\n #Event::subscribe('Mrcore\\Parser\\Listeners\\MyEventSubscription');\n }",
"public function __construct()\n {\n// global $callback;\n // $this->eventsArr = $eventsArr;\n $this->callback = function () {\n\n // echo \"event: message\\n\"; // for onmessage listener\n echo \"event: ping\\n\";\n $curDate = date(DATE_ISO8601);\n echo 'data: {\"time\": \"' . $curDate . '\"}';\n echo \"\\n\\n\";\n\n while (($event = ServerSentEvents::popEvent()) != null) {\n $m = json_encode($event->contents);\n echo \"event: $event->event\\n\";\n echo \"data: $m\";\n echo \"\\n\\n\";\n }\n // echo \"event: message\\n\";\n // $curDate = date(DATE_ISO8601);\n // echo 'data: {\"message-time\": \"' . $curDate . '\"}';\n // echo \"\\n\\n\";\n // while(true){\n // if ($index != $this->eventsCounter){\n // ServerSentEvents::sendEvent($this->event, $this->eventBody);\n // $index = $this->eventsCounter;\n // }\n\n // sleep(1);\n // }\n };\n\n $this->setupResponse();\n }",
"private function createMyEvents()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout',\n 'onPostDispatchCheckoutSecure'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_Checkout_PreRedirect',\n 'onPreRedirectToPayPal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch_Frontend_PaymentPaypal',\n 'onPreDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_Webhook',\n 'onPaymentPaypalWebhook'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_PlusRedirect',\n 'onPaymentPaypalPlusRedirect'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchAccount'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Javascript',\n 'onCollectJavascript'\n );\n $this->subscribeEvent(\n 'Shopware_Components_Document::assignValues::after',\n 'onBeforeRenderDocument'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Config',\n 'onPostDispatchConfig'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_Order',\n 'onPostDispatchOrder'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_PaymentPaypal',\n 'onPostDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_paypal_plus.rest_client',\n 'onInitRestClient'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Api_PaypalPaymentInstruction',\n 'onGetPaymentInstructionsApiController'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Front_StartDispatch',\n 'onEnlightControllerFrontStartDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch',\n 'onPreDispatchSecure'\n );\n }",
"public static function creating(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATING, $listener, $priority);\n }",
"public function listen();",
"public function listen() {\n $this->source->listen($this->id);\n }",
"public function addEventListener($event, $callback, $weight = null);",
"public function testAddListener()\n {\n // Arrange\n $listenerCalled = false;\n $communicator = new Communicator();\n\n // Act\n $communicator->addListener(function () use (&$listenerCalled) {\n $listenerCalled = true;\n });\n\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertTrue($listenerCalled);\n }",
"public function addListener($name, $listener, $priority = 0);",
"public static function created(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATED, $listener, $priority);\n }",
"public function on($event, $callback){ }",
"public function appendListenerForEvent(string $eventType, callable $listener): callable;",
"public function initEventLogger()\n {\n $dispatcher = static::getEventDispatcher();\n\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }",
"protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function _listener($name) {\n\t\treturn $this->_crud()->listener($name);\n\t}",
"private function listeners()\n {\n foreach ($this['config']['listeners'] as $eventName => $classService) {\n $this['dispatcher']->addListener($classService::NAME, [new $classService($this), 'dispatch']);\n }\n }",
"public function initializeListeners()\n {\n $this->eventsEnabled = false;\n $this->setPreloads();\n $this->setEvents();\n $this->eventsEnabled = true;\n }",
"protected function listenForEvents()\n {\n $callback = function ($event) {\n foreach ($this->logWriters as $writer) {\n $writer->log($event);\n }\n };\n\n $this->events->listen(JobProcessing::class, $callback);\n $this->events->listen(JobProcessed::class, $callback);\n $this->events->listen(JobFailed::class, $callback);\n $this->events->listen(JobExceptionOccurred::class, $callback);\n }",
"protected function registerListeners()\n {\n $this->container['listener.server'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\ServerListener($c['filesystem'], $c['generator.server']);\n });\n\n $this->container['listener.gateway'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\GatewayListener($c['filesystem'], $c['generator.gateway']);\n });\n }",
"public function listeners($eventName);",
"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 requestCreateEvent()\n {\n $ch = self::curlIni('event_new', $this->eventParams);\n\n return $ch;\n }",
"function __construct()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}",
"public function __construct()\n {\n Hook::listen(__CLASS__);\n }",
"function add_listener($hook, $function_name){\n\t\tglobal $listeners;\n\n\t\t$listeners[$hook][] = $function_name;\n\t}",
"public function __construct()\n {\n $this->events = new EventDispatcher();\n }",
"protected function initEventLogger(): void\n {\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $this->dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }",
"public function listen($events, $listener = null): void;",
"public function onCreate($callback)\n {\n $this->listeners[] = $callback;\n return $this;\n }",
"public static function listen() {\n $projectId = \"sunday-1601040613995\";\n\n # Instantiates a client\n $pubsub = new PubSubClient([\n 'projectId' => $projectId\n ]);\n\n # The name for the new topic\n $topicName = 'gmail';\n\n # Creates the new topic\n $topic = $pubsub->createTopic($topicName);\n\n echo 'Topic ' . $topic->name() . ' created.';\n }",
"protected function registerEventListeners()\n {\n Event::listen(Started::class, function (Started $event) {\n $this->progress = $this->output->createProgressBar($event->objects->count());\n });\n\n Event::listen(Imported::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(ImportFailed::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(DeletedMissing::class, function (DeletedMissing $event) {\n $event->deleted->isEmpty()\n ? $this->info(\"\\n No missing users found. None have been soft-deleted.\")\n : $this->info(\"\\n Successfully soft-deleted [{$event->deleted->count()}] users.\");\n });\n\n Event::listen(Completed::class, function (Completed $event) {\n if ($this->progress) {\n $this->progress->finish();\n }\n });\n }",
"public function addBeforeCreateListener(IBeforeCreateListener $listener)\n {\n $this->_lifecyclers[BeanLifecycle::BeforeCreate][] = $listener;\n }",
"protected function registerInputEvents() {\n\t\t$this->getEventLoop()->addEventListener('HANG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->offHook = (bool)$event['value'];\n\n\t\t\t// Trigger specific events for receiver up and down states\n\t\t\t$eventName = $this->isOffHook() ? 'RECEIVER_UP' : 'RECEIVER_DOWN';\n\t\t\t$this->fireEvents($eventName, $event);\n\t\t});\n\n\t\t$this->getEventLoop()->addEventListener('TRIG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->dialling = (bool)$event['value'];\n\t\t});\n\n\t\t// Proxy registration for all EventLoop events to pass them back up to our own listeners\n\t\t$this->getEventLoop()->addEventListener(true, function ($event, $type) {\n\t\t\t// Fire event to our own listeners\n\t\t\t$this->fireEvents($type, $event);\n\t\t});\n\t}",
"public static function creating($callback)\n {\n self::listenEvent('creating', $callback);\n }",
"public function attach(string $event, callable $listener, int $priority = 0): void;",
"public function __construct()\n {\n $this->listnerCode = config('settings.listener_code.DeletingVoucherEventListener');\n }",
"protected function registerEventListener()\n {\n $subscriber = $this->getConfig()->get('audit-trail.subscriber', AuditTrailEventSubscriber::class);\n $this->getDispatcher()->subscribe($subscriber);\n }",
"function listenTo(string $eventName, callable $callback)\n {\n EventManager::register($eventName, $callback);\n }",
"public function attach($identifier, $event, callable $listener, $priority = 1)\n {\n }",
"public function testRegisiterListenerMethodAddsAListener()\n\t{\n\t\t$instance = new Dispatcher();\n\n\t\t$instance->register_listener('some_event', 'my_function');\n\n\t\t$this->assertSame(array('some_event' => array('my_function')), $instance->listeners);\n\t\t$this->assertAttributeSame(array('some_event' => array('my_function')), 'listeners', $instance);\n\t}",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"public static function create($className, array &$extraTabs, $selectedTabId)\r\n {\r\n $createClass = XenForo_Application::resolveDynamicClass($className, 'listener_th');\r\n if (!$createClass) {\r\n throw new XenForo_Exception(\"Invalid listener '$className' specified\");\r\n }\r\n \r\n return new $createClass($extraTabs, $selectedTabId);\r\n }",
"function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}",
"function getEventListeners()\n {\n $listeners = array();\n \n $listener = new Listener($this);\n \n $listeners[] = array(\n 'event' => RoutesCompile::EVENT_NAME,\n 'listener' => array($listener, 'onRoutesCompile')\n );\n\n $listeners[] = array(\n 'event' => GetAuthenticationPlugins::EVENT_NAME,\n 'listener' => array($listener, 'onGetAuthenticationPlugins')\n );\n\n return $listeners;\n }",
"protected static function loadListeners() {\n\t\t\n\t\t// default var\n\t\t$configDir = Config::getOption(\"configDir\");\n\t\t\n\t\t// make sure the listener data exists\n\t\tif (file_exists($configDir.\"/listeners.json\")) {\n\t\t\t\n\t\t\t// get listener list data\n\t\t\t$listenerList = json_decode(file_get_contents($configDir.\"/listeners.json\"), true);\n\t\t\t\n\t\t\t// get the listener info\n\t\t\tforeach ($listenerList[\"listeners\"] as $listenerName) {\n\t\t\t\t\n\t\t\t\tif ($listenerName[0] != \"_\") {\n\t\t\t\t\t$listener = new $listenerName();\n\t\t\t\t\t$listeners = $listener->getListeners();\n\t\t\t\t\tforeach ($listeners as $event => $eventProps) {\n\t\t\t\t\t\t$eventPriority = (isset($eventProps[\"priority\"])) ? $eventProps[\"priority\"] : 0;\n\t\t\t\t\t\tself::$instance->addListener($event, array($listener, $eventProps[\"callable\"]), $eventPriority);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}",
"function __construct()\n\t{\n\t\t$this->events[\"BeforeShowList\"]=true;\n\n\t\t$this->events[\"BeforeProcessList\"]=true;\n\n\t\t$this->events[\"BeforeProcessPrint\"]=true;\n\n\t\t$this->events[\"BeforeShowPrint\"]=true;\n\n\t\t$this->events[\"BeforeQueryList\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeProcessEdit\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessView\"]=true;\n\n\t\t$this->events[\"BeforeShowView\"]=true;\n\n\n\n\n\t\t$this->events[\"ProcessValuesView\"]=true;\n\n\t\t$this->events[\"ProcessValuesEdit\"]=true;\n\n\t\t$this->events[\"CustomAdd\"]=true;\n\n\t\t$this->events[\"CustomEdit\"]=true;\n\n\t\t$this->events[\"ProcessValuesAdd\"]=true;\n\n\t\t$this->events[\"BeforeQueryEdit\"]=true;\n\n\t\t$this->events[\"BeforeQueryView\"]=true;\n\n\n\t\t$this->events[\"BeforeProcessAdd\"]=true;\n\n\n//\tonscreen events\n\t\t$this->events[\"calmonthly_snippet2\"] = true;\n\t\t$this->events[\"calmonthly_snippet1\"] = true;\n\t\t$this->events[\"Monthly_Next_Prev\"] = true;\n\n\t}",
"function defineHandlers() {\n EventsManager::listen('on_rawtext_to_richtext', 'on_rawtext_to_richtext');\n EventsManager::listen('on_daily', 'on_daily');\n EventsManager::listen('on_wireframe_updates', 'on_wireframe_updates');\n }",
"public function createEvents()\n {\n //\n\n return 'something';\n }",
"public static function createInstance()\n {\n return new GridPrintEventManager('ISerializable');\n }",
"public function setUp()\n {\n if ($this->getOption('listener') === true) \n $this->addListener(new BlameableListener($this->_options));\n }",
"public static function created($callback)\n {\n self::listenEvent('created', $callback);\n }",
"public function addListener()\n {\n $dispatcher = $this->wrapper->getDispatcher();\n $listener = new TestListener();\n\n $dispatcher->addListener(PsKillEvents::PSKILL_PREPARE, [$listener, 'onPrepare']);\n $dispatcher->addListener(PsKillEvents::PSKILL_SUCCESS, [$listener, 'onSuccess']);\n $dispatcher->addListener(PsKillEvents::PSKILL_ERROR, [$listener, 'onError']);\n $dispatcher->addListener(PsKillEvents::PSKILL_BYPASS, [$listener, 'onBypass']);\n\n return $listener;\n }",
"public static function addEventListener($event, $listenerClassName) {\n\t\tif (!is_a($listenerClassName, EventListenerInterface::class, TRUE)) {\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\tsprintf(\n\t\t\t\t\t'Invalid CMIS Service EventListener: %s must implement %s',\n\t\t\t\t\t$listenerClassName,\n\t\t\t\t\tEventListenerInterface::class\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tstatic::$eventListeners[get_called_class()][$event][] = $listenerClassName;\n\t}",
"public function makeListener($listener, $wildcard = false): Closure;",
"public function createSubscriber();",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"public function addEventListener($events, $eventListener)\n {\n $this->eventListeners[] = array('events' => $events, 'listener' => $eventListener);\n }",
"function __construct()\r\n\t{\r\n\t\t$this->events[\"BeforeAdd\"]=true;\r\n\r\n\r\n\t}",
"function __construct()\n\t{\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\n\t\t$this->events[\"BeforeShowAdd\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"IsRecordEditable\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}",
"public function startListening();",
"public function addEntryAddedListener(callable $listener): SubscriptionInterface;",
"function __construct()\n\t{\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}",
"function GetEventListeners() {\n $my_file = '{%IEM_ADDONS_PATH%}/dynamiccontenttags/dynamiccontenttags.php';\n $listeners = array ();\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_SENDSTUDIOFUNCTIONS_GENERATEMENULINKS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'SetMenuItems'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_USERAPI_GETPERMISSIONTYPES',\n 'trigger_details' => array (\n 'Interspire_Addons',\n 'GetAddonPermissions',\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_DCT_HTMLEDITOR_TINYMCEPLUGIN',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'DctTinyMCEPluginHook'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_EDITOR_TAG_BUTTON',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'CreateInsertTagButton'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_GETALLTAGS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'getAllTags'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'replaceTagContent'\n ),\n 'trigger_file' => $my_file\n );\n\n return $listeners;\n }",
"function on_creation() {\n $this->init();\n }",
"public function addEventListener(ListenerInterface $eventListener)\n {\n $this->eventListeners[] = $eventListener;\n }"
] | [
"0.65685207",
"0.62875676",
"0.6221792",
"0.6197413",
"0.61627764",
"0.6129312",
"0.6096226",
"0.6056844",
"0.6051069",
"0.6041841",
"0.596228",
"0.596194",
"0.5957539",
"0.59439605",
"0.58821785",
"0.58821785",
"0.5874665",
"0.5864387",
"0.5856076",
"0.584338",
"0.5824244",
"0.5820997",
"0.5791637",
"0.57913053",
"0.57893854",
"0.57716024",
"0.5764599",
"0.5744472",
"0.57417566",
"0.57387024",
"0.5721539",
"0.57068586",
"0.5699624",
"0.56838834",
"0.5675836",
"0.56686187",
"0.5661412",
"0.56601405",
"0.56584114",
"0.5649107",
"0.5638085",
"0.56257224",
"0.56172097",
"0.56064796",
"0.55919635",
"0.5579062",
"0.55775297",
"0.5559927",
"0.5546297",
"0.5546121",
"0.5545537",
"0.5539715",
"0.55295366",
"0.55276597",
"0.5527287",
"0.551302",
"0.5497285",
"0.5495119",
"0.54845315",
"0.54834753",
"0.54812366",
"0.5478984",
"0.5474917",
"0.5471286",
"0.54693574",
"0.54684293",
"0.5466594",
"0.5465012",
"0.5450231",
"0.5450062",
"0.5450001",
"0.544321",
"0.54308116",
"0.54218924",
"0.5389615",
"0.53857446",
"0.5378957",
"0.5378836",
"0.53771406",
"0.5368413",
"0.5360908",
"0.5356685",
"0.5349897",
"0.53419805",
"0.5340825",
"0.53330225",
"0.53323317",
"0.5330117",
"0.53270465",
"0.5326564",
"0.5307367",
"0.52996707",
"0.52980274",
"0.52973336",
"0.52886003",
"0.528163",
"0.5276869",
"0.5269541",
"0.5268173",
"0.5265876",
"0.52629435"
] | 0.0 | -1 |
Definicion de variables para ejecucion del procedimientp | function listarAnalisisPorqueDet(){
$this->procedimiento='gem.ft_analisis_porque_det_sel';
$this->transaccion='GM_DET_SEL';
$this->tipo_procedimiento='SEL';//tipo de transaccion
$this->setParametro('id_analisis_porque','id_analisis_porque','int4');
//Definicion de la lista del resultado del query
$this->captura('id_analisis_porque_det','int4');
$this->captura('id_analisis_porque','int4');
$this->captura('solucion','varchar');
$this->captura('estado_reg','varchar');
$this->captura('porque','varchar');
$this->captura('respuesta','varchar');
$this->captura('fecha_reg','timestamp');
$this->captura('id_usuario_reg','int4');
$this->captura('id_usuario_mod','int4');
$this->captura('fecha_mod','timestamp');
$this->captura('usr_reg','varchar');
$this->captura('usr_mod','varchar');
//Ejecuta la instruccion
$this->armarConsulta();
$this->ejecutarConsulta();
//Devuelve la respuesta
return $this->respuesta;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cl_parametroprogressaoparcial() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"parametroprogressaoparcial\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function main(){\n\t\t\n\t\tif (isset($_REQUEST[\"do\"])){\n\t\t\t$do = $_REQUEST[\"do\"];\n\t\t\tif(Seguridad::getId() == null && $do != \"processFormLogin\" && $do != \"insertUser\" && $do != \"processInsertUser\"){\n\t\t\t\t$do = \"formLogin\";\n\t\t\t}\n\t\t} else\n\t\t\t$do = \"formLogin\";\n\t\t$this->$do(); //Ejecuta el metodo con el nombre que contiene la variable en ese momento\n\t}",
"public function setVariablesEntrada()\r\n\t{\r\n\t\t$request = $this->requestStack->getCurrentRequest();\r\n\t\t\r\n\t\t$this->tipo = $request->get('tipo');\r\n\t\t$this->apoyoTapas = $request->get('apoyoTapas');\r\n\t\t$this->prof = $request->get('prof');\r\n\t\t$this->anchoPanel = $request->get('ancho');\r\n\t\t$this->pisosManual = $request->get('pisosManual');\r\n\t\t$this->perfilIntermedio = $request->get('perfilIntermedio');\r\n\t\t$this->pisosManual7 = $request->get('pisosManual7');\t\t\r\n\t\t$this->chapaPisoAdicional = $request->get('chapaPiso');\r\n\t\t$this->cantChapaPisoAdicional = $request->get('cantAdicional');\r\n\t\t$this->maxAlt = $request->get('maxAlt');\r\n\t\t$this->cantPaneles = $request->get('cantPaneles');\r\n\t\t$this->abiertoCerrado = $request->get('aletaTipo');\r\n\t\t$this->aletaVenA = $request->get('aletaVenA');\r\n\t\t$this->aletaFluA = $request->get('aletaFluA');\r\n\t\t\r\n\t\treturn $this;\r\n\t}",
"public function setPrenom($prenom){\n if(empty($prenom)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n\n //on declare de la variable prenom puis on appelle la varibale prive prenom\n $this->_prenom = $prenom;\n }\n\n public function setMail($mail){\n //Si mail est vide on fait\n if(empty($mail)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable mail puis on appelle la varibale prive mail\n $this->_mail = $mail;\n }\n\n public function setAdresse($adresse){\n //Si adresse est vide on fait\n if(empty($adresse)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n }\n //on declare de la variable adresse puis on appelle la varibale prive adresse\n $this->_adresse = $adresse;\n }\n\n public function setNumero($numero){\n //Si numero est vide on fait\n if(empty($numero)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable numero puis on appelle la varibale prive numero\n $this->_numero = $numero;\n }\n\n public function setMot_de_passe($mdp){\n //Si mdp est vide on fait\n if(empty($mdp)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n }\n //on declare de la varaible mdp puis on appelle la varibale prive mdp\n $this->_mdp = $mdp;\n }\n\n public function getNom(){return $this->_nom;} // on retourne nom\n public function getPrenom(){return $this->_prenom;} // on retourne prenom\n public function getMail(){return $this->_mail;} // on retourne mail\n public function getAdresse(){return $this->_adresse;} // on retourne adresse\n public function getNumero(){return $this->_numero;} // on retourne numero\n public function getMot_de_passe(){return $this->_mdp;} // on retourne mdp\n\n}",
"function cl_iptuconstr() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"iptuconstr\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct(){\n $this->pegaProjetos();\n }",
"public function AggiornaPrezzi(){\n\t}",
"function cl_sau_prochabilitacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_prochabilitacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct() { \n require __DIR__ . '/Config/parameters.php'; //⚠️️ DIR = cste magiq qui retourne chemin du doss ds lequel on est depuis la racine\n $this -> parameters = $parameters; // je mets ça ds ' protected $parameters; '\n /*⚠️️ Au moment où j'instancie cette classe, je récupère le fichier parameters.php, \n et je stocke tous les parameters de mon application dans la propriété $parameters */\n }",
"public function __construct(){\n\t\t\t$this->productoDetalleModelo = new productoDetalleModelo;\n\t\t\t$this->productoFavoritoControlador = new productoFavoritoControlador();\n\t\t\t$this->productoEstrellaControlador = new productoEstrellaControlador();\n\t\t\t$this->productoCarritoControlador = new productoCarritoControlador();\n\t\t}",
"public function __construct(){\n $this->signal= new Commentaire();\n $this->commsign= new Commentaire();\n $this->billet= new ControleurBillet();\n \n }",
"function cl_procprocessodoc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procprocessodoc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n\n\n}",
"function __construct()\r\n\t{\r\n\t\t$this->conexion=new Conect();\r\n\t\t$this->fun=new functions();\r\n\t}",
"protected function initVars() {\n\n\t\t}",
"function cl_itinerarioescolaproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"itinerarioescolaproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __init(){}",
"private function setQuantumVars() {\n \n if (!empty($_REQUEST['controller'])) {\n \n $this->controller = $_REQUEST['controller'];\n \n };\n \n if (!empty($_REQUEST['task'])) {\n \n $this->task = $_REQUEST['task'];\n \n }\n \n if (!empty($_REQUEST['object_id'])) {\n \n $this->object_id = $_REQUEST['object_id'];\n \n }\n \n \n }",
"function getParams()\n {\n global $id;\n global $mode;\n global $data_source;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($data_source)) {\n $this->data_source = $data_source;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"function cl_empreendimento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empreendimento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function setVariables()\n \t{\t\n \t\tif (isset($this->params->plugin)) {\n \t\t\t$this->setPlPath(App::pluginPath(Inflector::humanize($this->params->plugin)));\n \t\t}\n \t\t$this->setController($this->params->controller);\n \t\t$this->setAction($this->params->action);\n \t\t$this->setConstant(Configure::read('App'));\n \t\t\n \t}",
"function __construct()\n {\n $this->view = new View();\n $this->model = new si_cf_parametroModel();\n }",
"function cl_empage() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empage\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function __construct(&$vars) {\r\n }",
"function __construct()\n {\n //domain/controller/action/param\n $breakArr = $this->XuLyURL();\n //Array ( [0] => controller [1] => action [2] => param1 [3] => param2)\n\n \n //Xu ly controller, kiem tra form co ton tai hay khong moi require\n if(file_exists(\"./mvc/controllers/\".$breakArr[0].\".php\")){\n $this->controller = $breakArr[0];\n unset($breakArr[0]);//sau khi da lay dc controller thi huy mang di -> tao param\n }\n require_once \"./mvc/controllers/\".$this->controller.\".php\";\n //sau khi đã tạo connect controller và extends, khởi tạo đối tượng controller là controller hiện tại\n $this->controller = new $this->controller;\n \n //Xu ly action, kiem tra array[1]-action cua class controller\n if(isset($breakArr[1])){\n //kiem tra ham ton tai, tham so la object or class(controller) va function(action)\n //kiem tra tra ve boolean\n if(method_exists($this->controller, $breakArr[1])){\n $this->action = $breakArr[1];\n\n }\n //bo ra ngoai dieu kien kiem tra ton tai, neu truong hop action khong ton tai action khong duoc thay the nen khong unset dc\n unset($breakArr[1]);//sau khi da lay dc controller thi huy mang di -> tao param\n }\n\n\n //Xu ly param\n //goi param, (? = neu) mang ton tai thi param = array values(mang)\n // (: = nguoc lai thi) param rong~\n $this->param = $breakArr?array_values($breakArr):[];\n call_user_func_array([$this->controller,$this->action], $this->param);\n }",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $data_source;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($data_source)) {\r\n $this->data_source=$data_source;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"function envios_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"envios\";\n\t\t$this->campoClave=\"IdEnvio\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEnvio\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdMail\",2);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Envio\",3);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Descripcion\",4);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"TablaDatosExtras\",5);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"CondicionDatosExtras\",6);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaCreacion\",7);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaModificacion\",8);\n$this->agregarVariable2($v);\n\n\t}",
"public function _construct(){\n\t\t$this->marque = 'Peugeot';\n\t\t$this->couleur = 'blanc';\n\t\t$this->vitesse = 50;\n\t}",
"function getParams() {\n global $id;\n global $file;\n global $teg;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n\n\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n}",
"function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"private function load_variables() : void {\n\t\t$this->today = new \\DateTime( 'NOW' );\n\t\t$this->start_date = new \\DateTime( FTW_START_DATE );\n\t\t$this->completion_date = new \\DateTime( FTW_COMPLETION_DATE );\n\t}",
"function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"function asignar_valores(){\n\t\t$this->tabla=$_POST['tabla'];\n\t\t$this->pertenece=$_POST['pertenece'];\n\t\t$this->asunto=$_POST['asunto'];\n\t\t$this->descripcion=$_POST['contenido'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->hora=$_POST['hora'];\n\t\t$this->fechamod=$_POST['fechamod'];\n\t}",
"function cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct($medicion, $nombreIOT, $nombreVariable, $resultado,$asunto,$medicion2)\n {\n $this->medicion = $medicion;\n $this->nombreIOT = $nombreIOT;\n $this->nombreVariable = $nombreVariable;\n $this->resultado = $resultado;\n $this->asunto = $asunto;\n $this->medicion2 = $medicion2; \n }",
"public function obtener()\n {\n }",
"function __construct(){\n $this->informacion = new Info();\n $this->firebase = new FirebaseController();\n $this->storage = new StorageController();\n }",
"function __construct (){\n\t\t}",
"function __construct() {\n require_once Parametre::$MVC_BASE.'/bak/modules/mod_commentaire/vue/Vue_commentaire.php';\n require_once Parametre::$MVC_BASE.'/bak/modules/mod_commentaire/model/Dao_commentaire.php';\n require_once Parametre::$MVC_BASE.'/entities/Commentaire.php';\n require_once Parametre::$MVC_BASE.'/entities/Jeton.php';\n require_once Parametre::$MVC_BASE.'/helpers/Vue_generique.php';\n require_once Parametre::$MVC_BASE.'/helpers/DaoJeton.php';\n \n\n }",
"function __construct(){\n $this->toko = new M_Toko();\n $this->produk = new M_Produk(); //variabel model merupakan objek baru yang dibuat dari class model\n }",
"function __construct() {\r\n\t\t$this -> modelo = new facturaBss();\r\n\t\t$this -> modeloFactura = new facturaPdfBss();\r\n\t}",
"private function mprofil() {\n\t\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t\t$this->_ctrlAdmin->userProfil();\n\t}",
"function main()\t{\n\t\t$obj_new_film= new film_service();\n\t\t$obj_new_film->save_film();\n\n\t\t$this->resultat= $obj_new_film->resultat;\n\t}",
"private function input(){\n $this->params['controller_name'] = $this->ask('Controller name');\n $this->params['crud_url'] = $this->ask('CRUD url');\n $this->params['model_name'] = $this->ask('Model name');\n $this->params['table_name'] = $this->ask('Table name');\n $this->params['author'] = env('PACKAGE_AUTHOR');\n }",
"public function __construct() {\n self::$presidencia=new Camara(\"CamaraPresidencia\");\n self::$alumnos1=new Camara(\"CamaraAlumnos1\");\n self::$alumnos2=new Camara(\"CamaraAlumnos2\");\n }",
"public function __construct(){\n$this->acCodigo_area = \"\";\n$this->acCodificacion = \"\";\n$this->acUbicacion = \"\";\n}",
"public function __construct()\n {\n $this->view = new \\stdClass();\n $this->auth = new AuthUser();\n\n // Variável que recebe as configurações padrões da aplicação\n $this->config = self::findDataSettings();\n\n // Inicializando flash mensagem da aplicação\n\n // Mensagem padrão para operações de sucesso\n if (Session::getSession('success')) {\n $this->success = Session::getSession('success');\n Session::destroySession('success');\n }//end if\n // Mensagem padrão para operações de erros\n if (Session::getSession('errors')) {\n $this->errors = Session::getSession('errors');\n Session::destroySession('errors');\n }//end if\n // Mensagem padrão para operações de info\n if (Session::getSession('info')) {\n $this->info = Session::getSession('info');\n Session::destroySession('info');\n }//end if\n // Captura padrão de dados inseridos nos campos dos formulários\n if (Session::getSession('inputs')) {\n $this->inputs = Session::getSession('inputs');\n Session::destroySession('inputs');\n }//endif\n }",
"function cl_disbancoprocesso() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"disbancoprocesso\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function __construct(){\n\t\t// nowt much...\n\t}",
"function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->etiqueta=$_POST['etiqueta'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->icono=$_POST['icono'];\n\t}",
"final function velcom(){\n }",
"public function __construct(public string $nombre, public int $precio, public bool $disponible){}",
"public function __construct() {\n $this->miConexion = Conexion::singleton();\n $this->retorno = new stdClass();\n }",
"public function __construct()\n {\n $this->model= new Estudiante;\n $this->curso= new Curso;\n $this->usuario= new Usuario;\n $this->centrointeres= new Centrointeres;\n $this->clase= new Clase;\n $this->grado = new Grado;\n $this->asistencia= new Asistencia;\n }",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"public function __construct() {\n\n\t\t$this->contenuto=array();\n\t\t$this->quantita=array();\n }",
"function cl_rhsolicita() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhsolicita\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct(){\n \n$this->messages = new Messages();\n$this->form = new CalcCredForm();\n$this->result = new CalcCredResult();\n}",
"function cl_db_projetoscliente() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_projetoscliente\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct()\n {\n if(isset($_GET['correo'])){$this->Correo=$_GET['correo'];}\n if(isset($_GET['pregunta'])){$this->Pregunta=$_GET['pregunta'];}\n if(isset($_GET['respuesta'])){$this->Respuesta=$_GET['respuesta'];}\n }",
"function __construct()\n\t{\n \n\t}",
"public function __construct()\n {\n if (4 == func_num_args()) {\n $this->mvaNumber = func_get_arg(0);\n $this->prokura = func_get_arg(1);\n $this->signature = func_get_arg(2);\n $this->report = func_get_arg(3);\n }\n }",
"public function helper()\n\t{\n\t\n\t}",
"function cl_habitcandidatointeresseprograma() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"habitcandidatointeresseprograma\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct(){\r\n \r\n$this->messages = new Messages();\r\n$this->form = new CalcCredForm();\r\n$this->result = new CalcCredResult();\r\n}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"function cl_avaliacaoestruturanota() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"avaliacaoestruturanota\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_evolucaodividaativa() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"evolucaodividaativa\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function run()\n {\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"1\",\n 'variable_etiqueta' => \"Activo\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"2\",\n 'variable_etiqueta' => \"Inactivo\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"3\",\n 'variable_etiqueta' => \"Expirado\",\n ]);\n \n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"4\",\n 'variable_etiqueta' => \"Eliminado\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"5\",\n 'variable_etiqueta' => \"Bloqueado\",\n ]);\n }",
"function __construct() {\n \n self::setQuantumVars();\n \n self::setAutoLoader();\n \n self::initActiveRecord();\n \n self::initSmarty();\n \n self::launcher();\n \n self::output();\n \n }",
"function asignar_valores(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->cedula=$_POST['cedula'];\n\t\t$this->correo=$_POST['correo'];\n\t}",
"protected function __construct(){}",
"protected function __construct(){}",
"protected function __construct(){}",
"function cl_tfd_situacaopedidotfd() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_situacaopedidotfd\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t// ben duoi nay se la cac logic cua __construct lop con ma chung ta can dinh nghia - xu ly\n\t}",
"function cl_condicionante() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"condicionante\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }"
] | [
"0.63526833",
"0.6159355",
"0.61329705",
"0.6124346",
"0.6103556",
"0.60986793",
"0.6097274",
"0.6054769",
"0.6051147",
"0.6047721",
"0.6036274",
"0.60013384",
"0.59993804",
"0.59993804",
"0.59993804",
"0.59993804",
"0.59989494",
"0.59909284",
"0.5987163",
"0.59816426",
"0.5973004",
"0.5971036",
"0.5963146",
"0.5959116",
"0.5946435",
"0.59290695",
"0.59252053",
"0.59157056",
"0.59097385",
"0.58946866",
"0.58862",
"0.58851963",
"0.5880698",
"0.58773166",
"0.5867925",
"0.5867925",
"0.5867925",
"0.586581",
"0.58618575",
"0.5859527",
"0.5859399",
"0.58581567",
"0.58562255",
"0.5848095",
"0.584619",
"0.5839964",
"0.5835839",
"0.58181226",
"0.58143747",
"0.5809574",
"0.5805999",
"0.580155",
"0.5801457",
"0.5800905",
"0.5792924",
"0.5792709",
"0.5790674",
"0.57905143",
"0.578118",
"0.5777767",
"0.5773153",
"0.5771627",
"0.5771627",
"0.57660025",
"0.57641166",
"0.5763925",
"0.575922",
"0.5758364",
"0.57577777",
"0.5757388",
"0.575104",
"0.57508975",
"0.57501346",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.5749961",
"0.57471424",
"0.57458925",
"0.5743291",
"0.5740247",
"0.5736704",
"0.5735068",
"0.5735068",
"0.5735068",
"0.57342553",
"0.5730737",
"0.57257175"
] | 0.0 | -1 |
Definicion de variables para ejecucion del procedimiento | function insertarAnalisisPorqueDet(){
$this->procedimiento='gem.ft_analisis_porque_det_ime';
$this->transaccion='GM_DET_INS';
$this->tipo_procedimiento='IME';
//Define los parametros para la funcion
$this->setParametro('id_analisis_porque','id_analisis_porque','int4');
$this->setParametro('solucion','solucion','varchar');
$this->setParametro('estado_reg','estado_reg','varchar');
$this->setParametro('porque','porque','varchar');
$this->setParametro('respuesta','respuesta','varchar');
//Ejecuta la instruccion
$this->armarConsulta();
$this->ejecutarConsulta();
//Devuelve la respuesta
return $this->respuesta;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setVariablesEntrada()\r\n\t{\r\n\t\t$request = $this->requestStack->getCurrentRequest();\r\n\t\t\r\n\t\t$this->tipo = $request->get('tipo');\r\n\t\t$this->apoyoTapas = $request->get('apoyoTapas');\r\n\t\t$this->prof = $request->get('prof');\r\n\t\t$this->anchoPanel = $request->get('ancho');\r\n\t\t$this->pisosManual = $request->get('pisosManual');\r\n\t\t$this->perfilIntermedio = $request->get('perfilIntermedio');\r\n\t\t$this->pisosManual7 = $request->get('pisosManual7');\t\t\r\n\t\t$this->chapaPisoAdicional = $request->get('chapaPiso');\r\n\t\t$this->cantChapaPisoAdicional = $request->get('cantAdicional');\r\n\t\t$this->maxAlt = $request->get('maxAlt');\r\n\t\t$this->cantPaneles = $request->get('cantPaneles');\r\n\t\t$this->abiertoCerrado = $request->get('aletaTipo');\r\n\t\t$this->aletaVenA = $request->get('aletaVenA');\r\n\t\t$this->aletaFluA = $request->get('aletaFluA');\r\n\t\t\r\n\t\treturn $this;\r\n\t}",
"private function setQuantumVars() {\n \n if (!empty($_REQUEST['controller'])) {\n \n $this->controller = $_REQUEST['controller'];\n \n };\n \n if (!empty($_REQUEST['task'])) {\n \n $this->task = $_REQUEST['task'];\n \n }\n \n if (!empty($_REQUEST['object_id'])) {\n \n $this->object_id = $_REQUEST['object_id'];\n \n }\n \n \n }",
"function cl_parametroprogressaoparcial() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"parametroprogressaoparcial\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function setVariables()\n \t{\t\n \t\tif (isset($this->params->plugin)) {\n \t\t\t$this->setPlPath(App::pluginPath(Inflector::humanize($this->params->plugin)));\n \t\t}\n \t\t$this->setController($this->params->controller);\n \t\t$this->setAction($this->params->action);\n \t\t$this->setConstant(Configure::read('App'));\n \t\t\n \t}",
"public function main(){\n\t\t\n\t\tif (isset($_REQUEST[\"do\"])){\n\t\t\t$do = $_REQUEST[\"do\"];\n\t\t\tif(Seguridad::getId() == null && $do != \"processFormLogin\" && $do != \"insertUser\" && $do != \"processInsertUser\"){\n\t\t\t\t$do = \"formLogin\";\n\t\t\t}\n\t\t} else\n\t\t\t$do = \"formLogin\";\n\t\t$this->$do(); //Ejecuta el metodo con el nombre que contiene la variable en ese momento\n\t}",
"private function input(){\n $this->params['controller_name'] = $this->ask('Controller name');\n $this->params['crud_url'] = $this->ask('CRUD url');\n $this->params['model_name'] = $this->ask('Model name');\n $this->params['table_name'] = $this->ask('Table name');\n $this->params['author'] = env('PACKAGE_AUTHOR');\n }",
"private function load_variables() : void {\n\t\t$this->today = new \\DateTime( 'NOW' );\n\t\t$this->start_date = new \\DateTime( FTW_START_DATE );\n\t\t$this->completion_date = new \\DateTime( FTW_COMPLETION_DATE );\n\t}",
"protected function initVars() {\n\n\t\t}",
"protected function variablesAssign()\n {\n $app = $this->app;\n $this->request = $app['request'];\n $this->session = $app['session'];\n $this->template = $app['template'];\n $this->theme = $app['theme'];\n\n // Set Request Format\n switch ($this->request->getRequestFormat()) {\n case 'json':\n $this->format = 'json';\n break;\n\n case 'xml':\n $this->format = 'xml';\n break;\n\n case 'csv':\n $this->format = 'csv';\n break;\n\n case 'html':\n default:\n $this->format = 'html';\n break;\n }\n }",
"function getParams()\n {\n global $id;\n global $mode;\n global $data_source;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($data_source)) {\n $this->data_source = $data_source;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"function asignar_valores(){\n\t\t$this->tabla=$_POST['tabla'];\n\t\t$this->pertenece=$_POST['pertenece'];\n\t\t$this->asunto=$_POST['asunto'];\n\t\t$this->descripcion=$_POST['contenido'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->hora=$_POST['hora'];\n\t\t$this->fechamod=$_POST['fechamod'];\n\t}",
"public function run()\n {\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"1\",\n 'variable_etiqueta' => \"Activo\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"2\",\n 'variable_etiqueta' => \"Inactivo\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"3\",\n 'variable_etiqueta' => \"Expirado\",\n ]);\n \n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"4\",\n 'variable_etiqueta' => \"Eliminado\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"5\",\n 'variable_etiqueta' => \"Bloqueado\",\n ]);\n }",
"protected function setAcoVariables() {\n\n $this->set('plugin',\n isset($this->params['named']['plugin']) ? $this->params['named']['plugin'] : '');\n $this->set('controller_name', $this->params['named']['controller']);\n $this->set('action', $this->params['named']['action']);\n }",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"public function setPrenom($prenom){\n if(empty($prenom)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n\n //on declare de la variable prenom puis on appelle la varibale prive prenom\n $this->_prenom = $prenom;\n }\n\n public function setMail($mail){\n //Si mail est vide on fait\n if(empty($mail)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable mail puis on appelle la varibale prive mail\n $this->_mail = $mail;\n }\n\n public function setAdresse($adresse){\n //Si adresse est vide on fait\n if(empty($adresse)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n }\n //on declare de la variable adresse puis on appelle la varibale prive adresse\n $this->_adresse = $adresse;\n }\n\n public function setNumero($numero){\n //Si numero est vide on fait\n if(empty($numero)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable numero puis on appelle la varibale prive numero\n $this->_numero = $numero;\n }\n\n public function setMot_de_passe($mdp){\n //Si mdp est vide on fait\n if(empty($mdp)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n }\n //on declare de la varaible mdp puis on appelle la varibale prive mdp\n $this->_mdp = $mdp;\n }\n\n public function getNom(){return $this->_nom;} // on retourne nom\n public function getPrenom(){return $this->_prenom;} // on retourne prenom\n public function getMail(){return $this->_mail;} // on retourne mail\n public function getAdresse(){return $this->_adresse;} // on retourne adresse\n public function getNumero(){return $this->_numero;} // on retourne numero\n public function getMot_de_passe(){return $this->_mdp;} // on retourne mdp\n\n}",
"public function __construct() { \n require __DIR__ . '/Config/parameters.php'; //⚠️️ DIR = cste magiq qui retourne chemin du doss ds lequel on est depuis la racine\n $this -> parameters = $parameters; // je mets ça ds ' protected $parameters; '\n /*⚠️️ Au moment où j'instancie cette classe, je récupère le fichier parameters.php, \n et je stocke tous les parameters de mon application dans la propriété $parameters */\n }",
"function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->etiqueta=$_POST['etiqueta'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->icono=$_POST['icono'];\n\t}",
"function asignar_valores(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->cedula=$_POST['cedula'];\n\t\t$this->correo=$_POST['correo'];\n\t}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n\n\n}",
"function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"function envios_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"envios\";\n\t\t$this->campoClave=\"IdEnvio\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEnvio\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdMail\",2);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Envio\",3);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Descripcion\",4);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"TablaDatosExtras\",5);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"CondicionDatosExtras\",6);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaCreacion\",7);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaModificacion\",8);\n$this->agregarVariable2($v);\n\n\t}",
"function cl_procprocessodoc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procprocessodoc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}",
"public function __construct(){\n $this->pegaProjetos();\n }",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $data_source;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($data_source)) {\r\n $this->data_source=$data_source;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n\n $path = explode('\\\\', get_class($this->model));\n\n $this->vars['task_id'] = array_pop($path) . '-' . $this->model->{$this->taskKey};\n $this->vars['task_name'] = $this->model->{$this->taskName};\n\n $this->vars['app_name'] = HarvestSettings::get('app_name', 'Harvest');\n $this->vars['app_url'] = Request::url();\n }",
"function cl_iptuconstr() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"iptuconstr\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_itinerarioescolaproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"itinerarioescolaproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_sau_prochabilitacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_prochabilitacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $file;\n global $teg;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n\n\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n}",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName() . '[]';\n\n $this->vars['model'] = $this->model;\n $this->vars['subscribers'] = Subscriber::all()->lists('count', 'id');\n if (!empty($this->getLoadValue())) {\n $this->vars['value'] = $this->getLoadValue();\n } else {\n $this->vars['value'] = [];\n }\n\n }",
"function asignar_valores(){\n $this->nombre=$_POST['nombre'];\n $this->prioridad=$_POST['prioridad'];\n $this->etiqueta=$_POST['etiqueta'];\n $this->descripcion=$_POST['descripcion'];\n $this->claves=$_POST['claves'];\n $this->tipo=$_POST['tipo'];\n }",
"function cl_empreendimento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empreendimento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"protected function init() {\n switch ($this->requestType) {\n case 'get':\n $this->getData();\n break;\n\t\t\t\t\n\t\t\tcase 'sendTesteEmail':\n $this->sendTesteEmail();\n break;\n\t\t\t\t\n\t\t\tcase 'sendCreatedIndicationEmail':\n $this->sendCreatedIndicationEmail();\n break;\n }\n }",
"public function __construct(){\n $this->signal= new Commentaire();\n $this->commsign= new Commentaire();\n $this->billet= new ControleurBillet();\n \n }",
"function storeParameters()\n {\n }",
"private function setup_variables() {\n\t\t$this->file = __FILE__;\n\t\t$this->basename = plugin_basename( $this->file );\n\t\t$this->plugin_dir = plugin_dir_path( $this->file );\n\t\t$this->plugin_url = plugin_dir_url( $this->file );\n\t\t$this->cron_frequency = 'twicedaily';\n\t}",
"function __construct()\r\n\t{\r\n\t\t$this->conexion=new Conect();\r\n\t\t$this->fun=new functions();\r\n\t}",
"function __construct(){\n $this->informacion = new Info();\n $this->firebase = new FirebaseController();\n $this->storage = new StorageController();\n }",
"function asignar_valores2(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->modelo=$_POST['modelo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t}",
"function __construct()\n {\n $this->view = new View();\n $this->model = new si_cf_parametroModel();\n }",
"public function __construct(){\n$this->acCodigo_area = \"\";\n$this->acCodificacion = \"\";\n$this->acUbicacion = \"\";\n}",
"public function __construct()\n {\n if(isset($_GET['correo'])){$this->Correo=$_GET['correo'];}\n if(isset($_GET['pregunta'])){$this->Pregunta=$_GET['pregunta'];}\n if(isset($_GET['respuesta'])){$this->Respuesta=$_GET['respuesta'];}\n }",
"public function __construct()\n {\n $this->view = new \\stdClass();\n $this->auth = new AuthUser();\n\n // Variável que recebe as configurações padrões da aplicação\n $this->config = self::findDataSettings();\n\n // Inicializando flash mensagem da aplicação\n\n // Mensagem padrão para operações de sucesso\n if (Session::getSession('success')) {\n $this->success = Session::getSession('success');\n Session::destroySession('success');\n }//end if\n // Mensagem padrão para operações de erros\n if (Session::getSession('errors')) {\n $this->errors = Session::getSession('errors');\n Session::destroySession('errors');\n }//end if\n // Mensagem padrão para operações de info\n if (Session::getSession('info')) {\n $this->info = Session::getSession('info');\n Session::destroySession('info');\n }//end if\n // Captura padrão de dados inseridos nos campos dos formulários\n if (Session::getSession('inputs')) {\n $this->inputs = Session::getSession('inputs');\n Session::destroySession('inputs');\n }//endif\n }",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"function cl_empage() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empage\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_disbancoprocesso() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"disbancoprocesso\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"private function mprofil() {\n\t\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t\t$this->_ctrlAdmin->userProfil();\n\t}",
"private function __construct() {\r\n\t\t// proc will grab a different column of settings values.\r\n\t\t$testing = (int) $this->config()->testing;\r\n\t\t\r\n\t\t$sql = \"CALL settings_get($testing)\";\r\n $rs = $this->query($sql);\r\n \r\n if ($this->hasError()) {\r\n error_log($this->getError());\r\n $this->error = \"Unable to load settings\";\r\n }\r\n \r\n if ($rs->hasRecords()) {\r\n\t\t\twhile ($row = $rs->fetchArray()) {\r\n\t\t\t\t$this->{$row['label']} = $row['value'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Handle secure cookies\r\n\t\t\tif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {\r\n\t\t\t\t$this->cookiesecure = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function prepare():void\n {\n\n // Get IP address\n if ($this->reg_ip == '') { \n $this->reg_ip = IpAddress::get();\n }\n\n // Get user-agent\n if ($this->reg_user_agent == '') { \n $this->reg_user_agent = UserAgent::get();\n }\n\n // Lookup ip address\n if ($this->reg_country == '' && $this->reg_ip != '') { \n $res = LookupIP::query($this->reg_ip);\n foreach ($res as $key => $value) {\n $key = 'reg_' . $key; \n $this->$key = $value;\n }\n }\n\n }",
"public function pesquisarParteInteressadaAction()\n {\n }",
"public function AggiornaPrezzi(){\n\t}",
"public function asignarNombre($nombre){\n$this->nombre = self::mensaje().$nombre;\n}",
"function __construct()\n {\n //domain/controller/action/param\n $breakArr = $this->XuLyURL();\n //Array ( [0] => controller [1] => action [2] => param1 [3] => param2)\n\n \n //Xu ly controller, kiem tra form co ton tai hay khong moi require\n if(file_exists(\"./mvc/controllers/\".$breakArr[0].\".php\")){\n $this->controller = $breakArr[0];\n unset($breakArr[0]);//sau khi da lay dc controller thi huy mang di -> tao param\n }\n require_once \"./mvc/controllers/\".$this->controller.\".php\";\n //sau khi đã tạo connect controller và extends, khởi tạo đối tượng controller là controller hiện tại\n $this->controller = new $this->controller;\n \n //Xu ly action, kiem tra array[1]-action cua class controller\n if(isset($breakArr[1])){\n //kiem tra ham ton tai, tham so la object or class(controller) va function(action)\n //kiem tra tra ve boolean\n if(method_exists($this->controller, $breakArr[1])){\n $this->action = $breakArr[1];\n\n }\n //bo ra ngoai dieu kien kiem tra ton tai, neu truong hop action khong ton tai action khong duoc thay the nen khong unset dc\n unset($breakArr[1]);//sau khi da lay dc controller thi huy mang di -> tao param\n }\n\n\n //Xu ly param\n //goi param, (? = neu) mang ton tai thi param = array values(mang)\n // (: = nguoc lai thi) param rong~\n $this->param = $breakArr?array_values($breakArr):[];\n call_user_func_array([$this->controller,$this->action], $this->param);\n }",
"function __construct(&$vars) {\r\n }",
"public function __construct()\n {\n $this->model= new Estudiante;\n $this->curso= new Curso;\n $this->usuario= new Usuario;\n $this->centrointeres= new Centrointeres;\n $this->clase= new Clase;\n $this->grado = new Grado;\n $this->asistencia= new Asistencia;\n }",
"public function __init(){}",
"public function __construct(){\n\t\t\t$this->productoDetalleModelo = new productoDetalleModelo;\n\t\t\t$this->productoFavoritoControlador = new productoFavoritoControlador();\n\t\t\t$this->productoEstrellaControlador = new productoEstrellaControlador();\n\t\t\t$this->productoCarritoControlador = new productoCarritoControlador();\n\t\t}",
"function cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n\n $this->vars['model'] = $this->model;\n $this->vars['category'] = Kategory::where(\"is_active\", \"1\")->lists('name', 'id');\n if (!empty($this->getLoadValue())) {\n $a= $this->vars['value'] = $this->getLoadValue();\n } else {\n $a= $this->vars['value'] = [];\n }\n }",
"public function __construct(){\n \n$this->messages = new Messages();\n$this->form = new CalcCredForm();\n$this->result = new CalcCredResult();\n}",
"public function finish_setting_parameters()\n {\n $this->set_variable( 'parameters', $this->parameters );\n }",
"function __construct() {\n $this->conx = Connexion::getconnexion();\n }",
"public function __construct()\n {\n // $this->invoice = $invoice;\n // $this->quiz = $quiz;\n }",
"public function __construct() {\n $this->miConexion = Conexion::singleton();\n $this->retorno = new stdClass();\n }",
"function __construct() {\n \n self::setQuantumVars();\n \n self::setAutoLoader();\n \n self::initActiveRecord();\n \n self::initSmarty();\n \n self::launcher();\n \n self::output();\n \n }",
"public function __construct(){\r\n \r\n$this->messages = new Messages();\r\n$this->form = new CalcCredForm();\r\n$this->result = new CalcCredResult();\r\n}",
"function main()\t{\n\t\t$obj_new_film= new film_service();\n\t\t$obj_new_film->save_film();\n\n\t\t$this->resultat= $obj_new_film->resultat;\n\t}",
"protected function __construct(){\n\t\t$this->inputs();\n\t}",
"public function obtener()\n {\n }",
"function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->valor_vehiculo=$_POST['valor_vehiculo'];\n\t\t$this->saldo=$_POST['saldo'];\n\t\t$this->valor_inicial=$_POST['valor_inicial'];\n\t\t$this->comision=$_POST['comision'];\n\t\t$this->plazo=$_POST['plazo'];\n\t\t$this->cuotas=$_POST['cuotas'];\n\t\t$this->total=$_POST['total'];\n\t}",
"public function getSetVariables() {}",
"public function prepareVars()\n {\n $this->vars['defaultCurrency'] = $this->defaultCurrency;\n $this->vars['defaultValue'] = $this->getPriceValue($this->defaultCurrency->id);\n $this->vars['currencies'] = Currency::orderBy('sort_order', 'ASC')->get();\n $this->vars['field'] = $this->formField;\n }",
"public function __construct() {\n\n\t\t$this->contenuto=array();\n\t\t$this->quantita=array();\n }",
"public function __construct() {\r\n $this->template = new Template();\r\n $this->settingsModel = new settingsModel();\r\n $this->dbUtil = new DBUtil();\r\n $this->combovalue = $this->settingsModel->populatetypeValues();\r\n $this->logger = Logger::getLogger(\"========= Metadata Controller =========== \");\r\n }",
"function cl_db_projetoscliente() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_projetoscliente\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function recuperarDatos(){\r\n\t\t\t\t$this->objFunc=$this->create('MODEmpresa');\r\n\t\t\t\t$objetoFuncion = $this->create('MODEmpresa');\r\n\t\t\t\t$this->res=$this->objFunc->insertarEmpresa($this->objParam);\t//esta bien\t\t\t\r\n\t\t\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\t\t}",
"public function __construct(public string $nombre, public int $precio, public bool $disponible){}",
"public function setUpDefaultVars() {\n $this->response['numAttempts'] = new qti_variable('single', 'integer', array('value' => 0));\n $this->response['duration'] = new qti_variable('single', 'float', array('value' => 0));\n $this->outcome['completionStatus'] = new qti_variable('single', 'identifier', array('value' => 'not_attempted'));\n \n // TODO: We have this to get around mistakes (?) in the example QTI - should we?\n $this->outcome['completion_status'] = $this->outcome['completionStatus'];\n }",
"function __construct() { \r\n\t\t\t\t$this->id;\r\n\t\t\t\t$this->cpf;\r\n\t\t\t\t$this->email;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}",
"public function __construct() {\n $this->servidor = null;\n $this->dbname = null;\n $this->usuario = null;\n $this->senha = null;\n $this->porta = null;\n }",
"function init()\r\n\t{\r\n\t\t$projet = unserialize($_SESSION['session']->projet);\r\n\t\t$this->view->nom_complet = $projet->nom_complet;\r\n\t\t$this->view->desc_projet = $projet->description_projet;\r\n\t\t$this->view->employe = unserialize($_SESSION['session']->account)->account_lid;\r\n\t}",
"public function __construct($medicion, $nombreIOT, $nombreVariable, $resultado,$asunto,$medicion2)\n {\n $this->medicion = $medicion;\n $this->nombreIOT = $nombreIOT;\n $this->nombreVariable = $nombreVariable;\n $this->resultado = $resultado;\n $this->asunto = $asunto;\n $this->medicion2 = $medicion2; \n }",
"function cl_evolucaodividaativa() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"evolucaodividaativa\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct() {\n \t\n\t \tinclude('../conexion/datos.php');\n \n\t $this->id_modulo = 14;\n\t $this->NameCookieApp = $NomCookiesApp;\n\t //$this->permisosInst = new permisosController();\n\t }",
"function _prepare(){\t\r\r\n\t\t// init array\r\r\n\t\t$this->options = array();\t\r\r\n\t\t// to be saved vars\r\r\n\t\t$vars = array('active_modules','active_plugins','setting');\r\r\n\t\t// set\r\r\n\t\tforeach($vars as $var){\r\r\n\t\t\t// var\r\r\n\t\t\t$this->options[$var] = $this->{$var};\r\r\n\t\t}\t\r\r\n\t}",
"public function _construct(){\n\t\t$this->marque = 'Peugeot';\n\t\t$this->couleur = 'blanc';\n\t\t$this->vitesse = 50;\n\t}",
"function __construct ($concesionario){\r\n $this->ciudad=$ciudad;\r\n $this->vehiculos=$vehiculos;\r\n }",
"public function saveParams()\r\n\t{\r\n\t\tforeach ($this->param_names as $param_name)\r\n\t\t{\r\n\t\t\t$funcname = 'get'.$param_name;\r\n\t\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname());\r\n\t\t\telse\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname(), false, null, $this->getIdshop());\r\n\t\t}\r\n\t}",
"function __construct()\n\t{\n\t\t// $this->cust_code = $cust_code;\n\t\t// $this->fecha_interaccion = $fecha_interaccion;\n\t\t// $this->tipo_interaccion = $tipo_interaccion;\n\t\t// $this->time_stamp = $time_stamp;\n }",
"public function getParameters()\n\t{\n\n\t}",
"public function getParameters()\n\t{\n\n\t}",
"function __construct(){\n $this->toko = new M_Toko();\n $this->produk = new M_Produk(); //variabel model merupakan objek baru yang dibuat dari class model\n }"
] | [
"0.63395226",
"0.6269071",
"0.6237446",
"0.61952",
"0.61481035",
"0.6063121",
"0.6015433",
"0.6007989",
"0.6007334",
"0.59933347",
"0.59633636",
"0.59626824",
"0.59582067",
"0.5950034",
"0.5950034",
"0.5950034",
"0.5950034",
"0.5941078",
"0.5935831",
"0.5930651",
"0.59009725",
"0.5885293",
"0.58826584",
"0.58809745",
"0.58687097",
"0.5867557",
"0.58556044",
"0.58354276",
"0.58244354",
"0.5821551",
"0.5817864",
"0.5814782",
"0.5812128",
"0.5812128",
"0.5812128",
"0.5811935",
"0.5796579",
"0.5780509",
"0.577938",
"0.57690984",
"0.57664996",
"0.5766099",
"0.57512903",
"0.57387507",
"0.5737235",
"0.57366925",
"0.5720717",
"0.5717747",
"0.5716677",
"0.57137233",
"0.5712454",
"0.5706202",
"0.5706202",
"0.5700425",
"0.56828433",
"0.5678888",
"0.5676235",
"0.5675901",
"0.5674163",
"0.56715095",
"0.5666639",
"0.5657272",
"0.5650727",
"0.5649928",
"0.56498235",
"0.56475323",
"0.5642948",
"0.5641082",
"0.5640754",
"0.56389874",
"0.5631087",
"0.5625533",
"0.56145114",
"0.561242",
"0.5607323",
"0.5604987",
"0.55966985",
"0.5594244",
"0.55907154",
"0.55803937",
"0.5578149",
"0.557403",
"0.556609",
"0.55570894",
"0.55559075",
"0.55486614",
"0.554643",
"0.5545155",
"0.5543021",
"0.55426985",
"0.55421335",
"0.55398744",
"0.5537939",
"0.5536325",
"0.55306196",
"0.55274606",
"0.5523967",
"0.55215377",
"0.55213964",
"0.55213964",
"0.5516063"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.