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
$this>middleware('auth'); // All routes are protected
public function __construct() { // Routes [create/store/edit/delete] are protected // $this->middleware('auth', ['only' => ['create', 'store', 'edit', 'delete']]); // All routes are protected except [search] $this->middleware('auth', ['except' => ['search']]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __cosnstruct(){\n $this->middleware('auth');\n }", "public function __construct()\n{\n $this->middleware('auth');\n}", "public function __construct()\n{\n $this->middleware('auth');\n}", "public function __construct()\n{\n $this->middleware('auth');\n}", "public function __construct(){\n $this->middleware('auth');\n\n }", "public function __construct(){\n $this->middleware('auth');\n\n }", "public function __construct(){\n $this->middleware('auth');\n\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth:web');\n }", "public function __construct()\n {\n $this->middleware('auth:web');\n }", "public function __construct()\n {\n $this->middleware('auth'); \n }", "public function __construct(){\n\n $this->middleware('auth');\n \n }", "public function __construct()\n { \n $this->middleware('auth'); \n }", "public function __construct()\n { \n /*$this->middleware('auth');*/\n }", "public function __construct()\n {\n $this->middleware('auth');\n\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct() {\n $this->middleware('auth');\n }", "public function __construct() {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n\n }", "public function __construct()\n {\n $this->middleware('auth');//aut\n }", "public function __construct(){\n $this->middleware('auth');\n\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware(\"auth\");\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n\n\n }", "public function __construct()\n {\n $this->middleware('auth');\n\n\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth'); \n }", "public function __construct()\n {\n $this->middleware('auth'); \n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "protected function middleware() {\n return array('auth');\n }", "public function __construct()\n { \n $this->middleware('auth');\n }", "public function __construct()\n {\n // $this->middleware('auth');\n\n\n\n\n\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');}", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n $this->middleware('auth');\n }", "public function __construct(){\n\n $this->middleware('auth:api');\n\n}", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n//$this->middleware('auth');\n }", "public function __construct() \n { \n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware( 'auth' );\n }", "public function __construct()\n {\n $this->middleware('auth'); \n }", "public function __construct()\n {\n $this->middleware('auth'); \n }", "public function __construct()\n {\n\t\t $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }", "public function __construct()\n {\n $this->middleware('auth');\n }" ]
[ "0.8353701", "0.8323374", "0.8317794", "0.8317794", "0.81435764", "0.8123447", "0.80951554", "0.8092697", "0.80908525", "0.8076008", "0.80620664", "0.80537456", "0.80500925", "0.8048863", "0.8029944", "0.8028037", "0.8026223", "0.8026223", "0.80212593", "0.8011837", "0.80093944", "0.800711", "0.800711", "0.8003916", "0.79955864", "0.79955864", "0.79955864", "0.79955864", "0.79954374", "0.79835945", "0.79835945", "0.797381", "0.797381", "0.797381", "0.797381", "0.797381", "0.797381", "0.797381", "0.797381", "0.797381", "0.79573804", "0.79573804", "0.7936127", "0.7936127", "0.7936127", "0.7936127", "0.7936127", "0.7929714", "0.79266244", "0.7922068", "0.7921476", "0.7912316", "0.79118997", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7903724", "0.7898349", "0.7892982", "0.7892621", "0.78918415", "0.78905123", "0.7887317", "0.7875101", "0.7875101", "0.7863091", "0.78628653", "0.78628653" ]
0.0
-1
Display a listing of the resource.
public function index() { $allProperties = Property::getAllActiveProperties([ 'sellerId' => Auth::id(), ]); return view('property.index', compact( 'allProperties' )); }
{ "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() { $seller = User::find(Auth::id())->seller; if (null === $seller) { unset($seller); return view('property.info'); } else { $propertyTypes = MMFormHelper::getPropertyTypes(); $apartmentTypes = MMFormHelper::getApartmentTypes(); $propertyMeasurements = MMFormHelper::getPropertyMeasurements(); return view('property.create', compact( 'propertyTypes', 'apartmentTypes', 'propertyMeasurements' )); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(ValidateProperty $request) { $seller = User::find(Auth::id())->seller; $property = new Property; $property->seller_id = $seller->id; $property->is_private = $request->input('is_private'); $property->property_type = $request->input('property_type'); $property->apartment_type = $request->input('apartment_type'); $property->measurement = $request->input('measurement'); $property->measurement_type = $request->input('measurement_type'); $property->maintenance_charges = $request->input('maintenance_charges'); $property->ownership = $request->input('ownership'); $property->joint_owners_name = $request->input('joint_owners_name'); $property->sale_price = $request->input('sale_price'); $property->min_expected_price = $request->input('min_expected_price'); $property->address = $request->input('address'); $property->homeloan_details = $request->input('homeloan_details'); $property->amenities = $request->input('amenities'); $property->locality_features = $request->input('locality_features'); $property->is_active = Property::ACTIVE; // May be Admin should verify and then approve it. if (1 === (int) $request->input('is_private')) { $dtObj = new \DateTime(); $property->is_private_ts = $dtObj->format('Y-m-d H:i:s'); unset($dtObj); } $property->save(); unset($property, $seller); return redirect('/property')->with( 'status', Lang::get('site.SUCCESS_MESSAGES.APARTMENT_STORED' )); }
{ "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 = 0) { if ($id < 1) { return redirect('/property')->with( 'error', Lang::get('property.ERROR_MESSAGES.EDIT_ID_MISSING' )); } // Check ID exists in the system, before updating the data if (! $property = Property::find($id) ) { return redirect('/property')->with( 'warn', Lang::get('property.ERROR_MESSAGES.EDIT_ID_NOT_EXISTS' )); } return view('property.show', compact('property')); }
{ "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 = 0) { if ($id < 1) { return redirect('/property')->with( 'error', Lang::get('property.ERROR_MESSAGES.EDIT_ID_MISSING' )); } // Property::findOrFail($id); // Check ID exists in the system, before updating the data if (! $property = Property::find($id) ) { return redirect('/property')->with( 'warn', Lang::get('property.ERROR_MESSAGES.EDIT_ID_NOT_EXISTS' )); } $propertyTypes = MMFormHelper::getPropertyTypes(); $apartmentTypes = MMFormHelper::getApartmentTypes(); $propertyMeasurements = MMFormHelper::getPropertyMeasurements(); $editForm = 'T'; return view('property.create', compact( 'propertyTypes', 'apartmentTypes', 'propertyMeasurements', 'property', 'editForm', 'id' )); }
{ "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(ValidateProperty $request, $id = 0) { // Check ID exists in the system, before updating the data if (! $property = Property::find($id) ) { return redirect('/property')->with( 'warn', Lang::get('property.ERROR_MESSAGES.EDIT_ID_NOT_EXISTS' )); } $property->property_type = $request->input('property_type'); $property->apartment_type = $request->input('apartment_type'); $property->measurement = $request->input('measurement'); $property->measurement_type = $request->input('measurement_type'); $property->maintenance_charges = $request->input('maintenance_charges'); $property->ownership = $request->input('ownership'); $property->joint_owners_name = $request->input('joint_owners_name'); $property->sale_price = $request->input('sale_price'); $property->min_expected_price = $request->input('min_expected_price'); $property->address = $request->input('address'); $property->homeloan_details = $request->input('homeloan_details'); $property->amenities = $request->input('amenities'); $property->locality_features = $request->input('locality_features'); $property->save(); unset($property); return redirect('/property')->with( 'status', Lang::get('site.SUCCESS_MESSAGES.APARTMENT_UPDATED' )); }
{ "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) { // }
{ "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
Run the database seeds.
public function run() { $items = [ [ 'title' => 'Email contato', 'description' => "[email protected]", ], [ 'title' => 'Facebook', 'description' => 'https://facebook.com', ], [ 'title' => 'Instagram', 'description' => 'https://instagram.com', ], [ 'title' => 'YouTube', 'description' => 'https://youtube.com', ], [ 'title' => 'Whatsapp', 'description' => "00000000000", ], [ 'title' => 'Endereco', 'description' => "Rua Gregório de Matos, 26, Loja 03 - Gramado Mall II, Nova Parnamirim, Parnamirim/RN <br> <strong>Fone:</strong> (84) 3608-3246 <br> <strong>E-mail:</strong> [email protected]", ], [ 'title' => 'Mapa', 'description' => '<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d4197.009463863399!2d-35.212680032487626!3d-6.266750950337974!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x7b28778d5ddd3a7%3A0x4ef2c348712d2324!2sGoianinha%20-%20RN!5e0!3m2!1spt-BR!2sbr!4v1620775498822!5m2!1spt-BR!2sbr" width="100%" height="250" style="border:0;" allowfullscreen="" loading="lazy"></iframe>' ], [ 'title' => 'Google Analytics Head', 'description' => ' ' ], [ 'title' => 'Google Analytics Boby', 'description' => ' ' ], [ 'title' => 'Descricao do site', 'description' => 'Proporcionar à seus cliente soluções, conclusões e realizações nas suas transações Imobiliárias. Esta é a missão da Ana Hilda Negócios Imobiliários é uma empresa que atua no mercado de Natal e Grande Natal...' ], [ 'title' => 'Palavras Chaves', 'description' => 'Imóveis, casa, aluguel, apartamento, quartos, compra, Imobiliária, negócios, imobiliários,' ], [ 'title' => 'Simulador', 'description' => 'http://www8.caixa.gov.br/siopiinternet-web/simulaOperacaoInternet.do?method=inicializarCasoUso' ], ]; foreach ($items as $value) { Settings::create($value); } }
{ "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\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 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 // $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 // 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 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 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 // \\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(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 $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 // 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([\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 // $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 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 // $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 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\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 $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 {\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 //\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(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 // $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\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 \\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 $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 // $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 \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 //$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 $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 // $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 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 // \\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\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->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 $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 /*$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 echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n $faker = \\Faker\\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 // $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 // \\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 // $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 }", "public function run()\n {\n \t$roles = DB::table('roles')->pluck('id');\n \t$sexes = DB::table('sexes')->pluck('id');\n \t$faker = \\Faker\\Factory::create();\n\n \tforeach (range(1,20) as $item) {\n \t\tDB::table('users')->insert([\n \t\t\t'role_id' => $faker->randomElement($roles),\n \t\t\t'sex_id' => $faker->randomElement($sexes),\n \t\t\t'name' => $faker->firstName . ' ' . $faker->lastName,\n \t\t\t'dob' => $faker->date,\n \t\t\t'bio' => $faker->text,\n \t\t\t'created_at' => now(),\n \t\t\t'updated_at' => now()\n \t\t]);\n \t} \n }" ]
[ "0.80130625", "0.79795986", "0.79764974", "0.79524934", "0.7950615", "0.79505694", "0.7944086", "0.7941758", "0.7938509", "0.79364634", "0.79335415", "0.7891555", "0.78802574", "0.78790486", "0.7878107", "0.7875447", "0.78703815", "0.7869534", "0.7851931", "0.7850407", "0.7840015", "0.78331256", "0.7826906", "0.78172284", "0.7807776", "0.78024083", "0.78023773", "0.7799859", "0.77994525", "0.77955437", "0.7790015", "0.77884936", "0.7786196", "0.77790534", "0.7776279", "0.7765613", "0.7761798", "0.7760838", "0.7760613", "0.7760611", "0.7759328", "0.7757682", "0.775591", "0.7752759", "0.774942", "0.7748997", "0.7745014", "0.7728245", "0.7727775", "0.77277344", "0.7716621", "0.77139914", "0.7713781", "0.77135956", "0.7713254", "0.7711222", "0.7710622", "0.7710614", "0.77104497", "0.77100515", "0.770471", "0.77039754", "0.7703702", "0.770327", "0.7702392", "0.7700962", "0.7700507", "0.7698413", "0.76974845", "0.7697178", "0.7696662", "0.76933604", "0.76916313", "0.76898587", "0.7689098", "0.76864886", "0.76862013", "0.76860833", "0.7685714", "0.7683389", "0.76831365", "0.7679125", "0.76774627", "0.767677", "0.7676274", "0.76719916", "0.76704824", "0.76679665", "0.7667335", "0.7667264", "0.76645994", "0.7662546", "0.76618296", "0.7660438", "0.76583356", "0.76564723", "0.76530147", "0.7651929", "0.7651548", "0.7651444", "0.76511025" ]
0.0
-1
Show the application dashboard.
public function index() { $data = [ 'deals' => Deals::all(), 'dealsPaginate' => Deals::paginate(10) ]; return View::make('crm.deals.index')->with($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
Show the form for creating a new resource.
public function create() { $deals = Companies::pluck('name', 'id'); return View::make('crm.deals.create', compact('deals')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store() { $allInputs = Input::all(); $validator = Validator::make($allInputs, Deals::getRules('STORE')); if ($validator->fails()) { return Redirect::to('deals/create')->with('message_danger', $validator->errors()); } else { if (Deals::insertRow($allInputs)) { return Redirect::to('deals')->with('message_success', 'Z powodzeniem dodano umowę!'); } else { return Redirect::back()->with('message_success', 'Błąd podczas dodawania umowę!'); } } }
{ "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) { $clients = Deals::find($id); return View::make('crm.deals.show') ->with('deals', $clients); }
{ "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) { $clients = Deals::find($id); return View::make('crm.deals.edit') ->with('deals', $clients); }
{ "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($id) { $allInputs = Input::all(); $validator = Validator::make($allInputs, Deals::getRules('STORE')); if ($validator->fails()) { return Redirect::back()->with('message_danger', $validator); } else { if (Deals::updateRow($id, $allInputs)) { return Redirect::back()->with('message_success', 'Z powodzeniem zaktualizowano umowę!'); } else { return Redirect::back()->with('message_success', 'Błąd podczas aktualizowania umowy!'); } } }
{ "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) { $clients = Deals::find($id); $clients->delete(); return Redirect::back()->with('message_success', 'Umowa została pomyślnie usunięta.'); }
{ "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
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any similar widget.
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->compare('userDataId',$this->userDataId); $criteria->compare('firstName',$this->firstName,true); $criteria->compare('lastName',$this->lastName,true); $criteria->compare('registrationDate',$this->registrationDate,true); $criteria->compare('lastLoginDate',$this->lastLoginDate,true); $criteria->compare('lastLoginIP',$this->lastLoginIP,true); $criteria->compare('avatarUploadFid',$this->avatarUploadFid); $criteria->compare('facebookLink',$this->facebookLink,true); $criteria->compare('twitterLink',$this->twitterLink,true); $criteria->compare('linkedInLink',$this->linkedInLink,true); $criteria->compare('googlePlusLink',$this->googlePlusLink,true); $criteria->compare('aboutMeLink',$this->aboutMeLink,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('model_id',$this->model_id,true);\n $criteria->compare('color',$this->color,true);\n $criteria->compare('is_in_pare',$this->is_in_pare);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('generator_id',$this->generator_id,true);\n\t\t$criteria->compare('serial_number',$this->serial_number,true);\n\t\t$criteria->compare('model_number',$this->model_number,true);\n\t\t$criteria->compare('manufacturer_name',$this->manufacturer_name,true);\n\t\t$criteria->compare('manufacture_date',$this->manufacture_date,true);\n\t\t$criteria->compare('supplier_name',$this->supplier_name,true);\n\t\t$criteria->compare('date_of_purchase',$this->date_of_purchase,true);\n\t\t$criteria->compare('date_of_first_use',$this->date_of_first_use,true);\n\t\t$criteria->compare('kva_capacity',$this->kva_capacity);\n\t\t$criteria->compare('current_run_hours',$this->current_run_hours);\n\t\t$criteria->compare('last_serviced_date',$this->last_serviced_date,true);\n\t\t$criteria->compare('engine_make',$this->engine_make,true);\n\t\t$criteria->compare('engine_model',$this->engine_model,true);\n\t\t$criteria->compare('fuel_tank_capacity',$this->fuel_tank_capacity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('idmodel',$this->idmodel);\n\t\t$criteria->compare('usuario_anterior',$this->usuario_anterior);\n\t\t$criteria->compare('usuario_nuevo',$this->usuario_nuevo);\n\t\t$criteria->compare('estado_anterior',$this->estado_anterior,true);\n\t\t$criteria->compare('estado_nuevo',$this->estado_nuevo,true);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('car',$this->car,true);\n\t\t$criteria->compare('source_id',$this->source_id,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('client_type_id',$this->client_type_id,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('other',$this->other,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t// $criteria->compare('text',$this->text,true);\n\t\t// $criteria->compare('record',$this->record,true);\n\t\t$criteria->compare('user',$this->user,true);\n\t\t$criteria->compare('createdBy',$this->createdBy,true);\n\t\t$criteria->compare('viewed',$this->viewed);\n\t\t$criteria->compare('createDate',$this->createDate,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('comparison',$this->comparison,true);\n\t\t// $criteria->compare('value',$this->value,true);\n\t\t$criteria->compare('modelType',$this->modelType,true);\n\t\t$criteria->compare('modelId',$this->modelId,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('Currency_ID',$this->Currency_ID);\n\t\t$criteria->compare('CurrencyNo',$this->CurrencyNo,true);\n\t\t$criteria->compare('ExchangeVND',$this->ExchangeVND,true);\n\t\t$criteria->compare('AppliedDate',$this->AppliedDate,true);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('firm',$this->firm,true);\n\t\t$criteria->compare('change_date',$this->change_date,true);\n\t\t$criteria->compare('item_id',$this->item_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('availability',$this->availability,true);\n\t\t$criteria->compare('price',$this->price,true);\n\t\t$criteria->compare('bonus',$this->bonus,true);\n\t\t$criteria->compare('shipping_cost',$this->shipping_cost,true);\n\t\t$criteria->compare('product_page',$this->product_page,true);\n\t\t$criteria->compare('sourse_page',$this->sourse_page,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('column_id',$this->column_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('condition',$this->condition,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('industry',$this->industry,true);\n\t\t$criteria->compare('industry_sub',$this->industry_sub,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('province',$this->province,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('contact_name',$this->contact_name,true);\n\t\t$criteria->compare('contact_tel',$this->contact_tel,true);\n\t\t$criteria->compare('ip',$this->ip,true);\n\t\t$criteria->compare('source',$this->source,true);\n $criteria->compare('status',$this->status);\n\t\t$criteria->compare('update_time',$this->update_time);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('notes',$this->notes);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('university',$this->university,true);\n\t\t$criteria->compare('major',$this->major,true);\n\t\t$criteria->compare('gpa',$this->gpa,true);\n\t\t$criteria->compare('appl_term',$this->appl_term);\n\t\t$criteria->compare('toefl',$this->toefl);\n\t\t$criteria->compare('gre',$this->gre);\n\t\t$criteria->compare('appl_major',$this->appl_major,true);\n\t\t$criteria->compare('appl_degree',$this->appl_degree,true);\n\t\t$criteria->compare('appl_country',$this->appl_country,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('goods_code',$this->goods_code,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('brand_id',$this->brand_id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('size',$this->size,true);\n\t\t$criteria->compare('material',$this->material,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('purchase_price',$this->purchase_price,true);\n\t\t$criteria->compare('selling_price',$this->selling_price,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('meta_title',$this->meta_title,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ContractsDetailID',$this->ContractsDetailID,true);\n\t\t$criteria->compare('ContractID',$this->ContractID,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\t\t$criteria->compare('CustomerID',$this->CustomerID,true);\n\t\t$criteria->compare('Share',$this->Share);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria = $this->criteriaSearch();\r\n\t\t$criteria->limit = 10;\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('organizationName',$this->organizationName,true);\n\t\t$criteria->compare('contactNo',$this->contactNo,true);\n\t\t$criteria->compare('partnerType',$this->partnerType);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('emailId',$this->emailId,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('firstName',$this->firstName,true);\n\t\t$criteria->compare('lastName',$this->lastName,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_ID,$this->{Globals::FLD_NAME_ACTIVITY_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_TASK_ID,$this->{Globals::FLD_NAME_TASK_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_BY_USER_ID,$this->{Globals::FLD_NAME_BY_USER_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_TYPE,$this->{Globals::FLD_NAME_ACTIVITY_TYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_SUBTYPE,$this->{Globals::FLD_NAME_ACTIVITY_SUBTYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_COMMENTS,$this->{Globals::FLD_NAME_COMMENTS},true);\n\t\t$criteria->compare(Globals::FLD_NAME_CREATED_AT,$this->{Globals::FLD_NAME_CREATED_AT},true);\n\t\t$criteria->compare(Globals::FLD_NAME_SOURCE_APP,$this->{Globals::FLD_NAME_SOURCE_APP},true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('manufacturers_image',$this->manufacturers_image,true);\n\t\t$criteria->compare('date_added',$this->date_added);\n\t\t$criteria->compare('last_modified',$this->last_modified);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_clicked',$this->url_clicked);\n\t\t$criteria->compare('date_last_click',$this->date_last_click);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('date',$this->date);\n\t\t$criteria->compare('del',$this->del);\n\t\t$criteria->compare('action_id',$this->action_id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('catalog',$this->catalog,true);\n\t\t$criteria->compare('is_new',$this->is_new);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('case',$this->case);\n\t\t$criteria->compare('basis_doc',$this->basis_doc);\n\t\t$criteria->compare('calc_group',$this->calc_group);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('competition',$this->competition);\n\t\t$criteria->compare('partner',$this->partner);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('website',$this->website,true);\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('data_attributes_fields',$this->data_attributes_fields,true);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('created',$this->created,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('skill_id',$this->skill_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('account_id',$this->account_id);\n\t\t$criteria->compare('field_name',$this->field_name);\n\t\t$criteria->compare('content',$this->content);\n\t\t$criteria->compare('old_data',$this->old_data,true);\n\t\t$criteria->compare('new_data',$this->new_data,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_updated',$this->date_updated,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('company_id',$this->company_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('validator',$this->validator,true);\n\t\t$criteria->compare('position',$this->position);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n $criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('display_name',$this->display_name,true);\n $criteria->compare('actionPrice',$this->actionPrice);\n\t\t$criteria->compare('translit',$this->translit,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('display_description',$this->display_description,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\t\t$criteria->compare('editing',$this->editing);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array(\n 'pageSize' => 15,\n ),\n\t\t));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('BrandID', $this->BrandID);\n $criteria->compare('BrandName', $this->BrandName, true);\n $criteria->compare('Pinyin', $this->Pinyin, true);\n $criteria->compare('Remarks', $this->Remarks, true);\n $criteria->compare('OrganID', $this->OrganID);\n $criteria->compare('UserID', $this->UserID);\n $criteria->compare('CreateTime', $this->CreateTime);\n $criteria->compare('UpdateTime', $this->UpdateTime);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('componente_id',$this->componente_id);\n\t\t$criteria->compare('tipo_dato',$this->tipo_dato,true);\n\t\t$criteria->compare('descripcion',$this->descripcion,true);\n\t\t$criteria->compare('cruce_automatico',$this->cruce_automatico,true);\n\t\t$criteria->compare('sw_obligatorio',$this->sw_obligatorio,true);\n\t\t$criteria->compare('orden',$this->orden);\n\t\t$criteria->compare('sw_puntaje',$this->sw_puntaje,true);\n\t\t$criteria->compare('sw_estado',$this->sw_estado,true);\n\t\t$criteria->compare('todos_obligatorios',$this->todos_obligatorios,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('real_name',$this->real_name,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('zip_code',$this->zip_code,true);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('district_id',$this->district_id);\n\t\t$criteria->compare('district_address',$this->district_address,true);\n\t\t$criteria->compare('street_address',$this->street_address,true);\n\t\t$criteria->compare('is_default',$this->is_default);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('update_time',$this->update_time);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('EMCE_ID',$this->EMCE_ID);\n\t\t$criteria->compare('MOOR_ID',$this->MOOR_ID);\n\t\t$criteria->compare('EVCR_ID',$this->EVCR_ID);\n\t\t$criteria->compare('EVES_ID',$this->EVES_ID);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('customerName',$this->customerName,true);\n\t\t$criteria->compare('agencyHead',$this->agencyHead,true);\n\t\t$criteria->compare('region_id',$this->region_id);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('municipalityCity_id',$this->municipalityCity_id);\n\t\t$criteria->compare('barangay_id',$this->barangay_id);\n\t\t$criteria->compare('houseNumber',$this->houseNumber,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('nature_id',$this->nature_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->name,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('state',$this->address,true);\n\t\t$criteria->compare('country',$this->address,true);\n\t\t$criteria->compare('contact_number',$this->contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('is_deleted',$this->is_deleted);\n\t\t$criteria->compare('deleted_by',$this->deleted_by,true);\n\t\t$criteria->compare('created_at',$this->created_at,true);\n\t\t$criteria->compare('updated_at',$this->updated_at,true);\n\t\tif(YII::app()->user->getState(\"role\") == \"admin\") {\n\t\t\t$criteria->condition = 'is_deleted = 0';\n\t\t}\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('professional_status_id',$this->professional_status);\n\t\t$criteria->compare('birthday',$this->birthday);\n\t\t$criteria->compare('location',$this->location);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\r\n\t{\r\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\r\n\r\r\n\t\t$criteria=new CDbCriteria;\r\r\n\r\r\n\t\t$criteria->compare('id',$this->id);\r\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\r\n\t\t$criteria->compare('adds',$this->adds);\r\r\n\t\t$criteria->compare('edits',$this->edits);\r\r\n\t\t$criteria->compare('deletes',$this->deletes);\r\r\n\t\t$criteria->compare('view',$this->view);\r\r\n\t\t$criteria->compare('lists',$this->lists);\r\r\n\t\t$criteria->compare('searches',$this->searches);\r\r\n\t\t$criteria->compare('prints',$this->prints);\r\r\n\r\r\n\t\treturn new CActiveDataProvider($this, array(\r\r\n\t\t\t'criteria'=>$criteria,\r\r\n\t\t));\r\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('applyId',$this->applyId);\n\t\t$criteria->compare('stuId',$this->stuId);\n\t\t$criteria->compare('stuName',$this->stuName,true);\n\t\t$criteria->compare('specification',$this->specification,true);\n\t\t$criteria->compare('assetName',$this->assetName,true);\n\t\t$criteria->compare('applyTime',$this->applyTime,true);\n\t\t$criteria->compare('loanTime',$this->loanTime,true);\n\t\t$criteria->compare('returnTime',$this->returnTime,true);\n\t\t$criteria->compare('RFID',$this->RFID,true);\n\t\t$criteria->compare('stuTelNum',$this->stuTelNum,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('itemcode', $this->itemcode, true);\n $criteria->compare('product_id', $this->product_id, true);\n $criteria->compare('delete_flag', $this->delete_flag);\n $criteria->compare('status', $this->status);\n $criteria->compare('expire', $this->expire, true);\n $criteria->compare('date_input', $this->date_input, true);\n $criteria->compare('d_update', $this->d_update, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('verid',$this->verid);\n\t\t$criteria->compare('appversion',$this->appversion,true);\n\t\t$criteria->compare('appfeatures',$this->appfeatures,true);\n\t\t$criteria->compare('createtime',$this->createtime,true);\n\t\t$criteria->compare('baseNum',$this->baseNum);\n\t\t$criteria->compare('slave1Num',$this->slave1Num);\n\t\t$criteria->compare('packagename',$this->packagename,true);\n\t\t$criteria->compare('ostype',$this->ostype);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('client_id',$this->client_id,true);\n\t\t$criteria->compare('extension',$this->extension,true);\n\t\t$criteria->compare('rel_type',$this->rel_type,true);\n\t\t$criteria->compare('rel_id',$this->rel_id,true);\n\t\t$criteria->compare('meta_key',$this->meta_key,true);\n\t\t$criteria->compare('meta_value',$this->meta_value,true);\n\t\t$criteria->compare('date_entry',$this->date_entry,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('column_id',$this->column_id,true);\n\t\t$criteria->compare('research_title',$this->research_title,true);\n\t\t$criteria->compare('research_url',$this->research_url,true);\n\t\t$criteria->compare('column_type',$this->column_type);\n\t\t$criteria->compare('filiale_id',$this->filiale_id,true);\n\t\t$criteria->compare('area_name',$this->area_name,true);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('trigger_config',$this->trigger_config);\n\t\t$criteria->compare('status',$this->status);\n $criteria->compare('terminal_type',$this->terminal_type);\n\t\t$criteria->compare('start_time',$this->start_time,true);\n\t\t$criteria->compare('end_time',$this->end_time,true);\n\t\t$criteria->compare('explain',$this->explain,true);\n\t\t$criteria->compare('_delete',$this->_delete);\n\t\t$criteria->compare('_create_time',$this->_create_time,true);\n\t\t$criteria->compare('_update_time',$this->_update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('birthday',$this->birthday,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('is_get_news',$this->is_get_news);\n\t\t$criteria->compare('user_id',$this->user_id);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('order_id',$this->order_id);\n\t\t$criteria->compare('device_id',$this->device_id,true);\n\t\t$criteria->compare('money',$this->money,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('add_time',$this->add_time);\n\t\t$criteria->compare('recharge_type',$this->recharge_type);\n\t\t$criteria->compare('channel',$this->channel,true);\n\t\t$criteria->compare('version_name',$this->version_name,true);\n\t\t$criteria->compare('pay_channel',$this->pay_channel);\n\t\t$criteria->compare('chanel_bid',$this->chanel_bid);\n\t\t$criteria->compare('chanel_sid',$this->chanel_sid);\n\t\t$criteria->compare('versionid',$this->versionid);\n\t\t$criteria->compare('chanel_web',$this->chanel_web);\n\t\t$criteria->compare('dem_num',$this->dem_num);\n\t\t$criteria->compare('last_watching',$this->last_watching,true);\n\t\t$criteria->compare('pay_type',$this->pay_type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n {\r\n // @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n $criteria = new CDbCriteria;\r\n\r\n $criteria->compare('id', $this->id);\r\n $criteria->compare('country_id', $this->country_id);\r\n $criteria->compare('user_id', $this->user_id);\r\n $criteria->compare('vat', $this->vat);\r\n $criteria->compare('manager_coef', $this->manager_coef);\r\n $criteria->compare('curator_coef', $this->curator_coef);\r\n $criteria->compare('admin_coef', $this->admin_coef);\r\n $criteria->compare('status', $this->status);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n ));\r\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('purchase_price',$this->purchase_price);\n\t\t$criteria->compare('sell_price',$this->sell_price);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('measurement',$this->measurement,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\t\t$criteria->compare('date_out',$this->date_out,true);\n\t\t$criteria->compare('date_in',$this->date_in,true);\n\t\t$criteria->compare('firma_id',$this->firma_id,true);\n\t\t$criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('instock',$this->instock);\n\t\t$criteria->compare('user_id',$this->user_id);\n $criteria->compare('warning_amount',$this->warning_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('fname',$this->fname,true);\n\t\t$criteria->compare('mname',$this->mname,true);\n\t\t$criteria->compare('lname',$this->lname,true);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('date_of_birth',$this->date_of_birth,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('landline',$this->landline,true);\n\t\t$criteria->compare('em_contact_name',$this->em_contact_name,true);\n\t\t$criteria->compare('em_contact_relation',$this->em_contact_relation,true);\n\t\t$criteria->compare('em_contact_number',$this->em_contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('created_date',$this->created_date,true);\n\n return new CActiveDataProvider( $this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState( 'pageSize', Yii::app()->params[ 'defaultPageSize' ] ),\n ),\n ) );\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t\n\t\t$criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('COMPETITOR_ID',$this->COMPETITOR_ID);\n\t\t$criteria->compare('WSDC_NO',$this->WSDC_NO);\n\t\t$criteria->compare('FIRST_NAME',$this->FIRST_NAME,true);\n\t\t$criteria->compare('LAST_NAME',$this->LAST_NAME,true);\n\t\t$criteria->compare('COMPETITOR_LEVEL',$this->COMPETITOR_LEVEL);\n\t\t$criteria->compare('REMOVED',$this->REMOVED);\n\t\t$criteria->compare('ADDRESS',$this->ADDRESS,true);\n\t\t$criteria->compare('CITY',$this->CITY,true);\n\t\t$criteria->compare('STATE',$this->STATE,true);\n\t\t$criteria->compare('POSTCODE',$this->POSTCODE);\n\t\t$criteria->compare('COUNTRY',$this->COUNTRY,true);\n\t\t$criteria->compare('PHONE',$this->PHONE,true);\n\t\t$criteria->compare('MOBILE',$this->MOBILE,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('LEADER',$this->LEADER);\n\t\t$criteria->compare('REGISTERED',$this->REGISTERED);\n\t\t$criteria->compare('BIB_STATUS',$this->BIB_STATUS);\n\t\t$criteria->compare('BIB_NUMBER',$this->BIB_NUMBER);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sys_name',$this->sys_name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('CustomerId',$this->CustomerId,true);\n\t\t$criteria->compare('AddressId',$this->AddressId,true);\n\t\t$criteria->compare('CustomerStatusId',$this->CustomerStatusId,true);\n\t\t$criteria->compare('DateMasterId',$this->DateMasterId,true);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('CustomerPhoto',$this->CustomerPhoto,true);\n\t\t$criteria->compare('CustomerCode',$this->CustomerCode);\n\t\t$criteria->compare('Telephone',$this->Telephone,true);\n\t\t$criteria->compare('Mobile',$this->Mobile,true);\n\t\t$criteria->compare('EmailId',$this->EmailId,true);\n\t\t$criteria->compare('Status',$this->Status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$parameters = array('limit'=>ceil(Profile::getResultsPerPage()));\n\t\t$criteria->scopes = array('findAll'=>array($parameters));\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('itemId',$this->itemId);\n\t\t$criteria->compare('changedBy',$this->changedBy,true);\n\t\t$criteria->compare('recordName',$this->recordName,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\t\t$criteria->compare('oldValue',$this->oldValue,true);\n\t\t$criteria->compare('newValue',$this->newValue,true);\n\t\t$criteria->compare('diff',$this->diff,true);\n\t\t$criteria->compare('timestamp',$this->timestamp);\n\n\t\treturn new SmartActiveDataProvider(get_class($this), array(\n\t\t\t'sort'=>array(\n\t\t\t\t'defaultOrder'=>'timestamp DESC',\n\t\t\t),\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>Profile::getResultsPerPage(),\n\t\t\t),\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('company_id', $this->company_id);\n\t\t$criteria->compare('productId', $this->productId);\n\t\t$criteria->compare('upTo', $this->upTo);\n\t\t$criteria->compare('fixPrice', $this->fixPrice);\n\t\t$criteria->compare('isActive', $this->isActive);\n\t\t$criteria->order = 'company_id';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('locality',$this->locality,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\n\t\t$criteria->compare('mem_type',$this->mem_type);\r\n\t\t$criteria->compare('business_type',$this->business_type);\r\n\t\t$criteria->compare('product_name',$this->product_name,true);\r\n\t\t$criteria->compare('panit',$this->panit,true);\r\n\t\t$criteria->compare('sex',$this->sex);\r\n\t\t$criteria->compare('tname',$this->tname);\r\n\t\t$criteria->compare('ftname',$this->ftname,true);\r\n\t\t$criteria->compare('ltname',$this->ltname,true);\r\n\t\t$criteria->compare('etname',$this->etname);\r\n\t\t$criteria->compare('fename',$this->fename,true);\r\n\t\t$criteria->compare('lename',$this->lename,true);\r\n\t\t$criteria->compare('birth',$this->birth,true);\r\n\t\t$criteria->compare('email',$this->email,true);\r\n\t\t$criteria->compare('facebook',$this->facebook,true);\r\n\t\t$criteria->compare('twitter',$this->twitter,true);\r\n\t\t$criteria->compare('address',$this->address,true);\r\n\t\t$criteria->compare('province',$this->province);\r\n\t\t$criteria->compare('prefecture',$this->prefecture);\r\n\t\t$criteria->compare('district',$this->district);\r\n\t\t$criteria->compare('postcode',$this->postcode,true);\r\n\t\t$criteria->compare('tel',$this->tel,true);\r\n\t\t$criteria->compare('mobile',$this->mobile,true);\r\n\t\t$criteria->compare('fax',$this->fax,true);\r\n\t\t$criteria->compare('high_education',$this->high_education);\r\n\t\t$criteria->compare('career',$this->career);\r\n\t\t$criteria->compare('skill_com',$this->skill_com);\r\n\t\t$criteria->compare('receive_news',$this->receive_news,true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('table_id',$this->table_id);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cou_id',$this->cou_id);\n\t\t$criteria->compare('thm_id',$this->thm_id);\n\t\t$criteria->compare('cou_nom',$this->cou_nom,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('idempleo',$this->idempleo);\n\t\t$criteria->compare('administrativo',$this->administrativo,true);\n\t\t$criteria->compare('comercial',$this->comercial,true);\n\t\t$criteria->compare('artes',$this->artes,true);\n\t\t$criteria->compare('informatica',$this->informatica,true);\n\t\t$criteria->compare('salud',$this->salud,true);\n\t\t$criteria->compare('marketing',$this->marketing,true);\n\t\t$criteria->compare('servicio_domestico',$this->servicio_domestico,true);\n\t\t$criteria->compare('construccion',$this->construccion,true);\n\t\t$criteria->compare('agricultura',$this->agricultura,true);\n\t\t$criteria->compare('ganaderia',$this->ganaderia,true);\n\t\t$criteria->compare('telecomunicaciones',$this->telecomunicaciones,true);\n\t\t$criteria->compare('atencion_cliente',$this->atencion_cliente,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID_VALOR',$this->ID_VALOR);\n\t\t$criteria->compare('ID_UBICACION',$this->ID_UBICACION);\n\t\t$criteria->compare('ID_VISITA',$this->ID_VISITA);\n\t\t$criteria->compare('VALOR',$this->VALOR);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t\n\t\t$criteria->compare('id_aspecto',$this->id_aspecto,true);\n\t\t$criteria->compare('tbl_Programa_id_programa',$this->tbl_Programa_id_programa,true);\n\t\t$criteria->compare('tbl_Factor_id_factor',$this->tbl_Factor_id_factor);\n\t\t$criteria->compare('tbl_caracteristica_id_caracteristica',$this->tbl_caracteristica_id_caracteristica,true);\n\t\t$criteria->compare('num_aspecto',$this->num_aspecto,true);\n\t\t$criteria->compare('aspecto',$this->aspecto,true);\n\t\t$criteria->compare('instrumento',$this->instrumento,true);\n\t\t$criteria->compare('fuente',$this->fuente,true);\n\t\t$criteria->compare('documento',$this->documento,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('Observaciones',$this->Observaciones,true);\n\t\t$criteria->compare('cumple',$this->cumple,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('website_url',$this->website_url,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('user_name',$this->user_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('created_datetime',$this->created_datetime,true);\n\t\t$criteria->compare('icon_src',$this->icon_src,true);\n\t\t$criteria->compare('show_r18',$this->show_r18);\n\t\t$criteria->compare('show_bl',$this->show_bl);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('creationDate',$this->creationDate,true);\n\t\t$criteria->compare('year',$this->year);\n\t\t$criteria->compare('term',$this->term,true);\n\t\t$criteria->compare('activated',$this->activated);\n\t\t$criteria->compare('startingDate',$this->startingDate,true);\n\t\t$criteria->compare('activation_userId',$this->activation_userId);\n\t\t$criteria->compare('parent_catalogId',$this->parent_catalogId);\n $criteria->compare('isProspective', $this->isProspective);\n $criteria->compare('creatorId', $this->creatorId);\n $criteria->compare('isProposed', $this->isProposed);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('location',$this->location);\n\t\t$criteria->compare('theripiest',$this->theripiest);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('dob',$this->dob,true);\n\t\t$criteria->compare('inurancecompany',$this->inurancecompany,true);\n\t\t$criteria->compare('injurydate',$this->injurydate,true);\n\t\t$criteria->compare('therapy_start_date',$this->therapy_start_date,true);\n\t\t$criteria->compare('ASIA',$this->ASIA,true);\n\t\t$criteria->compare('injury',$this->injury,true);\n\t\t$criteria->compare('medication',$this->medication,true);\n\t\t$criteria->compare('notes',$this->notes,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search () {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('formId', $this->formId, true);\n\t\t$criteria->compare('data', $this->data, true);\n\t\t$criteria->compare('ctime', $this->ctime);\n\t\t$criteria->compare('mtime', $this->mtime);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('imputetype_id',$this->imputetype_id);\n\t\t$criteria->compare('project_id',$this->project_id);\n\n\t\treturn new ActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('category_id',$this->category_id);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('price_z',$this->price_z);\n\t\t$criteria->compare('price_s',$this->price_s);\n\t\t$criteria->compare('price_m',$this->price_m);\n\t\t$criteria->compare('dependence',$this->dependence,true);\n\t\t$criteria->compare('barcode',$this->barcode,true);\n\t\t$criteria->compare('unit',$this->unit,true);\n\t\t$criteria->compare('minimal_amount',$this->minimal_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 100),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email_admin',$this->email_admin,true);\n\t\t$criteria->compare('password_api',$this->password_api,true);\n\t\t$criteria->compare('url_result_api',$this->url_result_api,true);\n\t\t$criteria->compare('id_currency_2',$this->id_currency_2);\n\t\t$criteria->compare('id_currency_1',$this->id_currency_1,true);\n\t\t$criteria->compare('is_test_mode',$this->is_test_mode);\n\t\t$criteria->compare('is_commission_shop',$this->is_commission_shop);\n\t\t$criteria->compare('commission',$this->commission);\n\t\t$criteria->compare('is_enable',$this->is_enable);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('mod_date',$this->mod_date,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('image',$this->image,true);\n\t\t$criteria->compare('manager',$this->manager);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('realname',$this->realname,true);\n\t\t$criteria->compare('identity',$this->identity,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('bussiness_license',$this->bussiness_license,true);\n\t\t$criteria->compare('bankcode',$this->bankcode,true);\n\t\t$criteria->compare('banktype',$this->banktype,true);\n\t\t$criteria->compare('is_open',$this->is_open,true);\n\t\t$criteria->compare('introduction',$this->introduction,true);\n\t\t$criteria->compare('images_str',$this->images_str,true);\n\t\t$criteria->compare('gmt_created',$this->gmt_created,true);\n\t\t$criteria->compare('gmt_modified',$this->gmt_modified,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID,true);\n\t\t$criteria->compare('userID',$this->userID,true);\n\t\t$criteria->compare('mtID',$this->mtID,true);\n\t\t$criteria->compare('fxType',$this->fxType);\n\t\t$criteria->compare('leverage',$this->leverage);\n\t\t$criteria->compare('amount',$this->amount,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('surname',$this->surname,true);\n\t\t$criteria->compare('comany_name',$this->comany_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('uuid',$this->uuid,true);\n\t\t$criteria->compare('is_admin',$this->is_admin);\n\t\t$criteria->compare('paid_period_start',$this->paid_period_start,true);\n\t\t$criteria->compare('ftp_pass',$this->ftp_pass,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('HISTORY',$this->HISTORY,true);\n\t\t$criteria->compare('WELCOME_MESSAGE',$this->WELCOME_MESSAGE,true);\n\t\t$criteria->compare('LOCATION',$this->LOCATION,true);\n\t\t$criteria->compare('PHONES',$this->PHONES,true);\n\t\t$criteria->compare('FAX',$this->FAX,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('MISSION',$this->MISSION,true);\n\t\t$criteria->compare('VISION',$this->VISION,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('price',$this->price,true);\n\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('breed',$this->breed,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_birthday',$this->date_birthday,true);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('tattoo',$this->tattoo,true);\n\t\t$criteria->compare('sire',$this->sire,true);\n\t\t$criteria->compare('dame',$this->dame,true);\n\t\t$criteria->compare('owner_type',$this->owner_type,true);\n\t\t$criteria->compare('honors',$this->honors,true);\n\t\t$criteria->compare('photo_preview',$this->photo_preview,true);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('pet_status',$this->pet_status,true);\n\t\t$criteria->compare('about',$this->about,true);\n\t\t$criteria->compare('uid',$this->uid);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('veterinary',$this->veterinary,true);\n\t\t$criteria->compare('vaccinations',$this->vaccinations,true);\n\t\t$criteria->compare('show_class',$this->show_class,true);\n\t\t$criteria->compare('certificate',$this->certificate,true);\n $criteria->compare('neutered_spayed',$this->certificate,true);\n \n\n $criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('city',$this->city,true);\n\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('orgName',$this->orgName,true);\n\t\t$criteria->compare('noEmp',$this->noEmp);\n\t\t$criteria->compare('phone',$this->phone);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('addr1',$this->addr1,true);\n\t\t$criteria->compare('addr2',$this->addr2,true);\n\t\t$criteria->compare('state',$this->state,true);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('orgType',$this->orgType,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('fax',$this->fax);\n\t\t$criteria->compare('orgId',$this->orgId,true);\n\t\t$criteria->compare('validity',$this->validity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('sortorder',$this->sortorder,true);\n\t\t$criteria->compare('fullname',$this->fullname,true);\n\t\t$criteria->compare('shortname',$this->shortname,true);\n\t\t$criteria->compare('idnumber',$this->idnumber,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('summaryformat',$this->summaryformat);\n\t\t$criteria->compare('format',$this->format,true);\n\t\t$criteria->compare('showgrades',$this->showgrades);\n\t\t$criteria->compare('sectioncache',$this->sectioncache,true);\n\t\t$criteria->compare('modinfo',$this->modinfo,true);\n\t\t$criteria->compare('newsitems',$this->newsitems);\n\t\t$criteria->compare('startdate',$this->startdate,true);\n\t\t$criteria->compare('marker',$this->marker,true);\n\t\t$criteria->compare('maxbytes',$this->maxbytes,true);\n\t\t$criteria->compare('legacyfiles',$this->legacyfiles);\n\t\t$criteria->compare('showreports',$this->showreports);\n\t\t$criteria->compare('visible',$this->visible);\n\t\t$criteria->compare('visibleold',$this->visibleold);\n\t\t$criteria->compare('groupmode',$this->groupmode);\n\t\t$criteria->compare('groupmodeforce',$this->groupmodeforce);\n\t\t$criteria->compare('defaultgroupingid',$this->defaultgroupingid,true);\n\t\t$criteria->compare('lang',$this->lang,true);\n\t\t$criteria->compare('theme',$this->theme,true);\n\t\t$criteria->compare('timecreated',$this->timecreated,true);\n\t\t$criteria->compare('timemodified',$this->timemodified,true);\n\t\t$criteria->compare('requested',$this->requested);\n\t\t$criteria->compare('enablecompletion',$this->enablecompletion);\n\t\t$criteria->compare('completionnotify',$this->completionnotify);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('zipcode',$this->zipcode,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('role',$this->role,true);\n\t\t$criteria->compare('active',$this->active);\n\t\t$criteria->compare('camaras',$this->camaras);\n\t\t$criteria->compare('freidoras',$this->freidoras);\n\t\t$criteria->compare('cebos',$this->cebos);\n\t\t$criteria->compare('trampas',$this->trampas);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('attribute',$this->attribute,true);\n\t\t$criteria->compare('displayName',$this->displayName,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('value_type',$this->value_type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cod_venda',$this->cod_venda,true);\n\t\t$criteria->compare('filial_cod_filial',$this->filial_cod_filial,true);\n\t\t$criteria->compare('funcionario_cod_funcionario',$this->funcionario_cod_funcionario,true);\n\t\t$criteria->compare('cliente_cod_cliente',$this->cliente_cod_cliente,true);\n\t\t$criteria->compare('data_2',$this->data_2,true);\n\t\t$criteria->compare('valor_total',$this->valor_total);\n\t\t$criteria->compare('forma_pagamento',$this->forma_pagamento,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->buscar,'OR');\n\t\t$criteria->compare('fecha',$this->buscar,true,'OR');\n\t\t$criteria->compare('fechaUpdate',$this->buscar,true,'OR');\n\t\t$criteria->compare('idProfesional',$this->buscar,'OR');\n\t\t$criteria->compare('importe',$this->buscar,'OR');\n\t\t$criteria->compare('idObraSocial',$this->buscar,'OR');\n\t\t$criteria->compare('estado',$this->buscar,true,'OR');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('codop',$this->codop,true);\n\t\t$criteria->compare('codcatval',$this->codcatval,true);\n\t\t$criteria->compare('cuentadebe',$this->cuentadebe,true);\n\t\t$criteria->compare('cuentahaber',$this->cuentahaber,true);\n\t\t$criteria->compare('desop',$this->desop,true);\n\t\t$criteria->compare('descat',$this->descat,true);\n\t\t$criteria->compare('debe',$this->debe,true);\n\t\t$criteria->compare('haber',$this->haber,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pagesize'=>100),\n\t\t));\n\t}" ]
[ "0.72114086", "0.7134845", "0.7092629", "0.70920587", "0.6984018", "0.6959329", "0.69463736", "0.69402134", "0.69324994", "0.6922489", "0.6909505", "0.69015145", "0.6897336", "0.68967223", "0.6890991", "0.6881179", "0.6878767", "0.6872834", "0.6847958", "0.6847501", "0.6834575", "0.6824798", "0.6813993", "0.6805762", "0.68023175", "0.67960906", "0.6795279", "0.6794119", "0.6793955", "0.6792718", "0.6788994", "0.6784053", "0.6783657", "0.6782727", "0.6779627", "0.6779287", "0.67774034", "0.6776278", "0.6775596", "0.6774605", "0.6773952", "0.6773952", "0.6773952", "0.6773952", "0.6773952", "0.6773952", "0.6773952", "0.6773952", "0.677131", "0.6767027", "0.67658544", "0.6764357", "0.6761176", "0.6760995", "0.67596185", "0.6759283", "0.6758077", "0.67573154", "0.6752126", "0.67518985", "0.675087", "0.6746735", "0.6746321", "0.6744945", "0.6744182", "0.6743708", "0.67433894", "0.6743005", "0.67428124", "0.6741905", "0.674088", "0.6739592", "0.67387825", "0.6737716", "0.67356795", "0.6735415", "0.6733089", "0.67307925", "0.67299044", "0.6723803", "0.6722029", "0.6721529", "0.6720631", "0.6711533", "0.67115116", "0.6709266", "0.6707578", "0.67051524", "0.67045474", "0.67042005", "0.67028356", "0.67010325", "0.6699419", "0.6696658", "0.6695186", "0.6694148", "0.66939163", "0.6692043", "0.6691899", "0.6691453", "0.669005" ]
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.75750446", "0.7528519", "0.7271581", "0.72703993", "0.72617143", "0.7213263", "0.72127366", "0.7131883", "0.71287453", "0.71287453", "0.7102495", "0.7102467", "0.7102467", "0.7074701", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163" ]
0.0
-1
Funcion para buscar todo los usuarios
function BuscarTodosUsuarios($documento){ $this->db->select(); //$this->db->from($this->tablaProveedor); $this->db->join($this->TablatipoDocumento, 'proveedor.idTipoDocumento = tipodocumento.idTipoDocumento'); $resultado = $this->db->get_where('proveedor', array('proveedor.documento' => $documento), 1); return $resultado->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buscarUsuarios(){\n\t\t}", "public function get_usuarios()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$sql = \"SELECT * FROM usuarios\";\n\n\t\t\t$resultado = $this->db->prepare($sql);\n\n\t\t\tif(!$resultado->execute())\n\t\t\t{\n\t\t\t\techo \"<h1 class='text-danger bg-danger'>Falla en la consulta</h1>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twhile($reg = $resultado->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->usuarios[] = $reg;\n\t\t\t\t}\n\n\t\t\t\treturn $this->usuarios;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie(\"Error: {$e->getMessage()}\");\n\t\t}\n\t}", "function getUsuarios(){\n\t\n\t\treturn conectar()->query( \"SELECT * FROM usuarios\");\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}", "public function getUsuarios(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraUsuarios\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM usuarios \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM usuarios LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "public function getUsers(){\n $query = \"SELECT * FROM usuario \";\n return self::getInstance()->consulta($query);\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}", "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 }", "public static function get_usuarios(){\n\t\t\n\t\t$query = \"SELECT * FROM usuarios\";\n\n\t\t/**\n\t\t * Call getConexion()\n\t\t */\n\t\tself::getConexion();\n\n\n\n\t\t$resultado = self::$cn->prepare($query);\n\t\t$resultado->execute();\n\n\t\t$filas=$resultado->fetchAll();\n\n\t\t\n\t\treturn $filas;\n\n\t}", "function ListaUsuario() {\n\t\n\t\t\t$sql = \"SELECT usu.*, CONCAT_WS(' ', per.primer_nombre, per.primer_apellido) as nombre_completo, usu.nombre_usuario, rol.descripcion FROM usuario usu\n\t\t\t\t\tINNER JOIN rol rol ON rol.id = usu.rol_id\n\t\t\t\t\tINNER JOIN persona per ON per.id = usu.persona_id\";\n\t\t\t$db = new conexion();\n\t\t\t$result = $db->consulta($sql);\n\t\t\t$num = $db->encontradas($result);\n\t\t\t$respuesta->datos = [];\n\t\t\t$respuesta->mensaje = \"\";\n\t\t\t$respuesta->codigo = \"\";\n\t\t\tif ($num != 0) {\n\t\t\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t\t\t}\n\t\t\t\t$respuesta->mensaje = \"Ok\";\n\t\t\t\t$respuesta->codigo = 1;\n\t\t\t} else {\n\t\t\t\t$respuesta->mensaje = \"No existen registros de roles.\";\n\t\t\t\t$respuesta->codigo = 0;\n\t\t\t}\n\t\t\treturn json_encode($respuesta);\n\t\t}", "function ListaUsuarios() {\n\t//obtiene el id del usuario\n $sql = \"SELECT usuario.id, usuario.nombre_usuario, persona.primer_nombre, persona.primer_apellido, usuario.estado, rol.descripcion FROM usuario INNER JOIN persona ON usuario.persona_id = persona.id INNER JOIN rol ON usuario.rol_id = rol.id WHERE usuario.estado = 'ACTIVO'\";\n\n\t$db = new conexion();\n\t$result = $db->consulta($sql);\n\t$num = $db->encontradas($result);\n\n\t$respuesta->datos = [];\n\t$respuesta->mensaje = \"\";\n\t$respuesta->codigo = \"\";\n\n\tif ($num != 0) {\n\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t}\n\t\t$respuesta->mensaje = \"Usuarios listados\";\n\t\t$respuesta->codigo = 1;\n\t} else {\n\t\t$respuesta->mensaje = \"No existen registros de usuarios !\";\n\t\t$respuesta->codigo = 0;\n\t}\n\treturn json_encode($respuesta);\n}", "function getUsuarios()\n{\n\t$con = getDBConnection();\n\t$sql = \"SELECT * FROM usuarios\";\n\t$stmt = $con->prepare($sql);\n\t$stmt->execute();\n\t$usuarios = null;\n\twhile ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n\t\t$usuario = new Usuario();\n\t\t$usuario->setID($row['id']);\n\t\t$usuario->set($row['nombre'],$row['apellidos'],$row['user_name'],$row['password'],$row['email']);\n\t\t$usuarios[] = $usuario;\n\t}\n\treturn $usuarios;\n}", "public static function obtenerUsuarios()\n {\n $consulta = \"SELECT * FROM usuarios, usuarios_roles WHERE (usuarios.rol=usuarios_roles.id_rol) ORDER BY usuarios.nombres ASC\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n return false;\n }\n }", "public function listarUser() {\n if(IDUSER) {\n $eval = \"SELECT id,nombre,apellidos,email FROM users\";\n $peticion = $this->db->prepare($eval);\n $peticion->execute();\n $resultado = $peticion->fetchAll(PDO::FETCH_OBJ);\n exit(json_encode($resultado));\n } else {\n http_response_code(401);\n exit(json_encode([\"error\" => \"Fallo de autorizacion\"])); \n }\n }", "private function busquedaUsuarios($filter = array()) {\n $usuarios = new \\Modelos\\userPosix($this->dn, $this->pswd, 'central' );\n $atributos = array('uid','cn','title','o', 'ou','mail', 'telephoneNumber');\n $filtro = empty($filter) ? array(\"cn\"=>\"NOT (root OR nobody)\") : array_merge($filter, array(\"cn\"=>\"NOT (root OR nobody)\"));\n $datos = $usuarios->search($filtro, $atributos, \"dc=sv\");\n $this->parametros['errorLdap'] = $usuarios->getErrorLdap();\n return $datos; \n }", "public function Listar()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$result = array();\n\n\t\t\t$stm = $this->pdo->prepare(\"SELECT usuario.`correo`, `usuario`.`clave`, `rol`.`nomRol`, `datospersonales`.`Documento`\nFROM `usuario`\nLEFT JOIN `rol` ON `rol`.`nomRol` = `usuario`.`nomRol` \nLEFT JOIN `datospersonales` ON `datospersonales`.`Documento` = `usuario`.`Documento`\n WHERE correo is not null \");\n\t\t\t$stm->execute();\n\n\t\t\tforeach($stm->fetchAll(PDO::FETCH_OBJ) as $r)\n\t\t\t{\n\t\t\t\t$usu = new Usuario();\n\n\t\t\t\t$usu->__SET('correo', $r->correo);\n\t\t\t\t$usu->__SET('clave', $r->clave);\n\t\t\t\t$usu->__SET('nomRol', $r->nomRol);\n\t\t\t\t$usu->__SET('Documento', $r->Documento);\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t$result[] = $usu;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "function getUsersAdmin() {\n $usuarios = [];\n\n $con = crearConexion();\n\n $query = \"SELECT `username` FROM `usuario` WHERE `tipo`='0'\";\n\n $result = mysqli_query($con, $query);\n\n while ($row = mysqli_fetch_array($result)) {\n $usuarios[] = $row['username'];\n }\n\n cerrarConexion($con);\n return $usuarios;\n}", "public function readUsuarios()\n\t{\n\t\t$sql = 'SELECT IdRol, Nombre, Apellido, Telefono, Email, u.IdEstado, IdUsuario \n FROM usuarios u ORDER BY Apellido';\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "function all_usuarios(){\n\t\t$Query = 'SELECT * FROM tb_usuarios';\n\t\t$respuesta = ObtenerRegistros($Query);\t\n\t\treturn ConvertirUTF8($respuesta);\n\t}", "public function listarUsua(){\n\t\t$sql=\"SELECT USUARI_ID, USUARI_NOMBRES, USUARI_USUARIO\n\t\t FROM usuario ORDER BY USUARI_NOMBRES\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "private function consultar_usuario_todos() {\n $sentencia = \"select id,nombrecompleto ,correo,token from usuario u;\";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }", "public function ListarUsuarios()\n{\n\tself::SetNames();\n\t$sql = \" select * from usuarios \";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "public static function ListarUsuarios(){\n return (new Usuario)->FindBy([],[\"nombre asc\"]);\n }", "public function usuarios()\n {\n $parametros = Input::only('term');\n\n $data = SisUsuario::with(\"SisUsuariosGrupos\", \"SisUsuariosContactos\")->where(function($query) use ($parametros) {\n $query->where('nombre','LIKE',\"%\".$parametros['term'].\"%\")\n ->orWhere('email','LIKE',\"%\".$parametros['term'].\"%\");\n });\n\n $data = $data->get();\n return $this->respuestaVerTodo($data);\n }", "function obtenerUsuarios(){\n //Variable que almacena la consulta sql\n $sql = \"select login,Alias\n \t\t\tfrom ENTREGA\";\n\t\t//se ejecuta la query\n $resultado = $this->mysqli->query( $sql );\n if ( $resultado->num_rows == 0 ) { return null; }//miramos si el número de filas es 0.\n //Caragamos las tuplas resultado de la consulta en un array\n while($datos = mysqli_fetch_row ($resultado)){\n //Variable que almacena el array de las tuplas resultado de la query\n $miarray[] = $datos;\n }\n return $miarray;\n }", "public function listarUsuarios()\n {\n $usuarios = Usuarios::all();\n\n return $usuarios;\n }", "function listarUsuarios(){\n \n $conex=Conexion::getInstance();\n $stmt = $conex->dbh->prepare(\"SELECT * FROM usuarios\"); \n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->execute();\n $listaUsuarios=[];\n while ($row = $stmt->fetch()){\n $listaUsuarios[]=array('id'=>$row['id'],'usuario'=>$row['usuario'],'nombre'=>$row['nombre'],'admin'=>$row['admin'],'password'=>$row['password']) ; \n }\n return $listaUsuarios;\n}", "public function getUsuaris()\n {\n $usuarios = $this->_db->query(\"select * from usuarios\");\n return $usuarios->fetchall();\n }", "public function listarUsuarios()\r\n\t{\r\n\t\t$administradores=array();\r\n\t\ttry{\r\n\t\t\t//realizamos la consulta de todos los items\r\n\t\t\t$consulta = $this->db->prepare(\"select * from administrador\");\r\n\t\t\t$consulta->execute();\r\n\t\t\tfor($i=0; $row = $consulta->fetch(); $i++)\r\n\t\t\t{\r\n\t\t $fila['admin_cedula']=$row['ADMIN_CEDULA'];\r\n\t\t\t$fila['admin_login']=$row['ADMIN_LOGIN'];\r\n\t\t\t$fila['admin_nombre']=$row['ADMIN_NOMBRE'];\r\n\t\t\t$fila['admin_apellido']=$row['ADMIN_APELLIDO'];\r\n\t\t\t$fila['admin_status']=$row['ADMIN_STATUS'];\r\n\t\t\t$administradores[]=$fila;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\tcatch(PDOException $e)\r\n\t\t{\r\n\t\t\techo $e;\r\n\t\t}\r\n\t\treturn $administradores;\t\t\r\n\t}", "public function findTodosLosUsuarios()\n {\n $em = $this->getEntityManager();\n \n $consulta = $em->createQuery('SELECT u FROM UsuarioBundle:Usuario u');\n \n return $consulta->getResult();\n }", "public function utilisateurListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Utilisateur\");//type array\n\t}", "public function getUsuarios()\n {\n\n $sql = \"SELECT * FROM usuario\";\n\n foreach ($this->bd->query($sql) as $res) {\n $this->usuarios[] = $res;\n }\n return $this->usuarios;\n\n }", "public static function buscar($dato){\n $dato= \"%\".$dato.\"%\";\n $db = DWESBaseDatos::obtenerInstancia();\n\n $db -> ejecuta(\"SELECT *\n FROM usuario m WHERE m.nombre like ?\", $dato);\n\n\n return array_map(function($fila){\n return new Usuarios($fila['id'], $fila['email'], $fila['pass'],$fila['nombre'], $fila['foto_perfil'], $fila['localidad'], $fila['cp'], $fila['telefono']);\n },$db -> obtenDatos());\n\n\n }", "static public function ctrListarUsuario( ){\n\n\t\treturn ModeloUsuarios::mdlListarUsuario( );\n\n\t}", "function getAllUsuarios(){\n\t\t\tDB_DataObject::debugLevel(0);\n\t\t\t$obj = DB_DataObject::Factory('VenUsuario');\n\t\t\t$obj->find();\n\t\t\t$i = 0;\n\t\t\t$data='';\n\t\t\twhile($obj->fetch()){\n\t\t\t\t$data[$i]['idUsuario']=$obj->idUsuario;\n\t\t\t\t$data[$i]['idCargo']=$obj->idCargo;\n\t\t\t\t$nombreCargo=$this->getCargoById($obj->idCargo);\n\t\t\t\t$nombreCargo=utf8_encode($nombreCargo['nombre']);\n\t\t\t\t$data[$i]['cargo']= $nombreCargo;\n\t\t\t\t$data[$i]['nombre']=utf8_encode($obj->nombre);\n\t\t\t\t$data[$i]['apellido']=utf8_encode($obj->apellido);\n\t\t\t\t$data[$i]['email']=$obj->email;\n\t\t\t\t$data[$i]['usuario']=utf8_encode($obj->usuario);\n\t\t\t\t$data[$i]['contrasena']=utf8_encode($obj->contrasena);\n\t\t\t\t$data[$i]['puntos']=$obj->puntos;\n\t\t\t\t$data[$i]['estado']=$obj->estado;\n\t\t\t\t$data[$i]['fechaMod']=$obj->fechaMod;\n\t\t\t\t$data[$i]['fecha']=$obj->fecha;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$obj->free();\n\t\t\t//printVar($data,'getAllUsuarios');\n\t\t\treturn $data;\n\t\t}", "function fetchUsuario() {\n\n $usuarios = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM usuario\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id = $row['id'];\n $username = $row['username'];\n $password = $row['password'];\n $email = $row['email'];\n $poblacion = $row['poblacion'];\n $idioma = $row['idioma'];\n $telefono = $row['telefono'];\n $url = $row['url'];\n $foto = $row['foto'];\n $textoPresentacion = $row['textoPresentacion'];\n $administrador = $row['esAdministrador'];\n $registrado = $row['esUsuarioRegistrado'];\n $professional = $row['esUsuarioProfesional'];\n $usuario = new Usuario($id, $username, $password, $email, $poblacion, $idioma, $telefono, $url, $foto, $textoPresentacion, $administrador, $registrado, $professional);\n array_push($usuarios, $usuario);\n }\n\n return $usuarios;\n }", "function consultarUsuarios($conexion, $usuario){\r\n\t\t$consulta = \"SELECT * FROM Usuario WHERE Usuario = '$usuario'\";\r\n\t\t$resultado = mysqli_query($conexion, $consulta);\r\n\t\treturn $resultado;\r\n\t}", "public function mostrar_usuaris(){\n $sql = \"SELECT usuaris.id AS id, usuaris.nom AS nom, usuaris.cognoms AS cognoms, usuaris.email AS email,\n usuaris.idrol AS idrol, rols.descrip AS descrip FROM usuaris INNER JOIN rols ON usuaris.idrol = rols.id\";\n \n $query=$this->db->prepare($sql);\n $query->execute();\n $res=$query->fetchAll();\n return $res;\n }", "public static function getAllUsuario(){\n $v = array();\n\t\t$conexion = new Database();\n $sql = sprintf('SELECT * FROM agenda_usuarios' );\n $rows = $conexion->query( $sql );\n\n foreach( $rows as $row ){\n\t\t\t$u = new Usuario();\n\t\t\t$u->usuario = $row['USUARIO'];\n $u->password = $row['PASSWORD'];\n $u->codigo = $row['USUARIO_ID'];\n\t\t\t$v[] = $u;\n\t\t}\n return $v;\n }", "public function getdatosUsuarios(){\n\t\t$bd = new bd();\n\t\t$result = $bd->doSingleSelect($this->u_table,\"id = {$this->id}\");\n\t\tif($result){\n\t\t\t$this->datosUsuario($result[\"direccion\"], $result[\"telefono\"], $result[\"descripcion\"], $result[\"estados_id\"], $result[\"facebook\"], $result[\"twitter\"],$result[\"website\"],$result[\"certificado\"],$result[\"id_sede\"]);\n\t\t\t$this->id = $result[\"id\"];\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function traerNombreDeUsuarios(){\n $todosLosUsuarios = $this->buscarUsuarios();\n $ultimoId = $this->obtenerUltimoId();\n $nombres = [];\n $nombres['usuarios'] = array_map(function($item){\n return $item['nombre'];\n }, $todosLosUsuarios);\n //unset($nombres['usuarios'][0]);\n return $nombres;\n }", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public function obtenerUsuariosOnline(){\n return $this->obtenerUsuarios(\" uid_usuario IN ( SELECT uid_usuario FROM \". TABLE_USUARIO .\" u WHERE u.uid_usuario = uid_usuario AND conexion = 1 ) \");\n }", "function abmUsuarios()\n {\n $this->checkCredentials();\n $users = $this->modelUser->getAllUsers();\n $this->view->showAbmUsuarios($users);\n }", "public static function getList(){\n\t\t$sql = new sql();\n\n\t\treturn $sql->select(\"SELECT * FROM usuarios ORDER BY email;\");\n\n\t}", "public function retrieve_all_users()\n {\n $table_pengajar = $this->db->dbprefix('pengajar');\n $table_siswa = $this->db->dbprefix('siswa');\n $table_login = $this->db->dbprefix('login');\n\n $sql = \"SELECT {$table_login}.username, {$table_pengajar}.nama FROM {$table_pengajar} INNER JOIN {$table_login} ON {$table_pengajar}.id = {$table_login}.pengajar_id\n UNION\n SELECT {$table_login}.username, {$table_siswa}.nama FROM {$table_siswa} INNER JOIN {$table_login} ON {$table_siswa}.id = {$table_login}.siswa_id\";\n\n $result = $this->db->query($sql);\n\n $data = array();\n foreach ($result->result_array() as $r) {\n # selain yang login\n if (is_login() && $r['username'] == get_sess_data('login', 'username')) {\n continue;\n }\n $data[] = addslashes($r['nama']) . ' [' . $r['username'] . ']';\n }\n\n return $data;\n }", "function showUsuarios()\r\n\t{\r\n\t\t$valuesUsuarios = $this->User->find('all', array('conditions' => array('User.active' => 1),'order' => 'User.first_lastname ASC'));\r\n\t\t\r\n\t\tforeach ($valuesUsuarios as $value)\r\n\t\t{\r\n\t\t\t$resultadosUsuarios[$value['User']['id']]= $value['User']['first_lastname'].' '.$value['User']['second_lastname'].', '.$value['User']['name'];\r\n\t\t}\r\n\t\t\r\n\t\treturn $resultadosUsuarios;\r\n\t}", "function modeloUserGetAll (){\n // Genero lo datos para la vista que no muestra la contraseña ni los códigos de estado o plan\n // sino su traducción a texto\n $db = AccesoDatos::getModelo();\n $tusuarios = $db->getUsuarios();\n foreach ($tusuarios as $clave=>$user){\n \n $tabla[$user->id]= ['nombre'=>$user->nombre,\n 'correo'=>$user->correo,\n 'plan'=>PLANES[$user->plan],\n 'estado'=>ESTADOS[$user->estado],\n ];\n }\n return $tabla;\n}", "public static function obtenerUsuariosAccesos()\n {\n $consulta = \"SELECT * FROM usuarios, accesos WHERE (usuarios.id_usuario=accesos.id_usuario) ORDER BY usuarios.nombres ASC\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n return false;\n }\n }", "function getUsers(){\n }", "function getUsers(){\n }", "function recuperarSeguidosPor($nombre){\n\t\t\t$query= \"select usuario from seguir \n\t\t\twhere seguidor='\".$nombre.\"'\";\n\t\t\t$result = $this->mysqli->query($query);\n\t\t\t$usuarios = Array();\n\t\t\twhile($fila = $result -> fetch_assoc()){\n\t\t\t$usuarioSeguido= $this->recuperarUsuario($fila[\"usuario\"]);\n\t\t\t$usuarios[]=($usuarioSeguido);\n\t\t\t}\n\t\t\treturn $usuarios;\n\t\t}", "public static function getAll()\n {\n $consulta = \"SELECT * FROM usuarios\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n return false;\n }\n }", "public function getAll()\n {\n $usuario = new Usuario();\n return $usuario->getAll();\n }", "public function usuariosActivos(){\n\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT idUsuario, identificacion, nombre, apellido FROM tb_usuarios WHERE estado = 'A' AND agenda = 'Si'\";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n \tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado[] = $filas;\n } \n \n }//fin if\n\t\t\n return $resultado;\t\t\t\n\t\t\n\t}", "public function listAll(){\n $sql = \"SELECT id,name,email FROM users\";\n $stmt = $this->cnx->prepare($sql);\n $result = $stmt->execute();\n \n $resultados = array();\n\n while($rs = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $resultados[] = $rs;\n }\n \n if(empty($resultados)){\n throw new Exception(\"Nenhum usuario encontrado!\");\n }\n \n return $resultados;\n }", "public static function getlist(){\n $sql = new Sql();\n \n return $sql->select(\"SELECT * FROM tb_usuarios ORDER BY deslogin\");\n }", "public function get_all() {\n\t\t\n\t\treturn $this->db->get('usuarios');\n\t}", "public function findUsers();", "public function findUsers();", "public function buscarUsuarios(){\n $usuarios = file_get_contents('usuarios.json');\n $arrUsuariosJSON = explode(PHP_EOL,$usuarios);\n $arrUsuarioPHP = [];\n array_pop($arrUsuariosJSON);\n foreach ($arrUsuariosJSON as $key => $usuario) {\n $arrUsuarioPHP[] = json_decode($usuario,true);\n }\n return $arrUsuarioPHP;\n }", "function get_All_Users()\n\t\t{\n\t\t\ttry \n\t\t\t{\n\t\t\t\tinclude(\"model.php\");\n\t\t\t\t$sql = \"SELECT nomJoueur, mdpJoueur FROM joueurs\"; \n\t\t\t\t// Preparation de la requete\n\t\t\t\t$req = $pdo->prepare($sql);\n\t\t\t\t// execution de la requete\n\t\t\t\t$req->execute();\n\t\t\t\treturn $req->fetchAll(PDO::FETCH_OBJ);\n\t\t\t\t\n\t\t\t} \n\t\t\tcatch (PDOException $e) {\n\t\t\t\techo $e->getMessage();\n\t\t\t\tdie(\"<br /> Erreur dans la BDD \");\n\t\t\t}\n\t\t}", "public function UsuariosPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from usuarios where codigo = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codigo\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public static function recuperartodo(){\r\n\t\t\r\n\t\t\t$consulta = \"SELECT * FROM usuaris;\";\r\n\t\t\t$datos = Database::get()->query($consulta);//ejecutar la consulta\r\n\t\t\t$usuaris = array();\r\n\t\t\r\n\t\t\twhile($usuari = $datos->fetch_object('UsuarioModel'))\r\n\t\t\t\t$usuaris[] = $usuari;\r\n\t\t\t\t$datos->free();\t\t\t//liberar memoria\r\n\t\t\t\treturn $usuaris;\r\n\t\t}", "function listarUsuariosId($id){\n\t\t$activo = true;\n\t\t$query = \"SELECT * FROM usuarios WHERE idUsuario='$id' and activo='$activo'\";\n\t\t$link = conectar(); //llama a la funcion conectar de conex.php\n\t\t$resultdb = $link->query($query); //envia el query a la BD\n\t\tif ($resultdb->num_rows == 1) {\n\t\t\t$usuario = $resultdb->fetch_assoc();\n\t\t}\n\t\t$link->close();//cierro conex\n\t\techo json_encode($usuario);//imprimo un JSON con los datos de la consulta\n\t}", "public static function obtenerUsuariosCampo($campo)\n {\n // Consulta de la meta\n $consulta = \"SELECT * FROM usuarios, usuarios_roles WHERE ((CONCAT(usuarios.nombres, ' ', usuarios.correo, ' ', usuarios.cedula, ' ', usuarios.iniciales, ' ', usuarios.rol) ILIKE ?) AND (usuarios.rol=usuarios_roles.id_rol)) ORDER BY usuarios.nombres ASC\";\n\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute(array($campo));\n // Capturar primera fila del resultado\n //$row = $comando->fetch(PDO::FETCH_ASSOC);\n //return $row;\n\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n // Aquí puedes clasificar el error dependiendo de la excepción\n // para presentarlo en la respuesta Json\n return -1;\n }\n }", "public static function getUsers($request){\r\n //CONTEUDO DA PAGINA DE USUARIOS\r\n $content= View::render('admin/modules/users/index',[\r\n 'itens' => self::getUserItems($request,$obPagination),\r\n 'pagination' => parent::getPagination($request,$obPagination),\r\n\t\t\t'status' => self::getStatus($request)\r\n ]);\r\n\r\n //RETORNA A PAGINA COMPLETA \r\n return parent::getPanel('Usuarios - AliDEV',$content,'users');\r\n\r\n\r\n }", "public function listausuarios(){\n $user = Usuario::with('rol')->paginate(15);\n $lista_usuarios = compact('user'); \n\n return $this->sendResponse($lista_usuarios, 'Listado de usuarios devueltos con éxito');\n\n }", "function listado_directorios_usuario($id_usuario) {\n\t\t\n\t\t$query = \"SELECT * FROM repositorio_directorios WHERE id_usuario='$id_usuario'\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\t\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function listarCuentaBancariaUsuario(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_sel';\n\t\t$this->transaccion='TES_USRCTABAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('permiso','permiso','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_baja','date');\n\t\t$this->captura('nro_cuenta','varchar');\n\t\t$this->captura('fecha_alta','date');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('nombre_institucion','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_moneda','integer');\n\t\t$this->captura('codigo_moneda','varchar');\n\t\t$this->captura('denominacion','varchar');\n\t\t$this->captura('centro','varchar');\n\t\t$this->captura('id_finalidads','varchar');\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function getUsers(){\n\t\t$query = $this->db->get('usuarios');\n\t\tif($query->num_rows() > 0) return $query;\n\t\telse return NULL;\n\t}", "function findAll() \n {\n $usuarios = array();\n $n=0;\n $sql=\"select u.id,u.nombre,u.paterno,u.materno,u.username,u.fechaAlta,\".\n \" u.estatus,u.idTipoUsuario,tu.descripcion from Usuarios u\".\n \" inner join TipoUsuarios tu on tu.id=u.idTipoUsuario\".\n \" order by u.id\";\n \n $usuariosRs = mysqli_query($this->_connDb, $sql); \n while ($row = mysqli_fetch_array($usuariosRs)) {\n $oUsuario = new Usuario(0);\n $oUsuario->setId($row['id']);\n $oUsuario->setNombre($row['nombre']);\n $oUsuario->setPaterno($row['paterno']);\n $oUsuario->setMaterno($row['materno']);\n $oUsuario->setUsername($row['username']);\n $oUsuario->setFechaAlta($row['fechaAlta']);\n $oUsuario->setEstatus($row['estatus']);\n\n // Creamos el objeto de tipo TipoUsuario\n $oTipoUsuario = new TipoUsuario($row['idTipoUsuario']);\n $oTipoUsuario->setDescripcion($row['descripcion']);\n\n // Inyectamos la dependencia de TipoUsuario\n $oUsuario->setTipoUsuario($oTipoUsuario);\n $usuarios[$n]=$oUsuario;\n $n++; \n }\n return $usuarios;\n }", "function obtenerDatosUsuario($parametros) {\n $sql = \"SELECT nombre, apellidos, email, telefono, dni, administrador, pass FROM usuarios WHERE dni = :dni\";\n\n //Preparamos la consulta\n $consulta_usuario = $this->conexionBBDD->prepare($sql,array());\n\n //Ejecutamos la consulta\n $consulta_usuario->execute($parametros);\n\n //Devolvemos los resultados\n return $consulta_usuario->fetch(PDO::FETCH_NUM);\n }", "public function consultarUsuario(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT c.*, a.permissao FROM tbusuarios c, tbpermissao a where c.idpermissao = a.idpermissao and permissao <> 'SUPER-ADMIN'order by c.nome\";\n $sql = $this->conexao->query($sql);\n\n $dados = array();\n\n while ($row = $sql->fetch_assoc()) {\n $idusuario = $row[\"idusuario\"];\n $nome = $row[\"nome\"];\n $email = $row[\"email\"];\n $dtnascimento = $row[\"dt_nascimento\"];\n $telefone = $row[\"telefone\"];\n $dtnascimento = $row[\"dt_nascimento\"];\n $habilitado = $row[\"habilitado\"];\n $permissao = $row[\"permissao\"]; \n $idpermissao = $row[\"idpermissao\"]; \n\n $dado = array();\n $dado['idusuario'] = $idusuario;\n $dado['nome'] = $nome;\n $dado['email'] = $email;\n $dado['senha'] = $row['senha'];\n $dado['senha_confirma'] = $row['senha_confirma'];\n $dado['idpermissao'] = $idpermissao;\n $dado['permissao'] = $permissao;\n $dado['telefone'] = $telefone;\n $dado['dtnascimento'] = $dtnascimento;\n $dado['habilitado'] = $habilitado; \n $dados[] = $dado;\n }\n\n return $dados;\n\n }", "public function getAllUsers() {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new SecurityDAO($dbObj);\n return $this->DAO->getAllUsers();\n }", "public function citas_usuariosCitas(){\n \t\n\t\t\t$resultado = array();\n\t\t\n\t\t\t$query = \" SELECT idUsuario, identificacion, nombre, apellido\n\t\t\t\t\t\tFROM tb_usuarios\";\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n }", "public function getList(){\n\t\t$resultsUsers = [];\n\t\t$q = $this->pdo->query('SELECT * FROM utilisateur');\n\t\twhile ($donnee = $q->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$resultsUsers[] = new Utilisateur($donnee);\n\t\t}\n\t\treturn $resultsUsers;\n\t}", "public function getUsers()\n {\n $usuarios = $this->Etapas->getUsers()->usuarios->usuario; //usuarios seg.users\n echo json_encode($usuarios);\n }", "public function listarUsuarios(){\r\n $sql = \"SELECT U.IdUsuario, U.NombreCompleto, U.Usuario, U.Correo, U.Estado, U.IdRol, R.Rol\r\n FROM usuarios AS U\r\n INNER JOIN roles AS R ON U.IdRol = R.IdRol;\";\r\n $tabla = $this->conexion->getTable($sql);\r\n return $tabla;\r\n}", "public function getUsuarios()\n {\n return $this->usuarios;\n }", "function getList() {\n $this->db->getCursorParameters(self::TABLA);\n $respuesta = array();\n while ($fila = $this->db->getRow()) {\n $objeto = new Usuario();\n $objeto->set($fila);\n $respuesta[] = $objeto;\n }\n return $respuesta;\n }", "public function infoUsuariosPorProyectoList(){\n\n $usuarios = UsersModel::infoUsuariosPorProyecto(\"usuario\", $_SESSION[\"id_project\"]);\n \n foreach ($usuarios as $row => $item) {\n echo '<option value=\"'.$item[\"Email\"].'\">'.$item[\"Email\"].'</option>'; \n }\n\n }", "public function getAllUser(){\n $users = $this->bdd->query('SELECT * FROM users');\n $users->execute();\n\t\treturn $users->fetchALL(\\PDO::FETCH_ASSOC);\n }", "public static function modeloUserGetAll ():array {\n // Genero lo datos para la vista que no muestra la contraseña ni los códigos de estado o plan\n // sino su traducción a texto\n $stmt=self::$db->query(\"select * from Usuarios\");\n $usuarios=[];\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n while ($cod=$stmt->fetch()) {\n $datosuser= [\n $cod[\"nombre\"],\n $cod[\"email\"],\n PLANES[$cod[\"plan\"]],\n ESTADOS[$cod[\"estados\"]]\n ];\n $usuarios[$cod[\"user\"]]=$datosuser;\n }\n return $usuarios;\n}", "function listaUtentiScuola($passordIsNull = FALSE, $userNotVisible = FALSE) {\n if ($this->connectToMySql()) {\n $query = \"SELECT id_utente , cognome , nome , email , password ,\n user_is_admin FROM scuola.utenti_scuola \";\n if ($passordIsNull && !$userNotVisible) {//$passordIsNull TRUE\n $query .= \" WHERE NOT isnull(password) \";\n } elseif (!$passordIsNull && $userNotVisible) {//$userNotVisible TRUE\n $query .= \"WHERE id_utente != \" . $_COOKIE['id_utente'];\n } elseif ($passordIsNull && $userNotVisible) {\n $query .= \" WHERE NOT isnull(password) AND id_utente != \" . $_COOKIE['id_utente'];\n }\n $query .= \" ORDER BY cognome , nome\";\n // Perform Query\n $result = mysql_query($query);\n //$array = mysql_fetch_assoc($result);\n }\n $this->closeConnection();\n return $result;\n }", "function getUsers()\n {\n $sql = \"SELECT * FROM \" . DB_NAME . \".`customers`\";\n\n try {\n $result = $this->connexion->prepare($sql);\n $var = $result->execute();\n $users = [];\n\n while ($data = $result->fetch(PDO::FETCH_OBJ)) {\n $user = new UserEntity();\n $user->setIdUser($data->idUser);\n $user->setNom_societe($data->Nom_societe);\n $user->setAbreviations($data->Abreviations);\n $user->setAdresse($data->Adresse);\n $user->setTel($data->Tel);\n $user->setEmail($data->Email);\n $user->setSecteur($data->Secteur);\n $user->setCreatedAt($data->createdat);\n\n $users[] = $user;\n }\n\n if ($users) {\n return $users;\n } else {\n return FALSE;\n }\n } catch (PDOException $th) {\n return NULL;\n }\n }", "public function listUsersAdmin(){\n $sql=\"SELECT id_people,dni,first_name,last_name,adress,email,is_active FROM people WHERE is_user=1\";\n $rs=$this->con->prepare($sql);\n $rs->execute();\n return $rs->fetchAll(PDO::FETCH_OBJ);\n }", "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 }", "function obtener_usuarios($conexion) {\n $sentencia = $conexion->prepare(\"SELECT * FROM usuarios ORDER BY id DESC\");\n $sentencia->execute();\n return $sentencia->fetchAll();\n}", "private function consultar_usuario_por_nombre() {\n $sentencia = \"select id,nombrecompleto ,correo,token \"\n . \"from usuario u where u.nombrecompleto ilike '%{$this->referencia_a_buscar}%'; \";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }", "public function getUsers() {\n $this->checkValidUser();\n\n $this->db->sql = 'SELECT id, username FROM '.$this->db->dbTbl['users'].' ORDER BY username';\n\n $res = $this->db->fetchAll();\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'sdop6'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'ffUI8',\n 'users' => $res\n );\n }\n\n $this->renderOutput();\n }", "public function getUsuariosLogin($datos)\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from usuarios WHERE correo=:correo && password=:contrasena');\n $stmt->bindParam(\":correo\", $datos[\"correo\"] , PDO::PARAM_STR);\n $stmt->bindParam(\":contrasena\", $datos[\"contrasena\"] , PDO::PARAM_STR);\n if($stmt->execute())\n {\n \n //Variables para iniciar una sesion \n \n $respuesta = $stmt->rowCount();\n $resultado =$stmt->fetch();\n session_start();\n $_SESSION[\"idUsuario\"]=$resultado[\"idUsuario\"];\n $_SESSION[\"nombre\"]=$resultado[\"nombre\"];\n $_SESSION[\"apellido\"]=$resultado[\"apellido\"];\n $_SESSION[\"nombre_usuario\"]=$resultado[\"nombre_usuario\"];\n $_SESSION[\"contrasena\"]=$resultado[\"password\"];\n $_SESSION[\"apellido\"]=$resultado[\"apellido\"];\n $_SESSION[\"correo\"]=$resultado[\"correo\"];\n $_SESSION[\"fecha_registro\"]=$resultado[\"fecha_registro\"];\n $_SESSION[\"ruta_img\"]=$resultado[\"ruta_img\"];\n $_SESSION[\"tipoUsuario\"]=$resultado[\"tipoUsuario\"];\n\n return $respuesta;\n }else\n {\n return \"error\";\n }\n }", "static function getAllUsers(){\n $users = User::where('email','<>','admin')->paginate(4);\n\n if(count($users) != 0){\n return view('partials.adminUsersList')->with('users',$users);\n } else {\n echo \"Aún no hay usuarios registrados.\";\n }\n\n }", "public function getUsuarios($order){\r\n\t$pdo = Database::connect();\r\n\t//verificamos el ordenamiento asc o desc:\r\nif($orden==true)//asc\r\n$sql = \"select * from usuario order by nombre\";\r\nelse //desc\r\n\t$sql = \"select * from usuario order by nombre desc\";\r\n\t$resultado = $pdo->query($sql);\r\n//transformamos los registros en objetos de tipo usuario:\r\n\t$listado = array();\r\n\tforeach ($resultado as $res){\r\n\t\t$usuario = new usuario();\r\n\t\t$usuario->setCodigo($res['codigo']);\r\n\t\t$usuario->setNombre($res['nombre']);\r\n\t\t$usuario->setPrecio($res['precio']);\r\n\t\t$usuario->setCantidad($res['cantidad']);\r\n\t\tarray_push($listado, $usuario);\r\n\t}\r\n\tDatabase::disconnect();\r\n//retornamos el listado resultante:\r\n\treturn $listado;\r\n}", "function get_all_user($koneksi){\n\t\t$query = \"SELECT * FROM v_user\";\n\n\t\t$statement = $koneksi->prepare($query);\n\t\t$statement->execute();\n\t\t$result = $statement->fetchAll();\n\n\t\treturn $result;\n\t}", "public function getAllUsers(){\n $stmt = $this->databaseConnection->prepare(\"SELECT users.login, users.phone, users.invite, cities.city_name, invites.date_status_\n FROM users\n LEFT JOIN cities ON users.id_city = cities.id_city\n LEFT JOIN invites ON users.invite = invites.invite\");\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function get_info_usuario($id_usuario){\n\n return $this->db->query(\"SELECT*\n FROM usuarios\n WHERE usuarios.usuario_id = $id_usuario\")->result_array();\n }", "public function getAllUsers(){\n\t\n\t\t$db = new Database();\n\t\t$conn= $db->getConn();\n\t\t$rs = $conn->query(\"select * from login\");\n\t\t$num_of_row = $rs->num_rows;\n\t\tif($num_of_row >0){\n\t\t\twhile($row = $rs->fetch_assoc()){\n\t\t\t\t$users[]=array('username'=>$row['username'],'password'=>sha1($row['password']),'email'=>$row['email'],'user_type'=>$row['user_type']);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $users;\n\t}", "public function getAllUsers() {\n $sql = 'SELECT id, firstname, mail, role, isAdmin FROM user';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array());\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n }" ]
[ "0.83681846", "0.7818351", "0.7800432", "0.77368486", "0.75791925", "0.75250095", "0.75234514", "0.75049764", "0.746439", "0.74233663", "0.740634", "0.73891306", "0.7364318", "0.73588616", "0.7349994", "0.734593", "0.7306767", "0.7270997", "0.7263026", "0.7242003", "0.7226064", "0.72254324", "0.7221323", "0.7191969", "0.7128532", "0.7124797", "0.7121832", "0.71022564", "0.7088349", "0.7072681", "0.70705664", "0.7056151", "0.7054632", "0.7048281", "0.7023094", "0.7004385", "0.6962679", "0.69621617", "0.69614315", "0.6956109", "0.6955777", "0.6946966", "0.6946966", "0.6946966", "0.6946758", "0.6939028", "0.69295174", "0.6904351", "0.6896793", "0.68853897", "0.6832771", "0.68217", "0.68217", "0.6820281", "0.6816765", "0.68118966", "0.68115", "0.6794022", "0.6787547", "0.6785295", "0.67840356", "0.67840356", "0.6781221", "0.67789215", "0.67772704", "0.677628", "0.6776068", "0.6774571", "0.6765031", "0.67608297", "0.6758737", "0.67488045", "0.6746012", "0.67363054", "0.672959", "0.6720315", "0.6716719", "0.67084265", "0.67078066", "0.6707504", "0.6705909", "0.6704534", "0.66986555", "0.66949254", "0.6694212", "0.66937673", "0.66861874", "0.668162", "0.66787285", "0.66769403", "0.66752934", "0.6674929", "0.66684824", "0.6660823", "0.6660808", "0.66526127", "0.66518724", "0.66515046", "0.6645862", "0.66327584", "0.66180307" ]
0.0
-1
/FUNCIONES DE VENTA DE SERVICIOS
function anularVenta_servicio($idFactura, $estado){ $this->db->set('estado', $estado); $this->db->where('idFactura' ,$idFactura); $this->db->update('ventaservicio'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexenvios()\n {\n $envios=OrdenEnvio::with(\"NombreSucursal\")->get();\n if(!$envios){\n return response()->json(['mensaje' => 'No se encuentran envios actualmente','codigo'=>404],404);\n }\n return response()->json(['datos' => $envios],200);\n }", "function act_estado_servidor()\n {\n $arr_estado_servidor = $this->input->post('json_estado_tablas');\n $this->Develop_model->act_estado_servidor($arr_estado_servidor);\n \n $this->output\n ->set_content_type('application/json')\n ->set_output(count($arr_estado_servidor));\n }", "public function accionIndex(){\n $obJson = json_decode(file_get_contents('php://input'), true);//String JSON ----> ARRAY ASOCIATIVO\n \n \n $opinionUsu = intval($obJson[\"votoUsu\"]);\n $codMensaje = intval($obJson[\"codMensaje\"]);\n $codUsuario = Sistema::app()->ACL()->getCodUsu(Sistema::app()->acceso()->getNick());\n \n \n \n $vComentario = new valoracion_comentarios();\n \n $vComentario->cod_usuario = $codUsuario;\n $vComentario->cod_comentario = $codMensaje;\n $vComentario->opinion = $opinionUsu;\n $vComentario->reportado = 0;\n $vComentario->cod_valoracion = 1;\n \n if($vComentario->validar()){\n \n if(!$vComentario->guardar()){\n $respuestaJson[\"insertado\"] = \"n\";\n }\n else{\n $respuestaJson[\"insertado\"] = \"y\";\n }\n }\n \n \n }", "public function mostrarservicios(){\n $mostrarservicios = $this->mostrar();\n require '../inicio/servicios.php';\n }", "public function accionIndex(){\n \n if(!Sistema::app()->acceso()->hayUsuario()){\n Sistema::app()->paginaError(400,\"Solos los usuarios registrados pueden acceder\");\n exit;\n }\n\n //llega el pase de la pelicula\n $codPase = intval($_GET[\"id\"]);\n \n //obtener las entradas compradas para ese pase, esa pelicula y esa hora\n $entUsuarios = new Entradas_usuarios();\n $pasePelicula = new Pases_peliculas();\n $sala = new Salas();\n $asientos = new Asientos();\n $entAnonimos = new Entradas_anonimos();\n \n \n $pasePelicula->buscarPorId($codPase);//CONTROLAR QUE EXISTE.\n //CONTROLAR TAMBIEN SI HA CADUCADO.\n \n //obtengo la sala donde se proyecta ese pase\n $sala->buscarPorId($pasePelicula->cod_sala);\n \n \n $opFil[\"select\"] = \"cod_asiento, fila, columna\";\n $opFil[\"where\"] = \"t.cod_sala =\".$pasePelicula->cod_sala;\n $opFil[\"order by\"] = \"fila, columna\";\n \n $totalAsientos = $asientos->buscarTodos($opFil);\n \n //tengo todos las entradas para ese pase.\n $opFiltrado[\"where\"] = \"t.cod_pase_pelicula = \".$codPase;\n $entradasUsu = $entUsuarios->buscarTodos($opFiltrado);\n $entradasAnon = $entAnonimos->buscarTodos($opFiltrado);\n \n $filas = $sala->n_filas;\n $columnas = $sala->n_columnas;\n $capacidad = $sala->capacidad;\n \n \n $asientosOcupados = [];\n \n //Si no hay entradas compreadas para este pase, no se ejecuta ---\n \n if(!empty($entradasUsu)||!empty($entradasAnon)){\n $asientosOcupados = $this->asientosOcupados($entradasUsu, $entradasAnon);\n }\n \n //if(!empty($entradasAnonimos)){\n // $asientosOcupados2 = $this->asientosOcupados($entradasAnonimos);\n // var_dump($asientosOcupados2);\n //}\n \n if(isset($_POST[\"butacas\"])){\n \n //llega el imput que almacena en un string creado en js\n //con un string con todos los asientos seleccionados\n $asientosSel = explode(\",\", $_POST[\"butacas\"]);\n \n Sistema::app()->sesion()->set(\"butacas\",$asientosSel);\n Sistema::app()->sesion()->set(\"codPase\",$codPase);\n \n Sistema::app()->irAPagina(array(\"entradasUsuarios\",\"mostrarResumen\"));\n exit;\n }\n \n \n $this->dibujaVista(\"mostrarCine\",array(\"asientosOcupados\"=>$asientosOcupados,\n \"filas\"=>$filas,\n \"cols\"=>$columnas,\n \"codPase\"=>$codPase,\n \"codAsientos\"=>$totalAsientos\n ),\n \"CINES MELERO\");\n \n \n \n }", "function listarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_sel';\r\n\t\t$this->transaccion='tgv_SERVIC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_servicio','int4');\r\n\t\t$this->captura('estado','varchar');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('id_lugar_destino','int4');\r\n\t\t$this->captura('id_ep','int4');\r\n\t\t$this->captura('fecha_asig_fin','date');\r\n\t\t$this->captura('fecha_sol_ini','date');\r\n\t\t$this->captura('descripcion','varchar');\r\n\t\t$this->captura('id_lugar_origen','int4');\r\n\t\t$this->captura('cant_personas','int4');\r\n\t\t$this->captura('fecha_sol_fin','date');\r\n\t\t$this->captura('id_funcionario','int4');\r\n\t\t$this->captura('fecha_asig_ini','date');\r\n\t\t$this->captura('id_usuario_reg','int4');\r\n\t\t$this->captura('fecha_reg','timestamp');\r\n\t\t$this->captura('id_usuario_mod','int4');\r\n\t\t$this->captura('fecha_mod','timestamp');\r\n\t\t$this->captura('usr_reg','varchar');\r\n\t\t$this->captura('usr_mod','varchar');\r\n\t\t$this->captura('desc_funcionario','text');\r\n\t\t$this->captura('desc_lugar_ini','varchar');\r\n\t\t$this->captura('desc_lugar_des','varchar');\r\n\t\t$this->captura('id_funcionario_autoriz','int4');\r\n\t\t$this->captura('observaciones','varchar');\r\n\t\t$this->captura('desc_funcionario_autoriz','text');\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t//echo '--->'.$this->getConsulta(); exit;\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "public function run()\n\t\t{\n\t\t\tswitch ($_GET['act']) {\n\t\t\t\tcase 'create':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->create();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'lists':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->lists();\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'listsDetails':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->listsDetails();\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'get':\n\t\t\t\t\t//Obtener una Remision\n\t\t\t\t\t$this->getRemision();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'getFolio':\n\t\t\t\t\t$this->getFolio();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\techo $this->json_encode(array('error'=>SERVICIO_INEXISTENTE,'data'=>NULL,'mensaje'=>'Este servicio no está disponible'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA DE SERVICIO INEXISTENTE\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "function MostrarPaginaIngresarServicio()\n {\n if ($this->admin) {\n $this->viewservices->ingresarServicio();\n } else {\n header(\"Location: \" . BASE_URL);\n }\n }", "function BusquedaServicios($params){\n $servicios = null;\n if(!empty($_POST['buscar'])){\n $id = $_POST['buscar'];\n $servicios = $this->Smodel->BuscarServicio($id);\n\n if($servicios){\n $this->view->ShowBusquedas($servicios);\n }\n else{\n $msg= \"NO SE ENCONTRARON RESULTADOS\";\n $this->view->ShowBusquedas($servicios, $msg);\n }\n }\n\n else{\n $msg= \"POR FAVOR INGRESE UN PARAMETRO PARA BUSCAR\";\n $this->view->ShowBusquedas($servicios, $msg);\n }\n }", "function finalizarSolicitudServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_ime';\r\n\t\t$this->transaccion='tgv_FINSOLSER_MOD';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_servicio','id_servicio','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "public function index()\n {\n //\n\n /*Fazer consulta na api do banco cbss para retornar os dados do contrato e também limites*/\n// $this->ConfiguracoesAPI();\n\n// else{\n\n\n return view('emprestimo.pedido');\n\n// }\n }", "public function servicio(Request $request, Response $response, $args)\n{\n //Variables\n $datin=Array();\n /*validando los argumentos que recibimos*/\n if(isset($args['idPadre'])) $idPadre = $args['idPadre'];\n\tif(isset($args['idContenido'])) $idContenido = $args['idContenido'];\n\tif(isset($args['idHijo'])) $idHijo = $args['idHijo'];\n \n $servicio=\"servicio\";\n $datin=MunlimaControlador::plantillaDos($args,$servicio);\n\n $this->view->render($response, \"weblima/servicio.twig\", $datin);\n return $response;\n}", "function index() {\n \n //llamamos al metodo renderizar para que muestre la vista enviada\n //por parametro\n if(session::get('autenticado')){\n $this->_vista->titulo = 'Multiservicios Frank';\n $this->_vista->renderizar('index'); \n }\n else{\n header('location:' . BASE_URL );\n exit;\n }\n }", "public function index()\n {\n //cargar todos los pedidos\n $pedidos = \\App\\Pedido::with('usuario')\n ->with('repartidor')\n ->with('productos.establecimiento')\n ->orderBy('id', 'desc')\n ->get();\n\n if(count($pedidos) == 0){\n return response()->json(['error'=>'No existen pedidos en el historial.'], 404); \n }else{\n return response()->json(['pedidos'=>$pedidos], 200);\n } \n }", "public function progresoventaAction(){\r\n //$fecha= $request->get('fecha');\r\n //$empleados=$this->verificarComision(null,$fecha);\r\n return array(\r\n //'empleados' => $empleados,\r\n //'fecha' => $fecha,\r\n );\r\n }", "public function vistaReservasController(){\n //Se envia la consulta al model para que regrese la informacion\n $respuesta = Datos::vistaReservasModel();\n //y esta es enviada a la vista para ser procesada y mostrada.\n return $respuesta;\n }", "public function index($Parametros){\n //Se verifica si el usuario esta memorizado en las cookie de su computadora y las compara con la BD, para recuperar sus datos y autorellenar el formulario de inicio de sesion, las cookies de registro de usuario se crearon en validarSesion.php\n if(isset($_COOKIE[\"id_usuario\"]) AND isset($_COOKIE[\"clave\"])){//Si la variable $_COOKIE esta establecida o creada\n // echo \"Cookie afiliado =\" . $_COOKIE[\"id_usuario\"] .\"<br>\";\n // echo \"Cookie clave =\" . $_COOKIE[\"clave\"] .\"<br>\";\n \n $Cookie_usuario = $_COOKIE[\"id_usuario\"];\n \n //Se CONSULTA el usuario registrados en el sistema con el correo dado como argumento\n $usuarioRec= $this->ConsultaLogin_M->consultarUsuarioRecordado($Cookie_usuario);\n $Datos=[\n \"usuarioRecord\"=>$usuarioRec,\n ];\n \n //Se entra al formulario de sesion que esta rellenado con los datos del usuario\n $this->vista(\"paginas/login_Vrecord\", $Datos);\n }\n else{\n $Datos = $Parametros;\n //Se carga la vista login_V\n $this->vista(\"paginas/login_V\", $Datos);\n }\n }", "public function buscarpcionesParametrosEsteticaAction()\r\n {\r\n $isAjax = $this->get('Request')->isXMLhttpRequest();\r\n if($isAjax){\r\n $id = $this->get('request')->request->get('id');\r\n \r\n $em = $this->getDoctrine()->getManager(); \r\n $dql = \"SELECT opcdet.id opcion, opcdet.nombre, det.id \"\r\n . \"FROM DGPlusbelleBundle:OpcionesDetalleEstetica opcdet \"\r\n . \"JOIN opcdet.detalleEstetica det \"\r\n . \"WHERE opcdet.detalleEstetica = :id\";\r\n \r\n $parametros = $em->createQuery($dql)\r\n ->setParameter('id', $id)\r\n ->getResult();\r\n \r\n $response = new JsonResponse();\r\n $response->setData(array(\r\n 'query' => $parametros\r\n )); \r\n \r\n return $response; \r\n } else { \r\n return new Response('0'); \r\n } \r\n }", "public function index()\n {\n //\n $ordenDeCompra = OrdenDeCompra::all();//->where('delete',false);\n if($ordenDeCompra != NULL){\n return response()->json($ordenDeCompra);\n }\n return response()->json([\n \"message\"=>\"No se encontró la orden de compra solicitada\"\n ],404);\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 index(){\n\t\t\t//$nombre=$this->articuloModelo->obtenerDatos();\n\t\t\t$PersonasRequest=$this->Personas->MostrarPersonas();\n\t\t\t//$PersonasR=$this->Personas->Insertar();\n\t\t\t$datos=[\n\t\t\t'Valores'=> 'Bienvenido',\n\t\t\t'Personas' => $PersonasRequest\n\t\t\t];\n\t\t\t$this->vista(\"PersonasV\",$datos);\n\n\t\t}", "public function consultasenlinea(Request $request, Response $response, $args)\n{\n //Variables\n $datin=Array();\n /*validando los argumentos que recibimos*/\n if(isset($args['idPadre'])) $idPadre = $args['idPadre'];\n if(isset($args['idContenido'])) $idContenido = $args['idContenido'];\n if(isset($args['idHijo'])) $idHijo = $args['idHijo'];\n \n $servicio=\"consultasenlinea\";\n $tituloservicio=\"CONSULTAS EN LÍNEA\";\n $datin=MunlimaControlador::plantillaUno($args,$servicio,$tituloservicio);\n\n $this->view->render($response, \"weblima/consultasenlinea.twig\", $datin);\n return $response;\n}", "public function indexhoy()\n {\n $partidoshoy=PartidoCalendario::with(\"EquipoCasaNombre\",\"EquipoVisitaNombre\",\"NombreLiga\")->orderBy('hora_partido','ASC')->where('fecha_partido','=',Carbon::today())->get();\n if(!$partidoshoy){\n return response()->json(['mensaje' => 'No se encuentran partidos actualmente','codigo'=>404],404);\n }\n return response()->json(['datos' => $partidoshoy],200);\n }", "public function obtenerListaPaises() { \r\n\r\n //objeto que maneja los requerimientos/peticiones\r\n $request = new simpleRest();\r\n //obtiene los datos de la peticion\r\n //$json = $request->getHttpRequestBody();\r\n //objeto que maneja las codificaciones/descodificaciones\r\n $handler = new requestRestHandler();\r\n \r\n //if (filter_var($username, FILTER_VALIDATE_EMAIL)) { \r\n $consulDB = new consultasDB(); \r\n //$this->mostrarRespuesta($this->convertirJson($respuesta), 200); \r\n $responsePaises = $consulDB->obtenerListaPaises();\r\n\r\n //echo $responseUsuario;\r\n //$datosRespuesta = (array)$handler->decodeJson($responsePaises);\r\n $datosRespuesta = $responsePaises;\r\n //$datosRespuesta = $handler->decodeJson($responsePaises);\r\n\r\n if (!isset($datosRespuesta[\"error\"])){\r\n //$respuesta['usuario'] = $username;\r\n $responseObtenerPaises[\"error\"] = \"false\";\r\n $responseObtenerPaises[\"status\"] = \"OK\";\r\n $responseObtenerPaises[\"message\"] = \"SUCCESS\";\r\n $responseObtenerPaises['fecha'] = ObtenerFecha(); //Obtiene la fecha actual\r\n //Aqui se implementa el manejo del token\r\n $responseObtenerPaises[\"respuesta\"] = $datosRespuesta;\r\n\r\n }\r\n else {\r\n //Hay posiblidades: 1 - usuario no existe 2 - clave invalida\r\n $responseObtenerPaises[\"error\"] = \"true\";\r\n $responseObtenerPaises[\"status\"] = \"error\";\r\n $responseObtenerPaises[\"message\"] = $datosRespuesta['error'];\r\n $responseObtenerPaises['fecha'] = \"\";\r\n $responseObtenerPaises[\"respuesta\"] = \"{}\";\r\n }\r\n\r\n $consulDB = null;\r\n //enviar respuesta\r\n return $responseObtenerPaises;\r\n\r\n //}\r\n \r\n }", "public function __construct()\n {\n include(\"dados_conexao.php\");\n include(\"servicos.php\");\n\n //& Alterar aqui depois os dados para a consulta no BD \n $this->tempoMenu = 7200; //Tempo entre a última mensagem e a possibilidade de enviar o menu novamente\n $idInstancia = 1;\n $this->idInstancia = $idInstancia;\n\n //Recebe o corpo do Json enviado pela instância\n $json = file_get_contents('php://input');\n $decoded = json_decode($json, true); //Decodifica\n\n //Grava o JSON-body no arquivo de debug\n ob_start();\n var_dump($decoded);\n $input = ob_get_contents();\n ob_end_clean();\n\n //Coloca para salvar todas as requisições recebidas em um arquivo de log\n //file_put_contents('inputs.log', $input . PHP_EOL, FILE_APPEND);\n\n\n\n //() Verifica SE É uma mensagem recebida \n if (isset($decoded['Type'])) {\n if ($decoded['Type'] == 'error_instace') {\n $this->logSis('DEB', 'error_instace - Tentativa da API: ' . $decoded['ErrorCount']);\n $this->reload($decoded['ErrorCount'], 0);\n exit(0);\n }\n $this->logSis('DEB', 'Tipo de mensagem: ' . $decoded['Type']);\n if ($decoded['Type'] == 'receveid_message') {\n $mensagemDeTexto = true;\n } else if (isset($decoded['Type']) && ($decoded['Type'] == 'receveid_audio_message' || $decoded['Type'] == 'whatsapp.StickerMessage' || $decoded['Type'] == 'receveid_video_message' || $decoded['Type'] == 'receveid_image_message' || $decoded['Type'] == 'receveid_document_message' || $decoded['Type'] == 'whatsapp.ContactMessage' || $decoded['Type'] == 'whatsapp.LocationMessage')) {\n $this->logSis('ERR', 'Cliente tentou enviar mídias');\n $mensagemDeTexto = false;\n } else {\n exit(0);\n }\n //if (isset($decoded['Type']) && ($decoded['Type'] == 'receveid_message' || $decoded['Type'] == 'receveid_audio_message')) {\n $RemoteJid = $decoded['Body']['Info']['RemoteJid'];\n $RemoteJidArray = explode(\"@\", $RemoteJid);\n $numero = $RemoteJidArray[0];\n $this->numerocliente = $numero;\n $this->numero = $numero;\n $tipoNumero = $RemoteJidArray[1];\n $idMensagemWhats = $decoded['Body']['Info']['Id'];\n $timestamp = $decoded['Body']['Info']['Timestamp'];\n $mensagem = $decoded['Body']['Text'];\n $this->stringMensagemAtual = $mensagem;\n\n\n //( Busca informações da instância CHATPRO no banco de dados \n $sql = \"SELECT * FROM tbl_instancias WHERE id_instancia = $idInstancia\";\n $query = mysqli_query($conn['link'], $sql);\n $consultaInstancia = mysqli_fetch_array($query, MYSQLI_ASSOC);\n $numRow = mysqli_num_rows($query);\n if (!$query) {\n echo \"Erro ao tentar conectar no MYSQL \" . mysqli_connect_error();\n $this->logSis('ERR', 'Mysql Connect: ' . mysqli_connect_error());\n\n exit(0);\n }\n if ($numRow == 0) { //VERIFICA SE EXISTE NO BANCO DE DADOS\n $this->logSis('ERR', \"Instância N/E: \" . $id_instancia);\n exit(0);\n } else {\n $this->APIurl = $consultaInstancia['endpoint'] . '/api/v1/';\n $this->token = $consultaInstancia['token'];\n $this->numerosuporte = $consultaInstancia['numero_suporte'];\n $this->conf_cad_dados = $consultaInstancia['conf_cad_dados'];\n $this->msg_cad_dados = $consultaInstancia['msg_cad_dados'];\n $this->msg_inicial = $consultaInstancia['msg_inicial'];\n $this->msg_erro = $consultaInstancia['msg_erro'];\n $this->menuRaiz = $consultaInstancia['menu_raiz'];\n $limite = $consultaInstancia['limite'];\n $status = $consultaInstancia['status'];\n $nome = $consultaInstancia['nome'];\n\n if ($mensagemDeTexto == false) {\n $this->logSis('DEB', 'Identificou mensagem de texto false.');\n $this->sendMessage('ErroFormatoMensagem', $this->numerocliente, \"Esse atendimento funciona somente com envio de texto.\\nFavor enviar sempre mensagens de texto.\", \"\");\n exit(0);\n }\n }\n\n\n //() Verifica se NÃO É uma mensagem recebida de um número ou GRUPO \n if ($tipoNumero == 's.whatsapp.net') {\n\n //( Consulta o contato no BD \n $sql = \"SELECT * FROM tbl_contatos WHERE numero = $numero AND id_instancia = $idInstancia\";\n $query = mysqli_query($conn['link'], $sql);\n $consultaContato = mysqli_fetch_array($query, MYSQLI_ASSOC);\n $numRow = mysqli_num_rows($query);\n\n if (!$query) {\n $this->logSis('ERR', \"Mysql Connect Erro: \" . mysqli_error($conn['link']));\n exit(0);\n }\n\n if ($numRow != 0) { //( O CONTATO EXISTE NO BANCO DE DADOS \n\n if ($consultaContato['bloqueio_bot'] == 1) {\n $this->logSis('DEB', \"Usuário bloqueado bot tentando contato. Contato: \" . $consultaContato['id_contato']);\n\n exit(0);\n }\n\n $this->id_contato = $consultaContato['id_contato'];\n $this->idContato = $consultaContato['id_contato'];\n $nome = $consultaContato['nome'];\n $email = $consultaContato['email'];\n $fase = $consultaContato['fase'];\n $teste = $consultaContato['teste'];\n\n //( Verifica as ultimas 4 mensagens trocadas, se tanto as respostas quanto os envios tiverem sido duplicados para o código\n //( Isso é pra tentar evitar BOT x BOT\n $result = fctConsultaParaArray(\n 'ConsultaBotXBot',\n \"SELECT direcao, mensagem FROM tbl_interacoes WHERE id_contato = $this->idContato ORDER BY id_interacao DESC LIMIT 4\",\n array('direcao', 'mensagem')\n );\n $arrayMensagem = [];\n $mensagemEnviada = '';\n foreach ($result as $linha) { //traz as mensagens para um array simples\n if ($mensagemEnviada == '' && $linha['direcao'] == 0) {\n $mensagemEnviada = $linha['mensagem'];\n }\n array_push($arrayMensagem, $linha['mensagem']);\n }\n $contagem = array_values(array_count_values($arrayMensagem)); //conta os itens e redefine os indices do array\n if (count($contagem) == 2 && $contagem[0] == 2 && $mensagemEnviada == $mensagem) { // Se tiver somente duas mensagens e cada uma tiver 2 mensagens é redundante\n array_push($arrayMensagem, $linha['mensagem']);\n $this->logSis('ERR', 'BOTXBOT PAROU. idContato: ' . $this->idContato);\n exit(0);\n }\n /*else{\n $this->logSis('ERR', 'BOTXBOT PASSOU. Contagem: ' . count($contagem).' Contagem0: '.$contagem[0].' Mensagem Enviada: '.$mensagemEnviada.' Mensagem do Cliente: '.$mensagem.' ArrayMensagem->'.print_r($arrayMensagem, true));\n exit(0);\n }*/\n } else { //( O CONTATO NÃO EXISTE \n $this->primeirocontato = true;\n\n //CONTATO NÃO EXISTE \n //( Insere o contato no banco de dados \n $sql = \"INSERT INTO tbl_contatos(id_instancia, numero, lista_0, teste, created_at) VALUES ('$idInstancia', '$numero', 1, 0, NOW())\";\n $resultado = mysqli_query($conn['link'], $sql);\n $this->id_contato = mysqli_insert_id($conn['link']);\n $this->idContato = mysqli_insert_id($conn['link']);\n if ($resultado != '1') {\n $this->logSis('ERR', 'Insert Contatos. Erro: ' . $resultado . mysqli_connect_error());\n }\n }\n\n //( Insere a interação que foi recebida no BD \n //& Quando inserir a mensagem do cliente, já trazer o ID para colocar na coluna id_retorno na mensagem que vamos enviar. \n //& Verificar também o retorno de erro, caso não consiga inserir o cliente. \n $resultado = $this->inserirInteracao($this->idInstancia, 0, $this->id_contato, '', '', '', '', '', '', $idMensagemWhats, $mensagem, 1);\n\n if ($resultado == '1') {\n $mensagem = explode(' ', trim($decoded['Body']['Text']));\n $palavra = mb_strtolower($mensagem[0], 'UTF-8');\n\n if ($this->primeirocontato == true) { //( Se for o primeiro contato\n //( Verifica se o e-mail é valido\n $this->validaEmail($palavra, $numero, true, $this->id_contato);\n } else if ($email == '') { //Sem e-mail cadastrado\n //( Verifica se o e-mail é valido\n $this->validaEmail($palavra, $numero, false, $this->id_contato);\n } else {\n\n //( Consulta a última interação enviada pra ver se foi a solicitação de nome \n $ultimaInteracao = $this->verificaInteracao($idInstancia, $this->id_contato);\n $tempoParaUltimaInteracao = $this->difDatasEmHoras($ultimaInteracao['dataEnvio'], date(\"Y-m-d H:i:s\"));\n\n if ($nome == '') {\n //( Caso não tenha enviado ainda a pergunta do nome\n if ($ultimaInteracao['mensagem'] != 'solicitaNome') {\n\n if ($tempoParaUltimaInteracao >= 2) { //Se tiver mais de 2 horas sem interação, dar umas boas vindas ao cliente\n $texto = 'Olá, que bom que está de volta! Para que eu possa te conhecer melhor, qual o seu nome?';\n } else {\n $texto = 'Olá, para que possamos seguir com o atendimento, por favor digite seu nome?';\n }\n $this->sendMessage(\"solicitaNome\", $numero, $texto, '');\n } else { //( Caso a última interação tenha sido solicitado o nome. \n //( Verifica a mensagem em busca do primeiro nome \n $nome = $this->verificaNome($decoded['Body']['Text']);\n if ($nome == \"\" || strlen($nome) < 2) { // não trouxe nada \n $texto = 'Não compreendi, pode por favor enviar somente o seu primeiro nome.';\n $this->sendMessage(\"solicitaNome\", $numero, $texto, '');\n } else { // encontrou o primeiro nome\n //( Salva o nome no banco \n $resultadoAtualizaNome = $this->atualizaCampo('tbl_contatos', 'nome', $nome, 'id_instancia = ' . $idInstancia . ' AND id_contato = ' . $this->id_contato);\n if ($resultadoAtualizaNome == true) {\n $textoComplementar = \"Prazer em conhecer você $nome!\\n\\n\";\n\n $this->envioMenuRaiz($numero, $textoComplementar);\n }\n }\n }\n } else {\n $this->logSis('DEB', 'Indetificou que tem nome');\n\n $this->resposta($numero, $decoded);\n }\n }\n }\n }\n }\n }", "public function atencion(Request $request, Response $response, $args)\n{\n //Variables\n $datin=Array();\n /*validando los argumentos que recibimos*/\n if(isset($args['idPadre'])) $idPadre = $args['idPadre'];\n if(isset($args['idContenido'])) $idContenido = $args['idContenido'];\n if(isset($args['idHijo'])) $idHijo = $args['idHijo'];\n \n $servicio=\"atencion\";\n $tituloservicio=\"ATENCIÓN AL CIUDADANO\";\n $datin=MunlimaControlador::plantillaUno($args,$servicio,$tituloservicio);\n\n $this->view->render($response, \"weblima/extras.twig\", $datin);\n return $response;\n}", "public function index()\r\n\t{\r\n\t\t\r\n\t\t$Permitido = array('Gerencia' => '', 'Plani' => '', 'Sistemas' => '', 'Ventas' => '');\r\n\t\t$this->ver_sesion_m->acceso($Permitido);\r\n\t\t\r\n\t\t$this->ver_sesion_m->no_clientes();\r\n\t\t\r\n\t\t$Variables = array(\r\n\t\t\t'Titulo_Pagina' => 'Ventas por Cliente',\r\n\t\t\t'Mensaje' => '',\r\n\t\t\t'filtro_mostrar' => 'pedi'\r\n\t\t);\r\n\t\t\r\n\t\t\r\n\t\t//Variables con valor por default (defecto?)\r\n\t\t$Variables['ianho'] = date('Y');//Anho inicial\r\n\t\t$Variables['imes'] = date('m');//Mes inicial\r\n\t\t$Variables['fanho'] = date('Y');//Anho final\r\n\t\t$Variables['fmes'] = date('m');//Mes final\r\n\t\t$Variables['anho_inicio'] = 2008;//Desde esta fecha se tiene registro en ventas\r\n\t\t$Variables['anho_fin'] = date('Y');//Se puede visualizar hasta este anho\r\n\t\t$Variables['anho_fin'] = $Variables['anho_fin'] + 2;//Mas dos À? si, ('Y') = 2012 + 2 = 2014 À?\r\n\t\t$Variables['filtro_cliente'] = 'todos';\r\n\t\t$Variables['filtro_venta'] = 'todos';\r\n\t\t$Variables['filtro_vendedor'] = 'todos';\r\n\t\t$Variables['proyeccion_global'] = 'on';\r\n\t\t\r\n\t\t$Variables['multiple'] = '';//Deseo ver varios meses? Valor principal: '''] == No! Valor alternativo 'on''] == Si!\r\n\t\t$Variables['vista'] = 'todo';//Que deseo visualizar? Puede ser todo, venta o proyeccion.\r\n\t\t$Variables['id_div_principal'] = '';\r\n\t\t$Variables['ancho_pagina'] = 0;\r\n\t\t//Deseo saber cuantos meses hay para asi reacomodar el ancho del div que contiene el reporte\r\n\t\t$Variables['total_meses'] = 0;\r\n\t\t\r\n\t\t//Listado de los meses\r\n\t\t$Variables['meses_v'] = array(\r\n\t\t\t'01' => 'Enero', '02' => 'Febrero', '03' => 'Marzo', '04' => 'Abril',\r\n\t\t\t'05' => 'Mayo', '06' => 'Junio', '07' => 'Julio', '08' => 'Agosto',\r\n\t\t\t'09' => 'Septiembre', '10' => 'Octubre', '11' => 'Noviembre', '12' => 'Diciembre'\r\n\t\t);\r\n\t\t\r\n\t\t//Listado de los meses, abreviados\r\n\t\t$Variables['meses_abr_v'] = array(\r\n\t\t\t'',\r\n\t\t\t'Jan' => 'Ene',\r\n\t\t\t'Feb' => 'Feb',\r\n\t\t\t'Mar' => 'Mar',\r\n\t\t\t'Apr' => 'Abr',\r\n\t\t\t'May' => 'May',\r\n\t\t\t'Jun' => 'Jun',\r\n\t\t\t'Jul' => 'Jul',\r\n\t\t\t'Aug' => 'Ago',\r\n\t\t\t'Sep' => 'Sep',\r\n\t\t\t'Oct' => 'Oct',\r\n\t\t\t'Nov' => 'Nov',\r\n\t\t\t'Dec' => 'Dic'\r\n\t\t);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Si traigo variables enviadas por formulario\r\n\t\tif('' != $this->input->post('mes'))\r\n\t\t{\r\n\t\t\t$Variables['imes'] = $this->input->post('mes');\r\n\t\t\t$Variables['ianho'] = $this->input->post('anho');\r\n\t\t\t$Variables['fmes'] = $this->input->post('mes2');\r\n\t\t\t$Variables['fanho'] = $this->input->post('anho2');\r\n\t\t\t$Variables['vista'] = $this->input->post('vista');\r\n\t\t\t$Variables['filtro_mostrar'] = $this->input->post('mostrar');\r\n\t\t\t//$Variables['filtro_cliente'] = $this->input->post('tipo_cl');\r\n\t\t\t$Variables['filtro_venta'] = $this->input->post('tipo_vt');\r\n\t\t\t$Variables['filtro_vendedor'] = $this->input->post('vendedor');\r\n\t\t\t$Variables['multiple'] = $this->input->post('rango_fecha');\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//Si deseo ver solamente un mes\r\n\t\tif('' == $Variables['multiple'])\r\n\t\t{\r\n\t\t\t//Aplico valores por default al mes y anho final\r\n\t\t\t\r\n\t\t\t$Variables['fmes'] = $Variables['imes'] + 1;//Aumento un mes a partir del mes de inicio\r\n\t\t\t$Variables['fanho'] = $Variables['ianho'];//Asigno el mismo anho de inicio\r\n\t\t\t\r\n\t\t\tif($Variables['fmes'] > 12){//Pero si me paso de diciembre al aumentarlo\r\n\t\t\t\t$Variables['fmes'] = 1;//Lo regreso a enero\r\n\t\t\t\t$Variables['fanho']++;//Y subo un anho\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($Variables['fmes'] < 10){\r\n\t\t\t\t//Si el mes quedo solo con un numero al haberlo sumado\r\n\t\t\t\t$Variables['fmes'] = '0'.$Variables['fmes'];//Le pongo un cerito al inicio\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t\t//Cargamos la vista para el encabezado.\r\n\t\t$this->load->view('encabezado_v', $Variables);\r\n\r\n\t\t/*\r\n\t\t//Obtencion de la informacion perteneciente al departamento seleccionado\r\n\t\t$this->load->model('clientes/agregar_m', 'agre_m');\r\n\t\t\r\n\t\t//La pasamos la varible limpia para ejecutar la consulta\r\n\t\t//$Variables['tipo_cliente'] = $this->agre_m->buscar_tipo_cliente();\r\n\t\t$Variables['vendedores'] = $this->agre_m->buscar_vendedor();\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\t$this->load->view('ventas/cliente_encabezado_v', $Variables);\r\n\r\n\r\n\t\t//Obtencion de la informacion perteneciente al departamento seleccionado\r\n\t\t$this->load->model('ventas/cliente_venta_m', 'clie_vent');\r\n\r\n\t\t\r\n\t\tif('clie' == $Variables['filtro_mostrar'])\r\n\t\t{\r\n\r\n\t\t\t//La pasamos la varible limpia para ejecutar la consulta\r\n\t\t\t$Variables['Vent_Clie'] = $this->clie_vent->ventas(\r\n\t\t\t\t$Variables['ianho'],\r\n\t\t\t\t$Variables['imes'],\r\n\t\t\t\t$Variables['fanho'],\r\n\t\t\t\t$Variables['fmes'],\r\n\t\t\t\t$Variables['filtro_cliente'],\r\n\t\t\t\t$Variables['filtro_venta'],\r\n\t\t\t\t$Variables['filtro_vendedor'],\r\n\t\t\t\t$Variables['proyeccion_global'],\r\n\t\t\t\t$Variables['multiple'],\r\n\t\t\t\t$Variables['vista']\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t//Listado de los clientes\r\n\t\t\t$this->load->model('clientes/busquedad_clientes_m', 'buscar_cli');\r\n\t\t\t$Variables['Clientes'] = $this->buscar_cli->mostrar_clientes(\r\n\t\t\t\t'id_cliente, codigo_cliente, nombre, cliente.activo',\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\r\n\t\t\t//Listado de las ventas\r\n\t\t\t$this->load->view('ventas/cliente_v', $Variables);\r\n\t\t\t\r\n\t\t}\r\n\r\n\r\n\t\t\r\n\t\t\r\n\t\tif('pedi' == $Variables['filtro_mostrar'])\r\n\t\t{\r\n\r\n\t\t\t//La pasamos la varible limpia para ejecutar la consulta\r\n\t\t\t$Variables['Vent_Clie'] = $this->clie_vent->ventas_pedido(\r\n\t\t\t\t$Variables['ianho'],\r\n\t\t\t\t$Variables['imes'],\r\n\t\t\t\t$Variables['fanho'],\r\n\t\t\t\t$Variables['fmes'],\r\n\t\t\t\t$Variables['filtro_cliente'],\r\n\t\t\t\t$Variables['filtro_venta'],\r\n\t\t\t\t$Variables['filtro_vendedor'],\r\n\t\t\t\t$Variables['proyeccion_global'],\r\n\t\t\t\t$Variables['multiple'],\r\n\t\t\t\t$Variables['vista']\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t//Listado de las ventas\r\n\t\t\t$this->load->view('ventas/cliente_pedido_v', $Variables);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Cargamos la vista para el pie de pagina.\r\n\t\t$this->load->view('pie_v');\r\n\t\t\r\n\t\t\r\n\t}", "public function index()\n {\n $pedidos = Pedido::all();\n\n if (count($pedidos) == 0) {\n return response()->json(['error' => 'true', 'message' => 'No existen pedidos cargados en el sistema.']);\n }\n\n $pedidos->load(['obra', 'solicitante']);\n\n return response()->json(['error' => 'false', 'data' => $pedidos, 'message' => 'Pedidos enviados correctamente.']);\n }", "function getRegistroAJAX() {\n switch (@$_POST['operacao']) {\n /**\n * Retorna registro solicitado por parametro.\n * @return array\n */\n case 'getRegistroErroLog':\n $retorno = [];\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $erroDAO = new ErroLogDAO();\n $retorno = $erroDAO->getVetor(@$_POST['registroID']);\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna registro solicitado por parametro.\n * @return array\n */\n case 'getRegistroErroApi':\n $retorno = [];\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $apiDAO = new ErroAPIDAO();\n $retorno = $apiDAO->getVetor(@$_POST['registroID']);\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Lista de registro cadastrados com paginação.\n * @var array\n */\n case 'getListaRegistroControleErroLog' :\n $retorno = [];\n $erroDAO = new ErroLogDAO();\n //DAO\n $retorno['totalRegistro'] = 0;\n $retorno['listaRegistro'] = [];\n $retorno['paginaSelecionada'] = @$_POST['paginaSelecionada'] ? $_POST['paginaSelecionada'] : 0;\n $retorno['registroPorPagina'] = @$_POST['registroPorPagina'] ? intval($_POST['registroPorPagina']) : 30;\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $retorno['totalRegistro'] = $erroDAO->getListaControleTotal(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('Y-m-01'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('Y-m-31'),\n @$_POST['pesquisa'] ? $_POST['pesquisa'] : ''\n );\n $retorno['listaRegistro'] = $erroDAO->getListaControle(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('Y-m-01'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('Y-m-31'),\n @$_POST['pesquisa'] ? $_POST['pesquisa'] : '',\n @$_POST['paginaSelecionada'] ? $_POST['paginaSelecionada'] : 1,\n @$_POST['registroPorPagina'] ? $_POST['registroPorPagina'] : 30\n );\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Lista de registro cadastrados com paginação.\n * @var array\n */\n case 'getListaRegistroControleErroApi' :\n $retorno = [];\n $erroApiDAO = new ErroAPIDAO();\n //DAO\n $retorno['totalRegistro'] = 0;\n $retorno['listaRegistro'] = [];\n $retorno['paginaSelecionada'] = @$_POST['paginaSelecionada'] ? $_POST['paginaSelecionada'] : 0;\n $retorno['registroPorPagina'] = @$_POST['registroPorPagina'] ? intval($_POST['registroPorPagina']) : 30;\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $retorno['totalRegistro'] = $erroApiDAO->getListaControleTotal(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('Y-m-01'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('Y-m-31'),\n @$_POST['pesquisa'] ? $_POST['pesquisa'] : ''\n );\n $retorno['listaRegistro'] = $erroApiDAO->getListaControle(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('Y-m-01'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('Y-m-31'),\n @$_POST['pesquisa'] ? $_POST['pesquisa'] : '',\n @$_POST['paginaSelecionada'] ? $_POST['paginaSelecionada'] : 1,\n @$_POST['registroPorPagina'] ? $_POST['registroPorPagina'] : 30\n );\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna estatistica de registros durante o semestre.\n * @return array\n */\n case 'getQuantidadeSemestral':\n $retorno[0] = [0, 0, 0, 0, 0, 0];\n $retorno[1] = [0, 0, 0, 0, 0, 0];\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $erroDAO = new ErroLogDAO();\n $retorno[0] = $erroDAO->getEstatisticaSemestral();\n $apiDAO = new ErroAPIDAO();\n $retorno[1] = $apiDAO->getEstatisticaSemestral();\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna quantidade de registros cadastrado.\n * @return integer\n */\n case 'getQuantidadeErroLog':\n $retorno = 0;\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $erroDAO = new ErroLogDAO();\n $retorno = $erroDAO->getQuantidadeRegistro(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('d/m/Y'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('d/m/Y')\n );\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna quantidade de registros cadastrado.\n * @return integer\n */\n case 'getQuantidadeErroApi':\n $retorno = 0;\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $apiDAO = new ErroApiDAO();\n $retorno = $apiDAO->getQuantidadeRegistro(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('d/m/Y'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('d/m/Y')\n );\n }\n print_r(json_encode($retorno));\n die();\n }\n echo 1;\n }", "public function index()\n { \n $est_sol=EstablecimientoSolicitante::orderBy('created_at', 'desc')->get();\n return response()->json(['status'=>'ok',\"msg\" => \"exito\", \"est_sol\" => $est_sol], 200);\n\n }", "function insertarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_ime';\r\n\t\t$this->transaccion='tgv_SERVIC_INS';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('estado','estado','varchar');\r\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\r\n\t\t$this->setParametro('id_lugar_destino','id_lugar_destino','int4');\r\n\t\t$this->setParametro('id_ep','id_ep','int4');\r\n\t\t$this->setParametro('fecha_asig_fin','fecha_asig_fin','date');\r\n\t\t$this->setParametro('fecha_sol_ini','fecha_sol_ini','date');\r\n\t\t$this->setParametro('descripcion','descripcion','varchar');\r\n\t\t$this->setParametro('id_lugar_origen','id_lugar_origen','int4');\r\n\t\t$this->setParametro('cant_personas','cant_personas','int4');\r\n\t\t$this->setParametro('fecha_sol_fin','fecha_sol_fin','date');\r\n\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\r\n\t\t$this->setParametro('fecha_asig_ini','fecha_asig_ini','date');\r\n\t\t$this->setParametro('id_funcionario_autoriz','id_funcionario_autoriz','int4');\r\n\t\t$this->setParametro('observaciones','observaciones','varchar');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "public function vistaUsuariosController(){\n //Se envia la consulta al model para que regrese la informacion\n $respuesta = Datos::vistaUsuariosModel();\n //y esta es enviada a la vista para ser procesada y mostrada.\n return $respuesta;\n }", "function getRegistroAJAX() {\n if (@$_POST['operacao']) {\n switch ($_POST['operacao']) {\n /**\n * Retorna quantidade de permissões por departamento cadastrado.\n */\n case 'getEstatisticaPermissaoDepartamento':\n $retorno = [];\n $permissaoDAO = new PermissaoDAO();\n $retorno = $permissaoDAO->getQuantidadePermissaoPadraoDepartamento(15);\n print_r(json_encode($retorno));\n die();\n /**\n * Efetua edição do registro informado por parametro.\n */\n case 'getListaControleRegistro':\n $retorno = [];\n $permissaoDAO = new PermissaoDAO();\n $retorno = $permissaoDAO->getListaRegistroControle($_POST['pesquisa']);\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna quantidade de registros cadastrados dentro do sistema\n */\n case 'getTotalRegistro':\n $permissaoDAO = new PermissaoDAO();\n print_r(json_encode($permissaoDAO->getTotalCadastro()));\n die();\n /**\n * Retorna registro solicitado por parametro.\n */\n case 'getRegistro':\n $retorno = [];\n $permissaoDAO = new PermissaoDAO();\n $retorno = $permissaoDAO->getRegistroVetor(@$_POST['idPermissao']);\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna os cargos que possuem permissão informada.\n */\n case 'getDepartamentoPermissao':\n $retorno = [];\n $departamentoDAO = new DepartamentoDAO();\n $retorno = $departamentoDAO->getListaDepartamentoPermissao(@$_POST['idPermissao']);\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna lista de permissões do usuário.\n */\n case 'getPermissaoUsuario':\n $retorno = [];\n $permissaoDAO = new PermissaoDAO();\n $retorno = $permissaoDAO->getListaUsuarioPermissao(@$_POST['idPermissao']);\n print_r(json_encode($retorno));\n die();\n /**\n * Lista de registros vinculados ao departamento informado.\n */\n case 'getListaDepartamentoRegistroPadrao':\n $retorno = [];\n if (@$_POST['id']) {\n $departamentoDAO = new DepartamentoDAO();\n $resultado = $departamentoDAO->getListaDepartamentoPermissao(intval($_POST['id']));\n foreach ($resultado as $value) {\n $registro['id'] = $value->getId();\n $registro['nome'] = $value->getNome();\n array_push($retorno, $registro);\n }\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna estatistica do controle de permissões.\n */\n case 'getEstatisticaControle':\n $permissaoDAO = new PermissaoDAO();\n print_r(json_encode($permissaoDAO->getRegistroControle()));\n die();\n /**\n * Retorna lista de permissoes disponiveis de acordo com o \n * departamento do usuario.\n */\n case 'getListaPermissaoDisponivel':\n $retorno = [];\n $permissaoDAO = new PermissaoDAO();\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1) {\n $retorno = $permissaoDAO->getListaPermissaoVetor();\n } else {\n $retorno = $permissaoDAO->getListaPermissaoVetor(Sessao::getUsuario()->getId());\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna lista de permissoes do usuario informado por parametro.\n */\n case 'getListaPermissaoUsuario':\n $retorno = [];\n if (@$_POST['idUsuario']) {\n $permissaoDAO = new PermissaoDAO();\n $usuarioDAO = new UsuarioDAO();\n if ($usuarioDAO->getUsuarioAdministrador($_POST['idUsuario'])) {\n $retorno = $permissaoDAO->getListaPermissaoVetor();\n } else {\n $retorno = $permissaoDAO->getListaPermissaoVetor($_POST['idUsuario']);\n }\n }\n print_r(json_encode($retorno));\n die();\n }\n }\n echo 1;\n }", "public function index()\n {\n $respuesta['registros'] = Clientes::all()->toArray();\n $respuesta['mensaje'] = 'Registros Obtenidos Correctamente';\n $respuesta['resultado'] = true; \n return $respuesta;\n }", "public function estado(){\n log_message('DEBUG', \"#TRAZA | #TRAZ-PROD-TRAZASOFT | Camion | estado()\");\n $post = $this->input->post();\n $rsp['estadoMovimiento'] = $this->Camiones->estado($post['patente'], $post['estado'], $post['estadoFinal']);\n if($rsp['estadoMovimiento']['status'] && $post['estadoFinal'] == 'DESCARGADO')\n $rsp['datos_movimiento'] = $this->Camiones->actualizaDatosMovimientoTransporte($post);\n echo json_encode($rsp);\n }", "public function indexmessi()\n {\n $partidosmessi=PartidoCalendario::with(\"EquipoCasaNombre\",\"EquipoVisitaNombre\",\"NombreLiga\")->orderBy('fecha_partido','ASC')->orderBy('hora_partido','ASC')->where('fecha_partido','>=',Carbon::today()->endOfMonth())->where('fecha_partido','<=',Carbon::today()->endOfMonth()->addDays(15))->get();\n if(!$partidosmessi){\n return response()->json(['mensaje' => 'No se encuentran partidos actualmente','codigo'=>404],404);\n }\n return response()->json(['datos' => $partidosmessi],200);\n }", "public function index() {\n //acceder al modelo Libro y consutlar su informacion y devolverlo en un json\n $datosLibro = Libro::all();\n return response()->json($datosLibro);\n }", "public function index(){\n //crea un arreglo y pone como dato lo que se va a mostrar en la vista \n $noticias = $this->noticia_modelo->traerParte(0,15);\n $datos = [\n 'titulo' => 'NotiFalso',\n 'noticias' => $noticias\n ];\n //inicia la vista \n $this->vista('paginas/inicio',$datos);\n }", "function consultar_usuario(){\n $this->layout='_layout.perfilUsuario';\n \n if(!empty($_POST)):\n \n $api = new ApiUsuario();\n $this->dados = array(\n 'listBusca' => $api->consultas(new Usuario('POST'))\n );\n \n $this->view(); \n else :\n \n $this->view(); \n endif;\n \n }", "public function index()\n {\n //cargar todos los establecimientos\n $establecimientos = \\App\\Establecimiento::\n with(['usuario' => function ($query){\n $query->select('id', 'email', 'nombre', 'ciudad', 'estado', 'telefono', 'imagen', 'tipo_usuario', 'token_notificacion')\n ->where('tipo_usuario', 4);\n }])\n ->get();\n\n if(count($establecimientos) == 0){\n return response()->json(['error'=>'No existen establecimientos.'], 404); \n }else{\n return response()->json(['establecimientos'=>$establecimientos], 200);\n } \n }", "public function index(){\n $tarjeta_rokys_service=new TarjetaRokysService;\n $tarjeta_rokys=$tarjeta_rokys_service->getFirst();\n if(isset($tarjeta_rokys)){\n $this->datos['codigo_tarjeta']=$tarjeta_rokys;\n $this->getView('registro_cliente');\n }else{\n die('Se agotaron las tarjetas!!....');\n }\n }", "function postInformacion(){\n /*GUARDAR DEVOLUCIÓN*/\n if($_GET['action']=='guardarDevolucion'){ \n //Decodifica un string de JSON\n $obj = json_decode( file_get_contents('php://input') ); \n $objArr = (array)$obj;\n if (empty($objArr)){\n $this->response(421,\"error\",\"Nothing to add. Check json\"); \n }else if(isset($obj->observacion_causal)){\n $people = new PeopleDB(); \n $people->saveDevolucion($obj->observacion_causal, \n $obj->documento_contacto,\n $obj->nombre_contacto,\n $obj->telefono_contacto, \n $obj->email_contacto, \n $obj->cantidad_devolucion, \n $obj->observacion_cantidad, \n $obj->numero_boleto, \n $obj->numero_precinto, \n $obj->estado, \n $obj->ejecutivo_codigo,\n $obj->causales_devolucion_id,\n $obj->detalle_lotes_lote,\n $obj->detalle_lotes_producto,\n $obj->proveedores_codigo_cliente,\n $obj->proveedores_nif);\n $this->response(200,\"success\",\"new record added\"); \n }else{\n $this->response(422,\"error\",\"The property is not defined\");\n }\n }\n /*GUARDAR DOCUMENTOS DE RECAUDO*/\n if($_GET['action']=='guardarRecaudoDocumentos'){ \n $obj = json_decode( file_get_contents('php://input') ); \n $objArr = (array)$obj;\n if (empty($objArr)){\n $this->response(421,\"error\",\"Nothing to add. Check json\"); \n }else if(isset($obj->codigo_cliente)){\n $people = new PeopleDB(); \n $people->saveDocumentosRecaudo(\n $obj->codigo_cliente,\n $obj->nif,\n $obj->recaudo, \n $obj->documento, \n $obj->factura, \n $obj->fecha_documento, \n $obj->fecha_vencimiento, \n $obj->saldo, \n $obj->consecutivo);\n $this->response(200,\"success\",\"new record added\",$people); \n }else{\n $this->response(422,\"error\",\"The property is not defined\");\n }\n\n }\n\n /*GUARDAR PAGOS DE RECAUDO*/\n if($_GET['action']=='guardarRecaudoPagos'){ \n $obj = json_decode( file_get_contents('php://input') ); \n $objArr = (array)$obj;\n if (empty($objArr)){\n $this->response(421,\"error\",\"Nothing to add. Check json\"); \n }else if(isset($obj->codigo_cliente)){\n $people = new PeopleDB(); \n $people->savePagosRecaudo(\n $obj->codigo_cliente,\n $obj->nif, \n $obj->tipo_pago_recaudo,\n $obj->numero_cuenta,\n $obj->tipo_banco_recaudo,\n $obj->codigo_cuenta,\n $obj->fecha_pago, \n $obj->valor_pago,\n $obj->consecutivo);\n $this->response(200,\"success\",\"new record added\"); \n }else{\n $this->response(422,\"error\",\"The property is not defined\");\n }\n }\n /*GUARDAR DESCUENTOS DE RECAUDO*/\n if($_GET['action']=='guardarRecaudoDescuentos'){ \n $obj = json_decode( file_get_contents('php://input') ); \n $objArr = (array)$obj;\n if (empty($objArr)){\n $this->response(421,\"error\",\"Nothing to add. Check json\"); \n }else if(isset($obj->codigo_cliente)){\n $people = new PeopleDB(); \n $people->saveDescuentosRecaudo(\n $obj->codigo_cliente,\n $obj->nif, \n $obj->tipo_descuento_recaudo, \n $obj->valor_descuento, \n $obj->observaciones, \n $obj->consecutivo);\n $this->response(200,\"success\",\"new record added\"); \n }else{\n $this->response(422,\"error\",\"The property is not defined\");\n }\n } \n }", "public function index(){\n\t\t$this->gerenciar();\n\t}", "public function index()\n {\n //\n $clientes = TcCliente::where('id_estado', 1)->get();\n $productos = TtProducto::with('sabor', 'tipo_producto', 'tamanio')->where('id_estado','=',1)->get();\n foreach ($productos as $i => $producto) {\n $producto->producto = $producto->producto .': '. $producto->tipo_producto->tipo_producto.' '.$producto->sabor->sabor.' '. $producto->tamanio->tamanio;\n unset($productos[$i]->sabor); \n unset($productos[$i]->tipo_producto); \n unset($productos[$i]->tamanio); \n }\n $direcciones = new TtDireccionPedidoController();\n $direcciones = $direcciones->index();\n $data = collect([\"clientes\" => $clientes, \"productos\" => $productos, \"direcciones\" => $direcciones]);\n return response()->json($data);\n }", "public function libroreclamaciones(Request $request, Response $response, $args)\n{\n //Variables\n $datin=Array();\n /*validando los argumentos que recibimos*/\n if(isset($args['idPadre'])) $idPadre = $args['idPadre'];\n if(isset($args['idContenido'])) $idContenido = $args['idContenido'];\n if(isset($args['idHijo'])) $idHijo = $args['idHijo'];\n \n $servicio=\"libroreclamaciones\";\n $tituloservicio=\"LIBRO DE RECLAMACIONES\";\n $datin=MunlimaControlador::plantillaUno($args,$servicio,$tituloservicio);\n\n $this->view->render($response, \"weblima/libroreclamaciones.twig\", $datin);\n return $response;\n}", "public function index($Id_Proceso)\r\n\t{\r\n\t\t\r\n\t\t$Permitido = array('Gerencia' => '', 'Plani' => '', 'Sistemas' => '', 'Ventas' => '');\r\n\t\t$this->ver_sesion_m->acceso($Permitido);\r\n\t\t\r\n\t\t$this->ver_sesion_m->no_clientes();\r\n\t\t\r\n\t\t//Validacion pequenha\r\n\t\t$Id_Proceso += 0;\r\n\t\tif(0 == $Id_Proceso)\r\n\t\t{\r\n\t\t\tshow_404();\r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Modelo que verifica si tiene ruta sin finalizar este proceso\r\n\t\t$this->load->model('pedidos/procesando_m', 'procesando');\r\n\t\t//Se realiza la verificacion\r\n\t\t$Estado = $this->procesando->proceso($Id_Proceso);\r\n\t\t\r\n\t\tif('activo' == $Estado)\r\n\t\t{\r\n\t\t\t//Si el proceso tiene una ruta sin finalizar se redirige\r\n\t\t\theader('location: /pedidos/buscar/index/ruta');\r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//Variables necesarias en el encabezado\r\n\t\t$Variables = array(\r\n\t\t\t'Titulo_Pagina' => 'Agregar Pedido',\r\n\t\t\t'Mensaje' => '',\r\n\t\t\t'Formulario' => '/pedidos/ingresar/index/'.$Id_Proceso\r\n\t\t);\r\n\t\t//Se carga el encabezado de pagina\r\n\t\t$this->load->view('encabezado_v', $Variables);\r\n\t\t\r\n\t\t\r\n\t\t//Necesito la informacion del proceso a agregar\r\n\t\t$this->load->model('procesos/buscar_proceso_m', 'info');\r\n\t\t//Solicito la informacion completa\r\n\t\t$Variables['Info_Proceso'] = $this->info->id_proceso($Id_Proceso);\r\n\t\t\r\n\t\t//Si quieren hacer trampa\r\n\t\tif('' == $Variables['Info_Proceso'])\r\n\t\t{\r\n\t\t\tshow_404();\r\n\t\t\texit();\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\r\n\t\t//Necesito la miniatura\r\n\t\t$Consulta = '\r\n\t\t\tselect url\r\n\t\t\tfrom proceso_imagenes\r\n\t\t\twhere id_proceso = \"'.$Id_Proceso.'\"\r\n\t\t\torder by id_proceso_imagenes desc\r\n\t\t\tlimit 0, 1\r\n\t\t';\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\r\n\t\t$Variables['Miniatura'] = '';\r\n\t\tif(1 == $Resultado->num_rows())\r\n\t\t{\r\n\t\t\t$Variables['Miniatura'] = $Resultado->row_array();\r\n\t\t\t$Variables['Miniatura'] = $Variables['Miniatura']['url'];\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//Modulo para obtener el listado de los tipos de trabajo\r\n\t\t$this->load->model('general/tipos_trabajo_m', 'tipos_t');\r\n\t\t//Solicito la informacion completa\r\n\t\t$Variables['Tipos_Trabajo'] = $this->tipos_t->tipos();\r\n\t\t\r\n\t\t\r\n\t\t//Modulo para obtener el listado de los usuarios\r\n\t\t$this->load->model('usuarios/listado_usuario_m', 'usuarios');\r\n\t\t//Solicito la informacion completa\r\n\t\t$Variables['Usuarios'] = $this->usuarios->listado('s');\r\n\t\t\r\n\t\t$Variables['Dpto_Usuario'] = $this->usuarios->departamento_usuario();\r\n\t\t//print_r($Variables['Dpto_Usuario']);\r\n\t\t\r\n\t\t$Variables['Detalle_reproceso'] = array();\r\n\t\t\r\n\t\t\r\n\t\t//Listado de las rutas validas para este cliente\r\n\t\t$this->load->model('ruta/ruta_dinamica_m', 'rutad');\r\n\t\t$Variables['Detalle_Rutas'] = $this->rutad->detalle_rutas(\r\n\t\t\t$Variables['Info_Proceso']['id_cliente']\r\n\t\t);\r\n\r\n\t\t//print_r($Variables['Detalle_Rutas']);exit();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Modulo para obtener el listado de los departamentos\r\n\t\t$this->load->model('departamentos/listado_m', 'departamentos');\r\n\t\t//Listado de departamentos activos y con formato especial\r\n\t\t$Variables['Departamentos'] = $this->departamentos->buscar_dptos('s','si');\r\n\t\t\r\n\t\t\r\n\t\t//Modulo para obtener el listado de los productos para este cliente\r\n\t\t$this->load->model('productos/prod_cliente_m', 'productos');\r\n\t\t//Listado de departamentos activos y con formato especial\r\n\t\t$Variables['Productos'] = $this->productos->listado(\r\n\t\t\t$Variables['Info_Proceso']['id_cliente'],\r\n\t\t\t's'\r\n\t\t);\r\n\t\t\r\n\t\t\r\n\t\t//Extraemos las causas, motivos, razones o circunstancias del porque el trabajo puede ser un reproceso\r\n\t\t$this->load->model('pedidos/detalle_reproceso_m', 'reproceso');\r\n\t\t$Variables['Detalle_reproceso'] = $this->reproceso->detalle_reproceso();\r\n\t\t\r\n\t\t\r\n\t\t$Variables['Ruta_Actual'] = array();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$Variables['Redir'] = '/pedidos/agregar/index/'.$Id_Proceso;\r\n\t\t$Variables['num_cajas'] = 1;\r\n\t\t\r\n\t\t//Creacion del Formulario e informacion del proceso\r\n\t\t$this->load->view('pedidos/agregar_modificar_v', $Variables);\r\n\t\t\r\n\t\t\r\n\t\t//Ruta de trabajo\r\n\t\t$this->load->view('pedidos/ruta_v', $Variables);\r\n\t\t\r\n\t\t\r\n\t\t//Hoja de cotizacion\r\n\t\t$this->load->view('pedidos/cotizacion_v', $Variables);\r\n\t\t\r\n\t\t\r\n\t\t//Se carga el pie de pagina\r\n\t\t$this->load->view('pedidos/agregar_modificar_pie_v');\r\n\t\t\r\n\t\t\r\n\t\t//Se carga el pie de pagina\r\n\t\t$this->load->view('pie_v');\r\n\t\t\r\n\t\t\r\n\t}", "public function buscarParametrosEsteticaAction()\r\n {\r\n $isAjax = $this->get('Request')->isXMLhttpRequest();\r\n if($isAjax){\r\n $esteticaid = $this->get('request')->request->get('id');\r\n $em = $this->getDoctrine()->getManager(); \r\n \r\n if($esteticaid != 3){\r\n $dql = \"SELECT est.id estetica, dest.id, dest.nombre \"\r\n . \"FROM DGPlusbelleBundle:DetalleEstetica dest \"\r\n . \"JOIN dest.estetica est \"\r\n . \"WHERE est.id = :esteticaid\";\r\n\r\n $parametros = $em->createQuery($dql)\r\n ->setParameter('esteticaid', $esteticaid)\r\n ->getResult();\r\n\r\n $response = new JsonResponse();\r\n $response->setData(array(\r\n 'query' => $parametros\r\n )); \r\n\r\n return $response; \r\n } else {\r\n $dql = \"SELECT est.id estetica \"\r\n . \"FROM DGPlusbelleBundle:Estetica est \"\r\n . \"WHERE est.id = :esteticaid\";\r\n\r\n $parametros = $em->createQuery($dql)\r\n ->setParameter('esteticaid', $esteticaid)\r\n ->getResult();\r\n\r\n $response = new JsonResponse();\r\n $response->setData(array(\r\n 'query' => $parametros\r\n )); \r\n\r\n return $response; \r\n } \r\n } else { \r\n return new Response('0'); \r\n } \r\n }", "public function index()\n\t{\n\t\t$res['data']=Ingresos::All();\n\t\t$respuesta = json_encode(array('error' =>false,'mensaje'=>'', 'respuesta'=>$res));\n\t\t$final_response = Response::make($respuesta, 200);\n $final_response->header('Content-Type', \"application/json; charset=utf-8\");\n\n return $final_response;\n\t}", "public function contarInventario(){\n\t}", "public function index()\n {\n\n $ventas2 = Ventas::with('user')->where('Estado',1)->get(); //OBTENGO VENTAS Y LOS USUARIOS ASIGNADOS A ESAS VENTAS\n //dd($ventas2);\n $ventas = Ventas::groupBy('Numero')->select('Numero', Ventas::raw('count(*) as repeticion'))->orderBy('repeticion', 'DESC')->get();\n $ventas4 = Ventas::Where('Estado', 0)->get();\n $respuesta = [\n \"Numeros de loteria mas repetidos\" => $ventas,\n \"Numeros de loteria bloqueados\" => $ventas4,\n \"Data completa del Modelo\" => $ventas2\n ];\n\n\n return response()->json($respuesta);\n }", "public function index(Request $request)\n {\n\n $this->validator($request->all())->validate();\n if($this->user->buscarUsuario($request->cedula)){\n return response()->json([\n EvssaConstantes::NOTIFICACION=> EvssaConstantes::DANGER,\n EvssaConstantes::MSJ=>\"El usuario que intenta ingresar ya se encuentra en la base de datos\",\n ],404);\n }\n $client = new Client();\n if($request->mesa){\n $nombre=array('','');\n $apellido=array('','');\n\n\n $departamento=new Departamentos();\n $departamento=$departamento->buscar($request->departamento);\n\n $ciudad=new Ciudades();\n $ciudad=$ciudad->buscar($request->ciudad,$departamento);\n \n $localizacion=new Localizacione();\n $localizacion=$localizacion->buscarLocalizacion($request->direccion,$request->latitud,$request->longitud,$ciudad->id);\n $punto=new PuntosVotacion();\n\n $punto=$punto->getBuscarDireccion($request->nombre,$localizacion->id);\n\n $mesa=new MesasVotacion();\n // echo 'numero '.$request->mesa;\n $mesa=$mesa->buscar($request->mesa,$punto);\n\n // $this->sisbenNombre($request,$client);\n\n if(!empty($this->nombres)){\n $nombre=explode(' ',$this->nombres['nombre']);\n $apellido=explode(' ', $this->nombres['apellido']);\n }\n\n return response()->json(view(\"auth.admin.creare\")->with([\n \"formulario\"=>'I',\n \"nit\"=>$request->cedula,\n \"departamento\"=>$departamento,\n \"ciudad\"=>$ciudad,\n \"nombre\"=>$request->nombre,\n \"punto\"=>$punto,\n \"localizacion\"=>$localizacion,\n \"mesa\"=>$mesa,\n \"nombre1\"=>$nombre[0],\n \"nombre2\"=>$nombre[1],\n \"apellido1\"=>$apellido[0],\n \"apellido2\"=>$apellido[1],\n \"type\"=>'E',\n \"urlpunto\"=>\"listadesplieguepuntofinal\",\n \"urlmesa\"=>\"listadesplieguemesa\",\n \"urldesplieguefinal\"=>\"listadespliegueciudadfinal\",\n 'urldesplieguedepartamento'=>'listadesplieguedepartamento',\n \"idnamefinal\"=>\"id_ciudad\",\n 'idname'=>'id_departamento',\n 'idnamepunto'=>'id_punto',\n 'idnamemesa'=>'id_mesa',\n 'idnamereferido'=>'id_referido',\n 'urlreferido'=>'listardiferidos',\n 'oculto'=>0,\n\n ])->with(UsuarioEController::url())->render());\n }else{\n return response()->json([\n EvssaConstantes::NOTIFICACION=> EvssaConstantes::DANGER,\n EvssaConstantes::MSJ=>\"Error al consultar la información de la registraduria (Error al pegar los datos)\",\n ],404);\n }\n }", "public function observaciones()\r\n {\r\n $data = new stdClass();\r\n $data->horario = $this->session->horario;\r\n\r\n $this->load->view('overall/head');\r\n $this->load->view('overall/header');\r\n $this->load->view('observaciones/content', $data);\r\n $this->load->view('overall/footer');\r\n }", "public function contmessi()\n {\n $partidosmessi=PartidoCalendario::with(\"EquipoCasaNombre\",\"EquipoVisitaNombre\",\"NombreLiga\")->orderBy('fecha_partido','ASC')->orderBy('hora_partido','ASC')->where('fecha_partido','>=',Carbon::today()->endOfMonth())->where('fecha_partido','<=',Carbon::today()->endOfMonth()->addDays(15))->count();\n if(!$partidosmessi){\n return response()->json(['mensaje' => 'No se encuentran partidos actualmente','codigo'=>404],404);\n }\n return response()->json(['datos' => $partidosmessi],200);\n }", "public function enlacesPaginasController(){\n //Viene del templete\n //Se verifica el contenido del action desde la url\n if(isset($_GET[\"action\"])){\n //en caso de contener algo esto es almacenado para poder dirigirnos a el \n $enlacesController = $_GET[\"action\"];\n }else{\n //caso contrario nos redirige al index para una verificacion.\n $enlacesController=\"index\";\n }\n //Ingresamos a la clase EnlacesPaginas y a su metdo que nos verifica a donde queremos ir\n $respuesta = EnlacesPaginas::enlacesPaginasModel($enlacesController);\n //y lo que recibimos es el docuemtnto que se incluira en el actual.\n include $respuesta;\n }", "public function postEstados()\n {\n //si la peticion es ajax\n if ( Request::ajax() ) {\n $datos = Estado::getAll();\n return Response::json(array('rst'=>1,'datos'=>$datos));\n }\n }", "public function obtenerListaCIE() {\r\n $request = new simpleRest();\r\n //obtiene los datos de la peticion\r\n //$json = $request->getHttpRequestBody();\r\n //objeto que maneja las codificaciones/descodificaciones\r\n $handler = new requestRestHandler();\r\n \r\n //if (filter_var($username, FILTER_VALIDATE_EMAIL)) { \r\n $consulDB = new consultasDB(); \r\n //$this->mostrarRespuesta($this->convertirJson($respuesta), 200); \r\n $responseCIE = $consulDB->obtenerListaCIE();\r\n\r\n //echo $responseUsuario;\r\n //$datosRespuesta = (array)$handler->decodeJson($responsePaises);\r\n $datosRespuesta = $responseCIE;\r\n //$datosRespuesta = $handler->decodeJson($responsePaises);\r\n\r\n if (!isset($datosRespuesta[\"error\"])){\r\n //$respuesta['usuario'] = $username;\r\n $responseObtenerCIE10[\"error\"] = \"false\";\r\n $responseObtenerCIE10[\"status\"] = \"OK\";\r\n $responseObtenerCIE10[\"message\"] = \"SUCCESS\";\r\n $responseObtenerCIE10['fecha'] = ObtenerFecha(); //Obtiene la fecha actual\r\n //Aqui se implementa el manejo del token\r\n $responseObtenerCIE10[\"respuesta\"] = $datosRespuesta;\r\n\r\n }\r\n else {\r\n //Hay posiblidades: 1 - usuario no existe 2 - clave invalida\r\n $responseObtenerCIE10[\"error\"] = \"true\";\r\n $responseObtenerCIE10[\"status\"] = \"error\";\r\n $responseObtenerCIE10[\"message\"] = $datosRespuesta['error'];\r\n $responseObtenerCIE10['fecha'] = \"\";\r\n $responseObtenerCIE10[\"respuesta\"] = \"{}\";\r\n }\r\n\r\n $consulDB = null;\r\n //enviar respuesta\r\n return $responseObtenerCIE10;\r\n\r\n //}\r\n \r\n }", "public function index()\n {\n //cargar todos los empleados\n $empleados = \\App\\Empleado::with('usuario')\n ->with('empresa')->with('permisos')->get();\n\n if(count($empleados) == 0){\n return response()->json(['error'=>'No existen empleados.'], 404); \n }else{\n return response()->json(['empleados'=>$empleados], 200);\n } \n }", "public function limatv(Request $request, Response $response, $args)\n{\n //Variables\n $datin=Array();\n /*validando los argumentos que recibimos*/\n if(isset($args['idPadre'])) $idPadre = $args['idPadre'];\n if(isset($args['idContenido'])) $idContenido = $args['idContenido'];\n if(isset($args['idHijo'])) $idHijo = $args['idHijo'];\n \n $servicio=\"limatv\";\n $tituloservicio=\"LIMA TV\";\n $datin=MunlimaControlador::plantillaUno($args,$servicio,$tituloservicio);\n\n $this->view->render($response, \"weblima/limatv.twig\", $datin);\n return $response;\n}", "public function index()\n {\n //cargar todos los proveedores con los productos que ofrecen\n $ImportarEventos = \\App\\ImportarEventos::all();\n\n if(count($ImportarEventos) == 0){\n return response()->json(['error'=>'No existen ImportarEventos.'], 404); \n }else{\n return response()->json(['status'=>'ok', 'ImportarEventos'=>$ImportarEventos], 200);\n }\n }", "public function indexAction(){ \n \n if(isset($_GET[\"apikey\"]))\n {\n $api = $this->getRequest()->getParam('apikey');\n \n $select = $this->_model_usuarios->select()\n ->where(\"api_key = ?\", $api); \n \n if ($select->query()->rowCount() == 1){\n $array = $select->query()->fetchAll();\n $select_sesion = $this->_model_usuarios->select()\n ->setIntegrityCheck(false)\n ->join('espectaculo','espectaculo.id_usuario = usuario.id_usuario' )\n ->join('sesion','espectaculo.id_espectaculo = sesion.id_espectaculo' )\n ->where('espectaculo.id_usuario = ?' , $array[0][\"id_usuario\"]);\n \n \n $sesions = $this->_model_sesion->fetchAll($select_sesion)->toArray(); \n \n $this->_helper->json($sesions);\n\n }else{\n $this->_helper->json(\"Error con la apikey\");\n }\n }else{\n $this->_helper->json(\"Falta la apikey\");\n }\n \n }", "public function run()\n\t\t{\n\t\t\tswitch ($_GET['act']) {\n\t\t\t\tcase 'create':\n\t\t\t\t\t//Crear\n\t\t\t\t\tif(BaseCtrl::isAdmin())\n\t\t\t\t\t\t$this->create();\n\t\t\t\t\telse{\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>NO_PERMITIDO,'data'=>NULL,'mensaje'=>'No tienes permisos suficientes'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//CARGAR VISTA DE NO PERMITIDO\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'lists':\n\t\t\t\t\t//Listar \n\t\t\t\t\t$this->lists();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'listsDetails':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->listsDetails();\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'get':\n\t\t\t\t\t//Obtener una Recepcion\n\t\t\t\t\t$this->getRecepcion();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'getFolio':\n\t\t\t\t\t$this->getFolio();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\techo $this->json_encode(array('error'=>SERVICIO_INEXISTENTE,'data'=>NULL,'mensaje'=>'Este recepcion no está disponible'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA DE SERVICIO INEXISTENTE\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function retorno(){\n\n $cod_pedido = $_REQUEST[\"cod_pedido\"];\n $sacarDatosPedido = (new Orm)->sacarDatosPedidoPasarela($cod_pedido);\n $data=0;\n echo Ti::render(\"view/pedido.phtml\", compact( \"sacarDatosPedido\", \"data\",\"cod_pedido\"));\n\n }", "public function indexsemana()\n {\n //Traendo partidos que no han sido terminados en esta semana\n $partidos=PartidoCalendario::with(\"EquipoCasaNombre\",\"EquipoVisitaNombre\",\"NombreLiga\")->orderBy('fecha_partido','ASC')->orderBy('hora_partido','ASC')->where('fecha_partido','>=',Carbon::today())->where('fecha_partido','<=',Carbon::today()->endOfWeek())->get();\n if(!$partidos){\n return response()->json(['mensaje' => 'No se encuentran partidos actualmente','codigo'=>404],404);\n }\n return response()->json(['datos' => $partidos],200);\n \n }", "public function indexmes()\n {\n $partidosmes=PartidoCalendario::with(\"EquipoCasaNombre\",\"EquipoVisitaNombre\",\"NombreLiga\")->orderBy('fecha_partido','ASC')->orderBy('hora_partido','ASC')->where('fecha_partido','>=',Carbon::today())->where('fecha_partido','<=',Carbon::today()->endOfMonth())->get();\n if(!$partidosmes){\n return response()->json(['mensaje' => 'No se encuentran partidos actualmente','codigo'=>404],404);\n }\n return response()->json(['datos' => $partidosmes],200);\n }", "public function cultura(Request $request, Response $response, $args)\n{\n //Variables\n $datin=Array();\n /*validando los argumentos que recibimos*/\n if(isset($args['idPadre'])) $idPadre = $args['idPadre'];\n if(isset($args['idContenido'])) $idContenido = $args['idContenido'];\n if(isset($args['idHijo'])) $idHijo = $args['idHijo'];\n \n $servicio=\"cultura\";\n $tituloservicio=\"CULTURA\";\n $datin=MunlimaControlador::plantillaUno($args,$servicio,$tituloservicio);\n\n $this->view->render($response, \"weblima/cultura.twig\", $datin);\n return $response;\n}", "public function index()\n {\n\n //consome API cotação\n\n function get_page($url) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, True);\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl,CURLOPT_USERAGENT,'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20100101 Firefox/7.0.1');\n $return = curl_exec($curl);\n curl_close($curl);\n return $return;\n }\n\n $contents = json_decode(get_page('http://api.promasters.net.br/cotacao/v1/valores?moedas=USD&alt=json'), true);\n\n $cotacoes = $contents['valores'];\n\n $existePerfil = Perfil::select(\"valorRenda\")->where('idUser', Auth::user()->id)->get();\n\n if (count($existePerfil) > 0) {\n $valorRenda = Perfil::select(\"valorRenda\")->where('idUser', Auth::user()->id)->first()->valorRenda;\n } else {\n $valorRenda = 0;\n }\n\n $existePoupanca = Poupanca::where('idUser', Auth::user()->id)->get();\n if (count($existePoupanca) > 0) {\n $poupancas = Poupanca::where('idUser', Auth::user()->id)->get();\n } else {\n $poupancas = \"\";\n }\n \n //movimentação\n $existeEntradaSaida = EntradaSaida::where('idUser', Auth::user()->id)->get();\n \n $date = date('Y-m');\n $dateStart = date($date.'-01');\n $dateEnd = date($date.'-t');\n\n if(count($existeEntradaSaida) > 0) {\n $movimentacoes = EntradaSaida::where('idUser', Auth::user()->id)\n ->where('data', '>=', $dateStart)\n ->where('data', '<=', $dateEnd)->get();\n \n $entradas = 0;\n $saidas = 0;\n \n foreach ($movimentacoes as $value) {\n if ($value['tipo'] == 1) {\n $entradas = $value['valor']+$entradas;\n $entradas++;\n } else {\n $saidas = $value['valor'];\n $saidas++;\n }\n }\n \n } else {\n $movimentacoes = \"\";\n $entradas = 0;\n $saidas = 0;\n $sobra = 0;\n }\n\n \n\n $totalEntrada = $valorRenda + $entradas;\n $sobra = $totalEntrada - $saidas;\n \n return view('home', ['cotacoes' => $cotacoes, \n 'valorRenda' => $valorRenda, \n 'poupancas'=> $poupancas,\n 'totalEntrada' => $totalEntrada,\n 'saidas' => $saidas,\n 'sobra' => $sobra,\n 'movimentacoes' => $movimentacoes]);\n }", "public function indexAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n $this->get('prefixedsessionservice')->setPrefix('administracion_servicio');\n\n //Order..\n $success = $this->get('orderbyservice')->resolveOrderBy($request->query->get('column'), array('nombre', 'codClienteEE', 'codRutaFolio', 'entidad', 'tipoServicio', 'horarioPico'), $request->query->get('order'));\n $column = $this->get('orderbyservice')->getColumn();\n $order = $this->get('orderbyservice')->getOrder();\n\n //Filter...\n $success = $success && $this->get('filterservice')->Filter($request->request->get('filter'));\n $filter = $this->get('filterservice')->getFilterText();\n\n //getting total count of elements in the view that depends of the logged user\n if($this->isLogged_PlanificadorSuperior()){\n $totalCount = $em->getRepository(\"sisconeeAppBundle:Servicio\")->countForAdminListBelongToOrg($this->getOrganismOfCurrentUser(), $filter);\n }\n else //is logged PlanificadorEntidad\n $totalCount = $em->getRepository(\"sisconeeAppBundle:Servicio\")->countForAdminListBelongTo($this->getEntityOfCurrentUser(), $filter);\n\n //Paging...\n $success = $success && $this->get('pagerservice')->Paging($request->query->get('page'), $totalCount);\n $currentPage = $this->get('pagerservice')->getPage();\n $countOfPages = $this->get('pagerservice')->getPageCount();\n $firstResultIndex = $this->get('pagerservice')->getFirstResult();\n $recordsPerPage = $this->get('pagerservice')->getMaxResult();\n\n if (!$success) {\n throw $this->createNotFoundException(\"Algunos de los parámetros proporcionados son incorrectos o están fuera de rango.\");\n }\n\n //List...\n $entities = null;\n if($this->isLogged_PlanificadorSuperior()){\n $entities = $em->getRepository(\"sisconeeAppBundle:Servicio\")->findAllBelongToOrg\n ($this->getOrganismOfCurrentUser(), $column, $order, $filter, $firstResultIndex, $recordsPerPage);\n }\n else { //is logged PlanificadorEntidad\n $entities = $em->getRepository(\"sisconeeAppBundle:Servicio\")->findAllBelongTo(\n $this->getEntityOfCurrentUser(), $column,$order, $filter, $firstResultIndex, $recordsPerPage);\n }\n\n return $this->render(\"sisconeeAdministracionBundle:Servicio:index.html.twig\", array(\n 'entities' => $entities,\n 'count' => $totalCount,\n 'column' => $column,\n 'order' => $order,\n 'filter' => $filter,\n 'page' => $currentPage,\n 'page_count' => $countOfPages\n ));\n }", "function setVenta(){\n if(isset($_GET['idUsu'], $_GET['idSec'], $_GET['pago'])){\n\n // Obtencion de los parametros\n $idUsuario = $_GET['idUsu'];\n $idSeccion = $_GET['idSec'];\n $pago = $_GET['pago'];\n\n // Conexion a la base de datos\n $con = conexion();\n\n //Validacion de lugares disponibles\n $json = file_get_contents('http://localhost/api/secciones.php?a=getLugaresDisponibles&idSec='.$idSeccion);\n $objeto = json_decode($json, true);\n\n // Validacion de que haya lugares disponibles\n if($objeto['lugares disponibles'] > 0){\n\n // Inserta los valores en la base de datos\n $query = \"INSERT INTO ventas VALUES(DEFAULT, \".$idUsuario.\", \".$idSeccion.\", '\".$pago.\"')\";\n $insert = $con -> query($query);\n\n // Validacion de que la insercion se hizo correctamente\n if($insert){\n\n // Crea el array de respuesta con un mensaje de correcto\n $respuesta = [\"res\" => \"1\", \"msg\" => \"Se realizó la compra correctamente\"];\n\n // Creacion del JSON, cierre de la conexion a la base de datos e imprime el JSON\n $json = json_encode($respuesta);\n $con -> close();\n print($json);\n }else{\n // Respuesta en caso de que no\n $json = json_encode([\"res\" => \"0\", \"msg\" => \"No se pudo realizar la compra, intente nuevamente\"]);\n $con->close();\n print($json);\n }\n }else{\n // Respuesta en caso de que no haya lugares disponibles\n $json = json_encode([\"res\"=>\"0\", \"msg\"=>\"Lo sentimos pero no hay lugares disponibles para esta sección\"]);\n print($json);\n }\n }else{\n // Respuesta en caso de que la url no contenga el id del usuario, id de seccion y el estado de pago\n $json = json_encode([\"res\"=>\"0\", \"msg\"=>\"La operación deseada no existe\"]);\n print($json);\n }\n}", "protected function index() {\n\t\t$service = new Model_Service();\n\t\t//$service->set('active',true);\n\t\t$this->payload->services = $service->find();\n\t}", "public static function index()\r\n {\r\n $dir = dirname(realpath(__DIR__ . ''));\r\n if (empty($_SESSION)) {\r\n @session_start();\r\n $parametrosSistema = file_get_contents($dir . \"/config/parametrosGenerales.json\");\r\n $array = json_decode($parametrosSistema, true);\r\n foreach ($array as $clave => $valor) {\r\n SessionController::guardarVariable($clave, $valor);\r\n }\r\n $parametrosDiccionario = file_get_contents($dir . \"/config/parametrosDiccionario.json\");\r\n $array = json_decode($parametrosDiccionario, true);\r\n foreach ($array as $clave => $valor) {\r\n SessionController::guardarVariable($clave, $valor);\r\n }\r\n SessionController::get_client_ip();\r\n }\r\n if(isset($_POST[\"z_c\"]) && $_POST[\"z_c\"] != \"\"){\r\n $parametros = Utilitarias::valorEncriptado($_POST[\"z_c\"]);\r\n if (isset($parametros[3]) && !SessionController::extraerVariable(\"valido_user\")) {\r\n if (file_exists(realpath($dir . \"/config/parametrosConfigCamara_\" . $parametros[3] . \".json\"))) {\r\n $parametrosSistema = file_get_contents(realpath($dir . \"/config/parametrosConfigCamara_\" . $parametros[3] . \".json\"));\r\n } else {\r\n $msj = array(\"codigoerror\" => \"E9999\", \"mensajeerror\" => \"No se encuentra configurada la camara seleccionada\");\r\n die(print_r(json_encode($msj), true));\r\n }\r\n $array = json_decode($parametrosSistema, true);\r\n SessionController::guardarVariable(\"codigoempresa\", $parametros[3]);\r\n foreach ($array as $clave => $valor) {\r\n SessionController::guardarVariable($clave, $valor);\r\n }\r\n SessionController::construirLocalPeticion();\r\n }\r\n }else{\r\n if (isset($_GET[self::TXTCODCAMARA]) && !SessionController::extraerVariable(\"valido_user\")) {\r\n if (file_exists(realpath($dir . \"/config/parametrosConfigCamara_\" . $_GET[self::TXTCODCAMARA] . \".json\"))) {\r\n $parametrosSistema = file_get_contents(realpath($dir . \"/config/parametrosConfigCamara_\" . $_GET[self::TXTCODCAMARA] . \".json\"));\r\n } else {\r\n $msj = array(\"codigoerror\" => \"E9999\", \"mensajeerror\" => \"No se encuentra configurada la camara seleccionada\");\r\n die(print_r(json_encode($msj), true));\r\n }\r\n $array = json_decode($parametrosSistema, true);\r\n SessionController::guardarVariable(\"codigoempresa\", $_GET[self::TXTCODCAMARA]);\r\n foreach ($array as $clave => $valor) {\r\n SessionController::guardarVariable($clave, $valor);\r\n }\r\n SessionController::construirLocalPeticion();\r\n }\r\n }\r\n }", "public function index()\r\r\n {\r\r\n Log::info(\"index ProductoServicioController\");\r\r\n\r\r\n $categoria=Categoria::all();\r\r\n $marca = Marca::all();\r\r\n $tipoNeg = TipoNegocio::all();\r\r\n $tipoProd = TipoProducto::all();\r\r\n $unidad = UnidadMedida::all();\r\r\n \r\r\n return view ('Productos.productoServicio')->with('categorias',$categoria)->with('marcas',$marca)->with('tipoNegs',$tipoNeg)->with('tipoProds',$tipoProd)->with('unidades',$unidad);\r\r\n }", "public function index(Request $request, Response $response, $args)\n {\n\n try {\n /* EXTRAYENDO LAS SECCIONES Y UBICACIONES */\n $datin[\"plantillas\"]=Modulos::getPlantillasByModulos(Constante::ID_PLANTILLA);\n /*EXTRAYENDO TEMÁTICAS*/\n $datin[\"tematicas\"]=Tematica::ListarTematica();\n $datin[\"ultimasNoticias\"] = Contenido::NoticiasByMesAnioUltimas();\n $datin[\"bannerPublicitario\"] = Contenido::BannerPublicitarios();\n //secciones\n $datin[\"seccionRecomendaciones\"]=Contenido::seccionHome(Constante::ID_SECCION_HOME_RECOMENDACIONES)[\"data\"][0];\n $datin[\"seccionProductosTemporada\"]=Contenido::seccionHome(Constante::ID_SECCION_HOME_PRODUCTOS_TEMPORADA)[\"data\"][0];\n $datin[\"seccionSemanaAhorro\"]=Contenido::seccionHome(Constante::ID_SECCION_HOME_SEMANA_AHORRO)[\"data\"][0];\n $datin[\"seccionSuministro\"]=Contenido::seccionHome(Constante::ID_SECCION_HOME_SUMINISTRO)[\"data\"][0];\n \n\n\n \n $mensaje =\"se elimino correctamente el usuario y la persona\";\n $estado = true;\n } catch (\\ErrorException $e) {\n $mensaje=\"Algo no salio muy bien\";\n $estado=false;\n }\n\n $datin[\"mensaje\"]= $mensaje;\n $datin[\"success\"] = $estado;\n // $datin[\"parametros\"] = ['title'=>\"Bienvenido :: Overseas Perú\", 'titulo' => \"BIENVENIDO A LOS SERVICIOS DE ATENCIÓN VIRTUAL\" ];\n //$obj1 = JsonRenderer::render($response,200,$datin);\n //var_dump($datin);\n //exit;\n $this->view->render($response, \"emmsa/inicio.twig\", $datin);\n return $response;\n\n }", "public function index()\n {\n //cargar todos los mensajes\n $mensajes = \\App\\Mensaje::with('departamento')->get();\n\n if(count($mensajes) == 0){\n return response()->json(['error'=>'No existen mensajes.'], 404); \n }else{\n return response()->json(['mensajes'=>$mensajes], 200);\n }\n }", "public function verificacionmostrar(){\n $objetoretornado = $this->mostrar();\n require '../vistas/servicios/mostrar.php';\n }", "private function guardarVista()\n {\n $request = FrontController::getInstance()->getRequest();\n\n //solo guarda el ultimo requestUri si fue una ruta que el router pudo procesar\n //de lo contrario si alguien pone una ruta del tipo www.mipagina.com/asdkjaskjdASDSss se guardaria\n //por mas que luego se termine en una pagina 404 es preferible que se redireccione por defecto segun perfil.\n if($request->getActionName() != 'redireccion404'){\n $this->historial->request_uri = $request->getRequestUri();\n }\n\n //luego guardo la informacion del nuevo request en el historial\n $this->historial->modulo = $request->getModuleName();\n $this->historial->controlador = $request->getControllerName();\n $this->historial->accion = $request->getActionName();\n\n //Por ultimo guardo los parametros que acompañaban a este request.\n //NOTA IMPORTANTE:\n //Cuando se hace un getParam($key) al request, internamente se fija en los parametros de clase y en los $_GET y $_POST del request\n //Al pasar todos los parametros a sesion a traves de getParams() se unen TODOS los parametros:\n //Los internos (Zend los llama userland parameters) + los $_GET + los $_POST. Todos en un solo array (tienen prioridad los internos).\n //En ultima instancia, para el metodo cliente que ejecute getParam($key) en el request luego de una redireccion sera transparente\n //y no habra diferencia. La diferencia es solo interna, cuando se haga una redireccion al ultimo request guardado en sesion\n //los parametros seran todos internos (cuando posiblemente en el request original algunos fueran de $_GET o $_POST). Very tricky uh?\n //$this->historial->params = array();\n //borro los parametros de codigo de error y de mensaje antiguamente usados porque estarian desactualizados\n //luego de una posible redireccion\n $request->setParam('codigoError', null)\n ->setParam('msgInfo', null)\n ->setParam('msgError', null)\n ->setParam('msgCorrecto', null);\n //guardo los parametros en el historial\n $this->historial->params = $request->getParams();\n\n return $this;\n }", "function facturaElectronicaCompraVentaImpuestos($data,$id_venta,$codigo_pv,$codigo_sucursal){\r\n\t\t$apiImpuestosBoa = $_SESSION['_END_POINT_FACTURACION_PRO'];\r\n\t\tif ($_SESSION['_ESTADO_SISTEMA'] != \"produccion\") {\r\n\t\t\t$apiImpuestosBoa = $_SESSION['_END_POINT_FACTURACION_DEV'];\r\n\t\t}\r\n\r\n\t\t// validacion de ruta inicial.\r\n\t\tif ($apiImpuestosBoa == \"\" || $apiImpuestosBoa == null){\r\n\r\n\r\n\r\n\t\t\t$send = array(\r\n \"error\" => true,\r\n \"mensaje\" => \"No se definio la ruta de los servicios de facturacion electronica. Favor Contactarse con sistemas.\",\r\n );\r\n echo json_encode($send);exit;\r\n\r\n \t//throw new Exception(\"No se definio la ruta de los servicios de facturacion electronica. Favor Contactarse con sistemas.\");\r\n }\r\n\r\n\t\t// Json request para servicio\r\n\t\t$jsonData = $data[0]['jsondata'];\r\n\r\n\t\t// verifica que tipo de servicio se usara, factura electronica compra venta (1) o tasas (41)\r\n\t\t$endPoint = 'EnviarFacturaElectronicaCompraVenta';\r\n\t\tif ((int)$this->objParam->getParametro('documento_sector') == 41) {\r\n\t\t\t//Valor de la paramétrica que identifica el tipo de factura que se está emitiendo. Para este tipo de factura este valor es 41.\r\n\t\t\t$endPoint = 'EnviarFacturaElectronicaCompraVentaTasas';\r\n\t\t}\r\n\r\n\t\t$this->objParam->arreglo_parametros['solicitud'] = $jsonData;\r\n\t\t$this->objParam->arreglo_parametros['nombre_servicio'] = $endPoint;\r\n\t\t$this->objFunc0 = $this->create('MODServicioImpuesto');\r\n\t\t$this->res0 = $this->objFunc0->insertFacturaElectronicaLog($this->objParam); //registro log antes de llamar al servicio\r\n\r\n\t\t$dataLog = $this->res0->getDatos();\r\n\t\t$id_log_servicio = $dataLog['id_log_servicio'];\r\n\r\n\t\t// esctructura curl para llamada al servicio -> EnviarFacturaElectronicaCompraVenta\r\n\t\t$s = curl_init();\r\n\t\tcurl_setopt($s, CURLOPT_URL, $apiImpuestosBoa.$endPoint);\r\n\t\tcurl_setopt($s, CURLOPT_POST, true);\r\n\t\tcurl_setopt($s, CURLOPT_POSTFIELDS, $jsonData);\r\n\t\tcurl_setopt($s, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($s, CURLOPT_CONNECTTIMEOUT, 20);\r\n\t\tcurl_setopt($s, CURLOPT_HTTPHEADER, array(\r\n\t\t\t\t\t\t'Content-Type: application/json',\r\n\t\t\t\t\t\t'Content-Length: ' . strlen($jsonData))\r\n\t\t);\r\n\r\n\t\t$_out = curl_exec($s);\r\n\r\n\t\t// captura código de respuesta\r\n\t\t$status = curl_getinfo($s, CURLINFO_HTTP_CODE);\r\n\r\n\t\t// estructura respuesta array, para la interfaz\r\n\t\t$response = array('codigo' => '', 'message' => '', 'result' => array('estado' => null, 'cuf' => '', 'cufd' => '', 'numeroFactura' => null, 'descripcionEstado' => ''));\r\n\t\t$totalRes = \"\";\r\n\t\t$cuf = \"\";\r\n\t\t$cufd = \"\";\r\n\t\t$facturaXml = \"\";\r\n\t\t$fechaEmisionSIN = \"\";\r\n\t\t$descripcionEstado = \"\";\r\n\r\n\t\tif (!$status) {\r\n\t\t\t\t$response['message'] = 'No se pudo conectar con el middleware de facturacion electronica.';\r\n\t\t\t\t$response['codigo'] = 'SIN_CONEXION';\r\n\t\t}\r\n\r\n\t\tcurl_close($s);\r\n\r\n\t\t// validacion codigos de statado de conexion [400, 404, 408]\r\n\t\tif ($status == 400) {\r\n\t\t\t\t$response['message'] = 'En informacion enviada, al middleware de facturacion electronica.';\r\n\t\t\t\t$response['codigo'] = 'BAD_REQUEST';\r\n\t\t}\r\n\r\n\t\tif ($status == 404) {\r\n\t\t\t\t$response['message'] = 'Middleware servicio de facturacion electronica no encontrada.';\r\n\t\t\t\t$response['codigo'] = 'API_NO_ENCONTRADA';\r\n\t\t}\r\n\r\n\t\tif ($status == 408) {\r\n\t\t\t$response['message'] = 'La solicitud tardo mas de lo esperado. La conexion con el servicio de facturacion electronica, se agoto.';\r\n\t\t\t$response['codigo'] = 'REQUEST_TIMEOUT';\r\n\t\t}\r\n\r\n\t\t// decodificacion de respuesta\r\n\t\t$res = json_decode($_out);\r\n\r\n\t\tif (!is_null($res)) {\r\n\t\t\t// decodificaion caso exito\r\n\t\t\t$totalRes = json_encode($res);\r\n\r\n\t\t\t// Json response del servicio facturacion electronica\r\n\t\t\t$resData = $res->EnviarFacturaElectronicaCompraVentaResult;\r\n\r\n\r\n\r\n\t\t\tif(in_array($resData->DescripcionEstado, array(\"VALIDADA\", \"OFFLINE\"))) {\r\n\t\t\t\t$response['codigo'] = 'EXITO';\r\n\t\t\t} elseif($resData->DescripcionEstado == \"NO ENVIADA\"){\r\n\t\t\t\t$mensaje = $resData->Mensaje[0];\r\n\r\n\t\t\t\t$mensajeExp = explode('|',$mensaje);\r\n\t\t\t\t$cantidad = count($mensajeExp);\r\n\r\n\t\t\t\tif ($cantidad > 1) {\r\n\t\t\t\t\t$response['codigo'] = 'ERROR';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$response['codigo'] = 'PENDIENTE_EMISION';\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\t$response['codigo'] = 'ERROR';\r\n\t\t\t}\r\n\r\n\t\t\tif (gettype($resData->Mensaje) == \"array\") {\r\n\t\t\t\tforeach ($resData->Mensaje as $value) {\r\n\t\t\t\t\t$response['message'] = \" En middleware \".$response['message'].\" - \".$value.\" SUCURSAL: \".$codigo_sucursal.\" PUNTO DE VENTA: \".$codigo_pv;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$response['message'] = \" En middleware \".json_encode($resData->Mensaje);\r\n\t\t\t}\r\n\r\n\t\t\t//$response['codigo'] = 'ERROR';\r\n\t\t\t// captura de datos relevantes para actualizar campos de tabla vef.tventa\r\n\r\n\t\t\t/*Aqui para el cuf y cufd poner vacios*/\r\n\t\t\tif ($response['codigo'] == 'EXITO') {\r\n\t\t\t\t$cuf = $resData->Respuesta->cabecera->cuf;\r\n\t\t\t\t$cufd = $resData->Respuesta->cabecera->cufd;\r\n\t\t\t\t$facturaXml = $resData->xmlSigned;\r\n\t\t\t} else {\r\n\t\t\t\t$cuf = '';\r\n\t\t\t\t$cufd = '';\r\n\t\t\t\t$facturaXml = '';\r\n\t\t\t}\r\n\t\t\t/**************************************/\r\n\r\n\t\t\t$fechaEmisionSIN = $resData->Respuesta->cabecera->fechaEmisionSIN;\r\n\t\t\t$leyenda = $resData->Respuesta->cabecera->leyenda;\r\n\t\t\t$numeroFactura = $resData->Respuesta->cabecera->numeroFactura;\r\n\t\t\t$descripcionEstado = $resData->DescripcionEstado;\r\n\r\n\t\t\t$response['result'] = array('estado' => $resData->Estado, 'cuf' => $cuf, 'cufd' => $cufd, 'numeroFactura' => $numeroFactura, \"descripcionEstado\" => $descripcionEstado);\r\n\r\n\t\t}\r\n\r\n\t\t$this->objParam->arreglo_parametros['id_log_servicio'] = $id_log_servicio;\r\n\t\t$this->objParam->arreglo_parametros['cuf'] = ($cuf==\"\")?\"\":$cuf;\r\n\t\t$this->objParam->arreglo_parametros['cufd'] = ($cufd==\"\")?\"\":$cufd;\r\n\t\t$this->objParam->arreglo_parametros['fecha_emision_sin'] = $fechaEmisionSIN;\r\n\t\t$this->objParam->arreglo_parametros['leyenda'] = $leyenda;\r\n\t\t$this->objParam->arreglo_parametros['codigo'] = $response['codigo'];\r\n\t\t$this->objParam->arreglo_parametros['mensaje'] = str_replace(\"'\", \"\", $response['message']);\r\n\t\t$this->objParam->arreglo_parametros['resultado'] = str_replace(\"'\", \"\", $totalRes);\r\n\t\t$this->objParam->arreglo_parametros['facturaxml'] = ($facturaXml==\"\")?\"\":$facturaXml;\r\n\t\t$this->objParam->arreglo_parametros['descripcion_estado'] = $descripcionEstado;\r\n\t\t// actulzacion de datos en tabla vef.tventa\r\n\t\t$this->objFunc1 = $this->create('MODServicioImpuesto');\r\n\t\t$this->res2 = $this->objFunc1->actualizarFacturaElectronicaLog($this->objParam);\r\n\t\t$dataLog = $this->res2->getDatos();\r\n\r\n\t\t// validacion cuf duplicado en base de datos\r\n\t\tif (!is_null($dataLog['cuf'])) {\r\n\t\t\tif ($dataLog['cuf'] != \"\") {\r\n\r\n\r\n $send = array(\r\n \"error\" => true,\r\n \"mensaje\" => \"ERP Mensaje: el CUF: \".$cuf.\" ya fue registrado en una factura. Favor contactarse con sistemas.\",\r\n );\r\n echo json_encode($send);exit;\r\n\r\n //\tthrow new Exception(\"ERP Mensaje: el CUF: \".$cuf.\" ya fue registrado en una factura. Favor contactarse con sistemas.\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn json_encode($response);\r\n\r\n\r\n }", "public function index(Request $request)\n {\n if (!$request->ajax()) return redirect('/');\n\n $servicio = new Servicio(); \n\n return $servicio->getServicios(); \n }", "public function obra(Request $request, Response $response, $args)\n{\n\n if(isset($args['idContenido'])) $idContenido = $args['idContenido'];\n\n $dataObra = NoticiaControlador::getVerObraDetalle($idContenido);\n $datin[\"dataNoticia\"]=$dataObra;\n\n $dataMedia = NoticiaControlador::getListadoMediaObra($idContenido);\n $datin[\"dataMedia\"]=$dataMedia;\n\n $dataFileObra = NoticiaControlador::AllFileContenido($datin[\"dataNoticia\"][\"data\"][\"N_ID_CONTENIDO\"]);\n $datin[\"dataFileNoticia\"]=$dataFileObra;\n \n $dataObraAll = NoticiaControlador::getListadoObrasAll(4);\n $datin[\"dataNoticiasAll\"]=$dataObraAll;\n\n $datin[\"pathmunlima\"] = Constante::PATHMUNLIMA;\n\n //$datin[\"conten_audio\"]=$conten_audio;\n $datin[\"c_noticia\"]=utf8_encode($dataObra[\"data\"][\"C_CONTENIDO\"]);\n\n $this->view->render($response, \"weblima/obra.twig\", $datin);\n return $response;\n}", "public function indexAction()\n {\n $messages = $this->getDoctrine()->getRepository(Contato::class)->findAll();\n\n if (!$messages){\n throw $this->throwApiProblemException('Não há mensagens', JsonResponse::HTTP_NOT_FOUND);\n }\n\n /*$messages = $this->montaObjeto($messages, [\n 'id',\n 'nome',\n 'email',\n 'telefone',\n 'assunto',\n 'mensagem',\n 'data',\n 'isRespondido',\n 'lido'\n\n ]);\n\n $data = ['mensagens' => $messages];*/\n\n //return $this->createApiResponse($data);\n return $this->createApiResponse($messages);\n }", "public function index()\n {\n /*$tipotrans = mtipotran::all();\n $response = Response::json($tipotrans,200);\n return $response;*/\n\n return response()->json([\n 'data' => mtipotran::all(),\n ], 200);\n }", "public function index_api()\n {\n $user = Auth::user();\n\n if($user->role != \"empleado\"){\n return response()->json([\n 'status' => 'fail',\n 'details' => 'Sin autorización'\n ], 403);\n }else{\n\n $entregas = Entrega::all();\n\n foreach ($entregas as $entrega) {\n\n $usuario = $entrega->user()->get();\n $entrega->usuario = $usuario[0];\n }\n\n return response()->json([\n 'status' => 'success',\n 'data' => $entregas\n ], 200);\n }\n }", "public function subsanaObservacion(Request $request, $id)\n {\n #1. Actualizamos el expedientes\n try \n {\n $expediente = Expediente::findOrFail($id);\n $expediente->codEstado = 1;#Vuelve a estado Pendiente\n $expediente->updated_auth = Auth::user()->id;\n $expediente->update();\n\n #2. Actualizamos y levantamos las observaciones\n try \n {\n $ur = ExpedienteSdaUr::where('codExpediente', $expediente->id)->first();\n $ur->fecha_levanta_observacion = $request->get('fecha_respuesta');\n $ur->fecha_recibe_expediente_observado = $request->get('fecha_recepcion');\n $ur->cod_estado_proceso = 1;\n $ur->updated_auth = Auth::user()->id;\n $ur->update();\n\n #3. Actualizamos el estado situacional\n try \n {\n $situacion = PostulanteEstado::where('codPostulante', $expediente->codPostulante)->first();\n $situacion->codEstadoSituacional = 13;#En proceso de evaluacion\n $situacion->updated_auth = Auth::user()->id;\n $situacion->update();\n\n #4. retorno al menu principal\n return response()->json([\n 'estado' => '1',\n 'dato' => '',\n 'mensaje' => 'La información se procesó de manera exitosa.'\n ]);\n } \n catch (Exception $e) \n {\n return response()->json([\n 'estado' => '2',\n 'dato' => $e->getMessage(),\n 'mensaje' => 'Error de Servidor. Contacte a Soporte TI.'\n ]);\n }\n } \n catch (Exception $e) \n {\n return response()->json([\n 'estado' => '2',\n 'dato' => $e->getMessage(),\n 'mensaje' => 'Error de Servidor. Contacte a Soporte TI.'\n ]);\n }\n } \n catch (Exception $e) \n {\n return response()->json([\n 'estado' => '2',\n 'dato' => $e->getMessage(),\n 'mensaje' => 'Error de Servidor. Contacte a Soporte TI.'\n ]);\n }\n }", "public function index()\n {\n try {\n //LISTAMOS LAS Parroquias REGISTRADAS EN LA BASE DE DATOS Y LA PASAMOS A LA VISTA\n $listaServicio=ServicioModel::where('estado','Activo')->get();\n return view('gestionServicios.registro')->with(['listaServicio'=>$listaServicio]);\n } catch (\\Throwable $th) {\n Log::error(\"Error get Request Id \".$th->getMessage());\n return back();\n }\n\n }", "public function index()\n {\n return response()->json(Controladores::todos());\n }", "public function index()\n {\n $veiculos = Veiculo::all();\n return response()->json(['data' => $veiculos]); \n }", "private function suivi_crm(){\t\n\t\t\t\n\t\t\tif($this->get_request_method() != \"GET\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t\n\t\t\t$result=suivi_crm();\n\t\t\t$this->response($this->json($result), 200);\n\t\t\t$this->response('',204);\t\n\t\t}", "public function index(){\n\t\t$respuesta = array('http_status'=>200,'data'=>'');\n\n\t\t$parametros = Input::all();\n\t\t\n\t\ttry{\n\t\t\tif(isset($parametros['formatogrid'])){\n\t\t\t\tif($parametros['pagina']==0){ $parametros['pagina'] = 1; }\n\t\t\t\t\n\t\t\t\t//$ejercicio_actual = date('Y');\n\t\t\t\t$ejercicio_actual = Util::obtenerAnioCaptura();\n\t\t\t\t//$rows = IndicadorFASSA::getModel();\n\t\t\t\t$rows = IndicadorFASSAMeta::getModel();\n\t\t\t\t$rows = $rows->with('registroAvance');\n\t\t\t\t$rows = $rows->indicadoresEjercicio()->where('ejercicio','=',$ejercicio_actual);\n\t\t\t\t\n\t\t\t\t$usuario = Sentry::getUser();\n\t\t\t\tif($usuario->idDepartamento == 2){\n\t\t\t\t\tif($usuario->filtrarIndicadores){\n\t\t\t\t\t\t$rows = $rows->where('idUsuarioValidacionSeg','=',$usuario->id);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$rows = $rows->where('idUsuarioRendCuenta','=',$usuario->id);\n\t\t\t\t}\n\n\t\t\t\tif(isset($parametros['buscar'])){\n\t\t\t\t\tif($parametros['buscar']){\n\t\t\t\t\t\t$rows = $rows->where(function($query) use ($parametros){\n\t\t\t\t\t\t\t\t\t$query->where('indicador','like','%'.$parametros['buscar'].'%')\n\t\t\t\t\t\t\t\t\t\t->orWhere('fuenteInformacion','like','%'.$parametros['buscar'].'%');\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t$total = $rows->count();\n\t\t\t\t}else{\n\t\t\t\t\t$total = $rows->count();\n\t\t\t\t}\n\n\t\t\t\t$rows = $rows->orderBy('id', 'desc')\n\t\t\t\t\t\t\t->skip(($parametros['pagina']-1)*10)->take(10)\n\t\t\t\t\t\t\t->get();\n\t\t\t\t//\n\t\t\t\t\t\t//$queries = DB::getQueryLog();\n\t\t\t\t\t\t//return $last_query = end($queries);\n\t\t\t\t$data = array('resultados'=>$total,'data'=>$rows, 'mes_actual'=>Util::obtenerMesActual());\n\t\t\t\t$respuesta['data'] = $data;\n\t\t\t\t\t\n\t\t\t\tif($total<=0){\n\t\t\t\t\t$respuesta['http_status'] = 404;\n\t\t\t\t\t$respuesta['data'] = array('resultados'=>$total,\"data\"=>\"No hay datos\",'code'=>'W00');\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$rows = IndicadorFASSA::all();\n\t\t\t\tif(count($rows) == 0){\n\t\t\t\t\t$respuesta['http_status'] = 404;\n\t\t\t\t\t$respuesta['data'] = array(\"data\"=>\"No hay datos\",'code'=>'W00');\n\t\t\t\t}else{\n\t\t\t\t\t$respuesta['data'] = array(\"data\"=>$rows);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(\\Exception $e){\n\t\t\t$respuesta['http_status'] = 500;\n\t\t\t$respuesta['data'] = array(\"data\"=>$e->getMessage(),'code'=>'S01');\n\t\t}\n\t\treturn Response::json($respuesta['data'],$respuesta['http_status']);\n\t}", "public function index()\r\n\t{\r\n\t\t$obj = null;//require obj;\r\n\t\t$this->send($obj);\r\n\t}", "public function index()\n {\n $produto = $this->produto->paginate($this->totalPage);\n if (count($produto) > 0) {\n $newProduto = collect(Helper::valorProdutos($produto));\n $data = $newProduto->merge($produto);\n return response()->json($data, 200);\n }\n else {\n return response()->json(\"Não há produtos cadastradas\", 400);\n\n }\n }", "public function IngresarAplicacion(){}", "public function index()\n {\n //$datos=Historia_Clinica_RF::all();\n $datos=Historia_Clinica_RF::with('paciente', 'tratamiento','diagnostico')->get();\n $num_rows = count($datos);\n if($num_rows!=0){\n return response()->json(['result'=>$datos]);\n }else\n return response()->json(['mensaje'=>\"No existen datos registrados\", 'code'=>'202']);\n\n }", "public function vistaHabitacionesController(){\n //Se envia la consulta al model para que regrese la informacion\n $respuesta = Datos::vistaHabitacionesModel();\n //y esta es enviada a la vista para ser procesada y mostrada.\n return $respuesta;\n }", "public function index()\n {\n $idusuario = Auth::user()->id;\n $servicio = Servicio::whereuser_id($idusuario)->get();\n return view('client.misservicios', compact('servicio'));\n }", "public function index()\n\t{\n\t\t//\n\t\t$http_status = 200;\n\t\t$data = array();\n\n\t\ttry{\n\t\t\t$parametros = Input::all();\n\t\t\tif(isset($parametros['formatogrid'])){\n\n\t\t\t\tif(isset($parametros['mes'])){\n\t\t\t\t\t$mes = $parametros['mes'];\n\t\t\t\t}else{\n\t\t\t\t\t$mes = Util::obtenerMesActual();\n\t\t\t\t\tif($mes == 0){ $mes = date('n') - 1; }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(isset($parametros['ejercicio'])){\n\t\t\t\t\t$ejercicio = $parametros['ejercicio'];\n\t\t\t\t}else{\n\t\t\t\t\t$ejercicio = date('Y');\n\t\t\t\t}\n\n\t\t\t\t$rows = EvaluacionAnalisisFuncional::cuentaPublica($mes,$ejercicio);\n\n\t\t\t\t$usuario = Sentry::getUser();\n\t\t\t\t\n\t\t\t\tif($usuario->filtrarProyectos){\n\t\t\t\t\t$rows = $rows->where('idUsuarioValidacionSeg','=',$usuario->id);\n\t\t\t\t}\n\n\t\t\t\tif($usuario->claveUnidad){\n\t\t\t\t\t$unidades = explode('|',$usuario->claveUnidad);\n\t\t\t\t\t$rows = $rows->whereIn('unidadResponsable',$unidades);\n\t\t\t\t}\n\n\t\t\t\tif($parametros['pagina']==0){ $parametros['pagina'] = 1; }\n\t\t\t\t\n\t\t\t\tif(isset($parametros['buscar'])){\t\t\t\t\n\t\t\t\t\t$rows = $rows->where(function($query)use($parametros){\n\t\t\t\t\t\t\t$query->where(DB::raw('concat(unidadResponsable,finalidad,funcion,subfuncion,subsubfuncion,programaSectorial,programaPresupuestario,origenAsignacion,actividadInstitucional,proyectoEstrategico,LPAD(numeroProyectoEstrategico,3,\"0\"))'),'like','%'.$parametros['buscar'].'%')\n\t\t\t\t\t\t\t\t->orWhere('nombreTecnico','like','%'.$parametros['buscar'].'%');\n\t\t\t\t\t});\n\t\t\t\t\t$total = $rows->count();\n\t\t\t\t}else{\t\t\t\t\n\t\t\t\t\t$total = $rows->count();\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t$rows = $rows->orderBy('id', 'desc')\n\t\t\t\t\t\t\t->skip(($parametros['pagina']-1)*10)->take(10)\n\t\t\t\t\t\t\t->get();\n\t\t\t\t//\n\t\t\t\t$data = array('resultados'=>$total,'data'=>$rows);\n\n\t\t\t\tif($total<=0){\n\t\t\t\t\t$http_status = 404;\n\t\t\t\t\t$data = array('resultados'=>$total,\"data\"=>\"No hay datos\",'code'=>'W00');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn Response::json($data,$http_status);\n\t\t\t}\t\n\n\t\t\t$rows = EvaluacionAnalisisFuncional::all();\n\n\t\t\tif(count($rows) == 0){\n\t\t\t\t$http_status = 404;\n\t\t\t\t$data = array(\"data\"=>\"No hay datos\",'code'=>'W00');\n\t\t\t}else{\n\t\t\t\t$data = array(\"data\"=>$rows->toArray());\n\t\t\t}\n\t\t}catch(\\Exception $e){\n\t\t\t$http_status = 404;\n\t\t\t$data = array(\"data\"=>\"\",'ex'=>$e->getMessage(),'line'=>$e->getLine(),'code'=>'S02');\n\t\t}\n\n\t\treturn Response::json($data,$http_status);\n\t}", "public function index()\n {\n $body = (object) Request::all();\n\n // Verificación para el uso del Controllador\n if (!$this->validateController($body->usuario)) {\n return Response::json(['texto' => \"Actualmente no cuenta con permisos\"], 418);\n }\n\n return Clientes::Filtro()->with('detalle')->get();\n }", "function mostrar_inventario()\r\n { \r\n \r\n $data['sistema'] = $this->sistema;\r\n if($this->acceso(25)){\r\n //**************** inicio contenido ***************\r\n\t\t\r\n $parametro = $this->input->post(\"parametro\");\r\n if ($parametro==\"\" || $parametro==null)\r\n $resultado = $this->Inventario_model->get_inventario(); \r\n else\r\n $resultado = $this->Inventario_model->get_inventario_parametro($parametro);\r\n \r\n echo json_encode($resultado); \r\n\t\t\r\n //**************** fin contenido ***************\r\n\t\t\t}\r\n\t\t\t\r\n }", "public function enlacesPaginasControladores(){\r\n $enlacesControladores=$_GET[\"action\"];\r\n# esta veriable esta pidiendo que tome la clase enlaces y que se conecte a enlacespaginasModelos\r\n $respuesta=EnlacesPaginas::enlacesPaginasModelos($enlacesControladores);\r\n\r\n#aqui solo borramos el \"echo $enlacesControladores\" y los sutituimos por \"include $respuesta\" rescordemos que\r\n# el echo solo imprime textos y el include incluye formatos enteros o contenidos\r\n include $respuesta;\r\n\r\n }", "public function index()\n {\n //cargar todas las calificaciones\n $repartidores = \\App\\Repartidor::where('activo',4)->\n with(['usuario' => function ($query){\n $query->select('id', 'codigo','email', 'nombre', 'ciudad', 'estado', 'telefono', 'imagen', 'tipo_usuario', 'token_notificacion')\n ->where(function ($query) {\n $query\n ->where('tipo_usuario',3)\n ->orWhere('tipo_usuario',4);\n })\n ->with(['chat_repartidor' => function ($query) {\n $query->select('id', 'admin_id', 'usuario_id');\n }])\n ->with('registro')\n ->with('contrato');\n }])->with('establecimiento.productos.subcategoria.categoria.catprincipales')->orderBy('id', 'desc')\n ->get();\n\n if(count($repartidores) == 0){\n return response()->json(['error'=>'No existen repartidores.'], 404); \n }else{\n return response()->json(['repartidores'=>$repartidores], 200);\n } \n }", "public function extras(Request $request, Response $response, $args)\n{\n //Variables\n $datin=Array();\n /*validando los argumentos que recibimos*/\n if(isset($args['idPadre'])) $idPadre = $args['idPadre'];\n if(isset($args['idContenido'])) $idContenido = $args['idContenido'];\n if(isset($args['idHijo'])) $idHijo = $args['idHijo'];\n \n $servicio=\"extras\";\n $tituloservicio=\"EXTRAS\";\n $datin=MunlimaControlador::plantillaUno($args,$servicio,$tituloservicio);\n\n $this->view->render($response, \"weblima/extras.twig\", $datin);\n return $response;\n}", "function ingresoController(){\n\t\tif ( empty($_POST['usuariolg']) || empty($_POST['passlg'])) {\n\t\t\t//echo \"Varibles vacias\";\n\t\t}else{\n\t\t\t\n\t\t\t$respuesta = (new AdminModel) -> ingresoM($_POST['usuariolg'], $_POST['passlg']);\n\t\t\tif (strtolower($respuesta[\"usuario\"]) == strtolower($_POST['usuariolg']) && $respuesta[\"password\"] == $_POST['passlg']) {\t\n\t\t\t\techo \"<span class=''>Salió</span>\";\n\t\t\t\tif($_SESSION['usuario']){\n\t\t\t\t\techo '<br>';\n\t\t\t\t\tif (empty($_GET['Tid'])) {\n\t\t\t\t\t\theader('Location: ?');\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\theader('Location: ?action=cartelera&Tid='.$_GET['Tid']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\techo \"<span class='noti'>Verifique sus datos<br> \".$respuesta['usuario'].\"</span>\";\n\t\t\t\t\t}\n\t\t\t}\t\n\t}", "function getAllPruebas() {\n try {\n $lista = Pruebas::getAllPruebas();\n // Vamos a editar la lista, y añadir los datos de la persona receptora y el nombre del tecnologo\n // the loop is going to show all the information where there is an instance of Prueba and display the attributes. \n // The display include the attributes from the tecnologo and Id, poblacion with which identify, poblacion_originatia from the persona receptora \n foreach($lista as $prueba) {\n $persona_receptora = PersonasReceptoras::getPersonaReceptora($prueba->getId_cedula_persona_receptora());\n $prueba->poblacion = $persona_receptora->getPoblacion(); \n $prueba->poblacion_originaria = $persona_receptora->getPoblacion_originaria(); \n $tecnologo = Usuarios::getUsuarioById($prueba->getId_tecnologo());\n $prueba->nombre_tecnologo = $tecnologo->getNombre() . ' ' . $tecnologo->getApellidos();\n }\n return prepara_para_json($lista);\n } // if there are any errors will be catch here and notify with an error message\n catch (Exception $e) {\n $array_response['error'] = 1;\n $array_response['errorMessage'] = $e->getMessage();\n return $array_response;\n }\n}" ]
[ "0.6846483", "0.68060184", "0.6712416", "0.66758347", "0.66529197", "0.6523308", "0.65188104", "0.65082955", "0.6499907", "0.6493494", "0.64906424", "0.6458665", "0.64569205", "0.64502287", "0.6431944", "0.64294827", "0.6416725", "0.6403489", "0.63975435", "0.6388734", "0.63839626", "0.6378021", "0.6372692", "0.63718003", "0.6359935", "0.6358884", "0.6350155", "0.6336412", "0.6327701", "0.63264364", "0.6317386", "0.6299868", "0.62934065", "0.6292269", "0.62791914", "0.6272294", "0.62685144", "0.62679505", "0.62671626", "0.62593645", "0.62527347", "0.62514293", "0.62437487", "0.62378", "0.6235572", "0.62310344", "0.62283635", "0.62282467", "0.62265784", "0.62200475", "0.62176025", "0.6217114", "0.6215753", "0.6210712", "0.62025374", "0.6200719", "0.61990577", "0.6194596", "0.6186999", "0.6183629", "0.6177412", "0.6177177", "0.6166366", "0.61523587", "0.6152008", "0.6151434", "0.61512065", "0.6146198", "0.61397785", "0.61380124", "0.6137703", "0.61325103", "0.6131505", "0.61220104", "0.6121712", "0.61158556", "0.61097103", "0.6108745", "0.61085576", "0.6104306", "0.6100991", "0.60986406", "0.6094769", "0.6094463", "0.6092108", "0.6091992", "0.6091687", "0.60864735", "0.6082358", "0.608217", "0.6079356", "0.60792404", "0.6077722", "0.60719144", "0.60697585", "0.6067441", "0.60642225", "0.60586095", "0.6058307", "0.60582083", "0.60518324" ]
0.0
-1
Create a new URI.
public function createUri(string $uri = ''): UriInterface { return ArkWebUri::fromUriString($uri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createUri($uri = '');", "protected function createUri($uri)\n {\n return Uri::createFromString($uri);\n }", "public function newInstance($uri);", "protected function createUri($url)\n\t{\n\t\tif ($url instanceof Uri)\n\t\t{\n\t\t\treturn $url;\n\t\t}\n\n\t\t// Create full URL if we are only appending variables to it\n\t\tif (substr($url, 0, 1) == '&')\n\t\t{\n\t\t\t$vars = array();\n\n\t\t\tif (strpos($url, '&amp;') !== false)\n\t\t\t{\n\t\t\t\t$url = str_replace('&amp;', '&', $url);\n\t\t\t}\n\n\t\t\tparse_str($url, $vars);\n\n\t\t\t$vars = array_merge($this->vars(), $vars);\n\n\t\t\tforeach ($vars as $key => $var)\n\t\t\t{\n\t\t\t\tif ($var == '')\n\t\t\t\t{\n\t\t\t\t\tunset($vars[$key]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$url = 'index.php?' . urldecode(http_build_query($vars, '', '&'));\n\t\t}\n\n\t\treturn new Uri($url);\n\t}", "public function getUriFactory(): UriFactory;", "function makeUri( $uri )\r\n\t{\r\n\t\t$a = parse_url( $uri );\r\n\r\n\t\tif( isset($a['scheme']) && isset($a['host']) ) {\r\n\t\t\t$this->url = $a;\r\n\t\t} else {\r\n\t\t\tunset( $this->url['query']);\r\n\t\t\tunset( $this->url['fragment']);\r\n\t\t\t$this->url = array_merge( $this->url, $a );\r\n\t\t}\t\t\r\n\t\tif( $this->useProxy ) {\r\n\t\t\t$requesturi= \"http://\" . $this->url['host'] . ( empty($this->url['port']) ? \"\" : \":\" . $this->url['port'] ) . $this->url['path'] . ( empty($this->url['query']) ? \"\" : \"?\" . $this->url['query'] );\r\n\t\t} else {\r\n\t\t\t$requesturi = $this->url['path'] . (empty( $this->url['query'] ) ? \"\" : \"?\" . $this->url['query']);\r\n\t\t}\r\n\t\treturn $requesturi;\r\n\t}", "abstract public function buildUri($options);", "public static function createFromString($uri)\n {\n // Check for valid argument type\n if (!is_string($uri) && !method_exists($uri, '__toString')) {\n throw new \\InvalidArgumentException(\n '\\Veto\\Http\\Uri::createFromString() argument must be a string'\n );\n }\n\n // Normalize URL before validation as filter_var requires this for a valid url\n $mungedUri = $uri;\n if (!array_key_exists('scheme', parse_url($uri))) {\n $mungedUri = 'http://' . $uri;\n }\n\n $parts = parse_url($mungedUri);\n\n // Ensure that the URL is valid\n if (!filter_var($mungedUri, FILTER_VALIDATE_URL) || !strlen($parts['host'])) {\n throw new \\InvalidArgumentException(\n 'Call to \\\\' . __METHOD__ . '() with invalid URI \"' . $uri . '\"'\n );\n }\n\n $scheme = $parts['scheme'];\n $user = isset($parts['user']) ? $parts['user'] : '';\n $pass = isset($parts['pass']) ? $parts['pass'] : '';\n $host = $parts['host'];\n $port = isset($parts['port']) ? $parts['port'] : null;\n $path = isset($parts['path']) ? $parts['path'] : '';\n $query = isset($parts['query']) ? $parts['query'] : '';\n $fragment = isset($parts['fragment']) ? $parts['fragment'] : '';\n $userInfo = static::buildUserInfo($user, $pass);\n\n return new static($scheme, $host, $port, $path, $query, $fragment, $userInfo);\n }", "public function uri(): Uri;", "public function testCreateUri()\n {\n $uri = new Uri(\n 'http',\n 'www.example.com',\n 1111,\n '/path/123',\n 'q=abc',\n 'fragment',\n 'user',\n 'password'\n );\n\n $this->assertEquals('fragment', $uri->getFragment());\n $this->assertEquals('www.example.com', $uri->getHost());\n $this->assertEquals('/path/123', $uri->getPath());\n $this->assertEquals(1111, $uri->getPort());\n $this->assertEquals('q=abc', $uri->getQuery());\n $this->assertEquals('http', $uri->getScheme());\n $this->assertEquals('user:password', $uri->getUserInfo());\n }", "function create(string $uri, $base_uri = null)\n{\n static $factory;\n\n $factory = $factory ?? new Factory();\n\n return $factory->create($uri, $base_uri);\n}", "public function createUri(string $uriString=''): UriInterface\n {\n if (!is_string($uriString) && !method_exists($uriString, '__toString')) {\n throw new InvalidArgumentException('Uri must be a string');\n }\n\n $parts = parse_url($uriString);\n $scheme = isset($parts['scheme']) ? $parts['scheme'] : '';\n $user = isset($parts['user']) ? $parts['user'] : '';\n $pass = isset($parts['pass']) ? $parts['pass'] : '';\n $host = isset($parts['host']) ? $parts['host'] : '';\n $port = isset($parts['port']) ? $parts['port'] : null;\n $path = isset($parts['path']) ? $parts['path'] : '';\n $query = isset($parts['query']) ? $parts['query'] : '';\n $fragment = isset($parts['fragment']) ? $parts['fragment'] : '';\n\n return new Uri($scheme, $host, $port, $path, $query, $fragment, $user, $pass);\n }", "public static function createFromString(string $uri = ''): self\n {\n $components = parse($uri);\n\n return new static(\n $components['scheme'],\n $components['user'],\n $components['pass'],\n $components['host'],\n $components['port'],\n $components['path'],\n $components['query'],\n $components['fragment']\n );\n }", "function createURI($relativePath): string;", "public function uri();", "public function uri();", "public function uri();", "public function createUri($uri, array $params = [])\n {\n if ($uri instanceof GuzzleUri) {\n if (!empty($params)) {\n $uri = $uri->withQuery(http_build_query($params));\n }\n\n return $uri;\n }\n\n // If URL template given, prepare URI\n if (preg_match_all('/{[\\w]+}/i', $uri, $matches)) {\n foreach (array_unique($matches[0]) as $match) {\n $param = substr($match, 1, -1);\n\n if (isset($params[$param])) {\n $uri = str_replace($match, $params[$param], $uri);\n unset($params[$param]);\n }\n }\n }\n\n if (!empty($params)) {\n $uri .= '?' . http_build_query($params);\n }\n\n return new GuzzleUri($uri);\n }", "public function newInstance($spec)\n {\n $elem = [\n 'scheme' => null,\n 'user' => null,\n 'pass' => null,\n 'host' => null,\n 'port' => null,\n 'path' => null,\n 'query' => null,\n 'fragment' => null,\n ];\n\n $parts = $this->parse($spec);\n\n $elem = (array) $parts + $elem;\n\n $path = new Path([]);\n $path->setFromString($elem['path']);\n\n $query = new Query([]);\n $query->setFromString($elem['query']);\n\n $host = new Host($this->psl, []);\n $host->setFromString($elem['host']);\n\n return new Url(\n $elem['scheme'],\n $elem['user'],\n $elem['pass'],\n $host,\n $elem['port'],\n $path,\n $query,\n $elem['fragment']\n );\n }", "abstract public function getUri();", "public function createUriWithFactoryProvider()\n {\n return [\n ['http://example.com', Http::class],\n ['https://example.com', Http::class],\n ['mailto://example.com', Mailto::class],\n ['file://example.com', File::class],\n ];\n }", "public function testCreateUriPathInvalid()\n {\n $uri = new Uri(\n 'http',\n 'test.com',\n null,\n []\n );\n }", "public function create($urlact, $url);", "private function createUriFromGlobal(): UriInterface\n {\n $uri = new Uri('');\n $server = $_SERVER;\n\n if (empty($uri->getScheme())) {\n $uri = $uri->withScheme('http');\n }\n\n if (isset($server['HTTP_X_FORWARDED_PROTO'])) {\n $uri = $uri->withScheme($server['HTTP_X_FORWARDED_PROTO']);\n } else {\n if (isset($server['REQUEST_SCHEME'])) {\n $uri = $uri->withScheme($server['REQUEST_SCHEME']);\n } elseif (isset($server['HTTPS'])) {\n $uri = $uri->withScheme('on' === $server['HTTPS'] ? 'https' : 'http');\n }\n if (isset($server['SERVER_PORT'])) {\n $uri = $uri->withPort($server['SERVER_PORT']);\n }\n }\n\n if (isset($server['HTTP_HOST'])) {\n if (1 === \\preg_match('/^(.+)\\:(\\d+)$/', $server['HTTP_HOST'], $matches)) {\n $host = (string) $matches[1];\n $port = (string) $matches[2];\n $uri = $uri->withHost($host)->withPort($port);\n } else {\n $uri = $uri->withHost($server['HTTP_HOST']);\n }\n } elseif (isset($server['SERVER_NAME'])) {\n $uri = $uri->withHost($server['SERVER_NAME']);\n }\n if (isset($server['REQUEST_URI'])) {\n $uri = $uri->withPath(\\current(\\explode('?', $server['REQUEST_URI'])));\n }\n if (isset($server['QUERY_STRING'])) {\n $uri = $uri->withQuery($server['QUERY_STRING']);\n }\n return $uri;\n }", "protected function createUrl($url)\n {\n return new Url($url);\n }", "private function createUri(ContainerBuilder $container, $serviceId, $uri): void\n {\n $container\n ->register($serviceId, UriInterface::class)\n ->setPublic(false)\n ->setFactory([new Reference('httplug.uri_factory'), 'createUri'])\n ->addArgument($uri)\n ;\n }", "public function create( $url );", "private function getUriForTest()\n {\n return new Uri(\n 'http',\n 'www.example.com',\n 80,\n '/data/test',\n 'action=view',\n 'fragment'\n );\n }", "function it_creates_a_uri_from_uri(UriInterface $uri)\n {\n $this->createUri($uri)->shouldReturn($uri);\n }", "public function getUri();", "public function getUri();", "public function getUri();", "public function getUri();", "public function create_url($path){\n // create url\n return $this->scheme.'://'.$this->config['host'].'/'.$path;\n\n }", "private function getBaseUri(): UriInterface\n {\n return $this->uriFactory->createUri($this->getEndpoint());\n }", "public function getURI();", "public function getUri() {}", "public function getUri() {}", "public function to_uri($string)\n {\n }", "public function uri($uri);", "function MakeURI($url, $uri = null)\r\n{\r\n\t$ret = str_replace(' ', '%20', $url);\r\n\r\n\tif (is_array($uri))\r\n\t{\r\n\t\t$start = (strpos($ret, \"?\") > 0);\r\n\t\tforeach ($uri as $key => $val)\r\n\t\t{\r\n\t\t\tif (isset($val))\r\n\t\t\t{\r\n\t\t\t\t$ret .= ($start ? '&amp;' : '?').\"{$key}={$val}\";\r\n\t\t\t\t$start = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn $ret;\r\n}", "public static function createURIString(array $Parts);", "public function uri() : string;", "abstract public function uri(): string;", "public function __toString()\n {\n $this->uri = $this->uri ?? $this->getUriString(\n $this->scheme,\n $this->authority,\n $this->path,\n $this->query,\n $this->fragment\n );\n\n return $this->uri;\n }", "public function set($uri): UrlManipulatorInterface;", "public function getUri()\n {\n }", "public function getUri()\n {\n }", "function create_uri($mode='page', $page='home', $request=NULL, $extra='')\r\n{\r\n $uri = get_config()->utils->install_dir;\r\n\r\n if (get_config()->utils->use_modrewrite)\r\n {\r\n //use nice urls\r\n $uri .= \"{$mode}/{$page}\";\r\n \r\n if ($mode == 'submit' || $mode == 'ajax')\r\n {\r\n $uri .= \"/{$request}\";\r\n }\r\n \r\n if (!empty($extra))\r\n {\r\n $uri .= \"/{$extra}\";\r\n }\r\n else\r\n {\r\n $uri .= \"/\";\r\n }\r\n }\r\n else\r\n {\r\n //use default urls - naughty\r\n $uri .= \"index.php?mode={$mode}&page={$page}\";\r\n\r\n if ($mode == 'submit')\r\n {\r\n $uri .= \"&submit={$request}\";\r\n }\r\n else if ($mode == 'ajax')\r\n {\r\n $uri .= \"&request={$request}\";\r\n }\r\n\r\n if (!empty($extra))\r\n {\r\n $uri .= \"{$extra}\";\r\n }\r\n }\r\n\r\n $uri = htmlentities($uri);\r\n \r\n log_debug(\"Creating uri for mode:{$mode}, page:{$page} [{$uri}]\",\r\n $request == NULL && empty($extra));\r\n log_debug(\"Creating uri for mode:{$mode}, page:{$page}, request:{$request} [{$uri}]\",\r\n !empty($request) && empty($extra));\r\n log_debug(\"Creating uri for mode:{$mode}, page:{$page}, request:{$request}, extra:{$extra} [{$uri}]\",\r\n $request != NULL && !empty($extra));\r\n \r\n return $uri;\r\n}", "public function buildBackendUri() {}", "function __construct($uri)\n {\n $this->uri = $uri;\n }", "protected abstract function createUrl($file);", "public function setUriFactory(UriFactoryInterface $uriFactory):static;", "public static function fromUri(string $sUri)\n {\n return self::fromArray(['uri' => $sUri]);\n }", "public function make_uri($address, $amount, $recipient_name = null, $description = null){\n $new_amount = $amount * 100; // Changed atomic units into 2 decimal points\n\n $uri_params = array('address' => $address, 'amount' => $new_amount, 'payment_id' => '', 'recipient_name' => $recipient_name, 'tx_description' => $description);\n $uri = $this->_run('make_uri', $uri_params);\n return $uri;\n }", "abstract protected function getUri(): string;", "static public function createHostUrl(): IHostUrl {\n\t\t\treturn self::create(sprintf('%s://%s:%s', $_SERVER['REQUEST_SCHEME'], $_SERVER['SERVER_ADDR'], $_SERVER['SERVER_PORT']));\n\t\t}", "public function to_dom($dom) {\n\t\t$uri = $dom->createElement('URI', $this->uri);\n\n\t\tif ($this->priority) {\n\t\t\t$uri->setAttribute('priority', $this->priority);\n\t\t}\n\n\t\tif ($this->http_method) {\n\t\t\t$uri->setAttribute('simple:httpMethod', $this->http_method);\n\t\t}\n\n\t\treturn $uri;\n\t}", "public static function from_dom(DOMElement $dom) {\n\t\t$uri = new XRDS_URI();\n\n\t\t$uri->priority = $dom->getAttribute('priority');\n\t\t$uri->http_method = $dom->getAttributeNS(XRDS::SIMPLE_NS, 'httpMethod');\n\t\t$uri->uri = $dom->nodeValue;\n\n\t\treturn $uri;\n\t}", "public function createImgUri() {\n\t\t$this->imgUri = FLICKR_FARM;\n\t\t$this->imgUri .= $this->photo['farm'];\n\t\t$this->imgUri .= '.';\n\t\t$this->imgUri .= STATICFLICKR;\n\t\t$this->imgUri .= $this->photo['server'];\n\t\t$this->imgUri .= '/';\n\t\t$this->imgUri .= $this->photo['id'];\n\t\t$this->imgUri .= '_';\n\t \t$this->imgUri .= $this->photo['secret'];\n\t\t$this->imgUri .= '.';\n\t \t$this->imgUri .= IMGEXT;\n\t}", "abstract protected function buildSpecificRequestUri();", "public function setUri($uri);", "public function setUri($var)\n {\n GPBUtil::checkString($var, True);\n $this->uri = $var;\n\n return $this;\n }", "public function setUri($var)\n {\n GPBUtil::checkString($var, True);\n $this->uri = $var;\n\n return $this;\n }", "public function setUri($var)\n {\n GPBUtil::checkString($var, True);\n $this->uri = $var;\n\n return $this;\n }", "protected function buildUri($resourceUri) {\n\t\t$userId = $this->getRequestContext()->getUserId();\n\t\t$userGroupIds = $this->getRequestContext()->getUserGroupIds();\n\t\t$validityPeriod = $this->calculateLinkLifetime();\n\t\t$hash = $this->getHash($resourceUri, $userId, $userGroupIds, $validityPeriod);\n\n\t\t$linkFormat = $this->configurationManager->getValue('linkFormat');\n\t\t// Parsing the link format, and return this instead (an flexible link format is useful for mod_rewrite tricks ;)\n\t\tif (is_null($linkFormat) || strpos($linkFormat, '###FEGROUPS###') === FALSE) {\n\t\t\t$linkFormat = 'index.php?eID=tx_nawsecuredl&u=###FEUSER###&g=###FEGROUPS###&t=###TIMEOUT###&hash=###HASH###&file=###FILE###';\n\t\t}\n\t\t$tokens = array('###FEUSER###', '###FEGROUPS###', '###FILE###', '###TIMEOUT###', '###HASH###');\n\t\t$replacements = array($userId, rawurlencode(implode(',', $userGroupIds)), GeneralUtility::rawUrlEncodeFP($resourceUri), $validityPeriod, $hash);\n\t\t$downloadUri = str_replace($tokens, $replacements, $linkFormat);\n\t\treturn $downloadUri;\n\t}", "private function makeUrl($appendUrl) {\n \n return $this->bitreserveUrl . $appendUrl;\n }", "public function toString()\n {\n if (! $this->isValid()) {\n if ($this->isAbsolute() || ! $this->isValidRelative()) {\n throw new Exception\\InvalidUriException(\n 'URI is not valid and cannot be converted into a string'\n );\n }\n }\n\n $uri = '';\n\n if ($this->scheme) {\n $uri .= $this->scheme . ':';\n }\n\n if ($this->host !== null) {\n $uri .= '//';\n if ($this->userInfo) {\n $uri .= $this->userInfo . '@';\n }\n $uri .= $this->host;\n if ($this->port) {\n $uri .= ':' . $this->port;\n }\n }\n\n if ($this->path) {\n $uri .= static::encodePath($this->path);\n } elseif ($this->host && ($this->query || $this->fragment)) {\n $uri .= '/';\n }\n\n if ($this->query) {\n $uri .= \"?\" . static::encodeQueryFragment($this->query);\n }\n\n if ($this->fragment) {\n $uri .= \"#\" . static::encodeQueryFragment($this->fragment);\n }\n\n return $uri;\n }", "public function setUri($uri) {}", "public function __construct ( $uri )\n\t\t{\n\t\t\t$uri = explode ( '/', $uri );\n\t\t\t\n\t\t\tforeach ( $uri as $key => $uriElement )\n\t\t\t{\n\t\t\t\tif ( $uriElement == '' )\n\t\t\t\t{\n\t\t\t\t\t$uri[$key] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$uri = array_merge ( array(), $uri );\n\t\t\t\n\t\t\t$this->uri = $uri;\n\t\t}", "function constructURL($object);", "public function make($url)\n {\n return new Url($url);\n }", "public function it_creates_a_uri_from_uri(UriInterface $uri)\n {\n $this->createUri($uri)->shouldReturn($uri);\n }", "function uri(): string;", "function http_build_url($url = null, $parts = null, $flags = null, ?array &$new_url = null) {}", "protected function generateString()\n\t{\n\t\t// start with the scheme\n\t\t$url = $this->scheme . '://';\n\t\t\n\t\t// user and password\n\t\tif( !empty( $this->user ) )\n\t\t{\n\t\t\t$url .= $this->user;\n\t\t\tif( !empty( $this->pass ) ) $url .= ':'.$this->pass.'@';\n\t\t\telse $url .= '@';\n\t\t}\n\t\t\n\t\t// add the host and path\n\t\t$url .= $this->host . '/';\n\t\t$url .= $this->path;\n\t\t\n\t\t// add the URL-encoded parameters\n\t\tif( !empty( $this->params ) )\n\t\t{\n\t\t\t$url .= '?';\n\t\t\tforeach( $this->params as $f => $v ) $url .= $f . '=' . urlencode( $v ) . '&';\n\t\t\t$url = rtrim( $url, '&' );\n\t\t}\n\t\t\n\t\t// add the anchor if any\n\t\tif( !empty( $this->anchor ) ) $url .= '#' . $this->anchor;\n\t\t\n\t\t$this->url = $url;\n\t\t$this->modified = false;\n\t\treturn $url;\n\t}", "public function getUri()\n {\n $scheme = $this->getServer('REQUEST_SCHEME', 'http');\n $port = $this->getServer('SERVER_PORT', 80);\n $serveName = $this->getServer('SERVER_NAME');\n\n $uri = new Uri();\n\n return $uri->withScheme($scheme)\n ->withHost($serveName)\n ->withQuery($this->getServer('QUERY_STRING', ''))\n ->withPath($this->getBaseUrl())\n ->withPort($port);\n }", "public function create(array $data)\n {\n return $this->url->create($data);\n\n }", "protected function CreateUrl($url=null, $method=null, $arguments=null){\n\t\treturn $this->request->CreateUrl($url, $method, $arguments);\n\t}", "public static function fromUri(Stringable|string $uri): self\n {\n $uri = self::filterUri($uri);\n $component = $uri->getUserInfo();\n\n return match (true) {\n $uri instanceof UriInterface, '' !== $component => self::new($component),\n default => self::new(),\n };\n }", "public function uri()\n {\n return $this->factory->getUri($this->handle);\n }", "public static function factory($uri)\n\t{\n\t\treturn new Request($uri);\n\t}", "public function toString()\n {\n if (!$this->isValid()) {\n if ($this->isAbsolute() || !$this->isValidRelative()) {\n throw new Exception\\InvalidUriException(\n 'URI is not valid and cannot be converted into a string'\n );\n }\n }\n\n $uri = '';\n\n if ($this->scheme) {\n $uri .= $this->scheme . ':';\n }\n\n if ($this->host !== null) {\n $uri .= '//';\n $uri .= $this->host;\n }\n\n if ($this->path) {\n $uri .= static::encodePath($this->path);\n } elseif ($this->host && ($this->query || $this->fragment)) {\n $uri .= ':/';\n }\n\n if ($this->query) {\n $uri .= \"?\" . static::encodeQueryFragment($this->query);\n }\n\n if ($this->fragment) {\n $uri .= \"#\" . static::encodeQueryFragment($this->fragment);\n }\n\n return $uri;\n }", "public function baseOn(Uri $base) {\n $uri = null;\n if($base->isRelativeUri()) {\n throw new UriException(\"Can't base $this against $base. Invalid base URI\");\n }\n if($this->isAbsoluteUri()) {\n $uri = clone $this;\n }\n else {\n $uri = clone $base;\n $path = $this->get('path');\n $query = $this->get('query');\n if(empty($path)) {\n if(isset($query)) {\n $uri->set('query', $query);\n }\n }\n else if(strpos($path, '/') === 0) {\n $uri->set('path', $path);\n $uri->set('query', $query);\n }\n else {\n $basePath = preg_replace('#/[^/]*$#', \"\", $uri->get('path'));\n $uri->set('path', $basePath . \"/\" . $path);\n $uri->set('query', $query);\n }\n $uri->set('fragment', $this->get('fragment'));\n }\n return $uri;\n }", "public function testToString()\n {\n $uri = new Uri(\n \"https\",\n \"user\",\n \"pass\",\n \"test.com\",\n 443,\n \"/test/path\",\n \"id=1\",\n \"frag\"\n );\n self::assertSame(\"https://user:[email protected]:443/test/path?id=1#frag\", (string) $uri);\n }", "public function __construct($scheme, $authority, $path, $query = array(), $fragment = '');", "public static function fromUri(Stringable|string $uri): self\n {\n $uri = self::filterUri($uri);\n $component = $uri->getScheme();\n\n return match (true) {\n $uri instanceof UriInterface, '' !== $component => new self($component),\n default => new self(null),\n };\n }", "public function __construct($uri = null)\n {\n if (is_string($uri)) {\n $this->parse($uri);\n } elseif ($uri instanceof UriInterface) {\n // Copy constructor\n $this->setScheme($uri->getScheme());\n $this->setUserInfo($uri->getUserInfo());\n $this->setHost($uri->getHost());\n $this->setPort($uri->getPort());\n $this->setPath($uri->getPath());\n $this->setQuery($uri->getQuery());\n $this->setFragment($uri->getFragment());\n } elseif ($uri !== null) {\n throw new Exception\\InvalidArgumentException(sprintf(\n 'Expecting a string or a URI object, received \"%s\"',\n (is_object($uri) ? get_class($uri) : gettype($uri))\n ));\n }\n }", "static public function createurl($url='') {\n\t\treturn Application::$base_url.'/'.trim($url,'/');\n\t}", "public function __toString() {\n\n $uri = ($this->getScheme()) ? $this->getScheme() . '://' : '';\n\n // If the authority URI part is present, we add it. authority includes the user\n // information, host, and port. Otherwise, we just append host and port\n if ($this->getAuthority()) {\n $uri .= $this->getAuthority();\n }\n else {\n $uri .= ($this->getHost()) ? $this->getHost() : '';\n $uri .= ($this->getPort()) ? ':' . $this->getPort() : '';\n }\n $path = $this->getPath();\n\n // Before adding path, we first check whether the first character is '/'. If not, we add it.\n if ($path) {\n if ($path[0] != '/') {\n $uri .= '/' . $path;\n }\n else {\n $uri .= $path;\n }\n }\n\n // ...We then add query and fragment, if present!\n $uri .= ($this->getQuery()) ? '?' . $this->getQuery() : '';\n $uri .= ($this->getFragment()) ? '#' . $this->getFragment() : '';\n return $uri;\n }", "abstract protected function uri($uri);", "public function test_uri_attribute() {\n $uri = 'test://testfile.txt';\n $scheme = WP_Stream::scheme($uri);\n $class_name = WP_Stream::wrapper_class_name($scheme);\n\n $instance = WP_Stream::new_wrapper_instance($uri);\n $this->assertEquals($uri, $instance->get_uri());\n\n $new_uri = 'test://testfile2.txt';\n $instance->set_uri($new_uri);\n $this->assertEquals($new_uri, $instance->get_uri());\n }", "public function __construct ($name, $value, $uri) {}", "private function _buildUri(): string {\n return !empty($this->query) ? $this->uri.'?'.http_build_query($this->query) : $this->uri;\n }", "public function createUrl($route, $params=array(), $ampersand = '&')\n { \n unset($params['a']);\n unset($params['url']);\n return parent::createUrl($route, $params);\n }", "private function getSut(\n string $scheme = '',\n ?string $user = null,\n ?string $pass = null,\n string $host = '',\n ?string $port = null,\n string $path = '',\n ?string $query = null,\n ?string $fragment = null\n ) {\n return new Uri($scheme, $user, $pass, $host, $port, $path, $query, $fragment);\n }", "public function getUri(){\n\t\treturn preg_replace('/[^\\w-]*/', '', (strtolower(str_replace(' ', '-', $this->name)))).'-'.$this->id;\n\t}", "public static function make(string $url = '/')\n {\n return new static(Url::fromString($url));\n }", "public static function fromUri(UriInterface $uri): self\n {\n if ($uri->getPort() === null) {\n return new self($uri->getHost());\n }\n\n return new self($uri->getHost() . ':' . $uri->getPort());\n }", "public function testToString()\n {\n $uri = new Uri(\n 'http',\n 'domain.tld',\n 1111,\n '/path/123',\n 'q=abc',\n 'test',\n 'user',\n 'password'\n );\n\n $this->assertEquals('http://user:[email protected]:1111/path/123?q=abc#test', (string)$uri);\n }" ]
[ "0.81631756", "0.7459214", "0.6932149", "0.6802539", "0.67834455", "0.66700137", "0.66098815", "0.65342426", "0.652941", "0.6491179", "0.6415549", "0.6333603", "0.6279601", "0.6269844", "0.622669", "0.622669", "0.622669", "0.61822903", "0.6151719", "0.614083", "0.6135218", "0.6122196", "0.61211175", "0.60821885", "0.60543054", "0.60523796", "0.6018715", "0.60171616", "0.59749544", "0.5966031", "0.5966031", "0.5966031", "0.5966031", "0.59407526", "0.5861192", "0.58542585", "0.5853566", "0.5853566", "0.5846355", "0.58369994", "0.5832409", "0.5825857", "0.5822411", "0.57754403", "0.5771586", "0.57528573", "0.57414085", "0.57414085", "0.5717415", "0.5715376", "0.569892", "0.5691989", "0.5685837", "0.5675361", "0.56614745", "0.56545997", "0.56525224", "0.5651111", "0.5648821", "0.56444263", "0.563453", "0.56237245", "0.56207883", "0.56207883", "0.56207883", "0.5618209", "0.561453", "0.56102324", "0.5607257", "0.56005967", "0.5595573", "0.5595517", "0.5561953", "0.5561536", "0.5547169", "0.5543609", "0.55430406", "0.5523609", "0.55074114", "0.55057025", "0.5503535", "0.5495595", "0.5494696", "0.5490556", "0.5483916", "0.5478356", "0.54779106", "0.5464062", "0.54542685", "0.5447389", "0.5446859", "0.5442494", "0.5432198", "0.54308957", "0.54250044", "0.5424935", "0.5405968", "0.5404436", "0.53924036", "0.5381674" ]
0.72622216
2
Asserts that the given register value is valid A valid register value is smaller than 0xffff
public static function assertValidRegisterValue($value) { if ($value > 0xffff) { throw new InvalidArgumentException('Invalid register value, should be <= 0xffff'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function validateUint($value) {\n if (preg_match(\"/^[0-9]+$/\", $value))\n return true;\n $this->setError(t(\"Invalid positive integer\"));\n return false;\n }", "public static function assertValidAddress($address)\n {\n if ($address < 0x0000) {\n throw new InvalidArgumentException('Invalid address, should be >= 0x0000');\n }\n\n if ($address > 0xffff) {\n throw new InvalidArgumentException('Invalid address, should be <= 0xffff');\n }\n }", "public function testRegistrationValuesTooShort(): void { }", "public function testValidationBytesLowerBounds()\n {\n $random = new Random($this->getValidator());\n\n $random->setBytes($this::MIN_BYTES - 1);\n\n $random->validate();\n }", "public static function ensure32BitInteger($value) {}", "public function testRegistrationValuesContainNumbers(): void { }", "public static function isValidAddress($address, $throw = FALSE) {\n\n if (!self::hasHexPrefix($address)) {\n return FALSE;\n }\n // Address should be 20bytes=40 HEX-chars + prefix.\n if (strlen($address) !== 42) {\n return FALSE;\n }\n $return = ctype_xdigit(self::removeHexPrefix($address));\n\n if (!$return && $throw) {\n throw new \\InvalidArgumentException($address . ' has invalid format.');\n }\n return $return;\n }", "public function testRegistrationValuesTooLong(): void { }", "function validMinLength($value, $min)\n {\n return strlen($value) >= $min;\n }", "function testMinval(){\n\t\t#mdx:minval\n\t\tParam::get('age')->filters()->minval(1, \"Age cannot be less than %d!\");\n\t\t$error = Param::get('age')->process(['age'=>0])->error;\n\t\t#/mdx var_dump($error)\n\n\t\t$this->assertContains(\"less than 1\", $error);\n\n\t}", "public function isIntegerInRangeRejectsOtherDataTypesDataProvider() {}", "public static function assertValidQuantityOfRegisters($quantityOfRegisters)\n {\n if ($quantityOfRegisters < 1) {\n throw new InvalidArgumentException('Invalid quantity of registers, should be >= 1');\n }\n\n if ($quantityOfRegisters > 0x7d) {\n throw new InvalidArgumentException('Invalid quantity of registers, should be <= 0x7d');\n }\n }", "public static function assertValidQuantityOfBits($quantityOfBits)\n {\n if ($quantityOfBits < 1) {\n throw new InvalidArgumentException('Invalid quantity of bits, should be >= 1');\n }\n\n if ($quantityOfBits > 0x7d0) {\n throw new InvalidArgumentException('Invalid quantity of bits, should be <= 0x7d0');\n }\n }", "public function testReturnTrueOnValidEthereumAddress()\n {\n $result = Wallet::validate(self::VALID_ETH_ADDRESS, Wallet::ETHEREUM);\n\n $this->assertTrue($result);\n }", "public function testTooShort(): void\n {\n $validator = new LengthValidator(5);\n $result = $validator->validate('foo');\n\n $this->assertFalse($result->isValid());\n }", "public function testRandomEthereumAddress()\n {\n $initial_value = random_ethereum_address();\n $this->assertInternalType('string', $initial_value);\n \n CryptoStat::setCurrency('ETH');\n $is_valid = CryptoStat::validateAddress($initial_value); \n \n $this->assertTrue($is_valid);\n }", "function validate_field_range(string $field_value, array &$field, array $params): ?bool\n{\n if (($field_value < $params['min']) || ($field_value > $params['max'])) {\n $field['error'] = strtr('Laukelio vertė turi būti @from iki @to', [\n '@from' => $params['min'],\n '@to' => $params['max']\n ]);\n return false;\n } else {\n return true;\n }\n}", "public static function filterUint($attrValue)\n\t{\n\t\treturn filter_var($attrValue, FILTER_VALIDATE_INT, array(\n\t\t\t'options' => array('min_range' => 0)\n\t\t));\n\t}", "function value_within_range($value, $min, $max) {\n return ((strlen($value) >= $min) && (strlen($value) <= $max));\n }", "function is_unsigned_integer($value)\n {\n return (is_int($value) && $value >= 0);\n }", "public function validate($value)\n {\n $value = preg_replace('/[^\\d]/', '', (string) $value);\n if (strlen($value) != 11 ) {\n return false;\n }\n $acumulado = 0;\n $digits = str_split($value);\n\n // obtain digit\n $digit = array_pop($digits);\n\n for ($i=0; $i < count($digits); $i++ ) {\n $acumulado += $digits[9-$i] * (2 + ($i % 6 ));\n }\n $verif = 11 - ( $acumulado % 11 );\n $verif = $verif == 11? 0 : $verif;\n\n return $digit == $verif;\n }", "public function testRangeValidation()\n {\n $aircraft = factory(\\App\\Aircraft::class)->create();\n $aircraft->range = null;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 'a';\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 0.5;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = -3;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 50;\n $this->assertTrue($aircraft->save());\n }", "protected function filterUint($value) {\n return abs((int) $value);\n }", "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_HIGH,self::VALUE_LOW,self::VALUE_CUSTOMCODE));\n\t}", "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_HEADER,self::VALUE_LINE));\n\t}", "public function testMinInvalidArgumentException()\n {\n $max = $this->ascendingSequence->getMax();\n $this->ascendingSequence->setMin($max + 1);\n $this->fail(\"Should not be able to set min > max.\");\n }", "function pimd_validate_intrange($value, $min, $max) {\n\tif (is_numericint($value) && ($value >= $min) && ($value <= $max)) {\n\t\treturn $value;\n\t} else {\n\t\treturn null;\n\t}\n}", "function checkNum($number) {\n if($number>50) {\n throw new Exception(\" Tavë Kosi has been known for 90 years in Albanian cuisine.\");\n }\n return true;\n}", "public function testMobileNumberIsValid($data)\n {\n $pattern = \"/^[(]{0,1}[0-9]{2,3}[)]{0,1}[-\\s\\.]{0,1}[0-9]{2,4}[-\\s\\.]{0,1}[0-9]{4}$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }", "static public function isUnsignedInt($value)\n {\n return (preg_match('#^[0-9]+$#', (string)$value) and $value < 4294967296 and $value >= 0);\n }", "public function testValidate0()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == false (line 378)\n // if (empty($value) && !is_numeric($value)) == false (line 389)\n // if (empty($domain) && !is_numeric($domain)) == false (line 397)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function isValid($value)\n {\n if (!is_numeric($value)) {\n $this->addError(\n $this->translateErrorMessage(\n 'validator.numberrange.notvalid',\n 'extbase'\n ),\n 1221563685\n );\n return;\n }\n\n $minimum = $this->options['minimum'];\n $maximum = $this->options['maximum'];\n\n if ($minimum > $maximum) {\n $x = $minimum;\n $minimum = $maximum;\n $maximum = $x;\n }\n if ($value < $minimum || $value > $maximum) {\n $this->addError($this->translateErrorMessage(\n 'validator.numberrange.range',\n 'extbase',\n [\n $minimum,\n $maximum\n ]\n ), 1221561046, [$minimum, $maximum]);\n }\n }", "function sugar_valid_int($value, $min=1, $max=65535) {\n $options = array(\n 'options' => array(\n 'min_range' => $min,\n 'max_range' => $max,\n ),\n );\n return filter_var($value, FILTER_VALIDATE_INT, $options);\n}", "public function testCreditCardIsValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }", "public function validate_token($token) {\n\t\t$splittedtoken = explode('-', $token);\n\t\t$offset = hexdec($splittedtoken[0]);\n\t\t$value = $splittedtoken[1];\n\t\treturn ($this->calculate_tokenvalue($offset) === $value);\n\t}", "private function inRangeIpv4(string $received, string $address, int $bits): bool\n {\n $decimalWildcard = \\pow(2, (32 - $bits)) - 1;\n $decimalBits = ~ $decimalWildcard;\n\n return ((\\ip2long($received) & $decimalBits) === (\\ip2long($address) & $decimalBits));\n }", "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_UNSUPPORTED_FEATURE));\n\t}", "function testLine ($str) {\r\n $testLineResult = TRUE;\r\n if (strlen($str) > 88) {\r\n $testLineResult = FALSE;\r\n } else if (!preg_match('/[0-9]{16}/',$str)) {\r\n $testLineResult = FALSE;\r\n }\r\n return $testLineResult;\r\n}", "public static function validateColor(int $color): bool\n {\n if (0 <= $color && 255 >= $color) {\n return true;\n }\n\n throw new \\InvalidArgumentException(\n 'Color is expected to be an integer value between 0 and 255 or '.\n 'a hexadecimal value between 0x00 and 0xFF'\n );\n }", "function has_length_greater_than($value, $min) {\r\n $length = strlen($value);\r\n return $length > $min;\r\n}", "protected static function isValidHex(Hex|string $address): bool\n {\n return Hex::of($address)->length() === 20;\n }", "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_SUCCESS,self::VALUE_PENDING,self::VALUE_INVALIDURL,self::VALUE_INVALIDPROTOCOL,self::VALUE_INVALIDFILE,self::VALUE_SERVERDOWN,self::VALUE_IMAGENONEXISTENT,self::VALUE_IMAGEREADTIMEOUT,self::VALUE_INVALIDFILEFORMAT,self::VALUE_IMAGEPROCESSINGERROR,self::VALUE_CUSTOMCODE));\n\t}", "public function isValid($value)\n{\n\treturn (preg_match(self::REGEX, $value, $match)\n\t\t&& $match[1] > 0 && $match[2] > 0 && $match[3] > 0 // No all zeros in digit group\n\t\t&& $match[1] != 666 // No Number of the Beast\n\t\t&& $match[1] <= 899); // Highest area number\n}", "public static function isValidHexQuantity($str) {\n\n // Always ensure 0x prefix.\n if (!EthereumStatic::hasHexPrefix($str)) {\n return FALSE;\n }\n\n // Should always have at least one digit - zero is \"0x0\".\n if (strlen($str) < 3) {\n return FALSE;\n }\n return ctype_xdigit(self::removeHexPrefix($str));\n }", "function has_length_greater_than( $value, $min ) {\n $length = strlen( $value );\n return $length > $min;\n}", "public static function valid_positive_integer($value){\n\t\treturn preg_match('@^[0-9]+$@',$value) === 1;\n\t}", "public function testValidate3()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == true (line 378)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function checkNumber($value, $lifetime=5400)\n\t\t{\n\t\t\t$time = intval(time()/10);\n\t\t\tfor($i = 0; $i < $lifetime; $i++)\n\t\t\t\tif($value == $this->calculate($this->getNumericSalt()+$time-$i, $this->min, $this->max))\n\t\t\t\t\treturn true; // this is a legal value\n\n\t\t\treturn false; // no legal values found the last 90 minutes\n\t\t}", "public function testValidate1()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == false (line 378)\n // if (empty($value) && !is_numeric($value)) == false (line 389)\n // if (empty($domain) && !is_numeric($domain)) == true (line 397)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "abstract public function getIsValidValue($value);", "public function testValidate2()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == false (line 378)\n // if (empty($value) && !is_numeric($value)) == true (line 389)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function isValid($number);", "abstract protected function isValidValue($value);", "function has_length_greater_than($value, $min) {\n $length = strlen($value);\n return $length > $min;\n}", "public function testValidateNumber(): void\n {\n $this->assertTrue($this->validate(1));\n }", "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_JPG,self::VALUE_GIF,self::VALUE_CUSTOMCODE));\n\t}", "public function testParseShouldReturnErrorResponseForTooShortPacket()\n {\n $payload = \"\\x01\\x38\" . // transaction id: 0138 (2 bytes)\n \"\\x00\\x00\" . // protocol id: 0000 (2 bytes)\n \"\\x00\\x07\" . // length: 0007 (2 bytes) (7 bytes after this field)\n \"\\x11\" . // unit id: 11 (1 byte)\n \"\\x16\" . // function code: 16 (1 byte)\n \"\\x04\\x10\" . // start address: 0410 (2 bytes)\n \"\\x00\\x01\" . // AND mask: 0x01 (2 bytes)\n \"\\x00\" . // OR mask: 0x02 (1 bytes) <-- should be 2 but is 1\n '';\n $packet = MaskWriteRegisterRequest::parse($payload);\n self::assertInstanceOf(ErrorResponse::class, $packet);\n $toString = $packet->__toString();\n // transaction id is random\n $toString[0] = \"\\x00\";\n $toString[1] = \"\\x00\";\n self::assertEquals(\"\\x00\\x00\\x00\\x00\\x00\\x03\\x00\\x96\\x04\", $toString);\n }", "public function testUuid(): void\n {\n $regex = '/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i';\n $this->assertTrue((bool) preg_match($regex, $this->user->getUuid()));\n }", "public function testValidationException()\n {\n $random = new Random($this->getValidatorStubFail());\n\n $random->validate();\n }", "function testMinlen(){\n\t\t#mdx:minlen\n\t\tParam::get('description')->filters()->minlen(10, \"Description must be at least %d characters long!\");\n\n\t\t$error = Param::get('description')->process(['description'=>'Test'])->error;\n\t\t#/mdx var_dump($error)\n\n\t\t$this->assertContains('at least 10', $error);\n\n\t}", "public function testThrowExceptionOnInvalidEthereumAddress()\n {\n $this->expectException(Exceptions\\InvalidAddressFormatException::class);\n Wallet::validate(self::INVALID_ADDRESS, Wallet::ETHEREUM);\n }", "public function isValid($value): bool\n {\n return is_null($value) || (is_int($value) && $value > 9);\n }", "public static function moduleValueIsValid($value):bool{\n\n\t\tif(!is_string($value)){\n\t\t\treturn false;\n\t\t}\n\n\t\t$value = trim($value);\n\n\t\t// hex notation\n\t\t// #rgb(a)\n\t\t// #rrggbb(aa)\n\t\t// #rrrrggggbbbb(aaaa)\n\t\t// ...\n\t\tif(preg_match('/^#[a-f\\d]+$/i', $value) && in_array((strlen($value) - 1), [3, 4, 6, 8, 9, 12, 16, 24, 32], true)){\n\t\t\treturn true;\n\t\t}\n\n\t\t// css (-like) func(...values)\n\t\tif(preg_match('#^(graya?|hs(b|la?)|rgba?)\\([\\d .,%]+\\)$#i', $value)){\n\t\t\treturn true;\n\t\t}\n\n\t\t// predefined css color\n\t\tif(preg_match('/^[a-z]+$/i', $value)){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function testValueValid() {\n $config = [\n 'success' => 1,\n 'data' => 'example'\n ];\n $this->assertEmpty($this->getValidator()->validate($config));\n }", "public function validate( $value )\n\t{\n\t\treturn (int)$value === $value;\n\t}", "public static function verifyCode($code){\n\n if(!is_string($code) && !is_int($code)){\n\n return false;\n }\n\n $code=trim(''.$code);\n $codeLen=strlen($code);\n\n $totalW=array_sum(self::$WIDTH_SETTING);\n if($codeLen>$totalW){\n\n return false;\n }\n\n $flagInvalid=true;\n $curW=0;\n for($i=0; $i<count(self::$WIDTH_SETTING); $i++){\n\n $curW+=self::$WIDTH_SETTING[$i];\n if($curW==$codeLen){\n $flagInvalid=false;\n break;\n }\n }\n\n return !$flagInvalid;\n\n }", "function has_length_greater_than($value, $min) {\n $length = strlen($value);\n return $length > $min;\n}", "function has_length_less_than($value, $max) {\r\n $length = strlen($value);\r\n return $length < $max;\r\n}", "function isCharLenght($field, $msg, $min, $max){\n\t\t$value = $this->_getValue($field);\n\t\tif(strlen(trim($value))>$max || strlen(trim($value))<$min) {\n\t\t\t$this->_errorList[] = array(\"field\" => $field, \"value\" => $value, \"msg\" => $msg);\n\t\t\treturn false;\n\t\t}else{\n\t\treturn true;\n\t\t}\n\t}", "public function testSetLowerIfLowerIsNotNumber()\n {\n $this->setExpectedException('InvalidArgumentException');\n \n (new Interval())->setLower('foo');\n \n return;\n }", "public function testParseShouldReturnErrorResponseForInvalidFunction()\n {\n $payload = \"\\x01\\x38\" . // transaction id: 0138 (2 bytes)\n \"\\x00\\x00\" . // protocol id: 0000 (2 bytes)\n \"\\x00\\x08\" . // length: 0008 (2 bytes) (8 bytes after this field)\n \"\\x11\" . // unit id: 11 (1 byte)\n \"\\x17\" . // function code: 17 (1 byte) <-- should be 0x16\n \"\\x04\\x10\" . // start address: 0410 (2 bytes)\n \"\\x00\\x01\" . // AND mask: 0x01 (2 bytes)\n \"\\x00\\x02\" . // OR mask: 0x02 (2 bytes)\n '';\n $packet = MaskWriteRegisterRequest::parse($payload);\n self::assertInstanceOf(ErrorResponse::class, $packet);\n $toString = $packet->__toString();\n self::assertEquals(\"\\x01\\x38\\x00\\x00\\x00\\x03\\x11\\x96\\x01\", $toString);\n }", "function valid_int($value, $min = NULL, $max = NULL)\n {\n $valid = (is_int($value) OR (is_numeric($value) && intval($value) == $value));\n \n // If no bounds have been set, we're done.\n if ( ! $valid OR (is_null($min) && is_null($max)))\n {\n return $valid;\n }\n \n $min = is_null($min) ? -INF : (valid_int($min) ? intval($min) : -INF);\n $max = is_null($max) ? INF : (valid_int($max) ? intval($max) : INF);\n \n $value = intval($value);\n $real_min = min($min, $max);\n $real_max = max($min, $max);\n \n return $valid && (min(max($value, $real_min), $real_max) === $value);\n }", "private function integerValidation($field) {\r\n\t \t\t$sent = $this->getSentData($field);\r\n\t \t\tif ($sent == strval(intval($sent)))\r\n\t \t\t\treturn true;\r\n\t \t\telse\r\n\t \t\t\treturn false;\r\n\t \t}", "function cp_intIsBetween($number,$min,$max){\r\n if(!cp_str_isInt($number)){\r\n return false;\r\n }\r\n\r\n return $number >= $min && $number <= $max;\r\n}", "protected function validate(int $value): void\n {\n }", "function positiveIntCheck( $value ) {\n\n/* ... is this value greater than or equal to zero or not? */\n if ($value >= 0) {\n $testValue = TRUE;\n }\n else {\n $testValue = FALSE;\n $this->form_validation->set_message('positiveIntCheck', \"The %s field must be equal to or greater than zero\");\n }\n \n/* ... time to go */\n return( $testValue );\n }", "public static function isValidUuid4($value): bool\n\t{\n if(!is_string($value)){\n return false;\n }\n return preg_match(self::UUID4_PATTERN, $value) === 1;\n\t}", "function validate($name,$value,$minlen,$maxlen,$datatype=\"\",$min_val=\"\",$max_val=\"\",$regexp=\"\") {\t//SAT0112:To prevent entering values which is not less than min_val and not greater than max val\n\n\t$resp=true;\n\n\t//echo \"Validating: name=\".$name.\" val=\".$value.\" min=\".$minlen.\" maxlen=\".$maxlen.\" type=\".$datatype.\" regexp=\".$regexp.\"<br>\";\n\n\t// If the value is empty and the field is not mandatory, then return\n\tif ( (!isset($minlen) || $minlen == 0) && $value == \"\" ) {\n\t\treturn true;\n\t}\n\n\t// Empty Check\n\t// Changed to === to ensure 0 does not fail \n\tif ( isset($minlen) && $minlen > 0 && $value === \"\" ) {\n\t\tadd_msg(\"ERROR\",$name.\" cannot be empty. \"); \n\t\treturn false;\n\t}\n\n\t//echo \"count($value)=[\".preg_match(\"/^[0-9]+$/\",\"12344a4\").\"]<br>\";\n\t// MIN LEN check\n\tif ( isset($minlen) && strlen($value) < $minlen ) {\n\t\tadd_msg(\"ERROR\",$name.\" should be atleast \".$minlen.\" characters long. \"); \n\t\treturn false;\n\t}\n\n\t// MAX LEN check\n\tif ( $datatype == 'enum' ) { \n\t\t$enum_str=$maxlen;\n\t\tunset($maxlen);\n\t}\n\n\tif ( isset($maxlen) && strlen($value) > $maxlen ) {\n\t\tadd_msg(\"ERROR\",$name.\" cannot be longer than \".$maxlen.\" characters. \"); \n\t\treturn false;\n\t}\n\n\t// CUSTOM REGEXP check\n\tif ( isset($regexp) && !preg_match(\"/$regexp/\",$value) ) {\n\t\tadd_msg(\"ERROR\",$name.\" is not valid. \"); \n\t\treturn false;\n\t}\n\n\t// MIN value check\n\tif( ($min_val !== '' && $value < $min_val) ) {\n\t\tadd_msg(\"ERROR\",$name.\" cannot be less than \".$min_val.\". \"); \n\t\treturn false;\n\t}\n\n\t// MAX value check\n\tif( ($max_val !== '' && $value > $max_val) ) {\n\t\tadd_msg(\"ERROR\",$name.\" cannot be greater than \".$max_val.\". \"); \n\t\treturn false;\n\t}\n\t// STANDARD DATATYPES check\n\tif ( isset($datatype) ) {\n\t\tswitch ($datatype) {\n\t\t\tcase \"int\":\n\t\t\t\tif ( filter_var($value, FILTER_VALIDATE_INT) === false ) {\n\t\t\t\t\tadd_msg(\"ERROR\",$name.\" should contain only digits. \"); \n\t\t\t\t\treturn false;\n\t\t\t\t} \n\t\t\t\tbreak;\n\t\t\tcase \"decimal\":\n\t\t\t\tif ( filter_var($value, FILTER_VALIDATE_FLOAT) === false ) {\n\t\t\t\t\tadd_msg(\"ERROR\",$name.\" should contain only digits. \"); \n\t\t\t\t\treturn false;\n\t\t\t\t} \n\t\t\t\tbreak;\n\t\t\tcase \"PASSWORD\":\n\t\t\tcase \"char\": // anything\n\t\t\tcase \"varchar\": // anything\n\t\t\tcase \"text\": // anything\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\tcase \"bigint\":\n\t\t\tcase \"tinyint\":\n\t\t\t\tif (!preg_match(\"/^[0-9]+$/\",$value)) {\n\t\t\t\t\tadd_msg(\"ERROR\",$name.\" should contain only digits. \"); \n\t\t\t\t\treturn false;\n\t\t\t\t} \n\t\t\t\tbreak;\n\t\t\tcase \"date\":\n\t\t\t\t$arr=preg_split(\"/-/\",$value); // splitting the array\n\t\t\t\t$yy=get_arg($arr,0); // first element of the array is month\n\t\t\t\t$mm=get_arg($arr,1); // second element is date\n\t\t\t\t$dd=get_arg($arr,2); // third element is year\n\t\t\t\tif( $dd == \"\" || $mm == \"\" || $yy == \"\" || !checkdate($mm,$dd,$yy) ){\n\t\t\t\t\tadd_msg(\"ERROR\",$name.\" is not a valid date, should be of the format YYYY-MM-DD \"); \n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t/*case \"PASSWORD\":\n\t\t\t\tif (!preg_match(\"/^[a-zA-Z\\-_0-9]+$/\",$value)) {\n\t\t\t\t\tadd_msg(\"ERROR\",$name.\" can contain only alphabets,numbers,'-' and '_'. <br/>\"); \n\t\t\t\t\treturn false;\n\t\t\t\t} \n\t\t\t\tbreak;\t\t\n\t\t\t*/\n\t\t\tcase \"SIMPLE_STRING\": // can only have alphabets, spaces, dots, -'s or +\n\t\t\t\tif (!preg_match(\"/^[a-zA-Z0-9\\.\\s\\-\\+]+$/\",$value)) {\n\t\t\t\t\tadd_msg(\"ERROR\",$name.\" should contain only alphabets, numbers, spaces '.', '-' or '+'. \"); \n\t\t\t\t\treturn false;\n\t\t\t\t} \n\t\t\t\tbreak;\n\t\t\tcase \"EMAIL\":\n\t\t\t\tif ( filter_var($value, FILTER_VALIDATE_EMAIL) == false ) {\n\t\t\t\t\tadd_msg(\"ERROR\",$name.\" is not valid, should be of the format [email protected]. \"); \n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"MOBILE\":\n\t\t\t\tif (!preg_match(\"/^[0-9]+$/\",$value)) {\n\t\t\t\t\tadd_msg(\"ERROR\",$name.\" is not valid, should be of the format 919123456789 \"); \n\t\t\t\t\treturn false;\n\t\t\t\t} \n\t\t\t\tbreak;\n\t\t\tcase 'FILENAME':\n\t\t\t\tif ($value != basename($value) || !preg_match(\"/^[a-zA-Z0-9_\\.-]+$/\",$value) || !preg_match('/^(?:[a-z0-9_-]|\\.(?!\\.))+$/iD', $value)) {\n\t\t\t\t\tadd_msg('ERROR', \"Invalid $name. \");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'enum':\n\t\t\t\t$enum_arr=explode(',',$enum_str);\n\t\t\t\tif ( in_array($value, $enum_arr) ) {\n\t\t\t\t\tadd_msg('ERROR', \"Invalid $name.\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tadd_msg(\"ERROR\",$name.\" is not valid. Please re enter.\"); \n\t\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "function isValidTimeStamp($timestamp)\n{\n return ((string) (int) $timestamp === $timestamp) \n && ($timestamp <= PHP_INT_MAX)\n && ($timestamp >= ~PHP_INT_MAX);\n}", "public function testInvalid(): void\n {\n $validator = new ControlValidator();\n\n $this->assertFalse($validator->validate('arf12')->isValid());\n }", "function checkValidLine_Y6051($acct){\r\n\t\t\tif( strlen($acct)==9 && is_numeric($acct) ){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}", "public static function isValueValid($value) : bool\n {\n if (! is_float($value)) {\n return false;\n }\n \n if ($value < -90. || $value > 90.) {\n return false;\n }\n \n // $digits = explode(\".\", (string)(float)$value);\n // var_dump($digits[1] ?? '');\n \n return true;\n }", "private function assertIsValidAmount(float $value)\n {\n return 0 <= $value;\n }", "function betweenIntRange($value, $params = array()) {\t\t\n\t\t$min = 0;\n\t\t$max = 255;\n\t\textract($params);\n\t\tif (is_array($value)) {\n\t\t\t$value = array_shift($value);\n\t\t}\n\t\tif (preg_match('/^[0-9]+$/', $value)) {\n\t\t\tif ($value >= $min && $value <= $max) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\t\t\n\t\treturn false;\n\t}", "function isWithinRange($field, $msg, $min, $max){\n\t\t$value = $this->_getValue($field);\n\t\tif(!is_numeric($value) || $value < $min || $value >\t$max){\n\t\t$this->_errorList[] = array(\"field\" => $field,\n\t\t\"value\" => $value, \"msg\" => $msg);\n\t\treturn false;\n\t\t}else{\n\t\treturn true;\n\t\t}\n\t}", "function has_length_less_than( $value, $max ) {\n $length = strlen( $value );\n return $length < $max;\n}", "function is_valid_qq($qq)\n{\n if (is_null($qq) || strlen($qq) < 3 || strlen($qq) > 16)\n {\n return false;\n }\n $pattern = \"/^\\d{3,18}$/\";\n return (preg_match($pattern, $qq) == 1);\n}", "public function validate( $value )\n\t{\n\t\treturn $value < $this->max;\n\t}", "public function testCreditCardIsNotValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertDoesNotMatchRegularExpression($pattern,$data);\n\n }", "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_POSITIVE,self::VALUE_NEUTRAL,self::VALUE_NEGATIVE,self::VALUE_WITHDRAWN,self::VALUE_INDEPENDENTLYWITHDRAWN,self::VALUE_CUSTOMCODE));\n\t}", "function check_length($value = \"\", $min, $max) {\n $result = (mb_strlen($value) < $min || mb_strlen($value) > $max);\n return !$result;\n}", "public function testCheckAddress() {\n\t$this->assertTrue(Bitcoin::checkAddress(\"1pA14Ga5dtzA1fbeFRS74Ri32dQjkdKe5\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1MU97wyf7msCVdaapneW2dW1uXP7oEQsFA\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1F417eczAAbh41V4oLGNf3DqXLY72hsM73\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1ASgNrpNNejRJVfqK2jHmfJ3ZQnMSUJkwJ\"));\n\t$this->assertFalse(Bitcoin::checkAddress(\"1ASgNrpNNejRJVfqK2jHmfJ3ZQnMSUJ\"));\n\t$this->assertFalse(Bitcoin::checkAddress(\"1111111fnord\"));\n\t}", "public function isValid($value);", "public function isValid($value);", "public function testValid(): void\n {\n $validator = new LengthValidator(5, 15);\n $result = $validator->validate('foo bár báz qux');\n\n $this->assertTrue($result->isValid());\n }", "function has_length_less_than($value, $max) {\n $length = strlen($value);\n return $length < $max;\n}", "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_ACCOUNT_LIMIT,self::VALUE_CAMPAIGN_LIMIT,self::VALUE_ADGROUP_LIMIT,self::VALUE_ADGROUP_TEXT_AD_LIMIT,self::VALUE_ADGROUP_DISPLAY_AD_LIMIT,self::VALUE_UNKNOWN));\n\t}", "public function testValidateIpv4()\n {\n $test = array(\n '141.225.185.101',\n '255.0.0.0',\n '0.255.0.0',\n '0.0.255.0',\n '0.0.0.255',\n '127.0.0.1',\n );\n foreach ($test as $val) {\n $this->assertTrue($this->_filter->validateIpv4($val));\n }\n }", "public function validateHexColor($attribute, $value)\n {\n return preg_match('/^#[a-fA-F0-9]{6}$/u', $value);\n }", "function int1 ($var){\n\tif (preg_match(\"|^[\\(\\)\\-+\\ 0-9]+$|\",$var)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t\t}\n\t}" ]
[ "0.6001733", "0.5901429", "0.58518916", "0.55640876", "0.5523201", "0.53632444", "0.5333517", "0.53283733", "0.53252244", "0.53240764", "0.53147423", "0.52634823", "0.5258938", "0.51837677", "0.51708406", "0.5152644", "0.5145378", "0.5138096", "0.5131073", "0.5103631", "0.50909203", "0.50869584", "0.5083919", "0.50714564", "0.5055826", "0.50483006", "0.5041137", "0.50345784", "0.50151426", "0.49962008", "0.49928048", "0.49833152", "0.49776927", "0.49662617", "0.49647972", "0.49465975", "0.49464658", "0.49318537", "0.49288502", "0.49279138", "0.49276766", "0.49261007", "0.49258673", "0.491976", "0.48979145", "0.48975685", "0.48894176", "0.4887225", "0.48844802", "0.4883116", "0.48807177", "0.48742256", "0.48662642", "0.4862649", "0.48615968", "0.4854362", "0.48504102", "0.48493677", "0.4847407", "0.4846388", "0.48460716", "0.48436984", "0.48375365", "0.48365197", "0.48330915", "0.4832092", "0.48269528", "0.48243603", "0.48151362", "0.48141137", "0.48121932", "0.48103705", "0.48101646", "0.48097712", "0.48080167", "0.4806509", "0.4805014", "0.48028013", "0.4800311", "0.48000863", "0.4798284", "0.47953615", "0.4790958", "0.47874713", "0.47849783", "0.47849098", "0.47802472", "0.47701132", "0.47688168", "0.47679865", "0.47653154", "0.47555578", "0.47520086", "0.47520086", "0.47516635", "0.47464326", "0.4746303", "0.47459924", "0.474169", "0.47370794" ]
0.7637197
0
Asserts that the given address is valid A valid address
public static function assertValidAddress($address) { if ($address < 0x0000) { throw new InvalidArgumentException('Invalid address, should be >= 0x0000'); } if ($address > 0xffff) { throw new InvalidArgumentException('Invalid address, should be <= 0xffff'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCheckAddress() {\n\t$this->assertTrue(Bitcoin::checkAddress(\"1pA14Ga5dtzA1fbeFRS74Ri32dQjkdKe5\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1MU97wyf7msCVdaapneW2dW1uXP7oEQsFA\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1F417eczAAbh41V4oLGNf3DqXLY72hsM73\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1ASgNrpNNejRJVfqK2jHmfJ3ZQnMSUJkwJ\"));\n\t$this->assertFalse(Bitcoin::checkAddress(\"1ASgNrpNNejRJVfqK2jHmfJ3ZQnMSUJ\"));\n\t$this->assertFalse(Bitcoin::checkAddress(\"1111111fnord\"));\n\t}", "public function isValidAddress($address);", "public function testAddress()\n {\n $this->assertTrue(RuValidation::address1('Московский пр., д. 100'));\n $this->assertTrue(RuValidation::address1('Moskovskiy ave., bld. 100'));\n\n $this->assertFalse(RuValidation::address1('I would not tell'));\n }", "function verify_address($address) // Colorize: green\n { // Colorize: green\n return isset($address) // Colorize: green\n && // Colorize: green\n is_string($address) // Colorize: green\n && // Colorize: green\n ( // Colorize: green\n filter_var($address, FILTER_VALIDATE_IP) // Colorize: green\n || // Colorize: green\n filter_var($address, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) // Colorize: green\n ); // Colorize: green\n }", "public function validate_address( $address ) {\n\t\t// @codingStandardsIgnoreStart\n\t\treturn strlen( $address ) == 35\n\t\t\t&& ( $address[0] == 'D' || $address[0] == 'T' )\n\t\t\t&& $address[1] == 's';\n\t\t// @codingStandardsIgnoreEnd\n\t}", "public function testRandomEthereumAddress()\n {\n $initial_value = random_ethereum_address();\n $this->assertInternalType('string', $initial_value);\n \n CryptoStat::setCurrency('ETH');\n $is_valid = CryptoStat::validateAddress($initial_value); \n \n $this->assertTrue($is_valid);\n }", "public function validateAddress() {\r\n $leng = mb_strlen($this->data[$this->name]['Address']);\r\n if ($leng > 256) {\r\n return FALSE;\r\n } else if ($leng > 128) {\r\n if (mb_ereg(self::_REGEX_FULLWITH, $this->data[$this->name]['Address']) !== false) {\r\n return FALSE;\r\n }\r\n }\r\n return TRUE;\r\n }", "function isAddress($input)\n{\n $pattern = \"/^[a-zA-Z0-9]{33,34}$/\";\n return preg_match($pattern, $input);\n}", "public static function isValidAddress($address, $throw = FALSE) {\n\n if (!self::hasHexPrefix($address)) {\n return FALSE;\n }\n // Address should be 20bytes=40 HEX-chars + prefix.\n if (strlen($address) !== 42) {\n return FALSE;\n }\n $return = ctype_xdigit(self::removeHexPrefix($address));\n\n if (!$return && $throw) {\n throw new \\InvalidArgumentException($address . ' has invalid format.');\n }\n return $return;\n }", "public function testThrowExceptionOnInvalidDashAddress()\n {\n $this->expectException(Exceptions\\InvalidAddressFormatException::class);\n Wallet::validate(self::INVALID_ADDRESS, Wallet::DASH);\n }", "public function test_street_address_validation()\n {\n /*\n * Valid\n */\n $validStreetLocation = Location::factory()->make([\n 'streetAddress' => '123 Valid Address',\n ]);\n $validStreetData = $validStreetLocation->toArray();\n $response = $this->post($this->route(), $validStreetData);\n $response->assertStatus(201);\n\n /*\n * Invalid: missing\n */\n $missingStreetLocation = Location::factory()->make();\n $missingStreetData = $missingStreetLocation->toArray();\n unset($missingStreetData['streetAddress']);\n\n $response = $this->post($this->route(), $missingStreetData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.streetAddress', 'The street address field is required.');\n\n /**\n * Invalid: not a string\n */\n $nonStringLocation = Location::factory()->make([\n 'streetAddress' => ['invalid'],\n ]);\n $nonStringData = $nonStringLocation->toArray();\n\n $response = $this->post($this->route(), $nonStringData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.streetAddress', 'The street address must be a string.');\n }", "public function testThrowExceptionOnInvalidEthereumAddress()\n {\n $this->expectException(Exceptions\\InvalidAddressFormatException::class);\n Wallet::validate(self::INVALID_ADDRESS, Wallet::ETHEREUM);\n }", "public function testThrowExceptionOnInvalidLitecoinAddress()\n {\n $this->expectException(Exceptions\\InvalidAddressFormatException::class);\n Wallet::validate(self::INVALID_ADDRESS, Wallet::LITECOIN);\n }", "public function testThrowExceptionOnInvalidDogecoinAddress()\n {\n $this->expectException(Exceptions\\InvalidAddressFormatException::class);\n Wallet::validate(self::INVALID_ADDRESS, Wallet::DOGECOIN);\n }", "public function testReturnTrueOnValidEthereumAddress()\n {\n $result = Wallet::validate(self::VALID_ETH_ADDRESS, Wallet::ETHEREUM);\n\n $this->assertTrue($result);\n }", "public function validate_address($address) { \n\n\t// Decode\n\t$decode = $this->base58_decode($address); \n\tif (strlen($decode) != 50) { return false; }\n\n\t// Compare address versionok\\n\n\t$version = substr($decode, 0, 2);\n\t$p2sh_byte = TESTNET == 1 ? 'c4' : '05';\n\tif (hexdec($version) > hexdec($this->public_prefix) && $version != $p2sh_byte) { return false; }\n\n\t// Compare checksum\n\t$hash = hash('sha256', hash('sha256', pack(\"H*\", substr($decode, 0, 42)), true));\n\treturn substr($decode, -8) == substr($hash, 0, 8);\n\t\t\n}", "public function testValueIsAngleAddrWithValidAddress()\n {\n\n $header = $this->_getHeader('Return-Path');\n $header->setAddress('[email protected]');\n $this->assertEquals('<[email protected]>', $header->getFieldBody());\n }", "public function validAddresses() {}", "public function validateaddress($address){\n return $this->bitcoin->validateaddress($address);\n }", "public function checkAddress($address)\n\t\t{\n\t\t\t$address = strip_tags($address);\n\t\t\t\n\t\t\t$this->groestlcoin->validateaddress($address);\n\t\t\t\n\t\t\tif ($this->groestlcoin->response['result']['isvalid'] == 1){\n\t\t\t\treturn 1;}\n\t\t\telse{\n\t\t\t\treturn 0;}\t\t\t\n\t\t}", "public function testReturnTrueOnValidDashAddress()\n {\n $result = Wallet::validate(self::VALID_DASH_ADDRESS, Wallet::DASH);\n\n $this->assertTrue($result);\n }", "public function testIpAAddress()\n {\n $ipV4Address = new Ipv4address();\n $this->assertEquals(\"10.0.0.1\", $ipV4Address->getDecadic());\n $this->assertEquals(167772161, $ipV4Address->getInteger());\n $this->assertEquals(\"00001010000000000000000000000001\", $ipV4Address->getBinary());\n $this->assertEquals(32, strlen($ipV4Address->getBinary()));\n $this->assertCount(4, $ipV4Address->getAddressArray());\n $this->assertEquals(10, $ipV4Address->getAddressArray()[0]);\n $this->assertEquals(0, $ipV4Address->getAddressArray()[1]);\n $this->assertEquals(0, $ipV4Address->getAddressArray()[2]);\n $this->assertEquals(1, $ipV4Address->getAddressArray()[3]);\n }", "public function test_user_can_create_an_address()\n {\n $this->actingAs(factory(User::class)->create())->post('/address', [\n 'street' => \"new\",\n 'city' => \"rneogr\",\n 'pincode' => 1233221,\n 'state' => 'penns',\n 'phone_number' => 8909456721\n ])->assertSuccessful();\n\n }", "public function testIpAAddressWithParameter()\n {\n $ipV6Address = new Ipv6address(\"abc::\");\n $this->assertEquals(\"abc::\", $ipV6Address->getHexa());\n $this->assertEquals(\"00001010101111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\", $ipV6Address->getBinary());\n $this->assertEquals(128, strlen($ipV6Address->getBinary()));\n $this->assertCount(8, $ipV6Address->getAddressArray());\n $this->assertEquals(\"abc\", $ipV6Address->getAddressArray()[0]);\n $this->assertEquals(\"0000\", $ipV6Address->getAddressArray()[1]);\n $this->assertEquals(\"0000\", $ipV6Address->getAddressArray()[7]);\n }", "public function testIpAAddress()\n {\n $ipV6Address = new Ipv6address();\n $this->assertEquals(\"::1\", $ipV6Address->getHexa());\n $this->assertEquals(\"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\", $ipV6Address->getBinary());\n $this->assertEquals(128, strlen($ipV6Address->getBinary()));\n $this->assertCount(8, $ipV6Address->getAddressArray());\n $this->assertEquals(\"0000\", $ipV6Address->getAddressArray()[0]);\n $this->assertEquals(\"0000\", $ipV6Address->getAddressArray()[1]);\n $this->assertEquals(\"1\", $ipV6Address->getAddressArray()[7]);\n }", "public function testThrowExceptionOnInvalidBitcoinAddress()\n {\n $this->expectException(Exceptions\\InvalidAddressFormatException::class);\n Wallet::validate(self::INVALID_ADDRESS, Wallet::BITCOIN);\n }", "public static function ValidateAddress($address) {\n\t if (function_exists('filter_var')) { //Introduced in PHP 5.2\n\t if(filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) {\n\t return false;\n\t } else {\n\t return true;\n\t }\n\t } else {\n\t return preg_match('/^(?:[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+\\.)*[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!\\.)){0,61}[a-zA-Z0-9_-]?\\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\\[(?:(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.){3}(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\]))$/', $address);\n\t }\n\t}", "protected static function isValidHex(Hex|string $address): bool\n {\n return Hex::of($address)->length() === 20;\n }", "public function validateAddress($attribute)\n {\n $web3BlockChainAdapter = new Web3BlockChainAdapter(Yii::$app->ethereumAPI);\n if ($this->network === CryptoCurrencyTypes::NETWORK_TYPE_ETHEREUM && !$web3BlockChainAdapter->isAccount($this->$attribute)) {\n $this->addError($attribute, 'The address does not exist in the blockchain.');\n }\n }", "public function testFromString(): void\n {\n $this->expectNotToPerformAssertions();\n\n InternetAddress::fromString('1.1.1.1:1');\n }", "public function testFromStringInvalidPort(): void\n {\n $this->expectException(SocketException::class);\n $this->expectExceptionMessage('Invalid address');\n\n InternetAddress::fromString('1.1.1.1:-1');\n }", "public static function ValidateAddress($address) {\n if (function_exists('filter_var')) { //Introduced in PHP 5.2\n if(filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) {\n return false;\n } else {\n return true;\n }\n } else {\n return preg_match('/^(?:[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+\\.)*[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!\\.)){0,61}[a-zA-Z0-9_-]?\\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\\[(?:(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.){3}(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\]))$/', $address);\n }\n }", "public function invalidAddresses() {}", "public function testReturnTrueOnValidLitecoinAddress()\n {\n $result = Wallet::validate(self::VALID_LITECOIN_ADDRESS, Wallet::LITECOIN);\n\n $this->assertTrue($result);\n }", "public function testReturnTrueOnValidBitcoinAddress()\n {\n $result = Wallet::validate(self::VALID_BTC_ADDRESS, Wallet::BITCOIN);\n\n $this->assertTrue($result);\n }", "public function testGetScheduleByInvalidScheduleLocationAddress() {\n\n\t\t$schedule = Schedule::getScheduleByScheduleLocationAddress($this->getPDO(), \"THIS ADDRESS DOES NOT EXIST\");\n\n\t\t$this->assertCOunt(0, $schedule);\n\t}", "function _validateAddress($address)\n {\n $is_group = false;\n $addresses = array();\n\n if ($address['group']) {\n $is_group = true;\n\n // Get the group part of the name\n $parts = explode(':', $address['address']);\n $groupname = $this->_splitCheck($parts, ':');\n $structure = array();\n\n // And validate the group part of the name.\n if (!$this->_validatePhrase($groupname)){\n $this->error = 'Group name did not validate.';\n return false;\n } else {\n // Don't include groups if we are not nesting\n // them. This avoids returning invalid addresses.\n if ($this->nestGroups) {\n $structure = new stdClass;\n $structure->groupname = $groupname;\n }\n }\n\n $address['address'] = ltrim(substr($address['address'], strlen($groupname . ':')));\n }\n\n // If a group then split on comma and put into an array.\n // Otherwise, Just put the whole address in an array.\n if ($is_group) {\n while (strlen($address['address']) > 0) {\n $parts = explode(',', $address['address']);\n $addresses[] = $this->_splitCheck($parts, ',');\n $address['address'] = trim(substr($address['address'], strlen(end($addresses) . ',')));\n }\n } else {\n $addresses[] = $address['address'];\n }\n\n // Check that $addresses is set, if address like this:\n // Groupname:;\n // Then errors were appearing.\n if (!count($addresses)){\n $this->error = 'Empty group.';\n return false;\n }\n\n // Trim the whitespace from all of the address strings.\n array_map('trim', $addresses);\n\n // Validate each mailbox.\n // Format could be one of: name <[email protected]>\n // [email protected]\n // geezer\n // ... or any other format valid by RFC 822.\n for ($i = 0; $i < count($addresses); $i++) {\n if (!$this->validateMailbox($addresses[$i])) {\n if (empty($this->error)) {\n $this->error = 'Validation failed for: ' . $addresses[$i];\n }\n return false;\n }\n }\n\n // Nested format\n if ($this->nestGroups) {\n if ($is_group) {\n $structure->addresses = $addresses;\n } else {\n $structure = $addresses[0];\n }\n\n // Flat format\n } else {\n if ($is_group) {\n $structure = array_merge($structure, $addresses);\n } else {\n $structure = $addresses;\n }\n }\n\n return $structure;\n }", "public static function validateAddress($value)\n {\n return preg_match(self::EMAIL_FORMAT_REGEX, $value);\n }", "public function verifyAddress(string $address)\n {\n return $this->execute($this->getCoin() . '/verifyaddress', 'POST', [\n 'address' => $address\n ]);\n }", "public function test_address_region_validation()\n {\n /*\n * Valid\n */\n $validRegionLocation = Location::factory()->make([\n 'addressRegion' => 'Greater Manchester',\n ]);\n $validRegionData = $validRegionLocation->toArray();\n $this->post($this->route(), $validRegionData)->assertStatus(201);\n\n /**\n * Invalid: not a string\n */\n $nonStringLocation = Location::factory()->make([\n 'addressRegion' => ['invalid'],\n ]);\n $nonStringData = $nonStringLocation->toArray();\n\n $response = $this->post($this->route(), $nonStringData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.addressRegion', 'The address region must be a string.');\n }", "public static function isValid(Hex|string $address): bool\n {\n $address = Hex::of($address);\n\n if (!self::isValidHex($address)) {\n return false;\n }\n\n return self::isAllSameCaps($address) || self::isValidChecksum($address->prefixed());\n }", "public function testInvalidAddressException($address, $name = '')\n {\n $this->expectException(Exception::class);\n $this->expectExceptionMessage('Invalid address: (From):');\n\n $mail = new PHPMailer(true);\n $mail->setFrom($address, $name);\n }", "public function testCreate() {\n $address_params = array(\"street1\" => \"388 Townsend St\",\n \"street2\" => \"Apt 20\",\n \"city\" => \"San Francisco\",\n \"state\" => \"CA\",\n \"zip\" => \"94107\");\n $address = EasyPost_Address::create($address_params);\n $this->assertInstanceOf('EasyPost_Address', $address);\n $this->assertInternalType('string', $address->id);\n $this->assertStringMatchesFormat(\"adr_%s\", $address->id);\n $this->assertNull($address->name);\n\n return $address;\n }", "public function testGetInvalidLocationByLocationStreetOne() {\n\t\t// grab a location by searching for street one that does not exist\n\t\t$location = Location::getLocationByLocationStreetOne($this->getPDO(), \"That's a ghost street\");\n\t\t$this->assertCount(0, $location);\n\t}", "public function test_address_country_validation()\n {\n /*\n * Valid\n */\n $validCountryLocation = Location::factory()->make([\n 'addressCountry' => 'United Kingdom',\n ]);\n $validCountryData = $validCountryLocation->toArray();\n $this->post($this->route(), $validCountryData)->assertStatus(201);\n\n /*\n * Invalid: missing\n */\n $missingCountryLocation = Location::factory()->make();\n $missingCountryData = $missingCountryLocation->toArray();\n unset($missingCountryData['addressCountry']);\n\n $response = $this->post($this->route(), $missingCountryData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.addressCountry', 'The address country field is required.');\n\n /**\n * Invalid: not a string\n */\n $nonStringLocation = Location::factory()->make([\n 'addressCountry' => ['invalid'],\n ]);\n $nonStringData = $nonStringLocation->toArray();\n\n $response = $this->post($this->route(), $nonStringData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.addressCountry', 'The address country must be a string.');\n }", "public function test_create_new_rural_address()\n {\n new Helpers\\EloquentHelper();\n\n $address = Models\\Address::create([\n 'type' => 'rural',\n 'name' => 'My Address',\n 'city' => 'Toronto',\n 'postal_code' => 'A1A1A1',\n 'province' => 'ON',\n 'country' => 'CA',\n 'rural_route' => 'RR 123',\n 'station' => 'STN A'\n ]);\n\n $this->assertEquals([], $address->errors);\n }", "public function testValidPostalCode()\n {\n $request = ['postal_code' => '1000 AP'];\n $rules = ['postal_code' => 'postal_code:NL'];\n $validator = $this->factory->make($request, $rules);\n\n $this->assertFalse($validator->fails());\n }", "public static function isValidChecksum(string $address): bool\n {\n if (!self::isValidHex($address)) {\n throw new InvalidArgumentException(\"Given address '{$address}' is not a valid Ethereum address.\");\n }\n\n $address = (string) Hex::of($address);\n $hash = (string) Sha3::hash(strtolower($address));\n\n for ($i = 0; $i < 40; ++$i) {\n if (ctype_alpha($address[$i])) {\n $charInt = intval($hash[$i], 16);\n\n if ((ctype_upper($address[$i]) && $charInt <= 7) || (ctype_lower($address[$i]) && $charInt > 7)) {\n return false;\n }\n }\n }\n\n return true;\n }", "public static function IsValid ($address) {\n return preg_match(\"/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$/\", $address);\n }", "public function verifyAndSetAddress($a,$bRequired) {\n\t\tif ($a['country'] != 'USA')\n\t\t\tthrow new exception(\"internation addresses not supported yet\");\n\t\t$this->country='USA';\t\t\n\t\t$this->line1 = isset($a['line1']) ? $a['line1'] : ''; \t\n\t\t$this->line2 = isset($a['line2']) ? $a['line2'] : ''; \t\n\t\t$this->city = isset($a['city']) ? $a['city'] : ''; \t\n\t\t$this->state = isset($a['state2']) ? $a['state2'] : ''; \t\n\t\t$this->zip = isset($a['zip']) ? $a['zip'] : ''; \t\n\t\t\t\n\t\tif ($this->line1 == '' && $this->line2 == '') {\n\t\t\tif ($bRequired || $this->city != '' || $this->zip != '')\n\t\t\t\treturn (array('*line1'=>'You must provide an address'));\n\t\t\telse {\n\t\t\t\t$this->city=$this->state=$this->zip='';\n\t\t\t\treturn True;\t\t// OK -- just no address\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t$retval=array();\n\t\tif ($this->city == '')\n\t\t\t$retval['*city']='You must provide a city';\n\t\tif ($this->zip == '')\n\t\t\t$retval['*zip']='You must provide a ZIP code';\n\t\telse {\n\t\t\t$nmatches=preg_match('/^[\\\\d]{5}(-[\\\\d]{4})??$/',$this->zip);\n\t\t\tif (0 == $nmatches)\n\t\t\t\t$retval['*zip']=\"Invalid ZIP code\";\n\t\t}\t\n\t\treturn (sizeof($retval) != 0) ? $retval : True;\n\t}", "public function validateAddress($address)\n {\n $result = $this->newAPIRequest('GET', '/validate/'.$address);\n return $result;\n }", "public function testReturnTrueOnValidDogecoinAddress()\n {\n $result = Wallet::validate(self::VALID_DOGECOIN_ADDRESS, Wallet::DOGECOIN);\n\n $this->assertTrue($result);\n }", "public function testCreateFromShorthand()\n {\n $shorthandIp = 'FFFF:::::::FFFF';\n\n $this->assertEquals($shorthandIp, (string) Address::fromString($shorthandIp));\n }", "public function testAddAddress()\n {\n\n }", "function hasValidAddress()\n{\n return isset($_POST[\"address\"]) && isAddress($_POST[\"address\"]);\n}", "public function isAddressValid()\n {\n //TODO: consider does it make sense to have a special validation by country? how does the app handle different country addresses ?\n $addressValid = trim($this->Streetname1) != '' && trim($this->PostalCode) != '' && trim($this->City) != '' && trim($this->Country) != '' ;\n\n if (!$addressValid) {\n $this->errors[] = 'Invalid Shipping Address';\n }\n\n return $addressValid;\n }", "public function testGetAddress()\n {\n\n }", "function ValidEmailAddress (\t$in_test_address\t///< Either a single email address, or a list of them, comma-separated.\n )\n {\n $valid = false;\n \n if ( $in_test_address )\n {\n global $g_validation_error; ///< This contains an array of strings, that \"log\" bad email addresses.\n $g_validation_error = array();\n $addr_array = split ( \",\", $in_test_address );\n // Start off optimistic.\n $valid = true;\n \n // If we have more than one address, we iterate through each one.\n foreach ( $addr_array as $addr_elem )\n {\n // This splits any name/address pair (ex: \"Jack Schidt\" <[email protected]>)\n $addr_temp = preg_split ( \"/ </\", $addr_elem );\n if ( count ( $addr_temp ) > 1 )\t// We also want to trim off address brackets.\n {\n $addr_elem = trim ( $addr_temp[1], \"<>\" );\n }\n else\n {\n $addr_elem = trim ( $addr_temp[0], \"<>\" );\n }\n $regexp = \"/^([_a-zA-Z0-9-]+)(\\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+)(\\.[a-zA-Z0-9-]+)*(\\.[a-zA-Z]{2,4})$/\";\n if (!preg_match($regexp, $addr_elem))\n {\n array_push ( $g_validation_error, 'The address'.\" '$addr_elem' \".'is not correct.' );\n $valid = false;\n }\n }\n }\n \n return $valid;\n }", "private function assertAddressPermission(Address $address = null)\n {\n if ($address === null || $address->getUid() !== 0) {\n return;\n }\n if (!$this->customer->getAddresses()->contains($address)) {\n throw new PermissionException(\n sprintf('No permission to access address \"%d\"', $address->getUid()),\n 1576615121\n );\n }\n }", "function _validateAddrSpec($addr_spec)\n {\n $addr_spec = trim($addr_spec);\n\n // Split on @ sign if there is one.\n if (strpos($addr_spec, '@') !== false) {\n $parts = explode('@', $addr_spec);\n $local_part = $this->_splitCheck($parts, '@');\n $domain = substr($addr_spec, strlen($local_part . '@'));\n\n // No @ sign so assume the default domain.\n } else {\n $local_part = $addr_spec;\n $domain = $this->default_domain;\n }\n\n if (($local_part = $this->_validateLocalPart($local_part)) === false) return false;\n if (($domain = $this->_validateDomain($domain)) === false) return false;\n\n // Got here so return successful.\n return array('local_part' => $local_part, 'domain' => $domain);\n }", "function checkAddress($address = null, $state = null, $city = null, $zip = null) {\n $this->autoRender = false;\n if (isset($_POST)) {\n $zipCode = ltrim($zip, \" \");\n $stateName = $state;\n $cityName = strtolower($city);\n $cityName = ucwords($cityName);\n $dlocation = $address . \" \" . $cityName . \" \" . $stateName . \" \" . $zipCode;\n $adjuster_address2 = str_replace(' ', '+', $dlocation);\n $geocode = file_get_contents('https://maps.google.com/maps/api/geocode/json?key='.GOOGLE_GEOMAP_API_KEY.'&address=' . $adjuster_address2 . '&sensor=false');\n $output = json_decode($geocode);\n if ($output->status == \"ZERO_RESULTS\" || $output->status != \"OK\") {\n echo 2;\n die; // Bad Address\n } else {\n $latitude = @$output->results[0]->geometry->location->lat;\n $longitude = @$output->results[0]->geometry->location->lng;\n $formated_address = @$output->results[0]->formatted_address;\n if ($latitude) {\n echo 1;\n die; // Good Address\n }\n }\n }\n }", "static function checkAddress($input)\r\n {\r\n if (preg_match('/^[\\W\\w\\d,][\\W\\w\\d\\s,]{1,40}$/', $input)) {\r\n return true; //Illegal Character found!\r\n }\r\n else{\r\n echo PageBuilder::printError(\"Please enter alphabets and numbers with comma seperation, maximum of 40 characters.\");\r\n return false;\r\n }\r\n }", "function _validateRouteAddr($route_addr)\n {\n // Check for colon.\n if (strpos($route_addr, ':') !== false) {\n $parts = explode(':', $route_addr);\n $route = $this->_splitCheck($parts, ':');\n } else {\n $route = $route_addr;\n }\n\n // If $route is same as $route_addr then the colon was in\n // quotes or brackets or, of course, non existent.\n if ($route === $route_addr){\n unset($route);\n $addr_spec = $route_addr;\n if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) {\n return false;\n }\n } else {\n // Validate route part.\n if (($route = $this->_validateRoute($route)) === false) {\n return false;\n }\n\n $addr_spec = substr($route_addr, strlen($route . ':'));\n\n // Validate addr-spec part.\n if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) {\n return false;\n }\n }\n\n if (isset($route)) {\n $return['adl'] = $route;\n } else {\n $return['adl'] = '';\n }\n\n $return = array_merge($return, $addr_spec);\n return $return;\n }", "public function test_address_locality_validation()\n {\n /*\n * Valid\n */\n $validRegionLocation = Location::factory()->make([\n 'addressLocality' => 'Salford',\n ]);\n $validRegionData = $validRegionLocation->toArray();\n $this->post($this->route(), $validRegionData)->assertStatus(201);\n\n /**\n * Invalid: not a string\n */\n $nonStringLocation = Location::factory()->make([\n 'addressLocality' => ['invalid'],\n ]);\n $nonStringData = $nonStringLocation->toArray();\n\n $response = $this->post($this->route(), $nonStringData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.addressLocality', 'The address locality must be a string.');\n }", "public function testInvalidPostalCode()\n {\n $request = ['postal_code' => 'Some arbitrary string'];\n $rules = ['postal_code' => 'postal_code:BE'];\n $validator = $this->factory->make($request, $rules);\n\n $this->assertTrue($validator->fails());\n }", "public function validate()\n {\n if (empty($this->schemeID)) {\n ISO6523ICD::verify($this->schemeID);\n }\n\n if ($this->address === null) {\n throw new \\InvalidArgumentException(\"Element 'cac:Address' MUST be provided\");\n }\n }", "public function testSetAddressLineWithStringsMustPass(): void\n {\n $instance = self::getWhlAddressTypeInstance();\n\n $this->assertSame(\n $instance,\n $instance->setAddressLine([\n 'a',\n 'b',\n ])\n );\n }", "public function testCanBeCreatedFromValidEmailAddress()\n {\n\n }", "public function testGenerateAddressAuthCode()\n {\n\n }", "public function testPostal()\n {\n $this->assertFalse(BrValidation::postal('111'));\n $this->assertFalse(BrValidation::postal('1111'));\n $this->assertFalse(BrValidation::postal('1234-123'));\n $this->assertFalse(BrValidation::postal('12345-12'));\n\n $this->assertTrue(BrValidation::postal('88000-123'));\n $this->assertTrue(BrValidation::postal('01234-123'));\n $this->assertTrue(BrValidation::postal('01234123'));\n }", "public function testDebtorSaveAddressEmpty()\n {\n $aDados = [\n 'name' => 'Carlos Vinicius',\n 'email' => '[email protected]',\n 'cpf_cnpj' => '1234567890',\n 'birthdate' => '12/01/1994',\n 'phone_number' => '(79) 9 9999-9999',\n 'zipcode' => '99999-999',\n 'address' => '',\n 'number' => '25',\n 'complement' => 'Conjunto Teste 2',\n 'neighborhood' => 'Bairro Teste 2',\n 'city' => 'Aracaju',\n 'state' => 'SE'\n ];\n\n $this->expectException(InvalidAttributeException::class);\n $oDebtor = Debtor::createFromRequest($aDados);\n }", "public function test_create_new_rural_address_with_no_station()\n {\n new Helpers\\EloquentHelper();\n\n $address = Models\\Address::create([\n 'type' => 'rural',\n 'name' => 'My Address',\n 'city' => 'Toronto',\n 'postal_code' => 'A1A1A1',\n 'province' => 'ON',\n 'country' => 'CA',\n 'rural_route' => 'RR 123',\n 'station' => ''\n ]);\n\n $error = $this->getValidationMessage('validation.required', [':attribute'=>'station'], 'en');\n\n $errors = new MessageBag;\n $errors->add('station', $error);\n\n $this->assertEquals($errors, $address->errors);\n }", "public function testPostal()\n {\n $this->assertTrue(RuValidation::postal('101135'));\n $this->assertTrue(RuValidation::postal('693000'));\n\n $this->assertFalse(RuValidation::postal('100123'));\n $this->assertFalse(RuValidation::postal('200321'));\n }", "function is_valid_btcaddress($pubkey)\r\n\t{\r\n\r\n\t$forbidden_chars = array(\";\",\"$\",\"*\",\"!\",\"[\",\"]\",\"@\",\"#\",\"%\",\"^\",\"&\");\r\n\t$minimal_lenght = 25;\r\n\t\r\n\t$errors_sum =0;\r\n\t//check pubkey lenght\r\n\tif (strlen($pubkey)<$minimal_lenght)\r\n\t\t$errors_sum=$errors_sum+1;\t\r\n\t// check if address begins from 1\t\t\r\n\tif ($pubkey[0]!='1')\r\n\t\t$errors_sum=$errors_sum+1;\r\n\t//check if forbidden chars occure\r\n\tforeach ($forbidden_chars as &$forbidden_character)\r\n\t\t{\r\n\t\tif (strpos($pubkey, $forbidden_character))\r\n\t\t\t$errors_sum=$errors_sum+1;\t\r\n\t\t}\r\n\t//result of checking\r\n\tif ($errors_sum ==0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n\r\n\t}", "static function checkIPFromNetwork($address, $networkAddress, $networkNetmask, $version = 0) {\n\n $IPNetmask = [0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff];\n $relativity = self::checkNetworkRelativity($address, $IPNetmask, $networkAddress,\n $networkNetmask, $version);\n\n return ($relativity == \"equals\") || ($relativity == \"second contains first\");\n }", "public function setAddress(Address $address);", "public function testSetGetAddress()\n {\n $address = 'Address';\n $event = (new Event())->setAddress($address);\n $this->assertEquals($address, $event->getAddress());\n }", "function CheckAdresses( $aad )\r\n\t\t{\r\n//echo \"CheckAdress: \";echo is_array($aad)==1?\"table\":\"Ntable\";echo \"<br>\";\r\n\t\tif( is_array( $aad ) )\r\n\t\t\t{\r\n\t\t\tfor( $i=0; $i< sizeof( $aad ); $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t$res = $this->ValidEmail( $aad[ $i ], $this );\r\n\t\t\t\tif( $res == false )\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\telse\r\n\t\t\t$res = $this->ValidEmail( $aad, $this );\r\n\t\tif( ! $res )\r\n\t\t\t{\r\n\t\t\t$this->errNum = ERR_ADRESSE_INVALIDE;\r\n\t\t\t$this->errMsg = $aad;\r\n\t\t\t}\r\n\t\treturn $res;\r\n\t\t}", "public function setAddress($address);", "public function setAddress($address);", "function validate_email ($address) {\n return preg_match('/^[a-z0-9!#$%&\\'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\\'*+\\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i', $address);\n }", "public function testCannotBeCreatedFromInvalidEmailAddress()\n {\n\n }", "public static function validateAddress(): array\n\t{\n\t\treturn [\n\t\t\tnew LengthValidator(null, 255),\n\t\t];\n\t}", "private function isValidAddress($addressId)\r\n {\r\n $address = Shopware()->Models()->find('Shopware\\Models\\Customer\\Address',$addressId);\r\n return $this->get('shopware_account.address_validator')->isValid($address);\r\n }", "public function validateDeliveryAddress($street = '', $postcode = \"\", $city = \"\")\n {\n return $this->apiClient->doCall(\n \"get\",\n \"address?\" . http_build_query(\n array(\n 'street' => $street,\n 'postcode' => $postcode,\n 'city' => $city,\n )\n )\n );\n }", "public function testShouldShowAllAddress()\n {\n $request = $this->call('GET', '/api/address');\n\n $request->assertStatus(200);\n }", "public function testFromStringMissingPort(): void\n {\n $this->expectException(SocketException::class);\n $this->expectExceptionMessage('Missing port');\n\n InternetAddress::fromString('1.1.1.1');\n }", "public function validate_refund_address_field() {\n\n\t\tWC()->session->set( 'decred_refund_address', null );\n\n\t\t$address = $this->get_post( 'decred-refund-address' );\n\n\t\t// this should never happen as the refund address field should be missing.\n\t\tif ( ! empty( $address ) && ! $this->show_refund_address() ) {\n\t\t\twc_add_notice( __( 'Decred plugin error: unexpected refund address.', 'decred' ), 'error' );\n\t\t\treturn false;\n\t\t}\n\n\t\t// empty address OK if optional, otherwise validate it.\n\t\tif ( empty( $address ) && ! $this->require_refund_address() ) {\n\t\t\t$address_is_valid = true;\n\t\t} else {\n\t\t\t$address_is_valid = $this->validate_address( $address );\n\t\t}\n\n\t\tif ( $address_is_valid ) {\n\t\t\tif ( ! empty( $address ) ) {\n\t\t\t\t// save address now to retrieve it later when order created.\n\t\t\t\tWC()->session->set( 'decred_refund_address', $address );\n\t\t\t}\n\t\t} else {\n\t\t\t// translators: parameter is address entered by user, not to be translated.\n\t\t\t$message = __( 'Please enter a valid Decred address for refunds. Wrong address \"%s\"', 'decred' );\n\t\t\twc_add_notice( sprintf( $message, $address ), 'error' );\n\t\t}\n\t}", "public function testGetAddressToken()\n {\n\n }", "public function test_create_new_rural_address_with_no_rural_route()\n {\n new Helpers\\EloquentHelper();\n\n $address = Models\\Address::create([\n 'type' => 'rural',\n 'name' => 'My Address',\n 'city' => 'Toronto',\n 'postal_code' => 'A1A1A1',\n 'province' => 'ON',\n 'country' => 'CA',\n 'rural_route' => '',\n 'station' => 'STN A'\n ]);\n\n $error = $this->getValidationMessage('validation.required', [':attribute'=>'rural route'], 'en');\n\n $errors = new MessageBag;\n $errors->add('rural_route', $error);\n\n $this->assertEquals($errors, $address->errors);\n }", "protected function performSerializationTest($address)\n {\n // unserialization.\n $rehydrated = unserialize(serialize($address));\n $this->assertEquals($rehydrated->getKey(), $address->getKey());\n $this->assertEquals($rehydrated->getBin(), $address->getBin());\n\n if (is_null($address->getBin())) {\n $this->assertNull($rehydrated->getBin());\n }\n if (is_null($address->getKey())) {\n $this->assertNull($rehydrated->getKey());\n }\n\n // Same for non-native.\n $rehydrated = new Address();\n $rehydrated->unserialize($address->serialize());\n $this->assertEquals($rehydrated->getKey(), $address->getKey());\n $this->assertEquals($rehydrated->getBin(), $address->getBin());\n }", "public function testEditAddress()\n {\n\n }", "public function itShouldConvertAddressToCoordinates()\n {\n $address = '2711 Parkview Drive, Denton, Texas, 76210';\n $latLong = '33.136763, -97.056222';\n\n $listing = new Listing();\n $listing->setAddress($address);\n $listing->save();\n\n $listings = Listing::distance(1, $latLong);\n $listings = $listings->get();\n\n $this->assertEquals($address, $listings[0]->address);\n\n //Assert on the get by distance for now.\n // @TODO: We should have a coord accessor, I think.\n // $this->assertEquals($coords, $listing->coords);\n }", "function validateAddress($field)\n\t{\n //Make sure field is not blank; unable to validate anything beyond that.\n if ($field == \"\") return \"Please specify your address.\\\\n\";\n\t\treturn \"\";\n\t}", "public function testCanAddBitcoinAddress()\n {\n $result = Wallet::add(self::VALID_BTC_ADDRESS, Wallet::BITCOIN);\n\n $this->assertTrue($result);\n }", "public function testMyGmailAddressIsEvaluatedAsTrue()\n {\n $this->assertTrue(EmailValidator::validate(\"[email protected]\"));\n }", "function ValidEmail( $address, $leMail )\r\n\t\t{\r\n\t\tif( ereg( \".*<(.+)>\", $address, $regs ) )\r\n\t\t\t$address = $regs[1];\r\n\r\n\t\tif( !ereg( \"^[^@ ]+@([a-zA-Z0-9\\-]+\\.)+([a-zA-Z0-9\\-]{2}|net|com|gov|mil|org|edu|int)\\$\",$address) )\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t\t}", "public function testGetScheduleByValidScheduleLocationAddress() {\n\n\t\t$numRows = $this->getConnection()->getRowCount(\"schedule\");\n\n\t\t$schedule = new Schedule(null, $this->company->getCompanyId(), $this->VALID_SCHEDULEDAYOFWEEK1, $this->VALID_SCHEDULEENDTIME1, $this->VALID_SCHEDULELOCATIONADDRESS1, $this->VALID_SCHEDULELOCATIONNAME1, $this->VALID_SCHEDULESTARTTIME1);\n\n\t\t$schedule->insert($this->getPDO());\n\n\t\t$results = Schedule::getScheduleByScheduleLocationAddress($this->getPDO(), $schedule->getScheduleLocationAddress());\n\n//make sure there is a row in there\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"schedule\"));\n\n\t\t//make sure there is an object in the database\n\n\t\t$this->assertCount(1, $results);\n\n\t\t//make sure there are only instances of schedule in the Schedule class in the namespace\n\t\t//what are namespaces again?\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\CrumbTrail\\\\Schedule\", $results);\n\n\t\t// validate the results from the array. (get them first)\n\t\t$pdoSchedule = $results[0];\n\t\t$this->assertEquals($pdoSchedule->getScheduleCompanyId(), $this->company->getCompanyId());\n\t\t$this->assertEquals($pdoSchedule->getScheduleDayOfWeek(), $this->VALID_SCHEDULEDAYOFWEEK1);\n\t\t$this->assertEquals($pdoSchedule->getScheduleEndTime(), $this->VALID_SCHEDULEENDTIME1);\n\t\t$this->assertEquals($pdoSchedule->getScheduleLocationAddress(), $this->VALID_SCHEDULELOCATIONADDRESS1);\n\t\t$this->assertEquals($pdoSchedule->getScheduleLocationName(), $this->VALID_SCHEDULELOCATIONNAME1);\n\t\t$this->assertEquals($pdoSchedule->getScheduleStartTime(), $this->VALID_SCHEDULESTARTTIME1);\n\n\t}", "public function isAddressSpecified(): bool\n {\n return ($this->getAddressZip() && $this->getAddressCity() && $this->getAddressCountry());\n }", "protected function assertFormattedAddress(array $expectedLines, string $formattedAddress): void\n {\n $expectedLines = implode(\"\\n\", $expectedLines);\n $this->assertEquals($expectedLines, $formattedAddress);\n }" ]
[ "0.7956734", "0.7896082", "0.75274664", "0.72501427", "0.717179", "0.7116345", "0.7113547", "0.70465136", "0.6971146", "0.69659317", "0.69403756", "0.69289315", "0.6924772", "0.6850172", "0.6849148", "0.6831929", "0.6822808", "0.67175794", "0.6686444", "0.6666322", "0.6610483", "0.6593748", "0.65386784", "0.6518252", "0.6506654", "0.6451501", "0.6428408", "0.6406035", "0.6402578", "0.6388739", "0.6354129", "0.6329615", "0.6283767", "0.6224565", "0.61920696", "0.61789584", "0.61740637", "0.6161401", "0.6129992", "0.6126457", "0.6100461", "0.6096245", "0.6092464", "0.6088832", "0.6068531", "0.60584784", "0.6053062", "0.60506094", "0.6049843", "0.60467887", "0.6037386", "0.6024367", "0.6023967", "0.60206115", "0.6016975", "0.60099375", "0.6002361", "0.59966856", "0.5994848", "0.59879774", "0.59879375", "0.59621865", "0.5960044", "0.5956104", "0.59530234", "0.5941579", "0.59289217", "0.59184307", "0.591364", "0.58983016", "0.5860258", "0.5847287", "0.5839425", "0.5829724", "0.5826574", "0.579702", "0.5757566", "0.5738765", "0.5730321", "0.5730321", "0.5727039", "0.57255244", "0.5714176", "0.57054234", "0.56924194", "0.5689384", "0.5687", "0.5678116", "0.5674412", "0.56506807", "0.5650512", "0.5639232", "0.5637533", "0.56236374", "0.5609247", "0.5601521", "0.5600006", "0.5590344", "0.5589463", "0.55854523" ]
0.7425706
3
Asserts that the given quantity of bits is valid
public static function assertValidQuantityOfBits($quantityOfBits) { if ($quantityOfBits < 1) { throw new InvalidArgumentException('Invalid quantity of bits, should be >= 1'); } if ($quantityOfBits > 0x7d0) { throw new InvalidArgumentException('Invalid quantity of bits, should be <= 0x7d0'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testBitArray()\n {\n $array = new BitArray(19);\n for ($i = 0; $i < 19; $i++) {\n $this->assertEquals(0, $array[$i]);\n if ($i == 0 || ($i > 7 && $i < 18)) {\n $array[$i] = 1;\n } else {\n $array[$i] = 0;\n }\n }\n\n for ($i = 0; $i < 19; $i++) {\n if ($i == 0 || ($i > 7 && $i < 18)) {\n $this->assertEquals(1, $array[$i]);\n } else {\n $this->assertEquals(0, $array[$i]);\n }\n }\n\n //\tdouble-check the internal representation \n $vals = unpack(\"C*\", $array->getData());\n $this->assertEquals(1, $vals[1]);\n $this->assertEquals(255, $vals[2]);\n $this->assertEquals(3, $vals[3]);\n\n\n //\texercise the BitStreamReader and BitStreamWriter a bit\n $writer = new BitStreamWriter();\n foreach ($array as $bit) {\n $writer->writeBit($bit);\n }\n\n $reader = new BitStreamReader($writer->getData());\n foreach ($array as $bit) {\n $this->assertEquals($bit, $reader->readBit());\n }\n }", "public function testBinary(): void\n {\n $randomBytes = base64_decode('L3zw8k6jFccVGXr6mqci4Q=='); // random_bytes(16);\n\n $validator = new LengthValidator(16, 16);\n $result = $validator->validate($randomBytes);\n\n $this->assertFalse($result->isValid());\n\n $validator = new LengthValidator(1, 16, multibyte: false);\n $result = $validator->validate($randomBytes);\n\n $this->assertTrue($result->isValid());\n }", "public static function assertValidQuantityOfRegisters($quantityOfRegisters)\n {\n if ($quantityOfRegisters < 1) {\n throw new InvalidArgumentException('Invalid quantity of registers, should be >= 1');\n }\n\n if ($quantityOfRegisters > 0x7d) {\n throw new InvalidArgumentException('Invalid quantity of registers, should be <= 0x7d');\n }\n }", "public function testIsValidFailing()\n {\n $this->assertFalse($this->helper->isValid('s1', 15));\n $this->assertFalse($this->helper->isValid('s2', true));\n $this->assertFalse($this->helper->isValid('i1', 12.1));\n $this->assertFalse($this->helper->isValid('i2', 'eleven'));\n $this->assertFalse($this->helper->isValid('i3', 12.6));\n $this->assertFalse($this->helper->isValid('i4', -2));\n $this->assertFalse($this->helper->isValid('i5', 83));\n $this->assertFalse($this->helper->isValid('i6', false));\n $this->assertFalse($this->helper->isValid('f1', 12));\n $this->assertFalse($this->helper->isValid('f2', [12.67]));\n $this->assertFalse($this->helper->isValid('f3', 13.0));\n $this->assertFalse($this->helper->isValid('b', [true]));\n $this->assertFalse($this->helper->isValid('b', 0));\n $this->assertFalse($this->helper->isValid('a', 'blue'));\n $this->assertFalse($this->helper->isValid('m', 'true'));\n $this->assertFalse($this->helper->isValid('m', false));\n $this->assertFalse($this->helper->isValid('r', 'memb3rType'));\n }", "function test()\r\n {\r\n print_r($this->countBits(3));\r\n }", "public static function assertValidRegisterValue($value)\n {\n if ($value > 0xffff) {\n throw new InvalidArgumentException('Invalid register value, should be <= 0xffff');\n }\n }", "function validQty($qty)\n{\n return !empty($qty)\n && ctype_digit($qty)\n && $qty >= 1;\n}", "public function testRegistrationValuesTooShort(): void { }", "public function testIsValidException()\n\t{\n\t\t$data = $this->getMock('Blackbox_Data', array());\n\t\t$data->expects($this->never())->method('__set');\n\t\t$data->expects($this->never())->method('__unset');\n\n\t\t$this->target->isValid($data, $this->state_data);\n\t}", "public function testValidationCaseForInvalidGeneratorNumberForKeyExchangeGeneration()\n {\n $protocol = $this->getCryptographicProtocolForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $protocol->generateExchangeResponseInformation(bin2hex(decbin(17)), ['wrong']);\n } else {\n $hasThrown = null;\n\n try {\n $protocol->generateExchangeResponseInformation(bin2hex(decbin(17)), ['wrong']);\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "public function testValidationBytesUpperBounds()\n {\n $random = new Random($this->getValidator());\n\n $random->setBytes($this::MAX_BYTES + 1);\n\n $random->validate();\n }", "public function testRegistrationValuesContainNumbers(): void { }", "public function testValidationBytesLowerBounds()\n {\n $random = new Random($this->getValidator());\n\n $random->setBytes($this::MIN_BYTES - 1);\n\n $random->validate();\n }", "public function testInvalidLengthPassword()\n {\n $password = \"23d3\";\n $response = $this->user->isValidPassword($password);\n\n $this->assertFalse($response);\n }", "public function testValidation()\n {\n $req = new Request\\Ban('', []);\n self::assertFalse($req->isValid());\n\n $req = new Request\\Ban('', 'value');\n self::assertTrue($req->isValid());\n\n $req = new Request\\Ban('', ['value']);\n self::assertTrue($req->isValid());\n\n $req = new Request\\Ban('host', []);\n self::assertFalse($req->isValid());\n\n $req = new Request\\Ban('host', ['value']);\n self::assertTrue($req->isValid());\n }", "public function testNonsuppliedBitflagsAreLeftAlone()\n {\n $bit = new Formulaic\\Bitflag('superhero', [\n 'spidey' => 'Spiderman',\n 'hulk' => 'The Hulk',\n 'daredevil' => 'Daredevil',\n ]);\n $bit->setDefaultValue(['superman']);\n $bit->setValue(['hulk']);\n yield assert($bit->getValue()->hulk);\n yield assert(!isset($bit->getValue()->superman));\n }", "protected function validateUint($value) {\n if (preg_match(\"/^[0-9]+$/\", $value))\n return true;\n $this->setError(t(\"Invalid positive integer\"));\n return false;\n }", "public function testHexadecimal()\n {\n // Generate hex data with random length.\n $method = 'hex';\n $data = $this->getData($method);\n\n // Hex data should all be PHP strings.\n $this->assertContainsOnly('string', $data);\n\n // Check that all generated data represents hex digits.\n foreach ($data as $datum) {\n $this->assertTrue(ctype_xdigit($datum));\n }\n\n // Check that the correct bytes of data is produced.\n $i = $this::MIN_BYTES;\n while ($i <= $this::MAX_BYTES) {\n $value = $this->generateValue($method, $i);\n $value_bytes = strlen($value) / 2;\n $this->assertEquals($i, $value_bytes);\n $i++;\n }\n }", "public function testRandomRequirements ()\n {\n // Function parameters\n $length = 8;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 4,\n 'digit' => 3,\n 'upper' => 2,\n 'lower' => 1\n ];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A(?=(.*\\d){3})(?=(?:[^a-z]*[a-z]){1})(?=(?:[^A-Z]*[A-Z]){2})(?=(?:[0-9a-zA-Z]*[!#$%&*+,-.:;<=>?@_~]){4})[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{10,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }", "public function test_validate_withdraw_count()\n {\n $withdraw = $this->obj->validate_count(2);\n $resp = $this->obj->validate_withdraw_count();\n if($withdraw < 3){\n $this->assertTrue($resp);\n }else{\n $this->assertFalse($resp);\n }\n }", "public function testNumberOfBytes()\n {\n foreach(array(1, 2, 5, 9, 12, 20) as $numberOfBytes) {\n $bytes = RandomString::generateBytes($numberOfBytes);\n\n $this->assertEquals(\n strlen($bytes),\n $numberOfBytes,\n 'Number of bytes returned should be ' . $numberOfBytes\n );\n }\n }", "public function testStateValidatesCorrectly()\n {\n $this->assertTrue($this->state->validate(uniqid()));\n\n // Test again with a different value.\n $this->assertTrue($this->state->validate(uniqid()));\n }", "public function testValidationCaseForSettingAnInvalidKeyPairSizeForTheKeyExchangeGeneration()\n {\n $protocol = $this->getCryptographicProtocolForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $protocol->setKeyExchangeSize(200);\n } else {\n $hasThrown = null;\n\n try {\n $protocol->setKeyExchangeSize(200);\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "public function validIntegers() {}", "private function isValid(): bool\n {\n $this->generateChecksum();\n return (($this->luhnValue % $this->base == 0) && ($this->luhnValue != 0));\n }", "public function testValidLengthPassword()\n {\n $password = \"accepted\";\n\n $response = $this->user->isValidPassword($password);\n\n $this->assertTrue($response);\n }", "public function test_validate_withdraw()\n {\n $amount = 5000;\n $withdraw = $this->obj->validate_withdraw($amount);\n $this->assertLessThanOrEqual(20000,$amount);\n $this->assertTrue($withdraw);\n }", "protected function assertVarBinaryColumnIsValid(Table $table, string $columnName, int $expectedLength): void\n {\n $column = $table->getColumn($columnName);\n self::assertInstanceOf(BinaryType::class, $column->getType());\n self::assertSame($expectedLength, $column->getLength());\n }", "public function testGetType0()\n{\n\n $actual = $this->bitwiseOr->getType();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testInteger()\n {\n // Generate integer data.\n $data = $this->getData('integer', $this::INT_BYTES);\n\n // Integer data should all be native PHP integer type.\n $this->assertContainsOnly('integer', $data);\n\n // While it is *possible* that the integer 0 is legitimately generated in a\n // small test run (small relative to PHP_INT_MAX) it is much, much more\n // likely that seeing exactly 0 means \"infinity\" was generated by the system\n // trying to convert more bits than it can internally represent\n // (usually either 32 or 64) and then casting \"infinity\" to an integer,\n // which results in 0. Similarly, seeing the upper bounds in the data\n // probably means there's something bad going on.\n $this->assertNotContains(0, $data);\n $this->assertNotContains(PHP_INT_MAX, $data);\n }", "function _geneshop_qty_element_validate($element, &$form_state, $form) {\n if (!filter_var($element['#value'], FILTER_VALIDATE_INT) || $element['#value'] <= 0) {\n form_error($element, t('Incorrect value of qty'));\n }\n}", "public function assertValid()\n {\n }", "public function _assertStoreCartHasProductsWithMinimalQuantity()\n {\n }", "public function isValid(string $sequence);", "public function testRegistrationValuesTooLong(): void { }", "public function testGetMultipleInvalidTypeInteger(): void\n {\n $keyValuePairs = 978;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->getMultiple($keyValuePairs);\n }", "public function testGetOperatorSigil0()\n{\n\n $actual = $this->bitwiseOr->getOperatorSigil();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testValidateNumber(): void\n {\n $this->assertTrue($this->validate(1));\n }", "public function testEmptyParameter ()\n {\n $length = 8;\n $minPasswordRequirements = [];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{8,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }", "public function testValidationCaseForInvalidPrimeNumberForKeyExchangeGeneration()\n {\n $protocol = $this->getCryptographicProtocolForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $protocol->generateExchangeResponseInformation(['wrong'], bin2hex(decbin(2)));\n } else {\n $hasThrown = null;\n\n try {\n $protocol->generateExchangeResponseInformation(['wrong'], bin2hex(decbin(2)));\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "static public function validateBin(string $bin): bool\n {\n if (strlen($bin) !== 128) {\n trigger_error('Given binary string is not of length 128');\n return false;\n }\n\n // check if it is a string of only 0's and 1's\n /*var_dump($bin);\n if (!preg_match(\"/[^0,1]/\", trim($bin))) {\n trigger_error('Given binary string contains characters other than 0 or 1');\n return false;\n }*/\n return true;\n }", "function validSize($size)\n {\n return $size > 1;\n }", "public function isValid($number);", "public function testGetArrayNumbers()\n\t{\n\t\t$this->assertIsArray(ParityGame\\getArrayNumbers());\n\t\t$this->assertFalse(empty(ParityGame\\getArrayNumbers()));\n\t}", "public function testIsValidPassing()\n {\n $this->assertTrue($this->helper->isValid('s1', 'wala wala bing bang'));\n $this->assertTrue($this->helper->isValid('s2', 'wala wala bing bang'));\n $this->assertTrue($this->helper->isValid('i1', 12));\n $this->assertTrue($this->helper->isValid('i2', -11));\n $this->assertTrue($this->helper->isValid('i3', 116));\n $this->assertTrue($this->helper->isValid('i4', 916));\n $this->assertTrue($this->helper->isValid('i5', -83));\n $this->assertTrue($this->helper->isValid('i6', -99));\n $this->assertTrue($this->helper->isValid('f1', 12.53));\n $this->assertTrue($this->helper->isValid('f2', 1.5e5));\n $this->assertTrue($this->helper->isValid('f3', -22.79));\n $this->assertTrue($this->helper->isValid('b', true));\n $this->assertTrue($this->helper->isValid('b', false));\n $this->assertTrue($this->helper->isValid('a', [1, 2, 3]));\n $this->assertTrue($this->helper->isValid('m', true));\n $this->assertTrue($this->helper->isValid('m', 'false'));\n $this->assertTrue($this->helper->isValid('r', 'memberType'));\n }", "public function testWeird()\n {\n $bs = Buffer::hex('00000000000000000000');\n $b58 = Base58::encode($bs);\n $this->assertSame($b58, '1111111111');\n $this->assertEquals($bs, Base58::decode($b58));\n }", "public function testValidate0()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == false (line 378)\n // if (empty($value) && !is_numeric($value)) == false (line 389)\n // if (empty($domain) && !is_numeric($domain)) == false (line 397)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public static function isValidHexQuantity($str) {\n\n // Always ensure 0x prefix.\n if (!EthereumStatic::hasHexPrefix($str)) {\n return FALSE;\n }\n\n // Should always have at least one digit - zero is \"0x0\".\n if (strlen($str) < 3) {\n return FALSE;\n }\n return ctype_xdigit(self::removeHexPrefix($str));\n }", "public function testValidateFormFailure()\n {\n $formData = 10;\n $validation = GRUB\\Validator\\Validator::validateIngredient($formData);\n $expected = 10;\n $this->assertEquals($validation, $expected);\n }", "public function testInvalidVersionNumber(): void\n\t{\n\t\t$this->expectException(LycheeInvalidArgumentException::class);\n\t\tVersion::createFromInt(1000000);\n\t}", "public function invalidIntegers() {}", "protected function validateChecksum() {\n\t}", "public function testIsValidValid()\n {\n $this->uut->setConstraints([new MyConstraint()])->setValue(new ScalarValue('foo'));\n $this->assertTrue($this->uut->isValid());\n $this->assertFalse($this->uut->hasViolation());\n }", "public function testValidate3()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == true (line 378)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testNumber()\r\n {\r\n\r\n $testData = array(\r\n 'number' => '',\r\n 'number2' => '1337',\r\n 'number3' => 0x539,\r\n 'number4' => 02471,\r\n 'number5' => 0b10100111001,\r\n 'number6' => 1337e0,\r\n 'number7' => \"not numeric\",\r\n 'number8' => array(),\r\n 'number9' => 9.1\r\n );\r\n\r\n $validator = new Validator($testData);\r\n $validator->addRule('number', 'number', ['number']);\r\n $validator->addRule('number2', 'number2', ['required', 'number']);\r\n $validator->addRule('number3', 'number3', ['required', 'number']);\r\n $validator->addRule('number4', 'number4', ['required', 'number']);\r\n $validator->addRule('number5', 'number5', ['required', 'number']);\r\n $validator->addRule('number6', 'number6', ['required', 'number']);\r\n $validator->addRule('number7', 'number7', ['required', 'number']);\r\n $validator->addRule('number8', 'number8', ['required', 'number']);\r\n $validator->addRule('number9', 'number9', ['required', 'number']);\r\n\r\n $this->assertFalse($validator->validate());\r\n $this->assertFalse($validator->isValid());\r\n\r\n\r\n /** The field is not required, so it can be empty and contains no valid number */\r\n $this->assertFalse($validator->hasErrors('number'), $validator->getFieldError('number'));\r\n $this->assertFalse($validator->hasErrors('number2'), $validator->getFieldError('number2'));\r\n $this->assertFalse($validator->hasErrors('number3'), $validator->getFieldError('number3'));\r\n $this->assertFalse($validator->hasErrors('number4'), $validator->getFieldError('number4'));\r\n $this->assertFalse($validator->hasErrors('number5'), $validator->getFieldError('number5'));\r\n $this->assertFalse($validator->hasErrors('number6'), $validator->getFieldError('number6'));\r\n $this->assertTrue($validator->hasErrors('number7'), $validator->getFieldError('number7'));\r\n $this->assertTrue($validator->hasErrors('number8'), $validator->getFieldError('number8'));\r\n $this->assertFalse($validator->hasErrors('number9'), $validator->getFieldError('number9'));\r\n }", "function isSumEqual(string $input)\n{\n if (strlen($input) !== 6) {\n throw new invalidArgumentException('You should write 6 digits. Your input is ' . $input);\n } else {\n return (($input[0] + $input[1] + $input[2]) == ($input[3] + $input[4] + $input[5]));\n }\n}", "public function testGetSet() {\n $random = new Random($this->getValidator());\n\n // Ensure defaults are gettable.\n $this->assertEquals($random::DEFAULT_BYTES, $random->getBytes());\n\n // Set a \"random\" number of bytes and then check that we can get it.\n $random_bytes = rand($this::MIN_BYTES, $this::MAX_BYTES);\n $random->setBytes($random_bytes);\n $this->assertEquals($random_bytes, $random->getBytes());\n }", "public function testTooShort(): void\n {\n $validator = new LengthValidator(5);\n $result = $validator->validate('foo');\n\n $this->assertFalse($result->isValid());\n }", "public function testInvalid(): void\n {\n $validator = new ControlValidator();\n\n $this->assertFalse($validator->validate('arf12')->isValid());\n }", "public function test_validate_deposit_count()\n {\n $deposit = $this->obj->validate_count(1);\n $resp = $this->obj->validate_deposit_count();\n if($deposit < 4){\n $this->assertTrue($resp);\n }else{\n $this->assertFalse($resp);\n }\n }", "public function testGetErrorMessagesAfterFailure()\n {\n $validator = new Integer();\n $validator->isValid(\"23\");\n $this->assertCount(1, $validator->errors());\n }", "public static function ensure32BitInteger($value) {}", "public function testManySpecialCharacter ()\n {\n // Function parameters\n $length = 10;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 6,\n 'digit' => 1,\n 'upper' => 1,\n ];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A(?=(.*\\d){1})(?=(?:[^A-Z]*[A-Z]){1})(?=(?:[0-9a-zA-Z]*[!#$%&*+,-.:;<=>?@_~]){6})[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{10,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }", "public function testExample()\n {\n $this->assertTrue(True);\n $arr=[];\n $this->assertEmpty($arr);\n $msg=\"Hello\";\n $this->assertEquals('Hello',$msg);\n $n= random_int(0,100);\n $this->assertLessThan(100,$n);\n }", "public function testIsNotValid()\n {\n $validator = new Idun_Validate_Nand(array(\n new Zend_Validate_StringLength(7, 32),\n new Zend_Validate_EmailAddress\n ));\n \n $this->assertFalse($validator->isValid('[email protected]'));\n \n $this->assertArrayHasKey(\n Idun_Validate_Nand::ALL_CONDITIONS_TRUE,\n $validator->getMessages()\n );\n }", "public function testReturnTrueOnValidBitcoinAddress()\n {\n $result = Wallet::validate(self::VALID_BTC_ADDRESS, Wallet::BITCOIN);\n\n $this->assertTrue($result);\n }", "public function testValid(): void\n {\n $validator = new LengthValidator(5, 15);\n $result = $validator->validate('foo bár báz qux');\n\n $this->assertTrue($result->isValid());\n }", "public function testSetMultipleInvalidTypeInteger(): void\n {\n $keyValuePairs = 5;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->setMultiple($keyValuePairs);\n }", "public function testValidateZeroNumber(): void\n {\n $this->assertTrue($this->validate(0));\n }", "public function testValidateMinusOne(): void\n {\n $this->assertTrue($this->validate(-1));\n }", "private function validateShotNumber($shot)\n {\n if (!in_array($shot, array(1, 2, 3))) {\n throw new InvalidArgumentException(\"Shot can only be 1, 2 or 3.\");\n }\n }", "public static function assertValidAddress($address)\n {\n if ($address < 0x0000) {\n throw new InvalidArgumentException('Invalid address, should be >= 0x0000');\n }\n\n if ($address > 0xffff) {\n throw new InvalidArgumentException('Invalid address, should be <= 0xffff');\n }\n }", "public function testValidate2()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == false (line 378)\n // if (empty($value) && !is_numeric($value)) == true (line 389)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testValidationException()\n {\n $random = new Random($this->getValidatorStubFail());\n\n $random->validate();\n }", "public function testPasswordIsValid($data)\n {\n $pattern = \"/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }", "public function isValid()\n {\n $this->checkJMBG();\n\n $arr = @$this->explode();\n if (count($arr) <> 13) return false;\n foreach ($arr as $k => $v) $$k = (int)$v;\n\n $checksum = 11 - (7 * ($A + $G) + 6 * ($B + $H) + 5 * ($C + $I) + 4 * ($D + $J) + 3 * ($E + $K) + 2 * ($F + $L)) % 11;\n return ($checksum == $M);\n }", "public function test_validate_withdraw_limit()\n {\n $amount = 5000;\n $withdraw = $this->obj->validate_withdraw_limit($amount);\n $this->assertTrue($withdraw);\n }", "public function testCheckPassword()\n {\n $hasher = new PasswordHash(8, true);\n\n $testHash = '$P$BbD1flG/hKEkXd/LLBY.dp3xuD02MQ/';\n $testCorrectPassword = 'test123456!@#';\n $testIncorrectPassword = 'test123456!#$';\n\n $this->assertTrue($hasher->CheckPassword($testCorrectPassword, $testHash));\n $this->assertFalse($hasher->CheckPassword($testIncorrectPassword, $testHash));\n }", "public function testValidate1()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == false (line 378)\n // if (empty($value) && !is_numeric($value)) == false (line 389)\n // if (empty($domain) && !is_numeric($domain)) == true (line 397)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public function testNoParameter(): void\n {\n $ipv6netmask = new Ipv6netmask();\n $this->assertEquals(\"ffff:ffff:ffff:ffff:0:0:0:0\", $ipv6netmask->getHexa());\n $this->assertEquals(\n \"11111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000\",\n $ipv6netmask->getBinary()\n );\n $this->assertEquals(\n \"00000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111\",\n $ipv6netmask->getWildcard()\n );\n $this->assertEquals(128, strlen($ipv6netmask->getBinary()));\n $this->assertCount(8, $ipv6netmask->getAddressArray());\n $this->assertEquals(\"ffff\", $ipv6netmask->getAddressArray()[0]);\n $this->assertEquals(\"ffff\", $ipv6netmask->getAddressArray()[1]);\n $this->assertEquals(\"0\", $ipv6netmask->getAddressArray()[7]);\n }", "public function test_validation()\n\t{\n\t\tfor ($i = 1; $i <= 8; $i++) {\n\t\t\tlist(, $args) = $this->parse(\"test$i.xml\");\n\t\t\t$response = AFK_XmlRpc_Parser::serialise_response(\n\t\t\t\tcall_user_func_array(array($this, \"validate_$i\"), $args)\n\t\t\t);\n\t\t\t$expected = $this->load(\"test$i.response.xml\");\n\t\t\t$response = $this->format($response);\n\t\t\t$expected = $this->format($expected);\n\t\t\t$this->assertEquals($expected, $response);\n\t\t}\n\t}", "public function assertValid() : void\n {\n }", "public function assertValid() : void\n {\n }", "public function testValidationCaseForNonPositiveOutputLength()\n {\n $generator = $this->getTokenGeneratorForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\LengthException::class);\n\n $generator->getTokenString(0);\n } else {\n $hasThrown = null;\n\n try {\n $generator->getTokenString(0);\n } catch (\\LengthException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "public function testRegon7()\n{\n\n // Traversed conditions\n // for (...) == true (line 40)\n // for (...) == false (line 40)\n // for (...) == true (line 44)\n // for (...) == false (line 44)\n // if ($checksum == 10) == true (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function setNumBits($numBits) {}", "public function testPasswordIsNotValid($data)\n {\n $pattern = \"/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/\";\n \n\n $this->assertDoesNotMatchRegularExpression($pattern,$data);\n\n }", "public function testCheckAddress() {\n\t$this->assertTrue(Bitcoin::checkAddress(\"1pA14Ga5dtzA1fbeFRS74Ri32dQjkdKe5\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1MU97wyf7msCVdaapneW2dW1uXP7oEQsFA\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1F417eczAAbh41V4oLGNf3DqXLY72hsM73\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1ASgNrpNNejRJVfqK2jHmfJ3ZQnMSUJkwJ\"));\n\t$this->assertFalse(Bitcoin::checkAddress(\"1ASgNrpNNejRJVfqK2jHmfJ3ZQnMSUJ\"));\n\t$this->assertFalse(Bitcoin::checkAddress(\"1111111fnord\"));\n\t}", "public function testRegon0()\n{\n\n // Traversed conditions\n // for (...) == false (line 40)\n // for (...) == false (line 44)\n // if ($checksum == 10) == false (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testGetErrorMessagesAfterValidationFailure()\n {\n $this->validator->isValid(-211);\n $this->assertCount(1, $this->validator->errors());\n }", "private function checkSuffix(int $bits, int $version): int\n {\n $versions = [4 => 32, 6 => 128];\n $maxBits = $versions[$version];\n\n if (empty($bits)) {\n throw new InvalidArgumentException('Range must be in valid IP/CIDR format, empty bits for suffix.');\n }\n\n if ((int) $bits < 1 || (int) $bits > $maxBits) {\n throw new InvalidArgumentException('Range must be in valid IP/CIDR format, invalid bits suffix range.');\n }\n\n return $bits;\n }", "public function testGetMultipleInvalidTypeBoolean(): void\n {\n $keyValuePairs = true;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->getMultiple($keyValuePairs);\n }", "public function testRegon6()\n{\n\n // Traversed conditions\n // for (...) == true (line 40)\n // for (...) == false (line 40)\n // for (...) == true (line 44)\n // for (...) == false (line 44)\n // if ($checksum == 10) == false (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testConstructorLength()\n {\n $rule = new OrRule(\n new FalseRule(),\n new TrueRule()\n );\n $this->assertTrue($rule->validate());\n }", "public static function testTypes($bits = self::INFO) {\n return $bits & self::$mode;\n }", "public function testErrorIsThrownWhenPlainPasswordIsPassedWithHashFlagEnabled()\n {\n $this->expectException(\\InvalidArgumentException::class);\n $hibp = HibpFactory::createTestClient([]);\n $password = 'foo';\n $hibp->isPwnedPassword($password, true);\n $this->fail('Expected Exception Was Not thrown for providing a plain text password with hash flag on');\n }", "public function testIsValid() {\n\n\n\n }", "abstract public function isValid();", "abstract public function isValid();" ]
[ "0.61510164", "0.60687387", "0.57213634", "0.5700703", "0.56383836", "0.5460097", "0.5394237", "0.5367398", "0.53535885", "0.53521085", "0.53506017", "0.5327079", "0.5305128", "0.5290436", "0.52713686", "0.5266541", "0.52328056", "0.5227709", "0.52213705", "0.5207892", "0.52016467", "0.51886594", "0.5182076", "0.5181623", "0.51726437", "0.51705474", "0.5168421", "0.5158037", "0.5155485", "0.5139114", "0.5130603", "0.5128268", "0.51167935", "0.5108265", "0.5088634", "0.50848", "0.5072181", "0.50619787", "0.50601655", "0.5039764", "0.5038523", "0.5035426", "0.50349396", "0.5019629", "0.5019626", "0.5014895", "0.5014489", "0.5007784", "0.5003372", "0.4999076", "0.49954295", "0.49830467", "0.49822575", "0.49817428", "0.49760553", "0.4968565", "0.49564797", "0.4952453", "0.49446622", "0.49415463", "0.4938733", "0.49294877", "0.49258637", "0.49208695", "0.49136522", "0.4910791", "0.49045166", "0.49013072", "0.48955637", "0.48930532", "0.48930484", "0.48876154", "0.4887159", "0.48764873", "0.48720905", "0.4845113", "0.48355788", "0.48349735", "0.48338062", "0.4830382", "0.4812312", "0.48093665", "0.48074102", "0.48074102", "0.48046157", "0.48036683", "0.47771993", "0.47692204", "0.47657233", "0.47639617", "0.47622547", "0.47620252", "0.47618747", "0.47591916", "0.47587475", "0.47547135", "0.47492674", "0.47454062", "0.47434685", "0.47434685" ]
0.7590083
0
Asserts that the given quantity of registers is valid
public static function assertValidQuantityOfRegisters($quantityOfRegisters) { if ($quantityOfRegisters < 1) { throw new InvalidArgumentException('Invalid quantity of registers, should be >= 1'); } if ($quantityOfRegisters > 0x7d) { throw new InvalidArgumentException('Invalid quantity of registers, should be <= 0x7d'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRegistrationValuesTooShort(): void { }", "public function testRegistrationValuesContainNumbers(): void { }", "public function testRegistrationValuesTooLong(): void { }", "public function testCheckIfAllRegisterFieldsHaveInputAndError()\n {\n $validate = new Validate();\n $_POST['username'] = 'Alexander';\n $_POST['password'] = '123';\n\n $validate->check($_POST, array(\n 'username' => array(\n 'required' => true,\n 'unique' => 'users',\n ),\n 'email' => array(\n 'required' => true,\n 'email' => true,\n ),\n 'password' => array(\n 'required' => true,\n ),\n 're-password' => array(\n 'required' => true,\n 'matches' => 'password',\n ),\n ));\n\n $this->assertEquals('Username is already taken', $validate->error());\n }", "public static function assertValidQuantityOfBits($quantityOfBits)\n {\n if ($quantityOfBits < 1) {\n throw new InvalidArgumentException('Invalid quantity of bits, should be >= 1');\n }\n\n if ($quantityOfBits > 0x7d0) {\n throw new InvalidArgumentException('Invalid quantity of bits, should be <= 0x7d0');\n }\n }", "public function testCountRegioes()\n {\n $this->assertCount(5, UF::$REGIOES);\n }", "public function user_cannot_register_with_invalid_details() :void\n {\n $this->browse(function (Browser $browser) {\n\n\t $user1= factory(User::class)->make([\n\t \t'first_name'=> 'al',\n\t\t 'last_name' => str_repeat('Number of times the input string should be repeated',15),\n\t\t 'username' => 'al',\n\t\t 'email' => 'h@',\n\t\t 'password' => 'secret'\n\t ]);\n\n $browser->visit('/')\n // ->click('#accountDropdown')\n ->clickLink('Account')\n ->click('#nav-register')\n ->assertSee('Register');\n\n\t $this->submitForm($browser,\n\t\t [\n\t\t\t ['field_name'=>'first_name', 'field_value' =>$user1->first_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'last_name', 'field_value' =>$user1->last_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'username', 'field_value' =>$user1->username, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'email', 'field_value' =>$user1->email, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password', 'field_value' =>$user1->password, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password_confirmation', 'field_value' =>ucfirst($user1->password), 'field_type'=> 'text']\n\t\t ]\n\t );\n//\t\t\tdie($user1->last_name);\n //Assertion not written\n $browser->assertpathIs('/register')\n\t ->assertSeeIn('#registerForm div:nth-child(2) .invalid-feedback-content','The first name must be at least 3 characters.')\n\t ->assertSeeIn('#registerForm div:nth-child(3) .invalid-feedback-content','The last name may not be greater than 255 characters.')\n\t ->assertSeeIn('#registerForm div:nth-child(4) .invalid-feedback-content','The username must be at least 3 characters.')\n\t ->assertSeeIn('#registerForm div:nth-child(5) .invalid-feedback','The email must be a valid email address.')\n\t ->assertSeeIn('#registerForm div:nth-child(6) .invalid-feedback-content', 'The password confirmation does not match.')\n ->clickLink('Account')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'Sign Up');\n });\n }", "public function testApiRegistrationValidation()\n {\n $notUnique = $this->getTestRegisterData(false, 5);\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $notUnique);\n\n $response->assertStatus(422);\n $errors = collect($response->decodeResponseJson()->json('errors'));\n $this->assertEquals(2, count($errors));\n $this->assertTrue($errors->has('password'));\n $this->assertTrue($errors->has('email'));\n }", "public static function assertValidRegisterValue($value)\n {\n if ($value > 0xffff) {\n throw new InvalidArgumentException('Invalid register value, should be <= 0xffff');\n }\n }", "public function testValidateFormFailure()\n {\n $formData = 10;\n $validation = GRUB\\Validator\\Validator::validateIngredient($formData);\n $expected = 10;\n $this->assertEquals($validation, $expected);\n }", "public function assertValid()\n {\n }", "public function testIsValidFailing()\n {\n $this->assertFalse($this->helper->isValid('s1', 15));\n $this->assertFalse($this->helper->isValid('s2', true));\n $this->assertFalse($this->helper->isValid('i1', 12.1));\n $this->assertFalse($this->helper->isValid('i2', 'eleven'));\n $this->assertFalse($this->helper->isValid('i3', 12.6));\n $this->assertFalse($this->helper->isValid('i4', -2));\n $this->assertFalse($this->helper->isValid('i5', 83));\n $this->assertFalse($this->helper->isValid('i6', false));\n $this->assertFalse($this->helper->isValid('f1', 12));\n $this->assertFalse($this->helper->isValid('f2', [12.67]));\n $this->assertFalse($this->helper->isValid('f3', 13.0));\n $this->assertFalse($this->helper->isValid('b', [true]));\n $this->assertFalse($this->helper->isValid('b', 0));\n $this->assertFalse($this->helper->isValid('a', 'blue'));\n $this->assertFalse($this->helper->isValid('m', 'true'));\n $this->assertFalse($this->helper->isValid('m', false));\n $this->assertFalse($this->helper->isValid('r', 'memb3rType'));\n }", "protected function checkRegistry()\n {\n foreach ($this->getExpectedClassrooms() as $classId => $classroom) {\n $this->assertTrue(\n $this->registry->offsetExists($classId),\n sprintf('Parser did not add class room \"%s\" to registry', $classId)\n );\n\n $this->assertEquals(\n $classroom,\n $this->registry->offsetGet($classId),\n sprintf('Parser created invalid class room for class \"%s\"', $classId)\n );\n }\n }", "public function test_validation()\n\t{\n\t\tfor ($i = 1; $i <= 8; $i++) {\n\t\t\tlist(, $args) = $this->parse(\"test$i.xml\");\n\t\t\t$response = AFK_XmlRpc_Parser::serialise_response(\n\t\t\t\tcall_user_func_array(array($this, \"validate_$i\"), $args)\n\t\t\t);\n\t\t\t$expected = $this->load(\"test$i.response.xml\");\n\t\t\t$response = $this->format($response);\n\t\t\t$expected = $this->format($expected);\n\t\t\t$this->assertEquals($expected, $response);\n\t\t}\n\t}", "public function testValidateFormMalformed()\n {\n $formData = ['jelly'];\n $this->expectException(TypeError::class);\n $case = GRUB\\Validator\\Validator::validateIngredient($formData);\n }", "public function testRegistrationIsSuccessfulWithValidInputs()\n {\n $this->output->writeln('Running testRegistrationIsSuccessfulWithValidInputs...');\n\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->type('name', 'John Smith')\n ->type('email', '[email protected]')\n ->type('password', 'secret')\n ->type('password_confirmation', 'secret')\n ->press('Register')\n ->assertPathIs('/home');\n });\n }", "public function testRegon7()\n{\n\n // Traversed conditions\n // for (...) == true (line 40)\n // for (...) == false (line 40)\n // for (...) == true (line 44)\n // for (...) == false (line 44)\n // if ($checksum == 10) == true (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegon5()\n{\n\n // Traversed conditions\n // for (...) == true (line 40)\n // for (...) == false (line 40)\n // for (...) == false (line 44)\n // if ($checksum == 10) == true (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegon4()\n{\n\n // Traversed conditions\n // for (...) == true (line 40)\n // for (...) == false (line 40)\n // for (...) == false (line 44)\n // if ($checksum == 10) == false (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegon0()\n{\n\n // Traversed conditions\n // for (...) == false (line 40)\n // for (...) == false (line 44)\n // if ($checksum == 10) == false (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegon3()\n{\n\n // Traversed conditions\n // for (...) == false (line 40)\n // for (...) == true (line 44)\n // for (...) == false (line 44)\n // if ($checksum == 10) == true (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function assertValid() : void\n {\n }", "public function assertValid() : void\n {\n }", "private static function assertCreateValidations(array $input)\n {\n // Verify that rut is correct\n if (!self::validateRut((int)$input['rut'], $input['rut_dv']))\n {\n throw new InvalidParametersException(['rut' => 'The rut is not valid']);\n }\n\n // Verify that you have not associated a rut for the same custoumer\n /*if (Account::where('customer_id', $input['customer_id'])->where('rut', $input['rut'])->first())\n {\n throw new ResourceAlreadyExistsException(\"rut \" . $input['rut'] . $input['rut_dv'], ['rut' => 'Rut must be unique']);\n }*/\n\n // Verify that there is no other account with the same email\n if (Account::where('email', $input['email'])->first())\n {\n throw new ResourceAlreadyExistsException(\"email \" . $input['email'], ['email' => 'Email must be unique']);\n }\n }", "public function testRegon6()\n{\n\n // Traversed conditions\n // for (...) == true (line 40)\n // for (...) == false (line 40)\n // for (...) == true (line 44)\n // for (...) == false (line 44)\n // if ($checksum == 10) == false (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testNumber()\r\n {\r\n\r\n $testData = array(\r\n 'number' => '',\r\n 'number2' => '1337',\r\n 'number3' => 0x539,\r\n 'number4' => 02471,\r\n 'number5' => 0b10100111001,\r\n 'number6' => 1337e0,\r\n 'number7' => \"not numeric\",\r\n 'number8' => array(),\r\n 'number9' => 9.1\r\n );\r\n\r\n $validator = new Validator($testData);\r\n $validator->addRule('number', 'number', ['number']);\r\n $validator->addRule('number2', 'number2', ['required', 'number']);\r\n $validator->addRule('number3', 'number3', ['required', 'number']);\r\n $validator->addRule('number4', 'number4', ['required', 'number']);\r\n $validator->addRule('number5', 'number5', ['required', 'number']);\r\n $validator->addRule('number6', 'number6', ['required', 'number']);\r\n $validator->addRule('number7', 'number7', ['required', 'number']);\r\n $validator->addRule('number8', 'number8', ['required', 'number']);\r\n $validator->addRule('number9', 'number9', ['required', 'number']);\r\n\r\n $this->assertFalse($validator->validate());\r\n $this->assertFalse($validator->isValid());\r\n\r\n\r\n /** The field is not required, so it can be empty and contains no valid number */\r\n $this->assertFalse($validator->hasErrors('number'), $validator->getFieldError('number'));\r\n $this->assertFalse($validator->hasErrors('number2'), $validator->getFieldError('number2'));\r\n $this->assertFalse($validator->hasErrors('number3'), $validator->getFieldError('number3'));\r\n $this->assertFalse($validator->hasErrors('number4'), $validator->getFieldError('number4'));\r\n $this->assertFalse($validator->hasErrors('number5'), $validator->getFieldError('number5'));\r\n $this->assertFalse($validator->hasErrors('number6'), $validator->getFieldError('number6'));\r\n $this->assertTrue($validator->hasErrors('number7'), $validator->getFieldError('number7'));\r\n $this->assertTrue($validator->hasErrors('number8'), $validator->getFieldError('number8'));\r\n $this->assertFalse($validator->hasErrors('number9'), $validator->getFieldError('number9'));\r\n }", "public function testGetMultipleInvalidTypeInteger(): void\n {\n $keyValuePairs = 978;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->getMultiple($keyValuePairs);\n }", "public function testRegon1()\n{\n\n // Traversed conditions\n // for (...) == false (line 40)\n // for (...) == false (line 44)\n // if ($checksum == 10) == true (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function _assertStoreCartHasProductsWithMinimalQuantity()\n {\n }", "public function testInvalidAllOf() {\n $this->expectException(ParseException::class);\n $schema = new Schema(['$ref' => '#/components/schemas/Invalid1'], $this->lookup);\n $valid = $schema->validate(['type' => 'Invalid1']);\n }", "function validQty($qty)\n{\n return !empty($qty)\n && ctype_digit($qty)\n && $qty >= 1;\n}", "protected function validateExpressions()\n {\n if ( $this->expression_starts != $this->expression_ends ) {\n throw new \\Exception( \"Number of expression 'starts' and 'ends' does not match. starts = {$this->expression_starts}; ends = {$this->expression_ends}\" );\n }\n }", "public function testRegon2()\n{\n\n // Traversed conditions\n // for (...) == false (line 40)\n // for (...) == true (line 44)\n // for (...) == false (line 44)\n // if ($checksum == 10) == false (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testIsValidValid()\n {\n $this->uut->setConstraints([new MyConstraint()])->setValue(new ScalarValue('foo'));\n $this->assertTrue($this->uut->isValid());\n $this->assertFalse($this->uut->hasViolation());\n }", "public function testGetErrorMessagesAfterFailure()\n {\n $validator = new Integer();\n $validator->isValid(\"23\");\n $this->assertCount(1, $validator->errors());\n }", "public function testValidateNumber(): void\n {\n $this->assertTrue($this->validate(1));\n }", "public function testRegisterValuesWeightZero()\n {\n $this->expectException(InvalidArgumentException::class);\n\n $this->generator->registerValues(['test' => 0]);\n }", "public function test_validate_withdraw_count()\n {\n $withdraw = $this->obj->validate_count(2);\n $resp = $this->obj->validate_withdraw_count();\n if($withdraw < 3){\n $this->assertTrue($resp);\n }else{\n $this->assertFalse($resp);\n }\n }", "public function testStateValidatesCorrectly()\n {\n $this->assertTrue($this->state->validate(uniqid()));\n\n // Test again with a different value.\n $this->assertTrue($this->state->validate(uniqid()));\n }", "public function testIsValidException()\n\t{\n\t\t$data = $this->getMock('Blackbox_Data', array());\n\t\t$data->expects($this->never())->method('__set');\n\t\t$data->expects($this->never())->method('__unset');\n\n\t\t$this->target->isValid($data, $this->state_data);\n\t}", "private function validate_regions(){\n\n for ($row = 0; $row < 9; $row += 3) {\n for ($col = 0; $col < 9; $col += 3) {\n\n // validate each 3x3 region\n if (!$this->validate_region($row, $col)) {\n return false;\n }\n }\n }\n return true;\n }", "public function test_validate_deposit_count()\n {\n $deposit = $this->obj->validate_count(1);\n $resp = $this->obj->validate_deposit_count();\n if($deposit < 4){\n $this->assertTrue($resp);\n }else{\n $this->assertFalse($resp);\n }\n }", "public function testMaxLength(){\n \t/*\n \t * Visit the registration page and enter fields that are too long\n \t */\n \t$this->visit('/register')\n \t\t->see('E-Mail Address');\n \t\n \t/*\n \t * Confirm the error text when submitting oversized data\n \t */\n \t$clearpass = str_random(7);\n \t$name = str_random(256);\n \t$this->type($name , 'name')\n \t\t->type(str_random(256) . '@example.com', 'email')\n \t\t->type($clearpass, 'password')\n \t\t->type($clearpass, 'password_confirmation')\n \t\t->press('Register')\n \t\t->see('The name may not be greater than 255 characters.')\n \t\t->see('The email must be a valid email address.')\n \t\t->see('The email may not be greater than 255 characters.')\n \t\t->assertTrue(App\\User::where('name', $name)->get()->isEmpty());\n \t\n \t/*\n \t * Confirm the error session keys when explicitly posting the registration form\n \t */\n \t\t \n \t$this->post('/register', [\n \t\t\t'name' => $name, \n \t\t\t'email' => str_random(256) . '@example.com', \n \t\t\t'password' => $clearpass, \n \t\t\t'password_confirmation' => $clearpass, \n \t\t\t'_token' => csrf_token()\n \t\t])\n \t\t->assertRedirectedTo('/register')\n \t\t->assertSessionHasErrors(['name', 'email']);\n \t\n \t$this->assertTrue(App\\User::where('name', $name)->get()->isEmpty());\n }", "public function testRegonLocal7()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == true (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegistrationFieldsWrongType(): void { }", "public function testRegonLocal4()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegisterValues()\n {\n $values = ['foobar' => 10, 'foo' => 20, 'bar' => 30];\n $this->generator->registerValues($values);\n\n foreach ($this->generator->getWeightedValues() as $weightedValue)\n {\n $this->assertArrayHasKey($weightedValue->getValue(), $values);\n $this->assertEquals($values[$weightedValue->getValue()], $weightedValue->getWeight());\n }\n }", "public function testWorks()\n {\n $exception = IncorrectNumberOfParametersException::wrongNumber(\n self::class,\n 3,\n 4\n );\n\n $expected_message = sprintf(\n Messages::INCORRECT_NUMBER_OF_PARAMETERS,\n self::class,\n 3,\n 4\n );\n\n $this->assertSame(\n $expected_message,\n $exception->getMessage()\n );\n }", "public function testSetMultipleInvalidTypeInteger(): void\n {\n $keyValuePairs = 5;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->setMultiple($keyValuePairs);\n }", "public function testGetRequisitionListItemsWithValidationErrors()\n {\n $requisitionListId = 1;\n $websiteId = 1;\n\n $validationError = 'Item validation error';\n $this->request->expects($this->once())\n ->method('getParam')->with('requisition_id')->willReturn($requisitionListId);\n $requisitionListItems = [\n $this->getMockBuilder(\\Magento\\RequisitionList\\Api\\Data\\RequisitionListItemInterface::class)\n ->setMethods(['getSku', 'setProduct', 'setNoProduct', 'setItemError', 'getItemError'])\n ->disableOriginalConstructor()->getMockForAbstractClass(),\n $this->getMockBuilder(\\Magento\\RequisitionList\\Api\\Data\\RequisitionListItemInterface::class)\n ->setMethods(['getSku', 'setProduct', 'setNoProduct', 'setItemError', 'getItemError'])\n ->disableOriginalConstructor()->getMockForAbstractClass(),\n $this->getMockBuilder(\\Magento\\RequisitionList\\Api\\Data\\RequisitionListItemInterface::class)\n ->setMethods(['getSku', 'setProduct', 'setNoProduct', 'setItemError', 'getItemError'])\n ->disableOriginalConstructor()->getMockForAbstractClass()\n ];\n $this->itemSelector->expects($this->atLeastOnce())->method('selectAllItemsFromRequisitionList')\n ->with($requisitionListId, $websiteId)->willReturn($requisitionListItems);\n $websiteMock = $this->getMockBuilder(\\Magento\\Store\\Api\\Data\\WebsiteInterface::class)\n ->disableOriginalConstructor()->setMethods(['getId'])->getMockForAbstractClass();\n $this->storeManager->expects($this->atLeastOnce())->method('getWebsite')->willReturn($websiteMock);\n $websiteMock->expects($this->atLeastOnce())->method('getId')->willReturn($websiteId);\n $this->validation->expects($this->at(0))->method('validate')->with($requisitionListItems[0])->willReturn([]);\n $this->validation->expects($this->at(1))\n ->method('validate')->with($requisitionListItems[1])->willReturn([$validationError]);\n $this->validation->expects($this->at(2))->method('validate')->with($requisitionListItems[2])\n ->willThrowException(new \\Magento\\Framework\\Exception\\NoSuchEntityException());\n $requisitionListItems[0]->expects($this->atLeastOnce())->method('getId')->willReturn(10);\n $requisitionListItems[1]->expects($this->atLeastOnce())->method('getId')->willReturn(11);\n $requisitionListItems[2]->expects($this->atLeastOnce())->method('getId')->willReturn(12);\n $this->assertSame(\n [2 => $requisitionListItems[2], 1 => $requisitionListItems[1], 0 => $requisitionListItems[0]],\n $this->grid->getRequisitionListItems()\n );\n $this->assertEquals(2, $this->grid->getItemErrorCount());\n $this->assertEquals([], $this->grid->getItemErrors($requisitionListItems[0]));\n $this->assertEquals([$validationError], $this->grid->getItemErrors($requisitionListItems[1]));\n $this->assertEquals(\n [__('The SKU was not found in the catalog.')],\n $this->grid->getItemErrors($requisitionListItems[2])\n );\n }", "public function testRegonLocal5()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == false (line 69)\n // if ($checksum == 10) == true (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testValidationException()\n {\n $random = new Random($this->getValidatorStubFail());\n\n $random->validate();\n }", "public function testRegonLocal0()\n{\n\n // Traversed conditions\n // for (...) == false (line 65)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "protected function checkValidity(array $params)\n\t{\n $this->count($params, 1);\n $this->isDirect($params[0], 0);\n }", "public function testRegonLocal3()\n{\n\n // Traversed conditions\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == true (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegonLocal6()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testCreditCardIsValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }", "private function validate() {\n $this->valid = (1 === count($this->marriages));\n }", "public function testGetErrorMessagesAfterValidationFailure()\n {\n $this->validator->isValid(-211);\n $this->assertCount(1, $this->validator->errors());\n }", "public function testInvalid(): void\n {\n $validator = new ControlValidator();\n\n $this->assertFalse($validator->validate('arf12')->isValid());\n }", "public function test_validate_withdraw()\n {\n $amount = 5000;\n $withdraw = $this->obj->validate_withdraw($amount);\n $this->assertLessThanOrEqual(20000,$amount);\n $this->assertTrue($withdraw);\n }", "public function testRegonLocal1()\n{\n\n // Traversed conditions\n // for (...) == false (line 65)\n // for (...) == false (line 69)\n // if ($checksum == 10) == true (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testIsValidPassing()\n {\n $this->assertTrue($this->helper->isValid('s1', 'wala wala bing bang'));\n $this->assertTrue($this->helper->isValid('s2', 'wala wala bing bang'));\n $this->assertTrue($this->helper->isValid('i1', 12));\n $this->assertTrue($this->helper->isValid('i2', -11));\n $this->assertTrue($this->helper->isValid('i3', 116));\n $this->assertTrue($this->helper->isValid('i4', 916));\n $this->assertTrue($this->helper->isValid('i5', -83));\n $this->assertTrue($this->helper->isValid('i6', -99));\n $this->assertTrue($this->helper->isValid('f1', 12.53));\n $this->assertTrue($this->helper->isValid('f2', 1.5e5));\n $this->assertTrue($this->helper->isValid('f3', -22.79));\n $this->assertTrue($this->helper->isValid('b', true));\n $this->assertTrue($this->helper->isValid('b', false));\n $this->assertTrue($this->helper->isValid('a', [1, 2, 3]));\n $this->assertTrue($this->helper->isValid('m', true));\n $this->assertTrue($this->helper->isValid('m', 'false'));\n $this->assertTrue($this->helper->isValid('r', 'memberType'));\n }", "public function testValidateSucceed()\n\t{\n\t\t$this->assertTrue(ArrayQuery::validate('test,valid'));\n\t}", "public function validIntegers() {}", "public function testRegistrationFieldsMissing(): void { }", "public function test_should_give_error_for_enter_invalid_data_in_inputs_when_creating_a_group_setup()\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('@program-type-setup-allocation')\n ->type('@program-type-setup-allocation', str_random(3))\n ->type('@program-type-setup-date-shift', str_random(3))\n ->type('@program-type-setup-cpl', str_random(3))\n ->driver->executeScript('window.scrollTo(0, 500);');\n $browser->waitFor('@program-type-setup-immediate')\n ->check('@program-type-setup-immediate')\n ->type('@program-type-setup-days', str_random(3))\n ->assertSee('The allocation field may only contain numeric characters.')\n ->assertSee('The date shift field may only contain numeric characters.')\n ->assertSee('The cpl field must be numeric and may contain decimal points.')\n ->assertSee('The pacing days field may only contain numeric characters.');\n });\n }", "public function test_that_a_new_user_cannot_register_with_invalid_information()\n {\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->type('name', 'Ben Gates')\n ->type('email', 'ben@')\n ->type('password', 'password')\n ->type('password_confirmation', 'password')\n ->type('description', 'This is just a short description about Ben Gates')\n ->press('Register')\n ->screenshot('register')\n ->assertPathIs('/register');\n });\n }", "public function testRegister()\n {\n// $user->register(20,5);\n//\n// $this->assertEquals(25, $user->register(20, 5));\n\n// $this->assertEqual();\n// $this->assertNull();\n// $this->assertTrue($this->setUp());\n// $this->assertNan();\n// $this->assertLessThanOrEqual();\n// $this->assertClassHasAttribute();\n// $this->assertContains();\n// $this->assertIsWritable();\n }", "public function testRegisterValue()\n {\n $values = [\n 123,\n '123',\n [1,2,3],\n new stdClass(),\n false,\n null\n ];\n\n // Mock random number generator to return 1,2,3,4\n $mockRandomNumberGenerator = $this->createPartialMock(\\stdClass::class, ['__invoke']);\n $mockRandomNumberGenerator->method('__invoke')\n ->withAnyParameters()\n ->will($this->onConsecutiveCalls(...range(1,count($values))));\n\n $this->generator->setRandomNumberGenerator($mockRandomNumberGenerator);\n\n foreach ($values as $value)\n {\n $this->generator->registerValue($value);\n }\n\n $sample = iterator_to_array($this->generator->generateMultipleWithoutDuplicates(count($values)));\n $this->assertEquals($values, $sample);\n }", "public function invalidIntegers() {}", "public function testValidateMinusOne(): void\n {\n $this->assertTrue($this->validate(-1));\n }", "public function testRegonLocal2()\n{\n\n // Traversed conditions\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function test_address_region_validation()\n {\n /*\n * Valid\n */\n $validRegionLocation = Location::factory()->make([\n 'addressRegion' => 'Greater Manchester',\n ]);\n $validRegionData = $validRegionLocation->toArray();\n $this->post($this->route(), $validRegionData)->assertStatus(201);\n\n /**\n * Invalid: not a string\n */\n $nonStringLocation = Location::factory()->make([\n 'addressRegion' => ['invalid'],\n ]);\n $nonStringData = $nonStringLocation->toArray();\n\n $response = $this->post($this->route(), $nonStringData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.addressRegion', 'The address region must be a string.');\n }", "public function testRegistrationPasswordOnlyNumbers(): void { }", "private function validateShotNumber($shot)\n {\n if (!in_array($shot, array(1, 2, 3))) {\n throw new InvalidArgumentException(\"Shot can only be 1, 2 or 3.\");\n }\n }", "public function testGetArrayNumbers()\n\t{\n\t\t$this->assertIsArray(ParityGame\\getArrayNumbers());\n\t\t$this->assertFalse(empty(ParityGame\\getArrayNumbers()));\n\t}", "public function test_with_invalid_number_drain()\n {\n $this->artisan('play:game')\n ->expectsQuestion('Enter A team players:', '18,20,50,40')\n ->expectsQuestion('Enter B team players:', '35, 10, 30, 20, 90')\n ->expectsOutput(\"Match can not play 5 players allowed each team\")\n ->assertExitCode(0);\n }", "public function assertValid()\n {\n $validator = $this->makeValidator();\n\n if ($validator->fails()) {\n $this->throwValidationException($validator);\n }\n }", "public function testValidateFails()\n\t{\n\t\t$this->assertFalse(ArrayQuery::validate('testInvalid'));\n\t}", "function testRegisterValidationFail() {\r\n $this->User = new User();\r\n \r\n \r\n //existing username\r\n $save = array();\r\n $save['User']['username'] = 'username';\r\n $save['User']['password'] = 'pass';\r\n $save['User']['email'] = '[email protected]';\r\n $save['User']['agb'] = 1;\r\n $result = $this->User->save($save);\r\n $this->assertFalse($result);\r\n \r\n //check if the expected fields are invalidated\r\n\t\t$fields = $this->_getInvalidFields($this->User);\r\n\t\t$this->assertTrue(in_array('username', $fields));\r\n\t\t\r\n\t\t\r\n //existing email\r\n $save = array();\r\n $save['User']['username'] = 'usernamenotexists';\r\n $save['User']['password'] = 'pass';\r\n $save['User']['email'] = '[email protected]';\r\n $save['User']['agb'] = 1;\r\n $result = $this->User->save($save);\r\n $this->assertFalse($result);\r\n \r\n //check if the expected fields are invalidated\r\n\t\t$fields = $this->_getInvalidFields($this->User);\r\n\t\t$this->assertTrue(in_array('username', $fields));\r\n \r\n \r\n //invalid username, invalid email, valid pass\r\n $save = array();\r\n $save['User']['username'] = '&%§\"jljl';\r\n $save['User']['password'] = 'pass';\r\n $save['User']['email'] = 'email';\r\n $save['User']['agb'] = 1;\r\n $result = $this->User->save($save);\r\n $this->assertFalse($result);\r\n \r\n //check if the expected fields are invalidated\r\n\t\t$fields = $this->_getInvalidFields($this->User);\r\n\t\t$this->assertTrue(in_array('username', $fields) && in_array('email', $fields));\r\n\r\n\r\n\t\t//valid username, valid email, invalid pass\r\n $save = array();\r\n $save['User']['username'] = 'valdiusername';\r\n $save['User']['password'] = 't'; //too short\r\n $save['User']['email'] = '[email protected]';\r\n $save['User']['agb'] = 1;\r\n $result = $this->User->save($save);\r\n $this->assertFalse($result);\r\n \r\n\t\t$fields = $this->_getInvalidFields($this->User);\r\n\t\t$this->assertTrue(in_array('password', $fields));\r\n\t\t\r\n\t\t\r\n\t\t//invalid email\r\n\t\t$save = array();\r\n $save['User']['username'] = 'valdiusername';\r\n $save['User']['password'] = 'validpass'; \r\n $save['User']['agb'] = 1;\r\n $save['User']['email'] = 'invalid'; \r\n $result = $this->User->save($save);\r\n $this->assertFalse($result);\r\n \r\n\t\t$fields = $this->_getInvalidFields($this->User);\r\n\t\t$this->assertTrue(in_array('email', $fields));\r\n }", "private function _checkQty($items)\n {\n if (!is_numeric($items['qty']) or $items['qty'] == 0)\n {\n throw new \\Exception('The parameter qty must be in numeric and different from zero.');\n return FALSE;\n }\n }", "function testValidate(){\n\t\t$useraccount = new UserAccount();\n\t\t$data_without_firstname = $this->test_data;\t\t\n\t\t$data_without_firstname['firstname'] = \"\";\n\t\t$useraccount->processPost($data_without_firstname);\n\t\t$this->assertRegExp(\"/First Name/i\", $useraccount->getErrorStackAsString());\n\t\t\n\t\t# check that the lastname must have a value\n\t\t$useraccount = new UserAccount();\n\t\t$data_without_lastname = $this->test_data;\n\t\t$data_without_lastname['lastname'] = \"\";\n\t\t$useraccount->processPost($data_without_lastname);\n\t\t$this->assertRegExp(\"/last name/i\", $useraccount->getErrorStackAsString());\n\t\t\n\t\t# check that the email must have a value\n\t\t $useraccount = new UserAccount();\n\t\t$data_without_email = $this->test_data;\n\t\t$data_without_email['email'] = \"\";\n\t\t$useraccount->processPost($data_without_email);\n\t\t$this->assertRegExp(\"/email/i\", $useraccount->getErrorStackAsString());\n\t\t\n\t\t# check that atleast one group has been selected\n\t\t$useraccount = new UserAccount();\n\t\t$data_without_group = $this->test_data;\n\t\t$data_without_group['usergroups_groupid'] = array();\n\t\t$useraccount->processPost($data_without_group);\t\t\n\t\t$this->assertRegExp(\"/Group/i\", $useraccount->getErrorStackAsString());\n\t\t\n\t\t# check that the email is unique \n\t\t$useraccount = new UserAccount();\n\t\t$data_with_duplicate_email = $this->test_data;\n\t\t$data_with_duplicate_email['email'] = \"[email protected]\";\n\t\t$useraccount->processPost($data_with_duplicate_email);\t\t\n\t\t$this->assertRegExp(\"/already exists/i\", $useraccount->getErrorStackAsString());\n\t}", "public function testRangeValidation()\n {\n $aircraft = factory(\\App\\Aircraft::class)->create();\n $aircraft->range = null;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 'a';\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 0.5;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = -3;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 50;\n $this->assertTrue($aircraft->save());\n }", "public function user_can_register_with_valid_details() :void\n {\n $this->browse(function (Browser $browser) {\n\n \t$user1= factory(User::class)->make();\n\n//\t\t\tdie($user1);\n $browser->visit('/')\n // ->click('#accountDropdown')\n ->clickLink('Account')\n\n ->waitFor('#nav-register')\n ->click('#nav-register')\n ->assertSee('Register');\n\n\t $this->submitForm($browser,\n\t\t [\n\t\t\t ['field_name'=>'first_name', 'field_value' =>$user1->first_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'last_name', 'field_value' =>$user1->last_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'username', 'field_value' =>$user1->username, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'email', 'field_value' =>$user1->email, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password', 'field_value' =>$user1->password, 'field_type'=> 'password'],\n\t\t\t ['field_name'=>'password_confirmation', 'field_value' =>$user1->password, 'field_type'=> 'password']\n\t ]\n\t );\n $browser->assertpathIs('/restaurants')\n ->assertSeeIn('#accountName',$user1->username)\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'Sign Up')\n ->logout();\n });\n }", "public function testIsValid() {\n\n\n\n }", "public function testReglas()\n {\n #regla1\n $obj = new Evaluacion();\n $response = $obj->validar(1);\n $this->assertEquals(true,$response);\n\n $response = $obj->validar(0);\n $this->assertEquals(false,$response);\n\n #regla2\n $response = $obj->validar_mecanica(3);\n $this->assertEquals(true,$response);\n\n $response = $obj->validar_mecanica(2);\n $this->assertEquals(true,$response);\n\n $response = $obj->validar_mecanica(1);\n $this->assertEquals(false,$response);\n\n #regla3\n $response = $obj->validar_frecuencia(31);\n $this->assertEquals(true,$response);\n\n $response = $obj->validar_frecuencia(30);\n $this->assertEquals(false,$response);\n\n #regla4\n\n $response = $obj->validar_fecha('2021-12-26');\n $this->assertEquals(true,$response);\n\n $response = $obj->validar_fecha('2020-12-22');\n $this->assertEquals(false,$response);\n\n #regla5\n $response = $obj->validar_oxigeno(92);\n $this->assertEquals(false,$response);\n\n $response = $obj->validar_oxigeno(100);\n $this->assertEquals(false,$response);\n\n $response = $obj->validar_oxigeno(91);\n $this->assertEquals(true,$response);\n\n #regla6\n $response = $obj->validar_porcentaje(12,10);\n $this->assertEquals(false,$response);\n\n $response = $obj->validar_porcentaje(13,10);\n $this->assertEquals(false,$response);\n\n\n }", "public function testValidationCaseForInvalidGeneratorNumberForKeyExchangeGeneration()\n {\n $protocol = $this->getCryptographicProtocolForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $protocol->generateExchangeResponseInformation(bin2hex(decbin(17)), ['wrong']);\n } else {\n $hasThrown = null;\n\n try {\n $protocol->generateExchangeResponseInformation(bin2hex(decbin(17)), ['wrong']);\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "public function testIsP4LicenseQuotaSufficient()\n {\n $tests = array(\n // valid cases\n array(\n 'license' => 'none',\n 'users' => 1,\n 'valid' => true\n ),\n array(\n 'license' => 'Perforce Software 200 users (expires 2010/08/03)',\n 'users' => 1,\n 'valid' => true\n ),\n array(\n 'license' => 'Perforce Software 200 users (expires 2010/08/03)',\n 'users' => 199,\n 'valid' => true\n ),\n array(\n 'license' => 'none',\n 'users' => 2,\n 'valid' => true\n ),\n array(\n 'license' => '',\n 'users' => 1,\n 'valid' => true\n ),\n\n // invalid cases\n array(\n 'license' => 'Perforce Software 200 users (expires 2010/08/03)',\n 'users' => 200,\n 'valid' => false\n ),\n array(\n 'license' => 'Perforce Software 200 users (expires 2010/08/03)',\n 'users' => 201,\n 'valid' => false\n ),\n array(\n 'license' => '1 user',\n 'users' => 1,\n 'valid' => false\n ),\n );\n\n foreach ($tests as $test) {\n $form = new Setup_Form_Administrator;\n $this->assertEquals(\n $test['valid'],\n $form->isP4LicenseQuotaSufficient($test['license'], $test['users']),\n \"license [{$test['license']}]; users [{$test['users']}] valid? [{$test['valid']}]\"\n );\n $expectedErrors = ($test['valid'] == false)\n ? array(\"Can't create a new site on this server. All available licenses are in use.\")\n : array();\n $this->assertEquals(\n $expectedErrors,\n $form->getElement('user')->getMessages(),\n 'Expected error message'\n );\n }\n }", "public function testCreditCardIsNotValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertDoesNotMatchRegularExpression($pattern,$data);\n\n }", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public function testRegisterWithRepeatedEmail()\n {\n self::$body['email'] = User::first()->email;\n\n $generic = new GenericValidationTests($this);\n $generic->testNotUniqueAttribute('register', 'POST', self::$headers, self::$body, 'email');\n }", "private function checkItemPurchaseBounds() : void\n {\n if ($this->item->available < 1) {\n throw new InventoryException('quantity not available');\n }\n\n if ($this->coinService->getCurrenCoinCount() < $this->item->cost) {\n throw new InsufficientFundsException('insufficient funds available');\n }\n }", "public function testReturnTrueOnValidEthereumAddress()\n {\n $result = Wallet::validate(self::VALID_ETH_ADDRESS, Wallet::ETHEREUM);\n\n $this->assertTrue($result);\n }", "public function testValidateFormSuccess()\n {\n $formData = \"onions\";\n $validation = GRUB\\Validator\\Validator::validateIngredient($formData);\n $expected = \"onions\";\n $this->assertEquals($validation, $expected);\n }", "public function testRandomRequirements ()\n {\n // Function parameters\n $length = 8;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 4,\n 'digit' => 3,\n 'upper' => 2,\n 'lower' => 1\n ];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A(?=(.*\\d){3})(?=(?:[^a-z]*[a-z]){1})(?=(?:[^A-Z]*[A-Z]){2})(?=(?:[0-9a-zA-Z]*[!#$%&*+,-.:;<=>?@_~]){4})[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{10,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }", "public function testValueValid() {\n $config = [\n 'success' => 1,\n 'data' => 'example'\n ];\n $this->assertEmpty($this->getValidator()->validate($config));\n }", "public function testInvalidFurFour(){\n\t\t\t$furVars =[\n\t\t\t\t'name' => '',\n\t\t\t\t'description' => 'Nice Dresser',\n\t\t\t\t'price' => '',\n\t\t\t\t'categoryId' => '',\n\t\t\t\t'fur_condition' => 'NEW'\n\t\t\t];\n\t\t\t$properTest = saveFuncFurniture($furVars);\n\t\t\t$this->assertFalse($properTest);\n\t\t}", "public function testExample()\n {\n $this->assertTrue(True);\n $arr=[];\n $this->assertEmpty($arr);\n $msg=\"Hello\";\n $this->assertEquals('Hello',$msg);\n $n= random_int(0,100);\n $this->assertLessThan(100,$n);\n }", "public function testRegisterRepeatedEmail() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t$this->email\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}" ]
[ "0.6522232", "0.6493642", "0.617038", "0.60679156", "0.6053062", "0.59602296", "0.5896966", "0.57915497", "0.5752414", "0.5747303", "0.5710024", "0.5658892", "0.5642109", "0.56260484", "0.56233144", "0.5583203", "0.55553687", "0.55391455", "0.5532799", "0.55254424", "0.55252576", "0.5524527", "0.5524527", "0.55228585", "0.5503743", "0.5496526", "0.5489989", "0.5487408", "0.54823077", "0.5459667", "0.544328", "0.5442183", "0.5417531", "0.5387164", "0.5385071", "0.53603625", "0.5360211", "0.53585595", "0.535703", "0.535628", "0.53289336", "0.5313753", "0.5291647", "0.5288373", "0.5277929", "0.52766174", "0.5276542", "0.5274169", "0.5267999", "0.52656496", "0.52603686", "0.52584803", "0.5251119", "0.5246561", "0.5238728", "0.5238503", "0.52153724", "0.5204372", "0.5193153", "0.5189488", "0.5184145", "0.5184019", "0.51824504", "0.51813805", "0.51796216", "0.5179178", "0.5159292", "0.5156097", "0.513755", "0.5137389", "0.5132602", "0.5128219", "0.5124901", "0.5122553", "0.512094", "0.5119676", "0.51166797", "0.5114986", "0.5113412", "0.51097155", "0.5108859", "0.5105859", "0.5104765", "0.509729", "0.5095981", "0.5086776", "0.5084478", "0.50786346", "0.50765216", "0.5073883", "0.5068965", "0.506563", "0.50604504", "0.5056354", "0.50420964", "0.50362676", "0.50361323", "0.50357354", "0.5033077", "0.50304437" ]
0.6822848
0
Asserts that the given coil value is valid
public static function assertValidCoilValue($value) { if ($value !== Coil::ON && $value !== Coil::OFF) { throw new InvalidArgumentException( sprintf('Invalid coil value. Should be %x or %x', Coil::ON, Coil::OFF) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function it_can_identify_valid_values()\n {\n $this->assertTrue(Testee::isValid(self::TEST_NULL_VALUE));\n }", "public function testValueValid() {\n $config = [\n 'success' => 1,\n 'data' => 'example'\n ];\n $this->assertEmpty($this->getValidator()->validate($config));\n }", "public function testCostValidation()\n {\n $aircraft = factory(\\App\\Aircraft::class)->create();\n $aircraft->cost = null;\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = 'a';\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = 0.5;\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = -3;\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = 50;\n $this->assertTrue($aircraft->save());\n }", "public function assertValid()\n {\n }", "public function testIsValidValid()\n {\n $this->uut->setConstraints([new MyConstraint()])->setValue(new ScalarValue('foo'));\n $this->assertTrue($this->uut->isValid());\n $this->assertFalse($this->uut->hasViolation());\n }", "public function testIsValidNoConstraints()\n {\n $this->assertTrue($this->uut->setValue(new ScalarValue('foo'))->isValid());\n }", "public function testCnh()\n {\n $this->assertTrue(BrValidation::cnh('01827854569'));\n\n $this->assertFalse(BrValidation::cnh('01827854568'));\n $this->assertFalse(BrValidation::cnh('12345678909'));\n $this->assertFalse(BrValidation::cnh('11111111111'));\n $this->assertFalse(BrValidation::cnh('018278545'));\n $this->assertFalse(BrValidation::cnh('abcdefghij'));\n }", "public function testInvalid(): void\n {\n $validator = new ControlValidator();\n\n $this->assertFalse($validator->validate('arf12')->isValid());\n }", "abstract public function getIsValidValue($value);", "private function validateValue($value)\n {\n if (is_null($value)) {\n throw new \\InvalidArgumentException(\"Value cannot be null\");\n }\n }", "public function testCreditCardIsNotValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertDoesNotMatchRegularExpression($pattern,$data);\n\n }", "public function testIsValidNoValue()\n {\n $this->assertTrue($this->uut->isValid());\n }", "public static function assertValidRegisterValue($value)\n {\n if ($value > 0xffff) {\n throw new InvalidArgumentException('Invalid register value, should be <= 0xffff');\n }\n }", "function testnetPresentValueException()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::netPresentValue(0.1, -1000, 3000, 4200, 6800);\n\t}", "protected function validateOrThrow() {}", "function testpresentValueException1()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::presentValue(0.29, -7, 100);\n\t}", "public function test_check_on_earth_invalid()\n {\n $coord = new stdClass();\n $coord->x = -133;\n $coord->y = 5543;\n $checked = \\SimpleMappr\\Mappr::checkOnEarth($coord);\n $this->assertFalse($checked);\n }", "function testpresentValueException2()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::presentValue(0.29, 7, 100, 0, 3);\n\t}", "public function testCreditCardIsValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }", "public function testValueIsInvalid()\n {\n $init = 'foo';\n $set = array('test');\n $str = new \\Pv\\PEnum($init, null, $set);\n }", "public function testValidate0()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == false (line 378)\n // if (empty($value) && !is_numeric($value)) == false (line 389)\n // if (empty($domain) && !is_numeric($domain)) == false (line 397)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function assertValid() : void\n {\n }", "public function assertValid() : void\n {\n }", "public function testIsValidException()\n\t{\n\t\t$data = $this->getMock('Blackbox_Data', array());\n\t\t$data->expects($this->never())->method('__set');\n\t\t$data->expects($this->never())->method('__unset');\n\n\t\t$this->target->isValid($data, $this->state_data);\n\t}", "public function validate($value, Constraint $constraint)\n {\n $valid = true;\n\n // Check it is in the format: 0,0,0,0:0,0,0,0\n $testValue = str_replace(' ', '', $value);\n if (!preg_match('/^(\\d+),(\\d+),(\\d+),(\\d+):(\\d+),(\\d+),(\\d+),(\\d+)$/', $testValue, $matches)) {\n $valid = false;\n }\n else {\n // Check the focus rectangle is inside the crop rectangle.\n $cropFocusCoordinates = explode(':', $testValue);\n $crop = explode(',', $cropFocusCoordinates[0]);\n $focus = explode(',', $cropFocusCoordinates[1]);\n\n // Add constraint generated entity.\n $geometry = new CoordinateGeometry($crop[0], $crop[1], $crop[2], $crop[3]);\n\n if (!$geometry->isInside($focus[0], $focus[1], $focus[2], $focus[3])) {\n $valid = false;\n }\n }\n\n if (!$valid) {\n $this->context->buildViolation($constraint->message)\n ->setParameter('{{ string }}', $value)\n ->addViolation()\n ;\n }\n }", "public function testIsValidInvalid()\n {\n $this->uut->setConstraints([new MyConstraint()])->setValue(new ScalarValue('bar'));\n $this->assertFalse($this->uut->isValid());\n $this->assertTrue($this->uut->hasViolation());\n $this->assertInstanceOf(MyViolation::class, $this->uut->getViolation());\n }", "public function validateValue($value)\n {\n }", "public function testBadValidateChangeNumber()\n {\n $tests = array (\n array(\n 'label' => __LINE__ .': null',\n 'value' => null,\n ),\n array(\n 'label' => __LINE__ .': empty',\n 'value' => '',\n ),\n array(\n 'label' => __LINE__ .': negative',\n 'value' => -1,\n ),\n array(\n 'label' => __LINE__ .': float',\n 'value' => 10.10,\n ),\n );\n\n foreach ($tests as $test) {\n $label = $test['label'];\n\n $validator = new \\P4\\Validate\\ChangeNumber();\n\n $this->assertSame(\n false,\n $validator->isValid($test['value']),\n \"$label - Expected Invalid\"\n );\n }\n }", "public static function validate($value);", "public function testCheckGenericInputDataWithComissionNonNumeric()\n {\n $data = [\n 'hour' => '2019-07-04T19:00', \n 'comission' => 'a non numeric value',\n 'idSession' => 1\n ];\n\n $mockedEntityManager = $this->createMock(EntityManager::class);\n $comissionSessionService = new ComissionSessionService($mockedEntityManager, []);\n\n $this->expectException(ComissionInvalidException::class);\n $comissionSessionService->checkGenericInputData($data);\n }", "public function testBuildFixedAttributeThrowsExceptionWhenAttributeAndValueIsInvalid(\n string $value\n ): void\n {\n $this->expectException(InvalidValueException::class);\n $this->expectExceptionMessage(\\sprintf(\n '\"%s\" is an invalid string datatype.', \n $value\n ));\n \n $this->sut->buildFixedAttribute($value);\n }", "abstract protected function validateValue($value);", "public function testValidate1()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == false (line 378)\n // if (empty($value) && !is_numeric($value)) == false (line 389)\n // if (empty($domain) && !is_numeric($domain)) == true (line 397)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "abstract protected function isValidValue($value);", "public function testValidate2()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == false (line 378)\n // if (empty($value) && !is_numeric($value)) == true (line 389)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testValidate4()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == true (line 373)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function shouldGetCO(): void\n {\n $this->assertPollutantLevel('getCO', $this->faker->randomFloat(2, 0, 500));\n }", "private function assert($value): bool {\n\n //Assertion::notEmpty($value); // Must not be empty\n Assertion::minLength($value, self::MIN_LENGTH); // Must be at least 5 characters\n Assertion::maxLength($value, self::MAX_LENGTH); // Must be less than 10 characters\n Assertion::regex(self::FORMAT); // Must follow a format of alphanumeric characters or underscores\n return true;\n }", "public function testRangeValidation()\n {\n $aircraft = factory(\\App\\Aircraft::class)->create();\n $aircraft->range = null;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 'a';\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 0.5;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = -3;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 50;\n $this->assertTrue($aircraft->save());\n }", "public function testIPIsNotValid()\n {\n $settings = require(__DIR__ . '/../src/settings.php');\n $geo_ip = new GeoIP($settings['settings']);\n\n $this->assertFalse($geo_ip->validateIP('10.0.0'));\n }", "public function testIsValidType()\n {\n $this->assertFalse(\n Method::invoke($this->type, 'isValidType', $this, 'test'),\n 'The value should not be valid.'\n );\n\n $this->assertTrue(\n Method::invoke($this->type, 'isValidType', $this, 1.23),\n 'The value should be valid.'\n );\n }", "public function testIsValidFailing()\n {\n $this->assertFalse($this->helper->isValid('s1', 15));\n $this->assertFalse($this->helper->isValid('s2', true));\n $this->assertFalse($this->helper->isValid('i1', 12.1));\n $this->assertFalse($this->helper->isValid('i2', 'eleven'));\n $this->assertFalse($this->helper->isValid('i3', 12.6));\n $this->assertFalse($this->helper->isValid('i4', -2));\n $this->assertFalse($this->helper->isValid('i5', 83));\n $this->assertFalse($this->helper->isValid('i6', false));\n $this->assertFalse($this->helper->isValid('f1', 12));\n $this->assertFalse($this->helper->isValid('f2', [12.67]));\n $this->assertFalse($this->helper->isValid('f3', 13.0));\n $this->assertFalse($this->helper->isValid('b', [true]));\n $this->assertFalse($this->helper->isValid('b', 0));\n $this->assertFalse($this->helper->isValid('a', 'blue'));\n $this->assertFalse($this->helper->isValid('m', 'true'));\n $this->assertFalse($this->helper->isValid('m', false));\n $this->assertFalse($this->helper->isValid('r', 'memb3rType'));\n }", "private function assertIsValidAmount(float $value)\n {\n return 0 <= $value;\n }", "private function ensureIsValidCpf(string $cpf): void\n {\n if (strlen($cpf) != 11) {\n throw new \\UnexpectedValueException(\n sprintf('%s is not a valid CPF', $cpf)\n );\n }\n // Verifica se foi informada uma sequência de digitos repetidos. Ex: 111.111.111-11\n if (preg_match('/(\\d)\\1{10}/', $cpf)) {\n throw new \\UnexpectedValueException(\n sprintf('%s is not a valid CPF', $cpf)\n );\n }\n\n $cpfAsArray = array_map(fn ($digit) => (int) $digit, str_split($cpf));\n\n // Faz o calculo para validar o CPF\n for ($t = 9; $t < 11; $t++) {\n for ($d = 0, $c = 0; $c < $t; $c++) {\n $d += $cpfAsArray[$c] * (($t + 1) - $c);\n }\n $d = ((10 * $d) % 11) % 10;\n if ($cpfAsArray[$c] !== $d) {\n throw new \\UnexpectedValueException(\n sprintf('%s is not a valid CPF', $cpf)\n );\n }\n }\n }", "public function testInvalidFurCondition(){\n\t\t\t$furVars =[\n\t\t\t\t'name' => 'White Dresser',\n\t\t\t\t'description' => 'Nice Dresser',\n\t\t\t\t'price' => '900.12',\n\t\t\t\t'categoryId' => '5',\n\t\t\t\t'fur_condition' => ''\n\t\t\t];\n\t\t\t$properTest = saveFuncFurniture($furVars);\n\t\t\t$this->assertFalse($properTest);\n\t\t}", "public function assert($value)\n {\n if (!$this->doValidate($value))\n {\n throw new Exception\\ValidatorException($this->getErrorMessage());\n }\n }", "public function isValid($value);", "public function isValid($value);", "public function test_validez_falsa_de_instancia_de_objeto_de_formacion_de_idioma()\n {\n $formacionIdioma=new FormacionIdioma();\n $this->assertTrue($formacionIdioma->validez()->fails());\n }", "public function testCns()\n {\n $this->assertTrue(BrValidation::cns('702 5053 3246 4238'));\n $this->assertTrue(BrValidation::cns('898 0058 0155 2261'));\n $this->assertTrue(BrValidation::cns('706000307269748'));\n $this->assertTrue(BrValidation::cns('706902161943931'));\n\n $this->assertFalse(BrValidation::cns('702 5053 3246 4237'));\n $this->assertFalse(BrValidation::cns('111 1111 1111 1111'));\n $this->assertFalse(BrValidation::cns('9021 6194 0000'));\n $this->assertFalse(BrValidation::cns(['12345678909']));\n }", "public function testValidate3()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == true (line 378)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_JPG,self::VALUE_GIF,self::VALUE_CUSTOMCODE));\n\t}", "public function testInvalidFurCatId(){\n\t\t\t$furVars =[\n\t\t\t\t'name' => 'White Dresser',\n\t\t\t\t'description' => 'Nice Dresser',\n\t\t\t\t'price' => '900.12',\n\t\t\t\t'categoryId' => '',\n\t\t\t\t'fur_condition' => 'NEW'\n\t\t\t];\n\t\t\t$properTest = saveFuncFurniture($furVars);\n\t\t\t$this->assertFalse($properTest);\n\t\t}", "public function testCheckGenericInputDataWithComissionNegativeValue()\n {\n $data = [\n 'hour' => '2019-07-04T19:00', \n 'comission' => -50,\n 'idSession' => 1\n ];\n\n $mockedEntityManager = $this->createMock(EntityManager::class);\n $comissionSessionService = new ComissionSessionService($mockedEntityManager, []);\n\n $this->expectException(ComissionInvalidException::class);\n $comissionSessionService->checkGenericInputData($data);\n }", "abstract protected function checkValue( &$value );", "public static function isInvalid($value)\n {\n }", "public function testInvalidValue(): void {\n $logger = $this->createMock(LoggerInterface::class);\n $logged = [];\n $callback = function (string $message, array $context = []) use (&$logged) {\n $logged[] = strtr($message, $context);\n };\n $logger->method('warning')->willReturnCallback($callback);\n $this->plugin->setLogger($logger);\n\n $value = $this->plugin->getValue('foobar');\n $this->assertNull($value);\n $this->assertEquals(['Error while parsing date/time value \"foobar\": The timezone could not be found in the database.'], $logged);\n }", "public function testIPIsValid()\n {\n $settings = require(__DIR__ . '/../src/settings.php');\n $geo_ip = new GeoIP($settings['settings']);\n\n $this->assertTrue($geo_ip->validateIP('10.0.0.1'));\n }", "public function testSetInvalidRestrictAccessValue() {\n $permission = new GroupPermission();\n $permission->set('restrict access', 'invalid value');\n }", "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\InteractionCounter;\n\t}", "public function testLoookValue_Contraint()\n {\n $this->setExpectedException('Q\\DB_Constraint_Exception');\n $this->conn->lookupValue(\"test\", \"title\", array('status'=>'ACTIVE'));\n }", "public function test_check_on_earth_valid()\n {\n $coord = new stdClass();\n $coord->x = -120;\n $coord->y = 43;\n $checked = \\SimpleMappr\\Mappr::checkOnEarth($coord);\n $this->assertTrue($checked);\n }", "public function setInvalid();", "abstract public function valid();", "public function testWarningsErrnoIsIntegerAndNotEmpty(): void\n {\n $value = $this->get_reflection_property_value('warnings')[0];\n\n $this->assertIsInt($value['errno']);\n $this->assertNotEmpty($value['errno']);\n }", "private function verifyControlRule() {\r\n $query = $this->db->select('lp.rule_id')\r\n ->from('landing_page lp')\r\n ->join('landingpage_collection lpc', 'lpc.landingpage_collectionid = lp.landingpage_collectionid', 'INNER')\r\n ->where('lp.landingpage_collectionid', $this->project)\r\n ->where('lp.pagetype', OPT_PAGETYPE_CTRL)\r\n ->get();\r\n\r\n $ruleid = $query->row()->rule_id;\r\n if (!is_numeric($ruleid) || $ruleid <= 0) {\r\n throw new Exception('When personalizationmode is set to COMPLETE, a valid ruleid is mandatory', 400200);\r\n }\r\n }", "function checkNum($number) {\n if($number>50) {\n throw new Exception(\" Tavë Kosi has been known for 90 years in Albanian cuisine.\");\n }\n return true;\n}", "public function setAcciNoti($value) {\n\t\t//validando de que el valor sea alfabetico y que sea mayor a uno y menor a cien\n\t\tif ($this->validateAlphanumeric($value, 1, 400)) {\n\t\t\t//seteando valor a la variable de nombre de categoria\n\t\t\t$this->acci_noti = $value;\n\t\t\t//retornando respuesta true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornando respuesta false\n\t\t\treturn false;\n\t\t}\n\t}", "public function testIsValidKeyNotFound()\n {\n $this->assertFalse($this->helper->isValid('blabla', 12.93));\n }", "public function testFaultyProperties()\n {\n $international = new International();\n\n try {\n $international->setProduct(str_repeat('a', 10));\n $this->fail('BpostInvalidValueException not launched');\n } catch (BpostInvalidValueException $e) {\n // Nothing, the exception is good\n } catch (Exception $e) {\n $this->fail('BpostInvalidValueException not caught');\n }\n\n // Exceptions were caught,\n $this->assertTrue(true);\n }", "public function validate($value);", "public function validate($value);", "public function testNotString(): void\n {\n $validator = new ControlValidator();\n $result = $validator->validate(9);\n\n $this->assertFalse($result->isValid());\n }", "public function testIsValidTypeInvalid()\n {\n $this->assertFalse($this->annotation->isValidType('INVALID'));\n }", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function checkScalar($value)\n {\n return new AssertionResult(\n is_scalar($value),\n '{name} must be a scalar'\n );\n }", "public static function isValueValid($value) : bool\n {\n if (! is_float($value)) {\n return false;\n }\n \n if ($value < -90. || $value > 90.) {\n return false;\n }\n \n // $digits = explode(\".\", (string)(float)$value);\n // var_dump($digits[1] ?? '');\n \n return true;\n }", "private function assertValidClientID($value, $fromPacket)\r\n {\r\n\r\n if (strlen($value) > 23) {\r\n $this->throwException(\r\n sprintf(\r\n 'Expected client id shorter than 24 bytes but got \"%s\".',\r\n $value\r\n ),\r\n $fromPacket\r\n );\r\n }\r\n\r\n if ($value !== '' && !ctype_alnum($value)) {\r\n $this->throwException(\r\n sprintf(\r\n 'Expected a client id containing characters 0-9, a-z or A-Z but got \"%s\".',\r\n $value\r\n ),\r\n $fromPacket\r\n );\r\n }\r\n }", "public function test_validate_withdraw()\n {\n $amount = 5000;\n $withdraw = $this->obj->validate_withdraw($amount);\n $this->assertLessThanOrEqual(20000,$amount);\n $this->assertTrue($withdraw);\n }", "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_SUCCESS,self::VALUE_PENDING,self::VALUE_INVALIDURL,self::VALUE_INVALIDPROTOCOL,self::VALUE_INVALIDFILE,self::VALUE_SERVERDOWN,self::VALUE_IMAGENONEXISTENT,self::VALUE_IMAGEREADTIMEOUT,self::VALUE_INVALIDFILEFORMAT,self::VALUE_IMAGEPROCESSINGERROR,self::VALUE_CUSTOMCODE));\n\t}", "public function testBuildIdAttributeThrowsExceptionWhenAttributeAndValueIsInvalid(\n string $value, \n string $mValue\n ): void\n {\n $this->expectException(InvalidValueException::class);\n $this->expectExceptionMessage(\\sprintf(\n '\"%s\" is an invalid ID datatype.', \n $mValue\n ));\n \n $this->sut->buildIdAttribute($value);\n }", "public function getInvalidValue();", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public function testIsValid() {\n\n\n\n }", "function _check_security_code($value)\n {\n $this->load->library('captcha_library');\n\n if (!$this->captcha_library->check($value, 'four')) {\n $this->form_validation->set_message(__FUNCTION__, lang('notice_value_incorrect'));\n return FALSE;\n }\n\n return TRUE;\n }", "public function testNotString()\n {\n $values = array(\n 1, 1.4, null, new stdClass(), true, false\n );\n\n foreach ($values as $value) {\n $this->assertSame(false, $this->_validator->isValid($value));\n }\n }", "function isvalid($value) {\n global $debugging;\n switch (true) {\n case (! parent::isvalid($value)):\n $this->error = \"File name must be short and simple\";\n if ($debugging > 1) {\n $this->error .= \" [\" . $value . \"]\";\n }\n return false;\n case (! $this->contentAccessValid()):\n $this->error = \"Content inaccessible\";\n if ($debugging > 1) {\n $this->error .= \" [\" . $this->filepath($value) . \"]\";\n }\n return false;\n default:\n return true;\n }\n }", "public function testBuildIdAttributeThrowsExceptionWhenAllAndValueIsInvalid(\n string $value, \n string $mValue\n ): void\n {\n $this->expectException(InvalidValueException::class);\n $this->expectExceptionMessage(\\sprintf(\n '\"%s\" is an invalid ID datatype.', \n $mValue\n ));\n \n $this->sut->buildIdAttribute($value);\n }", "abstract public function verify($value): void;", "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_HEADER,self::VALUE_LINE));\n\t}", "public function testValidateThrowRequiredValueException()\n {\n $this->job->setMapper($this->createMock(Mapper::class));\n\n $this->job->setCsvData([['Name'], ['test']]);\n\n $this->job->getMapper()->expects($this->exactly(1))->method('checkRequiredProperties')->willReturn([Job::JOB_FIELD_STATE => Job::STATE_UPLOAD_COMPLETE]);\n\n\n try {\n $this->job->validate();\n } catch (\\Exception $e) {\n $this->assertContains(EntityException::MGS_REQUIRED_PROPERTIES, $e->getMessage());\n }\n }", "function _check_security_code($value)\n\t{\n\t\t$this->load->library('captcha_library');\n\t\t\n\t\tif ( ! $this->captcha_library->check($value, 'four'))\n\t\t{\n\t\t\t$this->form_validation->set_message(__FUNCTION__, lang('notice_value_incorrect'));\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "public function testBasicPreconditionFail3()\n {\n $this->typeSafetyTestClass->iNeedNumeric('four');\n }" ]
[ "0.6008962", "0.59076023", "0.58623385", "0.5819444", "0.56846976", "0.5613157", "0.55885965", "0.5501875", "0.5497066", "0.5492128", "0.54439676", "0.5432192", "0.5430047", "0.53856987", "0.5355875", "0.53495747", "0.5348872", "0.5342657", "0.5341787", "0.5340112", "0.53243595", "0.53208", "0.53208", "0.53186077", "0.53101176", "0.53089136", "0.53046185", "0.53042156", "0.53022945", "0.5285883", "0.52788436", "0.5277953", "0.5275612", "0.52726847", "0.5271994", "0.5262282", "0.52565205", "0.52341187", "0.5234105", "0.52292764", "0.5218515", "0.52136976", "0.5212429", "0.5210988", "0.52013093", "0.52009535", "0.51924795", "0.51924795", "0.51921356", "0.51842904", "0.51675516", "0.5163531", "0.51517236", "0.51396114", "0.51289266", "0.51209825", "0.5118416", "0.51171434", "0.5116501", "0.5105719", "0.5098495", "0.50952977", "0.5092075", "0.5051962", "0.50507", "0.50437534", "0.5038485", "0.5029759", "0.5029261", "0.5029252", "0.50276685", "0.50276685", "0.5025246", "0.50179875", "0.50158936", "0.50158936", "0.50158936", "0.50158936", "0.50158936", "0.50158936", "0.50158936", "0.50158936", "0.5009913", "0.5007232", "0.50070226", "0.5004041", "0.49954805", "0.49878332", "0.49866647", "0.49862874", "0.4980238", "0.49769044", "0.49741474", "0.49714136", "0.49693978", "0.4967677", "0.4963658", "0.49618572", "0.49526185", "0.49344844" ]
0.7477078
0
Create a new command instance.
public function __construct(ConnectionFactory $factory) { parent::__construct(); $this->factory = $factory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
Execute the console command.
public function handle() { $table = $this->input->getArgument('table'); $file = base_path($this->input->getArgument('file')); $type = $this->input->getOption('type'); $indent = $this->input->getOption('indent'); $driver = 'mysql'; $host = '127.0.0.1'; $port = 3306; $username = 'root'; $password = 'root'; $database = 'laravel_starter58'; $prefix = ''; $charset = 'utf8mb4'; $collation = 'utf8mb4_unicode_ci'; switch ( $type ) { case 'txt': try { $db = $this->factory->make([ 'driver' => $driver, 'host' => $host, 'port' => $port, 'username' => $username, 'password' => $password, 'database' => $database, 'charset' => $charset, 'collation' => $collation, 'prefix' => $prefix, 'prefix_indexes' => true, 'unix_socket' => '', 'strict' => true, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [], ]); $data = $db->table($table)->get(); $data = json_decode(json_encode($data), true); // 转换为数组 $data = unflating($data, ['type', 'slug']); $data = unleveling($data, $indent); if ( file_put_contents($file, $data) ) { echo "Success!\n"; } else { echo "Error!\n"; } } catch ( \Exception $e ) { echo $e->getMessage()."\n"; } break; default: echo "不支持的类型:{$type}!\n"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.61484164", "0.6146793", "0.6139144", "0.61347336", "0.6131662", "0.61164206", "0.61144686", "0.61109483", "0.61082935", "0.6105106", "0.6103338", "0.6102162", "0.61020017", "0.60962653", "0.6095482", "0.6091584", "0.60885274", "0.6083864", "0.6082142", "0.6077832", "0.60766655", "0.607472", "0.60739267", "0.607275", "0.60699606", "0.6069931", "0.6068753", "0.6067665", "0.6061175", "0.60599935", "0.6059836", "0.605693", "0.60499364", "0.60418284", "0.6039709", "0.6031963", "0.6031549", "0.6027515", "0.60255647", "0.60208166", "0.6018581", "0.60179937", "0.6014668", "0.60145515", "0.60141796", "0.6011772", "0.6008498", "0.6007883", "0.60072047", "0.6006732", "0.60039204", "0.6001778", "0.6000803", "0.59996396", "0.5999325", "0.5992452", "0.5987503", "0.5987503", "0.5987477", "0.5986996", "0.59853584", "0.5983282", "0.59804505", "0.5976757", "0.5976542", "0.5973796", "0.5969228", "0.5968169", "0.59655035", "0.59642595", "0.59635514", "0.59619296", "0.5960217", "0.5955025", "0.5954439", "0.59528315", "0.59513766", "0.5947869", "0.59456027", "0.5945575", "0.5945031" ]
0.0
-1
wp_enqueue_script( 'airshp_chat_socket.io', ' array( 'jquery' ), date('Ymd').'12', true );
function airshp_chat_scripts() { wp_enqueue_script( 'airshp_chat_socket.io', 'http://beta.tourgigs.com:8080/socket.io/socket.io.js', array( 'jquery' ), date('Y-m-d').'12', true ); /* Serve JS page with Admin controls to only users with permissions */ if ( (current_user_can( 'manage_options' ))) { wp_enqueue_script( 'airshp_chat_client', AIRSHPCHAT_URL.'clientAdmin.js', array( 'jquery','childscripts' ), date('Y-m-d').'12', true ); } else { wp_enqueue_script( 'airshp_chat_client', AIRSHPCHAT_URL.'client.js', array( 'jquery','childscripts' ), date('Y-m-d').'12', true ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueue_scripts()\n\t{\n\t\twp_register_script('peepso-activitystream', $this->plugin_url . 'asset/js/activitystream.js',\n\t\t\tarray('peepso'), PeepSo::PLUGIN_VERSION, TRUE);\n\t}", "function add_scripts() {\r\n \twp_enqueue_script('contact-scripts', plugins_url().'/contact-widget/js/script.js', array('jquery'),'5.7', false);\r\n }", "function so_enqueue_scripts(){\r\n wp_register_script('jquery3','https://code.jquery.com/jquery-3.3.1.js');\r\n wp_enqueue_script( 'jquery3');\r\n wp_register_script(\r\n 'ajaxHandle',\r\n '/wp-content/plugins/refresh-plugin/js/refresh-plugin.js',\r\n array(),\r\n false,\r\n true\r\n );\r\n wp_enqueue_script( 'ajaxHandle' );\r\n wp_localize_script(\r\n 'ajaxHandle',\r\n 'ajax_object',\r\n array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'pluginurl' => plugin_dir_url( __FILE__ ) )\r\n );\r\n}", "function secondthought_device_register_scripts(){\n\n\twp_enqueue_script('secondthought_device_widget_script', siteorigin_widget_get_plugin_dir_url('secondthought-device-widget').'js/secondthought-device-widget.js','', SOW_BUNDLE_VERSION, '', 0);\n}", "function myweather_scripts(){\n\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.css');\n wp_enqueue_script('jquery');\n\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.js');\n wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array('jquery'));\n\n}", "public function enqueue_js(){\n\n // Enqueue scripts.\n wp_enqueue_script( 'agreable_poll_script', Helper::assetUrl('client.js'), array(), '1.0.0', true );\n\n $this->render_js_vars();\n\n }", "public function enqueue_script() {\n wp_enqueue_script('ln-publisher', plugins_url('js/publisher.js', __FILE__), array('jquery'));\n wp_enqueue_style('ln-publisher', plugins_url('css/publisher.css', __FILE__));\n wp_localize_script('ln-publisher', 'LN_publisher', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'charge_url' => !empty($this->options['public_url']) ? $this->options['public_url'] : $this->options['server_url']\n ));\n }", "function wp_enqueue_scripts()\n {\n }", "function b_script_enqueuer() \n{\n wp_register_script('tf_our_people', plugin_dir_url(__FILE__).'tf_our_people.js', array('jquery'));\n\n // localize the script to your domain name, so that you can reference the url to admin-ajax.php file easily\n wp_localize_script('tf_our_people', 'myAjax', array('ajaxurl' => admin_url('admin-ajax.php')));\n\n // enqueue jQuery library and the script you registered above\n wp_enqueue_script('jquery');\n wp_enqueue_script('tf_our_people');\n}", "public function enqueue_scripts()\n {\n wp_enqueue_script($this->fast_social_sharing, plugin_dir_url(__FILE__) . 'js/fast-social-sharing-public.js', array( 'jquery' ), $this->version, false);\n }", "function pgm_public_scripts(){\n wp_register_script('ppmguru-mailing-list-js-public',plugins_url('/js/public/ppmguru-mailing-list.js',__FILE__), array('jquery'),'',true);\n wp_enqueue_script('ppmguru-mailing-list-js-public');\n}", "function mm_countdown_enqueue_scripts() {\n\twp_register_script( 'mm-countdown', plugins_url( '/js/jquery.countdown.js', __FILE__ ), array( 'jquery' ), null, true );\n\n}", "function autodidact_script_enqueue() {\n wp_enqueue_style('customstyle', get_template_directory_uri() . '/css/auto.css', array(), '1.0.0', 'all');\n wp_enqueue_script('customjs', get_template_directory_uri() . '/js/auto.js', array(), '1.0.0', true);\n}", "function plugin_stater_reg_scripts() {\r\n\t// we are telling WP that we depend on jQuery\r\n\twp_register_script( CH_PLUGIN_NAME , plugins_url( '/js/app.js', __FILE__ ), array( 'jquery' ) );\r\n\twp_enqueue_script ( CH_PLUGIN_NAME );\r\n\twp_enqueue_style ( CH_PLUGIN_NAME , plugins_url( '/css/app.css', __FILE__ ) );\r\n}", "public function enqueue_scripts() {\n wp_enqueue_script(\n $this->plugin_name,\n plugin_dir_url( __FILE__ ) . 'js/update-monitor-public.js',\n array('jquery'),\n $this->version,\n false\n );\n }", "function wt_scripts() {\n\twp_enqueue_style( 'vue-writing-theme-pacifico', 'https://fonts.googleapis.com/css?family=Pacifico', '', null );\n\twp_enqueue_style( 'vue-writing-theme-montserrat', 'https://fonts.googleapis.com/css?family=Montserrat', '', null );\n\twp_enqueue_style( 'vue-writing-theme-styles', get_stylesheet_uri() );\n\n wp_enqueue_script('vue-writing-theme-general',\n get_template_directory_uri() . '/dist/build.js',\n array('jquery'),\n time(),\n true );\n\n\n // wp_localize_script( 'vue-writing-theme-general', 'sitedata', array(\n // 'rest_url' => esc_url_raw( rest_url('wp/v2/' ) ),\n // \t\t)\n // ;\n\n}", "public function widget_scripts() {\n\t\twp_register_script( 'elementor-hello-world', plugins_url( '/assets/js/hello-world.js', __FILE__ ), [ 'jquery' ], false, true );\n\t}", "function nightsky_user_scripts( ) {\n // enque your own stuff here. CSS should be added to the array above.\n // enqueue a script.\n // wp_enqueue_script( 'id', get_template_directory_uri() . 'path',array('dependencies'), filemtime(get_stylesheet_directory() . 'path'), header_or_footer );\n}", "function wpfme_jquery_enqueue() {\n wp_deregister_script('jquery');\n wp_register_script('jquery', \"http\" . ($_SERVER['SERVER_PORT'] == 443 ? \"s\" : \"\") . \"://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js\", false, null);\n wp_enqueue_script('jquery');\n}", "public function arvan_wp_enqueue_scripts(){\n \n wp_register_script('arvan-plugin-custom-script', plugin_dir_url(__FILE__) . '/js/custom.js', array('jquery'));\n wp_localize_script( 'arvan-plugin-custom-script', 'WPData', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ))); \n wp_enqueue_script( 'arvan-plugin-custom-script');\n \n\n }", "function d2_add_plugin_scripts() {\n\twp_enqueue_style( 'd2-style-css', plugins_url('css/style.css', __FILE__));\n\twp_enqueue_script( 'd2-plugin-js', plugins_url('js/plugins.js', __FILE__) ,array(), '1.0.0', true);\n\twp_localize_script( 'd2-plugin-js', 'dwc_jquery_var',array( \n\t\t'ajax_url' \t\t\t\t=> admin_url( 'admin-ajax.php' ),\n\t\t'current_user_id'\t\t=> get_current_user_id(),\n\t\t'site_url' \t\t\t\t=> site_url(),\n\t\t//'opt_blog_num_columns'\t=> themedirect_option('opt_blog_num_columns')\n\t\t) );\n\twp_enqueue_script( 'd2-plugin-js' );\n}", "function thrive_dashboard_enqueue_script($handle, $src = '', $deps = array(), $ver = false, $in_footer = false)\n{\n if ($ver === false) {\n $ver = \"1.0\";\n }\n wp_enqueue_script($handle, $src, $deps, $ver, $in_footer);\n}", "function enqueue_script() {\n\t\twp_enqueue_script( 'aztec-vendors-script', get_stylesheet_directory_uri() . '/assets/vendor.js', [], false, true );\n\t\twp_enqueue_script( 'aztec-script', get_stylesheet_directory_uri() . '/assets/app.js', [ 'aztec-vendors-script', 'jquery' ], false, true );\n\t}", "function eventos_carrega_script() {\n\twp_enqueue_style( \"eventos_css\",plugins_url( \"/css/eventos.css\", __FILE__ ));\n\twp_enqueue_style( \"datetimepickerCSS\",plugins_url( \"/css/jquery.datetimepicker.css\", __FILE__ ));\n\twp_enqueue_script( \"datetimepicker\",plugins_url( \"/js/jquery.datetimepicker.js\", __FILE__ ));\n\twp_enqueue_script( \"eventos_scripts\",plugins_url( \"/js/scripts.js\", __FILE__ ));\n}", "function jakes_message_enqueue_scripts() {\r\n\r\n global $pagenow, $typenow;\r\n \r\n if ( $typenow == 'message') {\r\n\r\n wp_enqueue_style('message-cpt-style', get_template_directory_uri().'/css/message-cpt-style.css', false, '1.0.0', 'all');\r\n wp_enqueue_script('customjs-jakob', get_template_directory_uri().'/js/message-cpt-script.js', array(), '1.0.0', true);\r\n\r\n }\r\n}", "function enqueue_scripts() {\n wp_register_script( 'waypoints', THEME . '/js/waypoint.min.js', array( 'jquery' ), '1', true ); wp_enqueue_script( 'waypoints' );\n wp_register_script( 'slick', THEME . '/js/slick.min.js', array( 'jquery' ), '1', true ); wp_enqueue_script( 'slick' );\n wp_register_script( 'validate', THEME . '/js/validate.min.js', array( 'jquery' ), '1', true ); wp_enqueue_script( 'validate' );\n wp_register_script( 'client', THEME . '/js/client.js', array( 'jquery' ), '1', true ); wp_enqueue_script( 'client' );\n wp_register_script( 'scripts', THEME . '/js/scripts.js', array( 'jquery' ), '1', true ); wp_enqueue_script( 'scripts' );\n}", "function enqueue(){ \n\n wp_enqueue_script( 'jqx', 'https://code.jquery.com/jquery-1.12.4.js', array ( 'json2' ), 1.1, false);\n\n wp_enqueue_script( 'jqui','https://code.jquery.com/ui/1.12.1/jquery-ui.js', array ( 'jqx' ), 1.1, false);\n wp_enqueue_style( 'jqui','https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css',2); \n\n wp_enqueue_script( 'jqx_touch', plugins_url('/js/jquery.ui.touch-punch.min.js',__FILE__), array ( 'jquery' ), 1.1, true); \n \n wp_enqueue_script( 'dicejs', plugins_url('/js/dice.js',__FILE__), array ( 'jqx','jquery','jqx_touch' ), 1.1, true);\n wp_enqueue_style( 'dicecss', plugins_url('/css/dice.css',__FILE__), 99);\n }", "function add_customjs() {\n wp_enqueue_script( 'jquery-ui', 'https://code.jquery.com/ui/1.11.4/jquery-ui.min.js' , array('jquery'),3, true ); \n //se agrega jquery UI a la pagina\n //wp_enqueue_script( 'datepicker',get_stylesheet_directory_uri().'/js/datepicker/datepicker-min.js', array('jquery'),3, true ); \n //se agrega el plugin pickadate a la pagina\n wp_enqueue_script( 'datepicker',get_stylesheet_directory_uri().'/js/pickadate/picker-min.js', array('jquery'),3, true ); \n wp_enqueue_script( 'datepicker-date',get_stylesheet_directory_uri().'/js/pickadate/picker.date-min.js', array('jquery'),3, true ); \n wp_enqueue_script( 'datepicker-time',get_stylesheet_directory_uri().'/js/pickadate/picker.time.js', array('jquery'),3, true );\n \n //se agregan los js del tema hijo \n wp_enqueue_script( 'customjs', get_stylesheet_directory_uri().'/js/script_child_theme.js', array('jquery'),4, true );\n //se agrega el js para el bookin \n wp_enqueue_script( 'bookin2', get_stylesheet_directory_uri().'/js/bookin.js', array('jquery'),4, true ); \n wp_enqueue_script( 'validate', get_stylesheet_directory_uri().'/js/jquery.validate-min.js', array('jquery'),4, true ); \n \n\n if($_SERVER['REQUEST_URI']=='/blog-and-newsletter/' || valid_news_url($_SERVER['REQUEST_URI']) ){ \n \n wp_enqueue_script( 'contact-form', get_stylesheet_directory_uri().'/react-components/js/contact.js' , array('jquery'),3, true );\n wp_enqueue_style( 'css-react' , get_stylesheet_directory_uri().\"/react-components/widget-contact.css\", array(),'3', 'all' ); \n \n }\n\n // se agregan los css para los iconos\n wp_enqueue_style( 'iconos' , \"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css\", array(),'3', 'all' );\n //se agrega el css para el header\n wp_enqueue_style( 'header' , get_stylesheet_directory_uri().\"/css/header.css\", array(),'4', 'all' );\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'footer' , get_stylesheet_directory_uri().\"/css/footer.css\", array(),'4', 'all' );\n // se agrega el css para el estilo del footer\n //wp_enqueue_style( 'restaurants' , get_stylesheet_directory_uri().\"/css/home.css\", array(),'4', 'all' );\n if($_SERVER['REQUEST_URI']=='/restaurants-bars/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'home' , get_stylesheet_directory_uri().\"/css/restaurants.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/rr2016/especial-events-payment/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'Special_events_payments' , get_stylesheet_directory_uri().\"/css/Special_events_payment.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/forgot-pin/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'forgot-pin' , get_stylesheet_directory_uri().\"/css/forgot-pin.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/register-email/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'register-email' , get_stylesheet_directory_uri().\"/css/register-email.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/home-members/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'members' , get_stylesheet_directory_uri().\"/css/home-members.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/contact-question-form/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'question-form' , get_stylesheet_directory_uri().\"/css/question-form.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/airport-transfers/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'airport-transfers' , get_stylesheet_directory_uri().\"/css/airport-transfers.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/free-shuttle-in-cancun/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'free-shuttle-in-cancun' , get_stylesheet_directory_uri().\"/css/free-shuttle-in-cancun.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/the-royal-market/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-market' , get_stylesheet_directory_uri().\"/css/the-royal-market.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/kitchen_stuffers/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'kitchen_stuffers' , get_stylesheet_directory_uri().\"/css/kitchen_stuffers.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/register_email_address/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'registeremail' , get_stylesheet_directory_uri().\"/css/registeremail.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/the-royal-cancun/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/the-royal-sands/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/the-royal-haciendas/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/the-royal-caribbean/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/grand-residences/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/the-royal-islander/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'discover-royal-resorts' , get_stylesheet_directory_uri().\"/css/discover-royal-resorts.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/restaurants-in-cancun-playa-del-carmen/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'restaurants-in-cancun-playa-del-carmen' , get_stylesheet_directory_uri().\"/css/restaurants-in-cancun-playa-del-carmen.css\", array(),'4', 'all' );\n wp_enqueue_style( 'estilo' , get_stylesheet_directory_uri().\"/css/estilo.css\", array(),'4', 'all' );\n\n wp_enqueue_script( 'bookin-reservations', get_stylesheet_directory_uri().'/js/bookin-reservations.js', array('jquery'),4, true );\n\n } \n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/capitains-cove/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'restaurants-and-bars' , get_stylesheet_directory_uri().\"/css/restaurants-and-bars.css\", array(),'4', 'all' );\n } \n \n\n if($_SERVER['REQUEST_URI']=='/destinations/weather-in-cancun-and-riviera-maya/' || $_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/'){\n //\n wp_enqueue_style( 'css-normalize' , \"/weather1/demo/css/normalize.css\", array(),'4', 'all' );\n wp_enqueue_style( 'css-apis' , \"https://fonts.googleapis.com/css?family=Roboto:400,100,300,700,500,900\", array(),'4', 'all' );\n wp_enqueue_style( 'css-demo' , \"/weather1/demo/css/demo.css\", array(),'4', 'all' );\n wp_enqueue_style( 'css-style' , \"/weather1/demo/css/style1.css\", array(),'4', 'all' );\n wp_enqueue_style( 'css-style-weather' , get_stylesheet_directory_uri().\"/css/css-style-weather.css\", array(),'4', 'all' );\n wp_enqueue_script( 'animacion-js', get_stylesheet_directory_uri().'/js/animacion-js-min.js', array('jquery'),4, true );\n wp_enqueue_script( 'animacion', '/weather1/demo/js/index.js', array('animacion-js'),4, true );\n wp_enqueue_script('index-weather', \"https://query.yahooapis.com/v1/public/yql?q=SELECT * FROM weather.forecast WHERE woeid='114632' and u='c'&format=json&callback=callbackFunction\", array('animacion-js'),4, true );\n wp_enqueue_style( 'clima' , get_stylesheet_directory_uri().\"/css/clima.css\", array(),'4', 'all' );\n }\n\n /* 24/02/16 and 25/02/16 */\n\n if($_SERVER['REQUEST_URI']=='/cakes/'){\n wp_enqueue_style( 'cakes' , get_stylesheet_directory_uri().\"/css/cakes.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/check-out-ksk/'){\n wp_enqueue_style( 'market-chekout' , get_stylesheet_directory_uri().\"/css/market-chekout.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/check-out-multi/'){\n wp_enqueue_style( 'market-chekout-multi' , get_stylesheet_directory_uri().\"/css/market-checkout-multi.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/check-out/'){\n wp_enqueue_style( 'market-chekout-multi' , get_stylesheet_directory_uri().\"/css/market-checkout-multi.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/gift-certificates/'){\n wp_enqueue_style( 'gift-certificates' , get_stylesheet_directory_uri().\"/css/gift-certificates.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/order-confirmation/'){\n wp_enqueue_style( 'order-confirmation' , get_stylesheet_directory_uri().\"/css/order-confirmation.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/request-status/'){\n wp_enqueue_style( 'request-status' , get_stylesheet_directory_uri().\"/css/request-status.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/shopping-cart/'){\n wp_enqueue_style( 'shopping-cart' , get_stylesheet_directory_uri().\"/css/shopping-cart.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/spa-gift-certificates/'){\n wp_enqueue_style( 'spa-gift-certificates' , get_stylesheet_directory_uri().\"/css/spa-gift-certificates.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/motorized-wheelchair/'){\n wp_enqueue_style( 'motorized-wheelchair' , get_stylesheet_directory_uri().\"/css/motorized-wheelchair.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/special-gifts/'){\n wp_enqueue_style( 'special-gifts' , get_stylesheet_directory_uri().\"/css/special-gifts.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/' || $_SERVER['REQUEST_URI']==''){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'home' , get_stylesheet_directory_uri().\"/css/home.css\", array(),'4', 'all' );\n } \n\n\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/weddings-and-special-events/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'weddings-and-special-events' , get_stylesheet_directory_uri().\"/css/weddings-and-special-events.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/spa/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'spa' , get_stylesheet_directory_uri().\"/css/spa.css\", array(),'4', 'all' );\n }\n\n\n\n\n if($_SERVER['REQUEST_URI']=='/special-offers/'){\n // js de los resorts\n wp_enqueue_script( 'promociones', get_stylesheet_directory_uri().'/js/promociones.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'royal-resorts-specials' , get_stylesheet_directory_uri().\"/css/royal-resorts-specials.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/destinations/our-recommendations/'){\n // js de los resorts\n //wp_enqueue_script( 'promociones', get_stylesheet_directory_uri().'/js/promociones-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'our-recommendations' , get_stylesheet_directory_uri().\"/css/our-recommendations.css\", array(),'4', 'all' );\n }\n\n\n\n if($_SERVER['REQUEST_URI']=='/directory/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'directory' , get_stylesheet_directory_uri().\"/css/directory.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/about-royal-resorts/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'about-royal-resorts' , get_stylesheet_directory_uri().\"/css/about-royal-resorts.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/press-releases/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'press-releases' , get_stylesheet_directory_uri().\"/css/press-releases.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/privacy-policy/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'privacy-policy' , get_stylesheet_directory_uri().\"/css/privacy-policy.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/faq/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'faq' , get_stylesheet_directory_uri().\"/css/faq.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/family-friendly-resorts-cancun/downloads/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'interval-calendar' , get_stylesheet_directory_uri().\"/css/interval-calendar.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/ask-joanna/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'ask-joanna' , get_stylesheet_directory_uri().\"/css/ask-joanna.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/fitness-center/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'fitness-center' , get_stylesheet_directory_uri().\"/css/fitness-center.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/gift-shops/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'gift-shops' , get_stylesheet_directory_uri().\"/css/gift-shops.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/refine-all-inclusive-package/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'all-inclusive-package' , get_stylesheet_directory_uri().\"/css/all-inclusive-package.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/royal-resorts-vacation-experience/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'vacation-experience' , get_stylesheet_directory_uri().\"/css/vacation-experience.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/refine-all-inclusive-package/refine-all-inclusive-rules/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'all-inclusive-rules' , get_stylesheet_directory_uri().\"/css/all-inclusive-rules.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/refine-all-inclusive-package/refine-all-inclusive-policies/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'all-inclusive-rules' , get_stylesheet_directory_uri().\"/css/all-inclusive-rules.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/refine-all-inclusive-package/all-inclusive-faqs/'){\n wp_enqueue_style( 'all-inclusive-rules' , get_stylesheet_directory_uri().\"/css/all-inclusive-rules.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/refine-all-inclusive-package/refine-all-inclusive-rates/'){\n wp_enqueue_style( 'all-inclusive-rates' , get_stylesheet_directory_uri().\"/css/all-inclusive-rates.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/coco-bongo-show-and-disco/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n } \n\n if($_SERVER['REQUEST_URI']=='/luxury-avenue/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/jewelry-collection-last-lifetime/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/the-royal-caribbean-webcam/' || $_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/the-royal-sands-webcam/' || $_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/the-royal-haciendas-webcam/' || $_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/the-royal-cancun-webcam/' || $_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/the-royal-islander-webcam/'){\n\n wp_enqueue_style( 'camaras', get_stylesheet_directory_uri().\"/css/camarassection.css\", array(),'4', 'all' );\n \n }\n\n\n /* 16/03/16 and 17/02/16 */\n if($_SERVER['REQUEST_URI']=='/online-preregistration-details/'){\n wp_enqueue_style( 'online-preregistration-details' , get_stylesheet_directory_uri().\"/css/online-preregistration-details.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/destinations/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/destinations/riviera-maya-destination-guide/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/destinations/cancun-destination-guide/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/destinations/yucatan-destination-guide/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/royal-resorts-signature-club/'){\n wp_enqueue_style( 'royal-resorts-signature-club' , get_stylesheet_directory_uri().\"/css/royal-resorts-signature-club.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/vacation-ownership-rights/'){\n wp_enqueue_style( 'royal-resorts-signature-club' , get_stylesheet_directory_uri().\"/css/royal-resorts-signature-club.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/how-to-become-a-member/'){\n wp_enqueue_style( 'royal-resorts-signature-club' , get_stylesheet_directory_uri().\"/css/royal-resorts-signature-club.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/'){\n\n wp_enqueue_style( 'royal-resorts-signature-club' , get_stylesheet_directory_uri().\"/css/royal-resorts-signature-club.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/activities-sports/'){\n\n wp_enqueue_style( 'activities-sports' , get_stylesheet_directory_uri().\"/css/activities-sports.css\", array(),'4', 'all' ); \n }\n // se agrega el css para el bookin\n wp_enqueue_style( 'bookin' , get_stylesheet_directory_uri().\"/css/bookin.css\", array(),'4', 'all' );\n // se agregan los css del pickadate\n wp_enqueue_style( 'datepicker' , get_stylesheet_directory_uri().\"/css/pickadate/default.css\", array(),'4', 'all' ); \n wp_enqueue_style( 'datepicker-theme' , get_stylesheet_directory_uri().\"/css/pickadate/default.date.css\", array(),'4', 'all' );\n wp_enqueue_style( 'datepicker-themetime' , get_stylesheet_directory_uri().\"/css/pickadate/default.time.css\", array(),'3', 'all' ); \n\n\n wp_enqueue_script( 'jquery' );\n}", "function enqueue_window_animation() {\n wp_register_script( 'hms_jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js', array(), '3.3.1', true );\n // Enqueue Window Animation in Header jQuery 3.3.1 is present.\n\t\twp_enqueue_script( 'window_animation', get_stylesheet_directory_uri() . '/inc/js/window-animation.min.js', array('hms_jquery'), '3.3.1', true );\n }", "function register_scripts_with_jquery(){ \n // Register the script like this for a plugin:\n // wp_register_style( '')\n wp_register_style( 'curastreamStyle', plugins_url( 'assets/css/style.css', __FILE__ ));\n wp_enqueue_style( 'curastreamStyle');\n wp_register_script( 'custom-programUI-script', plugins_url( 'assets/js/customProgramUI.js', __FILE__ ), \"\", \"\", true);\n wp_register_script( 'catagory-management-script', plugins_url( 'assets/js/categoryManagement.js', __FILE__ ), \"\", \"\", true);\n // For either a plugin or a theme, you can then enqueue the script:\n wp_enqueue_script( 'custom-programUI-script' );\n wp_enqueue_script( 'catagory-management-script' );\n}", "function stats_4_s2member_enqueue_scripts() {\r\n\t\t//wp_localize_script( 'wp-stock-ticker', 'stats_4_s2member', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'stNonce' => wp_create_nonce( 'stock-ticker-nonce' ),) ); \r\n\t\t//wp_enqueue_script( 'li-scroller' );\r\n\t}", "function custom_week_header() {\n wp_register_script('customWeekHeader', plugins_url('/js/customWeekHeader.js', __FILE__), array('jquery'));\n wp_enqueue_script('customWeekHeader');\n}", "function the_champ_admin_counter_scripts(){\r\n\t?>\r\n\t<script type=\"text/javascript\"> var theChampSharingAjaxUrl = '<?php echo get_admin_url() ?>admin-ajax.php';</script>\r\n\t<?php\r\n\twp_enqueue_script('the_champ_counter', plugins_url('js/admin/counter/admin.js', __FILE__), array('jquery', 'jquery-ui-sortable'), THE_CHAMP_SS_VERSION);\r\n}", "function hugomitoire_scripts() {\n wp_enqueue_style( 'appStyles', get_template_directory_uri() . '/dist/css/style.min.css' );\n wp_enqueue_script( 'Js', get_template_directory_uri() . '/dist/js/all.js', array(), '1.0.0', true );\n wp_enqueue_script( 'Swiper', get_template_directory_uri() . '/dis/js/all.js', array(), '4.4.2', true);\n}", "function register_Oldsinks_admin_scripts() {\n wp_enqueue_script('widget-Oldsinks-admin', plugins_url('Oldsinksplugins/js/admin.min.js'));\n}", "function ync_student_feedback_scripts() {\n// echo(get_template_directory() : \" . get_template_directory() );\n// echo(get_template_directory_uri() : \" . get_template_directory_uri() );\n// echo(get_stylesheet_directory()() : \" . get_stylesheet_directory() );\n\n // Register the script like this for a theme:\n wp_register_script( 'student-feedback-script', get_site_url() . '/wp-includes/js/alpaca/alpaca-full.js', array( 'jquery' ), '1.1.2' );\n \n // For either a plugin or a theme, you can then enqueue the script:\n wp_enqueue_script( 'student-feedback-script' );\n}", "function jigoshop_admin_coupons_scripts () {\n\twp_register_script('jigoshop-date', jigoshop::plugin_url() . '/assets/js/date.js');\n\twp_register_script('jigoshop-datepicker', jigoshop::plugin_url() . '/assets/js/datepicker.js', array('jquery', 'jigoshop-date'));\n\twp_enqueue_script('jigoshop-datepicker');\n}", "function acitpo_wp_enqueue_script() {\n\twp_register_style('acitpo-theme', get_stylesheet_uri(), filemtime(get_template_directory() . '/style.css'));\n\twp_register_script('acipto-global', get_template_directory_uri() . '/js/global.js', array('jquery'), filemtime(get_template_directory() . '/js/global.js'));\n\n\tif (is_single() && comments_open()) {\n\t\twp_enqueue_script('comment-reply');\n\t}\n\n\tif (!is_admin()) {\n\t\twp_enqueue_style('acitpo-theme');\n\t\twp_enqueue_script('acipto-global');\n\t}\n}", "function ajax_enqueue_script() {\n wp_enqueue_script( 'script_ajax', get_theme_file_uri( '/assets/script/ajax.js' ), array( 'jquery' ), '1.0', true );\n }", "function jehaann_scripts(){\n\n\n wp_register_script('scripts',RutaTema.'/js/scripts.js','','1.0','True');\n wp_enqueue_script('scripts');\n\n\n}", "function pwrstudio_template_scripts() {\n\n // Enque font style file\n // wp_enqueue_style( 'univers_light', get_template_directory_uri() . '/fonts/UniversLTCYR-45Light.css');\n wp_enqueue_style( 'pwrstudio_template-style', get_template_directory_uri() . '/style.css');\n\n if (!is_admin()) {\n\n wp_deregister_script('jquery');\n\n wp_register_script( 'pwr_scripts', get_template_directory_uri() . '/app.min.js', false, '1', true);\n wp_enqueue_script('pwr_scripts');\n\n }\n\n}", "function my_jquery_enqueue(){\n\twp_deregister_script('jquery'); // this deregisters the current jquery included in wordpress\n\twp_register_script('jquery', \"http\" . ($_SERVER['SERVER_PORT'] == 443 ? \"s\" : \"\") . \"://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js\", false, null);\n\twp_enqueue_script('jquery');\n}", "function kinectiv_start_scripts() {\n\twp_enqueue_style('kinectiv-start-style', get_stylesheet_directory_uri() . '/style.min.css', array(), '0.1.0');\n//\twp_enqueue_style('kinectiv-start-vendor-style', get_stylesheet_directory_uri() . '/css/vendor.min.css', array(), '1.0.0');\n \n wp_deregister_script('wp-embed');\n wp_deregister_script('jquery');\n wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-3.6.2.min.js', array(), null, true);\n\twp_enqueue_script('kinectiv-start-script', get_template_directory_uri() . '/js/script.min.js', array('jquery'), '0.1.0', true);\n}", "public function enqueue_scripts()\n {\n if (is_singular($this->token)) {\n wp_register_style($this->token, esc_url($this->assets_url . 'css/chiroquiz.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('animate', esc_url($this->assets_url . 'css/animate.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('roboto', 'https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,900,900italic,300italic,300');\n wp_register_style('robo-slab', 'https://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100');\n wp_enqueue_style($this->token);\n wp_enqueue_style('animate');\n wp_enqueue_style('roboto');\n wp_enqueue_style('roboto-slab');\n\n wp_register_script('icheck', esc_url($this->assets_url . 'js/icheck.js'), ['jquery']);\n wp_register_script($this->token . '-js', esc_url($this->assets_url . 'js/scripts.js'), [\n 'jquery',\n 'icheck'\n ]);\n wp_enqueue_script('icheck');\n wp_enqueue_script($this->token . '-js');\n wp_register_script('platform-email-validator', esc_url($this->assets_url . 'js/platform-email-validator.js'), [\n 'jquery'\n ], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_enqueue_script('platform-email-validator');\n\n $localize = [\n 'ajaxurl' => admin_url('admin-ajax.php'),\n ];\n wp_localize_script($this->token . '-js', 'ChiroQuiz', $localize);\n }\n }", "function blog_scripts() {\n // Register the script\n wp_register_script( 'custom-script', get_stylesheet_directory_uri(). '/js/ajex.js', array('jquery'), false, true );\n \n // Localize the script with new data\n $script_data_array = array(\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'security' => wp_create_nonce( 'load_states' ),\n );\n wp_localize_script( 'custom-script', 'blog', $script_data_array );\n \n // Enqueued script with localized data.\n wp_enqueue_script( 'custom-script' );\n}", "function add_scripts_and_styles()\r\n{\r\n //\twp_enqueue_script( 'ballon-disp', CJ_SCRIPTS_URL.'balloon.js', array( 'jquery' ) );\r\n // enqueue and localise scripts: both of them are necessary\r\n wp_enqueue_script('feed-handle', CJ_SCRIPTS_URL . 'feed.js', array('jquery'));\r\n //wp_enqueue_script('ratings-js-handle', CJ_SCRIPTS_URL . 'like.js', array('jquery'));\r\n\r\n wp_localize_script('feed-handle', 'the_ajax_script', array('ajaxurl' =>\r\n admin_url('admin-ajax.php')));\r\n //read_comment_author_rss();\r\n\r\n}", "public function enqueue_scripts()\n {\n }", "function add_newsfeed_js(){\n wp_register_script('prefix_bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js');\n wp_enqueue_script('prefix_bootstrap');\n}", "function CPWP_load_static()\n{\n\n wp_enqueue_style('bootstrap-css', 'https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css');\n wp_enqueue_script('bootstrap-js', 'https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js', 'jQuery');\n wp_enqueue_style('CPCSS', CPWP_PLUGIN_DIR_URL . 'assets/css/cyberpanel.css');\n wp_enqueue_script('CPJS', CPWP_PLUGIN_DIR_URL . 'assets/js/cyberpanel.js', 'jQuery');\n\n $title_nonce = wp_create_nonce('CPWP');\n\n wp_localize_script('CPJS', 'CPWP', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'nonce' => $title_nonce,\n ));\n}", "function enqueue_frontend_scripts($scripts){\n\t\twp_enqueue_script('secondthought_device_widget_script');\n\t}", "function embed_date_scripts() {\n\techo '<script>{';\n\t$suffix = 'min.js';\n\tif ( defined( 'WP_DEBUG' ) && WP_DEBUG === true ) {\n\t\t$suffix = 'js';\n\t}\n\tinclude __DIR__ . '/js/frontend/date.' . $suffix;\n\techo '}</script>';\n}", "public function public_enqueue_scripts() {\n wp_enqueue_script( 'jquery_focuspoint', plugin_dir_url( __FILE__ ) . 'js/jquery.focuspoint.min.js', array('jquery'), $this->version, true );\n wp_enqueue_script( 'wp_focuslock', plugin_dir_url( __FILE__ ) . 'js/wp-focuslock.js', array('jquery', 'jquery_focuspoint'), $this->version, true );\n }", "function wp_js_plugin() {\n\twp_enqueue_script('wp-plugin-script', plugin_dir_url( __FILE__ ). '/script.js', array(), time());\n wp_enqueue_style( 'wp-plugin-css', plugin_dir_url( __FILE__ ) . '/style.css', array(), time()); \n}", "function myplugin_public_styles_scripts() {\r\n\r\n wp_enqueue_style( 'myplugin-public-style', MYPLUGIN_URL . 'public/css/public.css', '', rand());\r\n\r\n wp_enqueue_script( 'myplugin-public-script', MYPLUGIN_URL . 'public/js/public.js', array('jquery'), rand(), true );\r\n}", "public function enqueue_scripts() {\n\n\t}", "public function enqueue_scripts() {\n\n\t\t// just register the main script, add to the page only when needed\n\t\twp_register_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/simple-tracker-public.js', null, $this->version, true );\n\n\t\t$data = array(\n\t\t\t'nonce' => wp_create_nonce( 'simple-tracker' ),\n\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t'pluginurl' => plugin_dir_url( __FILE__ ),\n\t\t\t'trackerinfourl' => get_permalink( get_page_by_path( 'tracker' ) ),\n\t\t\t'trackerswitchyear' => __('Visualizza tutto l\\'anno', 'simple-tracker'),\n\t\t\t'trackerswitchmonth' => __('Visualizza solo il mese corrente', 'simple-tracker'),\n\t\t\t'trackerinfo' => sprintf(__('Utile questo tracker, vero? <a href=\"%s\" target=\"_blank\">Scopri di più</a>'), get_permalink( get_page_by_path( 'tracker' ) )),\n\t\t\t'monthnames' => array(__('Gennaio', 'simple-tracker'), \n\t\t\t\t\t\t\t\t\t__('Febbraio', 'simple-tracker'), \n\t\t\t\t\t\t\t\t\t__('Marzo', 'simple-tracker'), \n\t\t\t\t\t\t\t\t\t__('Aprile', 'simple-tracker'), \n\t\t\t\t\t\t\t\t\t__('Maggio', 'simple-tracker'), \n\t\t\t\t\t\t\t\t\t__('Giugno', 'simple-tracker'), \n\t\t\t\t\t\t\t\t\t__('Luglio', 'simple-tracker'), \n\t\t\t\t\t\t\t\t\t__('Agosto', 'simple-tracker'), \n\t\t\t\t\t\t\t\t\t__('Settembre', 'simple-tracker'), \n\t\t\t\t\t\t\t\t\t__('Ottobre', 'simple-tracker'), \n\t\t\t\t\t\t\t\t\t__('Novembre', 'simple-tracker'), \n\t\t\t\t\t\t\t\t\t__('Dicembre', 'simple-tracker')),\n\t\t\t'daynames' => array(__('Domenica', 'simple-tracker'),\n\t\t\t\t\t\t\t\t__('Lunedì', 'simple-tracker'), \n\t\t\t\t\t\t\t\t__('Martedì', 'simple-tracker'), \n\t\t\t\t\t\t\t\t__('Mercoledì', 'simple-tracker'), \n\t\t\t\t\t\t\t\t__('Giovedì', 'simple-tracker'), \n\t\t\t\t\t\t\t\t__('Venerdì', 'simple-tracker'), \n\t\t\t\t\t\t\t\t__('Sabato', 'simple-tracker')\n\t\t\t\t\t\t\t\t),\n\t\t);\n\n\t\twp_localize_script( $this->plugin_name, 'SimpleTracker', $data );\n\t}", "function wv_enqueue_scripts() {\n\n wp_enqueue_style('wvDatepickerCSS', WOO_VENDOR__PLUGIN_URL . 'assets/css/jquery-ui.css');\n wp_enqueue_style('wv-style.css', WOO_VENDOR__PLUGIN_URL . 'assets/css/wv-style.css');\n \n //datepicker js file from WordPress\n wp_enqueue_script('jquery-ui-datepicker');\n wp_enqueue_script('wvCustomjs', WOO_VENDOR__PLUGIN_URL . 'assets/js/jquery-custom.js', array('jquery'), '', TRUE);\n }", "public function enqueue_scripts() {\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/deeppress-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function ratchet_scripts_styles() {\n\t\n\tglobal $wp_styles;\n\n\t// Adds Ratchet JavaScript \n\twp_enqueue_script( 'ratchet', get_template_directory_uri() . '/js/ratchet.min.js', array(), null, true );\n\n\t// Loads our main stylesheet.\n\twp_enqueue_style( 'ratchet-style', get_stylesheet_uri() );\n\n}", "function wptheme_script_enqueue () {\n //CSS\n wp_enqueue_style('bootstrap', get_template_directory_uri() . 'css/bootstrap.min.css', array() , '3.3.6', 'all');\n wp_enqueue_style('customstyle', get_template_directory_uri() . 'css/style.css', array() , '1.0.0', 'all');\n //JS\n wp_enqueue_script('jquery');\n wp_enqueue_script('bootstrapjs', get_template_directory_uri() . 'js/bootstrap.min.js', array(), '3.3.6', true); \n wp_enqueue_script('customjs', get_template_directory_uri() . 'js/wptheme.js', array(), '1.0.0', true);\n}", "function level_ajax_enqueue() {\n\twp_enqueue_script(\n\t\t'level-ajax-script', get_template_directory_uri() . '/js/feedback_level.js',array('jquery'));\n\n// The wp_localize_script allows us to output the ajax_url path for our script to use.\n\twp_localize_script('level-ajax-script','level_ajax_obj',array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ));\n}", "public function enqueue_plugin_scripts(){\n\t\twp_enqueue_script( 'agenda-plugin-local-js', plugins_url('js/scripts.js', __FILE__ ), array('jquery'), false, true );\n\t\twp_enqueue_style( 'agenda-plugin-local-css', plugins_url('css/styles.css', __FILE__ ) );\n\t}", "function ac_load_assets(){\n wp_enqueue_script( 'ac_app_js', get_stylesheet_directory_uri() . '/assets/app.js', array('jquery'), '1.0', true );\n}", "public function enqueue_scripts() {\r\n\r\n\t\t}", "function enqueue_auto_click_script() \n{\n wp_register_script('auto_click_script', plugin_dir_url(__FILE__).'/assets/tf-op-auto-click-script.js', array('jquery'), '1.1', true);\n\n wp_enqueue_script('auto_click_script', 9999);\n}", "function rps_add_script()\n{\n\n if (!is_admin()) {\n\n wp_enqueue_script('jquery');\n\n }\n\n}", "function enqueue_scripts() {\n\t\t//Enqueue Cycle\n\t\twp_deregister_script( 'cycle' );\n\t\twp_enqueue_script( 'cycle', plugins_url( 'assets/js/lib/cycle/jquery.cycle2.min.js', __FILE__ ), array( 'jquery' ) );\n\t\t\n\t\t//Active sliders\n\t\twp_enqueue_script('tw-sliders',plugins_url('assets/js/tw-sliders.js',__FILE__),array('jquery','cycle'));\t\n\t\twp_enqueue_style('tw-sliders',plugins_url('assets/css/tw-sliders.css',__FILE__));\n\t}", "protected function enqueue_scripts()\n {\n\n }", "public function enqueueDatepicker() {\r\n\t\twp_enqueue_script( 'jquery-ui-core' );\r\n\t\twp_enqueue_script( 'jquery-ui-slider' );\r\n\t\twp_enqueue_script( 'jquery-ui-datepicker' );\r\n\t\twp_enqueue_script( 'tf-jquery-ui-timepicker-addon', TitanFramework::getURL( '../js/min/jquery-ui-timepicker-addon-min.js', __FILE__ ), array( 'jquery-ui-datepicker', 'jquery-ui-slider' ) );\r\n\t}", "function bwcr_enqueue(){\n wp_enqueue_style( 'bwcr-style', plugin_dir_url( __FILE__ ) . 'style.css', array(), filemtime(plugin_dir_path( __FILE__ ) . 'style.css'), false );\n wp_enqueue_script( 'bwcr-script', plugin_dir_url( __FILE__ ) . 'script.js', array(), filemtime(plugin_dir_path( __FILE__ ) . 'script.js'), false );\n wp_enqueue_style( 'font-awe', 'https://use.fontawesome.com/releases/v5.6.3/css/all.css', array(), '5.6.3', false );\n}", "function asdotrack_skin_scripts() {\n\n\twp_register_script('ajpl-ajax', plugin_dir_url(__FILE__) . 'js/ajax.js', array( 'jquery' ) );\n\twp_localize_script( 'ajpl-ajax', 'ajpl', array(\n\t 'ajaxurl'\t\t=> admin_url( 'admin-ajax.php' ),\n\t 'ajplNonce'\t\t=> wp_create_nonce( 'ajpl-nonce' ),\n\t //'before' \t=> false,\n\t 'after' => false\n\t )\n\t);\n\n\twp_enqueue_script('ajpl-ajax', false, array(), false, true);\n}", "function enqueue_all_scripts() {\n\t//wp_enqueue_script('jquery','/wp-includes/js/jquery/jquery.js','','',true);\n\n\t// adds built in dependencies\n\t$dependencies = array('jquery','jquery-ui-core','jquery-ui-sortable','jquery-effects-core','underscore');\n\n\t// loads main script\n\twp_enqueue_script('main-script', get_bloginfo('template_url').'/js/main.js', $dependencies, '', true );\n\n\t// adds ajax object for ajax requests\n\twp_localize_script( 'main-script', 'ajax_object', array( 'ajax_url' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('ajax-nonce') ) );\n}", "function Flipbox_Enqueue_scripts() \n{\n wp_enqueue_script('script', plugin_dir_url(__FILE__) . 'js/script.js'); \n \n}", "function wolf_share_enqueue_scripts() {\n\n\t$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\t$version = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? time() : WS_VERSION;\n\n\t// Styles\n\twp_enqueue_style( 'wolf-share', WS_CSS . '/share' . $suffix . '.css', array(), $version, 'all' );\n\n\t// Scripts\n\twp_enqueue_script( 'wolf-share', WS_JS . '/share' . $suffix . '.js', array( 'jquery' ), $version, true );\n\n\t// Add JS global variables\n\twp_localize_script(\n\t\t'wolf-share', 'WolfShareJSParams', array(\n\t\t\t'ajaxUrl' => admin_url( 'admin-ajax.php' ),\n\t\t)\n\t);\n}", "static function wp_enqueue_scripts() {\r\n\r\n\t\t// Enqueue CSS file\r\n wp_register_style('stackad', plugins_url('css/stackad.css', __FILE__));\r\n wp_enqueue_style('stackad');\r\n\r\n // Register JS file\r\n wp_register_script('stackad', plugins_url('js/stackad.js', __FILE__), array('jquery'), false, true);\r\n\t}", "public function widget_scripts() {\n\t\twp_register_script( 'elementor-daytoday', plugins_url( '/assets/js/dropdown.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_enqueue_script(\n\t\t\t'elementor-daytoday'\n\t\t);\n\t}", "function theme_enqueue_scripts() {\n\twp_deregister_script('wp-embed'); // Whatever that script is we don't need it\n\twp_deregister_script('jquery'); // We do this to include a more recent version\n\twp_enqueue_script('webfonts', '//cdnjs.cloudflare.com/ajax/libs/webfont/1.6.22/webfontloader.js', '', '', true);\n\twp_register_script('jquery', ('//cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-rc1/jquery.min.js'), false, '', true);\n\twp_enqueue_script('smoothscroll', get_template_directory_uri() . '/includes/smoothscroll.min.js', '', '', true);\n\twp_enqueue_script('main', get_template_directory_uri() . '/includes/main.js', array('jquery'), '', true );\n}", "function ajout_scripts() {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/fonts/font-awesome.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/styles.min.css');\n wp_enqueue_style('font-1', 'https://fonts.googleapis.com/css?family=Open+Sans');\n wp_enqueue_style('font-2', 'https://fonts.googleapis.com/css?family=Roboto');\n\n wp_enqueue_script('messcripts', get_template_directory_uri() . '/assets/js/jquery.min.js');\n wp_enqueue_script('messcripts2', get_template_directory_uri() . '/assets/js/script.js');\n wp_enqueue_style('crdStyles', get_stylesheet_uri());\n\n\n}", "function themeslug_enqueue_script() {\n}", "function enqueue_custom_script() {\n wp_enqueue_script(\"custom-script\", get_stylesheet_directory_uri() . \"/customScript.js\", array(), \"\", true);\n}", "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}", "function cs_calender_enqueue_scripts() {\n wp_enqueue_script('calender_js', get_template_directory_uri() . '/scripts/frontend/fullcalendar.min.js', '', '', TRUE);\n\t wp_enqueue_style('fullcalendar_css', get_template_directory_uri() . '/css/fullcalendar.css');\n}", "function timezones_admin_print_scripts() {\r\n\twp_enqueue_script('prototype');\r\n\twp_enqueue_script('scriptaculous-dragdrop');\r\n\twp_enqueue_script('scriptaculous-effects');\r\n\twp_enqueue_script('datepicker', TIMEZONECALCULATOR_PLUGINURL.'date-picker/js/datepicker.js');\r\n}", "public function enqueue_scripts() {\n wp_enqueue_script(\n 'moment',\n plugins_url('includes/moment.min.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'minidaemon',\n plugins_url('includes/mdn-minidaemon.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'vspi-admin',\n plugins_url('includes/vspi-admin.js', __FILE__),\n array('jquery'),\n VSPI_VERSION,\n false\n );\n }", "public function enqueue_scripts() {\n wp_enqueue_script(\n $this->plugin_name,\n plugin_dir_url(__FILE__) . 'js/update-monitor-admin.js',\n array('jquery'),\n $this->version,\n false\n );\n }", "function wwt_include_javascript_and_css() {\r\n wp_enqueue_script('jquery');\r\n wp_enqueue_script('jquery-ui', plugin_dir_url('js/libs/jquery-ui-1.11.2.min.js', __FILE__), array('jquery'), '1.11.2');\r\n wp_enqueue_script('barcode-component', plugin_dir_url(__FILE__) . 'js/SimpleBarcodeApi.js', array('jquery', 'jquery-ui'));\r\n\r\n wp_enqueue_style('jquery-ui', plugins_url('js/libs/jquery-ui-1.11.2.min.css', __FILE__));\r\n}", "function yomee_assets() {\n\twp_enqueue_script( 'main', get_template_directory_uri() . '/assets/js/main.js',false,'1.1','all');\n\twp_localize_script( 'main', 'wpInfos',\n\tarray( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );\n}", "function scs_admin_head()\n\t{\t\n\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\twp_enqueue_script( 'jquery-ui-tabs' );\n\t\twp_enqueue_script( 'coming-soon', WP_PLUGIN_URL.'/'.basename(dirname(__FILE__)).'/js/init.js' );\n\t\twp_enqueue_style( 'coming-soon', WP_PLUGIN_URL.'/'.basename(dirname(__FILE__)).'/css/admin.css' );\n\t}", "function custom_enqueue_script() {\n\twp_enqueue_script( 'custom-script', get_stylesheet_directory_uri() . '/js/custom.js', array( 'jquery' ), '', true );\n}", "function add_script(){\n\twp_enqueue_script('prefixfree',get_template_directory_uri().'/js/prefixfree.min.js');\t\n\twp_enqueue_script('myscript',get_template_directory_uri().'/js/myscript.js');\n\n}", "function register_js_script() {\n wp_enqueue_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js'); \n \n wp_register_script('bootstrap-js', plugins_url(PLUGIN_FOLDER.'/assets/vendor/bootstrap-3.3.7-dist/js/bootstrap.min.js'));\n\n wp_register_script('jquery2-js', plugins_url(PLUGIN_FOLDER.'/assets/js/jquery2.js')); \n wp_register_script('prism-js', plugins_url(PLUGIN_FOLDER.'/assets/js/prism.js')); \n wp_register_script('underscore-js', plugins_url(PLUGIN_FOLDER.'/assets/js/underscore.js')); \n wp_register_script('moment-js', plugins_url(PLUGIN_FOLDER.'/assets/js/moment.js')); \n wp_register_script('clndr-js', plugins_url(PLUGIN_FOLDER.'/assets/js/clndr.js')); \n wp_register_script('site-js', plugins_url(PLUGIN_FOLDER.'/assets/js/site.js')); \n wp_register_script('main-js', plugins_url(PLUGIN_FOLDER.'/assets/js/main.js')); \n \n\n wp_enqueue_script('jquery-ui-autocomplete', '');\n wp_enqueue_script('main-js');\n wp_enqueue_script('bootstrap-js');\n wp_enqueue_script('jquery2-js');\n wp_enqueue_script('prism-js'); \n wp_enqueue_script('underscore-js'); \n wp_enqueue_script('moment-js'); \n wp_enqueue_script('clndr-js'); \n wp_enqueue_script('site-js'); \n \n}", "function fhpress_style_script() {\n\twp_dequeue_style( 'genericons' );\n\twp_deregister_script('jquery');\n\twp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3');\n\twp_enqueue_script('jquery');\n\t\n\twp_enqueue_style( \n\t\t'fhpress-style', \n\t\tget_stylesheet_directory_uri() . '/style.min.css',\n\t\tarray() \n\t);\n\t\n \n\t\n\twp_enqueue_script(\n\t\t'fhpressplugins',\n\t\tget_stylesheet_directory_uri() . '/js/final.min.js',\n\t\tarray( 'jquery' )\n\t);\n}", "function jakob_script_enqueue() {\r\n wp_enqueue_style('customstyle', get_template_directory_uri().'/css/jakob.css', false, '1.0.0', 'all');\r\n wp_enqueue_script('customjs-jakob', get_template_directory_uri().'/js/jakob.js', array(), '1.0.0', true);\r\n wp_enqueue_script('customjs-contact', get_template_directory_uri().'/js/contact-form.js', array(), '1.0.0', true);\r\n wp_enqueue_script('font-awesome', 'https://use.fontawesome.com/releases/v5.0.4/js/all.js', array(), '1.0.0', true);\r\n}", "function niko_register_scripts() {\n $theme_version = wp_get_theme()->get( 'Version' );\n //Подключение стилей\n wp_deregister_script('jquery');\n wp_enqueue_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js', array(), null, true );\n wp_enqueue_script( 'aos', get_template_directory_uri() . '/assets/js/aos.js', array('jquery'), $theme_version, true );\n\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'magnific-popup', get_template_directory_uri() . '/assets/js/jquery.magnific-popup.min.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'validate', get_template_directory_uri() . '/assets/js/jquery.validate.min.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'smooth-scroll', get_template_directory_uri() . '/assets/js/jquery.smooth-scroll.min.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'custom', get_template_directory_uri() . '/assets/js/custom.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'valid-ajax', get_template_directory_uri() . '/assets/js/valid-ajax.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'jquery-maskedinput', get_template_directory_uri() . '/assets/js/jquery.maskedinput.min.js', array('jquery'), $theme_version, true );\n wp_enqueue_script( 'goodshare', 'https://cdn.jsdelivr.net/jquery.goodshare.js/3.2.8/goodshare.min.js', array('jquery'), $theme_version, true );\n}", "public function wp_enqueue_scripts()\n\t{\n\t\twp_enqueue_script( 'tiFyPluginsDnsChecker', self::tFyAppUrl() .'/DnsChecker.js', array(), '161111', true );\n\t}", "public function enqueue_scripts()\n {\n }", "public function enqueue() {\n\t\twp_enqueue_script( 'jquery-ui-button' );\n\t}", "function tz_enqueue_scripts() {\n // Register our scripts\n\twp_register_script('validation', 'http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js', 'jquery');\n\twp_register_script('superfish', get_template_directory_uri() . '/js/superfish.js', 'jquery');\n\twp_register_script('tz_custom', get_template_directory_uri() . '/js/jquery.custom.js', 'jquery', '1.0', TRUE);\n\twp_register_script('jPlayer', get_template_directory_uri() . '/js/jquery.jplayer.min.js', 'jquery', '2.0', TRUE);\n\twp_register_script('slides', get_template_directory_uri() . '/js/slides.min.jquery.js', 'jquery', '1.1.9', TRUE);\n\t\n\t// Register our styles\n wp_register_style('merriweather', 'http://fonts.googleapis.com/css?family=Merriweather:700', '', '', 'screen' );\n\t\n\t// Enqueue our scripts\n\twp_enqueue_script('jquery');\n wp_enqueue_script('jquery-ui-core');\n wp_enqueue_script('jquery-ui-tabs');\n wp_enqueue_script('jquery-ui-accordion');\n\twp_enqueue_script('superfish');\n\twp_enqueue_script('tz_custom');\n wp_enqueue_script('jPlayer');\n wp_enqueue_script('slides');\n\tif( is_page_template('template-contact.php') ) { wp_enqueue_script('validation'); }\n\tif( is_singular() ) { wp_enqueue_script( 'comment-reply' ); } // loads the javascript required for threaded comments \n\t\n // Enqueue our styles\n if( is_home() || is_page() || has_post_format('link') || has_post_format('quote') || is_search() ) {\n wp_enqueue_style('merriweather');\n }\n \n}", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }" ]
[ "0.6992234", "0.6499352", "0.64374214", "0.64326483", "0.6426292", "0.6425722", "0.6418166", "0.6372247", "0.637026", "0.636368", "0.6354725", "0.63387126", "0.6337767", "0.63250667", "0.6319121", "0.6316091", "0.63114905", "0.63013506", "0.62790394", "0.6278932", "0.62735635", "0.62600803", "0.6256443", "0.6246486", "0.62452406", "0.6230769", "0.6229186", "0.6221079", "0.62092346", "0.6208133", "0.62043303", "0.62020826", "0.61967695", "0.6194386", "0.6181172", "0.6176601", "0.6176239", "0.6160819", "0.61507463", "0.6150237", "0.61486685", "0.6145093", "0.61373997", "0.613621", "0.6133584", "0.6130628", "0.6123893", "0.6115542", "0.6115377", "0.61141497", "0.6111829", "0.61057526", "0.6105172", "0.6095014", "0.6090753", "0.6089031", "0.60868347", "0.6086738", "0.60787225", "0.60750294", "0.6074697", "0.6073627", "0.6072863", "0.60717535", "0.6070052", "0.6069971", "0.60689", "0.6067416", "0.60661215", "0.6064693", "0.60625756", "0.60494834", "0.60487986", "0.60476226", "0.6041859", "0.6039512", "0.60364074", "0.60314155", "0.602485", "0.60223985", "0.6020334", "0.6013491", "0.6012296", "0.6010205", "0.600327", "0.60015655", "0.60010225", "0.59999293", "0.59985286", "0.59958994", "0.5995023", "0.59913933", "0.5988069", "0.5986757", "0.5986148", "0.59847176", "0.5984403", "0.5984204", "0.5983948", "0.5983368" ]
0.81571126
0
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->addSql('CREATE TABLE customer (id INT AUTO_INCREMENT NOT NULL, company_id INT NOT NULL, name VARCHAR(32) NOT NULL, surname VARCHAR(32) NOT NULL, phone VARCHAR(24) NOT NULL, email VARCHAR(64) NOT NULL, comment LONGTEXT NOT NULL, INDEX IDX_81398E09979B1AD6 (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('ALTER TABLE customer ADD CONSTRAINT FK_81398E09979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }", "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }", "public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}", "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n }", "public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }", "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }", "public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "public function preUp()\n {\n }", "public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }", "public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }", "public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }", "public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }", "public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}", "public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }", "public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}", "public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }", "public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }", "public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }", "public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }", "public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }", "public function up() { return $this->run('up'); }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }", "public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}", "public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }", "public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }", "public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}", "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }", "public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}", "public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}", "public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }", "public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }", "public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}", "public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }", "public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}", "public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }", "public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }", "public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}", "public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}", "public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}", "public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n// $import->import();\n\t}", "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}", "public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}", "public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }", "public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }", "public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}", "public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}", "public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }", "public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }", "public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}", "public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }", "public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }", "public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}", "public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}", "public function up()\n\t{\n Laravel\\Database\\Schema::create(\"orbs\", function($table){\n $table->increments(\"id\");\n $table->string(\"name\");\n $table->string(\"description\");\n $table->integer(\"coins\");\n $table->integer(\"points\");\n $table->integer(\"min_level\");\n $table->integer(\"max_level\");\n $table->integer(\"owner_character\");\n $table->integer(\"acquisition_time\");\n $table->integer(\"last_attacker\");\n $table->integer(\"last_attack_time\");\n $table->string(\"image\");\n });\n\t}" ]
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.7329024", "0.7313519", "0.7298817", "0.72950184", "0.72917736", "0.7291469", "0.72913444", "0.72849613", "0.72839737", "0.7272078", "0.7271878", "0.72659117", "0.7262893", "0.7261672", "0.7256839", "0.72505474", "0.7249633", "0.72441125", "0.724062", "0.72376186", "0.7218244", "0.72177947", "0.72046006", "0.7203395", "0.7196059", "0.7191219", "0.7189963", "0.7177052", "0.71761394", "0.7167738", "0.7164105", "0.7164105", "0.7159096", "0.7147647", "0.7136521", "0.7129768", "0.7124664", "0.7123368", "0.71168584", "0.7104628", "0.7104628", "0.7104618", "0.7097006", "0.70931643", "0.70886755", "0.7087018", "0.7086326", "0.70830804", "0.70829463", "0.70780045", "0.70702124", "0.70690626", "0.7066111", "0.7062268", "0.7058938", "0.705882", "0.70556235", "0.70549136", "0.7054758", "0.70498437", "0.70483595", "0.7047308", "0.7045881", "0.70445794", "0.7043173", "0.703882", "0.7038126", "0.703674", "0.7033728", "0.7032356", "0.7031423", "0.70257956", "0.70142514", "0.70101255", "0.7006208", "0.6988486", "0.6984963", "0.69629973", "0.69612974", "0.69587934", "0.6957519" ]
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->addSql('DROP TABLE customer'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }", "public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down(){\n $this->dropTable('users');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}", "public function down()\n\t{\n\t\t// nothing to do here.\n\t}", "public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }", "public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}", "public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}", "public function down() \n {\n \n }", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('education');\n\t}", "public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "public function down()\n {\n\tSchema::drop('quizzes');\n }", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "public function down ()\n {\n }", "abstract public function down();", "abstract public function down();", "abstract public function down();", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }", "public function down() {\n\n\t}", "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "public function down(): void\n {\n // Remove your data\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function down()\n {\n\tSchema::drop('activities');\n }", "public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }", "public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }", "public function down()\n {\n }", "public function down()\n {\n }", "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n\t\t//return false;\n\t}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}", "public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }", "public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}", "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}", "protected abstract function do_down();", "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}", "public function safeDown()\n {\n $this->down();\n }", "public function safeDown()\n {\n $this->down();\n }", "public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}", "public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}", "public function safeDown()\r\n {\r\n $this->down();\r\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "public function down() {\n\t}", "public function down() {\n\t}", "public function down() {\n\t}", "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}", "public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}", "public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}", "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}" ]
[ "0.7950277", "0.78636813", "0.76065636", "0.7493955", "0.7320625", "0.7245268", "0.7187498", "0.71543235", "0.715298", "0.7141911", "0.7135835", "0.71214414", "0.71154845", "0.71057886", "0.7098064", "0.70800334", "0.7078775", "0.70729095", "0.7068331", "0.7066272", "0.7053364", "0.7053364", "0.7042174", "0.7042174", "0.7042174", "0.7041765", "0.7040102", "0.7028846", "0.70253754", "0.7021679", "0.6988633", "0.6986877", "0.6978061", "0.6971848", "0.6944203", "0.6944203", "0.6944203", "0.6942135", "0.6941429", "0.6939214", "0.6935277", "0.69334567", "0.6928689", "0.6924838", "0.6924794", "0.6913486", "0.6902361", "0.6897891", "0.6897845", "0.6897824", "0.6897824", "0.68886673", "0.688262", "0.6874051", "0.6869844", "0.6863713", "0.6858435", "0.68545175", "0.68440175", "0.6842142", "0.6836981", "0.6836124", "0.6834763", "0.68303466", "0.68297166", "0.68282366", "0.6826686", "0.6824025", "0.68185335", "0.6811099", "0.68078107", "0.68056506", "0.68056506", "0.6789167", "0.67755204", "0.67742497", "0.6765081", "0.67597127", "0.67596203", "0.67564446", "0.67564446", "0.67564446", "0.6753443", "0.6753351", "0.6753351", "0.6753351", "0.6752681", "0.674581", "0.6743746", "0.67387754", "0.6733766", "0.67331296", "0.6731279", "0.67302275", "0.6727377", "0.67273724", "0.672722", "0.672607", "0.67173517", "0.67139125", "0.671303" ]
0.0
-1
Display a listing of the resource.
public function index() { return view('admin::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() { return view('admin::create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n //\n return view('form');\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 {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create(){\n return view('form.create');\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 {\n return view('saldo.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\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 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 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 return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\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 {\n return view(\"familiasPrograma.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 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}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}" ]
[ "0.7594622", "0.7594622", "0.7588457", "0.7580005", "0.75723624", "0.7499764", "0.7436887", "0.74322647", "0.7387517", "0.735172", "0.73381543", "0.73117113", "0.72958225", "0.7280436", "0.7273787", "0.72433424", "0.7230227", "0.7225085", "0.71851814", "0.71781176", "0.7174025", "0.7149406", "0.71431303", "0.7142905", "0.7136737", "0.712733", "0.7122102", "0.71148264", "0.71148264", "0.71148264", "0.7111841", "0.7092733", "0.70843536", "0.70822084", "0.7079442", "0.70571405", "0.70571405", "0.7055195", "0.70391846", "0.7039114", "0.7035626", "0.7033991", "0.70300245", "0.7026507", "0.7026417", "0.7019451", "0.7017105", "0.7004775", "0.70031846", "0.6999904", "0.6995238", "0.6994825", "0.699354", "0.6988824", "0.6986871", "0.6965804", "0.6965542", "0.69560695", "0.69515944", "0.6950682", "0.6947703", "0.69433117", "0.6941539", "0.6939613", "0.69377476", "0.69377476", "0.693678", "0.69344354", "0.69314486", "0.6927608", "0.69264024", "0.6922966", "0.69181216", "0.69150716", "0.6911192", "0.69095594", "0.69092506", "0.6907887", "0.69018227", "0.69008595", "0.69006085", "0.6900209", "0.68949944", "0.6892768", "0.6891944", "0.6891552", "0.6891552", "0.6891443", "0.68886423", "0.6888326", "0.68856037", "0.68835604", "0.68813664", "0.6878345", "0.6876079", "0.6873206", "0.6873183", "0.687048", "0.687014", "0.686966", "0.68695843" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $id = (string)Str::uuid(); $deviceSite = DeviceSite::create([ 'id' => $id, 'site_id'=> $request->site_id, 'device_name' => $request->device_name, 'device_id' => $request->masterListDeviceId, 'device_serial' => empty($request->device_serial) ? Null : $request->device_serial, 'device_software_version' => empty($request->device_software_version) ? Null : $request->device_software_version ]); return response()->json([$deviceSite,'success'=>'Device data is added successfully']); }
{ "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 specified resource.
public function show($id) { return view('admin::show'); }
{ "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 }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\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 show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function show($id) {}", "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 show(Question $question) // the show part requires an id (default)\n {\n //Show function does Route Model Binding, is the simple way of telling that this\n // function provides the id of the question by default\n return new QuestionResource($question);\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 return auth()->user()->getResource();\n }", "public function show($id)\n { \n \n }", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show($id)\n {\n // ..\n }", "public function show(Resena $resena)\n {\n }", "public function show($id)\n {\n $obj = Obj::where('id',$id)->first();\n \n $this->authorize('view', $obj);\n if($obj)\n return view('appl.'.$this->app.'.'.$this->module.'.show')\n ->with('obj',$obj)->with('app',$this);\n else\n abort(404);\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 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)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n // Code Goes Here\n }", "public function show(Show $show)\n {\n $this->authorize('basicView', $show);\n\n if (Auth::user()->can('view', $show)) {\n return $show->with(['hosts', 'invitees'])->first();\n }\n\n return new ShowResource($show);\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 }", "public function show($id) {\n\n\t}", "public function show($id){\n \n }", "public function show($id) {\n }", "public function show($id)\n {\n\n }", "public function show($id) {\n //\n }", "public function show($id) {\n //\n }", "public function show($id) {\n //\n }", "public function show($id) {\r\n //\r\n }", "public function show($id) {\r\n //\r\n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show($id)\r\r\n {\r\r\n //\r\r\n }", "public function show($id)\r\r\n {\r\r\n //\r\r\n }", "public function show($id)\r\n {\r\n \r\n }", "public function show($id)\n {\n \n \n }", "public function show($id)\n {\n \n \n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }" ]
[ "0.86625683", "0.8656298", "0.7061081", "0.7016237", "0.69712675", "0.693585", "0.6916958", "0.68928856", "0.6802355", "0.66791755", "0.6661057", "0.6640048", "0.66189003", "0.66071963", "0.6594754", "0.65945184", "0.65812767", "0.65802205", "0.6552344", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.6540908", "0.6536351", "0.6528191", "0.6520638", "0.65174145", "0.65161794", "0.65081596", "0.6507456", "0.6507456", "0.6507456", "0.6506214", "0.6506214", "0.65002257", "0.65002257", "0.65002257", "0.65002257", "0.64964366", "0.64964366", "0.6491058", "0.6491058", "0.6491058", "0.6491058", "0.6489413", "0.6489413", "0.64893836", "0.6488436", "0.6481886", "0.6480796", "0.6480796", "0.6480326", "0.6477329", "0.6475613", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { if ($id) { $record = DeviceSite::find($id); return response()->json([$record]); } }
{ "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) { $data = array( 'device_name' => $request->device_name, 'device_serial' => $request->device_serial, 'device_software_version' => $request->device_software_version ); DeviceSite::where('id', $request->device_id)->update($data); $result = DeviceSite::where('site_id', $request->site_id)->get(); return response()->json($result); }
{ "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(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(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(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);", "public function update($request, $id);", "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 }", "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 }", "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);", "abstract public function put($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 updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\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 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 static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public abstract function update($object);", "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($id, $input);", "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(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);", "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 put($path, $data = null);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\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(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() {\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 $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.7424578", "0.7062392", "0.7056844", "0.6897447", "0.65815884", "0.6451359", "0.634689", "0.62107086", "0.6145251", "0.6121901", "0.6115076", "0.61009926", "0.60885817", "0.6053816", "0.6018965", "0.6007763", "0.5973282", "0.59455335", "0.593951", "0.59388787", "0.5892445", "0.58630455", "0.58540666", "0.58540666", "0.5851948", "0.5816257", "0.58070177", "0.5752376", "0.5752376", "0.57359827", "0.5723941", "0.57152426", "0.56958807", "0.5691061", "0.56881654", "0.5669518", "0.5655434", "0.5651897", "0.56480426", "0.5636727", "0.56354004", "0.5633156", "0.5632135", "0.5629063", "0.5621358", "0.56089175", "0.5602031", "0.55927175", "0.5582773", "0.558176", "0.5581365", "0.5575607", "0.5571989", "0.55672973", "0.5562929", "0.55623275", "0.55602384", "0.55602384", "0.55602384", "0.55602384", "0.55602384", "0.55598706", "0.55560726", "0.55558753", "0.5554241", "0.55534166", "0.5552986", "0.55440396", "0.55438566", "0.5540619", "0.55394524", "0.5536144", "0.5535339", "0.5534803", "0.5524157", "0.55188423", "0.55163455", "0.55135876", "0.5509835", "0.5507501", "0.55068344", "0.55034274", "0.5501476", "0.55010915", "0.5499286", "0.5497852", "0.54958415", "0.54958415", "0.5494513", "0.5494261", "0.54935366", "0.54931587", "0.54917634", "0.54836094", "0.5479455", "0.5478885", "0.5478268", "0.54654354", "0.54645413", "0.5461025", "0.54568535" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Request $request,$id) { if ($request->ajax()) { $delete = DeviceSite::find($id); $delete->delete(); return response()->json(['success'=>'Device Site is deleted successfully.']); } }
{ "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
Show Devices by Site ID
public function showDeviceBySiteId(Request $request,$id) { if ($request->ajax()) { $results = DeviceSite::where('site_id',$id)->get(); return view('admin::sites.device-sites',compact('results')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Site $site)\n {\n //\n }", "public function show(Site $site)\n {\n //\n }", "public function show($id)\n {\n $devices = Device::all();\n $user = User::find($id);\n $userDevices = $user->devices;\n $devices = $devices->pluck('name', 'device_id');\n\n\n return view('inc.deviceManagement')->with(['devices' => $devices,\n 'userDevices' => $userDevices, 'user' => $user]);\n }", "public function index($site_id)\n {\n $this->load->model('data_model');\n \n $this->dso->add_to(\n 'breadcrumbs', \n base_url() . 'site/index/' . $site_id, 'Visualize site'\n );\n $this->dso->page_title = 'Site Data Visualization';\n \n $site = $this->site_model->get($site_id);\n \n $totals = $this->data_model->get_total_sessions('site', $site_id);\n $this->dso->onion_width = $totals->max_width > LAYOUT_WIDTH \n ? LAYOUT_WIDTH\n : $totals->max_width;\n $this->dso->onion_height = $totals->max_width > LAYOUT_WIDTH \n ? LAYOUT_WIDTH / $totals->max_width * $totals->max_height\n : $totals->max_height;\n \n $set1 = $this->data_model->get_for_site($site_id, TRUE, 'width DESC');\n $devices1 = $this->data_model->render_set($set1, $totals);\n $this->dso->devices1 = $devices1; \n \n $set2 = $this->data_model->get_for_site($site_id, TRUE);\n $devices2 = $this->data_model->render_set($set2, $totals);\n $this->dso->devices2 = $devices2; \n \n \n $this->dso->site = $site;\n \n show_view('site/index', $this->dso->all);\n }", "public function show($id)\n {\n //\n $device = Devices::with('devicefunction','recparams','devicefunction.params')->find($id);\n if($this->user->id == $device->user_id){\n return view('workspace.device_detail',['device' =>$device]);\n }else{\n return abort(403);\n }\n }", "public function show(Siteinfo $siteinfo)\n {\n //\n }", "public function show(sites $sites)\n {\n //\n }", "public function show($id)\n {\n //\n\n\n $sitios = site::find($id);\n\n // dd($id);\n \n return view('sites.show', compact('sitios'));\n }", "public function devices()\n {\n $this->db->select('*');\n $this->db->select('*');\n $query = $this->db->get('analytics');\n \n }", "public function show(Device $device)\n {\n //\n }", "public function show(Device $device)\n {\n //\n }", "public function show(Device $device)\n {\n //\n }", "public function for_site($site_id = '')\n {\n }", "public function show(SiteInfo $siteInfo)\n {\n //\n }", "public function show($id)\n {\n $d = Device::find($id);\n\n return view('devices.show' , compact( 'd'));\n }", "public function show($id)\n {\n //\n //return $id;\n $index_loc = DB::table('mosdevices')->where('location', '=', '22.994347,120.218050')->first()->device_number;\n $mosdata=DB::table('mosdatas')->where('data_device_number', '=', $index_loc)->get();\n return view('layout.mos_device_distributed_highchart',compact('mosdata'));\n }", "private function getOneNotifDeviceByDeviceId() {\n $this->user_panel->checkAuth();\n $this->notif_device->findOneByDeviceId();\n }", "function widgetopts_tab_devices( $args ){ ?>\n <li class=\"extended-widget-opts-tab-devices\">\n <a href=\"#extended-widget-opts-tab-<?php echo $args['id'];?>-devices\" title=\"<?php _e( 'Devices', 'widget-options' );?>\" ><span class=\"dashicons dashicons-smartphone\"></span> <span class=\"tabtitle\"><?php _e( 'Devices', 'widget-options' );?></span></a>\n </li>\n <?php\n }", "public function single($siteid) {\n return siteinfo($siteid);\n }", "public function indexAction(){\n \n $this->_view->display('device_list.tpl');\n }", "public function show($id)\n {\n // $isdh = Isdh::with('title_isdh')->where('id', $id)->first();\n $isdh = Isdh::find($id);\n \treturn view('website.isdh_single', compact('isdh'));\n }", "abstract public function listDevices();", "public function show($id)\n {\n return view('setups::systemInformation.show');\n }", "public function actionView($id)\n {\n if(isset(Yii::$app->user->identity->id)){\n if(SiteController::findCom(16)){\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }\n else {\n $this->redirect(['site/error']);\n }\n }else {\n $this->redirect(['site/login']);\n }\n}", "public function testDevicesIndex()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/devices')\n ->assertSee('Devices')\n ->assertSee('Kitchen Fridge')\n ->assertSee('Thermostat')\n ->assertSee('Gas Meter')\n ->assertSee('Water Meter')\n ->assertSee('Electricity Meter');\n });\n }", "public function show($id)\n {\n if(!hasTask('admin/drivers/view')){\n return view('errors.404');\n }\n //Get driver details\n $drivers = Drivers::find($id);\n if(!count($drivers))\n {\n Session::flash('message', 'Invalid Driver Details'); \n return Redirect::to('admin/drivers');\n }\n SEOMeta::setTitle('View Driver - '.$this->site_name);\n SEOMeta::setDescription('View Driver - '.$this->site_name);\n return view('admin.drivers.show')->with('data', $drivers);\n }", "public function show(DeviceType $deviceType)\n {\n //\n }", "public function show($id) {\n $website = Website::find($id);\n return view('website.show', compact('webiste'));\n }", "public function edit($id)\n {\n if ($id)\n {\n $record = DeviceSite::find($id);\n return response()->json([$record]);\n }\n }", "function widgetopts_tabcontent_devices( $args ){\n $desktop = '';\n $tablet = '';\n $mobile = '';\n $options_role = '';\n if( isset( $args['params'] ) && isset( $args['params']['devices'] ) ){\n if( isset( $args['params']['devices']['options'] ) ){\n $options_role = $args['params']['devices']['options'];\n }\n if( isset( $args['params']['devices']['desktop'] ) ){\n $desktop = $args['params']['devices']['desktop'];\n }\n if( isset( $args['params']['devices']['tablet'] ) ){\n $tablet = $args['params']['devices']['tablet'];\n }\n if( isset( $args['params']['devices']['mobile'] ) ){\n $mobile = $args['params']['devices']['mobile'];\n }\n }\n ?>\n <div id=\"extended-widget-opts-tab-<?php echo $args['id'];?>-devices\" class=\"extended-widget-opts-tabcontent extended-widget-opts-tabcontent-devices\">\n <p>\n <strong><?php _e( 'Hide/Show', 'widget-options' );?></strong>\n <select class=\"widefat\" name=\"<?php echo $args['namespace'];?>[extended_widget_opts][devices][options]\">\n <option value=\"hide\" <?php if( $options_role == 'hide' ){ echo 'selected=\"selected\"'; }?> ><?php _e( 'Hide on checked devices', 'widget-options' );?></option>\n <option value=\"show\" <?php if( $options_role == 'show' ){ echo 'selected=\"selected\"'; }?>><?php _e( 'Show on checked devices', 'widget-options' );?></option>\n </select>\n </p>\n <table class=\"form-table\">\n <tbody>\n <tr valign=\"top\">\n <td scope=\"row\"><strong><?php _e( 'Devices', 'widget-options' );?></strong></td>\n <td>&nbsp;</td>\n </tr>\n <tr valign=\"top\">\n <td scope=\"row\"><span class=\"dashicons dashicons-desktop\"></span> <label for=\"extended_widget_opts-<?php echo $args['id'];?>-devices-desktop\"><?php _e( 'Desktop', 'widget-options' );?></label></td>\n <td>\n <input type=\"checkbox\" name=\"<?php echo $args['namespace'];?>[extended_widget_opts][devices][desktop]\" value=\"1\" id=\"extended_widget_opts-<?php echo $args['id'];?>-devices-desktop\" <?php if( !empty( $desktop ) ){ echo 'checked=\"checked\"'; }?> />\n </td>\n </tr>\n <tr valign=\"top\">\n <td scope=\"row\"><span class=\"dashicons dashicons-tablet\"></span> <label for=\"extended_widget_opts-<?php echo $args['id'];?>-devices-table\"><?php _e( 'Tablet', 'widget-options' );?></label></td>\n <td>\n <input type=\"checkbox\" name=\"<?php echo $args['namespace'];?>[extended_widget_opts][devices][tablet]\" value=\"1\" id=\"extended_widget_opts-<?php echo $args['id'];?>-devices-table\" <?php if( !empty( $tablet ) ){ echo 'checked=\"checked\"'; }?> />\n </td>\n </tr>\n <tr valign=\"top\">\n <td scope=\"row\"><span class=\"dashicons dashicons-smartphone\"></span> <label for=\"extended_widget_opts-<?php echo $args['id'];?>-devices-mobile\"><?php _e( 'Mobile', 'widget-options' );?></label></td>\n <td>\n <input type=\"checkbox\" name=\"<?php echo $args['namespace'];?>[extended_widget_opts][devices][mobile]\" value=\"1\" id=\"extended_widget_opts-<?php echo $args['id'];?>-devices-mobile\" <?php if( !empty( $mobile ) ){ echo 'checked=\"checked\"'; }?> />\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n<?php\n}", "function logger_device_edition_page($id) {\n\n $query = db_select('logger_devices', 'd')\n ->fields('d', array('device', 'serial', 'description'))\n ->condition('d.device', $id);\n\n $query->join('logger_device_type', 't', 'd.type_id = t.id');\n $query->addField('t', 'name', 'type_name');\n\n $query->join('logger_device_firmware', 'f', 'd.firmware_id = f.id');\n $query->addField('f', 'version', 'firmware_version');\n\n $device = $query->execute()->fetchObject();\n\n $form = drupal_get_form('logger_device_form', $device);\n\n return drupal_render($form);\n}", "public function show(DeviceTypes $deviceTypes)\n {\n //\n }", "public function show($id)\n {\n $site = Site::find($id);\n return view('admin.site-show',compact('site'));\n }", "function process_devs_disp($host_data)\n{\n global $id;\n\n $i = 0;\n $table = \"\";\n\n $arr = array ('command'=>'devs','parameter'=>'');\n $devs_arr = send_request_to_host($arr, $host_data);\n\n if ($devs_arr != null)\n {\n $id = $host_data['id'];\n while (isset($devs_arr['DEVS'][$i]))\n {\n $table .= process_dev_disp($devs_arr['DEVS'][$i]);\n $i++;\n }\n }\n\n return $table;\n}", "function devindavid_site_info() {\n\t\tdo_action( 'devindavid_site_info' );\n\t}", "public function display_app_id() {\n\t\t// Now grab the options based on what we're looking for\n\t\t$opts = get_option( 'emcl_settings' );\n\t\t$emc_client_id = isset( $opts['emc_client_id'] ) ? $opts['emc_client_id'] : '';\n\t\t// And display the view\n\t\tinclude_once $this->views . 'settings-app-client-id-field.php';\n\t}", "public function viewWebsite($id)\n {\n $websites = Website::where('id',$id)->get();\n // SELECT product_has_website.product_id, products.product, product_has_website.price, websites.website FROM product_has_website, websites, products \n // where websites.id = product_has_website.website_id and products.id = product_has_website.product_id\n return view('website', ['id' => $id, 'websites' => $websites]);\n }", "public function index()\n {\n $devices = $this->device->orderBy('id','desc')->paginate($this->paginate);\n return view('dashboard.device.index',compact('devices'));\n }", "public function showInDeviceList()\n {\n return true;\n }", "public function show($id)\n {\n $device = Device::where('bridge_id', $id);\n if ($device->first()) {\n $bridge = Bridge::join('devices', 'bridges.id', '=', 'devices.bridge_id')\n ->join('user_bridge', 'bridges.id', '=', 'user_bridge.bridge_id')\n ->where('bridges.id', $id)\n ->select('bridges.*', 'devices.ttn_dev_id')\n ->firstOrFail();\n } else {\n $bridge = Bridge::join('user_bridge', 'bridges.id', '=', 'user_bridge.bridge_id')\n ->where('bridges.id', $id)\n ->firstOrFail();\n }\n\n $sensors = $this->getSensorsOfBridge($id);\n\n return view('dashboard.show', compact('bridge', 'sensors'));\n }", "public function for_site($site_id = \\null)\n {\n }", "private function GetDevices($partyid) {\n\t\t\t\tglobal $JUKE;\n\n\t\t\t\tglobal $PARTY;\n\t\t\t\t$row = $PARTY->FindPartyWithID($partyid);\n\t\t\t\t\n\t\t\t\t$result = $JUKE->GetRequest(\n\t\t\t\t\t\"https://api.spotify.com/v1/me/player/devices\",\n\t\t\t\t\tarray( \n\t\t\t\t\t\t\"Content-Type: application/json\",\n\t\t\t\t\t\t\"Accept: application/json\",\n\t\t\t\t\t\t\"Authorization: Bearer \" . $row[\"AuthAccessToken\"]\n\t\t\t\t\t),\n\t\t\t\t\tNULL,\n\t\t\t\t\tNULL,\n\t\t\t\t\tNULL\n\t\t\t\t);\n\t\t\t\tprint($result);\n\t\t\t}", "public function index()\n {\n $devices = Devices::with('devicefunction','devicefunction.params')->where('user_id',$this->user->id)->paginate(10);\n return view('workspace.device_list',['devices' =>$devices]);\n }", "public function show($id)\n {\n $software = Software::findOrFail($id);\n // $developers = Developer::all();\n // $distributors = Distributor::all();\n\n return view('softwares.show', [\n 'software' => $software,\n ]);\n }", "public function show(Website $website)\n {\n //\n }", "public function actionIndex()\n {\n\t\t$id = 1;\n return $this->render('/backend/siteinfo/view', [\n 'model' => $this->findModel($id),\n ]);\n }", "public function testViewDevice()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/devices')\n ->clickLink('Kitchen Fridge')\n ->assertPathIs('/device/1')\n ->assertSee('Kitchen Fridge')\n ->assertSee('Target Temperature')\n ->assertSee('Current Temperature')\n ->assertSee('Status')\n ->assertSee('Graphs');\n });\n }", "public function show($id)\n {\n return displaySPA();\n }", "public function show(Device $device)\n {\n // in the backend it will find the device from the Device Elequont Model\n // and it will search by id by default\n\n return $device;\n\n }", "public function diviroids_conditional_devices($atts, $content = null)\n {\n extract(shortcode_atts(array( 'show' => true, 'devices' => null ), $atts));\n\n // no valid devices\n if (empty($devices)) {\n return;\n }\n\n // Determine Action\n $show = DiviRoids_Library::parse_boolean_value($show);\n\n // Determine Match\n require_once DIVIROIDS_PLUGIN_LIB_DIR . 'Mobile_Detect.php';\n $devices = explode(',', $devices);\n $detect = new Mobile_Detect;\n $match = false;\n\n foreach ($devices as $device) {\n if ('desktop' === $device) {\n $match = !$detect->isMobile();\n } elseif ('mobile' === $device) {\n $match = $detect->isMobile();\n } elseif ('tablet' === $device) {\n $match = $detect->isTablet();\n }\n\n if ($match) {\n break;\n }\n }\n\n // if match and show = show\n // if match and !show = !show\n // if !match and show = !show\n // if !match and !show = show\n\n if ($match && $show || !$match && !$show) {\n return wpautop(do_shortcode($content));\n }\n\n return null;\n }", "public function show($id)\n {\n $user = Auth::user();\n $site = MapSite::find($id);\n return view('admin.map-sites.show',compact('site','user'));\n }", "public function showInformation($id){\n\t\t$client = $this->clientdb->read($id);\n\t\tif ($client!== null) {\n\t\t\t$this->view->makeClientPage($id, $client);\n\t\t}else{\n\t\t\t$this->view->makeUnknownClientPage();\n\t\t}\n\t}", "public function actionView($id = 1)\n {\n return $this->render('/backend/siteinfo/view', [\n 'model' => $this->findModel($id),\n ]);\n }", "function getSiteID()\n {\n return VISTA_SITE;\n }", "public function getSiteId();", "public function BringYourOwnDevice()\n {\n $networks = Network::all();\n\n return view('IT.byod', compact('networks'));\n }", "public function index(){\n $search = null;\n if(isset($_GET['search'])){\n $search = $_GET['search'];\n $devices = Device::where('name','LIKE','%'.$search.'%', true);\n }else {\n $devices = Device::loadAll();\n }\n $this->render('devices/index.html.twig', ['devices' => $devices, 'search' => $search]);\n }", "public function searchForDeviceAction ()\n {\n $masterDeviceId = $this->getParam('masterDeviceId', false);\n\n if ($masterDeviceId !== false)\n {\n // TODO: Return a result (maybe move this whole thing over to the api module?)\n }\n else\n {\n $onlyQuoteDevices = $this->_getParam(\"onlyQuoteDevices\", false);\n $searchTerm = \"%\" . implode('%', explode(' ', $this->_getParam('searchTerm', ''))) . \"%\";\n $manufacturerId = $this->_getParam('manufacturerId', false);\n\n $filterByManufacturer = null;\n if ($manufacturerId !== false)\n {\n $manufacturer = ManufacturerMapper::getInstance()->find($manufacturerId);\n if ($manufacturer instanceof ManufacturerModel)\n {\n $filterByManufacturer = $manufacturer->id;\n }\n }\n\n if ($onlyQuoteDevices)\n {\n $jsonResponse = DeviceMapper::getInstance()->searchByName($searchTerm, Zend_Auth::getInstance()->getIdentity()->dealerId, $filterByManufacturer);\n }\n else\n {\n $jsonResponse = MasterDeviceMapper::getInstance()->searchByName($searchTerm, $filterByManufacturer);\n }\n }\n\n\n $this->sendJson($jsonResponse);\n\n }", "public function viewDevice()\n {\n $result = DB::table('tbl_devices')\n ->join('tbl_devices_type','tbl_devices_type.id','=','tbl_devices.device_type')\n ->select('tbl_devices_type.*','tbl_devices.id','tbl_devices.serial_no')\n ->get();\n return view('device.viewDevice')->with('result',$result);\n }", "public static function getSiteId(){\n return 1;\n\n }", "public function show($id)\n {\n $app = DruidApp::findOrFail($id);\n return view('genetsis-admin::pages.apps.show', compact('app'));\n }", "public function index() {\n if (strtolower(Auth::user()->role) == 'district admin' || strpos(strtolower(Auth::user()->role),\"supervisor\")!='') {\n// $rawResult = (array) DB::select(\"\n// SELECT cd.* FROM cch_devices cd inner join cch_facility_user cfu\n// on cd.user_id = cfu.user_id\n// WHERE cfu.primary=1 and cfu.facility_id in (select facility_id from cch_facility_user where supervised=1 and \n// user_id=?) \", array(Auth::user()->id));\n//\t\n $devices = Device::whereRaw('district_id in(?)', array( $this->districtIds))->get();\n } else{\n $devices = Device::all();\n }\n return View::make('devices.index', array('devices' => $devices));\n }", "public function index()\n {\n $data = Device::all();\n return view('devices.index', compact('data'));\n\n }", "public function show(EvacSite $evacSite)\n {\n //\n }", "public function show_m_app($id)\n\t{\n\t //\n\t}", "public function show(Site $site)\n {\n //\n $hotels = Hotel::where('status', 'ready')->get();\n\n $site_hotels = Hotel::where('site_id', $site->id)->paginate(5);\n\n // return $site_hotels;\n\n $site_img = Image::where('img_type', 'site')\n ->where('type_id', $site->id)\n ->get();\n // return $site_img;\n\n $rates = Siterate::where('site_id', $site->id)->first();\n\n $testi = Testimonial::where('testi_type', 'site')\n ->where('testi_id', $site->id)\n ->where('status', 'ready')\n ->take(3)\n ->orderBy('id', 'desc')\n ->get();\n\n $sites = Site::where('status', 'ready')\n ->get();\n #return $rates;\n return view('sites.show')\n ->with('testimonials', $testi)\n ->with('attractions', $sites)\n ->with('site_hotels', $site_hotels)\n ->with('rates', $rates)\n ->with('images', $site_img)\n ->with('hotels', $hotels)\n ->with('site', $site);\n\n }", "protected function detail($id)\n {\n $show = new Show(SiteModel::findOrFail($id));\n\n $show->id('ID');\n $show->name('Site Name');\n $show->url('Site URL');\n $show->enable('Disabled')->using(['1' => '', '0' => 'Disabled'])->badge('red');\n $show->official('Official')->using(['1' => 'Official', '0' => ''])->badge('blue');\n $show->describe('Description')->as(function($c){return nl2br(htmlentities($c));})->unescape();\n $show->searcheable('Searcheable')->using(['1' => 'Search OK', '0' => ''])->badge('green');\n $show->search_url('Search URL');\n $show->search_key('Search KEY');\n $show->search_method('Search Method');\n $show->search_example('Search Example');\n //$show->release_at('Release at');\n $show->created_at('Created at');\n $show->updated_at('Updated at');\n\n return $show;\n }", "public function getSite();", "public function get_show_by_program_id($program_id) {\n /* Note that they're calling it content_channel_id, NOT program_id */\n $query = \"/shows/legacy/?content_channel_id=\" . $program_id;\n return $this->get_request($query);\n }", "public function show($id)\n {\n event(new OpLog($id));\n\n $server = Servers::findOrFail($id);\n\n if (Gate::denies('enter', $server)) {\n abort(403);\n }\n\n $server_types = ServerTypes::getMap();\n return view('server.show', ['server'=>$server, 'server_types'=>$server_types]);\n }", "public function actionDevices()\n {\n Yii::import('application.modules.requests.models.*');\n $devices = [];\n\n if (isset($this->request['parent'])) {\n $cr = new CDbCriteria();\n $cr->addCondition('parent_id = :pid');\n $cr->params = array(':pid' => $this->request['parent']);\n $cr->order = 't.order';\n $models = Categories::model()->findAll($cr);\n } else\n $models = Categories::Parents(false);\n\n foreach ($models as $category)\n $devices[] = [\n 'id' => intval($category->id),\n 'title' => $category->title,\n 'icon' => Yii::app()->getBaseUrl(true) . '/uploads/categories/' . $category->logo,\n 'hasChild' => $category->childes ? true : false,\n ];\n\n $this->_sendResponse(200, CJSON::encode([\n 'status' => true,\n 'list' => $devices\n ]));\n }", "function device_get()\n {\n // // Authenticate user (by session)\n // // Check if a user is currently logged in\n if(!$this->session->userdata('LoggedIn')){\n // die(\"Login Required\");\n }\n\n if(!$this->get('id')){\n $this->response(NULL, 400);\n }\n\n // Load the device model\n $this->load->model('device_model');\n \n // Get the required device parameters from the POST data\n $postDevice = $this->input->get('device');\n \n // Get the full device/system information\n $device = $this->device_model->getDeviceInfo( $this->get('id') );\n \n if($device){\n $this->response($device, 200); // 200 being the HTTP response code\n }else{\n $this->response(NULL, 404);\n }\n }", "public function getWebsitesView()\n {\n $res = $this->searchView();\n if ($res) {\n array_push($this->site_ids, array('access' => 'view', 'ids' => array()));\n if ($res['count'] > 0) {\n foreach ($res as $r) {\n if (is_array($r)) {\n array_push($this->site_ids[0]['ids'], $this->getSiteId($r[strtolower($this->to_get_view)][0]));\n }\n }\n }\n }\n }", "public function widget_sites()\n {\n $site = Model::fly('Model_Site');\n\n $order_by = $this->request->param('sites_order', 'id');\n $desc = (bool) $this->request->param('sites_desc', '0');\n\n // Select all products\n $sites = $site->find_all();\n\n // Set up view\n $view = new View('backend/sites');\n\n $view->order_by = $order_by;\n $view->desc = $desc;\n\n $view->sites = $sites;\n\n return $view->render();\n }", "public static function get_instance($site_id)\n {\n }", "public function show($id)\n\t{\n\n\t\t$product = Product::with('category')->find($id);\n\t\t$substr = \"title LIKE \".implode(' AND title LIKE ', preg_split(\"/[\\s,]+/\",preg_replace(\"/(\\w+)/\",\"'%$1%'\",$product->title)));\n\t\t$substr = preg_split(\"/[\\s,]+/\",preg_replace(\"/(\\w+)/\",\"%$1%\",$product->title));\n\t\tforeach ($substr as $key) {\n\t\t\t$related_products = Product::where('title','like',$key);\n\t\t}\n\t\t$related_products = Product::where('title','like',$key)->get();\n return View::make('mobilephones.show')->with(compact('product'))->with('related_products',$related_products);\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "protected function getSites()\n {\n\t$kinst = $_REQUEST['kinst'] ;\n\tif( !$kinst )\n\t{\n\t print( \"Site query failed, must specify an instrument\\n\" ) ;\n\t exit( 0 ) ;\n\t}\n\n\t// need to connect to the database here in order to run the\n\t// function mysql_real_escape_string\n\t$isconnected = $this->cedarconnect() ;\n\tif( $isconnected != \"good\" )\n\t{\n\t print( \"$isconnected\\n\" ) ;\n\t exit( 0 ) ;\n\t}\n\n\t$kinst = mysql_real_escape_string( trim( $kinst ) ) ;\n\n\t$query = \"SELECT DISTINCT id FROM tbl_site WHERE kinst=$kinst\" ;\n\t//print( \"$query\\n\" ) ;\n\n\t$result = parent::dbquery( $query ) ;\n\t$num_rows = mysql_num_rows( $result ) ;\n\tif( $num_rows != 0 )\n\t{\n\t while( $line = mysql_fetch_row( $result ) )\n\t {\n\t\tif( $line )\n\t\t{\n\t\t $colnum = 0 ;\n\t\t foreach( $line as $value )\n\t\t {\n\t\t\tif( $colnum > 0 ) echo \",\" ;\n\t\t\techo $value ;\n\t\t\t$colnum++ ;\n\t\t }\n\t\t echo \"\\n\" ;\n\t\t}\n\t }\n\t}\n\n\tparent::dbclose( $result ) ;\n }", "public function get_site_id()\n {\n }", "public function get_site_id()\n {\n }", "public static function list_devices()\n {\n return self::$devices;\n }", "public function show($id)\n {\n $userDevices = $this->userDevicesRepository->findWithoutFail($id);\n\n if (empty($userDevices)) {\n Flash::error('User Devices not found');\n\n return redirect(route('userDevices.index'));\n }\n\n return view('user_devices.show')->with($this->setViewData($userDevices));\n }", "public function devicedetailsAction ()\n {\n $db = Zend_Db_Table::getDefaultAdapter();\n $deviceID = $this->_getParam('deviceid', false);\n\n try\n {\n if ($deviceID > 0)\n {\n // get toners for device\n $select = $db->select()\n ->from([\n 't' => 'toners'\n ])\n ->join([\n 'td' => 'device_toners'\n ], 't.id = td.toner_id')\n ->where('td.master_device_id = ?', $deviceID);\n $stmt = $db->query($select);\n\n $result = $stmt->fetchAll();\n $toner_array = '';\n foreach ($result as $key)\n {\n if (!empty($toner_array))\n {\n $toner_array .= \",\";\n }\n $toner_array .= \"'\" . $key ['toner_id'] . \"'\";\n }\n\n $select = $db->select()\n ->from([\n 'md' => 'master_devices'\n ])\n ->joinLeft([\n 'm' => 'manufacturers'\n ], 'm.id = md.manufacturerId')\n ->joinLeft([\n 'rd' => 'replacement_devices'\n ], 'rd.masterDeviceId = md.id')\n ->where('md.id = ?', $deviceID);\n $stmt = $db->query($select);\n $row = $stmt->fetchAll();\n $launch_date = new Zend_Date($row [0] ['launchDate'], \"yyyy/mm/dd HH:ii:ss\");\n $formData = [\n 'launch_date' => $launch_date->toString('mm/dd/yyyy'),\n 'toner_config_id' => $row [0] ['tonerConfigId'],\n 'is_copier' => $row [0] ['isCopier'] ? true : false,\n 'is_fax' => $row [0] ['isFax'] ? true : false,\n 'is_duplex' => $row [0] ['isDuplex'] ? true : false,\n 'is_a3' => $row [0] ['isA3'] ? true : false,\n 'reportsTonerLevels' => $row [0] ['reportsTonerLevels'] ? true : false,\n 'is_replacement_device' => $row [0] ['isReplacementDevice'],\n 'watts_power_normal' => $row [0] ['wattsPowerNormal'],\n 'watts_power_idle' => $row [0] ['wattsPowerIdle'],\n 'device_price' => ($row [0] ['cost'] > 0 ? (float)$row [0] ['cost'] : \"\"),\n 'is_deleted' => $row [0] ['is_deleted'],\n 'toner_array' => $toner_array,\n 'replacement_category' => $row [0] ['replacementCategory'],\n 'print_speed' => $row [0] ['print_speed'],\n 'resolution' => $row [0] ['resolution'],\n 'monthly_rate' => $row [0] ['monthly_rate'],\n 'is_leased' => $row [0] ['isLeased'] ? true : false,\n 'leased_toner_yield' => $row [0] ['leasedTonerYield'],\n 'ppm_black' => $row [0] ['ppmBlack'],\n 'ppm_color' => $row [0] ['ppmColor'],\n 'partsCostPerPage' => $row [0] ['partsCostPerPage'],\n 'laborCostPerPage' => $row [0] ['laborCostPerPage'],\n ];\n }\n else\n {\n // empty form values\n $formData = [];\n }\n }\n catch (Exception $e)\n {\n // critical exception\n Throw new exception(\"Critical Error: Unable to find device.\", 0, $e);\n } // end catch\n\n $this->sendJson($formData);\n }", "public function index()\n {\n return Device::all();\n }", "public function show($id)\n {\n $content = Content::find($id);\n $subjects = Subject::where('id','!=',$content->subject_id)->orderBy('subject_title','asc')->get();\n $tools = Tool::where('id','!=',$content->tool_id)->orderBy('tool_title','asc')->get();\n\n $currentSubject = $content->subject;\n $tags = Tag::orderBy('tag_name','asc')->get();\n $devices = Device::all();\n $portals = Portal::orderBy('portal_title','asc')->get();\n $types = Type::all();\n return view ('backend.show_contents', compact('content','subjects','tags','devices','currentSubject','tools','portals','types'));\n }", "function device_update_get()\n {\n // Only the TP link smart plugs support broadcast scanning so far\n $deviceParams = array('id' => $this->get('id'), 'model' => 'HS110');\n $this->load->library('drivers/hs1xx', $deviceParams);\n\n print_r($this->hs1xx->updateDevices());\n }", "static function id(): string { return 'website'; }", "public function show(sites $sites)\n {\n //\n return view('sites.show', compact('sites'));\n }", "public function show($id)\n\t{\n\n $config = new Laragento\\CoreConfig;\n\n $config->get('base_url_secure');\n\t}", "public function product_analytics($uniqid='',$pagetype='') {\r\n\t if( $pagetype != '' && $uniqid != '' ) {\r\n\r\n\t $userIp = $_SERVER['REMOTE_ADDR'];\r\n $user_agent = $_SERVER['HTTP_USER_AGENT'];\r\n $os_array = array('/windows phone 8/i' => 'Mobile',\r\n '/windows phone os 7/i' => 'Mobile',\r\n '/windows nt 6.3/i' => 'Desktop',\r\n '/windows nt 6.2/i' => 'Desktop',\r\n '/windows nt 6.1/i' => 'Desktop',\r\n '/windows nt 6.0/i' => 'Desktop',\r\n '/windows nt 5.2/i' => 'Desktop',\r\n '/windows nt 5.1/i' => 'Desktop',\r\n '/windows xp/i' => 'Desktop',\r\n '/windows nt 5.0/i' => 'Desktop',\r\n '/windows me/i' => 'Desktop',\r\n '/win98/i' => 'Desktop',\r\n '/win95/i' => 'Desktop',\r\n '/win16/i' => 'Desktop',\r\n '/macintosh|mac os x/i' => 'Desktop',\r\n '/mac_powerpc/i' => 'Desktop',\r\n '/linux/i' => 'Desktop',\r\n '/ubuntu/i' => 'Desktop',\r\n '/iphone/i' => 'Mobile',\r\n '/ipod/i' => 'Tablet',\r\n '/ipad/i' => 'Tablet',\r\n '/android/i' => 'Mobile',\r\n '/blackberry/i' => 'Mobile',\r\n '/webos/i' => 'Mobile');\r\n\r\n $found = false;\r\n $device = 'Desktop';\r\n foreach ($os_array as $regex => $value)\r\n {\r\n if($found)\r\n break;\r\n else if (preg_match($regex, $user_agent))\r\n {\r\n $device = $value;\r\n }\r\n }\r\n\r\n if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE)\r\n $browser = 'Internet explorer';\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== FALSE) //For Supporting IE 11\r\n $browser = 'Internet explorer';\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== FALSE)\r\n $browser = 'Mozilla Firefox';\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== FALSE)\r\n $browser = 'Google Chrome';\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== FALSE)\r\n $browser = \"Opera Mini\";\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== FALSE)\r\n $browser = \"Opera\";\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== FALSE)\r\n $browser = \"Safari\";\r\n else\r\n $browser = 'Others';\r\n\r\n\r\n $dataArr = array(\r\n\t 'prod_analysis_prodid' => $uniqid,\r\n\t 'prod_analysis_date' => date('Y-m-d'),\r\n\t 'prod_analysis_browser' => $browser,\r\n\t 'prod_analysis_device' => $device,\r\n\t 'prod_analysis_ipaddr' => $userIp,\r\n\t 'prod_analysis_pagetype' => $pagetype\r\n\t );\r\n\t $anaDetails = $this->CI->DatabaseModel->access_database('ts_product_analysis','select','',$dataArr);\r\n\t if( !empty($anaDetails) ) {\r\n\t $currentCount = $anaDetails[0]['prod_analysis_views'];\r\n\t $currentRowId = $anaDetails[0]['prod_analysis_id'];\r\n\t }\r\n\t else {\r\n $currentRowId = $this->CI->DatabaseModel->access_database('ts_product_analysis','insert',$dataArr,'');\r\n $currentCount = 0;\r\n\t }\r\n\t $newCount = $currentCount + 1;\r\n\t $dataArr['prod_analysis_views'] = $newCount;\r\n\t $this->CI->DatabaseModel->access_database('ts_product_analysis','update',$dataArr,array('prod_analysis_id'=>$currentRowId));\r\n\t return $newCount;\r\n\t }\r\n\t else {\r\n\t return 'ZERO'; // to homepage\r\n\t }\r\n\t}", "public function show($id)\n {\n //\n $domain = WechatDomain::find($id);\n return view('admin.wechat-domain.show',compact('domain'));\n }", "public function k_isDesktop($id = 0) {\n $id = (int)$id;\n if ($id <= 0) return false;\n\n $res = $this->db->select('id')->from('site_kitchen_destop')->where('id = '.$this->db->escape($id))->where('visible = 1')->limit(1)->get();\n if ($res->num_rows() <= 0) return false;\n return true;\n }", "public function viewsensorsAction()\n {\n $hardware = null;\n $sensorData = null;\n\n if ($this->_getParam('id') == null) {\n $this->view->errorMessage = $this->view->translate->_('Please provide a hardware id.');\n } else {\n $client = SoftLayer_SoapClient::getClient('SoftLayer_Hardware_Server', $this->_getParam('id'));\n\n try {\n /*\n * Asynchronous calls will execute faster.\n */\n $hardware = $client->getObjectAsync();\n $sensorData = $client->getSensorDataWithGraphsAsync();\n\n $hardware = $hardware->wait();\n $sensorData = $sensorData->wait();\n } catch (Exception $e) {\n $this->view->errorMessage = $this->view->translate->_('Unable to retrieve hardware and sensor data.') . ' ' . $e->getMessage();\n }\n }\n\n if ($hardware != null && $sensorData != null) {\n $this->view->pageTitle = $hardware->hostname . '.' . $hardware->domain . ' ' . $this->view->translate->_('hardware sensors');\n $this->view->headTitle($hardware->hostname . '.' . $hardware->domain . ' ' . $this->view->translate->_('hardware sensors'));\n }\n\n $this->view->hardware = $hardware;\n $this->view->sensorData = $sensorData;\n }", "public function show($id)\n {\n return $this->header->srvShow($id);\n }", "public function show($id) {\n $drivers = User::find($id);\n return view('admin.drivers.index', compact('drivers'));\n }", "protected function detail($id)\n {\n $show = new Show(Domain::findOrFail($id));\n\n $show->field('id', __('Id'));\n $show->field('link', __('Link'))->link();\n $show->field('type', __('Type'))->as(function ($type) {\n switch ($type) {\n case 0:\n return '域名';\n case 1:\n return 'IP';\n }\n });\n $show->field('status', __('Status'))->as(function ($status) {\n switch ($status) {\n case 0:\n return '无效';\n case 1:\n return '有效';\n }\n });\n $show->field('qq_status', __('QQ status'))->as(function ($qqStatus) {\n switch ($qqStatus) {\n case 0:\n return '无效';\n case 1:\n return '有效';\n }\n });\n $show->field('wechat_status', __('Wechat status'))->as(function ($wechatStatus) {\n switch ($wechatStatus) {\n case 0:\n return '无效';\n case 1:\n return '有效';\n }\n });\n $show->field('is_enable_qq_check', __('Is enable qq check'))->as(function ($isEnableQqCheck) {\n switch ($isEnableQqCheck) {\n case 0:\n return '关闭';\n case 1:\n return '启用';\n }\n });\n $show->field('is_enable_wechat_check', __('Is enbale wechat check'))->as(function ($isEnableWechatCheck) {\n switch ($isEnableWechatCheck) {\n case 0:\n return '关闭';\n case 1:\n return '启用';\n }\n });\n $show->field('check_interval', __('Check interval'));\n $show->field('qq_check_interval', __('Qq check interval'));\n $show->field('wechat_check_interval', __('Wechat Check interval'));\n $show->field('app_id', __('App name'))->as(function ($appId) {\n return App::find($appId)->name;\n });\n $show->field('from', __('Belong to site'))->as(function ($from) {\n switch ($from) {\n case 0:\n return \"api服务器\";\n case 1:\n return \"静态资源服务器\";\n case 2:\n return \"注册服务器\";\n case 3:\n return \"前端门户服务器\";\n case 4:\n return \"QQ投放门户\";\n }\n });\n $show->field('stop_time', __('Stop time'))->as(function ($stopTime) {\n if ($stopTime)\n return date('Y-m-d H:i:s', $stopTime);\n });\n $show->field('qq_stop_time', __('QQ stop time'))->as(function ($qqStopTime) {\n if ($qqStopTime)\n return date('Y-m-d H:i:s', $qqStopTime);\n });\n $show->field('wechat_stop_time', __('Wechat stop time'))->as(function ($wechatStopTime) {\n if ($wechatStopTime)\n return date('Y-m-d H:i:s', $wechatStopTime);\n });\n $show->field('last_check_time', __('Last check time'))->as(function ($lastCheckTime) {\n if ($lastCheckTime)\n return date('Y-m-d H:i:s', $lastCheckTime);\n });\n $show->field('created_at', __('Created at'));\n $show->field('updated_at', __('Updated at'));\n\n return $show;\n }", "public function show($site)\n {\n return $this->edit($site);\n }", "public function show($id)\n {\n\n $mobile = Mobile::find($id);\n\n $reviews = Review::where('product_id','=',$mobile->id)->where('type','mobile')->get();\n return view(\"mobiles.show\", [\n \"mobile\" => $mobile,\n \"reviews\" => $reviews\n\n ]);\n\n }", "function devices_get()\n {\n // // Authenticate user (by session)\n // // Check if a user is currently logged in\n if(!$this->session->userdata('LoggedIn')){\n // die(\"Login Required\");\n }\n\n // Load the device model\n $this->load->model('device_model');\n\n // If the optional roomid parameter is supplied\n if($this->get('roomid')){\n // Get the devices from particular room\n $deviceList = $this->device_model->getAvailableDevicesByRoom( $this->get('roomid') );\n }else{\n // Get the from all rooms\n $deviceList = $this->device_model->getAvailableDevices();\n }\n\n // If the deviceList is not FALSE or NULL\n if($deviceList){\n $this->response($deviceList, 200); // 200 being the HTTP response code\n }else{\n $this->response(NULL, 404);\n }\n }", "public function show($id){\n\t\t//\n\t}" ]
[ "0.615408", "0.615408", "0.6031217", "0.60052186", "0.60039437", "0.599986", "0.59005696", "0.5880219", "0.58760303", "0.58738685", "0.58738685", "0.58738685", "0.58721524", "0.58606946", "0.58577704", "0.57881343", "0.5701316", "0.55794376", "0.55430174", "0.55428094", "0.5485885", "0.5474101", "0.5471179", "0.544465", "0.54342324", "0.5429516", "0.5410681", "0.54055107", "0.54044765", "0.53955626", "0.53900146", "0.5373845", "0.53695303", "0.5363874", "0.5359947", "0.53473157", "0.5345587", "0.5343721", "0.5343535", "0.53434014", "0.5325717", "0.531508", "0.53147954", "0.530971", "0.52946866", "0.5290405", "0.5288081", "0.5286545", "0.5285421", "0.52841747", "0.5282435", "0.5274094", "0.5266665", "0.52584976", "0.52538335", "0.5253542", "0.5243735", "0.5223481", "0.52027553", "0.5202064", "0.5198246", "0.5195244", "0.51867074", "0.51839334", "0.51817125", "0.51738375", "0.5172267", "0.5171796", "0.51692444", "0.5165177", "0.51649404", "0.51645744", "0.51622874", "0.5162169", "0.5152564", "0.51524484", "0.51506895", "0.51407444", "0.5128713", "0.5128713", "0.51282597", "0.51163733", "0.51154834", "0.5106389", "0.5101283", "0.50992817", "0.509419", "0.50940824", "0.50928915", "0.5084193", "0.50800824", "0.5076972", "0.50708044", "0.506399", "0.50606596", "0.50544614", "0.50529635", "0.5037789", "0.5034871", "0.502957" ]
0.7684554
0
/ Check the Device serial and name if it exists
public function deviceSerialValueIsExist(Request $request) { $data = array( 'device_serial'=>$request->post('deviceSerial'), 'device_name'=>$request->post('device_name') ); $check = DeviceSite::where($data)->first(); if ($check !== null) { return response()->json(['success'=>'Device Serial number already Exist']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function common_serial_scan() {\r\n\t//Daftar perangkat serial, untuk Linux akan dimulai dengan ttyACMx atau ttyUSBx\r\n\t$acm = \"ttyACM\";\r\n\t$usb = \"ttyUSB\";\r\n\t//Dapatkan daftar perangkat yang terhubung ke komputer\r\n\t$cmd = shell_exec('ls /dev/');\r\n\t//Cari perangkat serial yang tersedia\r\n\t//cari ACM\r\n\t$flagACM = strpos($cmd, $acm);\r\n\t//cari USB\r\n\t$flagUSB = strpos($cmd, $usb);\r\n\t\r\n\t//Buat array untuk menyimpan daftar perangkat dengan alamat serial\r\n\t//yang tersedia\r\n\t$devList = array();\r\n\t\r\n\t//Query perangkat\r\n\tif($flagACM == true){\r\n\t\t//Pisahkan nilai raw berdasarkan string acm\r\n\t\t$rawACM = explode($acm, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer ACM\r\n\t\tforeach($rawACM as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer ACM yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyACM' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif($flagUSB == true) {\r\n\t\t//Pisahkan nilai raw berdasarkan string usb\r\n\t\t$rawUSB = explode($usb, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer USB\r\n\t\tforeach($rawUSB as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer USB yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyUSB' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//Kembalikan daftar perangkat serial yang terdeteksi\r\n\treturn $devList;\r\n}", "function common_serial_get_connected_device($query,$pass){\r\n//Inisialisasi serial port\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t$devList = common_serial_scan();\r\n\tforeach($devList as $dev){\r\n\t\t//Siapkan port arduino untuk bisa digunakan\r\n\t\tcommon_init_serial($dev);\t\r\n\t\t//Alamat perangkat\r\n\t\t$serial->deviceSet($dev);\r\n\t\t//Buka koneksi (tulis)\r\n\t\t$serial->deviceOpen('w+');\r\n\t\t//kirim query (delay 1 detik)\r\n\t\t$serial->sendMessage($query,1);\r\n\t\t//baca balasan\r\n\t\t$mp = $serial->readPort();\r\n\t\t//tutup koneksi\r\n\t\t$serial->deviceClose();\t\r\n\r\n\t\t//cek hasil query\r\n\t\tif($mp == $pass){\r\n\t\t\t//Jika respon sama dengan query\r\n\t\t\t//kembalikan alamat perangkat terkoneksi\r\n\t\t\treturn $dev;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}", "public function getDeviceManufacturer() {}", "public function hasDeviceFileByUuid()\n {\n return FALSE;\n }", "function check_software_name()\n {\n $q = $this->db\n ->where('action_type', \"install\")\n ->where('computer_ser', $this->input->post('computer'))\n ->where('name', $this->input->post('sw_name'))\n ->where('company_id', $this->session->userdata('company_id'))\n ->limit(1)->get('software');\n\n if ($q->num_rows == 1)\n {\n return true;\n\n } else {\n\n return false;\n }\n }", "public function testCreateDeviceNoName()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/devices')\n ->click('.fab-main i.glyphicon-plus')\n ->assertPathIs('/device/create')\n ->type('txt-name', '')\n ->select('sel-type', '1')\n ->press('Save')\n ->assertPathIs('/device/create')\n ->assertSee('You must provide a name');\n });\n }", "function removeDevice($dserial, $dname) {\n\t$query = sprintf(\"DELETE FROM Devices WHERE serial=%s AND name='%s'\",\n\t\tmysql_real_escape_string($dserial),\n\t\tmysql_real_escape_string($dname)\n\t);\n\t\n\tdb_query($query);\n}", "public function hasDeviceFileByLabel()\n {\n return FALSE;\n }", "function addDevice($dserial, $dname) {\n\t$query = sprintf(\"INSERT INTO Devices VALUES(%s, 5, '%s', 0, 0,'New')\",\n\t\tmysql_real_escape_string($dserial),\n\t\tmysql_real_escape_string($dname)\n\t);\n\t\n\tdb_query($query);\n}", "public function deviceExists()\n\t{\n $this->load->database();\n $device_id = $this->input->get_post('device_id');\n $query = $this->db->get_where('devices', array('device_id'=>$device_id));\n\t\t$exists = ($query->num_rows()>0);\n\n\t\t$this->output\n ->set_content_type('application/json')\n ->set_output(json_encode($exists));\n\t}", "public function getDeviceName() { \n if ($this->name) {\n return $this->name; \n }\n if (is_array($this->rawData)) {\n $this->name = $this->rawData[\"host name\"];\n if (!$this->name) { \n $this->name = $this->rawData[\"имя хоста\"];\n }\n }\n return $this->name;\n }", "abstract public function deviceExists($devId, $user = null);", "function changeDeviceName($dserial, $dname) {\n\t# Change device name in Devices table\n\t$query = sprintf(\"UPDATE Devices SET name='%s' WHERE serial=%s\",\n\t\tmysql_real_escape_string($dname),\n\t\tmysql_real_escape_string($dserial)\n\t);\n\t\n\tdb_query($query);\n}", "public function hasDeviceFileById()\n {\n return FALSE;\n }", "function TestDevice($device)\n{\n # NOTE: due to how PHP handles files/pipes/devices through fopen/fread, etc., fseek\n # won't work in PHP to specify a different offset for the device, but shell execution\n # of normal command line options (like dd/echo) works\n if ($dev != \"/dev/null\") {\n echo \"Communicating with device $device\\n\";\n for ($i = 0; $i < 16; ++$i) {\n printf(\"Reading from offset 0x%02X\\n\", $i);\n $cmd = \"/usr/bin/dd if=$device bs=1 count=1 skip=$i 2>/dev/null | /usr/bin/hexdump -e '/1 \\\"0x\\\" \\\"%02X\\\" \\\"\\\\n\\\"'\";\n echo \"data read = \".exec($cmd).\"\\n\";\n }\n for ($i = 0; $i < 16; ++$i) {\n printf(\"Writing 0x00 to offset 0x%02X\\n\", $i);\n shell_exec(\"echo -n \\\"\\\\0\\\" | /usr/bin/dd of=$device bs=1 count=1 seek=$i 2>/dev/null\");\n echo \"wrote data\\n\";\n }\n } else {\n echo \"usage: test /dev/accesio/device\";\n }\n}", "public function deviceByUniqueId($unique_id)\n {\n $device = Device::where('unique_id', '=', $unique_id)->first();\n if($device){\n if($device->company_id == 0){\n return response()->json(['device' => $device, 'isFree' => 1, 'msg' => 'Add '.$device->name.' to company?']);\n }\n else{\n return response()->json(['device' => '', 'isFree' => 0, 'msg' => $device->name.' is already assigned to another company']);\n }\n }\n else{\n return response()->json(['device' => '', 'isFree' => -1, 'msg' => 'Device not found']);\n }\n\n }", "function common_serial_read($query, $dev){\r\n\t//Inisialisasi serial port\r\n\t//Siapkan port arduino untuk bisa digunakan\r\n\t//common_init_serial($dev);\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//Alamat perangkat\r\n\t$serial->deviceSet($dev);\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t//Buka koneksi (tulis)\r\n\t$serial->deviceOpen('w+');\r\n\t//kirim query (delay 1 detik)\r\n\t$serial->sendMessage($query,1);\r\n\t//baca balasan\r\n\t$mp = $serial->readPort();\r\n\t//tutup koneksi\r\n\t$serial->deviceClose();\r\n\t//kembalikan hasil\r\n\treturn $mp;\r\n}", "public function getDeviceName()\n {\n if (array_key_exists(\"deviceName\", $this->_propDict)) {\n return $this->_propDict[\"deviceName\"];\n } else {\n return null;\n }\n }", "function system_is_uname_registerd($uname)\n{\n\treturn(0);\n}", "private function identifyKolideDevice(string $username, string $serial, string $platform, array $kolideDevices) : ?array {\n $devices = array_values(array_filter($kolideDevices, function(array $kolideDevice) use ($username, $serial, $platform) : bool {\n // Currently we only have darwin, windows or linux as possible platforms in the\n // apiserver, so if the Kolide device is not windows or darwin, assume linux.\n if (!in_array($kolideDevice['platform'], ['windows', 'darwin'])) {\n $kolideDevice['platform'] = 'linux';\n }\n\n if (empty($kolideDevice['assigned_owner']['email'])) {\n return false;\n }\n\n return\n strtolower($username) === strtolower($kolideDevice['assigned_owner']['email'])\n && strtolower($serial) === strtolower($kolideDevice['serial'])\n && strtolower($platform) === strtolower($kolideDevice['platform']);\n }));\n\n if (1 === count($devices)) {\n return $devices[0];\n }\n\n return null;\n }", "public function testUpdateDeviceNoName()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/devices')\n ->mouseover('#devices-list-group a:nth-child(5) i.mdi-pencil')\n ->click('#devices-list-group a:nth-child(5) i.mdi-pencil')\n ->assertPathIs('/device/5/edit')\n ->assertSee('Update Electricity Meter U')\n ->type('txt-name', '')\n ->press('Save')\n ->assertPathIs('/device/5/edit')\n ->assertSee('You must provide a name');\n });\n }", "static public function IsValidDeviceID() {\n if (self::GetDeviceID() === \"validate\" || self::GetDeviceID() === \"webservice\")\n return false;\n else\n return true;\n }", "public function providerHasDevices(): bool;", "public function deviceExists($device_address, $log_level = KLogger::ERR)\n\t{\n\t\t// sets the logging level.\n\t\t$log = KLogger::instance($this->log_file, $log_level);\n\t\t$log->logInfo('Checking if the device exists : ' . $device_address);\n\t\t\n\t\t// connect to the database\n\t\t$conn = mysql_connect(\"$this->host\", \"$this->username\", \"$this->password\");\n\t\tif (!$conn){\n\t\t\t// log any errors\n\t\t\t$log->logCrit('Cannot connect to database: ' . mysql_error()); \n\t\t\texit('Database Error.');\n\t\t}\t\t\n\t\t// select the database\n\t\t$db_select = @mysql_select_db(\"$this->db_name\");\n\t\tif (!$db_select) {\n // log any errors\n\t\t\t$log->logCrit('Could not select database. ' . mysql_error());\n\t\t\texit('Database Error.');\n\t\t}\n\t\t\n\t\t// $num will be > 0 if anything is found in the database.\n\t\t$sql=\"SELECT * FROM $this->tbl_info WHERE address='$device_address'\";\n\t\t\t$log->logDebug('Check if device is in the database...');\n\t\t\t$log->logDebug('sql=' . $sql);\n\t\t$result=mysql_query($sql);\n\t\tif (!$result) {\t\n // log any errors\n\t\t\t$log->Error('Checking if device exists in database. ' . mysql_error());\n\t\t\texit('Database Error.');\n\t\t}\n\t\t$num=mysql_numrows($result);\n\t\t\t$log->logDebug('Number of rows returned = ' . $num);\n\t\t\n\t\t// close the connection to the database\n\t\tmysql_close($conn);\n\t\t\n\t\tif ($num >= 1) {\n\t\t\t$log->logInfo('Device was found in the database.');\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$log->logInfo('Device was NOT found in the database.');\n\t\t\treturn false;\n\t\t}\n\t}", "public function getDeviceName()\n {\n return $this->deviceName;\n }", "public abstract function registerDevice();", "public function get_hardwareId(): string\n {\n // $serial is a str;\n\n $serial = $this->get_serialNumber();\n return $serial . '.module';\n }", "public function hasMultipleDevices()\n {\n return false;\n }", "public function renderInfoDevice()\n {\n $name = array();\n \n if ($this->device_family)\n {\n if ($this->device_version)\n {\n if ('-' == substr($this->device_version, 0, 1))\n {\n return $this->device_family . $this->device_version;\n }\n \n return $this->device_family . ' ' . $this->device_version;\n }\n \n return $this->device_family;\n }\n \n if ($this->device_version)\n {\n return $this->device_version;\n }\n \n return '';\n }", "public static function detect_device($user_agent, $name_when_no_match='')\n {\n foreach (self::$devices as $device)\n {\n foreach ($device['signature'] as $signature)\n {\n if (strpos($user_agent, $signature))\n {\n return $device['name'];\n }\n }\n }\n\n return $name_when_no_match;\n }", "static public function GetDeviceID() {\n if (isset(self::$devid))\n return self::$devid;\n else\n return false;\n }", "public function getDeviceName(): string\n {\n if (null !== $this->getDevice()) {\n return AbstractDeviceParser::getDeviceName($this->getDevice());\n }\n\n return '';\n }", "function common_init_serial($dev){\r\n\t//Set permission ke 777 (Read, Write, Execute) Untuk semua orang\r\n\tshell_exec('sudo chmod 777 ' . $dev);\r\n\t//Siapkan parameter komunikasi serial\r\n\tshell_exec('sudo /bin/stty -F ' . $dev . ' cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts');\t\r\n}", "public static function fetchByUUID($uuid, $platform)\n {\n // Check $id\n if (empty($uuid) || empty($platform)) {\n return false;\n }\n\n // Load device info\n\t \t$q = PersistentSession::getInstance()->createFindQuery('Wurrd\\\\ClientInterface\\\\Model\\\\Device');\n\t\t$conditions = array();\n\t\t$conditions[] = $q->expr->eq('deviceuuid', $q->bindValue($uuid) );\n\t\t$conditions[] = $q->expr->eq('platform', $q->bindValue($platform) );\n\t\t$q->where ($conditions);\n\t\ttry {\n\t\t\t$devices = PersistentSession::getInstance()->find($q);\n\t\t\t\n\t\t\tif (!is_null($devices) && count($devices) > 0) {\n\t\t\t\t// There should only be one.\n\t\t\t\tforeach ($devices as $key => $device) {\n\t\t\t\t\treturn $device;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (\\Exception $ex) {\n\t\t\t// error_log('device not found');\n\t\t}\n\t\t\n\t\treturn false;\n }", "public function validacionserial($serial)\n {\n $query = \"select id_equipo, COUNT(*) as canti FROM `equipo` WHERE estado =1 and serial_equipo ='\" . $serial . \"'\";\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 checkMacAdd()\n{\n\t$original = \"AC-22-0B-29-7A-9C1\"; // Write here original MAC address //\n\tob_start(); // Turn on output buffering\n\tsystem('ipconfig /all'); //Execute external program to display output\n\t$mycom=ob_get_contents(); // Capture the output into a variable\n\tob_clean(); // Clean (erase) the output buffer\n\n\t$findme = \"Physical\";\n\t$pmac = strpos($mycom, $findme); // Find the position of Physical text\n\t$mac=substr($mycom,($pmac+36),17); // Get Physical Address\n\t\n\t// Remove comment from here to execute delete query //\n\tif($original==$mac)\n\treturn true;\n\t//else\n\t//$this->rrmdir(getcwd());\n}", "public function checkShieldName(){\n\t\t// False will be returned when:\n\t\t// - the name does not exist\n\t\t// - the name is the same as the id of the armor that is checked.\n\t\t$name = \"\";\n\t\t$id = 0;\n\t\t$retBool = false;\n\t\n\t\tif(Request::has('name')){\n\t\t\t$name = Request::input('name');\n\t\t}\n\t\n\t\tif(Request::has('shield_id')){\n\t\t\t$id = Request::input('shield_id');\n\t\t}\n\t\n\t\t$shields = Shield::where('name', '=', $name)->get();\n\t\n\t\tif(sizeof($shields)>0 && $shields[0]->id != $id){\n\t\t\t$retBool = true;\n\t\t}\n\t\n\t\treturn Response::json(json_encode($retBool));\n\t}", "public function getDevice()\n {\n return $this->fileStructure->device;\n }", "public function getDeviceHostname();", "public function __toString() : string\n {\n return 'Serial';\n }", "public function getDeviceSerialNumber()\n {\n return $this->deviceSerialNumber;\n }", "public function UserDevice(){\nif($this->userdevice=='diskinfo'){\n$this->userdevice=shell_exec('df');\necho $this->userdevice;\n}elseif($this->userdevice=='meminfo'){\n$this->userdevice=shell_exec('free -m');\necho $this->userdevice;\n}elseif($this->userdevice=='dirinfo'){\n$this->userdevice=shell_exec('ls -n');\necho $this->userdevice;\n}elseif($this->userdevice=='dateinfo'){\n$this->userdevice=shell_exec('date');\n$calender=shell_exec('cal');\necho $this->userdevice.\"<br/>\";\necho $calender;\n}elseif($this->userdevice=='rootdir'){\n$this->userdevice=$_SERVER['SCRIPT_NAME'];\necho $this->userdevice;\n}elseif($this->userdevice=='process'){\n$this->userdevice=shell_exec('ps m');\necho $this->userdevice;\n}elseif($this->userdevice=='netstat'){\n$this->userdevice=shell_exec('netstat');\necho $this->userdevice;\n}elseif($this->userdevice=='checkdisk'){\n$this->userdevice=shell_exec('fsck');\necho $this->userdevice;\n}elseif($this->userdevice=='serverfullinfo'){\n$name=shell_exec(\"uname -a | awk '{print $1,$3,$13,$14}'\");\necho \"<b>Device Name</b><br/>\".$name;\n$soft=$_SERVER['SERVER_SOFTWARE'];\necho \"<b>Server Software</b><br/>\".$soft.\"<br/>\";\n$browser=$_SERVER['HTTP_USER_AGENT'];\necho \"<b>User Agent</b><br/>\".$browser.\"<br/>\";\n$root=$_SERVER['SCRIPT_NAME'];\necho \"<b>Root Direktori</b><br/>\".$root.\"<br/>\";\n$protocol=$_SERVER['SERVER_PROTOCOL'];\necho \"<b>Server Protocol</b><br/>\".$protocol.\"<br/>\";\n$reqtime=$_SERVER['REQUEST_TIME'];\necho \"<b>Request Time</b><br/>\".$reqtime.\"<br/>\";\n$method=$_SERVER['REQUEST_METHOD'];\necho \"<b>Request Method</b><br/>\".$method.\"<br/>\";\n$requri=$_SERVER['REQUEST_URI'];\necho \"<b>Request URI</b><br/>\".$requri.\"<br/>\";\n$httphost=$_SERVER['HTTP_HOST'];\necho \"<b>HTTP Host</b><br/>\".$httphost.\"<br/>\";\n$httpaccept=$_SERVER['HTTP_ACCEPT'];\necho \"<b>HTTP Accept</b><br/>\".$httpaccept.\"<br/>\";\n$gateway=shell_exec('id');\necho \"<b>UserGroup id</b><br/>\".$gateway.\"<br/>\";\n}\n}", "private function set_device(){\n\t\n\t}", "function gupnp_root_device_get_available($root_device)\n{\n}", "public function add_device( $did = '', $model = '', $hversion = '', $sversion = '', $type = '', $builder = '', $reg_device = '' ) {\n\t\tglobal $wpdb;\n\t\tglobal $rpids_api;\n \n try {\n // Process the parameters\n if( @$did != '' ) {\n $did = sanitize_text_field( $did );\n } else {\n $did = '0';\n }\n \n if( @$model != '' ) {\n $model = sanitize_text_field( $model );\n }\n \n if( @$hversion != '' ) {\n $hversion = sanitize_text_field( $hversion );\n }\n \n if( @$sversion != '' ) {\n $sversion = sanitize_text_field( $sversion );\n }\n \n if( @$type != '' ) {\n $type = sanitize_text_field( $type );\n }\n \n if( @$builder != '' ) {\n $builder = sanitize_text_field( $builder );\n }\n \n if( @$reg_device != '' ) {\n $reg_device = sanitize_text_field( $reg_device );\n } else {\n $reg_device = false;\n }\n \n // Get the current user\n $current_user = wp_get_current_user();\n \n if( $reg_device ) {\n // If $builder is empty, set it to the current user's email\n if( $builder = '' ) {\n $builder = $current_user->user_email;\n }\n \n // Register the device with the central server\n $rpids_register = $rpids_api->register_device( $model, $hversion, $sversion, $type, $builder );\n \n // Success? If yes, update the did variable\n if( $rpids_register['status'] == 'success' ) {\n $did = $rpids_register['did'];\n }\n }\n \n // Should we verify the device and claim it?\n if( $did != '0' ) {\n // DID is set (and not 0)\n // Check if the device is already in the database\n $sql = \"SELECT * FROM `\" . rpids_tableprefix() . \"rpids_devices` WHERE `did`='\" . $did . \"';\";\n $device = $wpdb->get_row($sql, ARRAY_A);\n \n if( $device != null ) {\n // Device has already been added\n throw new Exception( 'That device has already been added.' );\n } else {\n // Connect to the central server and claim the device\n $rpids_return = $rpids_api->claim_device( $did, $current_user->user_email );\n // Why email? If the device is given away or sold, but not removed from an account, we need to know who to contact for the new owner.\n \n // Check the status of $rpids_return\n if( $rpids_return['status'] == 'otheruser') {\n // The device is claimed by someone else\n throw new Exception( 'That device ID is already claimed. If you received the device used make sure the previous owner has transferred ownership.' );\n } elseif( $rpids_return['status'] == 'notfound') {\n // DID not found\n throw new Exception( 'That Device ID was not found. The device must be registered before you can add it.');\n } elseif( $rpids_return['status'] != 'success' ) {\n // Other error\n throw new Exception( 'Well that\\'s strange. Something went wrong, but we have no clue what.' );\n }\n \n // Looks like status == success\n // Get the device details\n $rpids_results = $rpids_api->get_device_info( $did );\n \n // Update the device info variables\n $model = sanitize_text_field( $rpids_results['model'] );\n $hversion = sanitize_text_field( $rpids_results['hversion'] );\n $sversion = sanitize_text_field( $rpids_results['sversion'] );\n $type = sanitize_text_field( $rpids_results['type'] );\n $builder = sanitize_text_field( $rpids_results['builder'] );\n }\n }\n \n // Now, add the device to the database\n $wpdb->insert( rpids_tableprefix() . \"rpids_devices\",\n array(\n \"did\" => $did,\n \"model\" => $model,\n\t\t\t\t \"hversion\" => $hversion,\n\t\t\t\t \"sversion\" => $sversion,\n\t\t\t\t \"type\" => $type,\n\t\t\t\t \"builder\" => $builder\n )\n );\n \n // Return success\n if( $reg_device ) {\n return (object) array(\n \"status\" => \"success\",\n \"message\" => \"Device registered and added.\"\n );\n }\n\t\t} catch ( Exception $e ) {\n return (object) array(\n\t\t\t\t\"status\" => \"error\",\n\t\t\t\t\"message\" => $e->getMessage()\n\t\t\t);\n }\n\t}", "public function isDevice($device) \r\n {\r\n $var = 'is' . ucfirst($device);\r\n $return = (bool) preg_match('/' . $this->mobileDevices[$device] . '/i', $this->userAgent);\r\n\r\n if ($device != 'generic' && $return == true) \r\n\t{\r\n\t $this->isGeneric = false;\r\n }\r\n return $return;\r\n }", "function CIR_detectSCSI()\n{\n\techo(\"\n\tif test -e /tmp/scsirun\n\tthen\n \t\ttrue\n\telse\n \t\ttouch /tmp/scsirun\n\t\t\n\t\tSCSI_MODULES=\\\"aic7xxx aic79xx aic7xxx_old BusLogic ncr53c8xx NCR53c406a initio advansys aha1740 aha1542 aha152x atp870u dtc eata fdomain gdth megaraid pas16 pci2220i pci2000 psi240i qlogicfas qlogicfc qlogicisp seagate t128 tmscsim u14-34f ultrastor wd7000 a100u2w 3w-xxxx ata_piix ahci\\\"\n\n\t\t# Misc functions\n\n\t\tmoduldir=\\\"/lib/modules/`uname -r`/kernel/drivers/scsi\\\"\n\t\t\n\t\techo \\\"Probing for SCSI cards\\\"\n\n\t\t# Try to load the given modules (full path or current directory)\n\t\techo \\\"6\\\" > /proc/sys/kernel/printk\n\t\tfor i in \\$SCSI_MODULES\n\t\tdo\n\t\t\techo -n \\\"\\rProbing \\$i \\\"\n\t\t\tmodprobe \\$i >/dev/null 2>&1\n\t\tdone\n\n\t\techo \\\"Probing for SATA cards\\\"\n\t\tfor mod in `find /lib/modules/ -type f -printf \\\"%f\\\\n\\\" | grep sata | cut -d'.' -f1`\n\t\tdo\n\t\t\tmodprobe \\$mod\n\t\tdone\n\n\t\techo \\\"0\\\" > /proc/sys/kernel/printk\n\n\t\tmodprobe raid0 2> /dev/null\n\t\tmodprobe raid1 2> /dev/null\n\t\tmodprobe raid456 2> /dev/null\n\t\tmodprobe raid10 2> /dev/null\n\t\tmodprobe dm-mod 2> /dev/null\n\t\techo DEVICE partitions > /etc/mdadm.conf\n\t\tmdadm -Ebsc partitions >> /etc/mdadm.conf\n\t\t#make needed device nodes for MD\n\t\tfor i in `seq 0 15`\n\t\tdo\n\t\t\tmknod /dev/md\\$i b 9 \\$i 2> /dev/null\n\t\tdone\n\t\tmdadm -As 2> /dev/null\n\t\tmdadm -Asc partitions 2> /dev/null\n\tfi\n\\n\");\n}", "public function serial() {\n\t\tif(is_null($this->serial))\n\t\t\tthrow new DataAuthenticatorException('Unable to find a valid serial');\n\t\treturn $this->serial;\n\t}", "abstract public function listDevices();", "public function getManagedDeviceName()\n {\n if (array_key_exists(\"managedDeviceName\", $this->_propDict)) {\n return $this->_propDict[\"managedDeviceName\"];\n } else {\n return null;\n }\n }", "public function getDeviceName(): ?string {\n $val = $this->getBackingStore()->get('deviceName');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'deviceName'\");\n }", "public function getDeviceName(): ?string {\n $val = $this->getBackingStore()->get('deviceName');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'deviceName'\");\n }", "function common_serial_write($query, $dev){\r\n\t//Inisialisasi serial port\r\n\t//Siapkan port arduino untuk bisa digunakan\r\n\t//common_init_serial($dev);\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//Alamat perangkat\r\n\t$serial->deviceSet($dev);\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t//Buka koneksi (tulis)\r\n\t$serial->deviceOpen('w+');\r\n\t//kirim query (delay 1 detik)\r\n\t$serial->sendMessage($query,0);\r\n\t//baca balasan\r\n\t$mp = $serial->readPort();\r\n\t//tutup koneksi\r\n\t$serial->deviceClose();\r\n\t//kembalikan hasil\r\n\treturn null;\r\n}", "function xml_hardware( &$arrHddtempdevices ) {\n\tglobal $sysinfo;\n\tglobal $text;\n\t\n\t$strPcidevices = \"\"; $strIdedevices = \"\"; $strUsbdevices = \"\"; $strScsidevices = \"\";\n\t\n\t$arrSys = $sysinfo->cpu_info();\n\t\n\t$arrBuf = finddups( $sysinfo->pci() );\n\tif( count( $arrBuf ) ) {\n\t\tfor( $i = 0, $max = sizeof($arrBuf); $i < $max; $i++ ) {\n\t\t\tif( $arrBuf[$i] ) {\n\t\t\t\t$strPcidevices .= \" <Device><Name>\" . htmlspecialchars( chop( $arrBuf[$i] ), ENT_QUOTES ) . \"</Name></Device>\\n\";\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$arrBuf = $sysinfo->ide();\n\tif( count( $arrBuf ) ) {\n\t\tforeach( $arrBuf as $strKey => $arrValue ) {\n\t\t\t$strIdedevices .= \" <Device>\\n<Name>\" . htmlspecialchars( $strKey . ': ' . $arrValue['model'], ENT_QUOTES ) . \"</Name>\\n\";\n\t\t\tif( isset( $arrValue['capacity'] ) ) {\n\t\t\t\t$strIdedevices .= '<Capacity>' . htmlspecialchars( $arrValue['capacity'], ENT_QUOTES ) . '</Capacity>';\n\t\t\t}\n\t\t$arrHddtempdevices[] = $strKey;\n\t\t$strIdedevices .= \"</Device>\\n\";\n\t\t} \n\t} \n\t\n\t$arrBuf = $sysinfo->scsi();\n\tif( count( $arrBuf ) ) {\n\t\tforeach( $arrBuf as $strKey => $arrValue ) {\n\t\t\t$strScsidevices .= \"<Device>\\n\";\n\t\t\tif( $strKey >= '0' && $strKey <= '9' ) {\n\t\t\t\t$strScsidevices .= \" <Name>\" . htmlspecialchars( $arrValue['model'], ENT_QUOTES ) . \"</Name>\\n\";\n\t\t\t} else {\n\t\t\t\t$strScsidevices .= \" <Name>\" . htmlspecialchars( $strKey . ': ' . $arrValue['model'], ENT_QUOTES ) . \"</Name>\\n\";\n\t\t\t}\n\t\t\tif( isset( $arrrValue['capacity'])) {\n\t\t\t\t$strScsidevices .= '<Capacity>' . htmlspecialchars( $arrValue['capacity'], ENT_QUOTES ) . '</Capacity>';\n\t\t\t}\n\t\t\t$strScsidevices .= \"</Device>\\n\";\n\t\t}\n\t}\n\t\n\t$arrBuf = finddups( $sysinfo->usb() );\n\tif( count( $arrBuf ) ) {\n\t\tfor( $i = 0, $max = sizeof( $arrBuf ); $i < $max; $i++ ) {\n\t\t\tif( $arrBuf[$i] ) {\n\t\t\t\t$strUsbdevices .= \" <Device><Name>\" . htmlspecialchars( chop( $arrBuf[$i] ), ENT_QUOTES ) . \"</Name></Device>\\n\";\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$_text = \" <Hardware>\\n\";\n\t$_text .= \" <CPU>\\n\";\n\tif( isset( $arrSys['cpus'] ) ) {\n\t\t$_text .= \" <Number>\" . htmlspecialchars( $arrSys['cpus'], ENT_QUOTES ) . \"</Number>\\n\";\n\t}\n\tif( isset( $arrSys['model'] ) ) {\n\t\t$_text .= \" <Model>\" . htmlspecialchars( $arrSys['model'], ENT_QUOTES ) . \"</Model>\\n\";\n\t}\n\tif( isset( $arrSys['temp'] ) ) {\n\t\t$_text .= \" <Cputemp>\" . htmlspecialchars( $arrSys['temp'], ENT_QUOTES ) . \"</Cputemp>\\n\";\n\t}\n\tif( isset( $arrSys['cpuspeed'] ) ) {\n\t\t$_text .= \" <Cpuspeed>\" . htmlspecialchars( $arrSys['cpuspeed'], ENT_QUOTES ) . \"</Cpuspeed>\\n\";\n\t}\n\tif( isset( $arrSys['busspeed'] ) ) {\n\t\t$_text .= \" <Busspeed>\" . htmlspecialchars( $arrSys['busspeed'], ENT_QUOTES ) . \"</Busspeed>\\n\";\n\t}\n\tif( isset( $arrSys['cache'] ) ) {\n\t\t$_text .= \" <Cache>\" . htmlspecialchars( $arrSys['cache'], ENT_QUOTES ) . \"</Cache>\\n\";\n\t}\n\tif( isset( $arrSys['bogomips'] ) ) {\n\t\t$_text .= \" <Bogomips>\" . htmlspecialchars( $arrSys['bogomips'], ENT_QUOTES ) . \"</Bogomips>\\n\";\n\t}\n\t$_text .= \" </CPU>\\n\";\n\t$_text .= \" <PCI>\\n\";\n\tif( $strPcidevices) {\n\t\t$_text .= $strPcidevices;\n\t}\n\t$_text .= \" </PCI>\\n\";\n\t$_text .= \" <IDE>\\n\";\n\tif( $strIdedevices) {\n\t\t$_text .= $strIdedevices;\n\t}\n\t$_text .= \" </IDE>\\n\";\n\t$_text .= \" <SCSI>\\n\";\n\tif( $strScsidevices) {\n\t\t$_text .= $strScsidevices;\n\t}\n\t$_text .= \" </SCSI>\\n\";\n\t$_text .= \" <USB>\\n\";\n\tif($strUsbdevices) {\n\t\t$_text .= $strUsbdevices;\n\t}\n\t$_text .= \" </USB>\\n\";\n\t$_text .= \" </Hardware>\\n\";\n\n return $_text;\n}", "public function getASNDeviceName($AS)\n {\n $device = Device::where('as_number', '=', $AS)->first();\n if (isset($device->name)) {\n return $device->name;\n } else return \"Unknown\";\n }", "public function setDeviceName($value)\n {\n return $this->set('DeviceName', $value);\n }", "public function setDeviceName($value)\n {\n return $this->set('DeviceName', $value);\n }", "function exists(){\n\t\t$sql = 'SELECT barcode FROM barcodes\n\t\t\t\tWHERE barcode = \"'.$this->code.'\"';\n\t\t$this->DB->query($sql);\n\t\tif(!$this->DB->isEmpty())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->error = 'The barcode <strong>'.$this->code.'</strong> was not properly pre-registered. Please put this wristband aside, and distribute a new one.';\n\t\t\treturn false;\n\t\t}\n\t}", "public function isFromVendor(): bool;", "function getDevicesResult() {\n\treturn db_query(\"SELECT name as Name, lpad(hex(serial),16,'0') as Serial, type as Type, active as Active FROM Devices\");\n}", "function is_smartphone()\n {\n return dev::isSmartphone();\n }", "public function checkVariableName(array $data): bool\n {\n //Jesli nie istnieje taki klucz w tablicy, to zwracamy false ze nie ma odpowiedniego pola\n if (!(array_key_exists('device_name', $data))) {\n return false;\n }\n return true;\n }", "private function getOneNotifDeviceByDeviceId() {\n $this->user_panel->checkAuth();\n $this->notif_device->findOneByDeviceId();\n }", "public function getDeviceManufacturer()\n {\n return $this->deviceManufacturer;\n }", "public function addDeviceInfo(Request $request)\n {\n //Form validation\n $this->validate($request, [\n 'deviceType' => 'required',\n 'serialNo' => 'required'\n ]);\n\n // Collecting data from html form\n $deviceType = trim($request->deviceType);\n $serialNo = trim($request->serialNo);\n\n $serialCount = DB::table('tbl_devices')->where('serial_no',$serialNo)->count();\n if($serialCount > 0){\n Session::put('failed','Your Serial Already Exists, Try Again.');\n return Redirect::to('addDevice');\n exit();\n }\n\n $data = array();\n $data['device_type'] = $deviceType;\n $data['serial_no'] = $serialNo;\n $data['created_at'] = $this->rcdate;\n\n $query = DB::table('tbl_devices')->insert($data);\n if($query){\n Session::put('success','Congratulations, Device Added Sucessfully!!');\n return Redirect::to('addDevice');\n }else{\n Session::put('failed','Alas !! Error occured, try again.');\n return Redirect::to('addDevice');\n }\n }", "function getProductName($ms3Oid) {\n\t\t$this->dbgstart();\n\t\t$sql = \"SELECT Name FROM Product WHERE AsimOid = '$ms3Oid'\";\n\t\t$result = $this->db->sql_query($sql);\n\t\tif ($result) {\n\t\t\t$row = $this->db->sql_fetch_row($result);\n\t\t\t$this->dbgend();\n\t\t\treturn $row[0];\n\t\t}\n\t\t$this->dbgend();\n\t\treturn false;\n\t}", "public static function isMounted($mnt)\n{\nreturn isset(self::$phk_tab[$mnt]);\n}", "function gettemp(){\nglobal $serial;\nwhile( empty($read)){\n$serial->deviceOpen();\n$serial->sendMessage(\"4\");\n//usleep(200000);\n$read = $serial->readPort();\n$serial->deviceClose();\n}\n$read2= trim($read);\nreturn $read2;\n\n}", "public function deviceConditionDoesNotMatchRobot() {}", "public function deviceConditionDoesNotMatchRobot() {}", "public function providerHasDevices(): bool\n {\n return $this->providerHasDevices;\n }", "function valid_idsystem($str){\n\t\t$systemExists = $this->DAO->entitySelection('system',array('idSystem' => $str),TRUE);\n\t\tif($systemExists['data']){\n\t\t\t\treturn TRUE;\n\t }else{\n\t\t\t$this->form_validation->set_message('valid_idsystem','The field {field} doesnt exists');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public static function getDeviceDetails($input) {\n $response = false;\n if (isset($input['neid'])) {\n $url = self::getUrl('getdevicedetails');\n $request = Array(\n \"data\" => Array(\n \"neid\" => $input['neid']\n )\n );\n $request = json_encode($request);\n $response = self::getApiResponse($url, $request);\n $response = json_decode($response, true);\n if (isset($response['data'])) {\n $response = $response['data'];\n } else {\n return false;\n }\n }\n return $response;\n }", "public function add_device()\n {\n $data = array(\n 'name' => $this->input->post('name'),\n 'ip' => ip2long($this->input->post('ip')),\n 'snmp_read' => $this->input->post('snmp_read'),\n 'snmp_write' => $this->input->post('snmp_write'),\n 'login' => $this->input->post('login'),\n 'password' => $this->input->post('password'),\n 'type' => $this->input->post('type'),\n 'device_type' => $this->input->post('device_type'),\n );\n $this->db->insert('device', $data);\n return 1;\n }", "public function api_functional()\r\n\t{\r\n\t\r\n\t\tif ($this->_device_type == 'cisco') {\r\n\t\r\n\t\t\t//nothing yet\r\n\t\r\n\t\t} elseif ($this->_device_type == 'bairos') {\r\n\t\r\n\t\t\t//nothing yet\r\n\t\r\n\t\t} elseif ($this->_device_type == 'routeros') {\r\n\t\r\n\t\t\t\t$device_reply = $this->execute_command(\"/system package print\");\r\n\t\r\n\t\t\t\tif ($device_reply->get_code() == 1) {\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\r\n\t\t} else {\r\n\t\r\n\t\t\t$trace = debug_backtrace();\r\n\t\t\t$method = $trace[0][\"function\"];\r\n\t\r\n\t\t\tthrow new exception(\"\".$method.\" is not defined for \".$this->_device_type.\"\", 1200);\r\n\t\r\n\t\t}\r\n\t}", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "public function hasComm(){\n return $this->_has(1);\n }", "function getManufacturerUid() {\n \tif(isset($this->manufacturer_uid)) {\n \t\treturn $this->manufacturer_uid;\n \t}\n \treturn false;\n }", "function isValidSerialNumber($serialNumber) {\n\tunset($serialNumber);\n\treturn true;\n}", "private function set_serial($serial) {\n\t\t$this->set_region(substr($serial, 0, 2));\n\t\t$this->serial = $serial;\n\t}" ]
[ "0.6394301", "0.6107094", "0.604391", "0.5802561", "0.56972903", "0.56277186", "0.560827", "0.5600196", "0.5573533", "0.5550399", "0.55337155", "0.5478658", "0.5411178", "0.5410289", "0.5398903", "0.5388905", "0.53744066", "0.5370979", "0.53184354", "0.5305017", "0.52924865", "0.5290201", "0.52875495", "0.5265364", "0.5232868", "0.52205306", "0.5190274", "0.51481515", "0.5116827", "0.5115163", "0.5108437", "0.5107216", "0.5095018", "0.50829095", "0.5071985", "0.50348717", "0.5000065", "0.4999989", "0.49911368", "0.49820894", "0.49806747", "0.49770907", "0.4965829", "0.49628508", "0.4958086", "0.4957292", "0.4956898", "0.495016", "0.4947997", "0.49275148", "0.49224824", "0.49224824", "0.49160045", "0.49126017", "0.4911774", "0.48995695", "0.48993793", "0.48928455", "0.48799223", "0.48382944", "0.48352572", "0.48319516", "0.48220587", "0.48057246", "0.4802293", "0.47995365", "0.4789182", "0.47711936", "0.47589365", "0.47572422", "0.47529846", "0.47505262", "0.47342044", "0.47339353", "0.47335848", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.47286084", "0.4714848", "0.4710302", "0.4707251" ]
0.5525592
11
Run Method. Write your database seeder using this method. More information on writing seeders is available here:
public function run() { // $data = [ // [ // 'username' => 'michaell', // 'password' => password_hash('michaell_x0hjKasL0!2', PASSWORD_DEFAULT), // 'status' => '1' // ] // ]; // $insert = $this->table('app_users'); // $insert->insert($data) // ->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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(AboutTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n //$this->call(SettingsTableSeeder::class);\n \n\t #iseed_start\n\n\t //$this->call('UsersTableSeeder');\n\t $this->call('AboutTableSeeder');\n $this->call('GalleriesTableSeeder');\n $this->call('MessagesTableSeeder');\n $this->call('MessageStatusesTableSeeder');\n $this->call('ProjectsTableSeeder');\n $this->call('ProjectPropertiesTableSeeder');\n $this->call('PropertiesTableSeeder');\n $this->call('SettingsTableSeeder');\n #iseed_end\n }", "public function run()\n {\n factory(App\\Models\\Post::class, 1000)->create();\n\n // this is hardcoded info for the seeder to run\n \t// $user1 = new App\\User();\n\t // $user1->email = '[email protected]';\n\t // $user1->name = 'Luis';\n\t // $user1->password = Hash::make('password123');\n\t // $user1->save();\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 // $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 $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 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 \n\n \n $this->call(BodyTypeTableSeeder::class);\n $this->call(ChildrenWithYouTableSeeder::class);\n $this->call(CountryGrewUpTableSeeder::class);\n $this->call(DressTableSeeder::class);\n $this->call(EducationTableSeeder::class);\n $this->call(EthnicityTableSeeder::class);\n $this->call(HobbiesTableSeeder::class);\n $this->call(HowManyChildrenTableSeeder::class);\n $this->call(LanguageTableSeeder::class); \n $this->call(MaritalStatusTableSeeder::class);\n $this->call(ProfessionTableSeeder::class);\n $this->call(RoleTableSeeder::class); \n $this->call(SextableSeeder::class);\n $this->call(StatusInCanadaTableSeeder::class);\n $this->call(StatustableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(AdminActionsTableSeeder::class);\n\n // $this->call(SeedWholeDatabaseSeeder::class);\n \n $this->call(LocationSeederTable::class);\n \n \n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*DB::table('users')->insert([\n \t\t'name'=>'admin',\n \t\t'email'=>'[email protected]',\n \t\t'password'=>bcrypt('123456'),\n \t\t'role_id'=> 1,\n\n\n \t]);*/\n //$this->call(RolesSeeder::class);\n //$this->call(UsersSeeder::class);\n $this->call(PrivilegsSeeder::class);\n //$this->call(AttendanceTypeSeeder::class);\n\n }", "public function run()\n {\n // DB::table('users')->insert([\n // ['id'=>1, 'email'=>'nhat','password'=>bcrypt(1234), 'lever'=>0]\n // ]);\n // $this->call(UsersTableSeeder::class);\n // $this->call(CatTableSeeder::class);\n // $this->call(TypeTableSeeder::class);\n // $this->call(AppTableSeeder::class);\n // $this->call(GameTableSeeder::class);\n \n \n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n /* Curso::factory(8)->create(); */\n /* $this->call(CidepartamentoSeeder::class);\n $this->call(CategoriaSeeder::class);\n $this->call(GeneroSeeder::class); */\n\n /* $this->call(UserSeeder::class); */\n\n\n /* Estudiante::factory(20)->create(); */\n\n /* Profesore::factory(12)->create(); */\n\n\n /* $this->call(EstudianteSeeder::class); */\n /* $this->call(CursoSeeder::class); */\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \t$this->call('RolTableSeeder');\n \t$this->call('UserTableSeeder');\t\t\n \t$this->call('UserProfileTableSeeder');\n \t$this->call('AppTableSeeder');\n \t$this->call('AppXUserTableSeeder');\n \t$this->call('ModuleTableSeeder');\n \t$this->call('OptionTableSeeder');\n \t$this->call('PermitTableSeeder');\n $this->call('DepartmentTableSeeder');\n $this->call('CityTableSeeder');\n $this->call('CategoryTableSeeder');\t\n $this->call('StageTableSeeder');\n $this->call('ConectorsTableSeeder');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $this->call(userTableSeeder::class);\n $this->call(hrl1TableSeeder::class);\n $this->call(hrl1CategoryTableSeeder::class);\n $this->call(hrl1PositionTableSeeder::class);\n $this->call(tel1TableSeeder::class);\n $this->call(pel2TableSeeder::class);\n $this->call(pel4TableSeeder::class);\n // $this->call(tel1CostfactorTableSeeder::class);\n\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'phone' => '0507507763',\n 'password' => bcrypt('admin'),\n 'role' => 'admin',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n DB::table('default_settings')->insert([\n 'default_count' => 10,\n 'cake_count' => 7,\n 'cheesecake_count' => 5,\n 'cupcake_count' => 40,\n ]);\n $this->call(AdditionalDecorationSeeder::class);\n $this->call(AdditionalFillerSeeder::class);\n $this->call(CakeFillingSeeder::class);\n $this->call(CakeSideDecorationSeeder::class);\n $this->call(CakeTopDecorationSeeder::class);\n $this->call(StatusSeeder::class);\n $this->call(DeliverySeeder::class);\n $this->call(OrderSeeder::class);\n $this->call(CakeSizeSeeder::class);\n $this->call(CakeSeeder::class);\n $this->call(ProductSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(ProductCategorySeeder::class);\n\n // $this->call(OrderCakeSeeder::class);\n\n }", "public function run()\n {\n $this->call([\n LevelsTableSeeder::class,\n LocationsTableSeeder::class,\n UsersTableSeeder::class,\n UnitsTableSeeder::class,\n CategoriesTableSeeder::class,\n SubcategoriesTableSeeder::class,\n CategorySubcategoryTableSeeder::class,\n // ProductsTableSeeder::class,\n RegionsTableSeeder::class,\n DistrictsTableSeeder::class,\n WardsTableSeeder::class,\n UserWardTableSeeder::class,\n LocationUserTableSeeder::class,\n StatusesTableSeeder::class,\n TransactiontypesTableSeeder::class,\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(CreateUsersSeeder::class);\n $this->call(GameTableSeeder::class);\n\n $this->call(ScenariosTableSeeder::class);\n $this->call(PrefabsTableSeeder::class);\n $this->call(PrefabScanrioTableSeeder::class);\n\n\n // $this->call(KnowledgeComponentsTableSeeder::class);\n }", "public function run()\n {\n // seeder\n $this->call(CategoriesTableSeeder::class);\n $this->call(PostTypesTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n\n // factory\n factory(App\\User::class, 20)->create(); // PostFactory内でもUserFactoryをコールしているので、このFactoryは合計2回コールされる\n factory(App\\Post::class, 20)->create();\n\n // Userデータが作られた後に実行する\n $this->call(EnsemblesTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n LanguageTableSeeder::class,\n BusinessTableSeeder::class,\n SuperuserTableSeeder::class,\n ConsumerTableSeeder::class,\n DelivererTableSeeder::class,\n DelivererLocationTableSeeder::class,\n MenuTableSeeder::class,\n CategoryTableSeeder::class,\n CategoryNameTableSeeder::class,\n ItemTypeTableSeeder::class,\n ItemTypeNameTableSeeder::class,\n ItemTableSeeder::class,\n MenuNameTableSeeder::class,\n ItemNameTableSeeder::class,\n OrderTableSeeder::class,\n PaymentTableSeeder::class,\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(GuestsTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(StatesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(PanelsTableSeeder::class);\n $this->call(ComplaintsTableSeeder::class);\n }", "public function run()\n { \n $this->call(UserSeeder::class);\n \n /**\n * Company with employees seeder\n */\n \\App\\Models\\Company::factory()->count(10)\n ->has(\\App\\Models\\Employee::factory()->count(5))\n ->create();\n }", "public function run()\n {\n //$this->call(SectionSeeder::class);\n $this->call(AdminSeeder::class);\n //$this->call(ClientSeeder::class);\n \n \n\n\n\n //DB::table('users')->insert([\n // 'name' => 'Harry Han',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // 'contractorLastname' => 'Han',\n // 'contractorCompany' => 'test-company' ,\n // 'contractorContactNumber' => '0600000000',\n // 'contractorStatus' => 'active'\n //]);\n }", "public function run()\n {\n Model::unguard();\n\n $this->command->info('seed start!');\n\n // 省市县\n $this->call('RegionTableSeeder');\n // 用户、角色\n $this->call('UserTableSeeder');\n // 权限\n $this->call('PurviewTableSeeder');\n // 博文分类\n $this->call('CategoryTableSeeder');\n // 博文、评论、标签\n $this->call('ArticleTableSeeder');\n // 心情\n $this->call('MoodTableSeeder');\n // 留言\n $this->call('MessageTableSeeder');\n // 文件\n $this->call('StorageTableSeeder');\n\n $this->command->info('seed end!');\n }", "public function run()\n {\n //\\App\\Models\\User::factory(400)->create();\n //\\App\\Models\\Ship::factory(10000)->create();\n //\\App\\Models\\City::factory(1000)->create();\n //\\App\\Models\\Offer::factory(2000)->create();\n\n /* $this->call([\n CountrySeeder::class,\n ]);*/\n\n }", "public function run()\n {\n // \\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(UsersTableSeeder::class);\n $this->call(ConditionsTableSeeder::class);\n $this->call(DeliveriesTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(AdvertsTableSeeder::class);\n // plaats postcode import in eigen / aparte seeder class ==>> Made migration (else DB:rename doesn't work inside seeder, makes copy)\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(ExamSubjectSeeder::class);\n $this->call(ActivitiesSeeder::class);\n $this->call(CountriesSeeder::class);\n $this->call(StatesSeeder::class);\n $this->call(StudentSchoolNameSeeder::class);\n $this->call(WriteitDetailSeeder::class);\n $this->call(WriteitPersonalSeeder::class);\n $this->call(WriteitQuestionSeeder::class);\n $this->call(Collegeyears::class);\n }", "public function run()\n {\n //$this->call(PetTypeTableSeeder::class);\n //$this->call(PetCategoryTableSeeder::class);\n //$this->call(UserTableSeeder::class);\n //$this->call(InventoryTypeTableSeeder::class);\n //$this->call(ServiceSeeder::class);\n //$this->call(FoodCategoryTableSeeder::class);\n //$this->call(MedicineCategoryTableSeeder::class);\n //$this->call(PassingRateTableSeeder::class);\n //$this->call(BarangayTableSeeder::class);\n //$this->call(BreedTableSeeder::class);\n //$this->call(CityTableSeeder::class);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call([\n UserSeeder::class,\n LanguageSeeder::class,\n MenuKeywordSeeder::class,\n ContentOneGroupKeywordSeeder::class,\n ContentTwoGroupKeywordSeeder::class,\n ContentThreeGroupKeywordSeeder::class,\n ContentFourGroupKeywordSeeder::class,\n ContentFiveGroupKeywordSeeder::class,\n ContentSixGroupKeywordSeeder::class,\n FrontendOneGroupKeywordSeeder::class,\n FrontendTwoGroupKeywordSeeder::class,\n SectionSeeder::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 // $this->call(UsersTableSeeder::class);\n $this->call(LaratrustSeeder::class);\n $this->call(OverrideLaratrustDefaultUser::class);\n $this->call(DefaultUnitTableSeeder::class);\n $this->call(PhoneProviderTableSeeder::class);\n\n /* DUMMY DATA */\n if (App::environment('local', 'dev')) {\n\n $this->command->info('Local/Development Enviroment Detected. Starting Dummy Data Seeder...');\n\n $this->call(BankTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n $this->call(ProductTypeTableSeeder::class);\n $this->call(SupplierTableSeeder::class);\n $this->call(CustomerTableSeeder::class);\n $this->call(TrucksTableSeeder::class);\n $this->call(VendorTruckingTableSeeder::class);\n $this->call(WarehouseTableSeeder::class);\n $this->call(PriceLevelTableSeeder::class);\n $this->call(TruckMaintenancesTableSeeder::class);\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 // $this->call(UsersTableSeeder::class);\n $this->call('GendersTableSeeder');\n $this->call('CountriesTableSeeder');\n $this->call('CitiesTableSeeder');\n $this->call('RolesTableSeeder');\n $this->call('UsersTableSeeder');\n $this->call('StatusesTableSeeder');\n }", "public function run()\n {\n\n $this->call(NotificationsSeeder::class);\n factory(\\App\\Models\\City::class, 20)->create();\n $this->call(TransactionStatusSeeder::class);\n $this->call(LeadStatusesSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(UserCitySeeder::class);\n $this->call(LeadRejectionReasonsSeeder::class);\n factory(\\App\\Models\\User::class, 4)->create();\n factory(\\App\\Models\\Lead::class, 100)->create();\n $this->call(LeadTypesSeeder::class);\n\n }", "public function run()\n {\n //$this->call(UserSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(CategoriasSeeder::class);\n $this->call(PackagesTableSeeder::class);\n // $this->call(OrdenPurchaseTableSeeder::class);\n $this->call(RanksTableSeeder::class);\n // $this->call(CountryTableSeeder::class);\n // $this->call(CategoriesTableSeeder::class);\n // $this->call(ServicesTableSeeder::class);\n // $this->call(TimeZoneTableSeeder::class);\n // $this->call(AddSaldoTableSeeder::class);\n // $this->call(WalletTableSeeder::class);\n }", "public function run()\n {\n $this->call(GenderSeeder::class);\n $this->call(TitleSeeder::class);\n $this->call(CountrySeeder::class);\n $this->call(LocationSeeder::class);\n $this->call(EmployeeSeeder::class);\n $this->call(DepartmentSeeder::class);\n $this->call(EmployeeDepartmentSeeder::class);\n $this->call(NotesSeeder::class);\n }", "public function run()\n {\n $this->call([\n UserTableSeeder::class,\n BrandSeeder::class,\n CategorySeeder::class,\n ProductSeeder::class,\n /*SliderSeeder::class,\n CustomerSeeder::class,\n ShippingSeeder::class,\n OrderSeeder::class,\n OrderInfoSeeder::class,\n PaymentSeeder::class,\n subscribersSeeder::class,*/\n ]);\n }", "public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }", "public function run()\n {\n $this->call([\n SiteSettingsSeeder::class,\n LaratrustSeeder::class,\n CountrySeeder::class,\n GovernorateSeeder::class,\n FaqSeeder::class,\n SitePageSeeder::class,\n UsersSeeder::class,\n ]);\n\n Country::whereiso(\"EG\")->update(['enable_shipping' => true]);\n\n factory(User::class, 400)->create();\n\n Category::create([\n 'en' => [\n 'name' => \"cake tools\"\n ]\n ]);\n\n Category::create([\n 'en' => [\n 'name' => \"Party Supplies\"\n ]\n ]);\n\n $this->call([\n ProductCategorySeeder::class,\n ProductSeeder::class\n ]);\n }", "public function run()\n\t{\n\t\t//composer require fzaninotto/faker\n\t\t\n\t\t$this->call(populateAllSeeder::class);\n\t\t\n\t}", "public function run()\n\t{\n\t\tModel::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\t\t$this->call('ArticlesSeeder');\n $this->call('CategoriesSeeder');\n $this->call('LangsSeeder');\n $this->call('UsersSeeder');\n $this->call('TextsSeeder');\n\n\t}", "public function run() {\n\n // seeder para insertar trabajos\n $this->call(LanaSeeder::class);\n\n // seeder para insertar usuarios\n $this->call(UsuariosSeeder::class);\n\n // seeder para introducir trabajadores\n $this->call(LangileaSeeder::class);\n\n //seeder para insertar informacion de las fotos\n $this->call(ArgazkiSeeder::class);\n\n //seeder para insertar informacion de las citas\n $this->call(ZitaSeeder::class);\n\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 $this->call(UserSeeder::class);\n $this->call(AuditeeSeeder::class);\n $this->call(AuditorSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(ContractorSeeder::class);\n $this->call(DepartmentSeeder::class);\n $this->call(SiteSeeder::class);\n $this->call(MonitoringSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(AdminTablesSeeder::class);\n\n $this->call(TemplatesTableSeeder::class);\n\n $this->call(ActivitiesSeeder::class);\n\n $this->call(AwardsSeeder::class);\n\n// $this->call(CertificatesSeeder::class);\n $this->call(AdminMenuTableSeeder::class);\n $this->call(ActivitiesTableSeeder::class);\n// $this->call(AwardsTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call('RoleTableSeeder');\n $this->call('PositionsTableSeeder');\n $this->call('EditionTypesTableSeeder');\n $this->call('StagesTableSeeder');\n $this->call('WorkType_PositionsTableSeeder');\n $this->call('WorkTypesTableSeeder');\n\n\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n SuperUserSeeder::class,\n SquadSeeder::class,\n EmployeeStatusSeeder::class,\n OfficeSeeder::class,\n TribeSeeder::class,\n EmployeeSeeder::class,\n EmployeeSquadSeeder::class,\n SquadTribeSeeder::class,\n ProductSeeder::class,\n EmployeeProductSeeder::class,\n // SchedulingSeeder::class,\n // RealtySeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(OrgCategoriesSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(TargetSubcategoriesTableSeeder::class);\n $this->call(TargetCategoriesTableSeeder::class);\n $this->call(TargetItemsTableSeeder::class);\n $this->call(ParentalStatusesSeeder::class);\n $this->call(GenderSeeder::class); \n $this->call(EducationSeeder::class); \n $this->call(IncomeSeeder::class); \n $this->call(LanguagesSeeder::class); \n }", "public function run()\n {\n $this->call([\n //DaysSeeder::class, \n \n //MediaFilePurposeSeeder::class, \n //UploadedFileSeeder::class, \n //SlidesSeeder::class, \n //YachtSeeder::class, \n //PackageSeeder::class, \n //MediaFileSeeder::class,\n PageCategoriesTableSeeder::class,\n CountriesTableSeeder::class,\n StatesTableSeeder::class,\n CruiseAvailableDaysTableSeeder::class,\n CruiseDateSettingsTableSeeder::class,\n ]);\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(DefaultUserSeeder::class);\n $this->call(SportsProductsSeeder::class);\n $this->call(PhonesProductsSeeder::class);\n $this->call(HeadphonesProductsSeeder::class);\n $this->call(ShirtsProductsSeeder::class);\n $this->call(FurnituresProductsSeeder::class);\n $this->call(VideoGamesProductsSeeder::class);\n $this->call(Payment_MethodsSeeder::class);\n $this->call(ShippingMethodsSeeder::class);\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(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 // \\App\\Models\\User::factory(10)->create();\n $this->call([\n HomeSeeder::class,\n ]);\n\n $this->call([\n NewsSeeder::class,\n ]);\n\n $this->call([\n ProductSeeder::class,\n ]);\n\n $this->call([\n ProgramSeeder::class,\n ]);\n \n $this->call([\n AboutSeeder::class,\n ]);\n\n $this->call([\n ContactSeeder::class,\n ]);\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 {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call([\n AdminTableSeeder::class,\n VendorTableSeeder::class,\n AppSettingSeeder::class,\n ]);\n\n Vendor::factory(20)->create();\n Software::factory(20)->create();\n Softwarecategories::factory(20)->create();\n Softwarespecification::factory(20)->create();\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(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 // $this->call(UsersTableSeeder::class);\n User::create(['username' => 'penjaminan', 'email' => '[email protected]', 'password' => Hash::make('pdfvgf')]);\n $this->call(TahapanProyekDropdownSeeder::class);\n $this->call(JenisInfrastrukturSeeder::class);\n $this->call(DropdownSeeder::class);\n $this->call(ChecklistSeeder::class);\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 $this->call([\n UsersTableSeeder::class,\n ActivitiesTableSeeder::class,\n AnswersTableSeeder::class,\n CategoriesTableSeeder::class,\n CoursesTableSeeder::class,\n FollowsTableSeeder::class,\n LessionsTableSeeder::class,\n PermissionRoleTableSeeder::class,\n PermissionsTableSeeder::class,\n QuestionsTableSeeder::class,\n RolesTableSeeder::class,\n TestTableSeeder::class,\n TestQuestionTableSeeder::class,\n UserCourseTableSeeder::class,\n UserLessionTableSeeder::class,\n UserWordTableSeeder::class,\n WordsTableSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call([\n LocationSeeder::class,\n BranchSeeder::class,\n DepartmentSeeder::class,\n DesignationSeeder::class,\n GenderSeeder::class,\n MaritalStatusSeeder::class,\n PayGradeSeeder::class,\n EmployeeEducationCatrgorySeeder::class,\n EmployeeEducationSeeder::class,\n EmployeeCategorySeeder::class,\n UserGroupSeeder::class,\n LeaveCategorySeeder::class,\n LeaveApplicationSeeder::class,\n UserSeeder::class\n ]);\n\n }", "public function run()\n {\n $this->call(\\Database\\Seeders\\GroupByRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\SingleIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\MultiIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\JoinFiveTablesSeeder::class);\n\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// // 試しに一回流す\n// $data = $this->makeData(0, 'userFactory', 1);\n// DB::table('users')->insert($data);\n// $data = $this->makeData(0, 'userDetailFactory', 1);\n// DB::table('user_details')->insert($data);\n//\n// // $this->call(UsersTableSeeder::class);\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userFactory', 2500);\n// DB::table('users')->insert($data);\n// }\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userDetailFactory', 2500);\n// DB::table('user_details')->insert($data);\n// }\n }", "public function run()\n {\n $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 // factory('App\\Model\\Member', 'Member', 111)->create();\n // $this->call(UsersTableSeeder::class);\n // factory('App\\Model\\Order', 'Order', 51)->create()->each(function($u) {\n // for ($i=0; $i < mt_rand(1,3); $i++) {\n // $u->orderDetail()->save(factory('App\\Model\\OrderDetail', 'OrderDetail', 1)->make());\n // }\n // for ($k=1; $k < mt_rand(2,6); $k++) { \n // $u->orderLog()->save(factory('App\\Model\\OrderLog', 'OrderLog', 1)->make([\n // 'action' => $k,\n // ]));\n // }\n // });\n //factory(App\\Model\\Notification::class, 'Notification', 100)->create();\n //factory(App\\Model\\MicroForumLog::class, 'MicroForumLog', 1000)->create();\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(AdminsSeeder::class);\n $this->call(CategoriesSeeder::class);\n $this->call(ProductsSeeder::class);\n $this->call(EventsSeeder::class); \n }", "public function run()\n {\n //base seeds\n $this->call(RoleSeed::class);\n $this->call(UserSeed::class);\n $this->call(PointSeed::class);\n $this->call(LevelSeed::class);\n\n // $this->call(CourseSeed::class);\n // $this->call(LessonSeed::class);\n\n\n // $this->call(AnswerSeed::class);\n // $this->call(QuizSeed::class);\n // $this->call(QuestionSeed::class);\n // $this->call(TemplateSeed::class);\n // $this->call(CertificationSeed::class);\n \n //relation seeds\n // $this->call(CourseLessonSeed::class);\n // $this->call(CourseQuizSeed::class);\n // $this->call(QuizQuestionSeed::class);\n // $this->call(QuestionAnswerSeed::class);\n //$this->call(DataCourseSeed::class);\n //$this->call(DataLessonSeed::class);\n }", "public function run()\n {\n $this->call(UserSeed::class);\n $this->call(CategorySeed::class);\n $this->call(ExperienceSeeder::class);\n $this->call(LocationSeeder::class);\n $this->call(SalarySeeder::class);\n\n }", "public function run()\n {\n // $this->call('UsersTableSeeder');\n // $this->call(PersonasTableSeeder::class);\n // $this->call(UsersTableSeeder::class);\n //$this->call(ArchivoTableSeeder::class);\n //$this->call(CategoriaTableSeeder::class);\n //$this->call(SubcategoriaTableSeeder::class);\n // $this->call(ArchivoSubcategoriaTableSeeder::class);\n // $this->call(UsuarioSubcategoriaTableSeeder::class);\n //$this->call(HistorialVistasTableSeeder::class);\n\n\n\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\n $this->call([\n NavbarSeeder::class,\n Section2Seeder::class,\n AboutUsSeeder::class,\n FeatureSeeder::class,\n ServiceSeeder::class,\n PortfolioSeeder::class,\n TestimonialSeeder::class,\n TeamSeeder::class,\n ContactSeeder::class,\n FooterSeeder::class,\n FooterBottomSeeder::class,\n TitreSeeder::class,\n RoleSeeder::class,\n UserSeeder::class\n ]);\n }", "public function run()\n {\n\n $this->call(UsersTableSeeder::class);\n $this->call(StudentsTableSeeder::class);\n\n $this->call(SectionsTableSeeder::class);\n $this->call(SectionsTableHeaderFooterSeeder::class);\n $this->call(QuestionsTableSeeder::class);\n $this->call(AnswersTableSeeder::class);\n\n $this->call(LocationsTableSeeder::class);\n $this->call(WardsTableSeeder::class);\n\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(GrammarQuestionTypesTableSeeder::class);\n $this->call(ConfigTableSeeder::class);\n $this->call(AudioTypesTableSeeder::class);\n $this->call(GroupTypesTableSeeder::class);\n\n// $this->call(ReservationsTableSeeder::class);\n// $this->call(GrammarQuestionsTableSeeder::class);\n// $this->call(ParagraphsTableSeeder::class);\n// $this->call(ParagraphQuestionsTableSeeder::class);\n// $this->call(VocabQuestionsTableSeeder::class);\n\n\n }", "public function run()\n {\n// $this->call('CheckoutUniquesTableSeeder');\n $this->call('StatusTableSeeder');\n $this->call('RolesTableSeeder');\n $this->call('LoginTypeTableSeeder');\n $this->call('UsersTableSeeder');\n $this->call('FilesTableSeeder');\n $this->call('CategoriesTableSeeder');\n $this->call('EventsTableSeeder');\n $this->call('GoodsTableSeeder');\n $this->call('ProfilesTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('BasketsTableSeeder');\n $this->call('BasketsGoodsTableSeeder');\n $this->call('PaymentTableSeeder');\n $this->call('AddressesTableSeeder');\n $this->call('ReceiversTableSeeder');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(Tipo_DocumentoSeeder::class);\n\n $this->call(RolSeeder::class);\n\n $this->call(GeneroSeeder::class);\n\n $this->call(MaterialSeeder::class);\n\n $this->call(CategoriaSeeder::class);\n\n $this->call(ClasificacionSeeder::class);\n\n $this->call(UsuarioSeeder::class);\n\n $this->call(TallaSeeder::class);\n\n $this->call(ProductoSeeder::class);\n\n $this->call(ContactoSeeder::class);\n\n\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(ToolsMenuTableSeeder::class);\n $this->call(ToolsMenuItemsTableSeeder::class);\n $this->call(ToolsMarkTableSeeder::class);\n $this->call(SystemRoleTableSeeder::class);\n $this->call(FileDirTableSeeder::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 Model::unguard();\n\n // $this->call(TodoTableSeeder::class);\n\n // $this->call(TimeEntriesTableSeeder::class);\n // $this->call(UsersTableSeeder::class);\n // $this->command->info('User and Time entry seeded');\n\n\n // $this->call(UserTableSeeder::class);\n // $this->call(CommentTableSeeder::class);\n\n // Comment::create([\n // 'author' => 'Chris Sevilleja',\n // 'text' => 'Look I am a test comment.'\n // ]);\n \n // Comment::create(array(\n // 'author' => 'Nick Cerminara',\n // 'text' => 'This is going to be super crazy.'\n // ));\n \n // Comment::create(array(\n // 'author' => 'Holly Lloyd',\n // 'text' => 'I am a master of Laravel and Angular.'\n // ));\n\n\n // $this->command->info('Comment table seeded.');\n\n Model::reguard();\n }", "public function run()\n {\n // Disable guard for seeder\n Eloquent::unguard();\n\n $this->call(AvasTableSeeder::class);\n $this->call(WineriesTableSeeder::class);\n $this->call(AvaWineryTableSeeder::class);\n $this->call(TimesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(FavoritesTableSeeder::class);\n $this->call(WishlistsTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n GenderSeeder::class,\n FilmSeeder::class,\n HomeworldSeeder::class,\n PersonSeeder::class,\n FilmPersonSeeder::class,\n StarshipSeeder::class,\n FilmStarshipSeeder::class,\n PersonStarshipSeeder::class,\n VehicleSeeder::class,\n FilmVehicleSeeder::class,\n PersonVehicleSeeder::class,\n SpecieSeeder::class,\n FilmSpecieSeeder::class,\n PersonSpecieSeeder::class,\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call('PersonaSeeder');\n $this->call('RolSeeder');\n $this->call('PrivilegiosSeeder');\n $this->call('UsuarioSeeder');\n $this->call('PrivilegiosDefaultSeeder');\n $this->call('UsuarioPrivilegiosSeeder');\n }", "public function run()\n {\n $this->call([\n PermissionsTableSeeder::class,\n RolesTableSeeder::class,\n PermissionRoleTableSeeder::class,\n SocialNetworksSeeder::class,\n UsersTableSeeder::class,\n AccountManagerDummySeeder::class,\n DummyDataSeeder::class,\n NotificationsSeeder::class,\n PaymentTypesSeeder::class,\n FileManagerDummySeeder::class,\n TicketsCategoriesSeeder::class\n ]);\n }", "public function run()\n {\n $this->call(UserTableSeeder::class);\n $this->call(RolesAndPermissionsSeeder::class);\n $this->call(ProductTypeTableSeeder::class); \n $this->call(BrandTableSeeder::class);\n $this->call(EmployeeTypeTableSeeder::class);\n \n $this->call(CitiesTableSeeder::class);\n $this->call(BranchTableSeeder::class);\n\n //$this->call(CustomerTableSeeder::class);\n //$this->call(EmployeeTableSeeder::class);\n //$this->call(ProductTableSeeder::class);\n //$this->call(StockTableSeeder::class);\n \n }", "public function run()\n {\n $this->call(PermissionSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(groupTableSeeder::class);\n $this->call(usergroupTableSeeder::class);\n $this->call(MotifTableSeeder::class);\n /*$this->call('filesTableSeeder');\n $this->call('periodTableSeeder');\n $this->call('contributionTableSeeder');\n\n $this->call('adsTableSeeder');\n $this->call('ads_has_filesTableSeeder');\n $this->call('ballotTableSeeder');\n $this->call('propositionTableSeeder');\n */\n //Model::reguard();\n }", "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 $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 $this->call(RoleSeeder::class);\n $this->call(LevelSeeder::class);\n $this->call(TypeSeeder::class);\n User::factory(100)->create();\n Question::factory(100)->create();\n $this->call(AnswerSeeder::class);\n Test::factory(5)->create();\n Result::factory(20)->create();\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 \t$this->call(PermissionsSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(TagsSeeder::class);\n $this->call(QuestionsSeeder::class);\n $this->call(AnswersSeeder::class);\n $this->call(TaggablesSeeder::class);\n $this->call(DocumentationsSeeder::class);\n $this->call(CommentsSeeder::class);\n $this->call(SubjectsSeeder::class);\n $this->call(VotesSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\t\t//$this->call('ReportsTableSeeder');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n \n $this->call(ZonasSeeder::class);\n $this->call(DepartamentosSeeder::class);\n $this->call(MunicipiosSeeder::class);\n $this->call(CategoriasSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(usersSeeder::class);\n $this->call(TiposPruebasSeeder::class);\n $this->call(ResultadosPruebasSeeder::class);\n $this->call(GravedadesSintomasSeeder::class);\n $this->call(SintomasSeeder::class);\n }", "public function run()\n {\n $this->call(UserTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(SpecialtyTableSeeder::class);\n $this->call(SnsTableSeeder::class);\n $this->call(ProfileTableSeeder::class);\n $this->call(RelationTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n // $this->call(LikeTableSeeder::class);\n // $this->call(MarkTableSeeder::class);\n // $this->call(ProfileToSnsMapTableSeeder::class);\n // $this->call(SubjectTableSeeder::class);\n // $this->call(CommentTableSeeder::class);\n // $this->call(LimitedPostToUserMapTableSeeder::class);\n }", "public function run()\n {\n $this->call(CountrySeeder::class);\n $this->call(CitySeeder::class);\n\n $this->call(UserSeeder::class);\n $this->call(StatusSeeder::class);\n Company::factory(20)->create();\n $this->call(StatusSeeder::class);\n $this->call(RoleSeeder::class);\n $this->call(CategorySeeder::class);\n Offer::factory(100)->create();\n Review::factory(100)->create();\n Project::factory(30)->create();\n Image::factory(90)->create();\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(UsersTableSeeder::class);\n $this->call('DevicetypesTableSeeder');\n $this->call('HscontactsTableSeeder');\n $this->call('HighsiteVisitCategoriesTableSeeder');\n $this->call('BackhaultypesTableSeeder');\n $this->call('SystemsTableSeeder');\n }", "public function run()\n {\n Model::unguard();\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(EntrustTableSeeder::class);\n\n $this->call(AccounttypeSeeder::class);\n $this->call(AppUserTableSeeder::class);\n $this->call(AppEmailUserTableSeeder::class);\n\n\n $this->call(CountryTableSeeder::class);\n $this->call(CityTableSeeder::class);\n\n\n $this->call(PostTypeTableSeeder::class);\n $this->call(PostSubTypeTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(AppPostSolvedTableSeeder::class);\n\n\n $this->call(AppCommentTypeTableSeeder::class);\n // $this->call(AppCommentTableSeeder::class);\n // $this->call(AppSubCommentTableSeeder::class);\n\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }\n\n Model::reguard();\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([\n GenderTableSeeder::class,\n PaymentTypeTableSeeder::class,\n SeasonsTableSeeder::class,\n ProductGendersTableSeeder::class,\n BrandsTableSeeder::class,\n subcategorySeeder::class,\n CategoriesTableSeeder::class,\n ClientsTableSeeder::class,\n ProductsTableSeeder::class,\n SalesTableSeeder::class,\n SaleDetailsTableSeeder::class,\n UsersTableSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n factory(App\\Lead::class,150)->create()->each(function($u){\n $u->domains()->save(factory(App\\Domain::class)->make());\n })->each(function($u){\n $u->communicationValues()->save(factory(\\App\\CommunicationValue::class)->make());\n });\n\n $this->call(DomainsTableSeeder::class);\n\n $this->call(CommunicationValuesTableSeeder::class);\n\n $this->call(CommentsTableSeeder::class);\n\n $this->call(CommunicationRecordsTableSeeder::class);\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 // \\App\\Models\\User::factory(10)->create();\n $this->call([\n AdministratorSeeder::class,\n BitacoraSeeder::class,\n CategorieSeeder::class,\n DeliveryCompanySeeder::class,\n DetailSeeder::class,\n DiscountSeeder::class,\n FavoriteSeeder::class,\n PaymentMethodSeeder::class,\n PaymentSeeder::class,\n ProductCategorieSeeder::class,\n SaleSeeder::class\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(ToDoSeeder::class);\n // $this->call(SkillTableSeeder::class);\n // $this->call(NotesTableSeeder::class);\n // $this->call(ConfigTableSeeder::class);\n // $this->call(CustomerTableSeeder::class);\n // $this->call(ProjectTableSeeder::class);\n $this->call(StaffProjectTableSeeder::class);\n // $this->call(TaskTableSeeder::class);\n // $this->call(UploadfileSeeder::class);\n }" ]
[ "0.8407967", "0.83793277", "0.83509517", "0.83218557", "0.8317822", "0.83079505", "0.8302541", "0.82998204", "0.82953537", "0.8291797", "0.82812285", "0.82641244", "0.82501954", "0.8241908", "0.8236088", "0.8232583", "0.8226141", "0.8222938", "0.8219742", "0.8218918", "0.82177293", "0.821212", "0.8209568", "0.8197052", "0.8196427", "0.8194538", "0.8192203", "0.8190435", "0.8182123", "0.8181906", "0.818148", "0.8175317", "0.8168893", "0.8163351", "0.8159934", "0.81595254", "0.81560874", "0.8155243", "0.8154659", "0.81515795", "0.81509286", "0.8150233", "0.8148816", "0.81443673", "0.81442726", "0.81417465", "0.8140978", "0.8137763", "0.8136035", "0.8135782", "0.81356406", "0.8135463", "0.81344986", "0.8134276", "0.8132434", "0.8130719", "0.81288666", "0.81259984", "0.8125565", "0.81242234", "0.81227875", "0.8122339", "0.8122236", "0.8122081", "0.8120595", "0.8119423", "0.81180495", "0.8115697", "0.8114496", "0.81116396", "0.8110793", "0.8107717", "0.8107491", "0.81072265", "0.8106504", "0.81041694", "0.8102269", "0.8100987", "0.81008667", "0.8100832", "0.8100788", "0.81006086", "0.8100269", "0.80997896", "0.8099057", "0.8097458", "0.8096922", "0.8096186", "0.80929184", "0.8092489", "0.80924374", "0.80922806", "0.80915385", "0.809117", "0.80908424", "0.8090726", "0.80905", "0.8088423", "0.8088324", "0.8086008", "0.80838865" ]
0.0
-1
check for session and cookie presence
public function notification_list() { $this->admin_header(); //fetch the total number of categories $data['total_num_category'] = $this->Admin_model->fetch_all_rows('category'); //fetch the total number of tags $data['total_num_blogs'] = $this->Admin_model->fetch_all_rows('blog'); //fetch the total number of categories $config['total_num_notification'] = $this->Admin_model->fetch_all_rows('notification'); $config['base_url'] = site_url("Admin/notification_list/"); $config['per_page'] = 10; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_notification'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['notifications'] = $this->Admin_model->fetch_notification($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_notification'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_notification']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $this->add_category_template('notification_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasSession() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "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}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "public function checkSession()\n {\n if(isset($_COOKIE['id'])){\n $cookieOrSessionID = $_COOKIE['id'];\n }\n elseif(isset($_SESSION['id'])){\n $cookieOrSessionID = $_SESSION['id'];\n }\n return $cookieOrSessionID;\n }", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function is_cookie_set()\n {\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isCookieSet() {}", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\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 static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function user_check_session_id() {\n if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success();\n else wp_send_json_error();\n }", "public static function checkSession() {\n\t\t// Set any API keys\n\t\t$api_keys = array();\n\t\t// Check API Key or Session Authentication\n\t\t$key = \"\";\n\t\tif (isset($_GET['key'])) {\n\t\t\t$key = $_GET['key'];\n\t\t}\n\t\tif (!isset($_SESSION['user']) && !in_array($key, $api_keys)) {\n\t\t\texit('{\"status\":\"error\",\"message\":\"Authentication Error\"}');\n\t\t}\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "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 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 function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\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 sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "function sess_check ()\n\t{\n\n\t\tglobal $xnyo_parent;\n\n\t\t// store the IP Address in the session varz\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Storing IP/Browser/Time.');\n\t\t$_SESSION['_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION['_browser'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$_SESSION['_last_activity'] = time();\n\n\t\t// if we're logged in, do auth stuff\n\t\tif (!empty($xnyo->user))\n\t\t{\n\t\t\t// there really isnt much to do in here\n\t\t\t// check that we havent expired\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session expiry.');\n\t\t\tif ($_SESSION['auth']['expiry'] !== 0)\n\t\t\t{\n\t\t\t\tif (time() > $_SESSION['auth']['expiry'])\n\t\t\t\t{\n\t\t\t\t\t$time = time() - $_SESSION['auth']['expiry'];\n\t\t\t\t\t$errmsg = \"Session time expired ($time seconds). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t\t$this->logout ('expired');\n\t\t\t\t} else {\n\t\t\t\t\t// update session times\n\t\t\t\t\t$_SESSION['auth'][\"expiry\"] = time() + $xnyo_parent->session_lifetime;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check their subnet is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session subnet.');\n\t\t\tif ($_SESSION['auth']['subnet'] != $this->subnet())\n\t\t\t{\n\t\t\t\t$errmsg = \"Session moved subnet (\" . $_SESSION['auth']['subnet'] . \" => \" . $this->subnet() . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('moved_subnet');\n\t\t\t}\n\t\n\t\t\t// check browser is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session Browser.');\n\t\t\tif ($_SESSION['auth']['browser'] != $_SERVER['HTTP_USER_AGENT'])\n\t\t\t{\n\t\t\t\t$errmsg = \"User changed browsers (\" . $_SESSION['auth']['browser'] . \" => \" . $_SERVER['HTTP_USER_AGENT'] . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('changed_browser');\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t// access checking is the only thing left i guess\n\t\t// if theres no access level specified, just let them through\n\t\tif (!empty($xnyo_parent->access) && !$this->check($xnyo_parent->access) && !$this->set_acl($xnyo_parent->access))\n\t\t\treturn false;\n\n\t\t// we're all done i guess\n\t\treturn true;\n\t}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "protected function checkSessionToken() {}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public function session_check(){\n\n\tif(!isset($_SESSION[\"user-type\"]) && $_SESSION[\"user-type\"] != \"user\"){\n\t\tredirect(\"Login\");\n\t} \n}", "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\n }", "public function checkSessionStatus(){\t\t\n\t\tif(isset($_SESSION[self::$session])){\n\t\t\treturn $_SESSION[self::$session];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "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 }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "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}", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\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}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected function checkSessionLifetime() {}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "static function check()\n\t{\n\t\t$session = App::get('session');\n\t\treturn $session->get('auth');\n\t}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function checkUsersSession(){\n\t}", "function id_in_session()\n{\n return isset($_SESSION['username']) && isset($_SESSION['loggedin']);\n}", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\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 _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function auth_session_exists() {\n\n // there's an existing session, nothing to do\n if (array_key_exists('user_name', $_SESSION)) {\n return TRUE;\n }\n\n // There's not an existing session, but the user has an auth_key\n // cookie, so see if it matches the database.\n // If it does, create a new session\n if (array_key_exists('auth_userid', $_COOKIE) && array_key_exists('auth_key', $_COOKIE)) {\n require_once '../database/mysql.inc.php';\n $conn = conn();\n\n $auth_userid = $_COOKIE['auth_userid'];\n $auth_key = $_COOKIE['auth_key'];\n $sql = 'SELECT p.name_ingame as name_ingame ' .\n 'FROM player_auth as a, player as p ' .\n 'WHERE a.player_id = :id AND a.auth_key = :auth_key AND a.player_id = p.id';\n $query = $conn->prepare($sql);\n $query->execute(array(':id' => $auth_userid,\n ':auth_key' => $auth_key));\n $resultArray = $query->fetchAll();\n if (count($resultArray) == 1) {\n $name_ingame = $resultArray[0]['name_ingame'];\n session_regenerate_id(TRUE);\n $_SESSION['user_id'] = $auth_userid;\n $_SESSION['user_name'] = $name_ingame;\n $_SESSION['user_lastactive'] = time();\n return TRUE;\n }\n }\n\n // neither session nor cookie lookup worked, so the user is not logged in\n return FALSE;\n}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\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 }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\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 }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\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 function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}" ]
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.69460523", "0.69320947", "0.6906824", "0.6904842", "0.69004583", "0.68975925", "0.68685424", "0.6848523", "0.6844706", "0.6842497", "0.68407005", "0.68338877", "0.6809911", "0.6807682", "0.68048835", "0.6795858", "0.6795753", "0.6790786", "0.67827266", "0.6781565", "0.6776217", "0.67662364", "0.6762543", "0.67525536", "0.67525303", "0.675126", "0.6741708", "0.6723873", "0.6718459", "0.6718133", "0.67175967", "0.67175967", "0.67163414", "0.6715241", "0.67149955", "0.6701401", "0.66959953", "0.6677578", "0.66633356", "0.6658625", "0.6653751", "0.6648311", "0.6635521", "0.663372", "0.6631203", "0.6616926", "0.66162115", "0.66072696", "0.6599716", "0.65856075", "0.65696895", "0.6568369", "0.65658766", "0.6557916", "0.6554719", "0.6548292", "0.65378124", "0.653712", "0.65335554", "0.6526306", "0.65212154", "0.65183794", "0.651378", "0.65086836", "0.6504965", "0.650051", "0.6497977", "0.649534", "0.6494901", "0.64876956", "0.6485331", "0.6483739", "0.6472518", "0.64655817", "0.6464438", "0.64629364", "0.646088", "0.64607173", "0.64595693", "0.6455302", "0.64550734" ]
0.0
-1
check for session and cookie presence
public function view_notification() { $this->admin_header(); //check and confirm if the total url segment is 3 $url_segments = $this->uri->total_segments(); if ($url_segments == 3) { //retrieved the unreviewed property id $notification_id = $this->uri->segment(3); //retrieve from the database all the details of this property $result = $this->Admin_model->fetch_notification_message($notification_id); if ($result === FALSE) { redirect('Admin/notification_list'); } $data['notification_details'] = $result; $this->add_category_template('notification_message', $data); }else { redirect('Admin/notification_list'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasSession() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "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}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "public function checkSession()\n {\n if(isset($_COOKIE['id'])){\n $cookieOrSessionID = $_COOKIE['id'];\n }\n elseif(isset($_SESSION['id'])){\n $cookieOrSessionID = $_SESSION['id'];\n }\n return $cookieOrSessionID;\n }", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function is_cookie_set()\n {\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isCookieSet() {}", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\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 static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function user_check_session_id() {\n if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success();\n else wp_send_json_error();\n }", "public static function checkSession() {\n\t\t// Set any API keys\n\t\t$api_keys = array();\n\t\t// Check API Key or Session Authentication\n\t\t$key = \"\";\n\t\tif (isset($_GET['key'])) {\n\t\t\t$key = $_GET['key'];\n\t\t}\n\t\tif (!isset($_SESSION['user']) && !in_array($key, $api_keys)) {\n\t\t\texit('{\"status\":\"error\",\"message\":\"Authentication Error\"}');\n\t\t}\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "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 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 function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\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 sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "function sess_check ()\n\t{\n\n\t\tglobal $xnyo_parent;\n\n\t\t// store the IP Address in the session varz\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Storing IP/Browser/Time.');\n\t\t$_SESSION['_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION['_browser'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$_SESSION['_last_activity'] = time();\n\n\t\t// if we're logged in, do auth stuff\n\t\tif (!empty($xnyo->user))\n\t\t{\n\t\t\t// there really isnt much to do in here\n\t\t\t// check that we havent expired\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session expiry.');\n\t\t\tif ($_SESSION['auth']['expiry'] !== 0)\n\t\t\t{\n\t\t\t\tif (time() > $_SESSION['auth']['expiry'])\n\t\t\t\t{\n\t\t\t\t\t$time = time() - $_SESSION['auth']['expiry'];\n\t\t\t\t\t$errmsg = \"Session time expired ($time seconds). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t\t$this->logout ('expired');\n\t\t\t\t} else {\n\t\t\t\t\t// update session times\n\t\t\t\t\t$_SESSION['auth'][\"expiry\"] = time() + $xnyo_parent->session_lifetime;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check their subnet is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session subnet.');\n\t\t\tif ($_SESSION['auth']['subnet'] != $this->subnet())\n\t\t\t{\n\t\t\t\t$errmsg = \"Session moved subnet (\" . $_SESSION['auth']['subnet'] . \" => \" . $this->subnet() . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('moved_subnet');\n\t\t\t}\n\t\n\t\t\t// check browser is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session Browser.');\n\t\t\tif ($_SESSION['auth']['browser'] != $_SERVER['HTTP_USER_AGENT'])\n\t\t\t{\n\t\t\t\t$errmsg = \"User changed browsers (\" . $_SESSION['auth']['browser'] . \" => \" . $_SERVER['HTTP_USER_AGENT'] . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('changed_browser');\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t// access checking is the only thing left i guess\n\t\t// if theres no access level specified, just let them through\n\t\tif (!empty($xnyo_parent->access) && !$this->check($xnyo_parent->access) && !$this->set_acl($xnyo_parent->access))\n\t\t\treturn false;\n\n\t\t// we're all done i guess\n\t\treturn true;\n\t}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "protected function checkSessionToken() {}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public function session_check(){\n\n\tif(!isset($_SESSION[\"user-type\"]) && $_SESSION[\"user-type\"] != \"user\"){\n\t\tredirect(\"Login\");\n\t} \n}", "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\n }", "public function checkSessionStatus(){\t\t\n\t\tif(isset($_SESSION[self::$session])){\n\t\t\treturn $_SESSION[self::$session];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "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 }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "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}", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\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}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected function checkSessionLifetime() {}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "static function check()\n\t{\n\t\t$session = App::get('session');\n\t\treturn $session->get('auth');\n\t}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function checkUsersSession(){\n\t}", "function id_in_session()\n{\n return isset($_SESSION['username']) && isset($_SESSION['loggedin']);\n}", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\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 _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function auth_session_exists() {\n\n // there's an existing session, nothing to do\n if (array_key_exists('user_name', $_SESSION)) {\n return TRUE;\n }\n\n // There's not an existing session, but the user has an auth_key\n // cookie, so see if it matches the database.\n // If it does, create a new session\n if (array_key_exists('auth_userid', $_COOKIE) && array_key_exists('auth_key', $_COOKIE)) {\n require_once '../database/mysql.inc.php';\n $conn = conn();\n\n $auth_userid = $_COOKIE['auth_userid'];\n $auth_key = $_COOKIE['auth_key'];\n $sql = 'SELECT p.name_ingame as name_ingame ' .\n 'FROM player_auth as a, player as p ' .\n 'WHERE a.player_id = :id AND a.auth_key = :auth_key AND a.player_id = p.id';\n $query = $conn->prepare($sql);\n $query->execute(array(':id' => $auth_userid,\n ':auth_key' => $auth_key));\n $resultArray = $query->fetchAll();\n if (count($resultArray) == 1) {\n $name_ingame = $resultArray[0]['name_ingame'];\n session_regenerate_id(TRUE);\n $_SESSION['user_id'] = $auth_userid;\n $_SESSION['user_name'] = $name_ingame;\n $_SESSION['user_lastactive'] = time();\n return TRUE;\n }\n }\n\n // neither session nor cookie lookup worked, so the user is not logged in\n return FALSE;\n}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\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 }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\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 }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\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 function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}" ]
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.69460523", "0.69320947", "0.6906824", "0.6904842", "0.69004583", "0.68975925", "0.68685424", "0.6848523", "0.6844706", "0.6842497", "0.68407005", "0.68338877", "0.6809911", "0.6807682", "0.68048835", "0.6795858", "0.6795753", "0.6790786", "0.67827266", "0.6781565", "0.6776217", "0.67662364", "0.6762543", "0.67525536", "0.67525303", "0.675126", "0.6741708", "0.6723873", "0.6718459", "0.6718133", "0.67175967", "0.67175967", "0.67163414", "0.6715241", "0.67149955", "0.6701401", "0.66959953", "0.6677578", "0.66633356", "0.6658625", "0.6653751", "0.6648311", "0.6635521", "0.663372", "0.6631203", "0.6616926", "0.66162115", "0.66072696", "0.6599716", "0.65856075", "0.65696895", "0.6568369", "0.65658766", "0.6557916", "0.6554719", "0.6548292", "0.65378124", "0.653712", "0.65335554", "0.6526306", "0.65212154", "0.65183794", "0.651378", "0.65086836", "0.6504965", "0.650051", "0.6497977", "0.649534", "0.6494901", "0.64876956", "0.6485331", "0.6483739", "0.6472518", "0.64655817", "0.6464438", "0.64629364", "0.646088", "0.64607173", "0.64595693", "0.6455302", "0.64550734" ]
0.0
-1
fetch the total number of categories
public function add_author() { //$data['brands'] = $this->Admin_model->fetch_all_rows_datas('vendor_id','vendors'); $data['total_num_authors'] = $this->Admin_model->fetch_all_rows('authors'); //fetch the total number of tags $data['total_num_blog'] = $this->Admin_model->fetch_all_rows('blog'); //fetch the categories //$data['categories'] = $this->Admin_model->fetch_all_rows_datas('category_id', 'category'); if((isset($_POST) && (!empty($_POST)))){ if ($this->form_validation->run('add_author-form') === FALSE) { $this->add_author_template('add_author', $data); } else { //Set All The Configurations Needed For File Upload $config['upload_path'] = './assets/images/author/'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = 2048; $this->load->library('upload', $config); //Next Check if the Food Logo Has Been Uploaded if (!$this->upload->do_upload('author_photo')) { $data['msg'] = $this->upload->display_errors('<div class="alert alert-danger col-sm-offset-2"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>', '</div>'); $this->add_author_template('add_author', $data); } else { $imgdata['author_photo'] = $this->upload->data('file_name'); if ($this->Admin_model->insert_author($imgdata) === TRUE) { $data['msg'] = '<div class="alert alert-success col-sm-offset-2"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>The Author Has Been Added Successfully.</div>'; $this->add_author_template('add_author', $data); } else { $data['msg'] = '<div class="alert alert-danger col-sm-offset-2"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>An Error Was Encountered While Adding The Author. Pls Try Again</div>'; $this->add_author_template('add_author', $data); } } } } else { $this->add_author_template('add_author', $data); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountCategory()\n {\n return $this->category_model->countAll();\n }", "public function count()\n {\n $categories = (new Magento())->api('categories')\n ->all($this->pageSize, $this->currentPage)\n ->json();\n\n return $categories['total_count'];\n }", "protected function totalCategory(): int\n {\n $this->mockHandler->append(new Response(200, $this->responseHeaders, $this->readResponseFile('category/list.json')));\n \n $countResponseData = $this->fetchCategories();\n \n return ! empty($countResponseData->meta->pagination->total) ? (int) $countResponseData->meta->pagination->total : 0;\n }", "function getCategoriesCount(){\n return $this->query(\"SELECT GROUP_CONCAT(category) FROM docs WHERE visible=1\");\n }", "function fetchCategoryCount() {\n $this->db->select('category_id');\n $query = $this->db->get('tbl_category');\n return $query->num_rows();\n }", "public function countCath()\n\t{\n \t\treturn $this->findAll('kategoria')->count('*');\n\t}", "public function get_category_count()\n {\n $result=$this->db->count_all($this->table_name);\n return $result;\n }", "function fetchCategoryCount()\n\t{\n\t\t$this->db->select('category_id');\n\t\t$query = $this->db->get('tbl_category');\n\t\treturn $query->num_rows();\n\t}", "function countCategories(){\n return $this->db->count_all('post_category');\n \t\t }", "protected function totalCategories() {\n\n return $this->taxonomy->count();\n }", "function getCategoryCount() {\n\t\treturn count($this->domit_rss_categories);\n\t}", "function getCategoryCount() {\n\t\treturn count($this->domit_rss_categories);\n\t}", "function get_all_categorias_count()\n {\n $this->db->from('categoria');\n return $this->db->count_all_results();\n }", "public function findCountCategories()\n {\n $query = self::getDb()->prepare(\"\n\t\t\tSELECT COUNT(id)\n\t\t\tFROM {$this->repository}\n\t\t\");\n $query->execute();\n $count = $query->fetch();\n return $count[0];\n }", "function countCategories($db_link) {\n\t$query = \"SELECT COUNT(*) FROM categories\";\n\n\t$result = queryDatabase($query, $db_link);\n\n\t$number = retrieveUsingResult($result, $db_link);\n\t\n\treturn $number['COUNT(*)'];\n}", "public function countCats() {\n\t\tglobal $db;\n\t\t$user = new User;\n\t\t$where = \"WHERE category_author = '{$user->_user()}'\";\n\t\tif ( $user->can( 'manage_user_items' ) ) {\n\t\t\t$where = null;\n\t\t}\n\t\t$get = $db->customQuery( \"SELECT COUNT(*) FROM {$db->tablePrefix()}categories $where\" );\n\t\t$count = $get->fetch_row();\n\t\treturn $count[0];\n\t}", "public function blog_category_count()\r\n\t{\r\n\t$result=$this->db->query(\"select * from \".$this->prefix.\"blog_category\");\r\n\treturn count($result);\r\n\t}", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function getCountAction()\n {\n $dm = $this->get('doctrine.odm.mongodb.document_manager');\n $categoryRepository = $dm->getRepository('FaithleadRestBundle:Category');\n\n\n return array('count' => $categoryRepository->findCount());\n }", "function totalCategories(){\n global $pdo;\n\n $categorySelect = '\n SELECT count(*) cat_title\n FROM categories\n GROUP BY cat_title \n ';\n\n $request = $pdo->prepare($categorySelect);\n\n if ($request->execute() === false ) {\n print_r( $request->errorInfo() );\n }else {\n $categoryNb = $request->fetchAll(PDO::FETCH_ASSOC);\n return $categoryNb;\n }\n return false;\n}", "public function getCategoriesAndNumOfCourses()\n\t{\n\t\t$sql = \"SELECT category_id, count(*) num_of_courses \n\t\t FROM \".TABLE_PREFIX.\"courses\n\t\t WHERE access = 'public' \n\t\t GROUP BY category_id\";\n\t\treturn $this->execute($sql);\n\t}", "public function totalCount();", "public function totalCount();", "public function NumeroCategorias(){\n $numero_categorias = Categorie::count();\n return $numero_categorias;\n }", "public function getCategoryCount()\n {\n return count(get_the_category($this->id));\n }", "function number_categories($connect)\n{\n // $total_numbers = $connect->query($sql);\n // echo json_encode($total_numbers);\n // die();\n // $total = count($total_numbers);\n // return $total;\n\n}", "function count_all($category_id){\n\t\t\t\t\t$sql= 'SELECT COUNT( * ) AS numrows\n\t\t\t\t\tFROM customize_apparel_product\t\t\t\t\t\n\t\t\t\t\tWHERE customize_apparel_product.customize_apparel_category_id = '.$category_id.'';\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\t\treturn $Q->row ()->numrows;\n\t\t\t\t}", "public function totalCategoria()\n {\n return $this->totalCentral() + $this->totalSeccional();\n }", "public function count_by_categories()\n\t{\n\t\t$prefix = $this->db->dbprefix;\n\n\t\t$sql = \"SELECT category, COUNT(1) as count FROM {$prefix}news_articles, {$prefix}news_categories\n\t\t\t\t\t\tWHERE {$prefix}news_articles.category_id = {$prefix}news_categories.id GROUP BY {$prefix}news_articles.category_id\";\n\n\t\t$query = $this->db->query($sql);\n\n\t\tif ($query->num_rows())\n\t\t{\n\t\t\treturn $query->result();\n\t\t}\n\n\t\treturn false;\n\t}", "public function cekRowsPerCat(){\n $query = \"SELECT COUNT(*) AS numrows FROM \".NEWS_TABLE.\" WHERE newsCategory =\".$this->idCategory;\n $result = mysql_query($query) or die('Error, query failed');\n $row = mysql_fetch_array($result, MYSQL_ASSOC);\n $numrows = $row['numrows']; \n \n return $numrows;\n }", "public function getListCountCategory()\n {\n $listCatCount = DB::table('category')\n ->join('film_category', 'film_category.category_id', '=', 'category.category_id')\n ->select(DB::raw('category.name, count(*)'))\n ->groupBy('category.name')\n ->get();\n \n return response()->json([\n 'success' => true,\n 'message' => 'Jumlah berdasarkan kategory film',\n 'data' => $listCatCount\n ]);\n }", "function oos_total_products_in_category($category_id)\n{\n\n $products_count = 0;\n\n $dbconn =& oosDBGetConn();\n $oostable =& oosDBGetTables();\n\n $productstable = $oostable['products'];\n $products_to_categoriestable = $oostable['products_to_categories'];\n $products = $dbconn->Execute(\"SELECT COUNT(*) AS total FROM $productstable p, $products_to_categoriestable p2c WHERE p.products_id = p2c.products_id AND p.products_status >= '1' AND p2c.categories_id = '\" . intval($category_id) . \"'\");\n\n $products_count += $products->fields['total'];\n\n return $products_count;\n}", "public function getAmountOfCocktails($cat){\r\n $con = $this->db->getConnection();\r\n if ($cat!= 0) {\r\n $query = 'SELECT COUNT(*) as count FROM cocktail_details WHERE category='.$cat;\r\n }else{\r\n $query = 'SELECT COUNT(*) as count FROM cocktail_details';\r\n }\r\n $sql = mysqli_query($con, $query);\r\n $row = mysqli_fetch_array($sql,MYSQLI_ASSOC);\r\n return $row['count'];\r\n }", "public function categoryCount($category_id)\n {\n return static::where('category_id', $category_id)->count();\n }", "public function count()\n {\n $count = Category::count();\n\n return response()->json($count);\n }", "public function categoryListWithResourcesCount()\n {\n $categories = Category::where('id', '<>', '1')->orderBy('name', 'asc')->get();\n if (count($categories) > 0) {\n foreach ($categories as $key => $value) {\n $categories[$key][\"count\"] = UserTechnologyMapping::where('domain_id', $value->id)->distinct('user_id')->count('user_id');\n $user_name = [];\n $user_ids = [];\n if (count($value->user) > 0) {\n\n foreach ($value->user as $key1 => $value1) {\n array_push($user_name, $value1->name);\n array_push($user_ids, $value1->id);\n }\n }\n $categories[$key][\"user_name\"] = $user_name;\n $categories[$key][\"user_ids\"] = $user_ids;\n }\n }\n return $this->dispatchResponse(200, \"Data.\", $categories);\n }", "public function categories_get()\n {\n $em = $this->doctrine->em;\n $categoriesRepo = $em->getRepository('Entities\\Category');\n $categories = $categoriesRepo->findAll();\n\n foreach ($categories as $category) {\n $services = 0;\n $subcats = $category->getSubcategories();\n foreach ($subcats as $subcat) {\n $services += $subcat->getServices()->count();\n }\n $category->servicesCount = $services;\n }\n $response[\"data\"] = $categories;\n $response[\"count\"] = count($categories);\n $this->set_response($response, REST_Controller::HTTP_OK);\n\n }", "function tep_childs_in_category_count($categories_id) {\n $categories_count = 0;\n\n $Qcategories = Registry::get('Db')->get('categories', 'categories_id', ['parent_id' => (int)$categories_id]);\n\n while ($Qcategories->fetch()) {\n $categories_count++;\n\n $categories_count += call_user_func(__FUNCTION__, $Qcategories->valueInt('categories_id'));\n }\n\n return $categories_count;\n }", "function CountChildren( $key_category ) {\n\n \t$strwhere = \"select count(*) from category where key_parent = $key_category\"; \n \t$recordSet = runSQL( $strwhere );\n \t$count += $recordSet->fields[0];\n\n\treturn $count;\n}", "function get_all_MaterialCategory_count()\n {\n $this->db->where('delete_status','0');\n $this->db->from('prj_mtrl_category');\n return $this->db->count_all_results();\n }", "public function count_category($param = 0)\n\t{\n\t\t$query = $this->db->query(\"SELECT item_category_id FROM tb_inventori_item WHERE item_category_id = ?\", array($param));\n\t\treturn $query->num_rows();\n\t}", "public function countProdukByCategory($id_category){\n $this->db->where(array('deleted_at' => null, 'status' => 1));\n $this->db->where('id_category', $id_category);\n $this->db->from($this->product);\n return $this->db->count_all_results();\n }", "public function getAdsCount() {\n //! BUG need use cache\n return $this->getCategoryVacancies()->count();\n }", "public static function getTotalProductCount() {\n Db_Actions::DbSelect(\"SELECT COUNT(id) FROM cscart_products\");\n }", "public static function select_product_count_by_category_id($category_id=null)\n {\n try {\n $query = new Query;\n if($category_id != null)\n {\n $count = $query->select('COUNT(*) as count')->from('core_products')->where(\"category_id = $category_id\")->andWhere(\"product_status = 1\")->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])->All();\n return $count[0]['count'];\n \n }else\n {\n $query = new Query;\n $pending_products_count = $query->select('COUNT(*) as count')->from('core_products')\n ->where(\"product_status = 0\")\n //->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->All();//pending products count \n $total_count['pending_products_count'] = $pending_products_count[0]['count'];\n\n $query = new Query;\n $count = $query->select('COUNT(*) as count')->from('core_products')\n //->where(\"product_status = 1\")\n //->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->All();\n $total_count['total_products_count'] = $count[0]['count'];\n return $total_count;\n }\n \n \n \n } catch (ErrorException $e) {\n Yii::warning($e->getMessage());\n }\n \n \n }", "function tep_childs_in_category_count($categories_id) {\n $categories_count = 0;\n\n $categories_query = tep_db_query(\"select categories_id from \" . TABLE_CATEGORIES . \" where parent_id = '\" . $categories_id . \"'\");\n while ($categories = tep_db_fetch_array($categories_query)) {\n $categories_count++;\n $categories_count += tep_childs_in_category_count($categories['categories_id']);\n }\n\n return $categories_count;\n}", "function getCategoryChlidCount($category_srl)\n\t{\n\t\t$args = new stdClass();\n\t\t$args->category_srl = $category_srl;\n\t\t$output = executeQuery('document.getChildCategoryCount',$args);\n\t\tif($output->data->count > 0) return true;\n\t\treturn false;\n\t}", "public function getCount() {\n \treturn $this->count();\n }", "function GetJmlTotalnews( $tbl_news, $idkategori, $idkategorisub ){\n \t\t$sqlText = \"SELECT count(id) AS jml FROM $tbl_news WHERE idkategori = '$idkategori' AND idkategorisub = '$idkategorisub'\";\n \t\t$result = mysql_query($sqlText);\n \t\t$row = mysql_fetch_object($result);\n \t\t$jml = $row->jml;\n \t\treturn $jml;\n\t}", "public function get_total() \n {\n return $this->db->count_all(\"blog\");\n }", "protected function fetchTotalCount()\n {\n //get total if fetching a list\n $this->main_model_obj = new $this->main_model();\n $total_builder = $this->main_model_obj->getModelsManager()->createBuilder()\n ->columns(['COUNT(1) AS total'])\n ->from($this->main_model);\n\n $this->formJoinsUsingFilters($total_builder);\n $this->formConditions($total_builder);\n\n $result_obj = $total_builder->getQuery()->getSingleResult();\n $this->total_count = (empty($result_obj['total'])) ? 0 : $result_obj['total'];\n }", "public function getTotalItemCount();", "public function get_total()\n {\n return $this->db->count_all(\"blog\");\n }", "function getTotalItems($sel_id=NULL, $status='')\n{\n global $xoopsDB, $xoopsModule;\n\n $sel_id = filter_var($sel_id, FILTER_VALIDATE_INT, array( 'options' => array( 'default' => 0, 'min_range' => 0)));\n $count = 0;\n $arr = array();\n\n // get XoopsObjectTree for categories\n $mylinksCatHandler =& xoops_getmodulehandler('category', $xoopsModule->getVar('dirname'));\n $catObjs = $mylinksCatHandler->getAll();\n $myCatTree = new XoopsObjectTree($catObjs, 'cid', 'pid');\n\n /* new count routine */\n $childObjArray = $myCatTree->getAllChild($sel_id);\n $catIds = \"({$sel_id}\";\n foreach ($childObjArray as $childObj) {\n $catIds .= ',' . $childObj->getVar('cid');\n }\n $catIds .= ')';\n $query = \"SELECT COUNT(*) FROM \" . $xoopsDB->prefix(\"mylinks_links\") . \" WHERE `cid` IN {$catIds}\";\n if ('' != $status){\n $status = (0 == intval($status)) ? 0 : 1;\n $query .= \" AND status='{$status}'\";\n }\n $result = $xoopsDB->query($query);\n list($linkCount) = $xoopsDB->fetchRow($result);\n return $linkCount;\n}", "public function count()\n {\n return $this->model->paginate(1, $this->select)->total();\n }", "function olc_childs_in_category_count($categories_id) {\n\t$categories_count = 0;\n\n\t$categories_query = olc_db_query(SELECT.\"categories_id\".SQL_FROM . TABLE_CATEGORIES . SQL_WHERE.\"parent_id = '\" . $categories_id . APOS);\n\twhile ($categories = olc_db_fetch_array($categories_query)) {\n\t\t$categories_count++;\n\t\t$categories_count += olc_childs_in_category_count($categories['categories_id']);\n\t}\n\n\treturn $categories_count;\n}", "public static function getCategoryCount($categoryId)\n {\n return (int) FrontendModel::get('database')->getVar(\n 'SELECT COUNT(i.id) AS count\n FROM menu AS i\n WHERE i.category_id = ?',\n array((int) $categoryId)\n );\n }", "public function getCountProducts(){\n global $connect;\n $query = $connect->PDO->prepare(\"SELECT count(id) FROM `pagTab`\");\n $query->execute();\n $row = $query->fetchAll();\n return $row;\n }", "function count_all_kids($cat_id){\n\t\t\t\t\t$sql= 'SELECT COUNT( * ) AS numrows\n\t\t\t\t\tFROM product\n\t\t\t\t\tJOIN product_people ON product_people.product_id = product.product_id\n\t\t\t\t\tWHERE product.product_type_id = '.$cat_id.'\n\t\t\t\t\tAND product_people.people_cat_id =\"3\"';\n\t\t\t\t\t\n\t\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\t\treturn $Q->row ()->numrows;\n\t\t\t\t}", "public function modelTotalRecord(){\r\n\t\t\t//lay bien ket noi\r\n\t\t\t$conn = Connection::getInstance();\r\n\t\t\t//truy van csdl, tra ket qua ve boen object\r\n\t\t\t$query = $conn->query(\"select category_id from tbl_category\");\r\n\t\t\t// dem so luong ket qua -> dem so luong ban ghi \r\n\t\t\t$total = $query->rowCount();\r\n\t\t\t//----\r\n\t\t\t//tra ve ket qua \r\n\t\t\treturn $total;\r\n\t\t}", "public static function getCategoryCount($title) {\n\t\t\t$conn = parent::connect();\n\t\t\t$sql = \"SELECT count(id) FROM \" . TBL_CATEGORY . \" WHERE title = :title\";\n\n\t\t\ttry {\n\t\t\t\t$st = $conn->prepare($sql);\n\t\t\t\t$st->bindValue(\":title\", $title, PDO::PARAM_STR);\n\t\t\t\t$st->execute();\n\t\t\t\t$row = $st->fetch();\n\t\t\t\tparent::disconnect($conn);\n\t\t\t\treturn $row;\n\t\t\t} catch (PDOException $e) {\n\t\t\t\tparent::disconnect($conn);\n\t\t\t\tdie (\"Query failed: \" . $e->getMessage());\n\t\t\t}\n\t\t}", "public function count()\r\n\t{\r\n//\t\techo json_encode($this->db->query_first($sql));\r\n\t\techo json_encode(array('total'=>30));\r\n\t}", "function selectAllCategories() {\r\n global $conn;\r\n $select = \"SELECT * FROM product GROUP BY category ORDER BY COUNT(category);\";\r\n $result = mysqli_query($conn, $select);\r\n return $result;\r\n}", "public function getCount() {\n return $this->get(self::COUNT);\n }", "public function index() {\n $categories = $this->category->model->where('parent_id', null)->orderBy('id', 'asc')->paginate(15);\n \n foreach ($categories as $category) { \n $category['products_count']=$category->articles()->count();\n }\n\n $all_categories = $this->category->model->all();\n $breadcrumbs = [['url' => '' , 'name' => trans('text.categories') ]];\n $category = null;\n return compact('categories', 'all_categories', 'breadcrumbs', 'category');\n }", "public function getPostCountForCategory($categoryId) {\n try {\n \n $postCountsForCategory = \"\";\n // method calling... \n $postCountsForCategory = CurbSideCategoryCollection::model()->getPostCountForCategory($categoryId);\n } catch (Exception $ex) {\n Yii::log(\"SkiptaUserService:getPostCountForCategory::\".$ex->getMessage().\"--\".$ex->getTraceAsString(), 'error', 'application');\n }\n return $postCountsForCategory;\n }", "public function getCount() {}", "public function getCount() {}", "public function getCount() {}", "protected function calculateTotalItemCount()\n\t{\n\t\t$this->addScopes();\n\t\treturn CActiveRecord::model($this->modelClass)->count($this->getCriteria());\n\t}", "function getProductCount($cat_id) {\n $ci = & get_instance();\n $query = $ci->db->get_where(ES_PRODUCTS, array('category_id' => $cat_id));\n return $query->num_rows();\n}", "private function getCount()\n {\n $bd = Core::getBdd()->getDb();\n $u_insc_c = \"SELECT DISTINCT COUNT(u.id) as c FROM c_user u\";\n $insc = 0 + $bd->query($u_insc_c)->fetchObject()->c;\n return ($insc);\n }", "function fetch_total_category_rows($query)\n {\n $search = $query['search'];\n $this->db->select('*')->from($this->table);\n if(!empty($search)) $this->db->like('category_name', $search);\n return $this->db->get()->num_rows();\n }", "public function all()\n {\n return Category::withCount('posts');\n }", "public function getCount();", "public function getCount();", "public function getCount();", "function getTotal()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_total))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_total = $this->_getListCount($query);\n\t\t}\n\n\t\treturn $this->_total;\n\t}", "function getTotal()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_total))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_total = $this->_getListCount($query);\n\t\t}\n\n\t\treturn $this->_total;\n\t}", "function getTotal()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_total))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_total = $this->_getListCount($query);\n\t\t}\n\n\t\treturn $this->_total;\n\t}", "function tep_products_in_category_count($categories_id, $include_deactivated = false) {\n $OSCOM_Db = Registry::get('Db');\n\n if ($include_deactivated) {\n $Qproducts = $OSCOM_Db->get([\n 'products p',\n 'products_to_categories p2c'\n ], [\n 'count(*) as total'\n ], [\n 'p.products_id' => [\n 'rel' => 'p2c.products_id'\n ],\n 'p2c.categories_id' => (int)$categories_id\n ]);\n } else {\n $Qproducts = $OSCOM_Db->get([\n 'products p',\n 'products_to_categories p2c'\n ], [\n 'count(*) as total'\n ], [\n 'p.products_id' => [\n 'rel' => 'p2c.products_id'\n ],\n 'p.products_status' => '1',\n 'p2c.categories_id' => (int)$categories_id\n ]);\n }\n\n $products_count = $Qproducts->valueInt('total');\n\n $Qchildren = $OSCOM_Db->get('categories', 'categories_id', ['parent_id' => (int)$categories_id]);\n\n while ($Qchildren->fetch()) {\n $products_count += call_user_func(__FUNCTION__, $Qchildren->valueInt('categories_id'), $include_deactivated);\n }\n\n return $products_count;\n }", "abstract public function countTotal();", "public function getTotal() {\n\t\treturn $this->find('count', array(\n\t\t\t'contain' => false,\n\t\t\t'recursive' => false,\n\t\t\t'cache' => $this->alias . '::' . __FUNCTION__,\n\t\t\t'cacheExpires' => '+24 hours'\n\t\t));\n\t}", "public function CountProByCategory_all() {\n $this->db->select('product.id as pro_id,\n product_category.id as cate_id,\n product_to_category.id_category');\n\n $this->db->join('product_to_category', 'product_to_category.id_product=product.id');\n $this->db->join('product_category', 'product_to_category.id_category=product_category.id');\n\n // $this->db->where('product_to_category.id_category',$id);\n $this->db->order_by('product.id', 'desc');\n $this->db->where('product.lang', $this->language);\n $this->db->group_by('product.id');\n $q = $this->db->get('product');\n return $q->num_rows();\n }", "function tep_products_in_category_count($categories_id, $include_deactivated = false) {\n $products_count = 0;\n\n if ($include_deactivated) {\n $products_query = tep_db_query(\"select count(*) as total from \" . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_TO_CATEGORIES . \" p2c where p.products_id = p2c.products_id and p2c.categories_id = '\" . $categories_id . \"'\");\n } else {\n //$products_query = tep_db_query(\"select count(*) as total from \" . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_TO_CATEGORIES . \" p2c where p.products_id = p2c.products_id and p.products_status != '0' and p2c.categories_id = '\" . $categories_id . \"'\");\n $products_query = tep_db_query(\"select count(*) as total from \" . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_TO_CATEGORIES . \" p2c where p.products_id = p2c.products_id and p2c.categories_id = '\" . $categories_id . \"'\");\n }\n\n $products = tep_db_fetch_array($products_query);\n\n $products_count += $products['total'];\n\n $childs_query = tep_db_query(\"select categories_id from \" . TABLE_CATEGORIES . \" where parent_id = '\" . $categories_id . \"'\");\n if (tep_db_num_rows($childs_query)) {\n while ($childs = tep_db_fetch_array($childs_query)) {\n $products_count += tep_products_in_category_count($childs['categories_id'], $include_deactivated);\n }\n }\n\n return $products_count;\n}", "public function getTotal(){\n\t\t\t$sql = \"SELECT COUNT(*) as c FROM servico\";\n\t\t\t$sql = $this->db->query($sql);\n\t\t\t$sql = $sql->fetch();\n\t\n\t\t\treturn $sql['c'];\n\t\t}", "public static function getTotalSearchResultsCount() {\n\n $category_dress_type_id = isset($_POST['product_type']) ? $_POST['product_type'] : '';\n $search_term = $_POST['search_term'];\n\n if (isset($_POST['model_type'])) {\n $model_type = $_POST['model_type'];\n switch ($model_type) {\n case \"girl\":\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=260\");\n Db_Actions::DbSelect(\"SELECT product_id FROM cscart_product_descriptions WHERE product LIKE '%\" . $search_term . \"%'\");\n break;\n case \"boy\":\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=261\");\n\n break;\n }\n }\n $products_count = Db_Actions::DbGetResults();\n if (!isset($products_count->empty_result)) {\n foreach ($products_count as $count) {\n echo ceil($count->totalprds / 9);\n }\n }\n else {\n echo 0;\n }\n }", "public static function doCount($params=NULL) {\n\t\t$conn = parent::_initwgConnector($params, self::PRIMARY_KEY);\n\t\t$conn->select(self::TABLE_NAME, self::COUNT_TABLE);\n\t\treturn (int) DbModel::doSelectOne($conn, new DiscussCategoriesModel());\n\t}", "function getTotal()\r\n{\r\n if (empty($this->_total))\r\n {\r\n $query = $this->_buildQuery();\r\n $this->_total = $this->_getListCount($query);\r\n }\r\n \r\n return $this->_total;\r\n}", "public function getNumberOfBookBySubCategoryDetail($storeName,$category) \r\n {\r\n\t\t\t\t $sql=\"SELECT b.category,b.subCat AS SubCategory, (SELECT COUNT(isbn )FROM books WHERE subCat = b.subCat) AS No_of_books FROM books b,stores m,inventory i WHERE (b.category = '$category' AND m.storeName = '$storeName') AND (b.isbn = i.isbn) AND (i.storeID=m.storeID)\";\r\n\t\t\t\t $result=mysql_query($sql);\r\n\t\t\t return $result;\t\r\n\t }", "public function getTotalCount()\n {\n return $this->totalCount;\n }", "function olc_products_in_category_count($categories_id, $include_deactivated = false) {\n\t$products_count = 0;\n\n\tif ($include_deactivated) {\n\t\t$products_query = olc_db_query(SELECT.\"count(*) as total\".SQL_FROM . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_TO_CATEGORIES . \" p2c where p.products_id = p2c.products_id and p2c.categories_id = '\" . $categories_id . APOS);\n\t} else {\n\t\t$products_query = olc_db_query(SELECT.\"count(*) as total\".SQL_FROM . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_TO_CATEGORIES . \" p2c where p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '\" . $categories_id . APOS);\n\t}\n\n\t$products = olc_db_fetch_array($products_query);\n\n\t$products_count += $products['total'];\n\n\t$childs_query = olc_db_query(SELECT.\"categories_id\".SQL_FROM . TABLE_CATEGORIES . SQL_WHERE.\"parent_id = '\" . $categories_id . APOS);\n\tif (olc_db_num_rows($childs_query)) {\n\t\twhile ($childs = olc_db_fetch_array($childs_query)) {\n\t\t\t$products_count += olc_products_in_category_count($childs['categories_id'], $include_deactivated);\n\t\t}\n\t}\n\n\treturn $products_count;\n}", "public abstract function get_counts();", "public function getTotal(){\n\t\t\t$sql = \"SELECT COUNT(*) as c FROM clientes\";\n\t\t\t$sql = $this->db->query($sql);\n\t\t\t$sql = $sql->fetch();\n\t\n\t\t\treturn $sql['c'];\n\t\t}", "public function get_total()\n\t{\n\t\t$query = $this->query;\n\t\tif(isset($query['order']))\n\t\t\t$query['order'] = $this->model->table() . '.id';\n\t\treturn $this->model->count($query);\n\t}", "public function getCount()\n {\n return $this->get('Count');\n }", "public function getCount()\n {\n return $this->data['count'];\n }", "public function count() {\n $total = 0;\n $this->setColumns(array('COUNT(*) '.$this->modx->escape('ct')));\n if ($this->execute()) {\n $count = $this->getResults();\n if (!empty($count) && !empty($count[0]['ct'])) {\n $total = intval($count[0]['ct']);\n }\n $this->close();\n }\n return $total;\n }", "public function getTotalCollectionCount() {\n return $this->totalCollectionCount;\n }" ]
[ "0.8172272", "0.8108455", "0.8071208", "0.80370337", "0.80329585", "0.7988405", "0.7986061", "0.7979145", "0.7891595", "0.78375643", "0.781486", "0.781486", "0.77282786", "0.7714196", "0.7681679", "0.7589186", "0.7556574", "0.7515886", "0.7515886", "0.7515886", "0.7480202", "0.74744284", "0.74595046", "0.7458574", "0.7458574", "0.7446561", "0.74103457", "0.7409871", "0.7356811", "0.7301539", "0.7266105", "0.72404355", "0.72358555", "0.7232685", "0.72318316", "0.7214914", "0.720985", "0.7112697", "0.7102446", "0.7102015", "0.6988951", "0.6961416", "0.6948739", "0.6887059", "0.68671894", "0.68578845", "0.6843242", "0.68396133", "0.682269", "0.6821748", "0.6816927", "0.68008167", "0.679658", "0.6787036", "0.6774071", "0.6771166", "0.6742522", "0.67211944", "0.6702976", "0.6701773", "0.6698505", "0.6697101", "0.66811836", "0.6676676", "0.66541487", "0.66484296", "0.6648112", "0.6638621", "0.66354394", "0.66354394", "0.6634712", "0.6632552", "0.6624123", "0.6615958", "0.6614311", "0.66085696", "0.6607369", "0.6607369", "0.6607369", "0.6585535", "0.6585535", "0.6585535", "0.65741277", "0.6566285", "0.6555985", "0.6555251", "0.6537362", "0.65297794", "0.65292233", "0.6527065", "0.6521788", "0.6520928", "0.6513197", "0.6506183", "0.64997745", "0.6498694", "0.64902866", "0.64862555", "0.64844555", "0.6479545", "0.64771426" ]
0.0
-1
check for session and cookie presence
public function authors_list() { $this->admin_header(); //fetch the total number of categories $config['total_num_author'] = $this->Admin_model->fetch_all_rows('authors'); //fetch the total number of tags $data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags'); //$config['total_rows'] = $this->Admin_model->fetch_all_rows('food'); $config['base_url'] = site_url("Admin/authors/"); $config['per_page'] = 10; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_author'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['authors'] = $this->Admin_model->fetch_author($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_author'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_author']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $this->add_author_template('authors_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasSession() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "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}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "public function checkSession()\n {\n if(isset($_COOKIE['id'])){\n $cookieOrSessionID = $_COOKIE['id'];\n }\n elseif(isset($_SESSION['id'])){\n $cookieOrSessionID = $_SESSION['id'];\n }\n return $cookieOrSessionID;\n }", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function is_cookie_set()\n {\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isCookieSet() {}", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\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 static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function user_check_session_id() {\n if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success();\n else wp_send_json_error();\n }", "public static function checkSession() {\n\t\t// Set any API keys\n\t\t$api_keys = array();\n\t\t// Check API Key or Session Authentication\n\t\t$key = \"\";\n\t\tif (isset($_GET['key'])) {\n\t\t\t$key = $_GET['key'];\n\t\t}\n\t\tif (!isset($_SESSION['user']) && !in_array($key, $api_keys)) {\n\t\t\texit('{\"status\":\"error\",\"message\":\"Authentication Error\"}');\n\t\t}\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "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 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 function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\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 sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function sess_check ()\n\t{\n\n\t\tglobal $xnyo_parent;\n\n\t\t// store the IP Address in the session varz\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Storing IP/Browser/Time.');\n\t\t$_SESSION['_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION['_browser'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$_SESSION['_last_activity'] = time();\n\n\t\t// if we're logged in, do auth stuff\n\t\tif (!empty($xnyo->user))\n\t\t{\n\t\t\t// there really isnt much to do in here\n\t\t\t// check that we havent expired\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session expiry.');\n\t\t\tif ($_SESSION['auth']['expiry'] !== 0)\n\t\t\t{\n\t\t\t\tif (time() > $_SESSION['auth']['expiry'])\n\t\t\t\t{\n\t\t\t\t\t$time = time() - $_SESSION['auth']['expiry'];\n\t\t\t\t\t$errmsg = \"Session time expired ($time seconds). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t\t$this->logout ('expired');\n\t\t\t\t} else {\n\t\t\t\t\t// update session times\n\t\t\t\t\t$_SESSION['auth'][\"expiry\"] = time() + $xnyo_parent->session_lifetime;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check their subnet is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session subnet.');\n\t\t\tif ($_SESSION['auth']['subnet'] != $this->subnet())\n\t\t\t{\n\t\t\t\t$errmsg = \"Session moved subnet (\" . $_SESSION['auth']['subnet'] . \" => \" . $this->subnet() . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('moved_subnet');\n\t\t\t}\n\t\n\t\t\t// check browser is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session Browser.');\n\t\t\tif ($_SESSION['auth']['browser'] != $_SERVER['HTTP_USER_AGENT'])\n\t\t\t{\n\t\t\t\t$errmsg = \"User changed browsers (\" . $_SESSION['auth']['browser'] . \" => \" . $_SERVER['HTTP_USER_AGENT'] . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('changed_browser');\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t// access checking is the only thing left i guess\n\t\t// if theres no access level specified, just let them through\n\t\tif (!empty($xnyo_parent->access) && !$this->check($xnyo_parent->access) && !$this->set_acl($xnyo_parent->access))\n\t\t\treturn false;\n\n\t\t// we're all done i guess\n\t\treturn true;\n\t}", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "protected function checkSessionToken() {}", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "public function session_check(){\n\n\tif(!isset($_SESSION[\"user-type\"]) && $_SESSION[\"user-type\"] != \"user\"){\n\t\tredirect(\"Login\");\n\t} \n}", "public function checkSessionStatus(){\t\t\n\t\tif(isset($_SESSION[self::$session])){\n\t\t\treturn $_SESSION[self::$session];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\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 }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "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}", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\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}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected function checkSessionLifetime() {}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "static function check()\n\t{\n\t\t$session = App::get('session');\n\t\treturn $session->get('auth');\n\t}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function checkUsersSession(){\n\t}", "function id_in_session()\n{\n return isset($_SESSION['username']) && isset($_SESSION['loggedin']);\n}", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\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 _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function auth_session_exists() {\n\n // there's an existing session, nothing to do\n if (array_key_exists('user_name', $_SESSION)) {\n return TRUE;\n }\n\n // There's not an existing session, but the user has an auth_key\n // cookie, so see if it matches the database.\n // If it does, create a new session\n if (array_key_exists('auth_userid', $_COOKIE) && array_key_exists('auth_key', $_COOKIE)) {\n require_once '../database/mysql.inc.php';\n $conn = conn();\n\n $auth_userid = $_COOKIE['auth_userid'];\n $auth_key = $_COOKIE['auth_key'];\n $sql = 'SELECT p.name_ingame as name_ingame ' .\n 'FROM player_auth as a, player as p ' .\n 'WHERE a.player_id = :id AND a.auth_key = :auth_key AND a.player_id = p.id';\n $query = $conn->prepare($sql);\n $query->execute(array(':id' => $auth_userid,\n ':auth_key' => $auth_key));\n $resultArray = $query->fetchAll();\n if (count($resultArray) == 1) {\n $name_ingame = $resultArray[0]['name_ingame'];\n session_regenerate_id(TRUE);\n $_SESSION['user_id'] = $auth_userid;\n $_SESSION['user_name'] = $name_ingame;\n $_SESSION['user_lastactive'] = time();\n return TRUE;\n }\n }\n\n // neither session nor cookie lookup worked, so the user is not logged in\n return FALSE;\n}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\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 }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\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 }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\n }", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "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 function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}" ]
[ "0.8163929", "0.8163929", "0.79391783", "0.781278", "0.73408365", "0.7292273", "0.7254012", "0.7233287", "0.72067773", "0.7206573", "0.71651375", "0.70685685", "0.7068241", "0.7052831", "0.70487046", "0.70306545", "0.70276755", "0.7023005", "0.69998795", "0.69891644", "0.694627", "0.6932201", "0.690664", "0.6905199", "0.6900687", "0.6898575", "0.6868984", "0.6848269", "0.68456584", "0.6843024", "0.6842037", "0.6835498", "0.68096584", "0.68067455", "0.6804945", "0.679602", "0.67958665", "0.6791565", "0.67822146", "0.6781694", "0.67754143", "0.6766814", "0.6763462", "0.67523545", "0.6752086", "0.6750748", "0.67410815", "0.6723007", "0.67184675", "0.67184377", "0.67184377", "0.67179114", "0.67167205", "0.6716269", "0.6715483", "0.6702443", "0.6696523", "0.66782004", "0.66629434", "0.6658718", "0.6652949", "0.66494685", "0.66364765", "0.6634498", "0.66311765", "0.66172194", "0.6614772", "0.6608122", "0.6599933", "0.65865386", "0.65697664", "0.6569106", "0.65667003", "0.6557862", "0.655391", "0.6548637", "0.6537782", "0.65372586", "0.65345836", "0.65258855", "0.65222204", "0.6517405", "0.6515081", "0.65067333", "0.65044916", "0.6500649", "0.6499032", "0.6496038", "0.6493618", "0.6487407", "0.64860123", "0.64840484", "0.64713854", "0.6464987", "0.646481", "0.6464038", "0.64618146", "0.64604735", "0.6458784", "0.6456097", "0.6455754" ]
0.0
-1
check for session and cookie presence
public function edit_author_segment($author_id, $data = array()) { $this->admin_header(); $result = $this->Admin_model->fetch_author_details($author_id); if ($result !== FALSE) { $data['author_details'] = $result; $this->add_author_template('edit_author', $data); }else { redirect('Admin/authors_list'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasSession() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "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}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "public function checkSession()\n {\n if(isset($_COOKIE['id'])){\n $cookieOrSessionID = $_COOKIE['id'];\n }\n elseif(isset($_SESSION['id'])){\n $cookieOrSessionID = $_SESSION['id'];\n }\n return $cookieOrSessionID;\n }", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function is_cookie_set()\n {\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isCookieSet() {}", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\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 static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function user_check_session_id() {\n if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success();\n else wp_send_json_error();\n }", "public static function checkSession() {\n\t\t// Set any API keys\n\t\t$api_keys = array();\n\t\t// Check API Key or Session Authentication\n\t\t$key = \"\";\n\t\tif (isset($_GET['key'])) {\n\t\t\t$key = $_GET['key'];\n\t\t}\n\t\tif (!isset($_SESSION['user']) && !in_array($key, $api_keys)) {\n\t\t\texit('{\"status\":\"error\",\"message\":\"Authentication Error\"}');\n\t\t}\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "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 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 function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\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 sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "function sess_check ()\n\t{\n\n\t\tglobal $xnyo_parent;\n\n\t\t// store the IP Address in the session varz\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Storing IP/Browser/Time.');\n\t\t$_SESSION['_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION['_browser'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$_SESSION['_last_activity'] = time();\n\n\t\t// if we're logged in, do auth stuff\n\t\tif (!empty($xnyo->user))\n\t\t{\n\t\t\t// there really isnt much to do in here\n\t\t\t// check that we havent expired\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session expiry.');\n\t\t\tif ($_SESSION['auth']['expiry'] !== 0)\n\t\t\t{\n\t\t\t\tif (time() > $_SESSION['auth']['expiry'])\n\t\t\t\t{\n\t\t\t\t\t$time = time() - $_SESSION['auth']['expiry'];\n\t\t\t\t\t$errmsg = \"Session time expired ($time seconds). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t\t$this->logout ('expired');\n\t\t\t\t} else {\n\t\t\t\t\t// update session times\n\t\t\t\t\t$_SESSION['auth'][\"expiry\"] = time() + $xnyo_parent->session_lifetime;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check their subnet is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session subnet.');\n\t\t\tif ($_SESSION['auth']['subnet'] != $this->subnet())\n\t\t\t{\n\t\t\t\t$errmsg = \"Session moved subnet (\" . $_SESSION['auth']['subnet'] . \" => \" . $this->subnet() . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('moved_subnet');\n\t\t\t}\n\t\n\t\t\t// check browser is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session Browser.');\n\t\t\tif ($_SESSION['auth']['browser'] != $_SERVER['HTTP_USER_AGENT'])\n\t\t\t{\n\t\t\t\t$errmsg = \"User changed browsers (\" . $_SESSION['auth']['browser'] . \" => \" . $_SERVER['HTTP_USER_AGENT'] . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('changed_browser');\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t// access checking is the only thing left i guess\n\t\t// if theres no access level specified, just let them through\n\t\tif (!empty($xnyo_parent->access) && !$this->check($xnyo_parent->access) && !$this->set_acl($xnyo_parent->access))\n\t\t\treturn false;\n\n\t\t// we're all done i guess\n\t\treturn true;\n\t}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "protected function checkSessionToken() {}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public function session_check(){\n\n\tif(!isset($_SESSION[\"user-type\"]) && $_SESSION[\"user-type\"] != \"user\"){\n\t\tredirect(\"Login\");\n\t} \n}", "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\n }", "public function checkSessionStatus(){\t\t\n\t\tif(isset($_SESSION[self::$session])){\n\t\t\treturn $_SESSION[self::$session];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "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 }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "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}", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\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}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected function checkSessionLifetime() {}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "static function check()\n\t{\n\t\t$session = App::get('session');\n\t\treturn $session->get('auth');\n\t}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function checkUsersSession(){\n\t}", "function id_in_session()\n{\n return isset($_SESSION['username']) && isset($_SESSION['loggedin']);\n}", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\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 _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function auth_session_exists() {\n\n // there's an existing session, nothing to do\n if (array_key_exists('user_name', $_SESSION)) {\n return TRUE;\n }\n\n // There's not an existing session, but the user has an auth_key\n // cookie, so see if it matches the database.\n // If it does, create a new session\n if (array_key_exists('auth_userid', $_COOKIE) && array_key_exists('auth_key', $_COOKIE)) {\n require_once '../database/mysql.inc.php';\n $conn = conn();\n\n $auth_userid = $_COOKIE['auth_userid'];\n $auth_key = $_COOKIE['auth_key'];\n $sql = 'SELECT p.name_ingame as name_ingame ' .\n 'FROM player_auth as a, player as p ' .\n 'WHERE a.player_id = :id AND a.auth_key = :auth_key AND a.player_id = p.id';\n $query = $conn->prepare($sql);\n $query->execute(array(':id' => $auth_userid,\n ':auth_key' => $auth_key));\n $resultArray = $query->fetchAll();\n if (count($resultArray) == 1) {\n $name_ingame = $resultArray[0]['name_ingame'];\n session_regenerate_id(TRUE);\n $_SESSION['user_id'] = $auth_userid;\n $_SESSION['user_name'] = $name_ingame;\n $_SESSION['user_lastactive'] = time();\n return TRUE;\n }\n }\n\n // neither session nor cookie lookup worked, so the user is not logged in\n return FALSE;\n}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\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 }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\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 }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\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 function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}" ]
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.69460523", "0.69320947", "0.6906824", "0.6904842", "0.69004583", "0.68975925", "0.68685424", "0.6848523", "0.6844706", "0.6842497", "0.68407005", "0.68338877", "0.6809911", "0.6807682", "0.68048835", "0.6795858", "0.6795753", "0.6790786", "0.67827266", "0.6781565", "0.6776217", "0.67662364", "0.6762543", "0.67525536", "0.67525303", "0.675126", "0.6741708", "0.6723873", "0.6718459", "0.6718133", "0.67175967", "0.67175967", "0.67163414", "0.6715241", "0.67149955", "0.6701401", "0.66959953", "0.6677578", "0.66633356", "0.6658625", "0.6653751", "0.6648311", "0.6635521", "0.663372", "0.6631203", "0.6616926", "0.66162115", "0.66072696", "0.6599716", "0.65856075", "0.65696895", "0.6568369", "0.65658766", "0.6557916", "0.6554719", "0.6548292", "0.65378124", "0.653712", "0.65335554", "0.6526306", "0.65212154", "0.65183794", "0.651378", "0.65086836", "0.6504965", "0.650051", "0.6497977", "0.649534", "0.6494901", "0.64876956", "0.6485331", "0.6483739", "0.6472518", "0.64655817", "0.6464438", "0.64629364", "0.646088", "0.64607173", "0.64595693", "0.6455302", "0.64550734" ]
0.0
-1
get the total new orders
public function add_author_template($filename, $data = array()) { //$data["there_is_new_order"] = $this->Admin_model->return_total_rows('order', 'status', 'open'); $this->admin_header(); $data['header'] = $this->load->view('templates/admin_header', $data, TRUE); $data['footer'] = $this->load->view('templates/admin_footer', '', TRUE); $this->load->view('admins/'.$filename, $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotal()\n {\n return $this->service()->getTotalOfOrder();\n }", "protected function getTotalOrders()\n {\n\n if (auth()->user()) {\n $userId = auth()->user()->id;\n return \\Cart::session($userId)->getTotal();\n }\n return \\Cart::getTotal();\n }", "public function getTotalOrdersAmRcv()\n\t{\n $log=new Log(\"AM_RCV_TOTAL:\".date('Y-m-d').\".log\");\n $log->write(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = '1' and order_status = \" . 2);\n $query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = '1' and order_status = \" . 2);\n $results = $query->row;\n return $results['total_orders'];\n\t}", "public function getTotalOrdersAm()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = \" . 1);\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "public function getTotalOrdersWs()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = \" . 1);\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "private function get_num_total_orders()\n\t{\n\t\treturn wp_count_posts('order_paysera')->publish;\n\t}", "public function getCurrentMonthTotalOrder() : int;", "public function getTotalOrdersMo()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(oc_po_product.id) as total_orders FROM oc_po_order \nLEFT JOIN oc_po_product \nON(oc_po_order.id = oc_po_product.order_id)\nWHERE oc_po_order.user_id='103' AND oc_po_product.item_status <> 0\");\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "public function getOrdertotal()\n {\n return $this->ordertotal;\n }", "public function getMinOrderTotal();", "public function modelTotal(){\n\t\t\t//---\n\t\t\t$conn = Connection::getInstance();\n\t\t\t$query = $conn->query(\"select id from orders\");\n\t\t\t//lay tong so ban ghi\n\t\t\treturn $query->rowCount();\n\t\t\t//---\n\t\t}", "function btce_get_active_order_total($key, $secret) {\n $orders = btce_active_orders($key, $secret);\n $_total = 0;\n foreach ($orders->return as $order) {\n if ($order->type == 'sell') {\n $_total += $order->amount;\n }\n }\n return $_total;\n}", "public static function getTotalValueOfOrder()\n {\n \ttry\n \t{\n\t \t$storage = My_Zend_Globals::getStorage();\n\t \n\t \t$table = self::_TABLE_PRODUCT_ORDER_DETAIL;\n\t \n\t \t//Query data from database\n\t \t$select = $storage->select()\n\t\t\t\t\t \t->from($table,'sum(amount_total)')\n\t\t\t\t\t \t->where('order_status = ?', 2);\n\t \t \n\t \t$total = $storage->fetchCol($select);\n\t \t \n\t \t$total = intval($total['total']);\n\t \t\n\t \treturn $total;\n \t}\n \tcatch(Exception $e)\n \t{\n \t\treturn false;\n \t}\t \t\n }", "public function getOrdersCount() {\n\t\t$summary = $this->getMarketSummary();\n\n\t\treturn [ 'BUY' => $summary['OpenBuyOrders'], 'SELL' => $summary['OpenSellOrders'] ];\n\n\t}", "public function get_orders_total() : array {\n\t\t$element = $this->dom->find( '#j-order-num' );\n\t\tif ( ! $element ) {\n\t\t\treturn [\n\t\t\t\t'orders_total' => 0,\n\t\t\t];\n\t\t}\n\n\t\t$value = explode( ' ', $element[0]->text() );\n\t\tif ( ! $value || empty( $value[0] ) ) {\n\t\t\treturn [\n\t\t\t\t'orders_total' => 0,\n\t\t\t];\n\t\t}\n\n\t\treturn [\n\t\t\t'orders_total' => intval( $value[0] ),\n\t\t];\n\t}", "public function getOrdersCount() {\n return $this->getTable()->getOrdersCount();\n }", "public function getOrderCount()\n {\n return $this->count(self::order);\n }", "public function getTotalQtyOrdered();", "public function getUserOrderCounts() {\n\n $this->load->model('account/order');\n $count = $this->model_account_order->getTotalOrders();\n\n return $count;\n }", "public function getTotal(){\n $total=0;\n\n foreach ( $this->getOrderLines() as $ol){\n $total += $ol->getSubTotal();\n }\n \n return $total;\n }", "function calculateOrderAmount(): int {\n // Calculate the order total on the server to prevent\n // customers from directly manipulating the amount on the client\n $oldCart=Session::get('cart');\n $cart = new Cart($oldCart);\n $total = $cart->totalPrice;\n return $total * 100;\n }", "function getReceived(){\n $total = 0;\n $all = $this->product->include_join_fields()->get()->all;\n foreach ($all as $product){\n \n $total+= $product->join_qty;\n \n }\n return $total;\n }", "public function getMaxOrderTotal();", "private function getOldTotal()\n {\n return $this->collection->items[$this->cart_hash]->total;\n }", "public function getNewShippingTotal()\r\n {\r\n $totalItem = 0;\r\n foreach ($this->_getQuote()->getAllVisibleItems() as $item) {\r\n $totalItem += $item->getQty();\r\n }\r\n return $totalItem;\r\n }", "public function getOrderTrackingCount()\n {\n return $this->count(self::order_tracking);\n }", "public function get_total()\n {\n }", "public static function getTotalValueOfOrderDashboard()\n {\n \ttry\n \t{\n\t \t$storage = My_Zend_Globals::getStorage();\n\t \n\t \t$table = self::_TABLE_PRODUCT_ORDER_DETAIL;\n\t \n\t \t//Query data from database\n\t \t$select = $storage->select()\n\t\t\t\t\t \t->from($table,'sum(amount_total)')\n\t\t\t\t\t \t->where('order_status = ?', 0);\n\t \t \n\t \t$total = $storage->fetchCol($select);\n\t \t \n\t \t$total = intval($total['total']);\n\t \t\n\t \treturn $total;\n \t}\n \tcatch(Exception $e)\n \t{\n \t\treturn false;\n \t}\t \t\n }", "protected function getOrderCount()\n {\n $customer = $this->customerSession->getCustomer();\n if($customer->getId())\n {\n $orders = $this->orderCollectionFactory->create()->addFieldToSelect(\n '*'\n )->addFieldToFilter(\n 'customer_id',\n $customer->getId()\n )->setOrder(\n 'created_at',\n 'desc'\n );\n return count($orders);\n }\n return 0;\n }", "public function ordersGetTotalPages() {\n\t\t##\thttps://docs.topspin.net/tiki-index.php?page=Order+API#View_Orders\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tThe number of total pages of Orders\n\t\t$url = 'http://app.topspin.net/api/v1/order';\n\t\t$data = json_decode($this->process($url,null,false));\n\t\tif(isset($data->total_pages)) { return $data->total_pages; }\n\t}", "function getOverallOrderRemain(){\n\t\t$t=0;\n\t\t$a = Order::all();\n\t\tforeach($a as $n){\n\t\t$dur= $n->qty;\n\t\t$sl =Order::where('payment', 'verified')->count();\n\t\t$r=intVal($sl);\n\t\t$t = $t + $r;\n\t\t}\n\t\treturn $t;\n\t\t}", "private function calculateOrderAmount()\n {\n if ($this->getOffer() instanceof Offer) {\n //recalculates the new amount\n $this->getOffer()->calculateInvoiceAmount();\n Shopware()->Models()->persist($this->getOffer());\n }\n }", "function getGstByOrder($orders_id) {\n\t\t$sel_ord_query = tep_db_query(\"SELECT value FROM \" . TABLE_ORDERS_TOTAL . \" WHERE orders_id = '\".$orders_id.\"' AND class = 'ot_gst_total'\");\n\t\t$gsttot = 0;\n\t\twhile($rst_arr = tep_db_fetch_array($sel_ord_query)) {\n\t\t\t$gsttot += $rst_arr[\"value\"];\n\t\t}\n\t\treturn $gsttot;\n\t}", "function total_other_transactions_amount(){\n $today_other_rec_q = mysql_query(\"SELECT COUNT(order_id) AS TOTAL_OTHER_ORDERS,SUM(amount) AS TOTAL_AMOUNT FROM orders WHERE (card_payment_type = '6' OR card_payment_type = 'J') AND DATE_FORMAT(timestamp,'%Y-%m-%d') = CURDATE()\");\n $today_other_rec = mysql_fetch_assoc($today_other_rec_q);\n $total_other_transactions = $today_other_rec[\"TOTAL_OTHER_ORDERS\"];\n $total_other_transactions_amount = $today_other_rec[\"TOTAL_AMOUNT\"];\n return $total_other_transactions_amount;\n }", "protected function totalOrders($all = false) {\n if (!$all) {\n return $this->shipsList->where('status_id', 1)->count();\n }\n\n return $this->shipsList->count();\n }", "function getOverallOrderPrice(){\n\t\t$t=0;\n\t\t$a = Order::where('payment', 'verified')->get();\n\t\tforeach($a as $n){\n\t\t$dur= $n->qty;\n\t\t\n\t\t$r = intVal($n->qty)*intVal($n->price);\n\t\t$t = $t + $r;\n\t\t}\n\t\treturn $t;\n\t\t}", "public function get_total()\n\t{\n\t\t$query = $this->query;\n\t\tif(isset($query['order']))\n\t\t\t$query['order'] = $this->model->table() . '.id';\n\t\treturn $this->model->count($query);\n\t}", "public static function get_nb_orders(){\n $return = array();\n $sql = \"SELECT count(mo.id)\n FROM miki_person mp, miki_order mo\n WHERE mp.id = mo.id_person\";\n $result = mysql_query($sql);\n\n $row = mysql_fetch_array($result);\n return $row[0];\n }", "public function getTotalInvoiced();", "protected function getTotal()\n {\n $total = 0;\n foreach ($this->entries as $entry) {\n $total += $entry['price'] * $entry['quantity'];\n }\n\n return $total;\n }", "public function getOrders()\n {\n return $this->orders;\n }", "function get_order_total(){\n\t$cart = $_SESSION['custCart_ID']; // the SESSION and COOKIE customer cart items array\n\t$max=count($_SESSION[$cart]);\n\t$sum=0;\n\tfor($i=0;$i<$max;$i++){\n\t\t$pid=$_SESSION[$cart][$i]['bookid'];\n\t\t$q=$_SESSION[$cart][$i]['qty'];\n\t\t$price=get_price($pid);\n\t\t$sum+=$price*$q;\n\t}\n\treturn $sum;\n}", "public function getNumOfOrdersInBasket() {\n\n $basketUser = $this->getBasketUserFromAuth();\n\n $result = 0;\n if ($basketUser != null) {\n $basketDetailModel = new Application_Model_BasketDetail();\n\n\n $result = $basketDetailModel->getNumOfOrdersInBasket($basketUser);\n }\n\n return $result;\n }", "public function getTotal();", "public function getTotal();", "function getOrders() {\n\t\t$orders = Mage::getModel ( 'sales/order' )->getCollection ()->addAttributeToSelect ( \"*\" )->addAttributeToFilter ( 'status', array ('complete') );\n\t\t$orders_data = $this->preapreOrdersTosend ( $orders );\n\t\treturn $orders_data;\n\t}", "static public function get_shipping_line_total( $order ){\n\n \t\t$version = toret_check_wc_version();\n\n \tif( $version === false ){\n\n \t$total = $order->get_total_shipping(); \n \n \t}else{\n\n\t $shippings = $order->get_items( 'shipping' );\n\t\t\t\tforeach( $shippings as $shipping ){\n \t\t\t\t\t\n \t\t\t\t$total = $shipping->get_total();\n \t\t\t\t\t\n\t\t\t\t} \t\n\n \t}\n\n \treturn $total;\n\n \t}", "function getOrder()\n {\n return 20;\n }", "function getOrder()\n {\n return 20;\n }", "public function getBaseTotalQtyOrdered();", "public function get_total_items(){\n\t \t$total = 0;\n\t \t//Si no esta vacio va sumando la cantidad de articulos\n\t \tif(!empty($this->cart)){\n\t \t\tforeach ($this->cart as $linea){\n\t\t\t\t\t$total += $linea['amount'];\n\t\t\t\t}\n\t \t}\n\t \techo $total;\n\t }", "public function getOrder()\n {\n return 30;\n }", "function getTotal()\n\t{\n\t\treturn $this->_total;\n\t}", "public function all_ActiveOrdersCount_get() {\n $result = $this->feeds_model->all_ActiveOrdersCount();\n return $this->response($result);\n }", "function getShippingByOrder($orders_id) {\n\t\t$sel_ord_query = tep_db_query(\"SELECT value FROM \" . TABLE_ORDERS_TOTAL . \" WHERE orders_id = '\".$orders_id.\"' AND class = 'ot_shipping'\");\n\t\t$shiptot = 0;\n\t\twhile($rst_arr = tep_db_fetch_array($sel_ord_query)) {\n\t\t\t$shiptot += $rst_arr[\"value\"];\n\t\t}\n\t\treturn $shiptot;\n\t}", "public function total();", "public function total();", "public function total();", "public function total()\n {\n \treturn $this->price()*$this->quantity;\n }", "public function getMontoTotal() {\n $command = Yii::app()->db->createCommand()\n ->select('sum(t.monto) as total')\n ->from('pago t');\n return $command->queryRow()['total'];\n }", "public function addOrderItemsCount()\r\n {\r\n $itemTable = $this->_helper()->getSql()->getTable('sales_flat_order_item');\r\n if ($this->_helper()->checkSalesVersion('1.4.0.0')) {\r\n $this->getSelect()\r\n ->join(array('item' => $itemTable), \"(item.order_id = main_table.entity_id AND item.parent_item_id IS NULL)\",\r\n array(\r\n 'sum_qty' => 'SUM(item.qty_ordered)',\r\n 'sum_total' => 'SUM(item.base_row_total)',\r\n ))\r\n ->where(\"main_table.entity_id = item.order_id\");\r\n } else {\r\n $this->getSelect()\r\n ->join(array('item' => $itemTable), \"(item.order_id = e.entity_id AND item.parent_item_id IS NULL)\",\r\n array(\r\n 'sum_qty' => 'SUM(item.qty_ordered)',\r\n 'sum_total' => 'SUM(item.base_row_total)',\r\n ))\r\n ->where(\"e.entity_id = item.order_id\");\r\n }\r\n return $this;\r\n }", "public function totaliza_pedido()\r\n {\r\n\r\n $valor_desconto = 0;\r\n $valor_pedido = 0;\r\n $valor_ipi = 0;\r\n $valor_total = 0;\r\n $desconto = $this->mgt_pedido_cliente_desconto->Text;\r\n $frete = $this->mgt_pedido_valor_frete->Text;\r\n\r\n if($desconto < 0)\r\n {\r\n $desconto = 0;\r\n }\r\n\r\n if($frete < 0)\r\n {\r\n $frete = 0;\r\n }\r\n\r\n $this->mgt_pedido_valor_desconto->Text = '0.00';\r\n $this->mgt_pedido_valor_pedido->Text = '0.00';\r\n $this->mgt_pedido_valor_ipi->Text = '0.00';\r\n $this->mgt_pedido_valor_total->Text = '0.00';\r\n\r\n $Comando_SQL = \"select * from mgt_cotacoes_produtos where mgt_cotacao_produto_numero_cotacao = '\" . trim($this->mgt_pedido_numero->Text) . \"' order by mgt_cotacao_produto_numero\";\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Close();\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->SQL = $Comando_SQL;\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Open();\r\n\r\n if((GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->EOF) != 1)\r\n {\r\n while((GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->EOF) != 1)\r\n {\r\n $valor_ipi = $valor_ipi + GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Fields['mgt_cotacao_produto_valor_ipi'];\r\n $valor_pedido = $valor_pedido + GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Fields['mgt_cotacao_produto_valor_total'];\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Next();\r\n }\r\n }\r\n\r\n if($desconto > 0)\r\n {\r\n $valor_desconto = (($valor_pedido * $desconto) / 100);\r\n }\r\n else\r\n {\r\n $valor_desconto = 0;\r\n }\r\n\r\n $valor_total = ((($valor_pedido + $valor_ipi) + $frete) - $valor_desconto);\r\n\r\n $this->mgt_pedido_valor_desconto->Text = number_format($valor_desconto, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_pedido->Text = number_format($valor_pedido, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_ipi->Text = number_format($valor_ipi, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_total->Text = number_format($valor_total, \"2\", \".\", \"\");\r\n }", "public function countOrder(): int;", "public function todaysSalesTotal()\n {\n \n //get todays Date\n $fromDate = Mage::helper('magemobapp')->getTodaysDate();\n \n $storeId = Mage::getModel('magemobapp/storeinfo')->getStoreId();\n \n $collection = Mage::getResourceModel('sales/order_collection')->addAttributeToFilter('created_at', array(\n 'from' => $fromDate\n ));\n \n if ($storeId != 0) {\n $collection->addAttributeToFilter('store_id', $storeId); //fill store\n }\n //$collection;\n \n $collection->addAttributeToSelect('base_grand_total')->addAttributeToSelect('base_total_refunded')->addAttributeToSelect('base_total_paid');\n\n \n $data = $collection->getData();\n $total = 0;\n foreach ($data as $eachData) {\n if (isset($eachData['status']) && $eachData['status'] == 'complete') {\n if ($eachData['base_total_refunded'] == '') {\n $total += (float) $eachData['base_total_paid'];\n } else {\n $total += (float) $eachData['base_total_paid'] - (float) $eachData['base_total_refunded'];\n }\n } else {\n $total += (float) $eachData['base_grand_total'];\n }\n }\n return Mage::helper('core')->currency($total, true, false);\n }", "function totals()\n\t{\n\t\treturn $this->_tour_voucher_contents['totals'];\n\t}", "public function getTotal(){\n\t\treturn $this->_total;\n\t}", "public function getOrders() \n {\n return $this->_fields['Orders']['FieldValue'];\n }", "public function get_total()\n\t{\n\t\treturn $this->EE->cartthrob->cart->total();\n\t}", "public function totalRecount()\n {\n $products = $this->products;\n $newTotal = 0;\n foreach ($products as $product) {\n if ($product->removed) {\n continue;\n }\n $newTotal += $product->count * $product->price;\n }\n $this->total = $newTotal;\n $this->save();\n }", "public function getOrder()\n {\n return 20;\n }", "public function getOrder()\n {\n return 20;\n }", "public function getTotal()\n {\n return $this->getQty() * $this->getProduct()->getPrice();\n }", "function getOrder()\n{\n\n}", "public function getOrder(): int\n {\n return 6;\n }", "public function gettotal()\r\n {\r\n return $this->total;\r\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function totalBillOS()\n {\n return $this->bills->sum('outstanding');\n }", "public static function getOrderedProductsQuantity(): string\n {\n $query = new Query();\n $total = $query->select([\n 'COUNT(*) as total'\n ])\n ->from(['sale_items'])\n ->where([\n 'customer_auth_id' => Yii::$app->user->identity->id,\n 'sale_id' => 0\n ])\n ->scalar();\n\n return $total;\n }", "public function getTotalAmount();", "public function count() {\n\t\treturn $this->field('Cart.order_item_count', $this->cartConditions());\n\t}", "public function getCartTotal()\n {\n }", "public function getOrder()\n {\n return 15;\n }", "public function testTotalAmountCalculation(): void\n {\n $order = new Order('consumerIdTest123', '845126849', new \\DateTimeImmutable('midnight'), 'OrderNumber123', 7);\n $order->addOrderLine('productIdTest1', 2, 4.9);\n $order->addOrderLine('productIdTest2', 3, 10.5);\n\n static::assertEquals(41.3, $order->getAmount());\n }", "public function qtdTotalChamadosAbertosCustomer() {\n $tickets = Yii::app()->dbFRAPORT->createCommand()\n ->select(\"COUNT(t.id) as qtd \")\n ->from(\"ticket AS t \")\n ->join(\"ticket_history AS th\", \"t.id = th.ticket_id \")\n ->where(\"t.create_time BETWEEN :dtIni and :dtFim AND history_type_id = 1 AND th.queue_id = 1 AND (th.state_id = 1 OR th.state_id = 4) \"\n , array(':dtIni' => FksFormatter::StrToDate($this->dtInicio),\n ':dtFim' => FksFormatter::StrToDate($this->dtTermino),\n ))\n ->queryAll();\n return $tickets[0]['qtd'];\n }", "public function total(){\n\t\treturn $this->total;\n\t}", "public function getOrderIdCount()\n {\n return $this->count(self::order_id);\n }", "public function calculateOrderTotal($items)\n {\n $total = 0;\n foreach ($items as $key => $item) {\n $total += $item['quoted_price'];\n }\n return $total;\n }", "public function getTotal() {\n return $this->get(self::TOTAL);\n }", "private function getOrderNumber()\n {\n $number = Shopware()->Db()->fetchOne(\"/*NO LIMIT*/ SELECT number FROM s_order_number WHERE name='invoice' FOR UPDATE\");\n Shopware()->Db()->executeUpdate(\"UPDATE s_order_number SET number = number + 1 WHERE name='invoice'\");\n $number += 1;\n\n return $number;\n }", "protected function get_totalPedidos()\n {\n $pedidos = DB::SELECT(\"SELECT COUNT(*) AS t_pedidos \n FROM pedidos \n WHERE extract(month FROM current_date) = extract(month FROM created_at);\");\n foreach($pedidos as $pedido)\n {\n $pedid_mes = $pedido->t_pedidos; \n }\n return $pedid_mes;\n }", "public function get_order() {\n return 500;\n }", "public function getOrderBaseGrandTotal(){\n return $this->_getData(self::ORDER_BASE_GRAND_TOTAL);\n }", "function carton_processing_order_count() {\n\tif ( false === ( $order_count = get_transient( 'carton_processing_order_count' ) ) ) {\n\t\t$order_statuses = get_terms( 'shop_order_status' );\n\t $order_count = false;\n\t foreach ( $order_statuses as $status ) {\n\t if( $status->slug === 'processing' ) {\n\t $order_count += $status->count;\n\t break;\n\t }\n\t }\n\t $order_count = apply_filters( 'carton_admin_menu_count', intval( $order_count ) );\n\t\tset_transient( 'carton_processing_order_count', $order_count );\n\t}\n\n\treturn $order_count;\n}", "public function total()\n {\n return $this->total;\n }", "public function total()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->getAmount() * $this->getPrice();\n }" ]
[ "0.7547082", "0.74541545", "0.7319906", "0.7304201", "0.7273912", "0.7236974", "0.7035243", "0.70203006", "0.69083", "0.6716686", "0.6693381", "0.66745406", "0.6674423", "0.66742945", "0.6600579", "0.65978557", "0.6545862", "0.6533057", "0.64909494", "0.64725965", "0.64624506", "0.64424384", "0.6409735", "0.63751423", "0.6369402", "0.63445544", "0.63353366", "0.63174", "0.62806183", "0.6272886", "0.6270016", "0.6224081", "0.6220445", "0.6214406", "0.6207208", "0.6189867", "0.6183996", "0.6171701", "0.61636657", "0.6157569", "0.6150335", "0.61435616", "0.61280483", "0.61274457", "0.61274457", "0.61079675", "0.61079484", "0.6104455", "0.6104455", "0.6079032", "0.6078305", "0.60776466", "0.60723865", "0.605368", "0.6051014", "0.6044768", "0.6044768", "0.6044768", "0.60269773", "0.602624", "0.60231996", "0.6018117", "0.6017383", "0.6016751", "0.6015359", "0.59990996", "0.5996895", "0.59899646", "0.59888285", "0.5982383", "0.5982383", "0.59756553", "0.5970298", "0.59680873", "0.5965116", "0.5962079", "0.5962079", "0.5962079", "0.5962079", "0.5962079", "0.5962079", "0.5961682", "0.59464955", "0.59457237", "0.5939351", "0.59347737", "0.5934188", "0.59334636", "0.5930702", "0.5930331", "0.59287065", "0.5923853", "0.59228194", "0.5920491", "0.5912916", "0.5906234", "0.58858365", "0.5884336", "0.58781284", "0.58781284", "0.5873756" ]
0.0
-1
check for session and cookie presence
public function category_list() { $this->admin_header(); //fetch the total number of categories $config['total_num_category'] = $this->Admin_model->fetch_all_rows('category'); //fetch the total number of tags $data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags'); //$config['total_rows'] = $this->Admin_model->fetch_all_rows('food'); $config['base_url'] = site_url("Admin/category_list/"); $config['per_page'] = 10; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_category'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['categorys'] = $this->Admin_model->fetch_category($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_category'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_category']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $this->add_category_template('category_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasSession() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "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}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "public function checkSession()\n {\n if(isset($_COOKIE['id'])){\n $cookieOrSessionID = $_COOKIE['id'];\n }\n elseif(isset($_SESSION['id'])){\n $cookieOrSessionID = $_SESSION['id'];\n }\n return $cookieOrSessionID;\n }", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function is_cookie_set()\n {\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isCookieSet() {}", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\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 static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function user_check_session_id() {\n if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success();\n else wp_send_json_error();\n }", "public static function checkSession() {\n\t\t// Set any API keys\n\t\t$api_keys = array();\n\t\t// Check API Key or Session Authentication\n\t\t$key = \"\";\n\t\tif (isset($_GET['key'])) {\n\t\t\t$key = $_GET['key'];\n\t\t}\n\t\tif (!isset($_SESSION['user']) && !in_array($key, $api_keys)) {\n\t\t\texit('{\"status\":\"error\",\"message\":\"Authentication Error\"}');\n\t\t}\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "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 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 function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\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 sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "function sess_check ()\n\t{\n\n\t\tglobal $xnyo_parent;\n\n\t\t// store the IP Address in the session varz\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Storing IP/Browser/Time.');\n\t\t$_SESSION['_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION['_browser'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$_SESSION['_last_activity'] = time();\n\n\t\t// if we're logged in, do auth stuff\n\t\tif (!empty($xnyo->user))\n\t\t{\n\t\t\t// there really isnt much to do in here\n\t\t\t// check that we havent expired\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session expiry.');\n\t\t\tif ($_SESSION['auth']['expiry'] !== 0)\n\t\t\t{\n\t\t\t\tif (time() > $_SESSION['auth']['expiry'])\n\t\t\t\t{\n\t\t\t\t\t$time = time() - $_SESSION['auth']['expiry'];\n\t\t\t\t\t$errmsg = \"Session time expired ($time seconds). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t\t$this->logout ('expired');\n\t\t\t\t} else {\n\t\t\t\t\t// update session times\n\t\t\t\t\t$_SESSION['auth'][\"expiry\"] = time() + $xnyo_parent->session_lifetime;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check their subnet is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session subnet.');\n\t\t\tif ($_SESSION['auth']['subnet'] != $this->subnet())\n\t\t\t{\n\t\t\t\t$errmsg = \"Session moved subnet (\" . $_SESSION['auth']['subnet'] . \" => \" . $this->subnet() . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('moved_subnet');\n\t\t\t}\n\t\n\t\t\t// check browser is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session Browser.');\n\t\t\tif ($_SESSION['auth']['browser'] != $_SERVER['HTTP_USER_AGENT'])\n\t\t\t{\n\t\t\t\t$errmsg = \"User changed browsers (\" . $_SESSION['auth']['browser'] . \" => \" . $_SERVER['HTTP_USER_AGENT'] . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('changed_browser');\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t// access checking is the only thing left i guess\n\t\t// if theres no access level specified, just let them through\n\t\tif (!empty($xnyo_parent->access) && !$this->check($xnyo_parent->access) && !$this->set_acl($xnyo_parent->access))\n\t\t\treturn false;\n\n\t\t// we're all done i guess\n\t\treturn true;\n\t}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "protected function checkSessionToken() {}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public function session_check(){\n\n\tif(!isset($_SESSION[\"user-type\"]) && $_SESSION[\"user-type\"] != \"user\"){\n\t\tredirect(\"Login\");\n\t} \n}", "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\n }", "public function checkSessionStatus(){\t\t\n\t\tif(isset($_SESSION[self::$session])){\n\t\t\treturn $_SESSION[self::$session];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "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 }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "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}", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\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}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected function checkSessionLifetime() {}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "static function check()\n\t{\n\t\t$session = App::get('session');\n\t\treturn $session->get('auth');\n\t}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function checkUsersSession(){\n\t}", "function id_in_session()\n{\n return isset($_SESSION['username']) && isset($_SESSION['loggedin']);\n}", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\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 _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function auth_session_exists() {\n\n // there's an existing session, nothing to do\n if (array_key_exists('user_name', $_SESSION)) {\n return TRUE;\n }\n\n // There's not an existing session, but the user has an auth_key\n // cookie, so see if it matches the database.\n // If it does, create a new session\n if (array_key_exists('auth_userid', $_COOKIE) && array_key_exists('auth_key', $_COOKIE)) {\n require_once '../database/mysql.inc.php';\n $conn = conn();\n\n $auth_userid = $_COOKIE['auth_userid'];\n $auth_key = $_COOKIE['auth_key'];\n $sql = 'SELECT p.name_ingame as name_ingame ' .\n 'FROM player_auth as a, player as p ' .\n 'WHERE a.player_id = :id AND a.auth_key = :auth_key AND a.player_id = p.id';\n $query = $conn->prepare($sql);\n $query->execute(array(':id' => $auth_userid,\n ':auth_key' => $auth_key));\n $resultArray = $query->fetchAll();\n if (count($resultArray) == 1) {\n $name_ingame = $resultArray[0]['name_ingame'];\n session_regenerate_id(TRUE);\n $_SESSION['user_id'] = $auth_userid;\n $_SESSION['user_name'] = $name_ingame;\n $_SESSION['user_lastactive'] = time();\n return TRUE;\n }\n }\n\n // neither session nor cookie lookup worked, so the user is not logged in\n return FALSE;\n}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\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 }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\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 }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\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 function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}" ]
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.69460523", "0.69320947", "0.6906824", "0.6904842", "0.69004583", "0.68975925", "0.68685424", "0.6848523", "0.6844706", "0.6842497", "0.68407005", "0.68338877", "0.6809911", "0.6807682", "0.68048835", "0.6795858", "0.6795753", "0.6790786", "0.67827266", "0.6781565", "0.6776217", "0.67662364", "0.6762543", "0.67525536", "0.67525303", "0.675126", "0.6741708", "0.6723873", "0.6718459", "0.6718133", "0.67175967", "0.67175967", "0.67163414", "0.6715241", "0.67149955", "0.6701401", "0.66959953", "0.6677578", "0.66633356", "0.6658625", "0.6653751", "0.6648311", "0.6635521", "0.663372", "0.6631203", "0.6616926", "0.66162115", "0.66072696", "0.6599716", "0.65856075", "0.65696895", "0.6568369", "0.65658766", "0.6557916", "0.6554719", "0.6548292", "0.65378124", "0.653712", "0.65335554", "0.6526306", "0.65212154", "0.65183794", "0.651378", "0.65086836", "0.6504965", "0.650051", "0.6497977", "0.649534", "0.6494901", "0.64876956", "0.6485331", "0.6483739", "0.6472518", "0.64655817", "0.6464438", "0.64629364", "0.646088", "0.64607173", "0.64595693", "0.6455302", "0.64550734" ]
0.0
-1
check for session and cookie presence
public function edit_category_segment($category_id, $data = array()) { $this->admin_header(); $result = $this->Admin_model->fetch_category_details($category_id); if ($result !== FALSE) { $data['category_details'] = $result; $this->add_category_template('edit_category', $data); }else { redirect('Admin/category_list'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasSession() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "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}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "public function checkSession()\n {\n if(isset($_COOKIE['id'])){\n $cookieOrSessionID = $_COOKIE['id'];\n }\n elseif(isset($_SESSION['id'])){\n $cookieOrSessionID = $_SESSION['id'];\n }\n return $cookieOrSessionID;\n }", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function is_cookie_set()\n {\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isCookieSet() {}", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\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 static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function user_check_session_id() {\n if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success();\n else wp_send_json_error();\n }", "public static function checkSession() {\n\t\t// Set any API keys\n\t\t$api_keys = array();\n\t\t// Check API Key or Session Authentication\n\t\t$key = \"\";\n\t\tif (isset($_GET['key'])) {\n\t\t\t$key = $_GET['key'];\n\t\t}\n\t\tif (!isset($_SESSION['user']) && !in_array($key, $api_keys)) {\n\t\t\texit('{\"status\":\"error\",\"message\":\"Authentication Error\"}');\n\t\t}\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "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 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 function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\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 sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function sess_check ()\n\t{\n\n\t\tglobal $xnyo_parent;\n\n\t\t// store the IP Address in the session varz\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Storing IP/Browser/Time.');\n\t\t$_SESSION['_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION['_browser'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$_SESSION['_last_activity'] = time();\n\n\t\t// if we're logged in, do auth stuff\n\t\tif (!empty($xnyo->user))\n\t\t{\n\t\t\t// there really isnt much to do in here\n\t\t\t// check that we havent expired\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session expiry.');\n\t\t\tif ($_SESSION['auth']['expiry'] !== 0)\n\t\t\t{\n\t\t\t\tif (time() > $_SESSION['auth']['expiry'])\n\t\t\t\t{\n\t\t\t\t\t$time = time() - $_SESSION['auth']['expiry'];\n\t\t\t\t\t$errmsg = \"Session time expired ($time seconds). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t\t$this->logout ('expired');\n\t\t\t\t} else {\n\t\t\t\t\t// update session times\n\t\t\t\t\t$_SESSION['auth'][\"expiry\"] = time() + $xnyo_parent->session_lifetime;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check their subnet is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session subnet.');\n\t\t\tif ($_SESSION['auth']['subnet'] != $this->subnet())\n\t\t\t{\n\t\t\t\t$errmsg = \"Session moved subnet (\" . $_SESSION['auth']['subnet'] . \" => \" . $this->subnet() . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('moved_subnet');\n\t\t\t}\n\t\n\t\t\t// check browser is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session Browser.');\n\t\t\tif ($_SESSION['auth']['browser'] != $_SERVER['HTTP_USER_AGENT'])\n\t\t\t{\n\t\t\t\t$errmsg = \"User changed browsers (\" . $_SESSION['auth']['browser'] . \" => \" . $_SERVER['HTTP_USER_AGENT'] . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('changed_browser');\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t// access checking is the only thing left i guess\n\t\t// if theres no access level specified, just let them through\n\t\tif (!empty($xnyo_parent->access) && !$this->check($xnyo_parent->access) && !$this->set_acl($xnyo_parent->access))\n\t\t\treturn false;\n\n\t\t// we're all done i guess\n\t\treturn true;\n\t}", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "protected function checkSessionToken() {}", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "public function session_check(){\n\n\tif(!isset($_SESSION[\"user-type\"]) && $_SESSION[\"user-type\"] != \"user\"){\n\t\tredirect(\"Login\");\n\t} \n}", "public function checkSessionStatus(){\t\t\n\t\tif(isset($_SESSION[self::$session])){\n\t\t\treturn $_SESSION[self::$session];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\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 }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "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}", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\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}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected function checkSessionLifetime() {}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "static function check()\n\t{\n\t\t$session = App::get('session');\n\t\treturn $session->get('auth');\n\t}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function checkUsersSession(){\n\t}", "function id_in_session()\n{\n return isset($_SESSION['username']) && isset($_SESSION['loggedin']);\n}", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\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 _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function auth_session_exists() {\n\n // there's an existing session, nothing to do\n if (array_key_exists('user_name', $_SESSION)) {\n return TRUE;\n }\n\n // There's not an existing session, but the user has an auth_key\n // cookie, so see if it matches the database.\n // If it does, create a new session\n if (array_key_exists('auth_userid', $_COOKIE) && array_key_exists('auth_key', $_COOKIE)) {\n require_once '../database/mysql.inc.php';\n $conn = conn();\n\n $auth_userid = $_COOKIE['auth_userid'];\n $auth_key = $_COOKIE['auth_key'];\n $sql = 'SELECT p.name_ingame as name_ingame ' .\n 'FROM player_auth as a, player as p ' .\n 'WHERE a.player_id = :id AND a.auth_key = :auth_key AND a.player_id = p.id';\n $query = $conn->prepare($sql);\n $query->execute(array(':id' => $auth_userid,\n ':auth_key' => $auth_key));\n $resultArray = $query->fetchAll();\n if (count($resultArray) == 1) {\n $name_ingame = $resultArray[0]['name_ingame'];\n session_regenerate_id(TRUE);\n $_SESSION['user_id'] = $auth_userid;\n $_SESSION['user_name'] = $name_ingame;\n $_SESSION['user_lastactive'] = time();\n return TRUE;\n }\n }\n\n // neither session nor cookie lookup worked, so the user is not logged in\n return FALSE;\n}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\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 }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\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 }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\n }", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "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 function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}" ]
[ "0.8163929", "0.8163929", "0.79391783", "0.781278", "0.73408365", "0.7292273", "0.7254012", "0.7233287", "0.72067773", "0.7206573", "0.71651375", "0.70685685", "0.7068241", "0.7052831", "0.70487046", "0.70306545", "0.70276755", "0.7023005", "0.69998795", "0.69891644", "0.694627", "0.6932201", "0.690664", "0.6905199", "0.6900687", "0.6898575", "0.6868984", "0.6848269", "0.68456584", "0.6843024", "0.6842037", "0.6835498", "0.68096584", "0.68067455", "0.6804945", "0.679602", "0.67958665", "0.6791565", "0.67822146", "0.6781694", "0.67754143", "0.6766814", "0.6763462", "0.67523545", "0.6752086", "0.6750748", "0.67410815", "0.6723007", "0.67184675", "0.67184377", "0.67184377", "0.67179114", "0.67167205", "0.6716269", "0.6715483", "0.6702443", "0.6696523", "0.66782004", "0.66629434", "0.6658718", "0.6652949", "0.66494685", "0.66364765", "0.6634498", "0.66311765", "0.66172194", "0.6614772", "0.6608122", "0.6599933", "0.65865386", "0.65697664", "0.6569106", "0.65667003", "0.6557862", "0.655391", "0.6548637", "0.6537782", "0.65372586", "0.65345836", "0.65258855", "0.65222204", "0.6517405", "0.6515081", "0.65067333", "0.65044916", "0.6500649", "0.6499032", "0.6496038", "0.6493618", "0.6487407", "0.64860123", "0.64840484", "0.64713854", "0.6464987", "0.646481", "0.6464038", "0.64618146", "0.64604735", "0.6458784", "0.6456097", "0.6455754" ]
0.0
-1
get the total new orders
public function add_category_template($filename, $data = array()) { //$data["there_is_new_order"] = $this->Admin_model->return_total_rows('order', 'status', 'open'); $this->admin_header(); $data['header'] = $this->load->view('templates/admin_header', $data, TRUE); $data['footer'] = $this->load->view('templates/admin_footer', '', TRUE); $this->load->view('admins/'.$filename, $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotal()\n {\n return $this->service()->getTotalOfOrder();\n }", "protected function getTotalOrders()\n {\n\n if (auth()->user()) {\n $userId = auth()->user()->id;\n return \\Cart::session($userId)->getTotal();\n }\n return \\Cart::getTotal();\n }", "public function getTotalOrdersAmRcv()\n\t{\n $log=new Log(\"AM_RCV_TOTAL:\".date('Y-m-d').\".log\");\n $log->write(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = '1' and order_status = \" . 2);\n $query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = '1' and order_status = \" . 2);\n $results = $query->row;\n return $results['total_orders'];\n\t}", "public function getTotalOrdersAm()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = \" . 1);\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "public function getTotalOrdersWs()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = \" . 1);\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "private function get_num_total_orders()\n\t{\n\t\treturn wp_count_posts('order_paysera')->publish;\n\t}", "public function getCurrentMonthTotalOrder() : int;", "public function getTotalOrdersMo()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(oc_po_product.id) as total_orders FROM oc_po_order \nLEFT JOIN oc_po_product \nON(oc_po_order.id = oc_po_product.order_id)\nWHERE oc_po_order.user_id='103' AND oc_po_product.item_status <> 0\");\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "public function getOrdertotal()\n {\n return $this->ordertotal;\n }", "public function getMinOrderTotal();", "public function modelTotal(){\n\t\t\t//---\n\t\t\t$conn = Connection::getInstance();\n\t\t\t$query = $conn->query(\"select id from orders\");\n\t\t\t//lay tong so ban ghi\n\t\t\treturn $query->rowCount();\n\t\t\t//---\n\t\t}", "function btce_get_active_order_total($key, $secret) {\n $orders = btce_active_orders($key, $secret);\n $_total = 0;\n foreach ($orders->return as $order) {\n if ($order->type == 'sell') {\n $_total += $order->amount;\n }\n }\n return $_total;\n}", "public static function getTotalValueOfOrder()\n {\n \ttry\n \t{\n\t \t$storage = My_Zend_Globals::getStorage();\n\t \n\t \t$table = self::_TABLE_PRODUCT_ORDER_DETAIL;\n\t \n\t \t//Query data from database\n\t \t$select = $storage->select()\n\t\t\t\t\t \t->from($table,'sum(amount_total)')\n\t\t\t\t\t \t->where('order_status = ?', 2);\n\t \t \n\t \t$total = $storage->fetchCol($select);\n\t \t \n\t \t$total = intval($total['total']);\n\t \t\n\t \treturn $total;\n \t}\n \tcatch(Exception $e)\n \t{\n \t\treturn false;\n \t}\t \t\n }", "public function getOrdersCount() {\n\t\t$summary = $this->getMarketSummary();\n\n\t\treturn [ 'BUY' => $summary['OpenBuyOrders'], 'SELL' => $summary['OpenSellOrders'] ];\n\n\t}", "public function get_orders_total() : array {\n\t\t$element = $this->dom->find( '#j-order-num' );\n\t\tif ( ! $element ) {\n\t\t\treturn [\n\t\t\t\t'orders_total' => 0,\n\t\t\t];\n\t\t}\n\n\t\t$value = explode( ' ', $element[0]->text() );\n\t\tif ( ! $value || empty( $value[0] ) ) {\n\t\t\treturn [\n\t\t\t\t'orders_total' => 0,\n\t\t\t];\n\t\t}\n\n\t\treturn [\n\t\t\t'orders_total' => intval( $value[0] ),\n\t\t];\n\t}", "public function getOrdersCount() {\n return $this->getTable()->getOrdersCount();\n }", "public function getOrderCount()\n {\n return $this->count(self::order);\n }", "public function getTotalQtyOrdered();", "public function getUserOrderCounts() {\n\n $this->load->model('account/order');\n $count = $this->model_account_order->getTotalOrders();\n\n return $count;\n }", "public function getTotal(){\n $total=0;\n\n foreach ( $this->getOrderLines() as $ol){\n $total += $ol->getSubTotal();\n }\n \n return $total;\n }", "function calculateOrderAmount(): int {\n // Calculate the order total on the server to prevent\n // customers from directly manipulating the amount on the client\n $oldCart=Session::get('cart');\n $cart = new Cart($oldCart);\n $total = $cart->totalPrice;\n return $total * 100;\n }", "function getReceived(){\n $total = 0;\n $all = $this->product->include_join_fields()->get()->all;\n foreach ($all as $product){\n \n $total+= $product->join_qty;\n \n }\n return $total;\n }", "public function getMaxOrderTotal();", "private function getOldTotal()\n {\n return $this->collection->items[$this->cart_hash]->total;\n }", "public function getNewShippingTotal()\r\n {\r\n $totalItem = 0;\r\n foreach ($this->_getQuote()->getAllVisibleItems() as $item) {\r\n $totalItem += $item->getQty();\r\n }\r\n return $totalItem;\r\n }", "public function getOrderTrackingCount()\n {\n return $this->count(self::order_tracking);\n }", "public function get_total()\n {\n }", "public static function getTotalValueOfOrderDashboard()\n {\n \ttry\n \t{\n\t \t$storage = My_Zend_Globals::getStorage();\n\t \n\t \t$table = self::_TABLE_PRODUCT_ORDER_DETAIL;\n\t \n\t \t//Query data from database\n\t \t$select = $storage->select()\n\t\t\t\t\t \t->from($table,'sum(amount_total)')\n\t\t\t\t\t \t->where('order_status = ?', 0);\n\t \t \n\t \t$total = $storage->fetchCol($select);\n\t \t \n\t \t$total = intval($total['total']);\n\t \t\n\t \treturn $total;\n \t}\n \tcatch(Exception $e)\n \t{\n \t\treturn false;\n \t}\t \t\n }", "protected function getOrderCount()\n {\n $customer = $this->customerSession->getCustomer();\n if($customer->getId())\n {\n $orders = $this->orderCollectionFactory->create()->addFieldToSelect(\n '*'\n )->addFieldToFilter(\n 'customer_id',\n $customer->getId()\n )->setOrder(\n 'created_at',\n 'desc'\n );\n return count($orders);\n }\n return 0;\n }", "public function ordersGetTotalPages() {\n\t\t##\thttps://docs.topspin.net/tiki-index.php?page=Order+API#View_Orders\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tThe number of total pages of Orders\n\t\t$url = 'http://app.topspin.net/api/v1/order';\n\t\t$data = json_decode($this->process($url,null,false));\n\t\tif(isset($data->total_pages)) { return $data->total_pages; }\n\t}", "function getOverallOrderRemain(){\n\t\t$t=0;\n\t\t$a = Order::all();\n\t\tforeach($a as $n){\n\t\t$dur= $n->qty;\n\t\t$sl =Order::where('payment', 'verified')->count();\n\t\t$r=intVal($sl);\n\t\t$t = $t + $r;\n\t\t}\n\t\treturn $t;\n\t\t}", "private function calculateOrderAmount()\n {\n if ($this->getOffer() instanceof Offer) {\n //recalculates the new amount\n $this->getOffer()->calculateInvoiceAmount();\n Shopware()->Models()->persist($this->getOffer());\n }\n }", "function getGstByOrder($orders_id) {\n\t\t$sel_ord_query = tep_db_query(\"SELECT value FROM \" . TABLE_ORDERS_TOTAL . \" WHERE orders_id = '\".$orders_id.\"' AND class = 'ot_gst_total'\");\n\t\t$gsttot = 0;\n\t\twhile($rst_arr = tep_db_fetch_array($sel_ord_query)) {\n\t\t\t$gsttot += $rst_arr[\"value\"];\n\t\t}\n\t\treturn $gsttot;\n\t}", "function total_other_transactions_amount(){\n $today_other_rec_q = mysql_query(\"SELECT COUNT(order_id) AS TOTAL_OTHER_ORDERS,SUM(amount) AS TOTAL_AMOUNT FROM orders WHERE (card_payment_type = '6' OR card_payment_type = 'J') AND DATE_FORMAT(timestamp,'%Y-%m-%d') = CURDATE()\");\n $today_other_rec = mysql_fetch_assoc($today_other_rec_q);\n $total_other_transactions = $today_other_rec[\"TOTAL_OTHER_ORDERS\"];\n $total_other_transactions_amount = $today_other_rec[\"TOTAL_AMOUNT\"];\n return $total_other_transactions_amount;\n }", "protected function totalOrders($all = false) {\n if (!$all) {\n return $this->shipsList->where('status_id', 1)->count();\n }\n\n return $this->shipsList->count();\n }", "function getOverallOrderPrice(){\n\t\t$t=0;\n\t\t$a = Order::where('payment', 'verified')->get();\n\t\tforeach($a as $n){\n\t\t$dur= $n->qty;\n\t\t\n\t\t$r = intVal($n->qty)*intVal($n->price);\n\t\t$t = $t + $r;\n\t\t}\n\t\treturn $t;\n\t\t}", "public function get_total()\n\t{\n\t\t$query = $this->query;\n\t\tif(isset($query['order']))\n\t\t\t$query['order'] = $this->model->table() . '.id';\n\t\treturn $this->model->count($query);\n\t}", "public static function get_nb_orders(){\n $return = array();\n $sql = \"SELECT count(mo.id)\n FROM miki_person mp, miki_order mo\n WHERE mp.id = mo.id_person\";\n $result = mysql_query($sql);\n\n $row = mysql_fetch_array($result);\n return $row[0];\n }", "public function getTotalInvoiced();", "protected function getTotal()\n {\n $total = 0;\n foreach ($this->entries as $entry) {\n $total += $entry['price'] * $entry['quantity'];\n }\n\n return $total;\n }", "public function getOrders()\n {\n return $this->orders;\n }", "function get_order_total(){\n\t$cart = $_SESSION['custCart_ID']; // the SESSION and COOKIE customer cart items array\n\t$max=count($_SESSION[$cart]);\n\t$sum=0;\n\tfor($i=0;$i<$max;$i++){\n\t\t$pid=$_SESSION[$cart][$i]['bookid'];\n\t\t$q=$_SESSION[$cart][$i]['qty'];\n\t\t$price=get_price($pid);\n\t\t$sum+=$price*$q;\n\t}\n\treturn $sum;\n}", "public function getNumOfOrdersInBasket() {\n\n $basketUser = $this->getBasketUserFromAuth();\n\n $result = 0;\n if ($basketUser != null) {\n $basketDetailModel = new Application_Model_BasketDetail();\n\n\n $result = $basketDetailModel->getNumOfOrdersInBasket($basketUser);\n }\n\n return $result;\n }", "public function getTotal();", "public function getTotal();", "function getOrders() {\n\t\t$orders = Mage::getModel ( 'sales/order' )->getCollection ()->addAttributeToSelect ( \"*\" )->addAttributeToFilter ( 'status', array ('complete') );\n\t\t$orders_data = $this->preapreOrdersTosend ( $orders );\n\t\treturn $orders_data;\n\t}", "static public function get_shipping_line_total( $order ){\n\n \t\t$version = toret_check_wc_version();\n\n \tif( $version === false ){\n\n \t$total = $order->get_total_shipping(); \n \n \t}else{\n\n\t $shippings = $order->get_items( 'shipping' );\n\t\t\t\tforeach( $shippings as $shipping ){\n \t\t\t\t\t\n \t\t\t\t$total = $shipping->get_total();\n \t\t\t\t\t\n\t\t\t\t} \t\n\n \t}\n\n \treturn $total;\n\n \t}", "function getOrder()\n {\n return 20;\n }", "function getOrder()\n {\n return 20;\n }", "public function getBaseTotalQtyOrdered();", "public function get_total_items(){\n\t \t$total = 0;\n\t \t//Si no esta vacio va sumando la cantidad de articulos\n\t \tif(!empty($this->cart)){\n\t \t\tforeach ($this->cart as $linea){\n\t\t\t\t\t$total += $linea['amount'];\n\t\t\t\t}\n\t \t}\n\t \techo $total;\n\t }", "public function getOrder()\n {\n return 30;\n }", "function getTotal()\n\t{\n\t\treturn $this->_total;\n\t}", "public function all_ActiveOrdersCount_get() {\n $result = $this->feeds_model->all_ActiveOrdersCount();\n return $this->response($result);\n }", "function getShippingByOrder($orders_id) {\n\t\t$sel_ord_query = tep_db_query(\"SELECT value FROM \" . TABLE_ORDERS_TOTAL . \" WHERE orders_id = '\".$orders_id.\"' AND class = 'ot_shipping'\");\n\t\t$shiptot = 0;\n\t\twhile($rst_arr = tep_db_fetch_array($sel_ord_query)) {\n\t\t\t$shiptot += $rst_arr[\"value\"];\n\t\t}\n\t\treturn $shiptot;\n\t}", "public function total();", "public function total();", "public function total();", "public function total()\n {\n \treturn $this->price()*$this->quantity;\n }", "public function getMontoTotal() {\n $command = Yii::app()->db->createCommand()\n ->select('sum(t.monto) as total')\n ->from('pago t');\n return $command->queryRow()['total'];\n }", "public function addOrderItemsCount()\r\n {\r\n $itemTable = $this->_helper()->getSql()->getTable('sales_flat_order_item');\r\n if ($this->_helper()->checkSalesVersion('1.4.0.0')) {\r\n $this->getSelect()\r\n ->join(array('item' => $itemTable), \"(item.order_id = main_table.entity_id AND item.parent_item_id IS NULL)\",\r\n array(\r\n 'sum_qty' => 'SUM(item.qty_ordered)',\r\n 'sum_total' => 'SUM(item.base_row_total)',\r\n ))\r\n ->where(\"main_table.entity_id = item.order_id\");\r\n } else {\r\n $this->getSelect()\r\n ->join(array('item' => $itemTable), \"(item.order_id = e.entity_id AND item.parent_item_id IS NULL)\",\r\n array(\r\n 'sum_qty' => 'SUM(item.qty_ordered)',\r\n 'sum_total' => 'SUM(item.base_row_total)',\r\n ))\r\n ->where(\"e.entity_id = item.order_id\");\r\n }\r\n return $this;\r\n }", "public function totaliza_pedido()\r\n {\r\n\r\n $valor_desconto = 0;\r\n $valor_pedido = 0;\r\n $valor_ipi = 0;\r\n $valor_total = 0;\r\n $desconto = $this->mgt_pedido_cliente_desconto->Text;\r\n $frete = $this->mgt_pedido_valor_frete->Text;\r\n\r\n if($desconto < 0)\r\n {\r\n $desconto = 0;\r\n }\r\n\r\n if($frete < 0)\r\n {\r\n $frete = 0;\r\n }\r\n\r\n $this->mgt_pedido_valor_desconto->Text = '0.00';\r\n $this->mgt_pedido_valor_pedido->Text = '0.00';\r\n $this->mgt_pedido_valor_ipi->Text = '0.00';\r\n $this->mgt_pedido_valor_total->Text = '0.00';\r\n\r\n $Comando_SQL = \"select * from mgt_cotacoes_produtos where mgt_cotacao_produto_numero_cotacao = '\" . trim($this->mgt_pedido_numero->Text) . \"' order by mgt_cotacao_produto_numero\";\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Close();\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->SQL = $Comando_SQL;\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Open();\r\n\r\n if((GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->EOF) != 1)\r\n {\r\n while((GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->EOF) != 1)\r\n {\r\n $valor_ipi = $valor_ipi + GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Fields['mgt_cotacao_produto_valor_ipi'];\r\n $valor_pedido = $valor_pedido + GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Fields['mgt_cotacao_produto_valor_total'];\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Next();\r\n }\r\n }\r\n\r\n if($desconto > 0)\r\n {\r\n $valor_desconto = (($valor_pedido * $desconto) / 100);\r\n }\r\n else\r\n {\r\n $valor_desconto = 0;\r\n }\r\n\r\n $valor_total = ((($valor_pedido + $valor_ipi) + $frete) - $valor_desconto);\r\n\r\n $this->mgt_pedido_valor_desconto->Text = number_format($valor_desconto, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_pedido->Text = number_format($valor_pedido, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_ipi->Text = number_format($valor_ipi, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_total->Text = number_format($valor_total, \"2\", \".\", \"\");\r\n }", "public function countOrder(): int;", "public function todaysSalesTotal()\n {\n \n //get todays Date\n $fromDate = Mage::helper('magemobapp')->getTodaysDate();\n \n $storeId = Mage::getModel('magemobapp/storeinfo')->getStoreId();\n \n $collection = Mage::getResourceModel('sales/order_collection')->addAttributeToFilter('created_at', array(\n 'from' => $fromDate\n ));\n \n if ($storeId != 0) {\n $collection->addAttributeToFilter('store_id', $storeId); //fill store\n }\n //$collection;\n \n $collection->addAttributeToSelect('base_grand_total')->addAttributeToSelect('base_total_refunded')->addAttributeToSelect('base_total_paid');\n\n \n $data = $collection->getData();\n $total = 0;\n foreach ($data as $eachData) {\n if (isset($eachData['status']) && $eachData['status'] == 'complete') {\n if ($eachData['base_total_refunded'] == '') {\n $total += (float) $eachData['base_total_paid'];\n } else {\n $total += (float) $eachData['base_total_paid'] - (float) $eachData['base_total_refunded'];\n }\n } else {\n $total += (float) $eachData['base_grand_total'];\n }\n }\n return Mage::helper('core')->currency($total, true, false);\n }", "function totals()\n\t{\n\t\treturn $this->_tour_voucher_contents['totals'];\n\t}", "public function getTotal(){\n\t\treturn $this->_total;\n\t}", "public function getOrders() \n {\n return $this->_fields['Orders']['FieldValue'];\n }", "public function get_total()\n\t{\n\t\treturn $this->EE->cartthrob->cart->total();\n\t}", "public function totalRecount()\n {\n $products = $this->products;\n $newTotal = 0;\n foreach ($products as $product) {\n if ($product->removed) {\n continue;\n }\n $newTotal += $product->count * $product->price;\n }\n $this->total = $newTotal;\n $this->save();\n }", "public function getOrder()\n {\n return 20;\n }", "public function getOrder()\n {\n return 20;\n }", "public function getTotal()\n {\n return $this->getQty() * $this->getProduct()->getPrice();\n }", "function getOrder()\n{\n\n}", "public function getOrder(): int\n {\n return 6;\n }", "public function gettotal()\r\n {\r\n return $this->total;\r\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function totalBillOS()\n {\n return $this->bills->sum('outstanding');\n }", "public static function getOrderedProductsQuantity(): string\n {\n $query = new Query();\n $total = $query->select([\n 'COUNT(*) as total'\n ])\n ->from(['sale_items'])\n ->where([\n 'customer_auth_id' => Yii::$app->user->identity->id,\n 'sale_id' => 0\n ])\n ->scalar();\n\n return $total;\n }", "public function getTotalAmount();", "public function count() {\n\t\treturn $this->field('Cart.order_item_count', $this->cartConditions());\n\t}", "public function getCartTotal()\n {\n }", "public function getOrder()\n {\n return 15;\n }", "public function testTotalAmountCalculation(): void\n {\n $order = new Order('consumerIdTest123', '845126849', new \\DateTimeImmutable('midnight'), 'OrderNumber123', 7);\n $order->addOrderLine('productIdTest1', 2, 4.9);\n $order->addOrderLine('productIdTest2', 3, 10.5);\n\n static::assertEquals(41.3, $order->getAmount());\n }", "public function qtdTotalChamadosAbertosCustomer() {\n $tickets = Yii::app()->dbFRAPORT->createCommand()\n ->select(\"COUNT(t.id) as qtd \")\n ->from(\"ticket AS t \")\n ->join(\"ticket_history AS th\", \"t.id = th.ticket_id \")\n ->where(\"t.create_time BETWEEN :dtIni and :dtFim AND history_type_id = 1 AND th.queue_id = 1 AND (th.state_id = 1 OR th.state_id = 4) \"\n , array(':dtIni' => FksFormatter::StrToDate($this->dtInicio),\n ':dtFim' => FksFormatter::StrToDate($this->dtTermino),\n ))\n ->queryAll();\n return $tickets[0]['qtd'];\n }", "public function total(){\n\t\treturn $this->total;\n\t}", "public function getOrderIdCount()\n {\n return $this->count(self::order_id);\n }", "public function calculateOrderTotal($items)\n {\n $total = 0;\n foreach ($items as $key => $item) {\n $total += $item['quoted_price'];\n }\n return $total;\n }", "public function getTotal() {\n return $this->get(self::TOTAL);\n }", "private function getOrderNumber()\n {\n $number = Shopware()->Db()->fetchOne(\"/*NO LIMIT*/ SELECT number FROM s_order_number WHERE name='invoice' FOR UPDATE\");\n Shopware()->Db()->executeUpdate(\"UPDATE s_order_number SET number = number + 1 WHERE name='invoice'\");\n $number += 1;\n\n return $number;\n }", "protected function get_totalPedidos()\n {\n $pedidos = DB::SELECT(\"SELECT COUNT(*) AS t_pedidos \n FROM pedidos \n WHERE extract(month FROM current_date) = extract(month FROM created_at);\");\n foreach($pedidos as $pedido)\n {\n $pedid_mes = $pedido->t_pedidos; \n }\n return $pedid_mes;\n }", "public function get_order() {\n return 500;\n }", "public function getOrderBaseGrandTotal(){\n return $this->_getData(self::ORDER_BASE_GRAND_TOTAL);\n }", "function carton_processing_order_count() {\n\tif ( false === ( $order_count = get_transient( 'carton_processing_order_count' ) ) ) {\n\t\t$order_statuses = get_terms( 'shop_order_status' );\n\t $order_count = false;\n\t foreach ( $order_statuses as $status ) {\n\t if( $status->slug === 'processing' ) {\n\t $order_count += $status->count;\n\t break;\n\t }\n\t }\n\t $order_count = apply_filters( 'carton_admin_menu_count', intval( $order_count ) );\n\t\tset_transient( 'carton_processing_order_count', $order_count );\n\t}\n\n\treturn $order_count;\n}", "public function total()\n {\n return $this->total;\n }", "public function total()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->getAmount() * $this->getPrice();\n }" ]
[ "0.7547082", "0.74541545", "0.7319906", "0.7304201", "0.7273912", "0.7236974", "0.7035243", "0.70203006", "0.69083", "0.6716686", "0.6693381", "0.66745406", "0.6674423", "0.66742945", "0.6600579", "0.65978557", "0.6545862", "0.6533057", "0.64909494", "0.64725965", "0.64624506", "0.64424384", "0.6409735", "0.63751423", "0.6369402", "0.63445544", "0.63353366", "0.63174", "0.62806183", "0.6272886", "0.6270016", "0.6224081", "0.6220445", "0.6214406", "0.6207208", "0.6189867", "0.6183996", "0.6171701", "0.61636657", "0.6157569", "0.6150335", "0.61435616", "0.61280483", "0.61274457", "0.61274457", "0.61079675", "0.61079484", "0.6104455", "0.6104455", "0.6079032", "0.6078305", "0.60776466", "0.60723865", "0.605368", "0.6051014", "0.6044768", "0.6044768", "0.6044768", "0.60269773", "0.602624", "0.60231996", "0.6018117", "0.6017383", "0.6016751", "0.6015359", "0.59990996", "0.5996895", "0.59899646", "0.59888285", "0.5982383", "0.5982383", "0.59756553", "0.5970298", "0.59680873", "0.5965116", "0.5962079", "0.5962079", "0.5962079", "0.5962079", "0.5962079", "0.5962079", "0.5961682", "0.59464955", "0.59457237", "0.5939351", "0.59347737", "0.5934188", "0.59334636", "0.5930702", "0.5930331", "0.59287065", "0.5923853", "0.59228194", "0.5920491", "0.5912916", "0.5906234", "0.58858365", "0.5884336", "0.58781284", "0.58781284", "0.5873756" ]
0.0
-1
check for session and cookie presence
public function add_tags() { $this->admin_header(); //fetch the total number of categories $data['total_num_category'] = $this->Admin_model->fetch_all_rows('category'); //fetch the total number of tags $data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags'); if((isset($_POST) && (!empty($_POST)))){ if ($this->form_validation->run('add_tags-form') === FALSE) { $this->add_tag_template('add_tag', $data); } else { if ($this->Admin_model->insert_tags() === TRUE) { $data['msg'] = '<div class="alert alert-success col-sm-offset-2"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>Tags Has Been Added Successfully.</div>'; $this->add_tag_template('add_tag', $data); } else { $data['msg'] = '<div class="alert alert-danger col-sm-offset-2"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>An Error Was Encountered While Adding Tags. Pls Try Again</div>'; $this->add_tag_template('add_tag', $data); } } } else{ $this->add_tag_template('add_tag', $data); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasSession() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "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}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "public function checkSession()\n {\n if(isset($_COOKIE['id'])){\n $cookieOrSessionID = $_COOKIE['id'];\n }\n elseif(isset($_SESSION['id'])){\n $cookieOrSessionID = $_SESSION['id'];\n }\n return $cookieOrSessionID;\n }", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function is_cookie_set()\n {\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isCookieSet() {}", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\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 static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function user_check_session_id() {\n if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success();\n else wp_send_json_error();\n }", "public static function checkSession() {\n\t\t// Set any API keys\n\t\t$api_keys = array();\n\t\t// Check API Key or Session Authentication\n\t\t$key = \"\";\n\t\tif (isset($_GET['key'])) {\n\t\t\t$key = $_GET['key'];\n\t\t}\n\t\tif (!isset($_SESSION['user']) && !in_array($key, $api_keys)) {\n\t\t\texit('{\"status\":\"error\",\"message\":\"Authentication Error\"}');\n\t\t}\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "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 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 function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\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 sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "function sess_check ()\n\t{\n\n\t\tglobal $xnyo_parent;\n\n\t\t// store the IP Address in the session varz\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Storing IP/Browser/Time.');\n\t\t$_SESSION['_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION['_browser'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$_SESSION['_last_activity'] = time();\n\n\t\t// if we're logged in, do auth stuff\n\t\tif (!empty($xnyo->user))\n\t\t{\n\t\t\t// there really isnt much to do in here\n\t\t\t// check that we havent expired\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session expiry.');\n\t\t\tif ($_SESSION['auth']['expiry'] !== 0)\n\t\t\t{\n\t\t\t\tif (time() > $_SESSION['auth']['expiry'])\n\t\t\t\t{\n\t\t\t\t\t$time = time() - $_SESSION['auth']['expiry'];\n\t\t\t\t\t$errmsg = \"Session time expired ($time seconds). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t\t$this->logout ('expired');\n\t\t\t\t} else {\n\t\t\t\t\t// update session times\n\t\t\t\t\t$_SESSION['auth'][\"expiry\"] = time() + $xnyo_parent->session_lifetime;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check their subnet is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session subnet.');\n\t\t\tif ($_SESSION['auth']['subnet'] != $this->subnet())\n\t\t\t{\n\t\t\t\t$errmsg = \"Session moved subnet (\" . $_SESSION['auth']['subnet'] . \" => \" . $this->subnet() . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('moved_subnet');\n\t\t\t}\n\t\n\t\t\t// check browser is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session Browser.');\n\t\t\tif ($_SESSION['auth']['browser'] != $_SERVER['HTTP_USER_AGENT'])\n\t\t\t{\n\t\t\t\t$errmsg = \"User changed browsers (\" . $_SESSION['auth']['browser'] . \" => \" . $_SERVER['HTTP_USER_AGENT'] . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('changed_browser');\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t// access checking is the only thing left i guess\n\t\t// if theres no access level specified, just let them through\n\t\tif (!empty($xnyo_parent->access) && !$this->check($xnyo_parent->access) && !$this->set_acl($xnyo_parent->access))\n\t\t\treturn false;\n\n\t\t// we're all done i guess\n\t\treturn true;\n\t}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "protected function checkSessionToken() {}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public function session_check(){\n\n\tif(!isset($_SESSION[\"user-type\"]) && $_SESSION[\"user-type\"] != \"user\"){\n\t\tredirect(\"Login\");\n\t} \n}", "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\n }", "public function checkSessionStatus(){\t\t\n\t\tif(isset($_SESSION[self::$session])){\n\t\t\treturn $_SESSION[self::$session];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "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 }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "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}", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\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}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected function checkSessionLifetime() {}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "static function check()\n\t{\n\t\t$session = App::get('session');\n\t\treturn $session->get('auth');\n\t}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function checkUsersSession(){\n\t}", "function id_in_session()\n{\n return isset($_SESSION['username']) && isset($_SESSION['loggedin']);\n}", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\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 _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function auth_session_exists() {\n\n // there's an existing session, nothing to do\n if (array_key_exists('user_name', $_SESSION)) {\n return TRUE;\n }\n\n // There's not an existing session, but the user has an auth_key\n // cookie, so see if it matches the database.\n // If it does, create a new session\n if (array_key_exists('auth_userid', $_COOKIE) && array_key_exists('auth_key', $_COOKIE)) {\n require_once '../database/mysql.inc.php';\n $conn = conn();\n\n $auth_userid = $_COOKIE['auth_userid'];\n $auth_key = $_COOKIE['auth_key'];\n $sql = 'SELECT p.name_ingame as name_ingame ' .\n 'FROM player_auth as a, player as p ' .\n 'WHERE a.player_id = :id AND a.auth_key = :auth_key AND a.player_id = p.id';\n $query = $conn->prepare($sql);\n $query->execute(array(':id' => $auth_userid,\n ':auth_key' => $auth_key));\n $resultArray = $query->fetchAll();\n if (count($resultArray) == 1) {\n $name_ingame = $resultArray[0]['name_ingame'];\n session_regenerate_id(TRUE);\n $_SESSION['user_id'] = $auth_userid;\n $_SESSION['user_name'] = $name_ingame;\n $_SESSION['user_lastactive'] = time();\n return TRUE;\n }\n }\n\n // neither session nor cookie lookup worked, so the user is not logged in\n return FALSE;\n}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\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 }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\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 }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\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 function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}" ]
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.69460523", "0.69320947", "0.6906824", "0.6904842", "0.69004583", "0.68975925", "0.68685424", "0.6848523", "0.6844706", "0.6842497", "0.68407005", "0.68338877", "0.6809911", "0.6807682", "0.68048835", "0.6795858", "0.6795753", "0.6790786", "0.67827266", "0.6781565", "0.6776217", "0.67662364", "0.6762543", "0.67525536", "0.67525303", "0.675126", "0.6741708", "0.6723873", "0.6718459", "0.6718133", "0.67175967", "0.67175967", "0.67163414", "0.6715241", "0.67149955", "0.6701401", "0.66959953", "0.6677578", "0.66633356", "0.6658625", "0.6653751", "0.6648311", "0.6635521", "0.663372", "0.6631203", "0.6616926", "0.66162115", "0.66072696", "0.6599716", "0.65856075", "0.65696895", "0.6568369", "0.65658766", "0.6557916", "0.6554719", "0.6548292", "0.65378124", "0.653712", "0.65335554", "0.6526306", "0.65212154", "0.65183794", "0.651378", "0.65086836", "0.6504965", "0.650051", "0.6497977", "0.649534", "0.6494901", "0.64876956", "0.6485331", "0.6483739", "0.6472518", "0.64655817", "0.6464438", "0.64629364", "0.646088", "0.64607173", "0.64595693", "0.6455302", "0.64550734" ]
0.0
-1
check for session and cookie presence
public function tags_list() { $this->admin_header(); //fetch the total number of categories $config['total_num_tag'] = $this->Admin_model->fetch_all_rows('tags'); //fetch the total number of tags //$data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags'); //$config['total_rows'] = $this->Admin_model->fetch_all_rows('food'); $config['base_url'] = site_url("Admin/tags_list/"); $config['per_page'] = 50; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_tag'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['tags'] = $this->Admin_model->fetch_tags($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_tag'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_tag']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $this->add_tag_template('tags_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasSession() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "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}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "public function checkSession()\n {\n if(isset($_COOKIE['id'])){\n $cookieOrSessionID = $_COOKIE['id'];\n }\n elseif(isset($_SESSION['id'])){\n $cookieOrSessionID = $_SESSION['id'];\n }\n return $cookieOrSessionID;\n }", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function is_cookie_set()\n {\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isCookieSet() {}", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\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 static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function user_check_session_id() {\n if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success();\n else wp_send_json_error();\n }", "public static function checkSession() {\n\t\t// Set any API keys\n\t\t$api_keys = array();\n\t\t// Check API Key or Session Authentication\n\t\t$key = \"\";\n\t\tif (isset($_GET['key'])) {\n\t\t\t$key = $_GET['key'];\n\t\t}\n\t\tif (!isset($_SESSION['user']) && !in_array($key, $api_keys)) {\n\t\t\texit('{\"status\":\"error\",\"message\":\"Authentication Error\"}');\n\t\t}\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "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 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 function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\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 sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "function sess_check ()\n\t{\n\n\t\tglobal $xnyo_parent;\n\n\t\t// store the IP Address in the session varz\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Storing IP/Browser/Time.');\n\t\t$_SESSION['_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION['_browser'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$_SESSION['_last_activity'] = time();\n\n\t\t// if we're logged in, do auth stuff\n\t\tif (!empty($xnyo->user))\n\t\t{\n\t\t\t// there really isnt much to do in here\n\t\t\t// check that we havent expired\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session expiry.');\n\t\t\tif ($_SESSION['auth']['expiry'] !== 0)\n\t\t\t{\n\t\t\t\tif (time() > $_SESSION['auth']['expiry'])\n\t\t\t\t{\n\t\t\t\t\t$time = time() - $_SESSION['auth']['expiry'];\n\t\t\t\t\t$errmsg = \"Session time expired ($time seconds). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t\t$this->logout ('expired');\n\t\t\t\t} else {\n\t\t\t\t\t// update session times\n\t\t\t\t\t$_SESSION['auth'][\"expiry\"] = time() + $xnyo_parent->session_lifetime;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check their subnet is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session subnet.');\n\t\t\tif ($_SESSION['auth']['subnet'] != $this->subnet())\n\t\t\t{\n\t\t\t\t$errmsg = \"Session moved subnet (\" . $_SESSION['auth']['subnet'] . \" => \" . $this->subnet() . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('moved_subnet');\n\t\t\t}\n\t\n\t\t\t// check browser is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session Browser.');\n\t\t\tif ($_SESSION['auth']['browser'] != $_SERVER['HTTP_USER_AGENT'])\n\t\t\t{\n\t\t\t\t$errmsg = \"User changed browsers (\" . $_SESSION['auth']['browser'] . \" => \" . $_SERVER['HTTP_USER_AGENT'] . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('changed_browser');\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t// access checking is the only thing left i guess\n\t\t// if theres no access level specified, just let them through\n\t\tif (!empty($xnyo_parent->access) && !$this->check($xnyo_parent->access) && !$this->set_acl($xnyo_parent->access))\n\t\t\treturn false;\n\n\t\t// we're all done i guess\n\t\treturn true;\n\t}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "protected function checkSessionToken() {}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public function session_check(){\n\n\tif(!isset($_SESSION[\"user-type\"]) && $_SESSION[\"user-type\"] != \"user\"){\n\t\tredirect(\"Login\");\n\t} \n}", "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\n }", "public function checkSessionStatus(){\t\t\n\t\tif(isset($_SESSION[self::$session])){\n\t\t\treturn $_SESSION[self::$session];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "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 }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "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}", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\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}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected function checkSessionLifetime() {}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "static function check()\n\t{\n\t\t$session = App::get('session');\n\t\treturn $session->get('auth');\n\t}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function checkUsersSession(){\n\t}", "function id_in_session()\n{\n return isset($_SESSION['username']) && isset($_SESSION['loggedin']);\n}", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\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 _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function auth_session_exists() {\n\n // there's an existing session, nothing to do\n if (array_key_exists('user_name', $_SESSION)) {\n return TRUE;\n }\n\n // There's not an existing session, but the user has an auth_key\n // cookie, so see if it matches the database.\n // If it does, create a new session\n if (array_key_exists('auth_userid', $_COOKIE) && array_key_exists('auth_key', $_COOKIE)) {\n require_once '../database/mysql.inc.php';\n $conn = conn();\n\n $auth_userid = $_COOKIE['auth_userid'];\n $auth_key = $_COOKIE['auth_key'];\n $sql = 'SELECT p.name_ingame as name_ingame ' .\n 'FROM player_auth as a, player as p ' .\n 'WHERE a.player_id = :id AND a.auth_key = :auth_key AND a.player_id = p.id';\n $query = $conn->prepare($sql);\n $query->execute(array(':id' => $auth_userid,\n ':auth_key' => $auth_key));\n $resultArray = $query->fetchAll();\n if (count($resultArray) == 1) {\n $name_ingame = $resultArray[0]['name_ingame'];\n session_regenerate_id(TRUE);\n $_SESSION['user_id'] = $auth_userid;\n $_SESSION['user_name'] = $name_ingame;\n $_SESSION['user_lastactive'] = time();\n return TRUE;\n }\n }\n\n // neither session nor cookie lookup worked, so the user is not logged in\n return FALSE;\n}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\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 }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\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 }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\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 function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}" ]
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.69460523", "0.69320947", "0.6906824", "0.6904842", "0.69004583", "0.68975925", "0.68685424", "0.6848523", "0.6844706", "0.6842497", "0.68407005", "0.68338877", "0.6809911", "0.6807682", "0.68048835", "0.6795858", "0.6795753", "0.6790786", "0.67827266", "0.6781565", "0.6776217", "0.67662364", "0.6762543", "0.67525536", "0.67525303", "0.675126", "0.6741708", "0.6723873", "0.6718459", "0.6718133", "0.67175967", "0.67175967", "0.67163414", "0.6715241", "0.67149955", "0.6701401", "0.66959953", "0.6677578", "0.66633356", "0.6658625", "0.6653751", "0.6648311", "0.6635521", "0.663372", "0.6631203", "0.6616926", "0.66162115", "0.66072696", "0.6599716", "0.65856075", "0.65696895", "0.6568369", "0.65658766", "0.6557916", "0.6554719", "0.6548292", "0.65378124", "0.653712", "0.65335554", "0.6526306", "0.65212154", "0.65183794", "0.651378", "0.65086836", "0.6504965", "0.650051", "0.6497977", "0.649534", "0.6494901", "0.64876956", "0.6485331", "0.6483739", "0.6472518", "0.64655817", "0.6464438", "0.64629364", "0.646088", "0.64607173", "0.64595693", "0.6455302", "0.64550734" ]
0.0
-1
get the total new orders
public function add_tag_template($filename, $data = array()) { //$data["there_is_new_order"] = $this->Admin_model->return_total_rows('order', 'status', 'open'); $this->admin_header(); $data['header'] = $this->load->view('templates/admin_header', $data, TRUE); $data['footer'] = $this->load->view('templates/admin_footer', '', TRUE); $this->load->view('admins/'.$filename, $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotal()\n {\n return $this->service()->getTotalOfOrder();\n }", "protected function getTotalOrders()\n {\n\n if (auth()->user()) {\n $userId = auth()->user()->id;\n return \\Cart::session($userId)->getTotal();\n }\n return \\Cart::getTotal();\n }", "public function getTotalOrdersAmRcv()\n\t{\n $log=new Log(\"AM_RCV_TOTAL:\".date('Y-m-d').\".log\");\n $log->write(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = '1' and order_status = \" . 2);\n $query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = '1' and order_status = \" . 2);\n $results = $query->row;\n return $results['total_orders'];\n\t}", "public function getTotalOrdersAm()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = \" . 1);\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "public function getTotalOrdersWs()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = \" . 1);\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "private function get_num_total_orders()\n\t{\n\t\treturn wp_count_posts('order_paysera')->publish;\n\t}", "public function getCurrentMonthTotalOrder() : int;", "public function getTotalOrdersMo()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(oc_po_product.id) as total_orders FROM oc_po_order \nLEFT JOIN oc_po_product \nON(oc_po_order.id = oc_po_product.order_id)\nWHERE oc_po_order.user_id='103' AND oc_po_product.item_status <> 0\");\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "public function getOrdertotal()\n {\n return $this->ordertotal;\n }", "public function getMinOrderTotal();", "public function modelTotal(){\n\t\t\t//---\n\t\t\t$conn = Connection::getInstance();\n\t\t\t$query = $conn->query(\"select id from orders\");\n\t\t\t//lay tong so ban ghi\n\t\t\treturn $query->rowCount();\n\t\t\t//---\n\t\t}", "function btce_get_active_order_total($key, $secret) {\n $orders = btce_active_orders($key, $secret);\n $_total = 0;\n foreach ($orders->return as $order) {\n if ($order->type == 'sell') {\n $_total += $order->amount;\n }\n }\n return $_total;\n}", "public static function getTotalValueOfOrder()\n {\n \ttry\n \t{\n\t \t$storage = My_Zend_Globals::getStorage();\n\t \n\t \t$table = self::_TABLE_PRODUCT_ORDER_DETAIL;\n\t \n\t \t//Query data from database\n\t \t$select = $storage->select()\n\t\t\t\t\t \t->from($table,'sum(amount_total)')\n\t\t\t\t\t \t->where('order_status = ?', 2);\n\t \t \n\t \t$total = $storage->fetchCol($select);\n\t \t \n\t \t$total = intval($total['total']);\n\t \t\n\t \treturn $total;\n \t}\n \tcatch(Exception $e)\n \t{\n \t\treturn false;\n \t}\t \t\n }", "public function getOrdersCount() {\n\t\t$summary = $this->getMarketSummary();\n\n\t\treturn [ 'BUY' => $summary['OpenBuyOrders'], 'SELL' => $summary['OpenSellOrders'] ];\n\n\t}", "public function get_orders_total() : array {\n\t\t$element = $this->dom->find( '#j-order-num' );\n\t\tif ( ! $element ) {\n\t\t\treturn [\n\t\t\t\t'orders_total' => 0,\n\t\t\t];\n\t\t}\n\n\t\t$value = explode( ' ', $element[0]->text() );\n\t\tif ( ! $value || empty( $value[0] ) ) {\n\t\t\treturn [\n\t\t\t\t'orders_total' => 0,\n\t\t\t];\n\t\t}\n\n\t\treturn [\n\t\t\t'orders_total' => intval( $value[0] ),\n\t\t];\n\t}", "public function getOrdersCount() {\n return $this->getTable()->getOrdersCount();\n }", "public function getOrderCount()\n {\n return $this->count(self::order);\n }", "public function getTotalQtyOrdered();", "public function getUserOrderCounts() {\n\n $this->load->model('account/order');\n $count = $this->model_account_order->getTotalOrders();\n\n return $count;\n }", "public function getTotal(){\n $total=0;\n\n foreach ( $this->getOrderLines() as $ol){\n $total += $ol->getSubTotal();\n }\n \n return $total;\n }", "function calculateOrderAmount(): int {\n // Calculate the order total on the server to prevent\n // customers from directly manipulating the amount on the client\n $oldCart=Session::get('cart');\n $cart = new Cart($oldCart);\n $total = $cart->totalPrice;\n return $total * 100;\n }", "function getReceived(){\n $total = 0;\n $all = $this->product->include_join_fields()->get()->all;\n foreach ($all as $product){\n \n $total+= $product->join_qty;\n \n }\n return $total;\n }", "public function getMaxOrderTotal();", "private function getOldTotal()\n {\n return $this->collection->items[$this->cart_hash]->total;\n }", "public function getNewShippingTotal()\r\n {\r\n $totalItem = 0;\r\n foreach ($this->_getQuote()->getAllVisibleItems() as $item) {\r\n $totalItem += $item->getQty();\r\n }\r\n return $totalItem;\r\n }", "public function getOrderTrackingCount()\n {\n return $this->count(self::order_tracking);\n }", "public function get_total()\n {\n }", "public static function getTotalValueOfOrderDashboard()\n {\n \ttry\n \t{\n\t \t$storage = My_Zend_Globals::getStorage();\n\t \n\t \t$table = self::_TABLE_PRODUCT_ORDER_DETAIL;\n\t \n\t \t//Query data from database\n\t \t$select = $storage->select()\n\t\t\t\t\t \t->from($table,'sum(amount_total)')\n\t\t\t\t\t \t->where('order_status = ?', 0);\n\t \t \n\t \t$total = $storage->fetchCol($select);\n\t \t \n\t \t$total = intval($total['total']);\n\t \t\n\t \treturn $total;\n \t}\n \tcatch(Exception $e)\n \t{\n \t\treturn false;\n \t}\t \t\n }", "protected function getOrderCount()\n {\n $customer = $this->customerSession->getCustomer();\n if($customer->getId())\n {\n $orders = $this->orderCollectionFactory->create()->addFieldToSelect(\n '*'\n )->addFieldToFilter(\n 'customer_id',\n $customer->getId()\n )->setOrder(\n 'created_at',\n 'desc'\n );\n return count($orders);\n }\n return 0;\n }", "public function ordersGetTotalPages() {\n\t\t##\thttps://docs.topspin.net/tiki-index.php?page=Order+API#View_Orders\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tThe number of total pages of Orders\n\t\t$url = 'http://app.topspin.net/api/v1/order';\n\t\t$data = json_decode($this->process($url,null,false));\n\t\tif(isset($data->total_pages)) { return $data->total_pages; }\n\t}", "function getOverallOrderRemain(){\n\t\t$t=0;\n\t\t$a = Order::all();\n\t\tforeach($a as $n){\n\t\t$dur= $n->qty;\n\t\t$sl =Order::where('payment', 'verified')->count();\n\t\t$r=intVal($sl);\n\t\t$t = $t + $r;\n\t\t}\n\t\treturn $t;\n\t\t}", "private function calculateOrderAmount()\n {\n if ($this->getOffer() instanceof Offer) {\n //recalculates the new amount\n $this->getOffer()->calculateInvoiceAmount();\n Shopware()->Models()->persist($this->getOffer());\n }\n }", "function getGstByOrder($orders_id) {\n\t\t$sel_ord_query = tep_db_query(\"SELECT value FROM \" . TABLE_ORDERS_TOTAL . \" WHERE orders_id = '\".$orders_id.\"' AND class = 'ot_gst_total'\");\n\t\t$gsttot = 0;\n\t\twhile($rst_arr = tep_db_fetch_array($sel_ord_query)) {\n\t\t\t$gsttot += $rst_arr[\"value\"];\n\t\t}\n\t\treturn $gsttot;\n\t}", "function total_other_transactions_amount(){\n $today_other_rec_q = mysql_query(\"SELECT COUNT(order_id) AS TOTAL_OTHER_ORDERS,SUM(amount) AS TOTAL_AMOUNT FROM orders WHERE (card_payment_type = '6' OR card_payment_type = 'J') AND DATE_FORMAT(timestamp,'%Y-%m-%d') = CURDATE()\");\n $today_other_rec = mysql_fetch_assoc($today_other_rec_q);\n $total_other_transactions = $today_other_rec[\"TOTAL_OTHER_ORDERS\"];\n $total_other_transactions_amount = $today_other_rec[\"TOTAL_AMOUNT\"];\n return $total_other_transactions_amount;\n }", "protected function totalOrders($all = false) {\n if (!$all) {\n return $this->shipsList->where('status_id', 1)->count();\n }\n\n return $this->shipsList->count();\n }", "function getOverallOrderPrice(){\n\t\t$t=0;\n\t\t$a = Order::where('payment', 'verified')->get();\n\t\tforeach($a as $n){\n\t\t$dur= $n->qty;\n\t\t\n\t\t$r = intVal($n->qty)*intVal($n->price);\n\t\t$t = $t + $r;\n\t\t}\n\t\treturn $t;\n\t\t}", "public function get_total()\n\t{\n\t\t$query = $this->query;\n\t\tif(isset($query['order']))\n\t\t\t$query['order'] = $this->model->table() . '.id';\n\t\treturn $this->model->count($query);\n\t}", "public static function get_nb_orders(){\n $return = array();\n $sql = \"SELECT count(mo.id)\n FROM miki_person mp, miki_order mo\n WHERE mp.id = mo.id_person\";\n $result = mysql_query($sql);\n\n $row = mysql_fetch_array($result);\n return $row[0];\n }", "public function getTotalInvoiced();", "protected function getTotal()\n {\n $total = 0;\n foreach ($this->entries as $entry) {\n $total += $entry['price'] * $entry['quantity'];\n }\n\n return $total;\n }", "public function getOrders()\n {\n return $this->orders;\n }", "function get_order_total(){\n\t$cart = $_SESSION['custCart_ID']; // the SESSION and COOKIE customer cart items array\n\t$max=count($_SESSION[$cart]);\n\t$sum=0;\n\tfor($i=0;$i<$max;$i++){\n\t\t$pid=$_SESSION[$cart][$i]['bookid'];\n\t\t$q=$_SESSION[$cart][$i]['qty'];\n\t\t$price=get_price($pid);\n\t\t$sum+=$price*$q;\n\t}\n\treturn $sum;\n}", "public function getTotal();", "public function getTotal();", "public function getNumOfOrdersInBasket() {\n\n $basketUser = $this->getBasketUserFromAuth();\n\n $result = 0;\n if ($basketUser != null) {\n $basketDetailModel = new Application_Model_BasketDetail();\n\n\n $result = $basketDetailModel->getNumOfOrdersInBasket($basketUser);\n }\n\n return $result;\n }", "static public function get_shipping_line_total( $order ){\n\n \t\t$version = toret_check_wc_version();\n\n \tif( $version === false ){\n\n \t$total = $order->get_total_shipping(); \n \n \t}else{\n\n\t $shippings = $order->get_items( 'shipping' );\n\t\t\t\tforeach( $shippings as $shipping ){\n \t\t\t\t\t\n \t\t\t\t$total = $shipping->get_total();\n \t\t\t\t\t\n\t\t\t\t} \t\n\n \t}\n\n \treturn $total;\n\n \t}", "function getOrders() {\n\t\t$orders = Mage::getModel ( 'sales/order' )->getCollection ()->addAttributeToSelect ( \"*\" )->addAttributeToFilter ( 'status', array ('complete') );\n\t\t$orders_data = $this->preapreOrdersTosend ( $orders );\n\t\treturn $orders_data;\n\t}", "function getOrder()\n {\n return 20;\n }", "function getOrder()\n {\n return 20;\n }", "public function get_total_items(){\n\t \t$total = 0;\n\t \t//Si no esta vacio va sumando la cantidad de articulos\n\t \tif(!empty($this->cart)){\n\t \t\tforeach ($this->cart as $linea){\n\t\t\t\t\t$total += $linea['amount'];\n\t\t\t\t}\n\t \t}\n\t \techo $total;\n\t }", "public function getBaseTotalQtyOrdered();", "function getTotal()\n\t{\n\t\treturn $this->_total;\n\t}", "public function getOrder()\n {\n return 30;\n }", "public function all_ActiveOrdersCount_get() {\n $result = $this->feeds_model->all_ActiveOrdersCount();\n return $this->response($result);\n }", "function getShippingByOrder($orders_id) {\n\t\t$sel_ord_query = tep_db_query(\"SELECT value FROM \" . TABLE_ORDERS_TOTAL . \" WHERE orders_id = '\".$orders_id.\"' AND class = 'ot_shipping'\");\n\t\t$shiptot = 0;\n\t\twhile($rst_arr = tep_db_fetch_array($sel_ord_query)) {\n\t\t\t$shiptot += $rst_arr[\"value\"];\n\t\t}\n\t\treturn $shiptot;\n\t}", "public function total();", "public function total();", "public function total();", "public function getMontoTotal() {\n $command = Yii::app()->db->createCommand()\n ->select('sum(t.monto) as total')\n ->from('pago t');\n return $command->queryRow()['total'];\n }", "public function total()\n {\n \treturn $this->price()*$this->quantity;\n }", "public function addOrderItemsCount()\r\n {\r\n $itemTable = $this->_helper()->getSql()->getTable('sales_flat_order_item');\r\n if ($this->_helper()->checkSalesVersion('1.4.0.0')) {\r\n $this->getSelect()\r\n ->join(array('item' => $itemTable), \"(item.order_id = main_table.entity_id AND item.parent_item_id IS NULL)\",\r\n array(\r\n 'sum_qty' => 'SUM(item.qty_ordered)',\r\n 'sum_total' => 'SUM(item.base_row_total)',\r\n ))\r\n ->where(\"main_table.entity_id = item.order_id\");\r\n } else {\r\n $this->getSelect()\r\n ->join(array('item' => $itemTable), \"(item.order_id = e.entity_id AND item.parent_item_id IS NULL)\",\r\n array(\r\n 'sum_qty' => 'SUM(item.qty_ordered)',\r\n 'sum_total' => 'SUM(item.base_row_total)',\r\n ))\r\n ->where(\"e.entity_id = item.order_id\");\r\n }\r\n return $this;\r\n }", "public function totaliza_pedido()\r\n {\r\n\r\n $valor_desconto = 0;\r\n $valor_pedido = 0;\r\n $valor_ipi = 0;\r\n $valor_total = 0;\r\n $desconto = $this->mgt_pedido_cliente_desconto->Text;\r\n $frete = $this->mgt_pedido_valor_frete->Text;\r\n\r\n if($desconto < 0)\r\n {\r\n $desconto = 0;\r\n }\r\n\r\n if($frete < 0)\r\n {\r\n $frete = 0;\r\n }\r\n\r\n $this->mgt_pedido_valor_desconto->Text = '0.00';\r\n $this->mgt_pedido_valor_pedido->Text = '0.00';\r\n $this->mgt_pedido_valor_ipi->Text = '0.00';\r\n $this->mgt_pedido_valor_total->Text = '0.00';\r\n\r\n $Comando_SQL = \"select * from mgt_cotacoes_produtos where mgt_cotacao_produto_numero_cotacao = '\" . trim($this->mgt_pedido_numero->Text) . \"' order by mgt_cotacao_produto_numero\";\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Close();\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->SQL = $Comando_SQL;\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Open();\r\n\r\n if((GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->EOF) != 1)\r\n {\r\n while((GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->EOF) != 1)\r\n {\r\n $valor_ipi = $valor_ipi + GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Fields['mgt_cotacao_produto_valor_ipi'];\r\n $valor_pedido = $valor_pedido + GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Fields['mgt_cotacao_produto_valor_total'];\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Next();\r\n }\r\n }\r\n\r\n if($desconto > 0)\r\n {\r\n $valor_desconto = (($valor_pedido * $desconto) / 100);\r\n }\r\n else\r\n {\r\n $valor_desconto = 0;\r\n }\r\n\r\n $valor_total = ((($valor_pedido + $valor_ipi) + $frete) - $valor_desconto);\r\n\r\n $this->mgt_pedido_valor_desconto->Text = number_format($valor_desconto, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_pedido->Text = number_format($valor_pedido, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_ipi->Text = number_format($valor_ipi, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_total->Text = number_format($valor_total, \"2\", \".\", \"\");\r\n }", "function totals()\n\t{\n\t\treturn $this->_tour_voucher_contents['totals'];\n\t}", "public function todaysSalesTotal()\n {\n \n //get todays Date\n $fromDate = Mage::helper('magemobapp')->getTodaysDate();\n \n $storeId = Mage::getModel('magemobapp/storeinfo')->getStoreId();\n \n $collection = Mage::getResourceModel('sales/order_collection')->addAttributeToFilter('created_at', array(\n 'from' => $fromDate\n ));\n \n if ($storeId != 0) {\n $collection->addAttributeToFilter('store_id', $storeId); //fill store\n }\n //$collection;\n \n $collection->addAttributeToSelect('base_grand_total')->addAttributeToSelect('base_total_refunded')->addAttributeToSelect('base_total_paid');\n\n \n $data = $collection->getData();\n $total = 0;\n foreach ($data as $eachData) {\n if (isset($eachData['status']) && $eachData['status'] == 'complete') {\n if ($eachData['base_total_refunded'] == '') {\n $total += (float) $eachData['base_total_paid'];\n } else {\n $total += (float) $eachData['base_total_paid'] - (float) $eachData['base_total_refunded'];\n }\n } else {\n $total += (float) $eachData['base_grand_total'];\n }\n }\n return Mage::helper('core')->currency($total, true, false);\n }", "public function countOrder(): int;", "public function getTotal(){\n\t\treturn $this->_total;\n\t}", "public function totalRecount()\n {\n $products = $this->products;\n $newTotal = 0;\n foreach ($products as $product) {\n if ($product->removed) {\n continue;\n }\n $newTotal += $product->count * $product->price;\n }\n $this->total = $newTotal;\n $this->save();\n }", "public function get_total()\n\t{\n\t\treturn $this->EE->cartthrob->cart->total();\n\t}", "public function getOrders() \n {\n return $this->_fields['Orders']['FieldValue'];\n }", "public function getOrder()\n {\n return 20;\n }", "public function getOrder()\n {\n return 20;\n }", "public function getTotal()\n {\n return $this->getQty() * $this->getProduct()->getPrice();\n }", "public function gettotal()\r\n {\r\n return $this->total;\r\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getOrder(): int\n {\n return 6;\n }", "function getOrder()\n{\n\n}", "public function totalBillOS()\n {\n return $this->bills->sum('outstanding');\n }", "public function getTotalAmount();", "public static function getOrderedProductsQuantity(): string\n {\n $query = new Query();\n $total = $query->select([\n 'COUNT(*) as total'\n ])\n ->from(['sale_items'])\n ->where([\n 'customer_auth_id' => Yii::$app->user->identity->id,\n 'sale_id' => 0\n ])\n ->scalar();\n\n return $total;\n }", "public function count() {\n\t\treturn $this->field('Cart.order_item_count', $this->cartConditions());\n\t}", "public function getCartTotal()\n {\n }", "public function total(){\n\t\treturn $this->total;\n\t}", "public function qtdTotalChamadosAbertosCustomer() {\n $tickets = Yii::app()->dbFRAPORT->createCommand()\n ->select(\"COUNT(t.id) as qtd \")\n ->from(\"ticket AS t \")\n ->join(\"ticket_history AS th\", \"t.id = th.ticket_id \")\n ->where(\"t.create_time BETWEEN :dtIni and :dtFim AND history_type_id = 1 AND th.queue_id = 1 AND (th.state_id = 1 OR th.state_id = 4) \"\n , array(':dtIni' => FksFormatter::StrToDate($this->dtInicio),\n ':dtFim' => FksFormatter::StrToDate($this->dtTermino),\n ))\n ->queryAll();\n return $tickets[0]['qtd'];\n }", "public function testTotalAmountCalculation(): void\n {\n $order = new Order('consumerIdTest123', '845126849', new \\DateTimeImmutable('midnight'), 'OrderNumber123', 7);\n $order->addOrderLine('productIdTest1', 2, 4.9);\n $order->addOrderLine('productIdTest2', 3, 10.5);\n\n static::assertEquals(41.3, $order->getAmount());\n }", "public function getOrder()\n {\n return 15;\n }", "public function getOrderIdCount()\n {\n return $this->count(self::order_id);\n }", "public function getTotal() {\n return $this->get(self::TOTAL);\n }", "public function calculateOrderTotal($items)\n {\n $total = 0;\n foreach ($items as $key => $item) {\n $total += $item['quoted_price'];\n }\n return $total;\n }", "private function getOrderNumber()\n {\n $number = Shopware()->Db()->fetchOne(\"/*NO LIMIT*/ SELECT number FROM s_order_number WHERE name='invoice' FOR UPDATE\");\n Shopware()->Db()->executeUpdate(\"UPDATE s_order_number SET number = number + 1 WHERE name='invoice'\");\n $number += 1;\n\n return $number;\n }", "protected function get_totalPedidos()\n {\n $pedidos = DB::SELECT(\"SELECT COUNT(*) AS t_pedidos \n FROM pedidos \n WHERE extract(month FROM current_date) = extract(month FROM created_at);\");\n foreach($pedidos as $pedido)\n {\n $pedid_mes = $pedido->t_pedidos; \n }\n return $pedid_mes;\n }", "public function get_order() {\n return 500;\n }", "public function getOrderBaseGrandTotal(){\n return $this->_getData(self::ORDER_BASE_GRAND_TOTAL);\n }", "function carton_processing_order_count() {\n\tif ( false === ( $order_count = get_transient( 'carton_processing_order_count' ) ) ) {\n\t\t$order_statuses = get_terms( 'shop_order_status' );\n\t $order_count = false;\n\t foreach ( $order_statuses as $status ) {\n\t if( $status->slug === 'processing' ) {\n\t $order_count += $status->count;\n\t break;\n\t }\n\t }\n\t $order_count = apply_filters( 'carton_admin_menu_count', intval( $order_count ) );\n\t\tset_transient( 'carton_processing_order_count', $order_count );\n\t}\n\n\treturn $order_count;\n}", "public function total()\n {\n return $this->total;\n }", "public function total()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->getAmount() * $this->getPrice();\n }" ]
[ "0.7546358", "0.7452311", "0.7319344", "0.7303506", "0.7273696", "0.7237501", "0.7034528", "0.70185477", "0.6907238", "0.67148966", "0.6694225", "0.6673422", "0.66723335", "0.66720164", "0.65973926", "0.6596917", "0.6544206", "0.6532083", "0.64902276", "0.6473195", "0.6461081", "0.6444382", "0.6409007", "0.637883", "0.6371815", "0.6343967", "0.6337383", "0.63159156", "0.6278578", "0.62727594", "0.6270796", "0.62212384", "0.6218344", "0.62148684", "0.62069714", "0.61890334", "0.618674", "0.61713696", "0.6165007", "0.61607665", "0.61452824", "0.6142556", "0.6129926", "0.6129926", "0.6125867", "0.61060774", "0.6103088", "0.61009693", "0.61009693", "0.6079869", "0.6078221", "0.60754114", "0.60751474", "0.60524064", "0.60469896", "0.60468936", "0.60468936", "0.60468936", "0.60282546", "0.6028209", "0.60219425", "0.6017302", "0.60167056", "0.60166335", "0.6015895", "0.6001995", "0.5992404", "0.5992268", "0.5991658", "0.5979733", "0.5979733", "0.5978016", "0.5967966", "0.59655046", "0.59655046", "0.59655046", "0.59655046", "0.59655046", "0.59655046", "0.59647745", "0.5964583", "0.5962297", "0.59474725", "0.5945393", "0.5941366", "0.5935174", "0.59329545", "0.59319603", "0.593122", "0.5931159", "0.59274536", "0.5925987", "0.59233254", "0.5918784", "0.5914495", "0.59035033", "0.58857334", "0.58835447", "0.58810735", "0.58810735", "0.58762157" ]
0.0
-1
check for session and cookie presence
public function blog_list() { $this->admin_header(); //fetch the total number of categories $config['total_num_blog'] = $this->Admin_model->fetch_all_rows('blog'); //fetch the total number of tags $data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags'); //$config['total_rows'] = $this->Admin_model->fetch_all_rows('food'); $config['base_url'] = site_url("Admin/blog_list/"); $config['per_page'] = 50; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_blog'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['blogs'] = $this->Admin_model->fetch_blog($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_blog'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_blog']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $this->create_blog_template('blog_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasSession() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "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}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "public function checkSession()\n {\n if(isset($_COOKIE['id'])){\n $cookieOrSessionID = $_COOKIE['id'];\n }\n elseif(isset($_SESSION['id'])){\n $cookieOrSessionID = $_SESSION['id'];\n }\n return $cookieOrSessionID;\n }", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function is_cookie_set()\n {\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isCookieSet() {}", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\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 static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function user_check_session_id() {\n if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success();\n else wp_send_json_error();\n }", "public static function checkSession() {\n\t\t// Set any API keys\n\t\t$api_keys = array();\n\t\t// Check API Key or Session Authentication\n\t\t$key = \"\";\n\t\tif (isset($_GET['key'])) {\n\t\t\t$key = $_GET['key'];\n\t\t}\n\t\tif (!isset($_SESSION['user']) && !in_array($key, $api_keys)) {\n\t\t\texit('{\"status\":\"error\",\"message\":\"Authentication Error\"}');\n\t\t}\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "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 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 function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\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 sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "function sess_check ()\n\t{\n\n\t\tglobal $xnyo_parent;\n\n\t\t// store the IP Address in the session varz\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Storing IP/Browser/Time.');\n\t\t$_SESSION['_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION['_browser'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$_SESSION['_last_activity'] = time();\n\n\t\t// if we're logged in, do auth stuff\n\t\tif (!empty($xnyo->user))\n\t\t{\n\t\t\t// there really isnt much to do in here\n\t\t\t// check that we havent expired\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session expiry.');\n\t\t\tif ($_SESSION['auth']['expiry'] !== 0)\n\t\t\t{\n\t\t\t\tif (time() > $_SESSION['auth']['expiry'])\n\t\t\t\t{\n\t\t\t\t\t$time = time() - $_SESSION['auth']['expiry'];\n\t\t\t\t\t$errmsg = \"Session time expired ($time seconds). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t\t$this->logout ('expired');\n\t\t\t\t} else {\n\t\t\t\t\t// update session times\n\t\t\t\t\t$_SESSION['auth'][\"expiry\"] = time() + $xnyo_parent->session_lifetime;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check their subnet is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session subnet.');\n\t\t\tif ($_SESSION['auth']['subnet'] != $this->subnet())\n\t\t\t{\n\t\t\t\t$errmsg = \"Session moved subnet (\" . $_SESSION['auth']['subnet'] . \" => \" . $this->subnet() . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('moved_subnet');\n\t\t\t}\n\t\n\t\t\t// check browser is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session Browser.');\n\t\t\tif ($_SESSION['auth']['browser'] != $_SERVER['HTTP_USER_AGENT'])\n\t\t\t{\n\t\t\t\t$errmsg = \"User changed browsers (\" . $_SESSION['auth']['browser'] . \" => \" . $_SERVER['HTTP_USER_AGENT'] . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('changed_browser');\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t// access checking is the only thing left i guess\n\t\t// if theres no access level specified, just let them through\n\t\tif (!empty($xnyo_parent->access) && !$this->check($xnyo_parent->access) && !$this->set_acl($xnyo_parent->access))\n\t\t\treturn false;\n\n\t\t// we're all done i guess\n\t\treturn true;\n\t}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "protected function checkSessionToken() {}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public function session_check(){\n\n\tif(!isset($_SESSION[\"user-type\"]) && $_SESSION[\"user-type\"] != \"user\"){\n\t\tredirect(\"Login\");\n\t} \n}", "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\n }", "public function checkSessionStatus(){\t\t\n\t\tif(isset($_SESSION[self::$session])){\n\t\t\treturn $_SESSION[self::$session];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "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 }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "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}", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\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}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected function checkSessionLifetime() {}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "static function check()\n\t{\n\t\t$session = App::get('session');\n\t\treturn $session->get('auth');\n\t}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function checkUsersSession(){\n\t}", "function id_in_session()\n{\n return isset($_SESSION['username']) && isset($_SESSION['loggedin']);\n}", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\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 _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function auth_session_exists() {\n\n // there's an existing session, nothing to do\n if (array_key_exists('user_name', $_SESSION)) {\n return TRUE;\n }\n\n // There's not an existing session, but the user has an auth_key\n // cookie, so see if it matches the database.\n // If it does, create a new session\n if (array_key_exists('auth_userid', $_COOKIE) && array_key_exists('auth_key', $_COOKIE)) {\n require_once '../database/mysql.inc.php';\n $conn = conn();\n\n $auth_userid = $_COOKIE['auth_userid'];\n $auth_key = $_COOKIE['auth_key'];\n $sql = 'SELECT p.name_ingame as name_ingame ' .\n 'FROM player_auth as a, player as p ' .\n 'WHERE a.player_id = :id AND a.auth_key = :auth_key AND a.player_id = p.id';\n $query = $conn->prepare($sql);\n $query->execute(array(':id' => $auth_userid,\n ':auth_key' => $auth_key));\n $resultArray = $query->fetchAll();\n if (count($resultArray) == 1) {\n $name_ingame = $resultArray[0]['name_ingame'];\n session_regenerate_id(TRUE);\n $_SESSION['user_id'] = $auth_userid;\n $_SESSION['user_name'] = $name_ingame;\n $_SESSION['user_lastactive'] = time();\n return TRUE;\n }\n }\n\n // neither session nor cookie lookup worked, so the user is not logged in\n return FALSE;\n}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\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 }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\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 }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\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 function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}" ]
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.69460523", "0.69320947", "0.6906824", "0.6904842", "0.69004583", "0.68975925", "0.68685424", "0.6848523", "0.6844706", "0.6842497", "0.68407005", "0.68338877", "0.6809911", "0.6807682", "0.68048835", "0.6795858", "0.6795753", "0.6790786", "0.67827266", "0.6781565", "0.6776217", "0.67662364", "0.6762543", "0.67525536", "0.67525303", "0.675126", "0.6741708", "0.6723873", "0.6718459", "0.6718133", "0.67175967", "0.67175967", "0.67163414", "0.6715241", "0.67149955", "0.6701401", "0.66959953", "0.6677578", "0.66633356", "0.6658625", "0.6653751", "0.6648311", "0.6635521", "0.663372", "0.6631203", "0.6616926", "0.66162115", "0.66072696", "0.6599716", "0.65856075", "0.65696895", "0.6568369", "0.65658766", "0.6557916", "0.6554719", "0.6548292", "0.65378124", "0.653712", "0.65335554", "0.6526306", "0.65212154", "0.65183794", "0.651378", "0.65086836", "0.6504965", "0.650051", "0.6497977", "0.649534", "0.6494901", "0.64876956", "0.6485331", "0.6483739", "0.6472518", "0.64655817", "0.6464438", "0.64629364", "0.646088", "0.64607173", "0.64595693", "0.6455302", "0.64550734" ]
0.0
-1
check for session and cookie presence
public function edit_blog_segment($blog_id, $data = array()) { $this->admin_header(); //get all the tags attached this blog from the blogs_and tags_table $data['tag_ids'] = $this->Admin_model->fetch_tags_tied_to_blog($blog_id); $result = $this->Admin_model->fetch_blog_details($blog_id); if ($result !== FALSE) { $data['blog'] = $result; $this->create_blog_template('edit_blog', $data); }else { redirect('Admin/blog_list'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasSession() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "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}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "public function checkSession()\n {\n if(isset($_COOKIE['id'])){\n $cookieOrSessionID = $_COOKIE['id'];\n }\n elseif(isset($_SESSION['id'])){\n $cookieOrSessionID = $_SESSION['id'];\n }\n return $cookieOrSessionID;\n }", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function is_cookie_set()\n {\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isCookieSet() {}", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\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 static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function user_check_session_id() {\n if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success();\n else wp_send_json_error();\n }", "public static function checkSession() {\n\t\t// Set any API keys\n\t\t$api_keys = array();\n\t\t// Check API Key or Session Authentication\n\t\t$key = \"\";\n\t\tif (isset($_GET['key'])) {\n\t\t\t$key = $_GET['key'];\n\t\t}\n\t\tif (!isset($_SESSION['user']) && !in_array($key, $api_keys)) {\n\t\t\texit('{\"status\":\"error\",\"message\":\"Authentication Error\"}');\n\t\t}\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "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 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 function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\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 sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "function sess_check ()\n\t{\n\n\t\tglobal $xnyo_parent;\n\n\t\t// store the IP Address in the session varz\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Storing IP/Browser/Time.');\n\t\t$_SESSION['_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION['_browser'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$_SESSION['_last_activity'] = time();\n\n\t\t// if we're logged in, do auth stuff\n\t\tif (!empty($xnyo->user))\n\t\t{\n\t\t\t// there really isnt much to do in here\n\t\t\t// check that we havent expired\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session expiry.');\n\t\t\tif ($_SESSION['auth']['expiry'] !== 0)\n\t\t\t{\n\t\t\t\tif (time() > $_SESSION['auth']['expiry'])\n\t\t\t\t{\n\t\t\t\t\t$time = time() - $_SESSION['auth']['expiry'];\n\t\t\t\t\t$errmsg = \"Session time expired ($time seconds). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t\t$this->logout ('expired');\n\t\t\t\t} else {\n\t\t\t\t\t// update session times\n\t\t\t\t\t$_SESSION['auth'][\"expiry\"] = time() + $xnyo_parent->session_lifetime;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check their subnet is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session subnet.');\n\t\t\tif ($_SESSION['auth']['subnet'] != $this->subnet())\n\t\t\t{\n\t\t\t\t$errmsg = \"Session moved subnet (\" . $_SESSION['auth']['subnet'] . \" => \" . $this->subnet() . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('moved_subnet');\n\t\t\t}\n\t\n\t\t\t// check browser is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session Browser.');\n\t\t\tif ($_SESSION['auth']['browser'] != $_SERVER['HTTP_USER_AGENT'])\n\t\t\t{\n\t\t\t\t$errmsg = \"User changed browsers (\" . $_SESSION['auth']['browser'] . \" => \" . $_SERVER['HTTP_USER_AGENT'] . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('changed_browser');\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t// access checking is the only thing left i guess\n\t\t// if theres no access level specified, just let them through\n\t\tif (!empty($xnyo_parent->access) && !$this->check($xnyo_parent->access) && !$this->set_acl($xnyo_parent->access))\n\t\t\treturn false;\n\n\t\t// we're all done i guess\n\t\treturn true;\n\t}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "protected function checkSessionToken() {}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public function session_check(){\n\n\tif(!isset($_SESSION[\"user-type\"]) && $_SESSION[\"user-type\"] != \"user\"){\n\t\tredirect(\"Login\");\n\t} \n}", "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\n }", "public function checkSessionStatus(){\t\t\n\t\tif(isset($_SESSION[self::$session])){\n\t\t\treturn $_SESSION[self::$session];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "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 }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "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}", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\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}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected function checkSessionLifetime() {}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "static function check()\n\t{\n\t\t$session = App::get('session');\n\t\treturn $session->get('auth');\n\t}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function checkUsersSession(){\n\t}", "function id_in_session()\n{\n return isset($_SESSION['username']) && isset($_SESSION['loggedin']);\n}", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\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 _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function auth_session_exists() {\n\n // there's an existing session, nothing to do\n if (array_key_exists('user_name', $_SESSION)) {\n return TRUE;\n }\n\n // There's not an existing session, but the user has an auth_key\n // cookie, so see if it matches the database.\n // If it does, create a new session\n if (array_key_exists('auth_userid', $_COOKIE) && array_key_exists('auth_key', $_COOKIE)) {\n require_once '../database/mysql.inc.php';\n $conn = conn();\n\n $auth_userid = $_COOKIE['auth_userid'];\n $auth_key = $_COOKIE['auth_key'];\n $sql = 'SELECT p.name_ingame as name_ingame ' .\n 'FROM player_auth as a, player as p ' .\n 'WHERE a.player_id = :id AND a.auth_key = :auth_key AND a.player_id = p.id';\n $query = $conn->prepare($sql);\n $query->execute(array(':id' => $auth_userid,\n ':auth_key' => $auth_key));\n $resultArray = $query->fetchAll();\n if (count($resultArray) == 1) {\n $name_ingame = $resultArray[0]['name_ingame'];\n session_regenerate_id(TRUE);\n $_SESSION['user_id'] = $auth_userid;\n $_SESSION['user_name'] = $name_ingame;\n $_SESSION['user_lastactive'] = time();\n return TRUE;\n }\n }\n\n // neither session nor cookie lookup worked, so the user is not logged in\n return FALSE;\n}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\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 }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\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 }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\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 function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}" ]
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.69460523", "0.69320947", "0.6906824", "0.6904842", "0.69004583", "0.68975925", "0.68685424", "0.6848523", "0.6844706", "0.6842497", "0.68407005", "0.68338877", "0.6809911", "0.6807682", "0.68048835", "0.6795858", "0.6795753", "0.6790786", "0.67827266", "0.6781565", "0.6776217", "0.67662364", "0.6762543", "0.67525536", "0.67525303", "0.675126", "0.6741708", "0.6723873", "0.6718459", "0.6718133", "0.67175967", "0.67175967", "0.67163414", "0.6715241", "0.67149955", "0.6701401", "0.66959953", "0.6677578", "0.66633356", "0.6658625", "0.6653751", "0.6648311", "0.6635521", "0.663372", "0.6631203", "0.6616926", "0.66162115", "0.66072696", "0.6599716", "0.65856075", "0.65696895", "0.6568369", "0.65658766", "0.6557916", "0.6554719", "0.6548292", "0.65378124", "0.653712", "0.65335554", "0.6526306", "0.65212154", "0.65183794", "0.651378", "0.65086836", "0.6504965", "0.650051", "0.6497977", "0.649534", "0.6494901", "0.64876956", "0.6485331", "0.6483739", "0.6472518", "0.64655817", "0.6464438", "0.64629364", "0.646088", "0.64607173", "0.64595693", "0.6455302", "0.64550734" ]
0.0
-1
check for session and cookie presence
public function add_image_template($data = array()) { $this->admin_header(); //fetch the total number of categories $config['total_num_image'] = $this->Admin_model->fetch_all_rows('blog_images'); //fetch the total number of tags $data['total_num_blogs'] = $this->Admin_model->fetch_all_rows('blog'); //$config['total_rows'] = $this->Admin_model->fetch_all_rows('food'); $config['base_url'] = site_url("Admin/image_list/"); $config['per_page'] = 60; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_image'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['images'] = $this->Admin_model->fetch_image($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_image'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_image']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $data['header'] = $this->load->view('templates/admin_header', $data, TRUE); $data['footer'] = $this->load->view('templates/admin_footer', '', TRUE); $this->load->view('admins/image_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasSession() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "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}", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t\t}\n */\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// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "function cover_session_logged_in() {\n return get_cover_session() !== null;\n}", "public function checkSession()\n {\n if(isset($_COOKIE['id'])){\n $cookieOrSessionID = $_COOKIE['id'];\n }\n elseif(isset($_SESSION['id'])){\n $cookieOrSessionID = $_SESSION['id'];\n }\n return $cookieOrSessionID;\n }", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function is_cookie_set()\n {\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isCookieSet() {}", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\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 static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function user_check_session_id() {\n if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success();\n else wp_send_json_error();\n }", "public static function checkSession() {\n\t\t// Set any API keys\n\t\t$api_keys = array();\n\t\t// Check API Key or Session Authentication\n\t\t$key = \"\";\n\t\tif (isset($_GET['key'])) {\n\t\t\t$key = $_GET['key'];\n\t\t}\n\t\tif (!isset($_SESSION['user']) && !in_array($key, $api_keys)) {\n\t\t\texit('{\"status\":\"error\",\"message\":\"Authentication Error\"}');\n\t\t}\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "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 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 function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\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 sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "function sess_check ()\n\t{\n\n\t\tglobal $xnyo_parent;\n\n\t\t// store the IP Address in the session varz\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Storing IP/Browser/Time.');\n\t\t$_SESSION['_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION['_browser'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$_SESSION['_last_activity'] = time();\n\n\t\t// if we're logged in, do auth stuff\n\t\tif (!empty($xnyo->user))\n\t\t{\n\t\t\t// there really isnt much to do in here\n\t\t\t// check that we havent expired\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session expiry.');\n\t\t\tif ($_SESSION['auth']['expiry'] !== 0)\n\t\t\t{\n\t\t\t\tif (time() > $_SESSION['auth']['expiry'])\n\t\t\t\t{\n\t\t\t\t\t$time = time() - $_SESSION['auth']['expiry'];\n\t\t\t\t\t$errmsg = \"Session time expired ($time seconds). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t\t$this->logout ('expired');\n\t\t\t\t} else {\n\t\t\t\t\t// update session times\n\t\t\t\t\t$_SESSION['auth'][\"expiry\"] = time() + $xnyo_parent->session_lifetime;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check their subnet is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session subnet.');\n\t\t\tif ($_SESSION['auth']['subnet'] != $this->subnet())\n\t\t\t{\n\t\t\t\t$errmsg = \"Session moved subnet (\" . $_SESSION['auth']['subnet'] . \" => \" . $this->subnet() . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('moved_subnet');\n\t\t\t}\n\t\n\t\t\t// check browser is the same\n\t\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Checking session Browser.');\n\t\t\tif ($_SESSION['auth']['browser'] != $_SERVER['HTTP_USER_AGENT'])\n\t\t\t{\n\t\t\t\t$errmsg = \"User changed browsers (\" . $_SESSION['auth']['browser'] . \" => \" . $_SERVER['HTTP_USER_AGENT'] . \"). Logging out user (\" . $xnyo_parent->user->username . \")\";\n\t\t\t\t$xnyo_parent->trigger_error($errmsg, NOTICE);\n\t\t\t\t$this->logout('changed_browser');\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t// access checking is the only thing left i guess\n\t\t// if theres no access level specified, just let them through\n\t\tif (!empty($xnyo_parent->access) && !$this->check($xnyo_parent->access) && !$this->set_acl($xnyo_parent->access))\n\t\t\treturn false;\n\n\t\t// we're all done i guess\n\t\treturn true;\n\t}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "protected function checkSessionToken() {}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "public function session_check(){\n\n\tif(!isset($_SESSION[\"user-type\"]) && $_SESSION[\"user-type\"] != \"user\"){\n\t\tredirect(\"Login\");\n\t} \n}", "function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\n }", "public function checkSessionStatus(){\t\t\n\t\tif(isset($_SESSION[self::$session])){\n\t\t\treturn $_SESSION[self::$session];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "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 }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "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}", "function check_logged_only() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies: \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n foreach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n if (!array_key_exists($_SESSION[\"logged\"],$USERS)) {\n return FALSE;\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return TRUE;\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}", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected function checkSessionLifetime() {}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function session_check() {\n\tif (!isset($_POST['session'])) {\n\t\tsend_message('error', array('reason' => 'no_session_token','message' => 'No session token passed'));\n\t}\n}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "function checkSession()\n {\n if( !$this->session->userdata( 'logged_in' ) )\n redirect( 'login' );\n\n if ( $this->session->userdata( 'level' ) != 'guidance' )\n redirect( 'standard/unauthorized' );\n }", "static function check()\n\t{\n\t\t$session = App::get('session');\n\t\treturn $session->get('auth');\n\t}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function checkUsersSession(){\n\t}", "function id_in_session()\n{\n return isset($_SESSION['username']) && isset($_SESSION['loggedin']);\n}", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\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 _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function auth_session_exists() {\n\n // there's an existing session, nothing to do\n if (array_key_exists('user_name', $_SESSION)) {\n return TRUE;\n }\n\n // There's not an existing session, but the user has an auth_key\n // cookie, so see if it matches the database.\n // If it does, create a new session\n if (array_key_exists('auth_userid', $_COOKIE) && array_key_exists('auth_key', $_COOKIE)) {\n require_once '../database/mysql.inc.php';\n $conn = conn();\n\n $auth_userid = $_COOKIE['auth_userid'];\n $auth_key = $_COOKIE['auth_key'];\n $sql = 'SELECT p.name_ingame as name_ingame ' .\n 'FROM player_auth as a, player as p ' .\n 'WHERE a.player_id = :id AND a.auth_key = :auth_key AND a.player_id = p.id';\n $query = $conn->prepare($sql);\n $query->execute(array(':id' => $auth_userid,\n ':auth_key' => $auth_key));\n $resultArray = $query->fetchAll();\n if (count($resultArray) == 1) {\n $name_ingame = $resultArray[0]['name_ingame'];\n session_regenerate_id(TRUE);\n $_SESSION['user_id'] = $auth_userid;\n $_SESSION['user_name'] = $name_ingame;\n $_SESSION['user_lastactive'] = time();\n return TRUE;\n }\n }\n\n // neither session nor cookie lookup worked, so the user is not logged in\n return FALSE;\n}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\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 }", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function check_logged() {\n global $_SESSION, $USERS, $_SERVER;\n\n $ss = array_keys($_COOKIE);\n audit(\"Session Cookies (check_logged): \", \"print out cookie values\");\n foreach($ss as $k) {\n audit(\" Cookie: \".$k, \" value: \".$_COOKIE[$k]);\n }\n audit(\"check_logged Session variables: \", \"print all of them\");\n if (isset($_SESSION)) {\n \tforeach(array_keys($_SESSION) as $k) {\n audit(\" Session: \".$k,\" value: \".$_SESSION[$k]);\n }\n }\n if (!isset($_SESSION[\"logged\"]) || !array_key_exists($_SESSION[\"logged\"],$USERS)) {\n \t$qs = $_SERVER['QUERY_STRING'];\n audit( \"check_logged\",\" failed, key logged does not exist\", \"\" );\n if ($qs != \"\")\n header(\"Location: /applications/User/login.php?\".$_SERVER['QUERY_STRING'].\"&url=\".$_SERVER['PHP_SELF']);\n else\n header(\"Location: /applications/User/login.php\".\"?url=\".$_SERVER['PHP_SELF']);\n // in some cases the redirect will not be fast enough... instead the calling script will see the -1 - test the output of check_logged for != -1 to prevent accidential access\n return -1; // not logged in\n };\n // store that this user has logged in now\n setUserVariable( $_SESSION[\"logged\"], \"lastTimeLoggedIn\", date(DATE_RFC2822) );\n\n audit( \"check_logged\", \" as user \\\"\".$_SESSION[\"logged\"].\"\\\"\" );\n return $_SESSION[\"logged\"];\n }", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\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 }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\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 function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}" ]
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.69460523", "0.69320947", "0.6906824", "0.6904842", "0.69004583", "0.68975925", "0.68685424", "0.6848523", "0.6844706", "0.6842497", "0.68407005", "0.68338877", "0.6809911", "0.6807682", "0.68048835", "0.6795858", "0.6795753", "0.6790786", "0.67827266", "0.6781565", "0.6776217", "0.67662364", "0.6762543", "0.67525536", "0.67525303", "0.675126", "0.6741708", "0.6723873", "0.6718459", "0.6718133", "0.67175967", "0.67175967", "0.67163414", "0.6715241", "0.67149955", "0.6701401", "0.66959953", "0.6677578", "0.66633356", "0.6658625", "0.6653751", "0.6648311", "0.6635521", "0.663372", "0.6631203", "0.6616926", "0.66162115", "0.66072696", "0.6599716", "0.65856075", "0.65696895", "0.6568369", "0.65658766", "0.6557916", "0.6554719", "0.6548292", "0.65378124", "0.653712", "0.65335554", "0.6526306", "0.65212154", "0.65183794", "0.651378", "0.65086836", "0.6504965", "0.650051", "0.6497977", "0.649534", "0.6494901", "0.64876956", "0.6485331", "0.6483739", "0.6472518", "0.64655817", "0.6464438", "0.64629364", "0.646088", "0.64607173", "0.64595693", "0.6455302", "0.64550734" ]
0.0
-1
get the table name of the id to be deleted. that will enable us know which view to redirect
public function delete_property() { $table_name = $this->input->post('table'); switch ($table_name) { case "admin": $redirection_path = "Admin/manage_admins"; break; case "notification": $redirection_path = "Admin/notifications"; break; default: $redirection_path = ""; } if ($this->Admin_model->delete_property() === TRUE) { redirect($redirection_path); }else { redirect($redirection_path); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function permanentDelete($table,$id,$pageId=''){\n\t\t DB::table($table)\n ->where('id',$id)\n ->delete();\n\t return Redirect::back()->with('message', 'Data Deleted Permanently !!');\n\t}", "function _delete ($table_name) {\n\t\treturn \"DELETE FROM `{$table_name}`\";\n\t}", "public function delete($table);", "public function getTableId()\n {\n return $this->table_id;\n }", "protected function getDeleteByIdSQL($table_name) : string\n\t{\n\n\t\treturn \"DELETE FROM {$table_name} WHERE id = :id or parent_id = :id\";\n\n\t}", "public function getTableKeyName()\r\n\t{\r\n\t\treturn \"id\".$this->getTableName();\r\n\t}", "public function getTableKeyName()\n\t{\n\t\treturn \"id\".$this->getTableName();\n\t}", "function delete($table, $target);", "public function delete($table = '', $id = 0, $child_table = \"\") {\n $tbl = $table;\n\n $this->main_model->my_delete_record($tbl, 'id', $id);\n header('Location: ' . base_url() . 'main/manage/' . $table);\n }", "public function delete (){\n\n $table = new simple_table_ops();\n $table->set_id_column('timetable_id');\n $table->set_table_name('timetables');\n $table->delete();\n\n header(\"Location: http://\".WEBSITE_URL.\"/index.php?controller=timetable&action=show&submit=yes&timetable_period_id={$_GET['timetable_period_id']}\");\n }", "public function actionDelete() {}", "public function actionDelete() {}", "public function getDeleteName($modelName) {\n return sprintf('auja.%s.delete', $this->toUrlName($modelName));\n }", "public function getIdentifier() : string {\r\n return $this->table;\r\n }", "public function delete(Request $request, $table_id)\n {\n\n\n $table = earthreminders::findOrFail($table_id);\n $table->delete();\n\n\n\n return response()->json([\n 'success' => 1,\n 'user' => $request->user(),\n '_benchmark' => microtime(true) - $this->time_start,\n ], 200);\n }", "protected function _delete($table)\n\t{\n\t\treturn 'DELETE FROM '.$table.$this->_compile_wh('qb_where')\n\t\t\t.($this->qb_limit ? ' LIMIT '.$this->qb_limit : '');\n\t}", "public static function get_delet($table_name, $where): void\n {\n if (isset($_GET['id'])) :\n $id = $_GET['id'];\n $projet = new Crud($table_name);\n $projet->set_delete($id, $where);\n if ($table_name == \"projet\") :\n header('location:dashboard.php');\n else :\n header('location:dashboard.php?p=editcv&delet=ok');\n endif;\n endif;\n }", "public function deletedon($id)\n\t{\n $url = explode('/',$_GET['url']);\t\n\t$this->model->deletedon($id);\n\theader('location: ' . URL . 'Dnr/view/'.$url[3]); \n\t}", "function getDeleteSql()\n {\n $str = \"DELETE FROM \";\n if (isset($this->schema))\n $str = $str . $this->schema . \".\";\n\n $str = $str . $this->tblName . \" WHERE \" . $this->getWhereCondition($this->tblIndex);\n return $str;\n }", "public function deleteQuery(): string\n {\n return 'DELETE FROM products WHERE id = :id';\n }", "function del_by_id($table,$kode){\n\t\t$this->db->where('username',$kode);/*ative record*/\n\t\t$this->db->delete($table);\n\t}", "function delete()\r\n\t{\r\n\t\t// Check for request forgeries\r\n\t\tJRequest::checkToken() or die( 'Invalid Token' );\r\n\t\tglobal $mainframe;\r\n\t\t$model\t= &$this->getModel( 'table' );\r\n\t\t$ids = JRequest::getVar('ids', array(), 'request', 'array');\r\n\t\t$model->deleteRows( $ids );\r\n\t\tif ( JRequest::getVar('format') == 'raw') {\r\n\t\t\tJRequest::setVar( 'view', 'table' );\r\n\t\t\t$this->display();\r\n\t\t} else {\r\n\t\t\t//@TODO: test this\r\n\t\t\t$ref = JRequest::getVar( 'fabrik_referrer', \"index.php\", 'post' );\r\n\t\t\t$mainframe->redirect( $ref, count($ids) . \" \" . JText::_( 'RECORDS DELETED' ) );\r\n\t\t}\r\n\t}", "function delete_($id){\r\nglobal $mod_id;\r\nglobal $db;\r\nglobal $_POST;\r\nglobal $tbl_name_main;\r\nglobal $tbl_name_detail;\r\n\r\n$sql =\"DELETE \";\r\n$sql .=\"FROM \".$tbl_name_main.\" \";\r\n$sql .=\"WHERE id_form_rfk_02_jp_main = '$id'\";\r\n\r\n$sqlresult = $db->Execute($sql);\r\n}", "function Delete($table,$id,$rediract){\n\t\t\n\t\t$delete = \"DELETE FROM $table where id='$id'\";\n\t\t$run = $this->connect->query($delete);\n\t\t\n\t\tif($run){\n\t\t\techo \"<script>location.href='$rediract=Delete-Successfully';</script>\";\n\t\t}else{\n\t\t\techo \"<script>location.href='$rediract=Delete-Error';</script>\";\n\t\t} //else close\n\t}", "function table_id()\n\t{\n\t\t/*\n\t\t$_temp = '__temp_table_' . get_class($this->table) . '_id';\n\t\tglobal $$_temp;\n\n\t\treturn $$_temp;\n\t\t*/\n\n\t\treturn $this->table->id;\n\t}", "public function getForeignKey()\n {\n return str_singular($this->getTable()).'_id';\n }", "function deletes($id) {\n\t\n\tglobal $link;\n\t\n\tdelete (array ('table' => 'articles', 'link' => $link, 'id' => $id));\n\theader(\"location:\".BASE_URL.\"/articles/backoffice_index\");\t\n\n}", "public function getRouteDelete() {\n return 'cms.site.delete';\n }", "function backoffice_delete($id) {\n\t\n\tglobal $link;\n\t\n\tdelete (array ('table' => 'commentaires', 'link' => $link, 'id' => $id));\n\theader(\"location:\".BASE_URL.\"/homes/backoffice_commentaires\");\t\n\n}", "public function undeleteAction(){\n\t}", "function delete_data($table, $id){\n\n $query = $this->db->delete($table, array('id' => $id));\n\n }", "public function getDeleteUrl()\n {\n return $this->getUrl('*/*/delete', array('id' => $this->getRequest()->getParam('id')));\n }", "public function delete_db($id){\n \t// find khusus untuk primary key di database\n \t$department = Department::find($id);\n \t$department->delete();\n\n \treturn redirect('department');\n }", "function delete($table, $where = '') {\n $sql = \"DELETE FROM \" . $table;\n if ($where) {\n $sql .= \" WHERE \" . $where;\n }\n\n $sql = trim($sql);\n //echo $sql;\n //exit;\n $result = mysqli_query($this->link, $sql);\n if (!$result) {\n // echo \"not returh\";\n return 0;\n } else {\n $save_id = $result;\n return $save_id;\n }\n\n mysqli_free_result($result);\n }", "public function get_delete()\n {\n $del = $this->alias;\n $from = $this->get_from();\n $join = $this->get_join();\n $where = $this->get_where();\n $order = $this->get_order();\n $group = $this->get_group();\n $limit = $this->get_limit();\n return \"delete $del $from $join $where $group $order $limit\";\n }", "public function deleteImageRedirectPath(): string\n {\n return auth('rocXolid')->user()->is($this)\n ? route('rocXolid.auth.profile')\n : $this->getControllerRoute('show');\n }", "public function getDeleteUrl()\n {\n return $this->getUrl('*/*/delete', ['id' => $this->getTemplateId()]);\n }", "function getLastTableId($table=''){\t\n\t\t$CI =& get_instance();\t\t\n\t\t$qry=\"SELECT * FROM $table ORDER BY id DESC LIMIT 1\";\t\t\n\t\t$CI =& get_instance(); \n\t\t$qryy = $CI->db->query($qry);\t\t\t\t\n\t\t$result = $qryy->row();\t\t\t\n\t\tif(!empty($result))\t\t\t\t\n\t\treturn $result->id;\t\t\n\t\telse return false; \n\t}", "public function delete($table, $id)\n {\n $del = \"DELETE FROM $table WHERE id=:id\";\n $stmt = $this->connect(\"student\")->prepare($del);\n $stmt->bindValue(\":id\", $id);\n $exec = $stmt->execute();\n if ($exec) {\n header(\"location:record.php\");\n }\n }", "function delete_($id){\r\nglobal $mod_id;\r\nglobal $db;\r\nglobal $_POST;\r\nglobal $tbl_name_main;\r\nglobal $tbl_name_detail;\r\n\r\nglobal $tmp_tbl_name_main;\r\nglobal $tmp_tbl_name_detail;\r\n\r\n$sql =\"DELETE \";\r\n$sql .=\"FROM \".$tbl_name_main.\" \";\r\n$sql .=\"WHERE id_fjl_06_main = '$id'\";\r\n//$sqlresult = $db->Execute($sql);\r\n$tmp_sql = \" DELETE FROM \".$tmp_tbl_name_main.\" WHERE id_fjl_06_main='{$id}' \" ;\r\n\r\nif($db->Execute($sql)){\r\n\t$db->Execute($tmp_sql);\r\n}\r\n}", "public Function deleteAction($table, $key)\r\n\t{\r\n\t\t$bdd = singleton::getInstance();\r\n\t\ttry{\r\n\t\t\t/*TODO : prepare the request for one row delete */\r\n\r\n\t\t\t if ($key == null) {\r\n \tprint( \"id non correspondante! \\n\");\r\n \texit;\r\n }\r\n\r\n\t\t\telse {\r\n\t\t\t\tif($key == intval($key)){\r\n\t\t\t\tprint \"appel deleteAction avec $table, $key \\n\";\r\n\t\t\t\t$sql = \"delete from $table where id = $key\";\r\n \tprint( \"sql: $sql \\n\");\r\n \t$stmt = $bdd ->prepare($sql);\r\n \t$stmt -> execute();\r\n \tprint \"suppression réussie\";\r\n \t$tab = $stmt-> fetchAll(PDO::FETCH_ASSOC);\r\n \tprint json_encode( $tab);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (PDOException $e) {\r\n \t\techo $e->getMessage();\r\n \texit;\r\n\t\t}\r\n\r\n\t}", "public function delete($tables,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->delete($tables);\n }", "public function delete($tables,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->delete($tables);\n }", "public function delete($tables,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->delete($tables);\n }", "public function delete(?string $table = null);", "public function delete(?string $table = null);", "public function deleteAction() {\n \n }", "public function delete ($id){\n DB::table('barang')->where('id',$id)->delete();\n return redirect()->back();\n }", "public function getDelete($id)\n {\n //\n DB::table('stories')->where('story_id',$id)->delete();\n return redirect()->back();\n }", "function Drop_Table($id){\n\t\t$database=DatabaseName();\n\t\t$name='table_'.$id;$StudentID=getuserid();\n\t\tmysql_query(\"DELETE FROM `$database`.`filerating` WHERE `filerating`.`FileID` = $id\");\n\t\tmysql_query(\"DROP TABLE IF EXISTS `$database`.`$name`\");\t\t\n\t\tmysql_query(\"DELETE FROM `$database`.`keywords` WHERE `keywords`.`FileID` = $id\");\n\t\tmysql_query(\"DELETE FROM `$database`.`uploadinfo` WHERE `uploadinfo`.`FileID` = $id\");\n\t}", "function delete_(){\nglobal $mod_id;\nglobal $db;\n\n$sql =\"DELETE \";\n$sql .=\"FROM t_absensi \";\n$sql .=\"WHERE id= '$_GET[id]' \";\n\n$sqlresult = $db->Execute($sql);\n\n$user_id = base64_decode($_SESSION['UID']);\n $ip_now = $_SERVER['REMOTE_ADDR'];\n $sql2=\"INSERT INTO tbl_log (url, waktu, module, user_id ) VALUES ('$ip_now',now(),'Hapus data >> master WNI Non TKI','$user_id') \";\n $db->Execute($sql2);\n\n}", "function delete_(){\nglobal $mod_id;\nglobal $db;\n\n$sql =\"DELETE \";\n$sql .=\"FROM t_absensi \";\n$sql .=\"WHERE id= '$_GET[id]' \";\n\n$sqlresult = $db->Execute($sql);\n\n$user_id = base64_decode($_SESSION['UID']);\n $ip_now = $_SERVER['REMOTE_ADDR'];\n $sql2=\"INSERT INTO tbl_log (url, waktu, module, user_id ) VALUES ('$ip_now',now(),'Hapus data >> master WNI Non TKI','$user_id') \";\n $db->Execute($sql2);\n\n}", "public function getModelId()\n\t{\n\t\treturn $this->handler->get_table_id();\n\t}", "public function table_name ()\n {\n return $this->app->table_names->entries;\n }", "public function getRouteKeyName()\n {\n return request()->segment(1) === 'admin' ? 'id' : 'account_code';\n }", "function eliminar_historial(){\t\n\t\t$id=$_GET['id']; $tabla=$_GET['tabla']; $back=$_GET['back']; \n\t\t$sql=\"DELETE FROM historial WHERE id_his='$id' AND tabla_his='$tabla'\";\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\theader(\"location:/admin/$tabla/editar.php?id=$back\");\n\t}", "public function getDeleteLink($entity)\n {\n return '?action=delete&sampleId=' . $entity->getSampleId();\n }", "function AfterDelete($where, &$deleted_values, &$message, &$pageObject)\n{\n\n\t\t\n\n$do=$deleted_values[\"LvID\"];\n\n$sqldel = \"DELETE FROM indleave WHERE LvID='$do'\";\nCustomQuery($sqldel);\n\n\n;\t\t\n}", "public function getFormId() {\n return 'my_database.report_delete';\n }", "function delete() {\n \tglobal $mysql;\n \tif(empty($this->id)) return;\n \t$tablename = $this->class_name();\n \t$id = $this->id;\n \t$query = \"DELETE FROM $tablename WHERE id=$id\";\n \t$mysql->update($query);\n }", "public function getClientDeletionURL($id)\n\t{\n\t\treturn $this->baseURL . \"/action/confirm/\" . $id;\n\t}", "public function getDeleteAction(): string {\n return $this->deleteAction;\n }", "function delete($id, $table_name, $return, $mysqli) {\n $query = \"DELETE FROM $table_name WHERE id=$id\";\n $result = mysqli_query($mysqli, $query) or die (mysqli_error());\n header(\"Location: \".$return); \n}", "public function hook_before_delete($id) {\n\n }", "public function hook_after_delete($id) {\n\n }", "public function index_delete(){\n\t\t\n\t\t}", "public static function getStorageTableName() {}", "public function deleted($id)\n {\n }", "public function hapus_gbr_detail($tabel, $where)\n {\n \t$this->db->where($where);\n \t$this->db->delete($tabel);\n }", "function delete_trip_id() {\n $id = $this->uri->segment(3);\n $this->insert_model->delete_trip_id($id);\n $this->trip_id();\n }", "function delete($table, $id){\n\nglobal $conn;\n$sql = \"DELETE FROM $table WHERE id=?\";\n\n$stmt = executeQuery($sql, ['id' => $id]);\nreturn $stmt->affected_rows;\n}", "private static function getTableName() {\n return get_called_class();\n }", "public function delete($id,$table,$valueId){\n\t\t$msg=\"\";\n\t\ttry{\n\t \t$sql = \"DELETE FROM $table WHERE $valueId\";\n\t\t $query= $this->exeSQL($sql);\n\t\t if($query){\n\t\t\t $msg = \"Delete deu certo\";\n\t }\n\t\t}catch(Exception $ex){\n\t\t\t$msg=$this->getStatus().$e->getMessage().\" \".$e->getLine(); //exibe a mensagem de erro\n\t\t}\n\t\treturn $msg;\n\t}", "function delete_post()\n {\n $this->Admin_model->procedure = 'POST_DELETE';\n\n echo $this->p_post_id_delete;\n\n\n $rs = $this->Admin_model->delete($this->p_post_id_delete);\n\n //redirect('admin/Posts/display_cat');\n }", "public function delete_account($table = '', $id = 0, $child_table = \"\") {\n $tbl = $table;\n $this->main_model->my_delete_record($tbl, 'id', $id);\n header('Location: ' . base_url() . 'main/manage_account/' . $table);\n }", "public function queryDelete($table, $where) : int;", "public function emailtemplatedelete(Request $request,$id=0)\n {\n $del_qry = DB::table('email_templates')->where('id', $id)->delete();\n if($del_qry)\n {\n $request->session()->flash('admin_successmsgdata_sess', 'Template Deleted successfully.');\n }\n return redirect(ADMINSEPARATOR.'/email-template');\n }", "function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}", "public function get_table_name(){\n return $this->table_name();\n }", "public static function table_name() {\n $table_name = strtolower(get_called_class());\n\n if (!in_array($table_name, ApplicationSql::tablenames()))\n throw new TableNotFoundException(\"Veritabanında böyle bir tablo mevcut değil\", $table_name);\n\n return $table_name;\n }", "public function getTableId($name) {\n\t\treturn array_search($name, $this->getTables());\n\t}", "public function destroy($id)\n {\n $registro=DB::table('form_004_2s')->where('idf4_2','=',$id)->delete();\n return Redirect::to('BienestarUniversitario/form_004_2');\n }", "public function softDelete($table,$id,$pageId=''){\n\t\t DB::table($table)\n ->where('id',$id)\n ->update(array(\n\t\t\t 'soft_delete' =>'1',\n\t\t\t 'updated_at' =>time()\t\n\t\t\t));\n\t return Redirect::back()->with('message', 'Data Deleted Softly !!');\n\t}", "function delAdminHandler() {\n global $inputs;\n $sql = \"DELETE FROM `admin` WHERE id = \" . $inputs['id'];\n execSql($sql);\n formatOutput(true, 'delete success');\n}", "protected static function get_table_name() {\n return null;\n }", "function delete_by_id($table,$id)\n{\n global $db;\n if(tableExists($table))\n {\n $sql = \"DELETE FROM \".$db->escape($table);\n $sql .= \" WHERE id=\". $db->escape($id);\n $sql .= \" LIMIT 1\";\n $db->query($sql);\n return ($db->affected_rows() === 1) ? true : false;\n }\n}", "function get_table_name () {\r\n\t\treturn $this->wpdb->prefix . $this->_table_name;\r\n\t}", "function delete($table, $id)\n{\n connect()->query(\"DELETE FROM users WHERE id='$id'\");\n}", "public function delete_activities(){\n if($this->uri->segment(3) == \"temp\"){\n $id = $this->uri->segment(4);\n $result = MU_Model::deletedRecordById(\"temp_table\",array(\"ID\"=>$id));\n }else{\n $id = $this->uri->segment(3);\n $result = MU_Model::deletedRecordById(\"activities\",array(\"act_id\"=>$id));\n }\n if($result) echo 't';\n }", "public function deleteroom($id)\n { \n\n DB::table(\"opos_ftype\")\n ->where(\"id\",$id)\n ->update([\n \"deleted_at\"=>Carbon::now()\n ]);\n return $id;\n }", "protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable_Hierarchy' );\n\t}", "function delete_db($table, $id) {\n\t\t$tmp = \"delete from $table where id='$id'\";\n\t\t$sts = mysql_query($tmp, $this -> dbc) or print mysql_error($this -> CONST_ERRO);\n\t\treturn ($sts);\n\t}", "public function deleteDocument() {\n\n // should get instance of model and run delete-function\n\n // softdeletes-column is found inside database table\n\n return redirect('/home');\n }", "function index_delete()\n {\n $no_resi = $this->delete('no_resi');\n $this->db->where('no_resi', $no_resi);\n $delete = $this->db->delete('tabel_user');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function actionDelete($id)\n {\n///\n$nombre=Yii::$app->user->identity->username;\n$connection = \\Yii::$app->db;\n$db = $connection->createCommand(\"INSERT INTO auditoria (id, user, modelo, accion, fechahora) VALUES (NULL, '$nombre', 'PropiedadDet', 'Borrar', NOW());\")->execute();\n///\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function deleteAction()\n {\n \n }", "function getTableName(): string;", "public function onBeforeDelete();", "public function delete($table, $where){\n\t\t$sql=\"DElETE FROM \".$table.\" WHERE \".$where.\"\";\n\t\techo $sql;\n\t\treturn mysqli_query($this->conn, $sql);\n\t}", "public function getTableName(): string\n {\n return $this->tableNames[0];\n }", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}" ]
[ "0.67175186", "0.6357331", "0.62982947", "0.62653023", "0.61950403", "0.61947906", "0.6182341", "0.6068081", "0.60667115", "0.6060392", "0.60446167", "0.60446167", "0.60306495", "0.601908", "0.6010143", "0.5976361", "0.59739995", "0.5960086", "0.59375477", "0.592166", "0.5921157", "0.592022", "0.5914107", "0.5914069", "0.59137815", "0.5911388", "0.58717245", "0.5852666", "0.58515793", "0.584157", "0.58221895", "0.5813242", "0.5803785", "0.58000624", "0.5798239", "0.579612", "0.5792923", "0.5781977", "0.57781583", "0.5775056", "0.57739204", "0.57685196", "0.57685196", "0.57685196", "0.57534665", "0.57534665", "0.5752253", "0.57489395", "0.5738983", "0.5729379", "0.5724219", "0.5724219", "0.57178426", "0.57149935", "0.57127696", "0.57085407", "0.5707572", "0.5701645", "0.56987244", "0.56907153", "0.5688951", "0.56807107", "0.5679541", "0.5676991", "0.56767625", "0.56744367", "0.56699324", "0.56610173", "0.56548095", "0.56540257", "0.5653288", "0.5650298", "0.5634737", "0.5634734", "0.56339765", "0.5623783", "0.5623359", "0.5612005", "0.56091696", "0.5608786", "0.5605586", "0.5603439", "0.5603061", "0.5601531", "0.55983573", "0.5593689", "0.5590478", "0.55866504", "0.5583015", "0.5582265", "0.55821055", "0.55815923", "0.5578371", "0.5577504", "0.55772984", "0.55772984", "0.5575852", "0.5574954", "0.55697775", "0.556808", "0.55672646" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any similar widget.
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->select = "t.*,f.name as franchiseeName"; $criteria->join = "left join gaiwang.gw_franchisee f on f.id = t.franchisee_id"; $criteria->compare('t.name',$this->name,true); $criteria->compare('f.name',$this->franchiseeName,true); $criteria->compare('t.code', $this->code,true); $criteria->order = 't.id desc'; return new CActiveDataProvider($this, array( 'criteria'=>$criteria, 'pagination'=>array( 'pageSize'=>10, ), 'sort' => false )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('model_id',$this->model_id,true);\n $criteria->compare('color',$this->color,true);\n $criteria->compare('is_in_pare',$this->is_in_pare);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('idmodel',$this->idmodel);\n\t\t$criteria->compare('usuario_anterior',$this->usuario_anterior);\n\t\t$criteria->compare('usuario_nuevo',$this->usuario_nuevo);\n\t\t$criteria->compare('estado_anterior',$this->estado_anterior,true);\n\t\t$criteria->compare('estado_nuevo',$this->estado_nuevo,true);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('generator_id',$this->generator_id,true);\n\t\t$criteria->compare('serial_number',$this->serial_number,true);\n\t\t$criteria->compare('model_number',$this->model_number,true);\n\t\t$criteria->compare('manufacturer_name',$this->manufacturer_name,true);\n\t\t$criteria->compare('manufacture_date',$this->manufacture_date,true);\n\t\t$criteria->compare('supplier_name',$this->supplier_name,true);\n\t\t$criteria->compare('date_of_purchase',$this->date_of_purchase,true);\n\t\t$criteria->compare('date_of_first_use',$this->date_of_first_use,true);\n\t\t$criteria->compare('kva_capacity',$this->kva_capacity);\n\t\t$criteria->compare('current_run_hours',$this->current_run_hours);\n\t\t$criteria->compare('last_serviced_date',$this->last_serviced_date,true);\n\t\t$criteria->compare('engine_make',$this->engine_make,true);\n\t\t$criteria->compare('engine_model',$this->engine_model,true);\n\t\t$criteria->compare('fuel_tank_capacity',$this->fuel_tank_capacity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('car',$this->car,true);\n\t\t$criteria->compare('source_id',$this->source_id,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('client_type_id',$this->client_type_id,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('other',$this->other,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t// $criteria->compare('text',$this->text,true);\n\t\t// $criteria->compare('record',$this->record,true);\n\t\t$criteria->compare('user',$this->user,true);\n\t\t$criteria->compare('createdBy',$this->createdBy,true);\n\t\t$criteria->compare('viewed',$this->viewed);\n\t\t$criteria->compare('createDate',$this->createDate,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('comparison',$this->comparison,true);\n\t\t// $criteria->compare('value',$this->value,true);\n\t\t$criteria->compare('modelType',$this->modelType,true);\n\t\t$criteria->compare('modelId',$this->modelId,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('Currency_ID',$this->Currency_ID);\n\t\t$criteria->compare('CurrencyNo',$this->CurrencyNo,true);\n\t\t$criteria->compare('ExchangeVND',$this->ExchangeVND,true);\n\t\t$criteria->compare('AppliedDate',$this->AppliedDate,true);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('firm',$this->firm,true);\n\t\t$criteria->compare('change_date',$this->change_date,true);\n\t\t$criteria->compare('item_id',$this->item_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('availability',$this->availability,true);\n\t\t$criteria->compare('price',$this->price,true);\n\t\t$criteria->compare('bonus',$this->bonus,true);\n\t\t$criteria->compare('shipping_cost',$this->shipping_cost,true);\n\t\t$criteria->compare('product_page',$this->product_page,true);\n\t\t$criteria->compare('sourse_page',$this->sourse_page,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('column_id',$this->column_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('condition',$this->condition,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('industry',$this->industry,true);\n\t\t$criteria->compare('industry_sub',$this->industry_sub,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('province',$this->province,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('contact_name',$this->contact_name,true);\n\t\t$criteria->compare('contact_tel',$this->contact_tel,true);\n\t\t$criteria->compare('ip',$this->ip,true);\n\t\t$criteria->compare('source',$this->source,true);\n $criteria->compare('status',$this->status);\n\t\t$criteria->compare('update_time',$this->update_time);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('notes',$this->notes);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('university',$this->university,true);\n\t\t$criteria->compare('major',$this->major,true);\n\t\t$criteria->compare('gpa',$this->gpa,true);\n\t\t$criteria->compare('appl_term',$this->appl_term);\n\t\t$criteria->compare('toefl',$this->toefl);\n\t\t$criteria->compare('gre',$this->gre);\n\t\t$criteria->compare('appl_major',$this->appl_major,true);\n\t\t$criteria->compare('appl_degree',$this->appl_degree,true);\n\t\t$criteria->compare('appl_country',$this->appl_country,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('goods_code',$this->goods_code,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('brand_id',$this->brand_id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('size',$this->size,true);\n\t\t$criteria->compare('material',$this->material,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('purchase_price',$this->purchase_price,true);\n\t\t$criteria->compare('selling_price',$this->selling_price,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('meta_title',$this->meta_title,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ContractsDetailID',$this->ContractsDetailID,true);\n\t\t$criteria->compare('ContractID',$this->ContractID,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\t\t$criteria->compare('CustomerID',$this->CustomerID,true);\n\t\t$criteria->compare('Share',$this->Share);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria = $this->criteriaSearch();\r\n\t\t$criteria->limit = 10;\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('organizationName',$this->organizationName,true);\n\t\t$criteria->compare('contactNo',$this->contactNo,true);\n\t\t$criteria->compare('partnerType',$this->partnerType);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('emailId',$this->emailId,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('firstName',$this->firstName,true);\n\t\t$criteria->compare('lastName',$this->lastName,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_ID,$this->{Globals::FLD_NAME_ACTIVITY_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_TASK_ID,$this->{Globals::FLD_NAME_TASK_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_BY_USER_ID,$this->{Globals::FLD_NAME_BY_USER_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_TYPE,$this->{Globals::FLD_NAME_ACTIVITY_TYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_SUBTYPE,$this->{Globals::FLD_NAME_ACTIVITY_SUBTYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_COMMENTS,$this->{Globals::FLD_NAME_COMMENTS},true);\n\t\t$criteria->compare(Globals::FLD_NAME_CREATED_AT,$this->{Globals::FLD_NAME_CREATED_AT},true);\n\t\t$criteria->compare(Globals::FLD_NAME_SOURCE_APP,$this->{Globals::FLD_NAME_SOURCE_APP},true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('manufacturers_image',$this->manufacturers_image,true);\n\t\t$criteria->compare('date_added',$this->date_added);\n\t\t$criteria->compare('last_modified',$this->last_modified);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_clicked',$this->url_clicked);\n\t\t$criteria->compare('date_last_click',$this->date_last_click);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('date',$this->date);\n\t\t$criteria->compare('del',$this->del);\n\t\t$criteria->compare('action_id',$this->action_id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('catalog',$this->catalog,true);\n\t\t$criteria->compare('is_new',$this->is_new);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('competition',$this->competition);\n\t\t$criteria->compare('partner',$this->partner);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('website',$this->website,true);\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('case',$this->case);\n\t\t$criteria->compare('basis_doc',$this->basis_doc);\n\t\t$criteria->compare('calc_group',$this->calc_group);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('data_attributes_fields',$this->data_attributes_fields,true);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('created',$this->created,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('skill_id',$this->skill_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('account_id',$this->account_id);\n\t\t$criteria->compare('field_name',$this->field_name);\n\t\t$criteria->compare('content',$this->content);\n\t\t$criteria->compare('old_data',$this->old_data,true);\n\t\t$criteria->compare('new_data',$this->new_data,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_updated',$this->date_updated,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('company_id',$this->company_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('validator',$this->validator,true);\n\t\t$criteria->compare('position',$this->position);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n $criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('display_name',$this->display_name,true);\n $criteria->compare('actionPrice',$this->actionPrice);\n\t\t$criteria->compare('translit',$this->translit,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('display_description',$this->display_description,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\t\t$criteria->compare('editing',$this->editing);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array(\n 'pageSize' => 15,\n ),\n\t\t));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('BrandID', $this->BrandID);\n $criteria->compare('BrandName', $this->BrandName, true);\n $criteria->compare('Pinyin', $this->Pinyin, true);\n $criteria->compare('Remarks', $this->Remarks, true);\n $criteria->compare('OrganID', $this->OrganID);\n $criteria->compare('UserID', $this->UserID);\n $criteria->compare('CreateTime', $this->CreateTime);\n $criteria->compare('UpdateTime', $this->UpdateTime);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('componente_id',$this->componente_id);\n\t\t$criteria->compare('tipo_dato',$this->tipo_dato,true);\n\t\t$criteria->compare('descripcion',$this->descripcion,true);\n\t\t$criteria->compare('cruce_automatico',$this->cruce_automatico,true);\n\t\t$criteria->compare('sw_obligatorio',$this->sw_obligatorio,true);\n\t\t$criteria->compare('orden',$this->orden);\n\t\t$criteria->compare('sw_puntaje',$this->sw_puntaje,true);\n\t\t$criteria->compare('sw_estado',$this->sw_estado,true);\n\t\t$criteria->compare('todos_obligatorios',$this->todos_obligatorios,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('real_name',$this->real_name,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('zip_code',$this->zip_code,true);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('district_id',$this->district_id);\n\t\t$criteria->compare('district_address',$this->district_address,true);\n\t\t$criteria->compare('street_address',$this->street_address,true);\n\t\t$criteria->compare('is_default',$this->is_default);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('update_time',$this->update_time);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('EMCE_ID',$this->EMCE_ID);\n\t\t$criteria->compare('MOOR_ID',$this->MOOR_ID);\n\t\t$criteria->compare('EVCR_ID',$this->EVCR_ID);\n\t\t$criteria->compare('EVES_ID',$this->EVES_ID);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('customerName',$this->customerName,true);\n\t\t$criteria->compare('agencyHead',$this->agencyHead,true);\n\t\t$criteria->compare('region_id',$this->region_id);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('municipalityCity_id',$this->municipalityCity_id);\n\t\t$criteria->compare('barangay_id',$this->barangay_id);\n\t\t$criteria->compare('houseNumber',$this->houseNumber,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('nature_id',$this->nature_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->name,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('state',$this->address,true);\n\t\t$criteria->compare('country',$this->address,true);\n\t\t$criteria->compare('contact_number',$this->contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('is_deleted',$this->is_deleted);\n\t\t$criteria->compare('deleted_by',$this->deleted_by,true);\n\t\t$criteria->compare('created_at',$this->created_at,true);\n\t\t$criteria->compare('updated_at',$this->updated_at,true);\n\t\tif(YII::app()->user->getState(\"role\") == \"admin\") {\n\t\t\t$criteria->condition = 'is_deleted = 0';\n\t\t}\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('professional_status_id',$this->professional_status);\n\t\t$criteria->compare('birthday',$this->birthday);\n\t\t$criteria->compare('location',$this->location);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\r\n\t{\r\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\r\n\r\r\n\t\t$criteria=new CDbCriteria;\r\r\n\r\r\n\t\t$criteria->compare('id',$this->id);\r\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\r\n\t\t$criteria->compare('adds',$this->adds);\r\r\n\t\t$criteria->compare('edits',$this->edits);\r\r\n\t\t$criteria->compare('deletes',$this->deletes);\r\r\n\t\t$criteria->compare('view',$this->view);\r\r\n\t\t$criteria->compare('lists',$this->lists);\r\r\n\t\t$criteria->compare('searches',$this->searches);\r\r\n\t\t$criteria->compare('prints',$this->prints);\r\r\n\r\r\n\t\treturn new CActiveDataProvider($this, array(\r\r\n\t\t\t'criteria'=>$criteria,\r\r\n\t\t));\r\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('applyId',$this->applyId);\n\t\t$criteria->compare('stuId',$this->stuId);\n\t\t$criteria->compare('stuName',$this->stuName,true);\n\t\t$criteria->compare('specification',$this->specification,true);\n\t\t$criteria->compare('assetName',$this->assetName,true);\n\t\t$criteria->compare('applyTime',$this->applyTime,true);\n\t\t$criteria->compare('loanTime',$this->loanTime,true);\n\t\t$criteria->compare('returnTime',$this->returnTime,true);\n\t\t$criteria->compare('RFID',$this->RFID,true);\n\t\t$criteria->compare('stuTelNum',$this->stuTelNum,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('itemcode', $this->itemcode, true);\n $criteria->compare('product_id', $this->product_id, true);\n $criteria->compare('delete_flag', $this->delete_flag);\n $criteria->compare('status', $this->status);\n $criteria->compare('expire', $this->expire, true);\n $criteria->compare('date_input', $this->date_input, true);\n $criteria->compare('d_update', $this->d_update, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('verid',$this->verid);\n\t\t$criteria->compare('appversion',$this->appversion,true);\n\t\t$criteria->compare('appfeatures',$this->appfeatures,true);\n\t\t$criteria->compare('createtime',$this->createtime,true);\n\t\t$criteria->compare('baseNum',$this->baseNum);\n\t\t$criteria->compare('slave1Num',$this->slave1Num);\n\t\t$criteria->compare('packagename',$this->packagename,true);\n\t\t$criteria->compare('ostype',$this->ostype);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('client_id',$this->client_id,true);\n\t\t$criteria->compare('extension',$this->extension,true);\n\t\t$criteria->compare('rel_type',$this->rel_type,true);\n\t\t$criteria->compare('rel_id',$this->rel_id,true);\n\t\t$criteria->compare('meta_key',$this->meta_key,true);\n\t\t$criteria->compare('meta_value',$this->meta_value,true);\n\t\t$criteria->compare('date_entry',$this->date_entry,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('column_id',$this->column_id,true);\n\t\t$criteria->compare('research_title',$this->research_title,true);\n\t\t$criteria->compare('research_url',$this->research_url,true);\n\t\t$criteria->compare('column_type',$this->column_type);\n\t\t$criteria->compare('filiale_id',$this->filiale_id,true);\n\t\t$criteria->compare('area_name',$this->area_name,true);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('trigger_config',$this->trigger_config);\n\t\t$criteria->compare('status',$this->status);\n $criteria->compare('terminal_type',$this->terminal_type);\n\t\t$criteria->compare('start_time',$this->start_time,true);\n\t\t$criteria->compare('end_time',$this->end_time,true);\n\t\t$criteria->compare('explain',$this->explain,true);\n\t\t$criteria->compare('_delete',$this->_delete);\n\t\t$criteria->compare('_create_time',$this->_create_time,true);\n\t\t$criteria->compare('_update_time',$this->_update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('birthday',$this->birthday,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('is_get_news',$this->is_get_news);\n\t\t$criteria->compare('user_id',$this->user_id);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('order_id',$this->order_id);\n\t\t$criteria->compare('device_id',$this->device_id,true);\n\t\t$criteria->compare('money',$this->money,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('add_time',$this->add_time);\n\t\t$criteria->compare('recharge_type',$this->recharge_type);\n\t\t$criteria->compare('channel',$this->channel,true);\n\t\t$criteria->compare('version_name',$this->version_name,true);\n\t\t$criteria->compare('pay_channel',$this->pay_channel);\n\t\t$criteria->compare('chanel_bid',$this->chanel_bid);\n\t\t$criteria->compare('chanel_sid',$this->chanel_sid);\n\t\t$criteria->compare('versionid',$this->versionid);\n\t\t$criteria->compare('chanel_web',$this->chanel_web);\n\t\t$criteria->compare('dem_num',$this->dem_num);\n\t\t$criteria->compare('last_watching',$this->last_watching,true);\n\t\t$criteria->compare('pay_type',$this->pay_type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n {\r\n // @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n $criteria = new CDbCriteria;\r\n\r\n $criteria->compare('id', $this->id);\r\n $criteria->compare('country_id', $this->country_id);\r\n $criteria->compare('user_id', $this->user_id);\r\n $criteria->compare('vat', $this->vat);\r\n $criteria->compare('manager_coef', $this->manager_coef);\r\n $criteria->compare('curator_coef', $this->curator_coef);\r\n $criteria->compare('admin_coef', $this->admin_coef);\r\n $criteria->compare('status', $this->status);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n ));\r\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('purchase_price',$this->purchase_price);\n\t\t$criteria->compare('sell_price',$this->sell_price);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('measurement',$this->measurement,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\t\t$criteria->compare('date_out',$this->date_out,true);\n\t\t$criteria->compare('date_in',$this->date_in,true);\n\t\t$criteria->compare('firma_id',$this->firma_id,true);\n\t\t$criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('instock',$this->instock);\n\t\t$criteria->compare('user_id',$this->user_id);\n $criteria->compare('warning_amount',$this->warning_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('fname',$this->fname,true);\n\t\t$criteria->compare('mname',$this->mname,true);\n\t\t$criteria->compare('lname',$this->lname,true);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('date_of_birth',$this->date_of_birth,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('landline',$this->landline,true);\n\t\t$criteria->compare('em_contact_name',$this->em_contact_name,true);\n\t\t$criteria->compare('em_contact_relation',$this->em_contact_relation,true);\n\t\t$criteria->compare('em_contact_number',$this->em_contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('created_date',$this->created_date,true);\n\n return new CActiveDataProvider( $this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState( 'pageSize', Yii::app()->params[ 'defaultPageSize' ] ),\n ),\n ) );\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t\n\t\t$criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('COMPETITOR_ID',$this->COMPETITOR_ID);\n\t\t$criteria->compare('WSDC_NO',$this->WSDC_NO);\n\t\t$criteria->compare('FIRST_NAME',$this->FIRST_NAME,true);\n\t\t$criteria->compare('LAST_NAME',$this->LAST_NAME,true);\n\t\t$criteria->compare('COMPETITOR_LEVEL',$this->COMPETITOR_LEVEL);\n\t\t$criteria->compare('REMOVED',$this->REMOVED);\n\t\t$criteria->compare('ADDRESS',$this->ADDRESS,true);\n\t\t$criteria->compare('CITY',$this->CITY,true);\n\t\t$criteria->compare('STATE',$this->STATE,true);\n\t\t$criteria->compare('POSTCODE',$this->POSTCODE);\n\t\t$criteria->compare('COUNTRY',$this->COUNTRY,true);\n\t\t$criteria->compare('PHONE',$this->PHONE,true);\n\t\t$criteria->compare('MOBILE',$this->MOBILE,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('LEADER',$this->LEADER);\n\t\t$criteria->compare('REGISTERED',$this->REGISTERED);\n\t\t$criteria->compare('BIB_STATUS',$this->BIB_STATUS);\n\t\t$criteria->compare('BIB_NUMBER',$this->BIB_NUMBER);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sys_name',$this->sys_name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('CustomerId',$this->CustomerId,true);\n\t\t$criteria->compare('AddressId',$this->AddressId,true);\n\t\t$criteria->compare('CustomerStatusId',$this->CustomerStatusId,true);\n\t\t$criteria->compare('DateMasterId',$this->DateMasterId,true);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('CustomerPhoto',$this->CustomerPhoto,true);\n\t\t$criteria->compare('CustomerCode',$this->CustomerCode);\n\t\t$criteria->compare('Telephone',$this->Telephone,true);\n\t\t$criteria->compare('Mobile',$this->Mobile,true);\n\t\t$criteria->compare('EmailId',$this->EmailId,true);\n\t\t$criteria->compare('Status',$this->Status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('company_id', $this->company_id);\n\t\t$criteria->compare('productId', $this->productId);\n\t\t$criteria->compare('upTo', $this->upTo);\n\t\t$criteria->compare('fixPrice', $this->fixPrice);\n\t\t$criteria->compare('isActive', $this->isActive);\n\t\t$criteria->order = 'company_id';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('locality',$this->locality,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$parameters = array('limit'=>ceil(Profile::getResultsPerPage()));\n\t\t$criteria->scopes = array('findAll'=>array($parameters));\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('itemId',$this->itemId);\n\t\t$criteria->compare('changedBy',$this->changedBy,true);\n\t\t$criteria->compare('recordName',$this->recordName,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\t\t$criteria->compare('oldValue',$this->oldValue,true);\n\t\t$criteria->compare('newValue',$this->newValue,true);\n\t\t$criteria->compare('diff',$this->diff,true);\n\t\t$criteria->compare('timestamp',$this->timestamp);\n\n\t\treturn new SmartActiveDataProvider(get_class($this), array(\n\t\t\t'sort'=>array(\n\t\t\t\t'defaultOrder'=>'timestamp DESC',\n\t\t\t),\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>Profile::getResultsPerPage(),\n\t\t\t),\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\n\t\t$criteria->compare('mem_type',$this->mem_type);\r\n\t\t$criteria->compare('business_type',$this->business_type);\r\n\t\t$criteria->compare('product_name',$this->product_name,true);\r\n\t\t$criteria->compare('panit',$this->panit,true);\r\n\t\t$criteria->compare('sex',$this->sex);\r\n\t\t$criteria->compare('tname',$this->tname);\r\n\t\t$criteria->compare('ftname',$this->ftname,true);\r\n\t\t$criteria->compare('ltname',$this->ltname,true);\r\n\t\t$criteria->compare('etname',$this->etname);\r\n\t\t$criteria->compare('fename',$this->fename,true);\r\n\t\t$criteria->compare('lename',$this->lename,true);\r\n\t\t$criteria->compare('birth',$this->birth,true);\r\n\t\t$criteria->compare('email',$this->email,true);\r\n\t\t$criteria->compare('facebook',$this->facebook,true);\r\n\t\t$criteria->compare('twitter',$this->twitter,true);\r\n\t\t$criteria->compare('address',$this->address,true);\r\n\t\t$criteria->compare('province',$this->province);\r\n\t\t$criteria->compare('prefecture',$this->prefecture);\r\n\t\t$criteria->compare('district',$this->district);\r\n\t\t$criteria->compare('postcode',$this->postcode,true);\r\n\t\t$criteria->compare('tel',$this->tel,true);\r\n\t\t$criteria->compare('mobile',$this->mobile,true);\r\n\t\t$criteria->compare('fax',$this->fax,true);\r\n\t\t$criteria->compare('high_education',$this->high_education);\r\n\t\t$criteria->compare('career',$this->career);\r\n\t\t$criteria->compare('skill_com',$this->skill_com);\r\n\t\t$criteria->compare('receive_news',$this->receive_news,true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('table_id',$this->table_id);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cou_id',$this->cou_id);\n\t\t$criteria->compare('thm_id',$this->thm_id);\n\t\t$criteria->compare('cou_nom',$this->cou_nom,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('idempleo',$this->idempleo);\n\t\t$criteria->compare('administrativo',$this->administrativo,true);\n\t\t$criteria->compare('comercial',$this->comercial,true);\n\t\t$criteria->compare('artes',$this->artes,true);\n\t\t$criteria->compare('informatica',$this->informatica,true);\n\t\t$criteria->compare('salud',$this->salud,true);\n\t\t$criteria->compare('marketing',$this->marketing,true);\n\t\t$criteria->compare('servicio_domestico',$this->servicio_domestico,true);\n\t\t$criteria->compare('construccion',$this->construccion,true);\n\t\t$criteria->compare('agricultura',$this->agricultura,true);\n\t\t$criteria->compare('ganaderia',$this->ganaderia,true);\n\t\t$criteria->compare('telecomunicaciones',$this->telecomunicaciones,true);\n\t\t$criteria->compare('atencion_cliente',$this->atencion_cliente,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID_VALOR',$this->ID_VALOR);\n\t\t$criteria->compare('ID_UBICACION',$this->ID_UBICACION);\n\t\t$criteria->compare('ID_VISITA',$this->ID_VISITA);\n\t\t$criteria->compare('VALOR',$this->VALOR);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t\n\t\t$criteria->compare('id_aspecto',$this->id_aspecto,true);\n\t\t$criteria->compare('tbl_Programa_id_programa',$this->tbl_Programa_id_programa,true);\n\t\t$criteria->compare('tbl_Factor_id_factor',$this->tbl_Factor_id_factor);\n\t\t$criteria->compare('tbl_caracteristica_id_caracteristica',$this->tbl_caracteristica_id_caracteristica,true);\n\t\t$criteria->compare('num_aspecto',$this->num_aspecto,true);\n\t\t$criteria->compare('aspecto',$this->aspecto,true);\n\t\t$criteria->compare('instrumento',$this->instrumento,true);\n\t\t$criteria->compare('fuente',$this->fuente,true);\n\t\t$criteria->compare('documento',$this->documento,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('Observaciones',$this->Observaciones,true);\n\t\t$criteria->compare('cumple',$this->cumple,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('website_url',$this->website_url,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('user_name',$this->user_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('created_datetime',$this->created_datetime,true);\n\t\t$criteria->compare('icon_src',$this->icon_src,true);\n\t\t$criteria->compare('show_r18',$this->show_r18);\n\t\t$criteria->compare('show_bl',$this->show_bl);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('creationDate',$this->creationDate,true);\n\t\t$criteria->compare('year',$this->year);\n\t\t$criteria->compare('term',$this->term,true);\n\t\t$criteria->compare('activated',$this->activated);\n\t\t$criteria->compare('startingDate',$this->startingDate,true);\n\t\t$criteria->compare('activation_userId',$this->activation_userId);\n\t\t$criteria->compare('parent_catalogId',$this->parent_catalogId);\n $criteria->compare('isProspective', $this->isProspective);\n $criteria->compare('creatorId', $this->creatorId);\n $criteria->compare('isProposed', $this->isProposed);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('location',$this->location);\n\t\t$criteria->compare('theripiest',$this->theripiest);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('dob',$this->dob,true);\n\t\t$criteria->compare('inurancecompany',$this->inurancecompany,true);\n\t\t$criteria->compare('injurydate',$this->injurydate,true);\n\t\t$criteria->compare('therapy_start_date',$this->therapy_start_date,true);\n\t\t$criteria->compare('ASIA',$this->ASIA,true);\n\t\t$criteria->compare('injury',$this->injury,true);\n\t\t$criteria->compare('medication',$this->medication,true);\n\t\t$criteria->compare('notes',$this->notes,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('imputetype_id',$this->imputetype_id);\n\t\t$criteria->compare('project_id',$this->project_id);\n\n\t\treturn new ActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search () {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('formId', $this->formId, true);\n\t\t$criteria->compare('data', $this->data, true);\n\t\t$criteria->compare('ctime', $this->ctime);\n\t\t$criteria->compare('mtime', $this->mtime);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('category_id',$this->category_id);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('price_z',$this->price_z);\n\t\t$criteria->compare('price_s',$this->price_s);\n\t\t$criteria->compare('price_m',$this->price_m);\n\t\t$criteria->compare('dependence',$this->dependence,true);\n\t\t$criteria->compare('barcode',$this->barcode,true);\n\t\t$criteria->compare('unit',$this->unit,true);\n\t\t$criteria->compare('minimal_amount',$this->minimal_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 100),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('image',$this->image,true);\n\t\t$criteria->compare('manager',$this->manager);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('realname',$this->realname,true);\n\t\t$criteria->compare('identity',$this->identity,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('bussiness_license',$this->bussiness_license,true);\n\t\t$criteria->compare('bankcode',$this->bankcode,true);\n\t\t$criteria->compare('banktype',$this->banktype,true);\n\t\t$criteria->compare('is_open',$this->is_open,true);\n\t\t$criteria->compare('introduction',$this->introduction,true);\n\t\t$criteria->compare('images_str',$this->images_str,true);\n\t\t$criteria->compare('gmt_created',$this->gmt_created,true);\n\t\t$criteria->compare('gmt_modified',$this->gmt_modified,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email_admin',$this->email_admin,true);\n\t\t$criteria->compare('password_api',$this->password_api,true);\n\t\t$criteria->compare('url_result_api',$this->url_result_api,true);\n\t\t$criteria->compare('id_currency_2',$this->id_currency_2);\n\t\t$criteria->compare('id_currency_1',$this->id_currency_1,true);\n\t\t$criteria->compare('is_test_mode',$this->is_test_mode);\n\t\t$criteria->compare('is_commission_shop',$this->is_commission_shop);\n\t\t$criteria->compare('commission',$this->commission);\n\t\t$criteria->compare('is_enable',$this->is_enable);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('mod_date',$this->mod_date,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID,true);\n\t\t$criteria->compare('userID',$this->userID,true);\n\t\t$criteria->compare('mtID',$this->mtID,true);\n\t\t$criteria->compare('fxType',$this->fxType);\n\t\t$criteria->compare('leverage',$this->leverage);\n\t\t$criteria->compare('amount',$this->amount,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('surname',$this->surname,true);\n\t\t$criteria->compare('comany_name',$this->comany_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('uuid',$this->uuid,true);\n\t\t$criteria->compare('is_admin',$this->is_admin);\n\t\t$criteria->compare('paid_period_start',$this->paid_period_start,true);\n\t\t$criteria->compare('ftp_pass',$this->ftp_pass,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('price',$this->price,true);\n\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('breed',$this->breed,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_birthday',$this->date_birthday,true);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('tattoo',$this->tattoo,true);\n\t\t$criteria->compare('sire',$this->sire,true);\n\t\t$criteria->compare('dame',$this->dame,true);\n\t\t$criteria->compare('owner_type',$this->owner_type,true);\n\t\t$criteria->compare('honors',$this->honors,true);\n\t\t$criteria->compare('photo_preview',$this->photo_preview,true);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('pet_status',$this->pet_status,true);\n\t\t$criteria->compare('about',$this->about,true);\n\t\t$criteria->compare('uid',$this->uid);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('veterinary',$this->veterinary,true);\n\t\t$criteria->compare('vaccinations',$this->vaccinations,true);\n\t\t$criteria->compare('show_class',$this->show_class,true);\n\t\t$criteria->compare('certificate',$this->certificate,true);\n $criteria->compare('neutered_spayed',$this->certificate,true);\n \n\n $criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('city',$this->city,true);\n\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('HISTORY',$this->HISTORY,true);\n\t\t$criteria->compare('WELCOME_MESSAGE',$this->WELCOME_MESSAGE,true);\n\t\t$criteria->compare('LOCATION',$this->LOCATION,true);\n\t\t$criteria->compare('PHONES',$this->PHONES,true);\n\t\t$criteria->compare('FAX',$this->FAX,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('MISSION',$this->MISSION,true);\n\t\t$criteria->compare('VISION',$this->VISION,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('orgName',$this->orgName,true);\n\t\t$criteria->compare('noEmp',$this->noEmp);\n\t\t$criteria->compare('phone',$this->phone);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('addr1',$this->addr1,true);\n\t\t$criteria->compare('addr2',$this->addr2,true);\n\t\t$criteria->compare('state',$this->state,true);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('orgType',$this->orgType,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('fax',$this->fax);\n\t\t$criteria->compare('orgId',$this->orgId,true);\n\t\t$criteria->compare('validity',$this->validity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('sortorder',$this->sortorder,true);\n\t\t$criteria->compare('fullname',$this->fullname,true);\n\t\t$criteria->compare('shortname',$this->shortname,true);\n\t\t$criteria->compare('idnumber',$this->idnumber,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('summaryformat',$this->summaryformat);\n\t\t$criteria->compare('format',$this->format,true);\n\t\t$criteria->compare('showgrades',$this->showgrades);\n\t\t$criteria->compare('sectioncache',$this->sectioncache,true);\n\t\t$criteria->compare('modinfo',$this->modinfo,true);\n\t\t$criteria->compare('newsitems',$this->newsitems);\n\t\t$criteria->compare('startdate',$this->startdate,true);\n\t\t$criteria->compare('marker',$this->marker,true);\n\t\t$criteria->compare('maxbytes',$this->maxbytes,true);\n\t\t$criteria->compare('legacyfiles',$this->legacyfiles);\n\t\t$criteria->compare('showreports',$this->showreports);\n\t\t$criteria->compare('visible',$this->visible);\n\t\t$criteria->compare('visibleold',$this->visibleold);\n\t\t$criteria->compare('groupmode',$this->groupmode);\n\t\t$criteria->compare('groupmodeforce',$this->groupmodeforce);\n\t\t$criteria->compare('defaultgroupingid',$this->defaultgroupingid,true);\n\t\t$criteria->compare('lang',$this->lang,true);\n\t\t$criteria->compare('theme',$this->theme,true);\n\t\t$criteria->compare('timecreated',$this->timecreated,true);\n\t\t$criteria->compare('timemodified',$this->timemodified,true);\n\t\t$criteria->compare('requested',$this->requested);\n\t\t$criteria->compare('enablecompletion',$this->enablecompletion);\n\t\t$criteria->compare('completionnotify',$this->completionnotify);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('zipcode',$this->zipcode,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('role',$this->role,true);\n\t\t$criteria->compare('active',$this->active);\n\t\t$criteria->compare('camaras',$this->camaras);\n\t\t$criteria->compare('freidoras',$this->freidoras);\n\t\t$criteria->compare('cebos',$this->cebos);\n\t\t$criteria->compare('trampas',$this->trampas);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cod_venda',$this->cod_venda,true);\n\t\t$criteria->compare('filial_cod_filial',$this->filial_cod_filial,true);\n\t\t$criteria->compare('funcionario_cod_funcionario',$this->funcionario_cod_funcionario,true);\n\t\t$criteria->compare('cliente_cod_cliente',$this->cliente_cod_cliente,true);\n\t\t$criteria->compare('data_2',$this->data_2,true);\n\t\t$criteria->compare('valor_total',$this->valor_total);\n\t\t$criteria->compare('forma_pagamento',$this->forma_pagamento,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('attribute',$this->attribute,true);\n\t\t$criteria->compare('displayName',$this->displayName,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('value_type',$this->value_type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->buscar,'OR');\n\t\t$criteria->compare('fecha',$this->buscar,true,'OR');\n\t\t$criteria->compare('fechaUpdate',$this->buscar,true,'OR');\n\t\t$criteria->compare('idProfesional',$this->buscar,'OR');\n\t\t$criteria->compare('importe',$this->buscar,'OR');\n\t\t$criteria->compare('idObraSocial',$this->buscar,'OR');\n\t\t$criteria->compare('estado',$this->buscar,true,'OR');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('codop',$this->codop,true);\n\t\t$criteria->compare('codcatval',$this->codcatval,true);\n\t\t$criteria->compare('cuentadebe',$this->cuentadebe,true);\n\t\t$criteria->compare('cuentahaber',$this->cuentahaber,true);\n\t\t$criteria->compare('desop',$this->desop,true);\n\t\t$criteria->compare('descat',$this->descat,true);\n\t\t$criteria->compare('debe',$this->debe,true);\n\t\t$criteria->compare('haber',$this->haber,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pagesize'=>100),\n\t\t));\n\t}" ]
[ "0.7212116", "0.7135383", "0.7093303", "0.70931214", "0.69846356", "0.6960259", "0.69467723", "0.69414675", "0.69331795", "0.69232404", "0.69098496", "0.69022155", "0.6897633", "0.6896968", "0.6891722", "0.6881716", "0.68790054", "0.68732494", "0.6849048", "0.6848422", "0.6835513", "0.6825551", "0.6814831", "0.6806046", "0.68031967", "0.6796666", "0.67951876", "0.67949885", "0.6794775", "0.6792971", "0.67900133", "0.6784882", "0.6784177", "0.67833114", "0.678041", "0.6779752", "0.6778281", "0.67767406", "0.67760754", "0.6775229", "0.6774748", "0.6774748", "0.6774748", "0.6774748", "0.6774748", "0.6774748", "0.6774748", "0.6774748", "0.67724156", "0.6767882", "0.67656136", "0.6765443", "0.6761744", "0.67616224", "0.67601913", "0.67595613", "0.67592007", "0.675804", "0.6752924", "0.67521405", "0.67511666", "0.6747011", "0.6746921", "0.6745146", "0.67448705", "0.6744455", "0.6743953", "0.67434764", "0.6742657", "0.67425805", "0.67415595", "0.6740536", "0.6739724", "0.6738422", "0.67364377", "0.6735815", "0.6733496", "0.6731074", "0.6730509", "0.6724249", "0.6722275", "0.67217845", "0.67211044", "0.67121685", "0.67117965", "0.67097175", "0.6708282", "0.6705726", "0.6704765", "0.6704605", "0.6703087", "0.6701735", "0.6699912", "0.6697078", "0.6695819", "0.66949904", "0.66942173", "0.6692424", "0.6692423", "0.6692156", "0.6690761" ]
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.75756", "0.75287056", "0.7271292", "0.7270462", "0.72616756", "0.721129", "0.7210465", "0.7131541", "0.71285504", "0.71285504", "0.71023285", "0.71023285", "0.7102174", "0.7074315", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922" ]
0.0
-1
always allow new user registrations
protected function hasPermission($permission, Model $requester) { if ($permission == 'create') { return true; } // users can only edit themselves if ($permission === 'edit' && $requester instanceof self && $requester->id() == $this->id()) { return true; } // otherwise, defer to admin permissions return $requester->isAdmin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "public function register_user()\n {\n \n return true;\n \n }", "public static function allowUserSignUp()\n {\n return false;\n }", "function google_login_allow_new_users_with_google()\n{\n\t$site_reg = elgg_get_config('allow_registration');\n\t$google_reg = elgg_get_plugin_setting('new_users');\n\tif ($site_reg || (!$site_reg && $google_reg == 'yes'))\n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}", "public static function userCreationAllowed(): bool\n {\n return self::isConfigured(self::ACTION_ADD_USER);\n }", "public function newRegistration() {\n $this->registerModel->getUserRegistrationInput();\n $this->registerView->setUsernameValue($this->registerView->getUsername());\n $this->registerModel->validateRegisterInputIfSubmitted();\n if ($this->registerModel->isValidationOk()) {\n $this->registerModel->hashPassword();\n $this->registerModel->saveUserToDatabase();\n $this->loginView->setUsernameValue($this->registerView->getUsername());\n $this->loginView->setLoginMessage(\"Registered new user.\");\n $this->layoutView->render(false, $this->loginView);\n } else {\n $this->layoutView->render(false, $this->registerView);\n }\n \n }", "function allow_create_users() {\n\t\treturn apply_filters( 'import_allow_create_users', true );\n\t}", "function testDoubleRegistration() {\n\t\t$pkey = Cgn_User::registerUser($this->user);\n\t\t$this->assertEqual(FALSE, $pkey);\n\t}", "public function regNewUser( $data ){\n\n\t\t$success = parent::regNewUser( $data );\n\t\n\t\tif( is_array( $success ) ){\n\t\t \treturn $this->createAnswer( 1,\"Username or email already exist\",403 );\n\t\t}elseif ( $success ){\n\t\t\treturn $this->createAnswer( 0,\"Congratulation you got permission\" );\n\t\t}else{\n\t\t return $this->createAnswer( 1,\"invalid query\",402 );\n\t\t}\n\t}", "protected function creatingNewUser() {\n return ($this->request_exists('user_choice') && $this->request('user_choice') == 'new' );\n }", "private function register(): void\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n }", "function users_can_register_signup_filter()\n {\n }", "function reg() {\n\t\t//~ screening input data\n\t\t$tmp_arr=mysql::screening_array($_POST);\n\t\t$login=$tmp_arr['login'];\n\t\t$passwd=$tmp_arr['passwd'];\n\t\t$passwd2=$tmp_arr['passwd2'];\n\t\t$mail=$tmp_arr['mail'];\n\n\t\t//~ Check valid user data\n\t\tif ($this->check_new_user($login, $passwd, $passwd2, $mail)) {\n\t\t\t//~ User data is correct. Register.\n\t\t\t$user_key = $this->generateCode(10);\n\t\t\t$passwd = md5($user_key.$passwd.SECRET_KEY); //~ password hash with the private key and user key\n\t\t\t$query=mysql::query(\"INSERT INTO `users` (`id_user`, `login_user`, `passwd_user`, `mail_user`, `key_user`,`img`) VALUES (NULL, '\".$login.\"', '\".$passwd.\"', '\".$mail.\"', '\".$user_key.\"','/feditor/attached/image/20150313/20150313102144_79301.jpg');\");\n\t\t\tif ($query) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tself::$error='Произошла ошибка при регистрации нового пользователя. Связаться с администрацией.';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function ggouv_register_user($username, $password, $name, $email,\n$allow_multiple_emails = false, $friend_guid = 0, $invitecode = '') {\n\n\t// Load the configuration\n\tglobal $CONFIG;\n\n\t// no need to trim password.\n\t$username = trim($username);\n\t$name = trim(strip_tags($name));\n\t$email = trim($email);\n\t$name = trim($name);\n\n\t// A little sanity checking\n\tif (empty($username)\n\t|| empty($password)\n\t// || empty($name) We authorize anonymous !\n\t|| empty($email)) {\n\t\treturn false;\n\t}\n\n\t// Make sure a user with conflicting details hasn't registered and been disabled\n\t$access_status = access_get_show_hidden_status();\n\taccess_show_hidden_entities(true);\n\n\tif (!validate_email_address($email)) {\n\t\tthrow new RegistrationException(elgg_echo('registration:emailnotvalid'));\n\t}\n\n\tif (!validate_password($password)) {\n\t\tthrow new RegistrationException(elgg_echo('registration:passwordnotvalid'));\n\t}\n\n\tif (!validate_username($username) || preg_match('/^\\d/', $username) === 1) { // ggouv. Don't want username start by number\n\t\tthrow new RegistrationException(elgg_echo('registration:usernamenotvalid'));\n\t}\n\n\tif ($user = get_user_by_username($username)) {\n\t\tthrow new RegistrationException(elgg_echo('registration:userexists'));\n\t}\n\n\tif ((!$allow_multiple_emails) && (get_user_by_email($email))) {\n\t\tthrow new RegistrationException(elgg_echo('registration:dupeemail'));\n\t}\n\n\taccess_show_hidden_entities($access_status);\n\n\t// Create user\n\t$user = new ElggUser();\n\t$user->username = $username;\n\t$user->email = $email;\n\t$user->name = $username; // original $name. But we don't want to use name by \n\t$user->realname = $name; // added for ggouv\n\t$user->access_id = ACCESS_PUBLIC;\n\t$user->salt = generate_random_cleartext_password(); // Note salt generated before password!\n\t$user->password = generate_user_password($user, $password);\n\t$user->owner_guid = 0; // Users aren't owned by anyone, even if they are admin created.\n\t$user->container_guid = 0; // Users aren't contained by anyone, even if they are admin created.\n\t$user->save();\n\n\t// If $friend_guid has been set, make mutual friends\n\tif ($friend_guid) {\n\t\tif ($friend_user = get_user($friend_guid)) {\n\t\t\tif ($invitecode == generate_invite_code($friend_user->username)) {\n\t\t\t\t$user->addFriend($friend_guid);\n\t\t\t\t$friend_user->addFriend($user->guid);\n\n\t\t\t\t// @todo Should this be in addFriend?\n\t\t\t\tadd_to_river('friends/river/create', 'friend', $user->getGUID(), $friend_guid);\n\t\t\t\tadd_to_river('friends/river/create', 'friend', $friend_guid, $user->getGUID());\n\t\t\t}\n\t\t}\n\t}\n\n\t// Turn on email notifications by default\n\tset_user_notification_setting($user->getGUID(), 'email', true);\n\n\treturn $user->getGUID();\n}", "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 register_action()\n {\n $registration_successful = RegistrationModel::registerNewUser();\n\n if ($registration_successful) {\n Redirect::to('index');\n } else {\n Redirect::to('user/register');\n }\n }", "public function doRegister(){\n\t\t\t$requestUser = $this->registerView->getRequestUserName();\n\t\t\t$requestPassword = $this->registerView->getRequestPassword();\n\t\t\t$requestRePassword = $this->registerView->getRequestRePassword();\n\t\t\t\n\t\t\tif($this->registerView->didUserPressRegister() ){\n\t\t\t\ttry{\n\t\t\t\tif($this->checkUsername($requestUser) && $this->checkPassword($requestPassword,$requestRePassword)){\n\t\t\t\t\t//create and add new user\n\t\t\t\t\t$newUser = new User($requestUser,$requestPassword);\n\t\t\t\t\t$this->userList->add($newUser);\n\t\t\t\t\t\n\t\t\t\t\t$this->model->toggleJustRegistered();\n\t\t\t\t\t$this->model->setSessionUsername($requestUser);\n\t\t\t\t\t$this->navView->clearURL();\n\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\tcatch (UserFewCharException $ufce){\n\t\t\t\t\t$this->registerView->setErrorUsernameFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (UserBadCharException $udce){\n\t\t\t\t\t$this->registerView->setErrorUsernameInvalidChar();\n\t\t\t\t\t$this->registerView->setUsernameField(strip_tags($requestUser));\n\t\t\t\t} \n\t\t\t\tcatch (UserExistsException $uee){\n\t\t\t\t\t$this->registerView->setErrorUsernameExists();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordLenException $ple){\n\t\t\t\t\t$this->registerView->setErrorPasswordFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordMissmatchException $pme){\n\t\t\t\t\t$this->registerView->setErrorPasswordMatch();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t}\n\t\t\t\tif(empty($requestUser) && empty($requestPassword) && empty($requestRePassword))\n\t\t\t\t\t$this->registerView->setErrorMissingFields();\t\t\n\t\t\t}\n\t\t}", "public function new_user_registration($user_reg_data) {\r\n $this->db->insert('users', $user_reg_data);\r\n return TRUE;\r\n }", "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\t\tUser::deleting(function ($user) {\n\t\t\tif ($user->id === 1) {\n\t\t\t\treturn redirect()->back();\n\t\t\t}\n\t\t});\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 checkingApiCanRegisterUser(array $new_user)\n {\n $register_success=$this->api_request->post('user','register',$new_user);\n }", "public function register_new() {\n\t\t$fields = array(\n\t\t\t'address1', 'address2', 'city', 'comment', 'country', 'email', 'fax_src', 'first_name',\n\t\t\t'gender', 'insertion', 'company_name', 'lang', 'last_name', 'middle_name', 'mobile_src',\n\t\t\t'phone_src', 'prefix', 'state', 'suffix', 'zip', 'tax_ex_number', 'timezone'/* , 'house_num', 'house_suff' */\n\t\t);\n\t\t$clean_data = $this->_fill_account_data($fields);\n\n\t\t$clean_data['password'] = $_POST['password'];\t## password may contain escapeable symbols\n\t\t$clean_data['fraud_check'] = 1;\n\t\t$clean_data['ip_address'] = $this->translator->getClientIp();\n\n\t\tinstall_error_handler(array('UserPerson', 'NewAccountsDenied', 'UserExtData', 'InvalidAccountStatus'), 'handle_register_new_account_error');\n\t\t$account_id = call('create_customer', $clean_data, 'HSPC/API/Account');\n\t\tif($account_id) {\n\t\t\t$this->error->add(MC_SUCCESS, 'YOU_BEEN_REGISTERED');\n\t\t\treturn $this->sign_in();\n\t\t} else {\n\t\t\treturn false;\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 }", "function RegisterUser(){\r\n\t\tif(!isset($_POST['submitted'])){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$formvars = array();\r\n\r\n\t\tif(!$this->ValidateRegistrationSubmission()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$itemPicture = $this->upLoadUserPic();\r\n\t\tif($itemPicture != false){\r\n\t\t\t$formvars['Upic'] = $this->upLoadUserPic();\r\n\t\t}\r\n\t\t\r\n\t\t$this->CollectRegistrationSubmission($formvars);\r\n\t\t\r\n\t\tif(!$this->comparePswd($formvars)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(!$this->SaveToEventAdvDatabase($formvars)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t/*if(!$this->sendConfimMail($formvars)){\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\r\n\t\t//$this->SendAdminIntimationEmail($formvars);\r\n\r\n\t\treturn true;\r\n\t}", "static private function createNewUserFromPost() {\r\n\t\t$errors = array();\r\n\r\n\t\t$activationHash = (System::isAtLocalhost()) ? '' : self::getRandomHash();\r\n\t\t$newAccountId = DB::getInstance()->insert('account',\r\n\t\t\t\tarray('username', 'name', 'mail', 'password', 'registerdate', 'activation_hash'),\r\n\t\t\t\tarray($_POST['new_username'], $_POST['name'], $_POST['email'], self::passwordToHash($_POST['password']), time(), $activationHash));\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = true;\r\n\t\tself::$NEW_REGISTERED_ID = $newAccountId;\r\n\r\n\t\tif ($newAccountId === false)\r\n\t\t\t$errors[] = __('There went something wrong. Please contact the administrator.');\r\n\t\telse {\r\n\t\t\tself::importEmptyValuesFor($newAccountId);\r\n\t\t\tself::setSpecialConfigValuesFor($newAccountId);\r\n\r\n\t\t\tif ($activationHash != '')\r\n\t\t\t\tself::setAndSendActivationKeyFor($newAccountId, $errors);\r\n\t\t}\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = false;\r\n\t\tself::$NEW_REGISTERED_ID = -1;\r\n\r\n\t\treturn $errors;\r\n\t}", "public function register() {\n \n $this->form_validation->set_rules('email', 'Email', 'required|valid_email');\n $this->form_validation->set_rules('password', 'Passwort', 'required');\n $this->form_validation->set_rules('dataprotection', 'Datenschutz', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n if (strtolower($this->input->post('dataprotection')) == 'true') {\n \t// TODO: save acceptance or acceptance date to db, i.e. hand over to model\n } else {\n \t$this->error(404, 'Dataprotection error');\n } \n \n $this->user_model->setValue('email', $this->input->post('email'));\n $this->user_model->setValue(\n \t'hashed_password', \n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n\n if (! $this->user_model->newUser()) {\n\t\t\t$this->error(409, 'Duplicate');\n }\n\n\t\t$this->sendConfirmationMail($this->input->post('email'));\n\t\t$data['msg'] = $this->input->post('email') . ' registered.';\n\t\t$this->responseWithCode(201, $data);\n }", "function HookAuto_groupTeam_userReplace_create_user_save(){\n\tglobal $lang,$baseurl_short;\n\tif (getval(\"newuser\",\"\")!=\"\" && getval(\"auto_group\",\"\")==\"yes\"){\n\t\t$new=getvalescaped(\"newuser\",\"\");\n\t\t# Username already exists?\n\t\t$c=sql_value(\"select count(*) value from user where username='$new'\",0);\n\t\tif($c>0){\n\t\t\t$error=$lang[\"useralreadyexists\"];\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tredirect($baseurl_short.\"plugins/auto_group/pages/new_group.php?username=\" . $new);\n\t\t}\n\t}\n}", "static public function tryToRegisterNewUser() {\r\n\t\t$errors = array();\r\n\r\n\t\tif (strlen($_POST['new_username']) < self::$USER_MIN_LENGTH)\r\n\t\t\t$errors[] = array('new_username' => sprintf( __('The username has to contain at least %s signs.'), self::$USER_MIN_LENGTH));\r\n\r\n\t\tif (self::usernameExists($_POST['new_username']))\r\n\t\t\t$errors[] = array('new_username' => __('This username is already used.'));\r\n\r\n\t\tif (self::mailExists($_POST['email']))\r\n\t\t\t$errors[] = array('email' => __('This email is already used.'));\r\n\r\n\t\tif ($_POST['password'] != $_POST['password_again'])\r\n\t\t\t\t$errors[] = array('password_again' => __('The passwords have to be the same.'));\r\n\r\n\t\tif (strlen($_POST['password']) < self::$PASS_MIN_LENGTH)\r\n\t\t\t$errors[] = array('password' => sprintf( __('The password has to contain at least %s signs.'), self::$PASS_MIN_LENGTH));\r\n\r\n\t\tif (empty($errors))\r\n\t\t\t$errors = self::createNewUserFromPost();\r\n\r\n\t\tif (empty($errors))\r\n\t\t\treturn true;\r\n\r\n\t\treturn $errors;\r\n\t}", "public function addNewUser() {\n redirect('auth/register');\n }", "public function newUser($request)\r\n {\r\n /*\r\n * As before we set $params1 'Username'. We need this to check if user exist in database beacuse we don't allow\r\n * two user in database with the same username.\r\n */\r\n $params1 = [\r\n 'Username' => $request['username']\r\n ];\r\n if ($this->existUser($params1) == True) {\r\n /*\r\n * If in the database exits user with the same username then you return false (user must change username)\r\n */\r\n\r\n return False;\r\n } else {\r\n\r\n /*\r\n * Next step is creating a valid activation hash code. We need this for security (in URL you dont want to show UserID\r\n * beacuse in this case attacker has more information about your database)\r\n * Each of users in database has unique activation hash code. Activation hash code we need for activation account and\r\n * reseting password.\r\n *\r\n * Now,follow algorithm for creating unique activation hash code.\r\n */\r\n while (True) {\r\n $params2 = [\r\n 'Activation' => password_hash(rand(), PASSWORD_DEFAULT)\r\n ];\r\n\r\n if ($this->existUser($params2) != True) {\r\n break;\r\n }\r\n }\r\n\r\n /*\r\n * Next step is set params which need to create new user into database.\r\n */\r\n\r\n $params3 = [\r\n 'Username' => $request['username'],\r\n 'Email' => $request['email'],\r\n 'Password' => password_hash($request['password'], PASSWORD_DEFAULT),\r\n 'IsDeleted' => '0',\r\n 'Registration' => (new DateTime('now'))->format('Y-m-d h:s'),\r\n 'Activation' => $params2['Activation']\r\n ];\r\n\r\n $userID = $this->create();\r\n\r\n /*\r\n * Creating link which is send to user mail at registration for activating his account.\r\n */\r\n $link = \"http://www.mdtohtml.com/index.php?activation=\" . $params3['Activation'];\r\n\r\n /*\r\n * Inserting new user in database\r\n */\r\n $this->update($userID, $params3);\r\n\r\n /*\r\n * Now we have to prepare data to send activation mail to user (mail).\r\n */\r\n\r\n $data = [\r\n 'email' => $request['email'],\r\n 'title' => 'Registration support',\r\n 'body' => \"Hello!\\n\\nClick on below link to confirm your registration.\\n\\n$link\",\r\n 'subject' => 'Confirm password',\r\n 'user' => $request['username'],\r\n 'link' => $link,\r\n 'username' => '[email protected]',\r\n 'password' => 'preskok123'\r\n\r\n ];\r\n\r\n /*\r\n * At the end sending activating mail to user.\r\n */\r\n\r\n $this->send_mail($data);\r\n return True;\r\n }\r\n\r\n }", "public function register_action() \n\t{\n $rules = array(\n 'username' => 'required',\n 'email' => 'valid_email|required',\n 'password' => 'required',\n 'password2' => 'required',\n 'securityq1' => 'required',\n 'securityq2' => 'required',\n 'securitya1' => 'required',\n 'securitya2' => 'required',\n\n );\n \n // Readible array\n $readible = \n [ \n 'securityq1' => 'Security Queston 1',\n 'securityq2' => 'Security Queston 2',\n 'securitya1' => 'Security Answer 1',\n 'securitya2' => 'Security Answer 2'\n ];\n\n // readible inputs\n FormValidation::set_field_names($readible);\n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n\n UserModel::register();\n }", "function Register()\r\n\t{\r\n\t\tglobal $Site;\r\n\t\t//if all the details is valid save the user on data base\r\n\t\tif ($this->IsValid())\r\n\t\t{\r\n\t\t\t$MemberID = GetID(\"member\", \"MemberID\");//getting last MemberID +1 for adding one more user\r\n\t\t\t$DateAdded = date(\"Y-m-d H:i:s\");\r\n\t\t\t$DateUpdated = $DateAdded;\r\n\t\t\t$IsEnable = 1;\r\n\t\t\t$pass = base64_encode($this->Password);\r\n\t\t\t$SQL = \"insert into member (MemberID, ProfileType, FirstName, LastName, TelNo, Email, Password, IsActive, IsEnable, DateAdded, DateUpdated) values ($MemberID, 'user', '$this->FirstName', '$this->LastName', '$this->PhoneNumber', '$this->Email', '$pass', '1' , '$IsEnable', '$DateAdded', '$DateUpdated')\";\r\n\t\t\tGetRS($SQL);\r\n\t\t\t$_SESSION['SAWMemberID'] = $MemberID;//cookie- to not allow impersonation of another user PHP gives each customer ID\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}\t\t\r\n\t}", "function register_action()\n {\n $login_model = $this->loadModel('Login');\n $registration_successful = $login_model->registerNewUser();\n\n if ($registration_successful == true) {\n $this->view->render('login/index');\n } else {\n $this->view->render('login/register');\n }\n }", "public function registration()\n {\n \n }", "private function generateUser()\n {\n \t$user=new User();\n \t$user->scenario = 'registration';\n \t$user->username=$this->user_name_prefix . '_' . time() . ++$this->userNameCounter;\n \t$user->email=time() . ++$this->emailCounter . $this->faker->unique()->email;\n \t$user->language = Yii::$app->language;\n \t$user->status = User::STATUS_ENABLED;\n \t$this->userId = $user->save(false) ? $user->id:false;\n \t$this->data[] = ['id'=>$user->id,'type'=>'user'];\n \treturn true;\n }", "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 }", "function add() {\n RR_Session::start();\n $get = RR_Session::get('loggedin');\n if ($get == true) {\n // blijf op de pagina\n // en laad de admin view\n $this->validateUser(true, 'newuser');\n } else {\n // anders redirect trug naar de login pagina\n $this->validateUser(false);\n }\n }", "function autoregister_create_new_user($itemId)\n {\n $item = Item::newInstance()->findByPrimaryKey($itemId['pk_i_id']);\n // if not exist user\n if( $item['fk_i_user_id'] == NULL ) {\n // create new user + send email\n $name = $item['s_contact_name'];\n $email = $item['s_contact_email'];\n // prepare data for register user\n $aux_password = osc_genRandomPassword();\n // clear params ....\n $input = array();\n $input['s_name'] = Params::getParam('s_name') ;\n Params::setParam('s_name', $name ); // from inserted item\n $input['s_email'] = Params::getParam('s_email') ;\n Params::setParam('s_email', $email ); // from inserted item\n $input['s_password'] = Params::getParam('s_password') ;\n Params::setParam('s_password', $aux_password ); // generated\n $input['s_password2'] = Params::getParam('s_password2') ;\n Params::setParam('s_password2', $aux_password ); // generated\n $input['s_website'] = Params::getParam('s_website') ;\n Params::setParam('s_website', '');\n $input['s_phone_land'] = Params::getParam('s_phone_land') ;\n Params::setParam('s_phone_land', '');\n $input['s_phone_mobile'] = Params::getParam('s_phone_mobile') ;\n Params::setParam('s_phone_mobile', '');\n $input['countryId'] = Params::getParam('countryId');\n Params::setParam('countryId', '');\n $input['regionId'] = Params::getParam('regionId');\n Params::setParam('regionId', '');\n $input['cityId'] = Params::getParam('cityId');\n Params::setParam('cityId', '');\n $input['cityArea'] = Params::getParam('cityArea') ;\n Params::setParam('cityArea', '');\n $input['address'] = Params::getParam('address') ;\n Params::setParam('address', '');\n $input['b_company'] = (Params::getParam('b_company') != '' && Params::getParam('b_company') != 0) ? 1 : 0 ;\n Params::setParam('b_company', '0');\n\n require_once LIB_PATH . 'osclass/UserActions.php' ;\n $userActions = new UserActions(false) ;\n $success = $userActions->add() ;\n\n switch($success) {\n case 1: osc_add_flash_ok_message( _m('The user has been created. An activation email has been sent')) ;\n $success = true;\n break;\n case 2: osc_add_flash_ok_message( _m('Your account has been created successfully')) ;\n $success = true;\n break;\n case 3: osc_add_flash_warning_message( _m('The specified e-mail is already in use')) ;\n $success = false;\n break;\n case 4: osc_add_flash_error_message( _m('The reCAPTCHA was not entered correctly')) ;\n $success = false;\n break;\n case 5: osc_add_flash_warning_message( _m('The email is not valid')) ;\n $success = false;\n break;\n case 6: osc_add_flash_warning_message( _m('The password cannot be empty')) ;\n $success = false;\n break;\n case 7: osc_add_flash_warning_message( _m(\"Passwords don't match\")) ;\n $success = false;\n break;\n }\n\n if($success) {\n Log::newInstance()->insertLog('plugin_autoregister', 'autoregister', '', $email.' '.$_SERVER['REMOTE_ADDR'], 'autoregister', osc_logged_admin_id()) ;\n // update user of item\n $user = User::newInstance()->findByEmail($email);\n Item::newInstance()->update(array('fk_i_user_id' => $user['pk_i_id'] ), array('pk_i_id' => $itemId ) );\n $item = Item::newInstance()->findByPrimaryKey($itemId);\n\n autoregister_sendMail($email, $user, $aux_password);\n\n // not activated\n if( $item['b_active'] != 1 ) {\n osc_run_hook('hook_email_item_validation', $item);\n }\n }\n\n // set params again\n Params::setParam('s_name', $input['s_name']);\n Params::setParam('s_email', $input['s_email']);\n Params::getParam('s_password', $input['s_password']) ;\n Params::getParam('s_password2', $input['s_password2']) ;\n Params::setParam('s_website', $input['s_website']);\n Params::setParam('s_phone_land', $input['s_phone_land']);\n Params::setParam('s_phone_mobile', $input['s_phone_mobile']);\n Params::setParam('countryId', $input['countryId']);\n Params::setParam('regionId', $input['regionId']);\n Params::setParam('cityId', $input['cityId']);\n Params::setParam('cityArea', $input['cityArea'] );\n Params::setParam('address', $input['address']);\n Params::setParam('b_company', $input['b_company']);\n // end\n }\n }", "public function registerNewUser()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('register', Input::all());\n\n\t\t# if we successfully register a new user\n\t\tif(isset($response['success']))\n\t\t{\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# grab the data array from the response\n\t\t\tSession::flash('success', $response['success']['data']);\n\n\t\t\t# show the user profile screen\n\t\t\treturn Redirect::route('profile');\n\t\t}\n\t\t# there was a problem registering the user\n\t\telse \n\t\t{\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('registration-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the sign up form again\n\t\t\treturn Redirect::back();\n\t\t}\n\t}", "function register_user($new) {\n \n $this->db->insert('users', $new);\n }", "public function validUser();", "function RegisterUser($newUser, $connection)\n\t{\n\t\tif(insertUser($newUser, $connection))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function registration() {\r\n \r\n if (isset($_GET[\"submitted\"])) {\r\n $this->registrationSubmit();\r\n } else {\r\n \r\n }\r\n }", "public function onUserBeforeSave($user,$isnew,$new) {\n\t\tif(!$isnew) {\n\t\t\treturn TRUE; // Existing users are not needed here\n\t\t}\n\n\n\t\t$firstname\t\t= JArrayHelper::getValue($new['jopensimregister'], 'firstname', null, 'string');\n\t\t$lastname\t\t= JArrayHelper::getValue($new['jopensimregister'], 'lastname', null, 'string');\n\n\t\t$usertype\t\t= $this->params->get('plgJopensimRegisterUser');\n\t\t$allowsamename\t= $this->params->get('plgJopensimAllowSameName',0);\n\t\tif(!$allowsamename) {\n\t\t\tif($usertype == \"optional\" && !$firstname && !$lastname) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\tif($firstname == $lastname) {\n\t\t\t\tJFactory::getApplication()->enqueueMessage(JTEXT::_('PLG_JOPENSIMREGISTER_ERROR_SAMENAME'),\"error\");\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\tJPlugin::loadLanguage( 'plg_user_jOpenSimRegister', JPATH_ADMINISTRATOR );\n\n\t\t$option\t\t\t\t\t= JFactory::getApplication()->input->get('option','','method','string');\n\t\t$view\t\t\t\t\t= JFactory::getApplication()->input->get('view','','method','string');\n\t\t$task\t\t\t\t\t= JFactory::getApplication()->input->get('task','','method','string');\n\t\t$retval\t\t\t\t\t= FALSE;\n\t\t$plgRegisterjOpenSim\t= JPluginHelper::getPlugin('user', 'jopensimregister');\n\t\t$registerForms = $this->getEnabledForms();\n\n\t\tif($option == \"com_users\" && $task == \"register\") {\n\t\t\t$retval = $this->checkUser($firstname,$lastname);\n\t\t}\n\n\t\tif($option == \"com_comprofiler\" && $task == \"saveregisters\" && $registerForms['cb'] == \"yes\") {\n\t\t\t$retval = $this->checkUser($firstname,$lastname);\n\t\t}\n\t\tif($option == \"com_users\" && $task == \"apply\") {\n\t\t\t$retval = TRUE;\n\t\t}\n\t\treturn $retval;\n\t}", "public function register() {\n\t\t$user_email = $this->input->post(\"email\");\n\t\t$user_password = md5($this->input->post('password'));\n\t\t$user_reg_ip = ip2long($this->input->ip_address());\n\t\t\n\t\t$re = $this->user_lib->save_reg_userInfo($user_email,$user_password,$user_reg_ip);\n\t\t\n\t\tif($re===false){\n\t\t\t//set mc error\n\t\t}\n\t\t/*if(!$this->email_lib->send_active_email($user_email)){\n\t\t\t//send mail error\n\t\t}*/\n\t\t$uid = $this->user_lib->active_process($user_email);\n\t\tif($uid===false){\n\t\t\treturn false;\t\t//for active error\n\t\t}\n\t//\t$this->_set_login_cookie($uid);\n\t\tredirect('/regsuccess'); \n\t}", "function give_register_and_login_new_user( $user_data = array() ) {\n\t// Verify the array.\n\tif ( empty( $user_data ) ) {\n\t\treturn - 1;\n\t}\n\n\tif ( give_get_errors() ) {\n\t\treturn - 1;\n\t}\n\n\t$user_args = apply_filters( 'give_insert_user_args', array(\n\t\t'user_login' => isset( $user_data['user_login'] ) ? $user_data['user_login'] : '',\n\t\t'user_pass' => isset( $user_data['user_pass'] ) ? $user_data['user_pass'] : '',\n\t\t'user_email' => isset( $user_data['user_email'] ) ? $user_data['user_email'] : '',\n\t\t'first_name' => isset( $user_data['user_first'] ) ? $user_data['user_first'] : '',\n\t\t'last_name' => isset( $user_data['user_last'] ) ? $user_data['user_last'] : '',\n\t\t'user_registered' => date( 'Y-m-d H:i:s' ),\n\t\t'role' => give_get_option( 'donor_default_user_role', 'give_donor' ),\n\t), $user_data );\n\n\t// Insert new user.\n\t$user_id = wp_insert_user( $user_args );\n\n\t// Validate inserted user.\n\tif ( is_wp_error( $user_id ) ) {\n\t\treturn - 1;\n\t}\n\n\t// Allow themes and plugins to filter the user data.\n\t$user_data = apply_filters( 'give_insert_user_data', $user_data, $user_args );\n\n\t/**\n\t * Fires after inserting user.\n\t *\n\t * @since 1.0\n\t *\n\t * @param int $user_id User id.\n\t * @param array $user_data Array containing user data.\n\t */\n\tdo_action( 'give_insert_user', $user_id, $user_data );\n\n\t/**\n\t * Filter allow user to alter if user when to login or not when user is register for the first time.\n\t *\n\t * @since 1.8.13\n\t *\n\t * return bool True if login with registration and False if only want to register.\n\t */\n\tif ( true === (bool) apply_filters( 'give_log_user_in_on_register', true ) ) {\n\t\t// Login new user.\n\t\tgive_log_user_in( $user_id, $user_data['user_login'], $user_data['user_pass'] );\n\t}\n\n\t// Return user id.\n\treturn $user_id;\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 }", "function register()\n\t\t{\n\t\t\tif ($this->input->post('create_user'))\n\t\t\t{\n\t\t\t\tif ($this->data['user'])\n\t\t\t\t{\n\t\t\t\t\tif ($this->ion_auth->in_group('public'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->session->set_flashdata('alert', array(\n\t\t\t\t\t\t\t'type' => 'danger',\n\t\t\t\t\t\t\t'message' => 'You are already registered.'\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\t// redirect them back to this page.\n\t\t\t\t\t\tredirect(current_url(), 'refresh');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$tables = $this->config->item('tables','ion_auth');\n\t\t\t\t$identity_column = $this->config->item('identity','ion_auth');\n\t\t\t\t$this->data['identity_column'] = $identity_column;\n\n\t\t\t\t// validate form input\n\t\t\t\t$this->form_validation->set_rules('username', 'above', 'required|is_unique['.$tables['users'].'.'.$identity_column.']');\n\t\t\t\t$this->form_validation->set_rules('password_confirm', 'above', 'required');\n\t\t\t\t$this->form_validation->set_rules('password', 'above', 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\n\t\t\t\t$this->form_validation->set_rules('email', 'above', 'required|valid_email');\n\t\t\t\t$this->form_validation->set_rules('address', 'above', 'required');\n\t\t\t\t$this->form_validation->set_rules('phone', 'above', 'required|trim');\n\n\t\t\t\t// Add data for different user groups.\n\t\t\t\t$this->form_validation->set_rules('first_name', 'above', 'required');\n\t\t\t\t$this->form_validation->set_rules('last_name', 'above', 'required');\n\n\t\t\t\tif ($this->form_validation->run() == true)\n\t\t\t\t{\n\t\t\t\t\t$email = strtolower($this->input->post('email'));\n\t\t\t\t\t$identity = $this->input->post('username');\n\t\t\t\t\t$password = $this->input->post('password');\n\n\t\t\t\t\t$profile = array(\n\t\t\t\t\t\t'first_name' => $this->input->post('first_name'),\n\t\t\t\t\t\t'last_name' => $this->input->post('last_name'),\n\t\t\t\t\t\t'address' => $this->input->post('address'),\n\t\t\t\t\t\t'phone' => $this->input->post('phone'),\n\t\t\t\t\t);\n\n\t\t\t\t\t$group = array('2'); // Sets user to public.\n\n\t\t\t\t\tif ($_FILES['userfile']['size'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$avatar = $this->upload_image();\n\t\t\t\t\t\tif ( ! $avatar['error'])\n\t\t\t\t\t\t\t$profile['avatar'] = $avatar['path'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$user_id = $this->ion_auth->register($identity, $password, $email, $profile, $group);\n\n\t\t\t\t\t$this->load->library('flexi_cart_admin');\n\n\t\t\t\t\tif ($user_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Define profile information.\n\t\t\t\t\t\t// $this->users_model->add($profile);\n\n\t\t\t\t\t\t$this->flexi_cart_admin->set_status_message('Account was successfully created', 'public', TRUE);\n\t\t\t\t\t\t$this->session->set_flashdata('message', $this->flexi_cart_admin->get_messages('public'));\n\n\t\t\t\t\t\t// redirect them back to the login page\n\t\t\t\t\t\tredirect(\"login\", 'refresh');\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$this->flexi_cart_admin->set_error_message(($this->ion_auth->errors() ? $this->ion_auth->errors() : 'Account could not be created'), 'public', TRUE);\n\t\t\t\t\t\t$this->session->set_flashdata('message', $this->flexi_cart_admin->get_messages('public'));\n\n\t\t\t\t\t\t// redirect them back to the login page\n\t\t\t\t\t\tredirect(\"register\", 'refresh');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Get any status message that may have been set.\n\t\t\t$this->data['message'] = $this->session->flashdata('message');\n\n\t\t\t// display the create user form\n\t\t\t$this->load->view('public/auth/register_user', $this->data);\n\t\t}", "public function test_is_new_user_can_register()\n {\n $data = factory('App\\User')->make();\n\n $this->post(route('register'), $data->toArray())\n ->assertRedirect(\"/\");\n }", "public function registerNewMemberOrFail(Users $entity)\n {\n }", "private function registerNewUser()\n {\n if (empty($_POST['user_name'])) {\n $this->errors[] = \"Nome Vazio\";\n } elseif (empty($_POST['user_password_new']) || empty($_POST['user_password_repeat'])) {\n $this->errors[] = \"Senha Vazia\";\n } elseif ($_POST['user_password_new'] !== $_POST['user_password_repeat']) {\n $this->errors[] = \"Senha e repetir senha não são a mesma\";\n } elseif (strlen($_POST['user_password_new']) < 6) {\n $this->errors[] = \"Senha tem tamanho mínimo de 6 caracteres\";\n } elseif (strlen($_POST['user_name']) > 64 || strlen($_POST['user_name']) < 2) {\n $this->errors[] = \"Nome não pode ser menor que 2 ou maior que 64 caracteres\";\n } elseif (empty($_POST['user_email'])) {\n $this->errors[] = \"Email não pode ser vazio\";\n } elseif (strlen($_POST['user_email']) > 64) {\n $this->errors[] = \"Email não pode ser maior que 64 caracteres\";\n } elseif (!filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)) {\n $this->errors[] = \"Seu email não está com um formato de email válido\";\n } elseif (!empty($_POST['user_name'])\n && strlen($_POST['user_name']) <= 64\n && strlen($_POST['user_name']) >= 2\n && !empty($_POST['user_email'])\n && strlen($_POST['user_email']) <= 64\n && filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)\n && !empty($_POST['user_password_new'])\n && !empty($_POST['user_password_repeat'])\n && ($_POST['user_password_new'] === $_POST['user_password_repeat'])\n ) {\n // create a database connection\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_PORT);\n\n // change character set to utf8 and check it\n if (!$this->db_connection->set_charset(\"utf8\")) {\n $this->errors[] = $this->db_connection->error;\n }\n\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n\n // escaping, additionally removing everything that could be (html/javascript-) code\n $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));\n $user_email = $this->db_connection->real_escape_string(strip_tags($_POST['user_email'], ENT_QUOTES));\n\n $user_type = $_POST['tipo'];\n $user_inst_id = $_POST['instituicao'];\n \n if (!isset($_POST['matricula']))\n {\n $user_mat = \"\";\n }\n else\n {\n $user_mat = $this->db_connection->real_escape_string(strip_tags($_POST['matricula'], ENT_QUOTES));\n }\n $user_password = $_POST['user_password_new'];\n\n // crypt the user's password with PHP 5.5's password_hash() function, results in a 60 character\n // hash string. the PASSWORD_DEFAULT constant is defined by the PHP 5.5, or if you are using\n // PHP 5.3/5.4, by the password hashing compatibility library\n $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);\n\n // check if user or email address already exists\n $sql = \"SELECT * FROM users WHERE user_email = '\" . $user_email . \"';\";\n $query_check_user_email = $this->db_connection->query($sql);\n\n if ($query_check_user_email->num_rows == 1) {\n $this->errors[] = \"Desculpe, este email já está em uso.\";\n } else {\n // write new user's data into database\n $sql = \"INSERT INTO users (user_name, user_password_hash, user_email, user_type, inst_id, user_mat)\n VALUES('\" . $user_name . \"', '\" . $user_password_hash . \"', '\" . $user_email . \"', '\" . $user_type . \"', '\" . $user_inst_id . \"', '\" . $user_mat . \" ');\";\n $query_new_user_insert = $this->db_connection->query($sql);\n\n // if user has been added successfully\n if ($query_new_user_insert) {\n $this->messages[] = \"Sua conta foi criada com sucesso. Você pode logar agora.\";\n } else {\n $this->errors[] = \"Desculpe, seu registro falhou. Por favor volte e tente novamente.\";\n }\n }\n } else {\n $this->errors[] = \"Desculpe, sem conexão com o banco de dados.\";\n }\n } else {\n $this->errors[] = \"Um erro desconhecido aconteceu.\";\n }\n }", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "private function registerNewUser()\n {\n if (empty($_POST['user_name'])) {\n $this->errors[] = \"Empty Username\";\n } elseif (empty($_POST['user_password_new']) || empty($_POST['user_password_repeat'])) {\n $this->errors[] = \"Empty Password\";\n } elseif ($_POST['user_password_new'] !== $_POST['user_password_repeat']) {\n $this->errors[] = \"Password and password repeat are not the same\";\n } elseif (strlen($_POST['user_password_new']) < 6) {\n $this->errors[] = \"Password has a minimum length of 6 characters\";\n } elseif (strlen($_POST['user_name']) > 64 || strlen($_POST['user_name']) < 2) {\n $this->errors[] = \"Username cannot be shorter than 2 or longer than 64 characters\";\n } elseif (!preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])) {\n $this->errors[] = \"Username does not fit the name scheme: only a-Z and numbers are allowed, 2 to 64 characters\";\n } elseif (empty($_POST['user_email'])) {\n $this->errors[] = \"Email cannot be empty\";\n } elseif (strlen($_POST['user_email']) > 64) {\n $this->errors[] = \"Email cannot be longer than 64 characters\";\n } elseif (!filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)) {\n $this->errors[] = \"Your email address is not in a valid email format\";\n } elseif (!empty($_POST['user_name'])\n && strlen($_POST['user_name']) <= 64\n && strlen($_POST['user_name']) >= 2\n && preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])\n && !empty($_POST['user_email'])\n && strlen($_POST['user_email']) <= 64\n && filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)\n && !empty($_POST['user_password_new'])\n && !empty($_POST['user_password_repeat'])\n && ($_POST['user_password_new'] === $_POST['user_password_repeat'])\n ) {\n // create a database connection\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // change character set to utf8 and check it\n if (!$this->db_connection->set_charset(\"utf8\")) {\n $this->errors[] = $this->db_connection->error;\n }\n\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n\n // escaping, additionally removing everything that could be (html/javascript-) code\n $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));\n $user_last = $this->db_connection->real_escape_string(strip_tags($_POST['user_last'], ENT_QUOTES));\n $user_email = $this->db_connection->real_escape_string(strip_tags($_POST['user_email'], ENT_QUOTES));\n\n $user_password = $_POST['user_password_new'];\n\n // crypt the user's password with PHP 5.5's password_hash() function, results in a 60 character\n // hash string. the PASSWORD_DEFAULT constant is defined by the PHP 5.5, or if you are using\n // PHP 5.3/5.4, by the password hashing compatibility library\n $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);\n\n // check if user or email address already exists\n $sql = \"SELECT * FROM users WHERE user_email = '\" . $user_email . \"';\";\n $query_check_user_name = $this->db_connection->query($sql);\n\n if ($query_check_user_name->num_rows == 1) {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, that username / email address is already taken. </div>\";\n } else {\n // write new user's data into database\n $sql = \"INSERT INTO users (user_name, user_last, user_password_hash, user_email)\n VALUES('\" . $user_name . \"', '\" . $user_last . \"', '\" . $user_password_hash . \"', '\" . $user_email . \"');\";\n $query_new_user_insert = $this->db_connection->query($sql);\n\n // if user has been added successfully\n if ($query_new_user_insert) {\n $this->messages[] = \"<div class='alert alert-success center' role='alert'> Your account has been created successfully. Please check your emails.</div>\";\n\n // Load username and datejoined for verifcation via email hashing\n $sql=\"SELECT `user_id`, `user_name`, `user_date_joined` FROM `users` WHERE `user_email` = '\" . $user_email . \"';\";\n $query_load_hash_verify = $this->db_connection->query($sql);\n\n // if loaded then include send email and display message\n if ( $query_load_hash_verify) {\n $result_row = $query_load_hash_verify -> fetch_object();\n $codeid = $result_row->user_id;\n $code2 = md5($result_row->user_name);\n $code3 = md5($result_row->user_date_joined);\n\n // created a hash of when the user joined split it into two parts\n $cuthashtime = substr($code3, 0, 4);\n $endhashtime = substr($code3, -4); \n\n $hashedname = $code2;\n $middlehashname = substr($hashedname, 0, 4);\n\n include 'Email.php';\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, but we couldn't send your email. Please contact support.</div>\";\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, your registration failed. Please go back and try again. </div>\";\n }\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, no database connection. </div>\";\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> An unknown error occurred. </div>\";\n }\n }", "public function sellerCanRegister()\n {\n $input = [\n 'username' => 'iniusername' . Str::random(3),\n 'fullname' => 'ini nama ' . Str::random(4),\n 'email' => 'ini_email' . Str::random(4) . '@gmail.com',\n 'password' => 'P@sswr0d!',\n 'sex' => 0\n ];\n $response = $this->post('/api/seller/register', $input);\n $response->assertStatus(200);\n }", "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 userModel_beforeRegister_handler($sender, $args) {\n // Get the user's email domain.\n $email = val('Email', $args['RegisteringUser']);\n $domain = strtolower(substr($email, strrpos($email, '@')+1));\n\n // Check the user's email domain against our private lists.\n $domainList = array_merge($this->getBurnerDomains(), $this->getFreemailDomains());\n if (in_array($domain, $domainList)) {\n // Block the registration.\n $args['Valid'] = false;\n // Provide matching error as if a ban rule was invoked.\n $sender->Validation->addValidationResult('UserID', 'Sorry, permission denied.');\n }\n }", "public function registerNewUser()\n\t{\n\t\t$Request= new Request();\n\t\t\n\t\t$Controler_Main= Controler_Main::getInstance();\n\t\t$ErrorString=\"\";\n\t\tif(strlen($Request->getAsString(\"tb_Name\"))<3){$ErrorString.=\":T_REGISTER_ERROR1: <br />\";}\n\t\tif(strlen($Request->getAsString(\"tb_Pass\"))<5){$ErrorString.=\":T_REGISTER_ERROR2: <br />\";}\n\t\tif(strlen($Request->getAsString(\"tb_Pass\"))===$Request->getAsString(\"tb_PassConfirme\")){$ErrorString.=\":T_REGISTER_ERROR3:<br />\";}\n\t\t$UserFinder= new UserFinder();\n\t\tif(strlen($Request->getAsString(\"tb_Mail\"))>3)\n\t\t{\n\t\t\t$User=$UserFinder->findByMail($Request->getAsString(\"tb_Mail\"));\n\t\t\tif($User->getId()!=0)\n\t\t\t{\n\t\t\t\t$ErrorString.=\":T_REGISTER_ERROR4: <br />\";\n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\t$ErrorString.=\":T_REGISTER_ERROR5: <br />\";\n\t\t}\t\n\t\tif(strlen($Request->getAsString(\"tb_Mail\"))===$Request->getAsString(\"tb_MailConfirme\")){$ErrorString.=\":T_REGISTER_ERROR6:<br />\";}\n\t\tif(strlen($Request->getAsString(\"tb_Name\")))\n\t\t{\n\t\t\t$User=$UserFinder->findByName($Request->getAsString(\"tb_Name\"));\n\t\t\tif($User->getId()!=0){$ErrorString.=\":T_REGISTER_ERROR7: <br />\";}\n\t\t}\n\t\t\n\t\t\n\t\tif(!$this->isMailCorrect($Request->getAsString(\"tb_Mail\")))\n\t\t{\n\t\t\t$ErrorString.=\":T_REGISTER_ERROR8: <br />\";\n\t\t}\t\n\t\t\n\t\tif(strtolower($_SESSION['Captcha'])!=(strtolower($Request->getAsString(\"tb_Captcha\"))))\n\t\t{\n\t\t\t$ErrorString.=\":T_REGISTER_ERROR9: <br />\";\n\t\t}\n\t\t\t\n\t\tif(strlen($ErrorString)!=0)\n\t\t{\n\t\t\t$this->showRegister($ErrorString);\n\t\t\t$this->setCaptchaCode();\n\t\t\treturn false;\n\t\t}\n\t\t$User= new User(0,$Request->getAsString(\"tb_Name\"),md5($Request->getAsString(\"tb_Pass\")),$Request->getAsString(\"tb_Mail\"),0,1,0,0);\t\n\t\t$UserManager= new UserManager();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// user Ordner anlegen\n\t\t\n\t\t// htaccess zugriff legen\n\t\tif(!is_dir(STORE_FOLDER.\"/\".md5($User->getName())))\n\t\t{\n\t\t\tmkdir(STORE_FOLDER.\"/\".md5($User->getName()), 0777);// ordner erstellen\n\t\t\t$User->setFolder(STORE_FOLDER.\"/\".md5($User->getName()));\n\t\t}else\n\t\t{\n\t\t\t$Folder=STORE_FOLDER.\"/\".md5($User->getName()+mktime());\n\t\t\tmkdir($Folder, 0777);\n\t\t\t$User->setFolder($Folder);\n\t\t}\n\t\t\n\t\t$User->setSpaceMax(MAXSPACE);\n\t\t//var_dump(\"und den UserFinder eintragen\");\n\t\t$UserManager->insertUser($User);// user in die db eintragen\n\t\tif(!$UserManager->getLastInsertId())\n\t\t{\n\t\t\t$this->showRegister($ErrorString);\n\t\t\treturn false;\n\t\t}\n\t\t$User->setId($UserManager->getLastInsertId());\n\t\t$this->userLogin();\n\t\t\n\n\t}", "public function can_auto_create_users() {\n return (bool)$this->config['weautocreateusers'];\n }", "public function post_add_users() {\n\t}", "static function doCreateUser()\n {\n global $controller;\n runtime_csfr::Protect();\n $currentuser = ctrl_users::GetUserDetail();\n $formvars = $controller->GetAllControllerRequests('FORM');\n if ($formvars['inAccess'] == 1) {\n $access = \"%\";\n } else {\n $access = $formvars['inAccessIP'];\n }\n if (self::ExecuteCreateUser($currentuser['userid'], $formvars['inUserName'], $formvars['inDatabase'], $access))\n return true;\n return false;\n }", "function canCreateAccounts() {\n return false;\n }", "function registrarSesion () {\n\n if (!empty($this->id_usuario)) {\n $this->salvar(['ultima_session' => 'current_timestamp',\n 'activo' => 1\n ]);\n Helpers\\Sesion::sessionLogin();\n }\n else return false;\n\n }", "function subsite_manager_block_user_registration($hook, $type, $returnvalue, $params) {\n\t\t// need to show all users in order to be able to delete it\n\t\taccess_show_hidden_entities(true);\n\n\t\t// make sure registration fails, so the user gets removed\n\t\treturn false;\n\t}", "public function createUserFromRemote() {\n\t\treturn false;\n\t}", "public function canCreateAccounts()\n {\n return false;\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 }", "static function register_user($firstname, $lastname, $email, $password, $confirmpassword) {\n // registers a new user\n if (true) {\n // registering new users is currently disabled\n throw new Exception('Not_available');\n }\n // if data is invalid the function throws exceptions\n if ($firstname == NULL) {\n throw new Exception('No_first_name_given');\n } else if ($lastname == NULL) {\n throw new Exception('No_last_name_given');\n } else if (!Validation::is_email($email)) {\n throw new Exception('Invalid_email_address');\n } else if (!Validation::is_password($password)) {\n throw new Exception('Invalid_password');\n } else if ($password != $confirmpassword) {\n throw new Exception('Different_passwords');\n } else if (!self::email_available($email)) {\n throw new Exception('Email_alreads_in_use');\n } else {\n $salt = rand(0, 999999999);\n $password = sha1($salt . $password);\n unset($confirmpassword);\n $hash = sha1($salt . $email . $password);\n $reg_time = time();\n\n global $con;\n $sql = \"\n INSERT INTO `user` (`firstname`, `lastname`, `email`, `password`, `salt`, `reg_time`, `hash`)\n\t\t VALUES ('\".$firstname.\"', '\".$lastname.\"', '\".$email.\"', '\".$password.\"', \".$salt.\", \".$reg_time.\", '\".$hash.\"');\";\n $query = mysqli_query($con, $sql);\n\n $user_id = mysqli_insert_id($con);\n // create settings table entry\n $sql = \"INSERT INTO `user_settings` (`user`) VALUES (\".$user_id.\");\";\n $query = mysqli_query($con, $sql);\n\n\n // send email to registered user\n Mail::get_email_confirmation_mail($firstname, $email, $hash)->send();\n\n // mail to admin\n $admin_mail = new Mail(\"[email protected]\", Mail::DEFAULT_SENDER_EMAIL, null, \"New user\", \"\" . $firstname . \" \" . $lastname . \" has just signed up on Abfrage3!\");\n $admin_mail->send();\n\n return TRUE;\n }\n }", "public function createUserAction() {\n $this->authService->createUser();\n die();\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 register() {\n if (isset($_SESSION['userid'])) {\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->register();\n }\n }", "public function createUser()\n {\n }", "public function postRegister()\n\t{\n\t\t$user = new \\User;\n\n\t\t$user->email = \\Input::get( 'email' );\n\t\t$user->password = \\Input::get( 'password' );\n\n\t\t// The password confirmation will be removed from model\n\t\t// before saving. This field will be used in Ardent's\n\t\t// auto validation.\n\t\t$user->password_confirmation = \\Input::get( 'password_confirmation' );\n\n\t\t// Save if valid. Password field will be hashed before save\n\t\t$user->save();\n\n\t\tif ( $user->id )\n\t\t{\n\t\t\t//Assign the company role to this person\n\t\t\t$roleId = \\Role::where('name', '=', 'Company')->first()->id;\n\t\t\t$user->attachRole($roleId);\n\n\t\t\t// Redirect with success message, You may replace \"Lang::get(...\" for your custom message.\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getLogin')\n\t\t\t\t->with( 'notice', \\Lang::get('confide::confide.alerts.account_created') );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get validation errors (see Ardent package)\n\t\t\t$error = $user->errors()->all(':message');\n\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getRegister')\n\t\t\t\t->withInput(\\Input::except('password'))\n\t\t\t\t->with( 'error', $error );\n\n\t\t}\n\n\t}", "public function postRegister()\n\t{\n\t\t$rules = array(\n\t\t\t'username' => 'required|unique:users',\n\t\t\t'email' => 'required|email|unique:users|confirmed',\n\t\t\t'password' => 'required|min:8',\n\t\t\t'checkbox' => 'accepted',\n\t\t\t);\n\t\t\n\t\t//validate form input with validation rules\n\t\t$validator = Validator::make(Input::all(),$rules);\n\n\t\t// if validator failed\n\t\tif($validator->fails()){\n\n\t\t\t// redirect back to form with errors from validator\n\t\t\treturn Redirect::route('login')->withErrors($validator)->withInput();\n\t\t}\n\t\telse{\n\t\t\t$user = Sentry::createUser(array(\n\t\t\t\t'username' => Input::get('username'),\n\t\t\t\t'email' => Input::get('email'),\n\t\t\t\t'password' => Input::get('password'),\n\t\t\t\t));\n\n\t\t\t$membergroup = Sentry::findGroupByName('Members');\n\t\t\t$user->addGroup($membergroup);\n\n\t\t\t// get activation code\n\t\t\t$activationCode = $user->getActivationCode();\n\n\t\t\t// send activation code to user so that he can activate account\n\t\t\t// link should be shopcaddy.com/verify-activate/{token}\n\t\t\t// http://shopcaddy.localhost/verify-activate/wk2dJHluf7GzO1uG0P04gSfTm9NdqE5DBc3vNBGHOe\n\n\t\t\t// redirect back\n\t\t\treturn Redirect::to('login')->with('message',\"Thanks for signing up.<br>You will receive a verification email to confirm your email address.<br>If you don't see the email in your inbox, please check your spam folder or <a href='/contact-us'>contact support</a>.\");\n\t\t}\n\t}", "public function users_register_pre_add_user($h)\n {\n if (isset($h->vars['reg_flags'])) {\n $h->currentUser->role = 'pending';\n }\n }", "function register_new_user()\n{\n // alidate the data submited by our user\n $result = _validation([\n 'name' => 'required|string|max:255',\n 'email' => 'required|string|email|unique:users',\n 'password' => 'required|string|equals:password_confirmation'\n ]);\n\n // Get the validated data.\n $validated = $result['validated'];\n\n // _dump(bcrypt_hasher_make($validated['password']), true);\n\n // Create the user\n $user = create_new_user(\n $validated['name'],\n $validated['email'],\n bcrypt_hasher_make($validated['password']) // Always hash your users password\n );\n\n // Redirect back if the user was not created.\n _redirect_back_if($user === false, ['errors' => [\n 'Unable to register user at the moment.'\n ]]);\n\n // log the user in\n login_user($user);\n}", "protected function isUserAllowedToLogin() {}", "function userCanCreateUser( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function new_registration()\r\n\t{\r\n\t\tif(capthca::Code_check(post::variable('security_code','is_set')))\r\n\t\t{\r\n\t\t\t//build post data\r\n\t\t\t$this->username = post::variable('username','string');\r\n\t\t\t$this->email = post::variable('email','string');\r\n\t\r\n\t\t\t//Generate a random password this makes the hash even more random\r\n\t\t\t$this->salt = common::generate_random_string(16);\r\n\t\r\n\t\t\t//TODO use POST class!\r\n\t\t\t$string = $_SERVER['SERVER_NAME'].Settings::singleton()->get_setting('random_key').CMS::time().$this->username.$this->email.$this->salt;\r\n\t\t\t$this->hash = md5($string).sha1($string);\r\n\t\t\t\r\n\t\t\t$this->save_registration();\r\n\t\t\treturn $this->send_registration();\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public function isAllowedForUser(){\n\t\treturn true;\n\t}", "public function addUser(){}", "public function create(User $user)\n {\n if (Auth::check()==true ) {\n return true;\n }\n }", "function validate_user_signup()\n {\n }", "function createUser()\n{\n $userCheck = UsersQuery::create()->findOneByUsername($_POST['username']);\n if ($userCheck == \"\") {\n // next add user to db\n $user = new Users();\n $user->setUsername($_POST['username']);\n $user->setPassword($_POST['password']);\n $user->setName($_POST['name']);\n $user->setEmail($_POST['email']);\n $user->setStatus(\"active\");\n $user->setPicture(\"none\");\n $user->setCreated(time());\n $user->setModified(time());\n\n $user->save();\n\n if ($user != null) {\n echo \"user added successfully\";\n }\n } else {\n echo \"user already registered\";\n }\n}", "public function addUser(){\n\t}", "function RegisterPerson()\n {\n if(!isset($_POST['submitted']))\n {\n return false;\n }\n // Maak een Array\n $formvars = array();\n \n $this->CollectRegistrationSubmissionPerson($formvars);\n \n \n if(!$this->SaveToDatabasePerson($formvars))\n {\n return false;\n }\n \n return true;\n }", "public function check_insta_user() {\n \n }", "public function register() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection();\n\t\t\n $data = (\"INSERT INTO user (username,password,first_name,\n last_name,dob,address,postcode,email)\n VALUES ('{$this->_username}',\n '{$this->_sha1}',\n '{$this->_first_name}',\n '{$this->_last_name}',\n '{$this->_dob}',\n '{$this->_address}',\n '{$this->_postcode}',\n '{$this->_email}')\");\n\t\t\t\t\t\t \n\t\t\t$result = $mysqli->query($data);\n if ( $mysqli->affected_rows < 1)\n // checks if data has been succesfully inputed\n $this->_errors[] = 'could not process form';\n }", "function canCreateAccounts() {\r\n\t\treturn true;\r\n\t}", "public function register() {\n\n define('KDEBUG_JSON', true);\n\n $errors = array();\n $success = true;\n\n $slug = user::generateUniqueUsername($_REQUEST['username']);\n if (!isset($_REQUEST['username']) || empty($_REQUEST['username']) || $_REQUEST['username'] == 'Full name') {\n $errors['register_username'] = 'You must specify your Full Name';\n $success = false;\n } elseif (user::findOne(array('slug' => $slug))) {\n $errors['register_username'] = 'This username already exists';\n $success = false;\n }\n\n if (!isset($_REQUEST['email']) || empty($_REQUEST['email']) || $_REQUEST['email'] == 'email address') {\n $errors['register_email'] = 'You must specify an e-mail address';\n $success = false;\n } elseif (!filter_var($_REQUEST['email'], FILTER_VALIDATE_EMAIL)) {\n $errors['register_email'] = 'Invalid e-mail address';\n $success = false;\n } elseif (user::findOne(array('email' => $_REQUEST['email'])) != null) {\n $errors['register_email'] = 'This e-mail address already exists';\n $success = false;\n }\n\n\n if (!isset($_REQUEST['password']) || empty($_REQUEST['password']) || $_REQUEST['password'] == 'password') {\n $errors['register_password'] = 'You must specify a password';\n $success = false;\n } elseif (user::verify('password', $_REQUEST['password']) !== true) {\n $errors['register_password'] = user::verify('password', $_REQUEST['password']);\n $success = false;\n }\n\n if ($_REQUEST['password'] != $_REQUEST['verify']) {\n $errors['register_verify'] = 'Your passwords do not match';\n $success = false;\n }\n\n if ($success) {\n\n // create our new user\n $user = new user();\n $user->email = $_REQUEST['email'];\n $user->username = $_REQUEST['username'];\n $user->slug = $slug;\n\n $user->public = 1;\n $user->created = time();\n $user->updated = time();\n $user->password = crypt($_REQUEST['password']);\n $user->save();\n $user->login();\n\n }\n\n echo json_encode(array('success' => $success, 'errors' => $errors));\n return true;\n\n }", "public function Register() {\n //\n if ($this->IsUsernameOrEmailTaken_()) return false;\n\n $queryStr = \"INSERT INTO Admins (email,passwd,fName,lName,username,phoneNumber) VALUES ('{$this->email}','{$this->GetPasswordHash()}','{$this->fName}','{$this->lName}','{$this->GetUsername()}','{$this->phoneNumber}');\";\n if ($this->db->sql->query($queryStr)) {\n $this->QueryForID_();\n return true;\n }\n return false;\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\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 }", "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 }", "function register(){ \t\n\t\t$table = 'users';\n\t\t$capability =$sessionrole='';\t\t\n\t\t$type = $this->input->post('type');\n\t\t$redirect__url = base_url();\n\t\tif( $type == 'client' ):\n\t\t\t$role = 'client';\n\t\t\t$redirect__url = base_url('Interact/add_client');\n\t\telse:\n\t\t\t$role = $this->input->post('role');\n\t\t\t$redirect__url = base_url('Interact/add_user');\n\t\tendif; \n\t\t$attorney_id = $this->input->post('attorney_id');\n\t\t$user_name = $this->input->post('personInput');\n\t\t$current_url = $this->input->post('current_url');\n\t\t$companyName = $this->input->post('nameInput');\n\t\t$email = $this->input->post('emailInput');\n\t\t$password = $this->input->post('passInput');\n\t\t$confirm_password = $this->input->post('confirmPassInput');\n\t\t$phoneInput = $this->input->post('phoneInput');\n\t\t$screen_name = $this->input->post('screen_name');\t\t\n\t\tif( $role == 'admin' ):\t\t\t\n\t\t\t$customer_address = $this->input->post('customer_address');\n\t\t\t$street_number = $this->input->post('street_number');\n\t\t\t$city = $this->input->post('city');\n\t\t\t$state = $this->input->post('state');\n\t\t\t$postal_code = $this->input->post('postal_code');\n\t\tendif;\n\t\t$check_data = array('user_email' => $email);\n\t\t$check_user_availability = $this->InteractModal->check_user_availability( $check_data, $table );\n\t\tif(!empty($check_user_availability )):\n\t\t\t$this->session->set_flashdata('msg', 'User already exist with similar email!');\n\t\t\tif(!empty($current_url)){\n\t\t\tredirect( $current_url );\n\t\t\t}else{\n\t\t\tredirect( $redirect__url );\n\t\t\t}\n\t\telse:\n\t\t\t$data = array('user_email' => $email ,\n\t\t\t\t\t 'password' => md5( $password ),\n\t\t\t\t\t 'role' => $role,\n\t\t\t\t\t 'status' => 1,\n\t\t\t\t\t 'create_date' => date('Y-m-d h:i:s')\n\t\t\t);\t\t\t\n\t\t\t$response = $this->InteractModal->register_user($data, $table);\t\t\t\n\t\t\tif( array_key_exists('id', $response )): // update user meta in database \n\t\t\t\t$user_id = $response['id'];\t\n\t\t\t\t\t\n\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'concerned_person' , $user_name );\n\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'company_name' , $companyName );\n\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'phone_number' , $phoneInput );\t\t\t\t\n\t\t\t\tif( $role == 'admin' ):\n\t\t\t\t\tif(!empty($attorney_id)){\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'atterney_id' , $attorney_id );\n\t\t\t\t\t}\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'customer_address' , $customer_address );\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'street_number' , $street_number );\n\t\t\t\t\t//$this->InteractModal->add_user_meta( $user_id, 'route' , $route );\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'city' , $city );\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'state' , $state );\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'postal_code' , $postal_code );\n\t\t\t\t\t//$this->InteractModal->add_user_meta( $user_id, 'country' , $country );\t\t\t\t\t\n\t\t\t\tendif;\t\t\t\t\n\t\t\t\tif( $role =='client' ):\n\t\t\t\t\t$company_id = $this->input->post('company_id');\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'company_id' , $company_id );\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'screen_name' , $screen_name );\n\t\t\t\tendif;\n\t\t\t\t$company = preg_replace('/\\s+/', '+', $companyName);\n\t\t\t\t//$login_url = base_url('Interact/userlogin/'.$company.'&'.$user_id);\n\t\t\t\t$login_url = base_url();\n\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'login_url' , $login_url );\t\n\t\t\t\t$login_deatil = 'Your credentials for login in interactACM account is: <br /> username: '. $email .'<br /> Password: '. $password .'<br /> Login Url: '. $login_url. ' ';\n\t\t///get auto email content data \n\t\t\tif($role==\"client\"){\n\t\t\t\t$status_template = $this->InteractModal->get_user_meta( $company_id, 'status_template_id_1' );\n\t\t\t\tif(($status_template ==1) ){\n\t\t\t\t\t$subject = $this->InteractModal->get_user_meta( $company_id, 'subject_template_id_1' );\n\t\t\t\t\t$content = $this->InteractModal->get_user_meta( $company_id, 'content_template_id_1' );\n\t\t\t\t\t$logo_content = '<img src=\"'.base_url().'/assets/img/profiles/logo_(2).png\" height=\"auto\" width=\"100\" alt=\"Logo\">'; \n\t\t\t\t\t$content=nl2br($content);\n\t\t\t\t\t$content = str_replace(\"_NAME_\",$user_name,$content);\n\t\t\t\t\t$content = str_replace(\"_DATE_\",date('d-F-Y'),$content);\n\t\t\t\t\t$content = str_replace(\"_LOGO_\",$logo_content,$content);\n\t\t\t\t\t$content = str_replace(\"_EMAIL_\",$email,$content);\n\t\t\t\t\t$content = str_replace(\"_PHONE_\",$phoneInput,$content); \n\t\t\t\t\tif (strpos($content, '_LOGIN_DETAILS_') !== false) {\n\t\t\t\t\t\t $content = str_replace(\"_LOGIN_DETAILS_\",$login_deatil,$content); \n\t\t\t\t\t}else{\n\t\t\t\t\t\t $content = $content.'<br>'.$login_deatil;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$template_list = $this->InteractModal->get_email_template(1);\n\t\t\t\t\tforeach( $template_list as $template_lists ):\n\t\t\t\t\t\t$subject = $template_lists['subject']; \n\t\t\t\t\t\t$content = $login_deatil;\n\t\t\t\t\tendforeach;\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t\t///get auto email content data \t\t\t\t\n\t\t\t\t\t$email_data = array('email' => $email,\n\t\t\t\t\t\t\t\t\t\t'content' => $content,\n\t\t\t\t\t\t\t\t\t\t'subject' => $subject\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t$this->send_email($email_data );\n\t\t\t}else{\n\t\t\t\t$email_content = 'Welcome to interactACM. Your credentials for login in interactACM account is: <br /> username: '. $email .'<br /> Password: '. $password .'<br /> Login Url: '. $login_url. ' ';\t\t\t\t\n\t\t\t\t$email_data = array('email' => $email,\n\t\t\t\t\t\t\t\t\t'content' => $email_content,\n\t\t\t\t\t\t\t\t\t'subject' => 'Welcome to interactACM'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t$this->send_email( $email_data ); \n\t\t\t\t/*====Email send super admin =======*/\n\t\t\t\t$content_superadmin='Hi interactACM<br/> A new broker is register with us. The details of which are following<br>Broker Name: '.$user_name.'<br> Contact Number: '.$phoneInput.'<br> Contact Email: '.$email; \n\t\t\t\t\t$email_data1 = array('email' => '[email protected]', \n\t\t\t\t\t\t\t\t\t\t'content' => $content_superadmin, \n\t\t\t\t\t\t\t\t\t\t'subject' => 'New Broker Registration'\n\t\t\t\t\t\t\t\t\t\t); \t\t\t\t\t\n\t\t\t\t\t$this->send_email($email_data1);\n\t\t\t\t/*======Email send super admin========*/\n\t\t\t\tif(!empty($current_url)):\n $this->session->set_flashdata('msg', 'Thank you for registering with us. Your login credentials has been sent in registered email. Please check your mailbox.');\n\t\t\t redirect( $current_url ); \n\t\t\t\tendif;\n\t\t\t}\n\t\t\t\t$regex = \"/^(\\(?\\d{3}\\)?)?[- .]?(\\d{3})[- .]?(\\d{4})$/\"; \n\t\t\t\t$mobile = preg_replace($regex, \"\\\\1\\\\2\\\\3\", $phoneInput); \n\t\t\t\t//$this->send_text_message($mobile,$email);\t\t\t\t\n\t\t\t\tif( $role =='client' ):\n\t\t\t\t\tredirect( base_url('Interact/afterAddClient/'.urlencode(base64_encode($user_id )))); \n\t\t\t\telse:\n\t\t\t\t redirect( base_url( 'Interact/all_users/'.$role ) );\n\t\t\t\tendif;\n\t\t\t\t\n\t\t\telse:\n\t\t\t\techo $response['error'];\n\t\t\tendif; //==== error or id check ends\n\t\t\t//echo $response;\n\t\tendif;\t//==== user not exist proceed ends\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}", "private function valUserExisting(){\n if($this->_personDB->getActive()){\n if($this->logIn()){\n $this->addUserHttpSession();\n $this->_response = 'ok';\n }\n }else{\n $this->_response = '104';\n }\n }" ]
[ "0.7774363", "0.75109047", "0.721249", "0.71512955", "0.70099556", "0.6758585", "0.67004764", "0.6594448", "0.6591646", "0.65537596", "0.6490408", "0.64290816", "0.6426371", "0.63772327", "0.636086", "0.6356537", "0.63364154", "0.63057166", "0.629169", "0.62706554", "0.6264014", "0.6257168", "0.6244313", "0.6241339", "0.623966", "0.6232218", "0.6222509", "0.62174547", "0.620219", "0.61990166", "0.61961937", "0.6191423", "0.6185138", "0.61414945", "0.6128793", "0.6127809", "0.6120224", "0.61192876", "0.6114613", "0.61130637", "0.61128074", "0.611278", "0.6108055", "0.6099821", "0.60997474", "0.6094611", "0.60878956", "0.6086335", "0.60857105", "0.60692936", "0.6069021", "0.6068751", "0.6062005", "0.6062005", "0.6062005", "0.6062005", "0.6060351", "0.60343975", "0.6034397", "0.6029673", "0.601351", "0.6006231", "0.60017425", "0.60005534", "0.59965193", "0.5993672", "0.5990701", "0.5984264", "0.59770447", "0.59644526", "0.5963394", "0.5960237", "0.59519607", "0.59445983", "0.59423465", "0.5940983", "0.5933689", "0.5931362", "0.59256816", "0.5916135", "0.5909941", "0.5909437", "0.5906925", "0.590036", "0.5897816", "0.58935547", "0.5893223", "0.58900976", "0.58880144", "0.58869", "0.58835816", "0.5882039", "0.5881737", "0.5878614", "0.5873855", "0.5873855", "0.5870588", "0.58695954", "0.5869343", "0.5867488", "0.5861997" ]
0.0
-1
Sends the user a notification and records a security event if the password was changed.
public static function passwordChanged(ModelEvent $event) { $user = $event->getModel(); if (!$user->_changedPassword) { return; } $app = $user->getApp(); $auth = $app['auth']; $req = $auth->getRequest(); $ip = $req->ip(); $userAgent = $req->agent(); // record the reset password request event $event = new AccountSecurityEvent(); $event->user_id = $user->id(); $event->type = AccountSecurityEvent::CHANGE_PASSWORD; $event->ip = $ip; $event->user_agent = $userAgent; $event->save(); // changing the password signs the user out, everywhere $auth->signOutAllSessions($user); $user->markSignedOut(); $currentUser = $auth->getCurrentUser(); if ($currentUser->id() == $user->id()) { $auth->logout(); } // send the user an email about it $user->sendEmail('password-changed', ['ip' => $ip]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eventUpdatePassword(){\r\n\t\t$userid = util::getData(\"id\");\r\n\t\t$password1 = util::getData(\"password1\");\r\n\t\t$password2 = util::getData(\"password2\");\r\n\r\n\t\tif(!$this->canUpdateUser($userid))\r\n\t\t\treturn $this->setEventResult(false, \"You cannot update this account\");\r\n\r\n\t\t$result = dkpAccountUtil::SetOfficerAccountPassword($this->guild->id, $userid, $password1, $password2);\r\n\r\n\t\tif($result != dkpAccountUtil::UPDATE_OK)\r\n\t\t\t$this->setEventResult(false, dkpAccountUtil::GetErrorString($result));\r\n\t\telse\r\n\t\t\t$this->setEventResult(true,\"Password Changed!\");\r\n\r\n\t}", "function wp_password_change_notification($user)\n {\n }", "public function sendPasswordChangedEmail(User $user): void;", "private function notifyNewPassword(sfGuardUser $user, $password)\n {\n// $message = Swift_Message::newInstance()\n// ->setFrom(sfConfig::get('app_sf_guard_plugin_default_from_email', '[email protected]'))\n// ->setTo($this->user->email_address)\n// ->setSubject('New Password for '.$this->user->username)\n// ->setBody($this->getPartial('sfGuardForgotPassword/new_password', array('user' => $this->user, 'password' => $request['sf_guard_user']['password'])))\n// ;\n//\n// $this->getMailer()->send($message);\n\n $vars = array('user' => $user, 'password' => $password);\n\n $message_html = $this->getPartial('rtGuardForgotPassword/email_new_password_html', $vars);\n $message_html = $this->getPartial('rtEmail/layout_html', array('content' => $message_html));\n\n $message_plain = $this->getPartial('rtGuardForgotPassword/email_new_password_plain', $vars);\n $message_plain = $this->getPartial('rtEmail/layout_plain', array('content' => html_entity_decode($message_plain)));\n\n $message = Swift_Message::newInstance()\n ->setFrom($this->getAdminEmail())\n ->setTo($user->getEmailAddress())\n ->setSubject('New Password for '.$user->username)\n ->setBody($message_html, 'text/html')\n ->addPart($message_plain, 'text/plain');\n\n $this->getMailer()->send($message);\n }", "public function sendUserUpdateNotification(): void\n {\n $this->notify(new VerifyAccountNotification());\n }", "public function post_changePassword() {\n //try to change the password\n $status = AuxUser::changePassword();\n if ($status[0]) {\n //if the password change process worked, redirect to the profile page\n echo '<script>alert(\"Password Changed\");</script>';\n Response::redirect('/profile');\n } else {\n //if not, print the error message\n echo '<script>alert(\"'.$status[1].'\");</script>';\n Response::redirect('/profile');\n }\n }", "function regiomino_user_change_password($account, $password) {\r\n\t//watchdog('pwdaction', '@password', array('@password' => $password));\r\n $edit['pass'] = $password;\r\n user_save($account, $edit);\r\n}", "protected function changePassword() {}", "public function sendEmailGeneratePasswordNotification($password)\n {\n $this->notify(new SendMailNewPasswordNotification($password));\n }", "function request_admin_password_change() {\n\t\tif (isset($this->data['User']['forgot_password_email'])) {\n\t\t\t$forgot_password_email = $this->data['User']['forgot_password_email'];\n\t\t\t\n\t\t\t\n\t\t\t// check to make sure the email is a valid email for a user\n\t\t\t$change_password_user = $this->User->find('first', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'User.email_address' => $forgot_password_email,\n\t\t\t\t\t'User.admin' => true,\n\t\t\t\t),\n\t\t\t\t'contain' => false,\n\t\t\t));\n\t\t\t\n\t\t\tif (empty($change_password_user)) {\n\t\t\t\t$this->Session->setFlash(__('Email does not belong to a valid user', true), 'admin/flashMessage/warning', array(), 'auth');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Check your email to change your password', true), 'admin/flashMessage/success', array(), 'auth');\n\t\t\t\t$this->FotomatterEmail->send_forgot_password_email($this, $change_password_user);\n\t\t\t}\n\t\t}\n\t\t$this->redirect('/admin');\n\t}", "function user_changed_password($user_id, $new_password) {\n \n }", "function changepass_firsttime()\n {\n $userId = $this->userInfo('user_id');\n \n $result = $this->update('user', array('password' => $this->value('password'), 'modified' => date('Y-m-d H:i:s')), \" user_id = \".$userId);\n \n if($result === TRUE)\n {\n //this will prevent user from being logged out automatically. (as it happens in old implementation)\n $_SESSION['password'] = $this->value('password');\n \n //update the patient_history table with \"password change\" action to 'complete'\n $data = array(\n 'patient_id' => $userId,\n 'action_type' => 'first time login',\n 'action' => 'password change', \n 'action_status' => 'complete',\n 'action_time' => date('Y-m-d H:i:s')\n );\n $this->insert('patient_history', $data);\n \n echo \"{success:true, message:'Password updated successfully'}\";\n }\n else\n {\n echo \"{success:false, message:'Password update failure'}\";\n }\n }", "protected static function bootWarnsOfPasswordChanges()\n {\n static::updating(function (Model $model) {\n $passwordAttribute = config(\n 'laravel-security-notifications.models.' . $model::class . '.password',\n 'password'\n );\n\n if (! $model->isDirty($passwordAttribute)) {\n return null;\n }\n\n return $model->fireModelEvent('updatingPassword');\n });\n\n // Register the \"updatingPassword\" event with our observer.\n static::registerModelEvent('updatingPassword', PasswordObserver::class . '@updatingPassword');\n }", "public function isPasswordChangeEnabled();", "public function changeAdminUserPassword() {\n\t\t$data = $this->request->data['User'];\n\n\t\t$this->User->id = $userId = $data['id'];\n\t\tif ($this->User->saveField('password', $data['new_password'])) {\n\t\t\t$isPasswordChanged = ($data['current_password'] !== $data['new_password']) ? true : false;\n\t\t\tif ($isPasswordChanged && ($userId !== $this->Auth->User('id'))) {\n\t\t\t\t$this->__sendPasswordChangedEmail($data);\n\t\t\t}\n\t\t\t$this->Session->setFlash(__('Password changed successfully.'), 'success');\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Could not change the password due a server problem, try again later.'), 'error');\n\t\t}\n\n\t\t$this->redirect('/admin/users/editAdmin/' . $userId);\n\t}", "public function notifyPasswordUpdate($data){\r\n\t$this->sendTemplateEmail($data['email'], $this->app_config['password_reset_notification_subject'], $this->app_config['password_reset_notification_body'], $data);\r\n}", "public function should_return_ok_after_user_changed_password()\n {\n factory(User::class)->create();\n $this->expectsEvents(PasswordChanged::class);\n\n $this->put('/v1/users/1/password', [\n 'old_password' => 'secrete123',\n 'new_password' => 'new123password',\n 'new_password_confirmation' => 'new123password'\n ]);\n\n $this->seeStatusCode(HttpStatus::OK);\n $this->seeJsonContains(['message' => 'The password has been changed successfully.']);\n\n // Just verifying if old password has been invalidated\n $user = User::find(1);\n $this->assertFalse(Hash::check('secrete123', $user->password));\n $this->assertTrue(Hash::check('new123password', $user->password));\n }", "function update_password()\n {\n }", "public function onUserResetPassword($event) \n {\n $event->user->notify(new NotifyUser($event->user, 'reset'));\n }", "public function changePasswordAction(){\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n if(isset($data['password']) && isset($data['repeat_password'])){\n if($data['password'] === $data['repeat_password']){\n $user->setPassword($data['password']);\n } else {\n $this->setErrorResponse('password and repeat_password should match!');\n }\n } else {\n $this->setErrorResponse('password and repeat_password is mandatory fields!');\n }\n $this->_helper->json(array('updated' => true));\n }", "function user_changed_password($user_id, $new_password)\n\t{\n\t}", "public function changeUserPassword($uid,$newPassword);", "public function change_password()\n {\n $currentPassword = $this->input->post('currentPassword');\n $newPassword = $this->input->post('newPassword');\n\n $isPasswordChanged = $this->CustomModel->changePassword(\n $_SESSION['u_id'], $currentPassword, $newPassword\n );\n\n if ($isPasswordChanged) {\n echo 'success';\n }\n }", "function wp_new_user_notification($user_id, $plaintext_pass = '')\n {\n }", "function notify_password($username, $password) {\n\n $conn = db_connect();\n $result = $conn->query(\"select email from user\n where username='\".$username.\"'\");\n if (!$result) {\n throw new Exception('Could not find email address.');\n } else if ($result->num_rows == 0) {\n throw new Exception('Could not find email address.');\n // username not in db\n } else {\n $row = $result->fetch_object();\n $email = $row->email;\n $from = \"From: support@phpbookmark \\r\\n\";\n $mesg = \"Your PHPBookmark password has been changed to \".$password.\"\\r\\n\"\n .\"Please change it next time you log in.\\r\\n\";\n\n if (mail($email, 'PHPBookmark login information', $mesg, $from)) {\n return true;\n } else {\n throw new Exception('Could not send email.');\n }\n }\n}", "private function __sendPasswordChangedEmail($data) {\n\t\t$emailData = array(\n\t\t\t'username' => $data['username'],\n\t\t\t'password' => $data['new_password'],\n\t\t);\n\t\t$templateId = EmailTemplateComponent::ADMIN_PASSWORD_CHANGED_EMAIL_TEMPLATE;\n\t\t$emailManagement = $this->EmailTemplate->getEmailTemplate($templateId, $emailData);\n\n\t\t$mailData = array(\n\t\t\t'subject' => $emailManagement['EmailTemplate']['template_subject'],\n\t\t\t'to_name' => $data['username'],\n\t\t\t'to_email' => $data['email'],\n\t\t\t'content' => json_encode($emailData),\n\t\t\t'module_info' => 'admin',\n\t\t\t'email_template_id' => $templateId\n\t\t);\n\n\t\t$this->EmailQueue->createEmailQueue($mailData);\n\t}", "public function run_chg_pass_if()\n\t{\n\t\t$msg='';\n\t\tif(isset($_POST['old_pass']))\n\t\t{\n\t\t\tif(md5($_POST['old_pass'])==$_SESSION['waf_user']['pass'])\n\t\t\t\t{\n\t\t\t\t\tif($_POST['pass']!=$_POST['pass1'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$msg='Passwords not equal! Try again.';\n\t\t\t\t\t}else{\n\t\t\t\t\t$this->change_password($_SESSION['waf_user']['id'],$_POST['pass']);\n\t\t\t\t\t$msg='Password successfully changed';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t$msg='Old Password wrong! Password not changed';\t\n\t\t\t\t}\n\t\t}\n\t\t$this->error=$msg;\n\t}", "public function changePassword(User $user, string $newPassword): void;", "public function passwordChange($observer)\n{\n\n $settings = Mage::helper('smsnotifications/data')->getSettings();\n $customer = $observer->getEvent()->getCustomer();\n $fname=$customer->getFirstname();\n $lname=$customer->getLastname();\n $email= $customer->getEmail();\n $telephone= $customer->getAddressesCollection()->getFirstitem()->getTelephone();\n if ($telephone) {\n $text = Mage::getStoreConfig('smsnotifications/customer_notification/change_password');\n $text = str_replace('{{firstname}}', $fname, $text);\n $text = str_replace('{{lastname}}', $lname, $text);\n $text = str_replace('{{emailid}}', $email, $text);\n // $text = str_replace('{{name}}', $customer_name, $text);\n }\n array_push($settings['order_noficication_recipients'], $telephone);\n $result = Mage::helper('smsnotifications/data')->sendSms($text, $settings['order_noficication_recipients']);\n return $this;\n}", "public function handle(PasswordReset $event)\n { \n // Send the notification\n $event->user->notify( new PasswordChangeConfirmation() );\n }", "private function __changePassword() {\n\t\t$data = $this->request->data['User'];\n\t\t$this->User->id = $this->Auth->user('id');\n\t\tif ($this->User->saveField('password', $data['new_password'])) {\n\t\t\t$this->Session->setFlash(__('Your password changed successfully.'), 'success');\n\t\t\t$this->redirect($this->referer());\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Could not change your password due to a server problem, try again later.'), 'error');\n\t\t}\n\t}", "function pass_change()\r\n\t{\r\n\t\tglobal $ibforums, $std;\r\n\r\n\t\tif ($ibforums->member['disable_mail'])\r\n\t\t{\r\n\t\t\t$ibforums->lang['no_mail'] = sprintf($ibforums->lang['no_mail'], $ibforums->member['disable_mail_reason']);\r\n\r\n\t\t\t$this->output .= View::make(\"global.warn_window\", ['message' => $ibforums->lang['no_mail']]);\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$this->output .= View::make(\"ucp.pass_change\");\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}", "public function passwordUpdated()\n {\n $message = \\trans('orchestra/foundation::response.account.password.update');\n\n return $this->redirectWithMessage(\\handles('orchestra::account/password'), $message);\n }", "public function testUpdatePasswordNotGiven(): void { }", "public function change_password() {\n\t\tif (!empty($this->request->data)) {\n\t\t\t$this->request->data['User']['id'] = $this->Auth->user('id');\n\t\t\tif ($this->User->changePassword($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('Password changed.', true));\n\t\t\t\t$this->redirect('/');\n\t\t\t}\n\t\t}\n\t}", "public function changePasswordAction()\n {\n $message = array();\n $message['success'] = \"\";\n $message['verify'] = $this->customerVerify($_SESSION['userName'], $_POST['currentPass']);\n if (!$message['verify']) {\n $message['confirm'] = $this->checkConfirm($_POST['newPass'], $_POST['confirmPass']);\n if (!$message['confirm']) {\n $this->model->chagePass($_SESSION['userName'], password_hash($_POST['newPass'], PASSWORD_DEFAULT));\n $message['success'] = \"Your password has been changed\";\n }\n }\n echo json_encode($message);\n }", "public function password(){\r\n\r\n\t\t\t$user_info = Helper_User::get_user_by_id($this->user_id);\r\n\r\n\t\t\tif($_POST){\r\n\r\n\t\t\t\t$formdata = form_post_data(array(\"old_password\", \"new_password\", \"repeat_new_password\"));\r\n\t\t\t\t\r\n\t\t\t\t$old_password = trim($formdata[\"old_password\"]);\r\n\t\t\t\t$new_password = trim($formdata[\"new_password\"]);\r\n\t\t\t\t$repeat_new_password = trim($formdata[\"repeat_new_password\"]);\r\n\r\n\t\t\t\t$error_flag = false;\r\n\r\n\t\t\t\tif(strlen($old_password) <= 0){\r\n\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the old password\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tif(strlen($new_password) > 0 && strlen($repeat_new_password) > 0){\r\n\t\t\t\t\t\t// if both fields are not empty\r\n\r\n\t\t\t\t\t\tif(strlen($new_password) < 6){\r\n\t\t\t\t\t\t\t// the password cannot be less than 6 characters\r\n\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\tTemplate::notify(\"error\", \"Too short password. Password must be at least 6 characters long.\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// now compare the two new passwords\r\n\t\t\t\t\t\t\tif(strcmp($new_password, $repeat_new_password) !== 0){\r\n\t\t\t\t\t\t\t\t// both passwords are not same\r\n\t\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"error\", \"New Passwords do not match. Please try again.\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the new password\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!$error_flag){\r\n\t\t\t\t\t// means there are no any errors\r\n\t\t\t\t\t// get the current user account from the database\r\n\t\t\t\t\t// if the old password matches with the one that the user entered\r\n\t\t\t\t\t// change the password, else throw an error\r\n\r\n\t\t\t\t\t$old_password_hash = Config::hash($old_password);\r\n\r\n\t\t\t\t\tif(strcmp($old_password_hash, trim($user_info->password)) === 0){\r\n\r\n\t\t\t\t\t\t\tif($this->change_password($new_password, $user_info)){\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"success\", \"Password changed successfully\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tredirect(Config::url(\"account\"));\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Wrong Old Password. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tConfig::set(\"active_link\", \"password\");\r\n\t\t\tConfig::set(\"page_title\", \"Change Account Password\");\r\n\r\n\t\t\t$view_data[\"user_info\"] = $user_info;\r\n\r\n\t\t\tTemplate::setvar(\"page\", \"account/password\");\r\n\t\t\tTemplate::set(\"account/template\", $view_data);\r\n\t\t}", "function setPasswordUpdatedTime(){\n\t\t$this->setPasswordUpdated(time());\n\t}", "function force_user_password_change_now() { \n\t\tglobal $wpdb;\n\n\t\t$sql = 'select ID, user_login, user_email from '.$wpdb->users;\n\n\t\t$res = $wpdb->get_results($sql, ARRAY_A);\n\n\t\tif (!$res) return; // this condition would be weird eh? \n\n\t\t$msgs = array();\n\n\t\tforeach ( $res as $u ) { \n\n\t\t\t$rand_psw = wp_hash_password( wp_generate_password(16) );\n\t\t\twp_set_password( $rand_psw, $u['ID'] );\n\t\t\tupdate_user_meta( $u, 'll_force_password_change_now', 1 );\n\n\t\t\t// Generate something random for a key...\n\t\t\t$key = wp_generate_password(20, false);\n\t\t\tdo_action('retrieve_password_key', $u['user_login'], $key);\n\t\t\t// Now insert the new md5 key into the db\n\t\t\t$wpdb->update($wpdb->users, array('user_activation_key' => $key), array('user_login' => $u['user_login']));\n\n\t\t\t$res = $this->ll_alert_user( $u['user_login'], $u['user_email'], $key );\n\n\t\t\tif ( '' != $res ) \n\t\t\t $msgs[] = $res; \n\t\t}\n\n\t\treturn $msgs; \n\n\t}", "public function changePassword(PasswordChangeForm $form, User $user);", "public function change(string $password): void;", "function allowPasswordChange() {\r\n\t\treturn true;\r\n\t}", "public function setPassword($newPassword);", "function update_password() {\n\t\t$old_password = $_POST['old_password'];\n\t\t$new_password = $_POST['new_password'];\n\t\tif (!empty($old_password) && !empty($new_password)) {\n\t\t\t$admin_records = $this -> conn -> get_table_row_byidvalue('pg_track_admin', 'admin_password', md5($old_password));\n\t\t\tif (!empty($admin_records)) {\n\t\t\t\t$data['admin_password'] = md5($new_password);\n\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('pg_track_admin', 'admin_status', 1, $data);\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Password changed successfully\");\n\t\t\t} else {\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid Old Password\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\", 'old_password' => $old_password, 'new_password' => $new_password);\n\t\t}\n\t\techo $this -> json($post);\n\t}", "static function password_forgot() {\n parent::password_forgot();\n view_var('user', globals('user'));\n }", "public function changePasswordAction()\n {\n $errors = [];\n if(!empty($_POST)){\n $user = Auth::getUser();\n\n $userValidation = new UserValidation($_POST, ['password']);\n $errors = $userValidation->getNamedErrors();\n\n if(empty($errors)){\n if(password_verify($_POST['oldpass'], $user->password)){\n $user->changePassword($_POST['password']);\n Extra::setMessageCookie(\"Password changed successfully.\");\n $this->redirect(\"/manage-account/\");\n }\n $errors['oldpass'] = \"Password you entered is incorrect.\";\n }\n }\n View::renderTemplate(\"LoggedUser/change-password.html\", [\n 'errors' => $errors\n ]);\n }", "public function password(UserRequest $request)\n {\n\t\t// Validate the request\n \t$request->validated();\n\n\n \t// Change the password\n\t\ttry {\n\n\t \t$request->user()->fill([\n\t 'password' => Hash::make($request->password)\n\t ])->save();\n\n\n // Send notification\n $request->user()->notify( new PasswordChangeConfirmation() );\n\n return response(['message' => 'Your account password has been successfully changed.'], 200);\n \n } catch (Exception $e) {\n return response(['message' => $e->getMessage()], 500);\n }\n }", "public function password_change($id){\n\t\t$now=now();\n\t\t$pass=$this->input->post('password');\n\t\t$message =$this->lang->line('user_m_pass_change_message_1');\n\t \t$message .=$this->lang->line('user_m_pass_change_message_2').$pass.\" \\n\\n \\t \";\n\t \t$message .=$this->lang->line('user_m_pass_change_message_3');\n\t \t$message .=$this->lang->line('user_m_pass_change_subject_4');\n\n\t\t//Setting up default values\n\t\t\t$array=array(\n\t\t\t'new_pass_active' => '0',\n\t\t\t'expiration'\t=> $now,\n\t\t\t);\n\t\t$data = $this->array_from_post(array('password'));\n\t\tforeach ($array as $key => $field) {\n\t\t\t$data[$key] = $field;\n\t\t}\n\n\t\t\n\t\t$data['password'] = $this->hash($data['password']);\n\n\t\t//Saving data and redirecting\n\t\t$this->save($data, $id);\n\n\t\t$user = $this->get_by(array(\n\t\t\t'id' => $id,\n\t\t\t'account_active' => '1',\n\t\t), TRUE);\n\t\t$this->email_to($user,$message,$pass);\n\t\t}", "public function setPassword($newPassword){\n\t}", "function sendPassword($pass)\n {\n\n /* Send an e-mail to the user saying that the password has been changed. */\n\n $header = \"From: \" . SENDER_FULL . \"\\r\\n\";\n // $header .= \"To: <\" . $this->email . \">\\r\\n\";\n $header .= \"Content-Type: text/plain; charset=\\\"utf-8\\\"\\r\\n\";\n $header .= \"Errors-To: \" . ADMIN_FULL . \"\\r\\n\";\n $header .= \"Reply-To: \" . ADMIN_FULL . \"\\r\\n\";\n $header .= \"X-Mailer: PHP\";\n\n $userLogin = SessionDataBean::getUserLogin();\n $userName = SessionDataBean::getUserFullName();\n\n $message = \"Uživatel '\" . $userLogin . \"' (\" . $userName . \") změnil vaše heslo\\r\\n\";\n $message .= \"pro přihlašování na stránky předmětů vyučovaných K611.\\r\\n\";\n $message .= \"\\r\\n\";\n $message .= \"Vaše uživatelské jméno: \" . $this->login . \"\\r\\n\";\n $message .= \"Vaše nové heslo zní: \" . $pass . \"\\r\\n\";\n $message .= \"\\r\\n\";\n $message .= \"Pokud máte konto na FD v Praze a v KOSu e-mail ve tvaru <x#####@fd.cvut.cz>,\\r\\n\";\n $message .= \"mohlo by fungovat i vaše primární heslo (to, kterým se přihlašujete na fakultní síť).\\r\\n\";\n $message .= \"Pokud ne, zkuste heslo uvedené výše.\\r\\n\";\n $message .= \"Přihlašování přes SSU bohužel stále ještě není možné.\\r\\n\";\n $message .= \"\\r\\n\";\n $message .= \"Stránky předmětů naleznete na URL\\r\\n\";\n $message .= \"\\thttp://zolotarev.fd.cvut.cz/msap/ (11MSAP)\\r\\n\";\n $message .= \"\\thttp://zolotarev.fd.cvut.cz/ma/ (11MA prezenční)\\r\\n\";\n $message .= \"\\thttp://zolotarev.fd.cvut.cz/mak/ (11MA pro kombinovanou formu)\\r\\n\";\n $message .= \"\\r\\n\";\n\n /* Now send the notification to the student ... */\n if (SEND_MAIL)\n {\n $subject = \"=?utf-8?B?\" . base64_encode('[K611LW] Nové heslo pro přístup') . \"?=\";\n mail($this->email, $subject, $message, $header);\n }\n\n /* ... and send a copy to the administrator. */\n $subject = \"=?utf-8?B?\" . base64_encode('[K611LW] Student <' . $this->email . '> - nové heslo pro přístup') . \"?=\";\n mail(ADMIN_EMAIL, $subject, $message, $header);\n }", "public function change_password() {\n $flash = null;\n // if the user has tried logging in\n if(isset($_POST['login'])){\n // try verifying the user\n if($this->User->login($_POST['username'], $_POST['old_pass'])) {\n if($_POST['new_pass']==$_POST['new_pass_verify']){\n $this->User->setPassword($User->getId(), $_POST['new_pass']);\n session_write_close();\n header(\"Location: \".app::site_url(''));\n exit(0);\n } else {\n $flash = \"I'm sorry, but the new passwords did not match.\";\n }\n } else {\n $flash = \"That username and/or password is not valid.\";\n }\n }\n return array('flash' => $flash);\n }", "public function updatePassword(UserInterface $user);", "public function testPasswordChange(): void\n {\n // Test strong password - should pass.\n $this->setUpUserPostData(Constants::SAFE_PASSWORD);\n $this->assertIsInt(\\edit_user($this->dummy_user_id));\n\n // Test weak password - should pass as well.\n $this->setUpUserPostData(Constants::PWNED_PASSWORD);\n $this->assertIsInt(\\edit_user($this->dummy_user_id));\n\n // Clean up.\n $this->tearDownUserPostData();\n }", "function onesignin_client_handle_after_update_notification($account) {\n watchdog('onesignin', 'Updating user %name on request of One Signin server.', array('%name' => $account->name), WATCHDOG_INFO);\n onesignin_client_userdata_synchronize($account->server_uid);\n}", "public function password_update(SelfPasswordUpdateRequest $request)\n {\n if( env('APP_DEMO') == true && Auth::guard('customer')->user()->id <= config('system.demo.customers', 1) )\n return redirect()->route('account', 'account#password-tab')->with('warning', trans('messages.demo_restriction'));\n\n Auth::guard('customer')->user()->update($request->all());\n\n // event(new PasswordUpdated(Auth::user()));\n\n return redirect()->route('account', 'account#password-tab')->with('success', trans('theme.notify.info_updated'));\n }", "function Users_user_changeemail()\n{\n if (!pnUserLoggedIn()) {\n return LogUtil::registerPermissionError();\n }\n\n $changepassword = pnModGetVar('Users', 'changeemail', 1);\n if ($changepassword <> 1) {\n return pnRedirect('Users', 'user', 'main');\n }\n\n // Create output object\n $pnRender = & pnRender::getInstance('Users', false, null, true);\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('users_user_changeemail.htm');\n}", "function password_update_post(Request $request){\n $request->validate([\n 'password' => 'confirmed'\n ]);\n\n if(Hash::check($request->old_password, Auth::user()->password)){\n\n if ($request->old_password == $request->password) {\n return back()->with('error_reenter_old', 'You entered your old password. Please try a new password');\n }\n\n else {\n User::find(Auth::id())->update([\n 'password' => Hash::make($request->password),\n 'updated_at' => now(),\n ]);\n\n //Sending password changing notification email start \n Mail::to(Auth::user()->email)->send(new PasswordChanged);\n return back()->with('password_change_success', 'Your password changed successfully');\n }\n }\n\n else{\n return back()->with('error_password_hash_unmatched', 'Your old password does not matched. Please try again..');\n }\n }", "public function selfChangePassword()\n\t{\n\t\tif (!$this->userService->changePassword(Input::all()))\n\t\t{\n\t\t\treturn Redirect::route('user-profile', array('tab' => 'account'))->withErrors($this->userService->errors())->withInput();\n\t\t}\n\n\t\tAlert::success('Your password has been successfully changed.')->flash();\n\n\t\treturn Redirect::route('user-profile', array('tab' => 'account'));\n\t}", "public function notify() \n {\n $user = User::find()->where(['username' => $this->username])->one();\n if (!$user) {\n return false;\n }\n \n if ($this->isPhone()) {\n // Notify by SMS\n if (!$this->password) {\n return false;\n }\n Yii::$app->sms->send($user->username, 'Your password is: ' . $this->password);\n } else {\n // Notify by email\n $user->generateVerificationToken();\n if ($user->save()) {\n $mail = Yii::$app->mailer->compose('notify', ['model' => $user])\n ->setFrom('[email protected]')\n ->setTo($user->username)\n ->setSubject('Complete Your Registration')\n ->send();\n }\n }\n \n return true;\n }", "public static function notifyPasswordChange($user, $newPassword)\n {\n UserModel::setPassword($user->getUserID(), $newPassword);\n \n $builder = new StringBuilder();\n $builder->appendLine('Greeting Higify User!');\n $builder->appendLine();\n $builder->appendLine('Your password has been changed. You can now sign in with the following username and password:');\n $builder->appendLine('Username: ' . $user->getUsername());\n $builder->appendLine('Password: ' . $newPassword);\n $builder->appendLine();\n $builder->appendLine('Sincerely,');\n $builder->appendLine('The Higify Team');\n \n return $builder->toString();\n }", "public function notifyUsernameChanged()\n {\n $this->userService->notifyUsernameChanged(session('org_id'));\n $response = ['type' => 'success', 'code' => ['sent', ['name' => 'Emails']]];\n\n return redirect()->route('lite.settings.edit')->withResponse($response);\n }", "public function changePassword()\n {\n if( ! Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $user = User::find(Session::getCurrentUserID());\n\n View::make('templates/front/change-password.php',array());\n }", "public function send_change_password_notifications($id, $type_of_notification, $ip)\n {\n # Enviar notificacion\n $data['user_notification'] = $id;\n $data['type_of_notification'] = $type_of_notification;\n $data['ip_error_access'] = $ip;\n $data['date'] = date('Y-m-d H:i:s');\n $data['status'] = 1;\n return $this->db->insert('ec_notifications', $data);\n }", "function onForgotPassword($info){\n\t\t$this->_bookframe(\"frmForgotPassword\");\n\t}", "public function &setIsPasswordChangeEnabled($value);", "public function DoChangePassword($form)\n\t{\n\t\tif ($form->GetValue('Pw') == $form->GetValue('Pw2'))\n\t\t{\n\t\t\t$this->user->ChangePassword($form->GetValue('OldPw'), $form->GetValue('Pw'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session->AddMessage('info', 'Password didn\\'t match.');\n\t\t}\n\t\t\n\t\t$this->RedirectToController('profile');\n\t}", "public function account_change_password()\n\t{\n\t\t$data = array('password' => $this->input->post('new_password'));\n\t\tif ($this->ion_auth->update($this->mUser->id, $data))\n\t\t{\n\t\t\t$messages = $this->ion_auth->messages();\n\t\t\t$this->system_message->set_success($messages);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$errors = $this->ion_auth->errors();\n\t\t\t$this->system_message->set_error($errors);\n\t\t}\n\n\t\tredirect('admin/panel/account');\n\t}", "public static function email_password_renew() {\n if ($u = static::check_record_existence()) {\n\n $m = auth_model();\n $u = $m::first(array('where' => 'id = \\'' . $u->id . '\\''));\n\n if ($u->emailPasswordRenew())\n flash('Email com as instruções para Renovação de senha enviado para ' . $u->email . '.');\n else\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n }\n\n go_paginate();\n }", "public function changePasswordAction()\n {\n $form = new ChangePasswordForm();\n\n if ($this->request->isPost()) {\n\n if (!$form->isValid($this->request->getPost())) {\n\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = $this->auth->getUser();\n\n $user->password = $this->security->hash($this->request->getPost('password'));\n $user->mustChangePassword = 'N';\n\n $passwordChange = new PasswordChanges();\n $passwordChange->user = $user;\n $passwordChange->ipAddress = $this->request->getClientAddress();\n $passwordChange->userAgent = $this->request->getUserAgent();\n\n if (!$passwordChange->save()) {\n $this->flash->error($passwordChange->getMessages());\n } else {\n\n $this->flash->success('Your password was successfully changed');\n\n Tag::resetInput();\n }\n }\n }\n\n $this->view->form = $form;\n }", "public function password()\n {\n $this->isUser();\n\n $this->data['noCabinetOrAdmin'] = true;\n\n if ($_POST) {\n\n if (!$_POST['old-password'] && !$_POST['new-password']) {\n\n $userModel = new UserModel();\n\n $validateResult = $userModel->validate($_POST);\n\n if ($validateResult === true) {\n\n $checkPassword = $userModel->checkOldPassword($_POST['old-password']);\n\n if ($checkPassword) {\n\n if ($userModel->refreshPassword($_POST)) {\n\n $this->data['success'] = 'Пароль успешно изменен';\n\n } else {\n\n $this->data['warning'] = 'Произошла ошибка';\n }\n\n } else {\n\n $this->data['warning'] = 'Старый пароль введен не правильно';\n }\n\n } else {\n\n $this->data['warning'] = $validateResult;\n }\n\n } else {\n\n $this->data['warning'] = 'Все поля должны быть заполнены';\n }\n }\n\n $this->render('password');\n }", "function change_password()\n {\n if ($user = $this->authorized(USER))\n {\n $descriptive_names = array(\n 'current_password' => 'Current Password',\n 'new_password' => 'New Password',\n 'new_password_confirm' => 'Confirm Password'\n );\n\n $rules = array(\n 'current_password' => ($user['group_id']==0)?'clean':'required|clean',\n 'new_password' => 'required|clean',\n 'new_password_confirm' => 'required|clean'\n );\n\n $this->loadLibrary('form.class');\n $form = new Form();\n\n $form->dependencies['title'] = \"Change Password\";\n $form->dependencies['form'] = 'application/views/change-password.php';\n $form->dependencies['admin_reset'] = false;\n $form->dependencies['client_id'] = $user['id'];\n $form->form_fields = $_POST;\n $form->descriptive_names = $descriptive_names;\n $form->view_to_load = 'form';\n $form->rules = $rules;\n\n if ($fields = $form->process_form())\n {\n\n $this->loadModel('UserAuthentication');\n\n\n if ($this->UserAuthentication->change_password($user['id'], $fields['current_password'], $fields['new_password'], $fields['new_password_confirm']))\n {\n $this->alert(\"Password Updated\", \"success\");\n $this->redirect(\"portal/home\");\n }\n else\n {\n $this->alert(\"Error: Password Not Updated\", \"error\");\n $this->redirect(\"portal/home\");\n }\n }\n }\n }", "public function change_pass()\n\t{\n\t\t$form = array();\n\n\t\t$form['validation']['params'] = array('password_old', 'password', 'password_confirm');\n\n\t\t$form['submit'] = function ($params) {\n\t\t\treturn $this->_change_pass_submit();\n\n\n\t\t};\n\n\t\t$form['form'] = function () {\n\t\t\tpage_info('title', lang('title_change_pass'));\n\n\t\t\t$this->_display();\n\t\t};\n\n\t\t$this->_form($form);\n\t}", "function update_paypassword()\n {\n }", "function sendEmailPassword($user_id, $password){\n\t\n\t $result = $GLOBALS['db']->query(\"SELECT email1, email2, first_name, last_name FROM users WHERE id='$user_id'\");\n\t $row = $GLOBALS['db']->fetchByAssoc($result);\n\t \n\t if(empty($row['email1']) && empty($row['email2'])){\n\t \n\t $_SESSION['login_error'] = 'Please contact an administrator to setup up your email address associated to this account';\n\t return;\n\t }\n\t \n\t require_once(\"include/SugarPHPMailer.php\");\n\t\t$notify_mail = new SugarPHPMailer();\n\t\t$notify_mail->CharSet = AppConfig::setting('email.default_charset');\n\t\t$notify_mail->AddAddress(((!empty($row['email1']))?$row['email1']: $row['email2']), $row['first_name'] . ' ' . $row['last_name'] );\n \n\t\tif (empty($_SESSION['authenticated_user_language'])) {\n\t\t\t$current_language = AppConfig::setting('locale.defaults.language');\n\t\t}\n\t\telse {\n\t\t\t$current_language = $_SESSION['authenticated_user_language'];\n\t\t}\n\n\t\t$notify_mail->Subject = 'info@hand Token';\n\t\t$notify_mail->Body = 'Your info@hand session authentication token is: ' . $password;\n\t\tif(AppConfig::setting('email.send_type') == \"SMTP\") {\n\t\t\t$notify_mail->Mailer = \"smtp\";\n\t\t\t$notify_mail->Host = AppConfig::setting('email.smtp_server');\n\t\t\t$notify_mail->Port = AppConfig::setting('email.smtp_port');\n\t\t\tif (AppConfig::setting('email.smtp_auth_req')) {\n\t\t\t\t$notify_mail->SMTPAuth = TRUE;\n\t\t\t\t$notify_mail->Username = AppConfig::setting('email.smtp_user');\n\t\t\t\t$notify_mail->Password = AppConfig::setting('email.smtp_password');\n\t\t\t}\n\t\t}\n\n\t\t$notify_mail->From = 'no-reply@' . AppConfig::setting(array('email.from_host_name', 'site.host_name'));\n\t\t$notify_mail->FromName = 'info@hand Authentication';\n\n\t\tif(!$notify_mail->Send()) {\n\t\t\t$GLOBALS['log']->warn(\"Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})\");\n\t\t}\n\t\telse {\n\t\t\t$GLOBALS['log']->info(\"Notifications: e-mail successfully sent\");\n\t\t}\n\t\n\t\t\t\n\t\t\n\t}", "public function testUserPassword() {\n\t\t// make new User and save it to the database\n\t\t$newPassword = Generate::hash();\n\n\t\t// change the User password\n\t\t$this->visit('/home')\n\t\t\t->click('#user-update-button')\n\t\t\t->seePageIs('/user/update')\n\t\t\t->click('Change Password')\n\t\t\t->seePageIs('/user/password')\n\t\t\t->type($this->password, 'old_password')\n\t\t\t->type($newPassword, 'password')\n\t\t\t->type($newPassword, 'password_confirmation')\n\t\t\t->press('Change Password')\n\t\t\t->seePageIs('/home')\n\t\t\t->see('Your password was changed successfully!')\n\t\t\t->click('Logout')\n\t\t\t->seePageIs('/');\n\n\t\t// test a regular User's login with the new password\n\t\t// TODO: check the database instead of testing the login process\n\t\t$this->visit('/')\n\t\t\t->click('#login-button')\n\t\t\t->seePageIs('/login')\n\t\t\t->type($this->User->email, 'email')\n\t\t\t->type($newPassword, 'password')\n\t\t\t->press('Login')\n\t\t\t->seePageIs('/home')\n\t\t\t->within('#nav', function() {\n\t\t\t\t$this->see('Logout')\n\t\t\t\t\t->dontSee('Login')\n\t\t\t\t\t->dontSee('Admin');\n\t\t\t});\n\t}", "public function change_user_credential() {\n\t\t$result = $this->user_model->update_user_password($this->session->userdata('user_id'), $_POST);\n\n\t\tif ($result['success']) {\n\t\t\t$this->session->set_flashdata('credential_change_successful', \"Password changed successfully.\");\n\t\t} else {\n\t\t\t$this->session->set_flashdata('credential_change_failed', $result['message']);\n\t\t}\n\n\t\tredirect(site_url('user/profile/credential'), 'refresh');\n\t}", "function changepassword() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n $this->viewData['hash'] =User::userid();\n // Render the action with template\n $this->renderWithTemplate('users/changepassword', 'AdminPageBaseTemplate');\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('admin'));\n }", "public function change_password()\n\t{\n\t\t$this->load->model('admin_user_model', 'admin_users');\n\t\t$updated = $this->admin_users->change_password($this->mUser->id, $this->input->post('new_password'));\n\n\t\tif ($updated)\n\t\t{\n\t\t\tset_alert('success', 'Successfully changed password.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tset_alert('danger', 'Failed to changed password.');\n\t\t}\n\n\t\tredirect('admin/account');\n\t}", "public function user_password_change() {\n $data['title'] = 'Change Password';\n return view('user-dashboard.password-change', $data);\n }", "public function Change_user_password() {\n\t\t$this->load->helper('pass');\n\t\t$user = $this->administration->getMyUser($this->user_id);\n\t\t//password\n\t\t$old_pass = $this->input->post('oldPassword');\n\t\t$newPass = $this->input->post('newPassword');\n\t\t$confirmNewPass = $this->input->post('confirmNewPassword');\n\t\tif($newPass == $confirmNewPass) {\n\t\t\t//check if old password is corrent\n\t\t\t$verify = $this->members->validateUser($user->Username,$old_pass);\n\t\t\tif($verify) {\n\t\t\t\t//validate if the password is in the correct format\n\t\t\t\t$valid_new_pass = checkPasswordCharacters($newPass);\n\t\t\t\tif($valid_new_pass) {\n\t\t\t\t\t$change_pass = $this->members->simple_pass_change($user->ID,$newPass);\n\t\t\t\t\tif($change_pass) {\n\t\t\t\t\t\techo '1';\n\t\t\t\t\t}else {\n\t\t\t\t\t\techo '6';\t\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\techo '7';\t\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\techo '8';\t\n\t\t\t}\n\t\t}else {\n\t\t\techo '9';\t\n\t\t}\n\t}", "public function actionChangePassword()\n {\n \t$user = UserAdmin::findOne(Yii::$app->request->get('id'));\n \t$model = new ChangeForcePasswordForm($user);\n \tif ($model->load(Yii::$app->request->post()) && $model->applyChanges()) \n \t{\n \t\tYii::$app->getSession()->setFlash('success', \n \t\t\t\"The user password has been changed\"\n \t\t);\n \t\treturn $this->redirect([\"/admin/crud/user-admin/view\", 'id' => $user->id]);\n \t}\n \t\n \t$this->layout = '@app/layouts/layout-popup-sm';\n \treturn $this->render('change-password', ['model' => $model]);\n }", "public function updatePassword(ExtendedUserInterface $user);", "public function userPasswordUpdate() {\n $password = Hash::make($this->request->input(\"new_password\"));\n $updateArray = [\n \"password\" => $password\n ];\n $whereArray = [\n [\"user_id\", '=', $this->request->input(\"user_id\")]\n ];\n $this->usersModel->setTableName(\"cvd_users\");\n $this->usersModel->setInsertUpdateData($updateArray);\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->updateData();\n }", "public function sendEmailNotificationThatPasswordIsChanged($recipientEmail,$newPassword) {//TODO-nik87 проверить, чтобы уведомления о смене пароля, телефона, email отправлялись и на email, и на телефон - независимо от того, что меняют\n $subject=$this->translator->txt('Your password has been changed');\n $content= '<p>' .$this->translator->txt('Your password has being changed on').' <a href=\"'.u_sroot.'\">'.site_name.'</a></p>'.\n '<p>'.$this->translator->txt('New password is').' <b style=\"font-size: 1.5em\">'.$newPassword.'</b></p>';\n\n return $this->uFunc->sendMail($content,$subject,$recipientEmail);\n }", "public function testChangesAUsersPassword()\n {\n $user = factory(User::class)->create();\n $token = Password::createToken($user);\n $response = $this->post('/password/reset', [\n 'token' => $token,\n 'email' => $user->email,\n 'password' => 'password',\n 'password_confirmation' => 'password'\n ]);\n $this->assertTrue(Hash::check('password', $user->fresh()->password));\n }", "public function changepassAction()\n {\n $user_service = $this->getServiceLocator()->get('user');\n\n $token = $this->params()->fromRoute('token');\n $em = EntityManagerSingleton::getInstance();\n $user = null;\n\n if ($this->getRequest()->isPost())\n {\n $data = $this->getRequest()->getPost()->toArray();\n $user = $em->getRepository('Library\\Model\\User\\User')->findOneByToken($token);\n\n if (!($user instanceof User))\n {\n throw new \\Exception(\"The user cannot be found by the incoming token\");\n }\n\n $user_service->changePassword($data, $user);\n $em->flush();\n }\n\n return ['user' => $user];\n }", "public function password_verifies() {\n\t\treturn AuthComponent::password($this->data[$this->alias]['old_password']) === $this->data[$this->alias]['password'];\n\t}", "public function changePasswordAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n if (!is_object($user) || !$user instanceof UserInterface) {\n $this->createAccessDeniedException('This user does not have access to this section.');\n }\n\n $this->page = $this->getDoctrine()->getRepository('PageBundle:Page')->findOneByAlias($this::PASSWORD_CHANGE_PAGE_ALIAS);\n\n if (!$this->page) {\n return $this->get('bardiscms_page.services.show_error_page')->errorPageAction(Page::ERROR_404);\n }\n\n // Simple publishing ACL based on publish state and user Allowed Publish States\n $accessAllowedForUserRole = $this->get('bardiscms_page.services.helpers')->isUserAccessAllowedByRole(\n $this->page->getPublishState(),\n $this->publishStates\n );\n\n if (!$accessAllowedForUserRole) {\n return $this->get('bardiscms_page.services.show_error_page')->errorPageAction(Page::ERROR_401);\n }\n\n $this->page = $this->get('bardiscms_settings.set_page_settings')->setPageSettings($this->page);\n\n $form = $this->get('fos_user.change_password.form');\n $formHandler = $this->get('fos_user.change_password.form.handler');\n\n $process = $formHandler->process($user);\n if ($process) {\n $this->setFlash('fos_user_success', 'change_password.flash.success');\n\n return $this->redirect($this->getRedirectionUrl($user));\n }\n\n $pageData = array(\n 'page' => $this->page,\n 'mobile' => $this->serveMobile,\n 'logged_username' => $this->userName,\n 'form' => $form->createView(),\n );\n\n // Render Password change page\n $response = $this->render('SonataUserBundle:ChangePassword:changePassword.html.twig', $pageData);\n\n return $response;\n }", "public function onRegistrationConfirm(GetResponseUserEvent $event) {\n\t\trequire_once('UKM/inc/password.inc.php');\n\t\t\n\t\t$tokenGenerator = $this->container->get('fos_user.util.token_generator');\n\t\t$password = UKM_ordpass(true); // true gives numbers before words\n\t\t$event->getUser()->setPlainPassword( $password );\n\n \t\t$text = $this->container->getParameter('ukmdelta.sms.password.created');\n\t\t\n\t\t$UKMSMS = $this->container->get('ukmsms');\n try {\n\t $UKMSMS->sendSMS( $event->getUser()->getPhone(), str_replace('#code', $password, $text) );\n\t } catch( Exception $e ) {\n\t\t $this->container->get('session')->getFlashBag()->add('error', 'Kunne ikke sende engangskode på SMS ('.$e->getMessage().')');\n\t }\n\n\t}", "private function changePassword()\n {\n try\n {\n global $userquery; \n\n $request = $_REQUEST;\n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n if(!isset($request['old_pass']) || $request['old_pass']==\"\")\n throw_error_msg(\"provide old_pass\");\n\n //new_pass\n if(!isset($request['new_pass']) || $request['new_pass']==\"\")\n throw_error_msg(\"provide new_pass\");\n\n //c_new_pass\n if(!isset($request['c_new_pass']) || $request['c_new_pass']==\"\")\n throw_error_msg(\"provide c_new_pass\");\n\n if($request['c_new_pass']!=$request['c_new_pass'])\n throw_error_msg(\"new password and confirm password do not match\");\n\n $request['userid'] = userid();\n $userquery->change_password($request);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => \"password has been changed successfully\");\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function sendSMSNotificationThatPasswordIsChanged($recipientPhone,$newPassword) {\n $content=$this->translator->txt('Your password has been changed').\n \"\\n\".\n $this->translator->txt('New password is').' '.$newPassword.\n \"\\n\".\n site_domain;\n\n return $this->uFunc->sendSms($content,$recipientPhone);\n }", "public function changePasswordAction()\n {\n $form = new Form\\Password();\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $userModel = new Model\\Users();\n $identity = $this->_auth ->getIdentity();\n $userId = $identity->getId();\n $user = $userModel->getUser($userId);\n $result = $userModel->savePassword($user, $form->getValue('new_password'), $form->getValue('password'));\n\n if ($result) {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was changed.'); \n } else {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was NOT changed.');\n }\n $this->_redirect($this->getRequest()->getRequestUri());\n }\n $this->view->passwordForm = $form;\n }", "public function updateEventPassword(Request $request) \n {\n \t$input = $request->input();\n\n \t$validator = Validator::make($input, [\n 'userId' => 'required',\n 'oldEventPassword' => 'required',\n 'newEventPassword' => 'required',\n ]);\n\n if ($validator->fails()) {\n return response()->json(['status' => 'exception','response' => $validator->errors()->first()]); \n }\n\n $user = User::whereId($input['userId'])->first();\n\n if (Hash::check($input['oldEventPassword'], $user->event_password)) {\n \n $user->event_password = bcrypt($request->input('newEventPassword'));\n $user->save();\n\n return response()->json(['status' => 'success','response' =>'Event password updated successfully']);\n } else {\n\n \treturn response()->json(['status' => 'exception','response' => 'Old event password does not match.']);\n }\n }", "public function notify()\n\t\t{\n\t\t\techo \"Notifying via YM\\n\";\n\t\t}", "public function actionPassword()\n {\n if (is_null($this->password)) {\n self::log('Password required ! (Hint -p=)');\n return ExitCode::NOUSER;\n }\n\n if (is_null($this->email) && is_null($this->id)) {\n self::log('User ID or Email required ! (Hint -e= or -i=)');\n return ExitCode::DATAERR;\n }\n\n $model = User::find()->where([\n 'OR',\n [\n 'email' => $this->email\n ],\n [\n 'id' => $this->id\n ]\n ])->one();\n\n if (is_null($model)) {\n\n self::log('User not found');\n\n return ExitCode::NOUSER;\n }\n\n $validator = new TPasswordValidator();\n\n $model->password = $this->password;\n\n $validator->validateAttribute($model, \"password\");\n\n if ($model->errors) {\n\n self::log($model->errorsString);\n\n return ExitCode::DATAERR;\n }\n\n $model->setPassword($this->password);\n\n if (! $model->save()) {\n\n self::log('Password not changed ');\n\n return ExitCode::DATAERR;\n }\n\n self::log($this->email . ' = Password successfully changed !');\n\n return ExitCode::OK;\n }", "public function setPassword(){\n\t}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AdminEmailVerificationNotification);\n }", "public function testSendsPasswordResetEmail()\n {\n $user = factory(User::class)->create();\n $this->expectsNotification($user, ResetPassword::class);\n $response = $this->post('password/email', ['email' => $user->email]);\n $response->assertStatus(302);\n }", "function changePass() {\n\t\t$id = $this->AuthExt->User('id');\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__('Invalid user', true));\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\t\t\n\t\tif (!empty($this->data)) {\n\t\t\t//don't allow hidden variables tweaking get the group and username \n\t\t\t//form the system in case an override occured from the hidden fields\n\t\t\t$this->data['User']['role_id'] = $this->AuthExt->User('role_id');\n\t\t\t$this->data['User']['username'] = $this->AuthExt->User('username');\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash('The password change has been saved', 'flash_success');\n\t\t\t\t$this->redirect(array('action' => 'index', 'controller' => ''));\n\t\t\t} else {\n\t\t\t\tprint_r($this->data);\n\t\t\t\t$this->data = $this->User->read(null, $id);\n\t\t\t\t$this->data['User']['password'] = null;\n\t\t\t\t$this->data['User']['confirm_passwd'] = null;\n\t\t\t\t$this->Session->setFlash('The password could not be saved. Please, try again.', 'flash_failure');\n\t\t\t}\n\t\t}\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->User->read(null, $id);\n\t\t\t$this->data['User']['password'] = null;\n\t\t}\n\t\t$roles = $this->User->Role->find('list');\n\t\t$this->set(compact('roles'));\n\t}" ]
[ "0.75053704", "0.73948956", "0.69817233", "0.6858406", "0.6706365", "0.6668559", "0.6494165", "0.6400581", "0.63987195", "0.6390222", "0.6379403", "0.6363224", "0.6330098", "0.62678313", "0.62637186", "0.623378", "0.62071574", "0.6154372", "0.61483186", "0.61292154", "0.6117289", "0.61108637", "0.61025876", "0.6097124", "0.6063683", "0.60557604", "0.60277945", "0.60224015", "0.601061", "0.60056746", "0.60051847", "0.59811854", "0.5976489", "0.59640837", "0.5961189", "0.59578615", "0.59363073", "0.5927717", "0.59092695", "0.5907363", "0.58994323", "0.58943796", "0.5892612", "0.5865729", "0.5857645", "0.5853176", "0.5848645", "0.5838368", "0.5824049", "0.5820164", "0.58189553", "0.5815727", "0.5810671", "0.58055437", "0.5798004", "0.5792965", "0.5791509", "0.579097", "0.5788794", "0.57700354", "0.576801", "0.575753", "0.5718252", "0.57104874", "0.5708038", "0.5707475", "0.57049495", "0.5704572", "0.5696864", "0.5695206", "0.5690657", "0.56851184", "0.5678554", "0.5678034", "0.56688434", "0.5661671", "0.5651981", "0.56510174", "0.5649334", "0.56480306", "0.5644795", "0.5644432", "0.5632819", "0.5631098", "0.5604827", "0.56033325", "0.5602159", "0.5596367", "0.5593085", "0.5591868", "0.5591282", "0.55869013", "0.55845404", "0.5581409", "0.5581244", "0.55751646", "0.5572945", "0.55635923", "0.55617124", "0.5551228" ]
0.62981385
13
/////////////////////////////////// Getters /////////////////////////////////// Checks if the user is an admin.
public function isAdmin() { return $this->isSuperUser() || $this->isMemberOf('admin'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isAdminUser() {}", "function is_user_admin()\n {\n }", "function isAdmin(){\r\n\r\n\t\tif($this->user_type == 'Admin'){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function is_admin()\n {\n //is a user logged in?\n\n //if so, check admin status\n\n //returns true/false\n\n }", "public function checkIsAdmin()\n {\n return $this->user_admin;\n }", "public function isAdmin() {}", "protected function isCurrentUserAdmin() {}", "protected function isCurrentUserAdmin() {}", "private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function isAdmin();", "function isAdmin() {\n return ($this->userType == 'admin');\n }", "public function isUserOnAdminArea()\n\t{\n\t\treturn is_admin();\n\t}", "public function isAdmin()\n {\n return ($this->username === \"admin\");\n }", "public function isUserAdmin()\n\t{\n\t\treturn (Bn::getValue('user_type') == 'A');\n\t}", "public function isAdmin()\n {\n }", "public function isAdmin() {\n return $this->admin; // cerca la colonna admin nella tabella users\n }", "public function getIsAdmin();", "public function getIsAdmin();", "protected function isAdmin()\n\t{\n\t\treturn is_admin();\n\t}", "function isAdmin(){\n\t\treturn ($this->userlevel == ADMIN_LEVEL || $this->username == ADMIN_NAME);\n\t}", "public function isAdmin() {\n\t\t\n\t\treturn $this->is_admin;\n\t\t\n\t}", "public function isAdmin() {\n\t\treturn $this->admin;\n\t}", "public function isAdmin(){\n if($this->role==\"admin\"){\n return true;\n }\n return false;\n }", "public function isAdmin()\n\t{\n\t\treturn $this->is_admin;\n\t}", "public function isAdmin(){\n $user = Auth::guard('web') -> user();\n if ($user -> state != 1) {\n return 0;\n }\n else {\n return 1;\n }\n }", "public function isAdmin()\n {\n return ($this->type === User::ADMIN_USER);\n }", "function isAdmin() {\n //FIXME: This needs to (eventually) evaluate that the user is both logged in *and* has admin credentials.\n //Change to false to see nav and detail buttons auto-magically disappear.\n return true;\n}", "function isUserAdmin() {\r\n $user = $_SESSION['user'];\r\n return checkAdminStatus($user);\r\n }", "public function isAdmin()\n\t{\n\t\treturn $this->isAdmin;\n\t}", "public function isAdmin()\n {\n return $this->is_admin;\n }", "public function isAdmin()\n {\n return ((string) strtoupper($this->data->user_role) === \"ADMIN\") ? true : false;\n }", "public function is_admin()\n\t{\n\t\t$user = $this->get_current_user();\n\t\tif($user !== NULL)\n\t\t{\n\t\t\tif($user['auth'] == 255)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "function IsAdmin()\n{\n\treturn false;\n}", "public function isAdmin(): bool\n {\n return $this->is_admin === true;\n }", "public function isAdmin()\n {\n return $this->role == 1;\n }", "public function isAdmin()\n {\n return ($this->role == 1) ? true : false;\n }", "public function isAdmin()\n\t{\n\t\t$this->reply(true);\n\t}", "public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }", "public function isAdmin()\n {\n return $this->role == 'admin';\n }", "public function isAdmin(){\n $role = $this->role->type;\n\n return $role === 'admin';\n }", "public function is_admin(): bool {\n\t\treturn $this->is_admin;\n\t}", "public function isAdmin()\n {\n return $this->type == self::TYPE_ADMIN ;\n }", "public function isAdmin()\n {\n return $this->hasCredential('admin');\n }", "public function isAdmin(): bool\n {\n return $this->is_admin;\n }", "public function isAdmin(){\n return $this->role=='admin';\n }", "public static function isAdmin() {\r\n\r\n return Session::get('admin') == 1;\r\n\r\n }", "public static function isAdmin(): bool {\n if ($user = self::user() && self::user()->isAdmin) {\n return true;\n }\n return false;\n }", "function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}", "private function isAdmin() : bool\n {\n return $this->role('admin');\n }", "public function isAdmin()\n {\n return $this->getAttribute('type') === User::ADMIN_TYPE;\n }", "public function is_admin() {\n if($this->is_logged_in() && $this->user_level == 'a') {\n return true;\n } else {\n // $session->message(\"Access denied.\");\n }\n }", "public function IsAdmin ();", "public function isAdmin()\n {\n return $this->role == 'Administrator' ? true : false;\n }", "public static function isAdmin(){\n if(self::exists('auth_type')&& self::get('auth_type')=='admin'){\n return true;\n }else\n return false;\n\n }", "public function isAdmin() {\n return $this->hasPermission('is_admin');\n }", "function isAdmin() {\n if (\\Illuminate\\Support\\Facades\\Auth::user()->rol_id == 1) {\n return true;\n } else {\n return false;\n }\n }", "function getIsAdmin(){\n\t\treturn ( $this->user && $this->user->access_level >= User::LEVEL_ADMIN );\n\t}", "public function isAdmin()\n {\n if (strtolower($this->name) == 'administrator')\n {\n return true;\n }\n\n return false;\n }", "function isAdmin() {\n return !$this->isLoggedIn ? FALSE : ($this->member->adminID !== NULL ? TRUE : FALSE);\n }", "public function isAdmin()\n {\n return (bool) $this->admin;\n }", "public static function am_i_admin() \n {\n return ($_SESSION['_user'] == AV_DEFAULT_ADMIN || $_SESSION['_is_admin']);\n }", "public static function isAdmin()\n {\n return auth()->check() && auth()->user()->panichd_admin;\n }", "public function isAdmin(): bool\n {\n return $this->_admin;\n }", "public static function isAdmin()\n\t{\n\t\treturn in_array( Auth::user()->username, Config::get( 'admin.usernames' ) );\n\t}", "public function isAdmin() {\n return ($this->userlevel == ADMIN_LEVEL ||\n $this->username == ADMIN_NAME);\n }", "public function isAdmin()\n {\n // Look for value only if not already set\n if(!isset($this->isAdmin)) {\n $us = SemanticScuttle_Service_Factory::get('User');\n $this->isAdmin = $us->isAdmin($this->username);\n }\n return $this->isAdmin;\n }", "function isAdmin() {\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "public function isAdmin(): bool\n {\n return $this->type() === self::ADMIN;\n }", "public function isAdmin()\n {\n return (\\Auth::user()->role == 'admin');\n }", "function is_admin()\n\t{\n\t\treturn strtolower($this->ci->session->userdata('DX_role_name')) == 'admin';\n\t}", "public static function isAdmin()\n {\n if (self::isConsole()) {\n return true;\n }\n \n return \\Craft\\craft()->getUser()->isAdmin();\n }", "public function isAdmin(){\n if($this->role->name = 'Administrator'){\n return true;\n }\n return false;\n }", "public function getIsAdministrator() {}", "public static function isAdmin()\n {\n if (Yii::$app->user->isGuest) {\n return false;\n }\n $model = User::findOne(['username' => Yii::$app->user->identity->username]);\n if ($model == null) {\n return false;\n } elseif ($model->id_user_role == 1) {\n return true;\n }\n return false;\n }", "public function check_admin() {\n return current_user_can('administrator');\n }", "public function isAdmin()\n {\n return $this->authenticated;\n }", "function isAdmin() {\n\tif (isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'admin' ) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function is_admin(){\n\t\treturn $this->account_type == \"manager\";\n\t}", "public static function authAdmin() {\n if (Yii::$app->user->can(\"administrator\") || Yii::$app->user->can(\"adminsite\")) {\n return TRUE; //admin ใหญ่\n }\n }", "static function getIsAdmin() {\n\t\t$user = ctrl_users::GetUserDetail();\n\t\tif($user['usergroupid'] == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function user_AuthIsAdmin() {\n\tglobal $AUTH;\n\t\n\treturn isset($AUTH['admin']) && ($AUTH['admin'] === 1);\n}", "public function get_is_admin() \n {\n return $this->is_admin;\n }", "function is_admin()\n{\n global $app;\n if (is_authenticated()) {\n $user = $app->auth->getUserData();\n return ($user['role'] === '1');\n } else {\n return false;\n }\n}", "public function checkAdmin();", "public function isAdmin()\n {\n return $this->user_role === User::ROLE_ADMIN;\n }", "private function isAdmin() : bool\n {\n return $this->user->hasRole('admin');\n }", "function HasAdmin()\n {\n return true;\n }", "public function check_admin()\n {\n return current_user_can('administrator');\n }", "public function getIsAdmin()\n\t{\n\t\treturn $this->is_admin;\n\t}", "function isAdmin(){\n\t\treturn (isset($this->params['admin']) && $this->params['admin']);\n\t}", "protected function userIsAdmin ()\n {\n $tokenHeader = apache_request_headers();\n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm);\n\n if($datosUsers->nombre==\"admin\")\n {\n return true;\n }\n else\n {\n return false;\n } \n }", "public function memberIsAdmin()\n {\n return $_SESSION['__COMMENTIA__']['member_role'] === 'admin';\n }", "function is_admin(){\r\n if (isset($_SESSION['admin']) && $_SESSION['admin']){\r\n return true;\r\n }\r\n return false;\r\n }", "function is_admin() {\n\tif(\n\t\tisset($_SESSION['admin']->iduser) \n\t\t&& !empty($_SESSION['admin']->iduser) \n\t\t&& $_SESSION['admin']->type = 'admin'\n\t\t&& $_SESSION['active']->type = 1\n\t\t&& $_SESSION['confirmed']->type = 1\n\t) return TRUE;\n\t\t\t\n\treturn FALSE;\n}", "public function isAdministrator(){\n return $this->is_admin;\n }", "public function isAdmin() {\n\t\treturn (bool) $this->Session->read('Acl.isAdmin');\n\t}", "protected static function isAdminUser() {\r\n throw new \\Excpetion('yet to implement');\r\n }", "public function isAdmin()\n {\n if($this->hasRole(\"ROLE_ADMIN\"))\n {\n return true;\n } else {\n return false;\n }\n }" ]
[ "0.90633446", "0.8883823", "0.8828815", "0.8797422", "0.8791371", "0.8788454", "0.87776685", "0.87754124", "0.8775187", "0.87613875", "0.8742259", "0.8651232", "0.86511666", "0.8610092", "0.85893625", "0.8566619", "0.8524231", "0.8524231", "0.85223204", "0.8501421", "0.85009354", "0.8495728", "0.8490151", "0.8487177", "0.84835875", "0.84777534", "0.8464929", "0.84349424", "0.842864", "0.84279317", "0.842418", "0.84055114", "0.83982533", "0.83982533", "0.8395367", "0.8393653", "0.83880424", "0.837535", "0.8374091", "0.8371961", "0.83705455", "0.83692116", "0.83595777", "0.83577895", "0.8347295", "0.8345648", "0.83453614", "0.8343024", "0.83392805", "0.833793", "0.8337896", "0.83356696", "0.83351785", "0.8333743", "0.83321416", "0.8331309", "0.8326742", "0.8315212", "0.83105606", "0.8307544", "0.83073336", "0.8306297", "0.8306183", "0.8299228", "0.8295977", "0.82954705", "0.82939744", "0.82864785", "0.82857686", "0.82759035", "0.82657707", "0.8260039", "0.8259026", "0.82390976", "0.82388043", "0.82350814", "0.82334256", "0.8233125", "0.82327443", "0.8223244", "0.82159126", "0.8214723", "0.82089525", "0.8208291", "0.8201639", "0.8191475", "0.81914306", "0.8180199", "0.81740755", "0.8170301", "0.8168956", "0.8167847", "0.8160874", "0.8155469", "0.81497234", "0.8148874", "0.81488526", "0.81318164", "0.81278324", "0.81228435" ]
0.8440744
27
Gets the groups this user is a member of.
public function groups() { $return = ['everyone']; $groups = GroupMember::where('user_id', $this->id()) ->sort('`group` ASC') ->all(); foreach ($groups as $group) { $return[] = $group->group; } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserGroups()\n\t{\n\t\t\n\t\t$groups = array();\n\t\t$db \t= $this->getUserDbTable();\n\t\t$id \t= $this->getUserId();\n\t\t\n\t\tif ($id)\n\t\t{\t\n\t\t\t$groups \t= $db->getAdapter()->select()->from(array('gmt'=>'groups_members_table'))\n\t\t\t\t\t\t\t\t\t\t ->joinInner(array('gt'=>'groups_table'), 'gmt.group_id = gt.group_id')\n\t\t\t\t\t\t\t\t\t\t ->where('gmt.user_id = ? ', $id)\n\t\t\t\t\t\t\t\t\t\t ->query()->fetchAll();\n\t\t}\t\n\t\t/* Automatically append group 0===Public group */\n\t\t$public \t\t= $db->getAdapter()->select()->from(array('gmt'=>'groups_table'))->where('group_privacy_level = ? ', 0)\n\t\t\t\t\t\t\t\t\t ->query()->fetch();\n\t\t$groups[] = $public;\n\t\t\n\t\treturn $groups;\n\t}", "public function getGroups()\n {\n if ($this->_oGroups == null && $sOxid = $this->getId()) {\n // usergroups\n $this->_oGroups = oxNew('oxlist', 'oxgroups');\n $sViewName = getViewName(\"oxgroups\", $this->getLanguage());\n $sSelect = \"select {$sViewName}.* from {$sViewName}, oxobject2group \";\n $sSelect .= \"where oxobject2group.oxobjectid='$sOxid' \";\n $sSelect .= \"and oxobject2group.oxgroupsid={$sViewName}.oxid \";\n $this->_oGroups->selectString($sSelect);\n }\n\n return $this->_oGroups;\n }", "public function get_groups()\n\t{\n\t\tif (empty($this->user))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn array(array('UniGroup', $this->user[static::_column('group')]));\n\t}", "public function getUserGroups()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name 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\t$groups = UserUtil::getGroupsForUser($uid);\n\t\t$return = array();\n\t\tforeach($groups as $item) {\n\t\t\t$group = UserUtil::getGroup($item);\n\t\t\t$return[] = $group['name'];\n\t\t}\n\t\tif(SecurityUtil::checkPermission('Owncloud::Admin', '::', ACCESS_MODERATE, $uid)) {\n\t\t\t$return[] = 'admin';\n\t\t}\n\t\treturn self::ret($return);\n\t}", "public function getGroups() {\r\n // Array to hold the group objects\r\n $groups = [];\r\n // Loop through each of the groups the user belongs to\r\n foreach ($this->groups as $group) {\r\n // Get the group from the database\r\n $grp = UserGroup::getByName($group);\r\n // If the group has a valid ID (not 0 or less)\r\n if ($grp->id != 0) {\r\n // Add the group to the array\r\n $groups[] = $grp;\r\n }\r\n }\r\n // Return the groups array\r\n return $groups;\r\n }", "public function getUserGroups()\n {\n $query = \"SELECT groupName FROM UserGroupAccess\";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n return $result;\n }\n else\n return false;\n }", "function getGroups()\n {\n//\t\t$this->_groups = array();\n if ( empty( $this->_groups ) ) {\n $member_handler = &zarilia_gethandler( 'member' );\n if ( $this->getVar( 'uid' ) ) {\n $this->_groups = $member_handler->getGroupsByUser( $this->getVar( 'uid' ) );\t\t\t\t\n } else {\n $this->_groups = array( 0 => ZAR_GROUP_ANONYMOUS );\n }\n }\t\t\n return $this->_groups;\n }", "public function getGroups() {\n return $this->getGuardUser() ? $this->getGuardUser()->getGroups() : array();\n }", "public function listGroups($user) {\n return $user->groups;\n }", "public function getGroups()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getGroups() : array();\r\n }", "public static function getCurrentUserGroups()\n {\n return self::getUserGroups();\n }", "private function getGroups()\n {\n $where = '';\n if ($this->userGroups)\n {\n $groups = explode(',', $this->userGroups);\n $where .= \" uid IN ('\" . implode(\"','\", $groups) . \"') \";\n }\n $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'fe_groups', $where);\n $res = array();\n while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)))\n {\n $res[$row['uid']] = $row;\n }\n\n $this->loadGroupIcons($res);\n\n return $res;\n }", "public function get_groups(){\n $group_users = private_party_group_user::search()->where('uid', $this->uid)->exec();\n $merged_groups = array();\n foreach($group_users as $group_user){\n /* @var $group_user private_party_group_user */\n $groups = $group_user->get_groups();\n $merged_groups = array_merge($merged_groups, $groups);\n }\n return $merged_groups;\n }", "public function GetMembers()\n {\n if($this->getGroupId())\n {\n $user = new User($this->sqlDataBase);\n $groupMembers = $user->GetGroupUsers($this->groupId);\n return $groupMembers;\n }\n return array();\n }", "public function getGroups()\n {\n return $this->groups;\n }", "public function getGroups()\n\t{\n\t\treturn $this->groups;\n\t}", "public function getGroups() {\n return $this->groups;\n }", "public function getGroupsWithMember($user_id) {\n return $this->get('get_groups_with_member', ['user_id' => $user_id]);\n }", "public function groups()\n {\n $response = $this->request->post($this->requestUrl('get_groups'), $this->params);\n\n return $response->groups;\n }", "public function getGroups()\n {\n if (is_null($this->groups)) {\n /** @psalm-var ?list<mixed> $data */\n $data = $this->raw(self::FIELD_GROUPS);\n if (is_null($data)) {\n return null;\n }\n $this->groups = $data;\n }\n\n return $this->groups;\n }", "public function getUsersInGroup()\n\t{\n\t\tself::authenticate();\n\n\t\t$group = FormUtil::getPassedValue('group', null, 'GETPOST');\n\n\t\tif($group == null) {\n\t\t\treturn self::retError('ERROR: No group passed!');\n\t\t}\n\n\t\t$group = UserUtil::getGroups('name = \\'' . mysql_escape_string($group) . '\\'');\n\t\t$return = array();\n\t\tif(count($group) == 1) {\n\t\t\tforeach($group as $item) {\n\t\t\t\t$users = UserUtil::getUsersForGroup($item['gid']);\n\t\t\t\tforeach($users as $uid) {\n\t\t\t\t\t$return[] = UserUtil::getVar('uname', $uid);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$return = array();\n\t\t}\n\n\t\treturn self::ret($return);\n\t}", "public function getUserGroups()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('userGroups');\n }", "public function groups()\n {\n return $this->hasMany(Group::class, 'memberuid', 'uid');\n }", "public function getAllGroups() {\n\t\t$groups = $this->group->getAll();\n\t\treturn $groups;\n\t}", "public function getGroups()\n\t{\n\t\tself::authenticate();\n\n\t\t$search = FormUtil::getPassedValue('search', null, 'GETPOST');\n\t\tif($search == 'admin') {\n\t\t\t$return = array('admin');\n\t\t} else {\n\t\t\t$return = array();\n\t\t}\n\n\t\tif($search != '') {\n\t\t\t$where = 'name LIKE \\'' . mysql_escape_string($search) . '%\\'';\n\t\t} else {\n\t\t\t$where = '';\n\t\t}\n\t\t$offset = (integer)FormUtil::getPassedValue('offset', -1);\n\t\tif($offset == null) {\n\t\t\t$offset = -1;\n\t\t}\n\t\t$limit = (integer)FormUtil::getPassedValue('limit', -1);\n\t\tif($limit == null) {\n\t\t\t$limit = -1;\n\t\t}\n\n\t\t$groups = UserUtil::getGroups($where, 'name', $offset, $limit);\n\n\t\t$return = array();\n\t\tforeach($groups as $item) {\n\t\t\t$return[] = $item['name'];\n\t\t}\n\n\t\treturn self::ret($return);\n\t}", "function get_groups() {\n\t\tif (!isset($_SESSION['groups']))\n\t\t\tlgi_mysql_fetch_session(\"SELECT GROUP_CONCAT(`name`) AS `groups` FROM %t(usergroups) AS p, %t(usercerts) AS c WHERE p.`usercertid`=c.`id` AND c.`user`='%%'\", $this->userid);\n\t\treturn explode(',', $_SESSION['groups']);\n\t}", "public function getUserGroupMemberShip($userId)\n {\n return $this->_userDao->getGroupList($userId);\n }", "public static function getAllGroupsByUserId($userId)\n {\n $arrMemberGroups = array();\n $arrOwnGroups = array();\n $arrAllGroups = array();\n \n // get user memeber groups\n $arrMemberGroups = self::select('network_groups.id', 'network_groups.name', 'network_groups.user_id')->join('group_users', 'group_users.network_group_id', '=', 'network_groups.id')\n ->where('group_users.user_id', '=', $userId)\n ->get()\n ->toArray();\n \n // get users own groups\n $arrOwnGroups = self::select('network_groups.id', 'network_groups.name', 'network_groups.user_id')->join('group_users', 'group_users.network_group_id', '=', 'network_groups.id')\n ->where('network_groups.user_id', '=', $userId)\n ->groupBy('network_groups.id')\n ->get()\n ->toArray();\n \n // merge all\n $arrAllGroups = array_merge($arrMemberGroups, $arrOwnGroups);\n \n return $arrAllGroups;\n }", "public function getUserGroups($userId){\n $query = \"SELECT * FROM groups g JOIN user_groups ug \n ON g.id = ug.groupId\n WHERE ug.userId='$userId' ORDER BY g.groupName;\";\n return $this->getData($query);\n }", "protected function _get_members_groups($member)\n {\n if ($member == $this->get_guest_id()) {\n return array(-1);\n }\n\n $groups = array();\n $additional_groups = explode(',', $this->get_member_row_field($member, 'additionalgroups'));\n foreach ($additional_groups as $key => $value) {\n if (!empty($value)) {\n $groups[] = $value;\n }\n }\n $groups[] = $this->get_member_row_field($member, 'usergroup');\n\n return $groups;\n }", "public function listGroups()\n {\n\t\t$data = $this->call(array(), \"GET\", \"groups.json\");\n\t\t$data = $data->{'groups'};\n\t\t$groupArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$groupArray->append(new Group($data[$i], $this));\n\t\t}\n\t\treturn $groupArray;\n }", "public function getAllGroups(){\n // Get list\n $lists = array(); \n $data = Group::where('account_id', $this->getAccountId()) \n ->where('user_id', $this->user_id)\n ->get() \n ->toArray();\n $lists = $data;\n return $lists;\n }", "protected function _get_moderator_groups()\n {\n $moderator_group = $this->connection->query('SELECT gid FROM ' . $this->connection->get_table_prefix() . 'usergroups WHERE title LIKE \\'' . db_encode_like('%Moderator%') . '\\'');\n\n if (is_null($moderator_group)) {\n return array();\n }\n\n $return_moderator_group = array();\n foreach ($moderator_group as $key => $value) {\n if (!empty($value['gid'])) {\n $return_moderator_group[] = $value['gid'];\n }\n }\n\n return $return_moderator_group;\n }", "public function getGroups($role = 'all')\n\t{\n\t\tstatic $groups;\n\n\t\tif (!isset($groups))\n\t\t{\n\t\t\t$groups = array(\n\t\t\t\t'applicants' => array(),\n\t\t\t\t'invitees' => array(),\n\t\t\t\t'members' => array(),\n\t\t\t\t'managers' => array(),\n\t\t\t\t'all' => array()\n\t\t\t);\n\t\t\t$groups['all'] = Helper::getGroups($this->get('uidNumber'), 'all', 1);\n\n\t\t\tif ($groups['all'])\n\t\t\t{\n\t\t\t\tforeach ($groups['all'] as $item)\n\t\t\t\t{\n\t\t\t\t\tif ($item->registered)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!$item->regconfirmed)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups['applicants'][] = $item;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($item->manager)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$groups['managers'][] = $item;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$groups['members'][] = $item;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$groups['invitees'][] = $item;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($role)\n\t\t{\n\t\t\treturn (isset($groups[$role])) ? $groups[$role] : false;\n\t\t}\n\n\t\treturn $groups;\n\t}", "public function getGroups(){\n $groups = Group::get()->toArray();\n $groups_array = array();\n foreach($groups as $group){\n $groups_array[$group['id']]['group_name'] = $group['group_name'];\n $groups_array[$group['id']]['user_ids'] = explode(\",\",$group['user_ids']);\n }\n return $groups_array;\n }", "function getGroups($uid, $asString = FALSE)\n {\n static $grouplist = NULL;\n\n $menber =& xoops_gethandler('member');\n\n if (is_null($grouplist)) {\n $grouplist = $menber->getGroupList();\n }\n foreach($menber->getGroupsByUser($uid) as $gid) {\n $ret[$gid] = $grouplist[$gid];\n }\n if ($asString) {\n $ret = join($asString, $ret);\n }\n\n return $ret;\n }", "public function getUserGroupIDs()\n {\n $membergroupids = explode(',', $this->userInfo->membergroupids);\n\n if (in_array($this->userInfo->usergroupid, $membergroupids)) {\n return $membergroupids;\n }\n\n return [$this->userInfo->usergroupid] + $membergroupids;\n }", "private function getUserGroups($userId){\n\t\t\t$publicGroups = $this->getGroupsByUserId($userId, 1);\n\t\t\t$privateGroups = $this->getGroupsByUserId($userId, 0);\n\t\t\t\n\t\t\t$userGroups = array();\n\t\t\t\n\t\t\tforeach($publicGroups as $group){\n\t\t\t\tif($group[\"joined\"] == 0)\n\t\t\t\t\tcontinue;\n\t\t\t\t$userGroups[] = $group;\n\t\t\t}\n\t\t\t\n\t\t\tforeach($privateGroups as $group){\n\t\t\t\t$userGroups[] = $group;\n\t\t\t}\n\t\t\t\n\t\t\treturn $userGroups;\n\t\t}", "function getMembersGroups($memberID) {\r\n $sql = $this->db->prepare(\"SELECT GROUPS.groupID, GROUPS.name FROM GROUPMEMBERS LEFT JOIN GROUPS ON GROUPMEMBERS.groupID=GROUPS.groupID WHERE GROUPMEMBERS.UserID='$memberID'\");\r\n if($sql->execute()) {\r\n return $sql->fetchall( PDO::FETCH_ASSOC );\r\n }\r\n return false;\r\n }", "function groups($user_id)\n\t{\n\t\tif(!is_numeric($user_id) || $user_id < 1)\n\t\t{\n\t\t\tthrow new InvalidArgumentException('Invalid user id.');\n\t\t}\n\n\t\treturn $this->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t$this->name . '.user_id' => $user_id,\n\t\t\t),\n\t\t\t'contain' => array(\n\t\t\t\t'Group',\n\t\t\t\t'Group.Project',\n\t\t\t\t'Group.User',\n\t\t\t\t'Role',\n\t\t\t),\n\t\t\t'order' => 'Group.name',\n\t\t));\n\t}", "public function getGroups();", "public function getGroups();", "public function getUserGroupIds()\n\t{\n\t\treturn $this->user_group_ids;\n\t}", "protected function _get_usergroup_list()\n {\n $results = $this->connection->query('SELECT gid,title FROM ' . $this->connection->get_table_prefix() . 'usergroups');\n $mod_results = array();\n foreach ($results as $key => $value) {\n $mod_results[] = array('group_id' => $value['gid'], 'group_name' => $value['title']);\n }\n $results2 = collapse_2d_complexity('group_id', 'group_name', $mod_results);\n return $results2;\n }", "function _get_usergroups($args = array()) {\n\t\treturn WP_Scoped_User_Anon::get_groups_for_user( -1 );\n\t}", "public function getGroupsByUser(Mage_Admin_Model_User $user)\n {\n $connection = $this->getResource()\n ->getReadConnection();\n\n $select = $connection->select()\n ->from($this->_groupUserTable, array('group_id'))\n ->where('user_id = :user_id');\n\n $bind = array('user_id' => (int)$user->getId());\n\n return $connection->fetchAssoc($select, $bind);\n }", "public function groups() : array\n {\n return $this->groups;\n }", "public function groups() : array\n {\n return $this->groups;\n }", "public static function getGroups($idUser){ \r\n $user = self::findUser($idUser); \r\n $groups = $user->groups;\r\n foreach ($groups as $key => &$value) {\r\n $value['role_id'] = $value->pivot->role_id;\r\n $value['role'] = Role::find($value->pivot->role_id)->name;\r\n unset($value->pivot);\r\n }\r\n return $groups;\r\n }", "function getGroups($username){\r\n\t\t//SELEZIONO DAL DATABASE L'ELENCO DEI GRUPPI AI QUALI L'UTENTE APPARTIENE\r\n\t\t$sql = \"SELECT groupname FROM \".$this->schema.\".user_group WHERE username='$username'\";\r\n\t\tprint_debug($sql,null,'tabella');\r\n\t\tif($this->db->sql_query($sql)){\t\t//STRUTTURA GRUPPI GISCLIENT\r\n\t\t\t$ris=$this->db->sql_fetchlist('groupname');\r\n\t\t\tif(!$ris) {\r\n\t\t\t\t$this->error->getError(\"C001\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tforeach($ris as $g){\r\n\t\t\t\t$this->groups[]=$g;\r\n\t\t\t}\r\n\t\t\treturn $this->groups;\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$this->error->setNote($sql);\r\n\t\t\t$this->error->getError(\"1\");\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function getUserGroups($username)\n {\n $apiEndpoint = '/1/user/group/direct?username='.$username;\n $apiReturn = $this->runCrowdAPI($apiEndpoint, \"GET\", array());\n if ($apiReturn['status'] == '200') {\n $groups = array();\n for ($i = 0; $i < count($apiReturn['data']['groups']); $i++) {\n $groups[] = $apiReturn['data']['groups'][$i]['name'];\n }\n return $groups;\n }\n return null;\n }", "public static function getAllGroups()\n {\n return ValveGroup::all();\n }", "public static function getUserGroups($user)\n {\n return self::getAccount($user, array('CN'));\n }", "public static function getGroups(): array\n {\n return ['user'];\n }", "function getGroups() {\n $groups = $this->groups;\n if (is_string($groups)) {\n $groups = explode(',', $groups);\n }\n return $groups;\n }", "static function MemberMembergroups(Member $member)\n {\n if (!$member->Exists())\n {\n return array();\n }\n $sql = Access::SqlBuilder();\n $tblMmg = MemberMembergroup::Schema()->Table();\n $tblMg = Membergroup::Schema()->Table();\n $join = $sql->Join($tblMmg);\n $joinCondition = $sql->Equals($tblMmg->Field('MemberGroup'), $tblMg->Field('ID'));\n $where = $sql->Equals($tblMmg->Field('Member'), $sql->Value($member->GetID()));\n $orderBy = $sql->OrderList($sql->OrderAsc($tblMg->Field('Name')));\n \n return Membergroup::Schema()->Fetch(false, $where, $orderBy, null, 0, null, $join, JoinType::Inner(), $joinCondition);\n }", "public function getMembers() {\n /* get members */\n $c = $this->modx->newQuery('modUser');\n $c->innerJoin('modUserGroupMember','UserGroupMembers');\n $c->innerJoin('modUserGroupRole','Role','UserGroupMembers.role = Role.id');\n $c->where(array(\n 'UserGroupMembers.user_group' => $this->userGroup->get('id'),\n ));\n $c->select($this->modx->getSelectColumns('modUser','modUser'));\n $c->select(array(\n 'role' => 'Role.id',\n 'role_name' => 'Role.name',\n ));\n $members = $this->modx->getCollection('modUser',$c);\n $list = array();\n /** @var $member modUserGroupMember */\n foreach ($members as $member) {\n $list[] = array(\n $member->get('id'),\n $member->get('username'),\n $member->get('role'),\n $member->get('role_name'),\n );\n }\n $this->userGroupArray['members'] = '(' . $this->modx->toJSON($list) . ')';\n return $list;\n }", "private function getUserGroups($user){\n\t\t// check if the user exists\n\t\tif (posix_getpwnam($user) === false) {\n\t\t\treturn false;\n\t\t}\n\t\t// use the command \"groups <user>\" to find the groups\n\t\t// the format of output is as follows:\n\t\t// <user> : <group1> <group2> <group3> ...\n\t\t$output = shell_exec(\"groups \" . escapeshellarg($user));\n\t\t$output = trim($output); //get rid of newline\n\t\t\n\t\t// userstring = <user>, groupstring = <group1> <group2> <group3> ...\n\t\tlist($userstring,$groupstring) = explode( \":\", $output);\n\t\t\n\t\t//groups[0] = <group1>, groups[1] = <group2>, groups[2] = <group3>...\n\t\t$groups = explode(\" \",trim($groupstring)); //remove leading space from $groupstring, then split\n\t\t\n\t\treturn $groups;\n\t}", "public function getGrouped()\n {\n if ( ! $this->prepared) {\n $this->prepareForPresentation();\n }\n\n return $this->permissionGroups;\n }", "public function getUsergroupIds()\n\t{\n\t\treturn $this->usergroup_ids;\n\t}", "public function getAllGroups();", "public function get_groups($sql_select = FALSE, $sql_where = FALSE) {\n // Set any custom defined SQL statements.\n $this->set_custom_sql_to_db($sql_select, $sql_where);\n\n return $this->db->get($this->auth->tbl_user_group);\n }", "public function get_groups()\n {\n $qry = ee()->db->where('site_id', ee()->publisher_lib->site_id)\n ->order_by('group_name', 'asc')\n ->get('category_groups');\n\n $groups = array();\n\n if ($qry->num_rows())\n {\n foreach ($qry->result() as $group)\n {\n $groups[$group->group_id] = $group;\n }\n }\n\n return $groups;\n }", "public function getUsers()\n {\n\t\treturn $this->api->listUsersOfGroup($this->getID());\n }", "public function GetUserGroups($userId)\n {\n $return = false;\n $obs = $this->GetAll(array(\"user\" => $userId));\n if(Checker::isArray($obs, true, $this->ERROR_INFO(__FUNCTION__)))\n {\n $userGroups = array();\n foreach($obs as $ob)\n {\n $userGroup = $ob->Value(\"userGroup\", true);\n if($this->isObject($userGroup, \"UserGroup\", false, __FUNCTION__))\n {\n $userGroups[$userGroup->ID()] = $userGroup;\n }\n }\n if(count($userGroups) === count($obs)) $return = $userGroups;\n }\n return $return;\n }", "function getUsersGroups($mysqli,$userID){\r\n $result = $mysqli->query(\"SELECT groups.*, group_members.isAdmin FROM `group_members` RIGHT JOIN groups ON group_members.group_ID = groups.ID WHERE Member_ID = \".$userID.\"\");\r\n $groups = array();\r\n\r\n $i=0;\r\n while($row = $result->fetch_row()){\r\n $g = new group();\r\n $g->groupID = $row[0];\r\n $g->name = $row[1];\r\n $g->description = $row[2];\r\n $g->website = $row[3];\r\n $g->private = $row[4];\r\n $g->type = $row[5];\r\n $g->sport = $row[6];\r\n $g->logoURL = $row[7];\r\n $g->city = $row[8];\r\n $g->userIsAdmin = $row[9];\r\n $groups[$i] = $g;\r\n $i++;\r\n }\r\n return $groups;\r\n }", "public function getTaoUserGroups()\n {\n return $this->hasMany(TaoUserGroup::className(), ['tao_group_id' => 'id']);\n }", "public function getGroups() {\n\t\treturn array(\n\t\t\t'user_meta' => array(\n\t\t\t\t'type' => 'error',\n\t\t\t\t'message' => 'Usage of users/usermeta tables is highly discouraged in VIP context, For storing user additional user metadata, you should look at User Attributes.',\n\t\t\t\t'object_vars' => array(\n\t\t\t\t\t'$wpdb->users',\n\t\t\t\t\t'$wpdb->usermeta',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'cache_constraints' => array(\n\t\t\t\t'type' => 'warning',\n\t\t\t\t'message' => 'Due to using Batcache, server side based client related logic will not work, use JS instead.',\n\t\t\t\t'variables' => array(\n\t\t\t\t\t'$_COOKIE',\n\t\t\t\t\t),\n\t\t\t\t'array_members' => array(\n\t\t\t\t\t'$_SERVER[\\'HTTP_USER_AGENT\\']',\n\t\t\t\t\t'$_SERVER[\\'REMOTE_ADDR\\']',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}", "public function groups()\n {\n return $this->groupModel\n ->orderBy('name', 'asc')\n ->findAll();\n }", "public function getAccessGroups()\n\t{\n\t\t//create QueryBuilder\n\t\t$queryBuilder = $this->entityManager->createQueryBuilder();\n\n\t\t//create query\n\t\t$queryBuilder->select(\"g\");\n\t\t$queryBuilder->from(\"yourCMDB:CmdbAccessGroup\", \"g\");\n\n\t\t//get results\n\t\t$query = $queryBuilder->getQuery();\n\t\t$groups = $query->getResult();\n\n\t\t//return\n\t\treturn $groups;\n\t}", "public function getMemberGroups($member, $status = null)\n {\n if (!is_object($member) || !($member_id = $member->getPKValue()))\n {\n return array();\n }\n\n $links = $this->findByWhereMany(\"IdMember = '{$member_id}'\" . ((!empty($status)) ? \" AND Status = '\" . $this->dao->escape($status) . \"'\" : ''));\n\n $groups = array();\n foreach ($links as &$link)\n {\n $groups[] = $link->IdGroup;\n unset($link);\n }\n unset($links);\n if (empty($groups))\n {\n return array();\n }\n\n $where = \"id IN ('\" . implode(\"','\", $groups) . \"') ORDER BY Name\";\n return $this->createEntity('Group')->findByWhereMany($where);\n }", "public function getAllowedStaffGroups()\n {\n $this->refreshAllowedStaffGroups();\n\n return $this->_getVar('__allowedStaffGroups');\n }", "public function getGroupsWithAdmin($user_id) {\n return $this->get('get_groups_with_admin', ['user_id' => $user_id]);\n }", "public function getGroupNames() {\n return $this->getGuardUser() ? $this->getGuardUser()->getGroupNames() : array();\n }", "public function getGroups() {}", "public function getGroups() {\n return parent::getGroups();\n }", "public function getGroupsList(){\n return $this->_get(1);\n }", "function getGroups( $userId )\n\t{\n\t\t$query = \"SELECT DISTINCT CONCAT(units.alias,'-',holders.position,'-current')\n\t\t\t FROM holders, terms, units\n\t\t\t WHERE holders.term = terms.current_term\n\t\t\t AND holders.unitId = units.id\n\t\t\t AND holders.userid = ?;\";\n\n\t\t$groups = $this->_db->fetchAll($query, $userId);\n\t\treturn $groups;\n\t}", "public function GetGroupsList()\n\t{\n\t\t$queryGroupList = \"SELECT id, group_name FROM groups ORDER BY group_name\";\n $groupList = $this->sqlDataBase->query($queryGroupList);\n $groupListArr = $groupList->fetchAll(PDO::FETCH_ASSOC);\n\n return $groupListArr;\n\t}", "function get_all_user_group()\n {\n $user_group = $this->db->query(\"\n SELECT\n *\n\n FROM\n `groups`\n\n WHERE\n 1 = 1\n AND gro_id != 1\n\n ORDER BY `gro_id` DESC\n \")->result_array();\n\n return $user_group;\n }", "public function get_groups($data)\n {\n $sql = $this->db->get_where('grupos_usuarios', $data);\n return $sql->result();\n }", "function groups_get_all_groups($courseid, $userid=0, $groupingid=0, $fields='g.*') {\n\t global $CFG;\n\n\t // groupings are ignored when not enabled\n\t if (empty($CFG->enablegroupings)) {\n\t $groupingid = 0;\n\t }\n\n\t if (empty($userid)) {\n\t $userfrom = \"\";\n\t $userwhere = \"\";\n\n\t } else if (is_array($userid)) {\n\t $userids = implode(',', $userid);\n\t $userfrom = \", {$CFG->prefix}groups_members gm\";\n\t $userwhere = \"AND g.id = gm.groupid AND gm.userid IN ($userids)\";\n\n\t } else {\n\t $userfrom = \", {$CFG->prefix}groups_members gm\";\n\t $userwhere = \"AND g.id = gm.groupid AND gm.userid = '$userid'\";\n\t }\n\n\t if (!empty($groupingid)) {\n\t $groupingfrom = \", {$CFG->prefix}groupings_groups gg\";\n\t $groupingwhere = \"AND g.id = gg.groupid AND gg.groupingid = '$groupingid'\";\n\t } else {\n\t $groupingfrom = \"\";\n\t $groupingwhere = \"\";\n\t }\n\n\t return get_records_sql(\"SELECT $fields\n\t FROM {$CFG->prefix}groups g $userfrom $groupingfrom\n\t WHERE g.courseid = $courseid $userwhere $groupingwhere\n\t ORDER BY name ASC\");\n\t}", "public function retrieveGroups()\n {\n return $this->start()->uri(\"/api/group\")\n ->get()\n ->go();\n }", "public function groups()\n {\n return $this->belongsToMany(Group::class, 'user_group');\n }", "protected function getGroups()\n\t{\n\t\t$groups = array();\n\n\t\t$groups[''] = array();\n\t\t$groups[''][] = JHtml::_('select.option', $this->value, $this->value, 'value', 'text');\n\n\t\t$this->addGroup($groups, 'User', \t\t$this->getUserFields());\n\t\t$this->addGroup($groups, 'Order', \t\t$this->getOrderFields());\n\t\t$this->addGroup($groups, 'Shipping', \t$this->getAddressFields('shipping'));\n\t\t$this->addGroup($groups, 'Billing',\t$this->getAddressFields('billing'));\n\t\t$this->addGroup($groups, 'Item',\t\t$this->getItemFields());\n\n\t\treset($groups);\n\n\t\treturn $groups;\n\t}", "private function getUserGroups($userID)//this function should be moved to the UserVo\n\t{\n\t\t$db = Zend_Registry::get('db');\n\t\t\n\t\t$select = $db->select()\n\t\t\t\t\t->from(PrecurioTableConstants::USER_GROUPS,'group_id')\n\t\t\t\t\t->join(PrecurioTableConstants::GROUPS,'user_groups.group_id = groups.id','')\n\t\t\t\t\t->where('user_id= ?',$userID)\n\t\t\t\t\t->where ('active= ?',true);\n\t\t\t\t\t\n\t\t$stmt = $select->query();\n\t\t\n\t\t$stmt->setFetchMode(Zend_Db::FETCH_NUM);\n\t\t\n\t\t$userGroups = $stmt->fetchAll();\n\t\t$userGroups = Precurio_Utils::getSecondLevelArray($userGroups,0);\n\t\treturn $userGroups;\n\t}", "public function getGroupNames()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getGroupNames() : array();\r\n }", "function people_getPublicGroups ($user_id) {\n $response = $this->execute(array('method' => 'flickr.people.getPublicGroups', 'user_id' => $user_id));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['groups']['group'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "function joined_groups() // pulls all the groups the user is joined but excludes school group\n {\n $user = $this->ion_auth->get_user();\n $query_string = \"SELECT group_relationships.group_id, groups.name FROM group_relationships LEFT JOIN groups ON group_relationships.group_id = groups.id \" .\n \"WHERE group_relationships.user_joined_id = ? AND groups.school_group=0\";\n $query = $this->db->query($query_string, array($user->id));\n\n $return_array = array();\n foreach ($query->result() as $row)\n {\n $return_array[] = array('id' => $row->group_id,\n 'name' => $row->name);\n }\n\n return $return_array;\n }", "function _get_user_groups(){\r\n $groups = array();\r\n for($i=0; $i<get_sso_option('rules_number'); $i++){\r\n $rule = _get_rule($i);\r\n if($rule != FALSE){\r\n\t $is_group = _run_rule($rule['var'], $rule['regexp'], $rule['group']);\r\n\t if($is_group === TRUE) $groups[] = $rule['group'];\r\n }\r\n }\r\n return $groups;\r\n}", "public function GetStudentGroups( Core_Library_User $oUser )\n\t{\n\t\t$oDb = $this->GetProject()->Db();\n\t\t\n\t\t$oSelect = $oDb\n\t\t\t->select()\n\t\t\t->from( array( 'g' => Core_Library_TName::GetPjGroupLink() ), 'id_group_parent' )\n\t\t\t->where( 'id_role=?', Lmds_User_Student::ROLE_ID )\n\t\t\t->where( 'id_group = ?', $oUser->GetUserId() );\n\t\t\n\t\t$oResultSet = $oSelect->query();\n\t\t\n\t\t$aStudentGroups = array();\n\t\twhile ( ( $aResult = $oResultSet->fetch() ) ) {\n\t\t\t$aStudentGroups[] = $this->GetGroupFromVznIdGroup( $aResult[ 'id_group_parent' ] );\n\t\t}\n\t\t\n\t\treturn $aStudentGroups;\n\t}", "public static function GetList()\n {\n $groups_directory = System::GetDataPath() . 'groups';\n \n $dir_handle = opendir($groups_directory);\n $groups = array();\n\n while (($group_directory = readdir($dir_handle)) !== false)\n {\n if(!is_dir($groups_directory . '/' . $group_directory))\n continue;\n\n //just check directories inside and skip the guest user group\n if (strcmp($group_directory, '.') != 0 && strcmp($group_directory, '..') != 0 && strcmp($group_directory, 'guest') != 0)\n {\n $group_data = self::GetData($group_directory);\n\n $groups[] = $group_data;\n }\n }\n\n return $groups;\n }", "protected function getGroups()\n\t{\n\t\tif (isset($this->element['groups']))\n\t\t{\n\t\t\treturn explode(',', $this->element['groups']);\n\t\t}\n\n\t\treturn;\n\t}", "public function group()\n\t{\n\t\t$group = \\Hubzero\\User\\Group::getInstance($this->get('owned_by_group'));\n\t\tif (!$group)\n\t\t{\n\t\t\t$group = new \\Hubzero\\User\\Group;\n\t\t}\n\t\treturn $group;\n\t}", "public function getGroups($username, $password) {\nglobal $_LW;\nif (!isset($this->client)) { // require the client\n\treturn false;\n};\n$this->client->getGroups($username, $password); // perform the API call\nreturn @$this->client->groups;\n}", "static function getUserGroups(){\n \n }", "protected function readGroups() {\n\t\tif ($this->items) {\n\t\t\t$sql = \"SELECT\t\tuser_group.*, (SELECT COUNT(*) FROM wcf\".WCF_N.\"_user_to_groups WHERE groupID = user_group.groupID) AS members\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_group user_group\n\t\t\t\tORDER BY\t\".($this->sortField != 'members' ? 'user_group.' : '').$this->sortField.\" \".$this->sortOrder;\n\t\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$row['deletable'] = (!WCF::getUser()->getPermission('admin.user.canDeleteGroup') || Group::isMember($row['groupID']) || !Group::isAccessibleGroup($row['groupID']) || $row['groupType'] == Group::EVERYONE || $row['groupType'] == Group::GUESTS || $row['groupType'] == Group::USERS) ? 0 : 1;\n\t\t\t\t$row['editable'] = (WCF::getUser()->getPermission('admin.user.canEditGroup') && Group::isAccessibleGroup($row['groupID'])) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t$this->groups[] = $row;\n\t\t\t}\n\t\t}\n\t}", "function db_get_groups()\n{\n\t$dbh = db_connect();\n\n\t$query = \"SELECT * FROM `groups`\";\n\t$result = $dbh->query($query);\n\tif (!$result)\n\t{\n\t\tglobal $db_errno;\n\t\t$db_errno = $dbh->errno;\n\t\tglobal $db_errmsg;\n\t\t$db_errmsg = $dbh->error;\n\n\t\treturn NULL;\n\t}\n\t$retval = array();\n\twhile ($row = $result->fetch_assoc())\n\t{\n\t\t$retval[$row['id']] = $row;\n\t}\n\n\t// Get the members as well.\n\t// In each group's entry, 'members' is an array listing the\n\t// IDs of members of that group. Positive IDs corresond to\n\t// feeds, and negative IDs correspond to groups.\n\t$result = $dbh->query(\"SELECT * FROM group_members\");\n\tif (!$result)\n\t{\n\t\tglobal $db_errno;\n\t\t$db_errno = $dbh->errno;\n\t\tglobal $db_errmsg;\n\t\t$db_errmsg = $dbh->error;\n\n\t\treturn NULL;\n\t}\n\n\twhile ($row = $result->fetch_assoc())\n\t{\n\t\t// $row == (member, parent)\n\t\t// We take $row[parent] to get the parent, and append to\n\t\t// its 'members' array.\n\t\t$retval[$row['parent']]['members'][] = $row['member'];\n\t}\n\n\treturn $retval;\n}", "public function getGroupsList(){\n return $this->_get(4);\n }", "public function getGroupsList(){\n return $this->_get(4);\n }" ]
[ "0.79191273", "0.77802896", "0.7761671", "0.75694394", "0.7554897", "0.7506751", "0.7502249", "0.7477684", "0.7460359", "0.7455597", "0.7444235", "0.7432532", "0.73641896", "0.7239706", "0.7162546", "0.7143406", "0.71295285", "0.7111747", "0.7003287", "0.7000231", "0.6942885", "0.6901831", "0.68806", "0.6849231", "0.68182373", "0.679194", "0.676465", "0.6761135", "0.6717238", "0.6698248", "0.6678669", "0.66655904", "0.6650725", "0.66503346", "0.6632771", "0.659949", "0.6591672", "0.6589806", "0.65789807", "0.6567312", "0.6565411", "0.6565411", "0.6564512", "0.65486336", "0.6545842", "0.6530652", "0.65160245", "0.65160245", "0.6503089", "0.6452763", "0.64507186", "0.64461863", "0.6443664", "0.64434415", "0.6440018", "0.64298654", "0.64142704", "0.6396815", "0.63926494", "0.6388047", "0.6385389", "0.63825876", "0.6365166", "0.6349248", "0.6341635", "0.6326214", "0.62918884", "0.62916887", "0.6281854", "0.627089", "0.6267261", "0.6266486", "0.62510145", "0.622814", "0.62258965", "0.6221059", "0.6201598", "0.6191624", "0.61883384", "0.6179727", "0.6166826", "0.6165387", "0.6162511", "0.61598754", "0.6155766", "0.6150888", "0.6135304", "0.6135072", "0.6132756", "0.6131055", "0.61149347", "0.6110047", "0.61002046", "0.60870636", "0.60851985", "0.60847086", "0.60483265", "0.604714", "0.60415554", "0.60415554" ]
0.77837163
1
Checks if the user is a member of a group.
public function isMemberOf($group) { if ($group == 'everyone') { return true; } return GroupMember::where('group', $group) ->where('user_id', $this->id()) ->count() == 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isMemberOf(User $user,String $groupname){\r\n foreach($user->groups as $group){\r\n if($groupname ==$group->name)\r\n return true;\r\n }\r\n return false;\r\n }", "public function isUserMember($group, $user_id)\n\t{\n\t\t$isJoined = DB::select(\"select user_id from group_user where user_id = $user_id and group_id = $group->id\");\n\n\t\tif (!empty($isJoined)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "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 in_group(Group $group) {\r\n\t\tif ($this->user_id && $group->group_id) {\r\n\t\t\t$sql = \"SELECT group_id FROM `group_members` WHERE group_id = '$group->group_id' AND user_id = '$this->user_id\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\tif ($result->num_rows == 1) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function inGroup($name) {\r\n // Check if the user belongs to the group\r\n if (in_array($name, $this->groups)) {\r\n // If then do, return true\r\n return true;\r\n }\r\n // User doesn't belong to group, return false\r\n return false;\r\n }", "public function isMemberOf($group_name){\n return $this->permission()->isMemberOf($this,$group_name);\n }", "function is_user_member_of($db, $group_id)\n{\n global $current_user;\n if ($current_user === NULL) {\n return False;\n }\n\n $records = exec_sql_query(\n $db,\n \"SELECT id FROM memberships WHERE (group_id = :group_id) AND (user_id = :user_id);\",\n array(\n ':group_id' => $group_id,\n ':user_id' => $current_user['id']\n )\n )->fetchAll();\n if ($records) {\n return True;\n } else {\n return False;\n }\n}", "public function is_user_active_member($user, $group){\n\t\tif($user->exists() && $group->exists()){\n\t\t\t// Populate the users groups if not already done:\n\t\t\tif(!$user->are_groups_populated()){\n\t\t\t\t$user->populate_groups();\n\t\t\t}\n\t\t\t// Retrieve groups user is currently active with:\n\t\t\t$users_active_groups = $user->get_groups();\n\t\t\t// If users has no active groups then return false:\n\t\t\tif(!$user->get_groups()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Got this far? There's at least one group to check then:\n\t\t\tforeach($users_active_groups as $active_group){\n\t\t\t\tif($active_group->data()->id == $group->data()->id)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\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 static function isUserbelongToGroup($user_id, $group_name) {\n return (in_array($group_name, self::getUserGroups($user_id)));\n }", "public function has_group($group_name){\n // Administrator has all the things.\n if($this->uid == 1){\n return TRUE;\n }\n\n foreach($this->get_groups() as $group){\n /* @var $group_user private_party_group */\n if($group->name == $group_name){\n return TRUE;\n }\n }\n return FALSE;\n }", "public static function isMemberOf($group)\n {\n return plexcel_is_member_of(self::getConnection(), $group);\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 is($group)\n {\n if ($this->userInfo->userid) {\n if (array_key_exists($group, $this->userGroups)) {\n $userInfoGroups = explode(',', $this->userInfo->membergroupids);\n if (in_array($this->userGroups[$group][0], $userInfoGroups)) {\n return true;\n }\n }\n }\n\n return false;\n }", "function userIsInGroup($user, $gid, $subgroups = true)\n {\n return false;\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}", "public function authGroup($user, $group) \n {\n $valid = true;\n\n if ($this->mode === 'authGroupsFE' && ($group['uid'] === '-333' || $group['uid'] === '-444')) {\n $valid = false;\n } \n\n return $valid;\n }", "function checkIfMemberInGroup($userID, $groupID) {\r\n $sql = $this->db->prepare(\"SELECT groupID FROM GROUPMEMBERS WHERE UserID=:user_id AND groupID=:group_id\");\r\n $sql->execute(array(\r\n 'user_id' => $userID,\r\n 'group_id' => $groupID,\r\n ));\r\n return $sql->fetch(PDO::FETCH_ASSOC);\r\n }", "function mx_is_group_member($group_ids = '', $group_mod_mode = false)\n\t{\n\t\tglobal $user, $db;\n\n\t\tif ($group_ids == '')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$group_ids_array = explode(\",\", $group_ids);\n\n\t\t// Try to reuse usergroups result.\n\t\tif ($group_mod_mode)\n\t\t{\n\t\t\t$userdata_key = 'mx_usergroups_mod' . $user->data['user_id'];\n\n\t\t\tif (empty($user->data[$userdata_key]))\n\t\t\t{\n\t\t\t\t// Check if user is group moderator..\n\t\t\t\t$sql = \"SELECT gr.group_id\n\t\t\t\t\t\tFROM \" . GROUPS_TABLE . \" gr, \" . USER_GROUP_TABLE . \" ugr\n\t\t\t\t\t\tWHERE gr.group_id = ugr.group_id\n\t\t\t\t\t\t\tAND gr.group_moderator = '\" . $user->data['user_id'] . \"'\n\t\t\t\t\t\t\tAND ugr.user_pending = '0' \";\n\t\t\t\t$result = $db->sql_query($sql);\n\t\t\t\t$group_row = $db->sql_fetchrowset($result);\n\t\t\t\t$user->data[$userdata_key_mod] = $group_row;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$userdata_key = 'mx_usergroups' . $user->data['user_id'];\n\n\t\t\tif (empty($user->data[$userdata_key]))\n\t\t\t{\n\t\t\t\t// Check if user is member of the proper group..\n\t\t\t\t$sql = \"SELECT group_id FROM \" . USER_GROUP_TABLE . \" WHERE user_id='\" . $user->data['user_id'] . \"' AND user_pending = 0\";\n\t\t\t\t$result = $db->sql_query($sql);\n\t\t\t\t$group_row = $db->sql_fetchrowset($result);\n\t\t\t\t$user->data[$userdata_key] = $group_row;\n\t\t\t}\n\t\t}\n\n\t\tfor ($i = 0; $i < sizeof($user->data[$userdata_key]); $i++)\n\t\t{\n\t\t\tif (in_array($user->data[$userdata_key][$i]['group_id'], $group_ids_array))\n\t\t\t{\n\t\t\t\t$is_member = true;\n\t\t\t\treturn $is_member;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function isMember(): bool\n {\n return !is_null($this->group_id);\n }", "public function hasGroup(Group $group): bool;", "public function getUserPresenceInGroupUsingTheGraphApi(string $user, string $group): bool {\n\t\t$user = $this->featureContext->getActualUsername($user);\n\t\t$userId = $this->featureContext->getAttributeOfCreatedUser($user, \"id\");\n\t\t$members = $this->theAdminHasRetrievedMembersListOfGroupUsingTheGraphApi($group);\n\t\t$found = false;\n\t\tforeach ($members as $member) {\n\t\t\tif ($member[\"id\"] === $userId) {\n\t\t\t\t$found = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $found;\n\t}", "public function create(User $user, Group $group) {\n return $user->memberOfGroups->contains($group);\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 static function userInGroup(int $groupId): bool\n\t{\n\t\tif (\\Bitrix\\Main\\Loader::includeModule('socialnetwork'))\n\t\t{\n\t\t\treturn \\CSocNetUserToGroup::getUserRole(\n\t\t\t\tManager::getUserId(),\n\t\t\t\t$groupId\n\t\t\t) <= SONET_ROLES_USER;\n\t\t}\n\n\t\treturn false;\n\t}", "public static function chechIfUserIsMemberOfGroups($user, $groups)\n {\n $groups_of_user = self::getUserGroups($user);\n\n if (isset($groups_of_user['memberOf']))\n {\n foreach($groups as $group)\n {\n if (preg_match('#[=,]'.$group.\",#\", var_export($groups_of_user['memberOf'], true)))\n {\n return true;\n }\n }\n }\n return false;\n }", "public function checkGroup($userDN, $groupDN)\n {\n if (!$user = $this->getUser($userDN)) {\n throw new RuntimeException('invalid user DN');\n }\n\n for ($i = 0; $i < $user->memberof['count']; $i++) {\n if ($groupDN == $user->memberof[$i]) {\n return true;\n }\n }\n\n return false;\n }", "public function groupExists()\n\t{\n\t\tself::authenticate();\n\n\t\t$search = FormUtil::getPassedValue('group', null, 'GETPOST');\n\t\t$return = false;\n\t\tif($search == 'admin') {\n\t\t\t$return = true;\n\t\t} else {\n\t\t\tif($search != '') {\n\t\t\t\t$where = 'name = \\'' . mysql_escape_string($search) . '\\'';\n\t\t\t} else {\n\t\t\t\t$where = '';\n\t\t\t}\n\t\t\t$offset = (integer)FormUtil::getPassedValue('offset', -1);\n\t\t\tif($offset == null) {\n\t\t\t\t$offset = -1;\n\t\t\t}\n\t\t\t$limit = (integer)FormUtil::getPassedValue('limit', -1);\n\t\t\tif($limit == null) {\n\t\t\t\t$limit = -1;\n\t\t\t}\n\n\t\t\t$groups = UserUtil::getGroups($where, 'name', $offset, $limit);\n\n\t\t\tif(count($groups) >= 1) {\n\t\t\t\t$return = true;\n\t\t\t}\n\t\t}\n\n\t\treturn self::ret($return);\n\t}", "public function hasGroup( $group_name )\n {\n return in_array( $group_name, $this->groupNames );\n }", "public function isGroupMember($userId, $groupId)\n {\n if ($userId <= 0 || $groupId <= 0 || !is_numeric($userId) || !is_numeric($groupId)) {\n return false;\n }\n\n $select = sprintf('\n SELECT\n fu.user_id AS user_id\n FROM\n %sfaquser fu,\n %sfaquser_group fug,\n %sfaqgroup fg\n WHERE\n fu.user_id = %d AND\n fu.user_id = fug.user_id AND\n fg.group_id = fug.group_id AND\n fg.group_id = %d',\n PMF_Db::getTablePrefix(),\n PMF_Db::getTablePrefix(),\n PMF_Db::getTablePrefix(),\n $userId,\n $groupId\n );\n\n $res = $this->config->getDb()->query($select);\n if ($this->config->getDb()->numRows($res) == 1) {\n return true;\n }\n\n return false;\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 isOwnerOfGroup($group);", "public function hasGroup()\n {\n return $this->_has('_group');\n }", "public function hasGroup($name)\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->hasGroup($name) : false;\r\n }", "function isInGroup($group)\n {\n $this->load();\n return isset($this->_group_ids_set[$group->id]);\n }", "public function isAuthorized() {\n\t\t$UserDN = $this->getDistinguishedName($this->Username);\n\t\t$GroupMemberships = $this->getGroups($UserDN);\n\t\tforeach($this->Groups as $Group) {\n\t\t\tif(in_array($this->getDistinguishedName($Group), $GroupMemberships)) {\n\t\t\t/*\n\t\t\t* If any Group the User is a Member of matches the Allowed groups -> Authorization success.\n\t\t\t*/\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t* This only happens when no Groupmembership matches the Allowed groups -> Authorization failed.\n\t\t*/\n\t\treturn false;\n\t}", "public function isInGroup($group_id){\n return $this->permission()->isInGroup($this,$group_id);\n }", "public function hasGroup(Group $group) : bool\n {\n return $this->hasGroupId($group->id);\n }", "public function inDealerGroup($user){\n\t\t$dealerGroupId = $this->getDealerGroupId();\n\t\tforeach ($user->groups as $groupId => $value){\n\t\t\tif($dealerGroupId==$groupId){\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "private function _valid_group_members($member_id)\n {\n // Get the group detail\n $res = $this->_api('user')->get_list_groups([\n 'user_id' => $this->current_user->id\n ]);\n\n if(!$res) {\n return FALSE;\n }\n\n $user_ids = [];\n foreach($res['result']['groups'] as $k) {\n\n // Get the members list\n if($k['user_role'] === 'owner') {\n $members = $this->_api('user_group')->get_list_members([\n 'group_id' => (int) $k['group_id']\n ]);\n\n if(empty($members['result']['users'])) {\n continue;\n }\n\n foreach($members['result']['users'] as $m){\n $user_ids[] = $m['id'];\n }\n }\n }\n\n if(in_array($member_id, $user_ids)) {\n return TRUE;\n }\n\n return FALSE;\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 view(User $user, Group $group)\n {\n if($user->id == $group->user_id){\n return true;\n }\n else{\n foreach ($group->members as $member) {\n if ($member->user_id == $user->id){\n return true;\n }\n }\n }\n return false;\n }", "function is_joinable($group, $uid = NULL, $gen_err = FALSE) {\n if (!$uid)\n $uid = userid();\n\n $group_id = $group['group_id'];\n if ($this->is_member($uid, $group['group_id'])) {\n if ($gen_err)\n e(lang('grp_join_error'));\n return false;\n }elseif ($group['group_privacy'] != 2 || $this->is_invited($uid, $group_id, $group['userid'], $gen_err))\n return true;\n else\n return false;\n }", "function checkGroup($ad, $userdn, $groupdn)\n{\n $result = ldap_read($ad, $userdn, \"(memberof={$groupdn})\", array(\n 'members'\n ));\n if (! $result)\n {\n return false;\n }\n \n $entries = ldap_get_entries($ad, $result);\n \n return ($entries['count'] > 0);\n}", "public function existsGroup() {\n $sql = \"SELECT * FROM `SM_GROUP` WHERE sm_idGroup = '$this->idGroup'\";\n $result = $this->mysqli->query($sql);\n if ($result->num_rows == 1) {\n return true;\n } else {\n return false;\n }\n }", "public function hasGroup($name) {\n return $this->getGuardUser() ? $this->getGuardUser()->hasGroup($name) : false;\n }", "public function groupExists($gid) {\n\t\treturn in_array($gid, $this->getGroups($gid, 1));\n\t}", "public function checkInGroup( SystemGroup $group )\n {\n $user_groups = array();\n foreach( $this->getSystemUserGroups() as $user_group )\n {\n $user_groups[] = $user_group->id;\n }\n \n return in_array($group->id, $user_groups);\n }", "public function groupExists($gid) {\n\t\t$query = OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups` WHERE `gid` = ?');\n\t\t$result = $query->execute(array($gid))->fetchOne();\n\t\tif ($result) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isMember($groupIdentifier)\n {\n return $this->_grouperClient->hasMember($this->_getStemmedGroupId($groupIdentifier));\n }", "public function delete(User $user, Group $group)\n {\n return $user->id == $group->user_id;\n }", "public function hasUser(AUser $user) {\n\t\tif ($user instanceof AUser) {\n\t\t\t$user = $user->id;\n\t\t}\n\t\t$module = Yii::app()->getModule(\"users\");\n\t\t$className = $module->userGroupMemberModelClass;\n\t\treturn (bool) $className::model()->countByAttributes(\n\t\t\tarray(\n\t\t\t\t\"userId\" => $user,\n\t\t\t\t\"groupId\" => $this->id\n\t\t\t)\n\t\t);\n\t}", "public function checkIfTestUser() \n {\n\n $user = Zend_Auth::getInstance()->getIdentity();\n\n // current user member of a test group\n if (true === is_object($user)\n && preg_match('/^test\\_/', $user->user_right_group_name)\n && false === strpos('test_', $this->_name)\n ) {\n return true;\n }\n return false;\n }", "public function hasGroup(GroupInterface $group);", "public function delete(User $user, groupMember $groupMember)\n {\n $memberIsUser = ($groupMember->user == $user);\n $userOwnsGroup = ($groupMember->group->owner == $user);\n return $memberIsUser || $userOwnsGroup;\n }", "function group_exists($gid) {\n global $db;\n $result = $db->count(tbl($this->gp_tbl), \"group_id\", \" group_id='$gid'\");\n if ($result > 0)\n return true;\n else\n return false;\n }", "public function memberOf(string $groupName) : bool;", "public function hasGroupId(int $id) : bool\n {\n $usergroups = $this->usergroups;\n\n foreach ($usergroups as $index => $usergroup) {\n if ($usergroup->group_id === $id) {\n return true;\n }\n }\n\n return false;\n }", "public function isAuthorized($token, $group) {\n $hasPermission = false;\n\n $user = false;\n $requiredGroup = false;\n\n // Attempting to find the user will automatically throw errors if unsuccessful\n try {\n if( $group !== '*' ){\n // Get the needed group\n $requiredGroup = $this->groupProvider->findByName($group); \n }\n\n // Get the user, including the memberships\n $user = $this->userProvider->findByToken($token);\n\n //$data = $this->userProvider->isMemberOf($user['email'], $group);\n } catch (\\Wetcat\\Neo\\Users\\InvalidTokenException $e) {\n $hasPermission = false;\n }\n \n // If the group is '*' it means everyone has permission, but has to be authenticated!\n // That's why we do this check after the token-check\n if ( $group === '*' ) {\n return true;\n }\n\n if( !$user || !$requiredGroup ) {\n $hasPermission = false;\n } else {\n // Compare user permissions to required\n foreach ($user['groups'] as $group) {\n if( $group['level'] >= $requiredGroup['level'] ){\n $hasPermission = true;\n }\n }\n }\n\n return $hasPermission;\n }", "function CheckMembership ($pGROUPID, $pUSERNAME, $pDOMAIN) {\n $membershipcriteria = array (\"groupInformation_tID\" => $pGROUPID,\n \"Username\" => $pUSERNAME,\n \"Domain\" => $pDOMAIN);\n $this->SelectByMultiple ($membershipcriteria);\n\n if ($this->CountResult() > 0) return (TRUE);\n\n return (FALSE);\n }", "public function isUserOrGroupSet() {}", "public function isCoMembersGroup($group) {\n return (($group['CoGroup']['group_type'] == GroupEnum::ActiveMembers\n || $group['CoGroup']['group_type'] == GroupEnum::AllMembers)\n && empty($group['CoGroup']['cou_id']));\n }", "public function isUsergroupEnabled() : bool\n\t{\n\t\t//load the usergroups, if not already loaded\n\t\t$this->loadUsergroups();\n\n\t\tif (!$this->usergroups) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//is the main usergroup active?\n\t\tif (!$this->usergroup->status) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$status = false;\n\t\tforeach ($this->usergroups as $usergroup) {\n\t\t\tif ($usergroup->status) {\n\t\t\t\t$status = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $status;\n\t}", "function addMemberToGroup($userID, $groupID) {\r\n $sql = $this->db->prepare(\"INSERT INTO GROUPMEMBERS (groupID, UserID) VALUES (:group_id, :user_id)\");\r\n if ($sql->execute(array(\r\n 'group_id' => $groupID,\r\n 'user_id' => $userID,\r\n )))\r\n return true;\r\n return false;\r\n }", "public function inGroup($groups, int $userId)\n {\n if ($userId === 0) {\n return false;\n }\n\n if (! is_array($groups)) {\n $groups = [$groups];\n }\n\n $userGroups = $this->groupModel->getGroupsForUser((int) $userId);\n\n if (empty($userGroups)) {\n return false;\n }\n\n foreach ($groups as $group) {\n if (is_numeric($group)) {\n $ids = array_column($userGroups, 'group_id');\n if (in_array($group, $ids, true)) {\n return true;\n }\n } elseif (is_string($group)) {\n $names = array_column($userGroups, 'name');\n\n if (in_array($group, $names, true)) {\n return true;\n }\n }\n }\n\n return false;\n }", "protected function group_exists($group)\n\t{\n\t\tif ( is_int( $group ) )\n\t\t{\n\t\t\t$group_exists = DB::connection(static::$db_instance)\n\t\t\t\t->table(static::$table)\n\t\t\t\t->find($group);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$group_exists = DB::connection(static::$db_instance)\n\t\t\t\t->table(static::$table)\n\t\t\t\t->where('name', '=', $group)\n\t\t\t\t->first();\n\t\t}\n\n\t\treturn (bool) count($group_exists);\n\t}", "public function isCouMembersGroup($group) {\n return (($group['CoGroup']['group_type'] == GroupEnum::ActiveMembers\n || $group['CoGroup']['group_type'] == GroupEnum::AllMembers)\n && !empty($group['CoGroup']['cou_id']));\n }", "public function inGroup($group)\n\t{\n\t\t$found = false;\n\n\t\tif( is_string($group) )\n\t\t{\n\t\t\t$this->groups->each(function($g) use ($group, &$found)\n\t\t\t{\n\t\t\t\tif( $g->name == $group )\n\t\t\t\t{\n\t\t\t\t\t$found = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn $found;\n\t\t}\n else if ( is_int($group) )\n {\n $this->groups->each(function($g) use ($group, &$found)\n {\n if( $g->id == $group )\n {\n $found = true;\n }\n });\n\n return $found;\n }\n\t\telse if ( is_object($group) )\n\t\t{\n\t\t\t$this->groups->each(function($g) use ($group, &$found)\n\t\t\t{\n\t\t\t\tif( $g->name == $group->name )\n\t\t\t\t{\n\t\t\t\t\t$found = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn $found;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $found;\n\t\t}\n\t}", "public function hasGroup(): bool\n {\n return $this->has(GroupAttributeValue::OID);\n }", "public function customerGroupCheck()\r\n {\r\n if (Mage::app()->getStore()->isAdmin())\r\n $customer = Mage::getSingleton('adminhtml/session_quote')->getCustomer();\r\n else\r\n $customer = Mage::getSingleton('customer/session')->getCustomer();\r\n $customer_group = $customer->getGroupId();\r\n $group = Mage::getStoreConfig('customercredit/general/assign_credit');\r\n $group = explode(',', $group);\r\n if (in_array($customer_group, $group)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "private function _isMemberOfRequiredGroup($memberGroups){\n\n if($this->settings['requireGroup'] === false)\n return true;\n\n $groupNameList = Hash::extract($memberGroups, '{n}.name');\n\n if(is_array($this->settings['requireGroup'])) {\n foreach($groupNameList as $group){\n if(in_array($group, $this->settings['requireGroup']))\n return true;\n }\n return false;\n }\n\n return in_array($this->settings['requireGroup'], $groupNameList);\n }", "public function groupHasPermission($groupid){\n foreach($this->groups()->getResults() as $row){\n if($row->groupid == $groupid) return true;\n }\n return false;\n }", "private function validateGroupStatus(){\n\t\n\t global $db;\n\t \n\t #see if this is 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 gid FROM ebb_group_users WHERE Username='\".$this->user.\"' AND Status='Active' LIMIT 1\";\n\t\t\t$validateGroupStatus = $db->affectedRows();\n\n\t\t\tif($validateGroupStatus == 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}", "function isGroup( $userId, $groups )\n\t{\n\t\t$query = '(SELECT units1.alias AS unit,\n\t\t\t\t\t\tholders1.position,\n\t\t\t\t\t\tpositions1.category,\n\t\t\t\t\t\t(holders1.term = terms1.current_term) AS current\n\t\t\t\t FROM units units1, holders holders1, positions positions1, terms terms1\n\t\t\t\t WHERE holders1.userId = ?\n\t\t\t\t\tAND holders1.unitId = units1.id\n\t\t\t\t\tAND holders1.position = positions1.alias)\n\t\t\t\tUNION DISTINCT\n\t\t\t\t (SELECT units2.alias AS unit,\n\t\t\t\t\t\tpositions2.alias AS position,\n\t\t\t\t\t\tpositions2.category,\n\t\t\t\t\t\t(holders2.term = terms2.current_term) AS current\n\t\t\t\t FROM positions_rules r, holders holders2, positions positions2, units units2, terms terms2\n\t\t\t\t WHERE holders2.userId = ?\n\t\t\t\t\tAND holders2.unitId = r.ruler_unit\n\t\t\t\t\tAND holders2.position = r.ruler_position\n\t\t\t\t\tAND positions2.alias = r.ruled_position\n\t\t\t\t\tAND positions2.unitId = r.ruled_unit\n\t\t\t\t\tAND units2.id = r.ruled_unit)';\n\t\t$result = $this->_db->fetchAll( $query, array($userId, $userId) );\n\n\t\t// If the group is unset, give everyone who has ever held any position access\n\t\tif( !$groups )\n\t\t{\treturn !empty( $result );\n\t\t}\n\n\t\t// Otherwise, process the units\n\t\tforeach( $groups as $unit => $positions )\n\t\t{\n\t\t\tif( !$positions )\n\t\t\t{\tforeach( $result AS $row )\n\t\t\t\t{\tif( strtolower($row['unit']) == $unit )\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach( $positions as $position => $terms )\n\t\t\t{\n\t\t\t\tif( !$terms )\n\t\t\t\t{\tforeach( $result AS $row )\n\t\t\t\t\t{\tif( strtolower($row['unit']) == $unit && ($row['position'] == $position || $row['category'] == $position))\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}elseif( $terms == 'current' )\n\t\t\t\t{\tforeach( $result AS $row )\n\t\t\t\t\t{\tif( strtolower($row['unit']) == $unit && ($row['position'] == $position || $row['category'] == $position) && $row['current'])\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else\n\t\t\t\t{\t// Code should not get here\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function isCouAdminOrMembersGroup($group) {\n $ret = $this->isCouAdminGroup($group)\n || $this->isCouMembersGroup($group);\n \n return $ret;\n }", "public function user_ingroup($username,$group,$recursive=NULL,$isGUID=false){\n if ($username===NULL){ return (false); }\n if ($group===NULL){ return (false); }\n if (!$this->_bind){ return (false); }\n if ($recursive===NULL){ $recursive=$this->_recursive_groups; } // Use the default option if they haven't set it\n \n // Get a list of the groups\n $groups=$this->user_groups($username,$recursive,$isGUID);\n \n // Return true if the specified group is in the group list\n if (in_array($group,$groups)){ return (true); }\n\n return (false);\n }", "function user_ingroup($username,$group,$recursive=NULL){\n if ($username==NULL){ return (false); }\n if ($group==NULL){ return (false); }\n if (!$this->_bind){ return (false); }\n if ($recursive==NULL){ $recursive=$this->_recursive_groups; } //use the default option if they haven't set it\n \n //get a list of the groups\n $groups=$this->user_groups($username,array($this->_group_attribute),$recursive);\n \n //return true if the specified group is in the group list\n if (in_array($group,$groups)){ return (true); }\n\n return (false);\n }", "public function isMember(Group $group, Member $member, $only_in = true)\n {\n if (!is_object($group) || !is_object($member) || !($member_id = $member->getPKValue()) || !($group_id = $group->getPKValue()))\n {\n return false;\n }\n\n if ($this->findByWhere(\"IdMember = '{$member_id}' AND IdGroup = '{$group_id}'\" . (($only_in) ? \" AND Status = 'In'\" : '')))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "private function userHasAccess()\n {\n $required_perm = $this->route['perm'];\n $user_group = $_SESSION['user_group'];\n if ($required_perm == 'all') {\n return true;\n } elseif ($user_group == $required_perm) {\n return true;\n }\n return false;\n }", "function isUserInGroup($userId, $groupId) {\n die ('unimplemented: '.__CLASS__.'::'.__FUNCTION__.' ('.__LINE__.':'.__FILE__.')');\n }", "function is_active_member($uid, $gid) {\n global $db;\n $count = $db->count(tbl($this->gp_mem_tbl), \"userid\", \" userid='$uid' AND group_id='$gid' AND active='yes'\");\n if ($count[0] > 0)\n return true;\n else\n return false;\n }", "public function hasAllowedRole()\n {\n if ($this->isCurrentUser() || (! $this->isStaff())) {\n // Always allow editing of non-staff user\n // for the time being\n return true;\n }\n $dbLookup = $this->util->getDbLookup();\n $groups = $dbLookup->getActiveStaffGroups();\n $group = $this->getGroup();\n\n if (! isset($groups[$group])) {\n // Allow editing when the group does not exist or is no longer active.\n return true;\n }\n\n $allowedGroups = $this->userLoader->getCurrentUser()->getAllowedStaffGroups();\n if ($allowedGroups) {\n return (boolean) isset($allowedGroups[$this->getGroup()]);\n } else {\n return false;\n }\n }", "public function isMember()\n {\n return $this->role == 3;\n }", "function isMember($user_id)\n\t{\n\t\t//get admin id\n\t\t$this->db->where('role', 1);\t\t\t\t\t\n\t\t$query = $this->db->get('users');\n\t\t$admin=$query->row();\n\t\tif($user_id == $admin->id)\n\t\t\treturn true;\n\t\t\t\n\t\t// get user that purchased membership\n\t\t$this->db->where('user_id', $user_id);\t\t\t\t\t\n\t\t$query = $this->db->get($this->table);\n\n\t\tif($query->num_rows())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public function usergroupConditionMatchesSingleGroupId() {}", "public function usergroupConditionMatchesSingleGroupId() {}", "public function delete_membership( $user_id, $group_id ) {\n $d = $this->call( \"membershipDelete\", [\n \"userId\" => $user_id,\n \"groupId\" => $group_id ] );\n\n return ( isset( $d ) && $d != false ) ? true : false;\n }", "function check_user_has_group($list) { $ar=explode(',', $list);\nforeach ($ar as $group) {\n $group=trim($group);\n if ( isset($_SESSION['groups'][$group]) && $_SESSION['groups'][$group]) {\nreturn true; return false;\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 }", "public function UserIsMemberOfGroupAdminOrDie() {\n\t\t\n\t\t// User must be member of group adm or die\n\t\tif($_SESSION['groupMemberUser'] != 'adm') \n\t\t\tdie('You do not have the authourity to access this page');\n\t}", "public function is_valid_group( $group ) {\n if (\n ! is_object( $group )\n || ! isset( $group->list_id )\n || ! isset( $group->category_id )\n || ! isset( $group->id )\n ) {\n return false;\n }\n return true;\n }", "public function update(User $user, Group $group)\n {\n return $user->id == $group->user_id;\n }", "public function isModerator() {\n if (!isset($this->groups)) {\n $this->groups = explode(',', $this->config['moderator']);\n array_walk($this->groups, 'trim');\n }\n\n return $this->modx->user->isMember($this->groups);\n }", "public function create_membership( $user_id, $group_id ) {\n $c = $this->call( \"membershipCreate\", [\n \"userId\" => $user_id,\n \"groupId\" => $group_id ] );\n\n return ( isset( $c ) && $c != false ) ? true : false;\n }", "function checkGroupEx($ad, $userdn, $groupdn)\n{\n $result = ldap_read($ad, $userdn, '(objectclass=*)', array(\n 'memberof'\n ));\n if (! $result)\n {\n return false;\n }\n \n $entries = ldap_get_entries($ad, $result);\n if ($entries['count'] <= 0)\n {\n return false;\n }\n \n if (empty($entries[0]['memberof']))\n {\n return false;\n }\n \n for ($i = 0; $i < $entries[0]['memberof']['count']; $i ++)\n {\n if ($entries[0]['memberof'][$i] == $groupdn)\n {\n return true;\n }\n elseif (checkGroupEx($ad, $entries[0]['memberof'][$i], $groupdn))\n {\n return true;\n }\n }\n \n return false;\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 hasGroup()\n {\n return isset($this->arrConfig['group']);\n }", "public function create(User $user)\n {\n return $user->hasPermissions(['group_create']);\n }", "protected function checkPermission(): bool\n {\n // Must be the owner or the administrator in the group\n if ($this->message instanceof GroupMessage && $this->message->sender->permission == \"MEMBER\") {\n $this->setReply(\"deckDenied\");\n\n return false;\n }\n\n return true;\n }", "public function isAccessible() {\n\t\treturn UserGroup::isAccessibleGroup(array($this->groupID));\n\t}" ]
[ "0.8035996", "0.79780734", "0.7972357", "0.7961608", "0.76660615", "0.7637746", "0.7534992", "0.74583316", "0.7403331", "0.7391561", "0.7371816", "0.7315123", "0.7304859", "0.7296571", "0.72681624", "0.7262133", "0.71850294", "0.71803296", "0.7122837", "0.7077486", "0.70545185", "0.6963222", "0.69464654", "0.6935889", "0.6901054", "0.68612146", "0.686043", "0.68295956", "0.6810823", "0.6759592", "0.67584735", "0.6716164", "0.6709482", "0.67009187", "0.6684411", "0.6683235", "0.6661263", "0.6648643", "0.6633419", "0.65947", "0.65927005", "0.658781", "0.65758044", "0.65745187", "0.6573559", "0.65714777", "0.6502274", "0.6489409", "0.647934", "0.6478367", "0.6472959", "0.6460557", "0.64320374", "0.6422569", "0.6413434", "0.63793343", "0.6377216", "0.63544995", "0.6350251", "0.63477176", "0.63471556", "0.632771", "0.632266", "0.6314", "0.628236", "0.627891", "0.62708026", "0.6269524", "0.62667245", "0.6266044", "0.62595576", "0.62492424", "0.6235649", "0.622799", "0.6201771", "0.61959106", "0.61831546", "0.61819917", "0.6175709", "0.61559546", "0.6155612", "0.6153606", "0.6151925", "0.61472386", "0.6142697", "0.6139443", "0.612442", "0.61208576", "0.6111153", "0.61003506", "0.61002904", "0.60929215", "0.6072849", "0.60726225", "0.60557735", "0.60529673", "0.60442865", "0.6026037", "0.60224134", "0.6019605" ]
0.75206
7
Generates the URL for the user's profile picture. Gravatar is used for profile pictures. To accomplish this we need to generate a hash of the user's email.
public function profilePicture($size = 200) { // use Gravatar $hash = md5(strtolower(trim($this->email))); return "https://secure.gravatar.com/avatar/$hash?s=$size&d=mm"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProfileImageURL()\n {\n return 'https://s.gravatar.com/avatar/9ff2a97e7faf3529f1b78f1f737ebca0?s=80';\n }", "public function profilePicture()\n {\n if ($this->picture) {\n return \"/storage/{$this->picture}\";\n }\n\n return 'http://i.pravatar.cc/200';\n }", "public function getProfileImageURL()\n {\n return 'https://avatars3.githubusercontent.com/u/4479918?v=4&s=460';\n }", "public function getAvatarUrl() {\n return \"http://www.gravatar.com/avatar/{{ md5($this->email) }}\n ?d=mm&s=40\";\n }", "public function GetGravatar() {\n\t\t$user = self::GetUserProfile();\n\t\treturn 'http://www.gravatar.com/avatar/' . md5(strtolower(trim($user['email']))) . '.jpg?s=40';\n\t}", "public function getGravatarUrlAttribute()\n { \n $url = \"https://www.gravatar.com/avatar/\" . \n md5( strtolower( trim( $this->email ) ) ) . \n \"?s=50\";\n\n return $url;\n }", "protected function _getGravatar() {\n\n $hash = md5(strtolower(trim($this->email)));\n return sprintf($this->gravatar . '%s?s=%d&d=%s', $hash, $this->size, 'wavatar');\n }", "public function getProfileImage(){\n\t\t// To hook into this function we could use a an event:\n\t\t// $event = new CEvent();\n\t\t// $this->onGetProfileImage($event)\n\t\t// // then if the event has been handled \n\t\t// if($event->handled)\n\t\t// // we know another function has handled the event and found us an image url for this user\n\t\t// // it could store this in the event object\n\t\t// return $event->params->imageUrl \n\t\t\n\t\t// Display guest photo\n\t\treturn Yii::app()->controller->createWidget('nii.widgets.Gravatar',array('email'=>$this->email))->getUrl();\n\t}", "public function picture_url() {\n return $this->_adaptee->user_photo(\"\", true);\n }", "public function getPhotoUrlAttribute()\n {\n return 'https://www.gravatar.com/avatar/' . md5(strtolower($this->email)) . '.jpg?s=200&d=mm';\n }", "public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path && $this->photoExists()\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->filamentDefaultAvatar();\n }", "public function avatar()\n {\n if (setting('enable_external_dependencies')) {\n return sprintf('https://www.gravatar.com/avatar/%s?size=%d', md5(strtolower($this->email)), 200);\n }\n\n return Avatar::create($this->username)->toBase64();\n }", "public function getImageProfile() {\n\t\t$basePath = Yii::getAlias ( '@web' );\n\t\t\n\t\t$usuarioFacebook = $this->entUsuariosFacebook;\n\t\t\n\t\tif(empty($usuarioFacebook)){\n\t\t\tif ($this->txt_imagen) {\n\t\t\t\treturn $basePath . '/profiles/' . $this->txt_token.\"/\". $this->txt_imagen;\n\t\t\t}\n\t\t\t\n\t\t\treturn $basePath . '/webAssets/images/site/user.png';\n\t\t}\n\t\t\n\t\treturn 'http://graph.facebook.com/'.$usuarioFacebook->id_facebook.'/picture';\n\t\t\n\t}", "public function picture()\n {\n if ($this->image->exists()) {\n return resource_url('images/users/' .basename($this->image->path));\n }\n\n // Fallback to AdminLTE's default image.\n return vendor_url('dist/img/avatar5.png', 'almasaeed2010/adminlte');\n }", "public function Gravatar()\n {\n $gravatar = '';\n $use_gravatar = $this->getOption('use_gravatar');\n\n if ($use_gravatar) {\n $gravatar = 'https://www.gravatar.com/avatar/' . md5(strtolower(trim($this->Email ?? '')));\n $gravatarsize = $this->getOption('gravatar_size');\n $gravatardefault = $this->getOption('gravatar_default');\n $gravatarrating = $this->getOption('gravatar_rating');\n $gravatar .= '?' . http_build_query(array(\n 's' => $gravatarsize,\n 'd' => $gravatardefault,\n 'r' => $gravatarrating,\n ));\n }\n\n return $gravatar;\n }", "function get_user_profile_image_url($user_id){\n\t$image_url = THEME_URI.'/images/profile_placeholder.png';\n\tif($image_relative_path = get_user_meta($user_id, 'profile_image_url', true))\n\t{\n\t\t$image_url = $image_relative_path;\n\t}\n\treturn $image_url;\n}", "function gravatarUrl($email, $size = 60, $default = 'mm', $rating = 'g')\n {\n return 'http://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).\"?s={$size}&d={$default}&r={$rating}\";\n }", "protected function defaultProfilePhotoUrl(): string\n {\n return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=7F9CF5&background=EBF4FF';\n }", "function url_for_avatar( $email, $s = 50, $d = 'mm', $r = 'g', $img = false, $atts = array() ) {\n $url = 'http://www.gravatar.com/avatar/';\n $url .= md5( strtolower( trim( $email ) ) );\n $url .= \"?s=$s&d=$d&r=$r\";\n if ( $img ) {\n $url = '<img src=\"' . $url . '\"';\n foreach ( $atts as $key => $val )\n $url .= ' ' . $key . '=\"' . $val . '\"';\n $url .= ' />';\n }\n return $url;\n}", "function gravatar($email, $size = null)\n{\n $url = \"https://www.gravatar.com/avatar/\" . e(md5(strtolower($email)));\n\n if ($size) {\n $url .= '?s=' . $size;\n }\n\n return $url;\n}", "public function getUserAvatarUrl()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_AVATAR_URL);\n }", "function gravatarUrl($email, $size = 60, $default = 'mm', $rating = 'g') {\n\n\t\treturn 'http://www.gravatar.com/avatar/' . md5(strtolower(trim($email))) . \"?s={$size}&d={$default}&r={$rating}\";\n\t}", "protected function defaultProfilePhotoUrl()\n {\n return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=252f3f&background=EBF4FF';\n }", "public function AvatarURL() {\n\t\t\n\t\tif (!empty($this->profil)) {\n\t\t\t\n\t\t\treturn $this->profil['user']['avatar150'];\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public function getGravatarAttribute()\n {\n $email = md5($this->email);\n\n return \"https://secure.gravatar.com/avatar/{$email}?s=37&r=g&default=mm\";\n }", "function gravatar($email, $size = '50') {\n\t\t$imgUrl = 'http://www.gravatar.com/avatar.php?gravatar_id=';\n\t\t$imgUrl .= md5(low($email)) . '&size=' . $size . '&rating=R&d=identicon';\n\t\t$img = $this->Html->image($imgUrl, compact('width', 'height'));\n\t\treturn $this->Html->link($img, 'http://en.gravatar.com/site/signup', array('class' => 'gravatar'), false, false);\n\t}", "public function getAvatarUrl()\n {\n return Url::to(\"/img/avatars/{$this->avatar}\");\n }", "public function getGravatarAttribute()\n {\n $hash = md5(strtolower($this->mail));\n return \"https://www.gravatar.com/avatar/\" . $hash . '?d=mm';\n }", "private function getGravatarUrl( $s = 80, $email = null ) {\n\n\t\t$email = $email ? $email : $this->publicemail;\n\n\t\t$url = 'https://www.gravatar.com/avatar/';\n\t\t$url .= md5( strtolower( trim( $email ) ) );\n\t\t$url .= \"?s=$s&d=mm&r=g\";\n\t\treturn $url;\n\t}", "function gravatar($email = null, $size = 32)\n {\n if (empty($email) && !empty(auth()->user())) {\n $email = auth()->user()->email;\n }\n\n return 'https://www.gravatar.com/avatar/' . md5($email) . '?s='.$size;\n }", "function profile_picture($user_id, $base_url)\n\t{\n\t\tglobal $msg, $profile_img_path;\n\t\t\n\t\t$app_path = $profile_img_path;\n\n\t\t$path = 'messages/images/';\n\t\t$result = $msg->user_profile_picture($user_id, $base_url);\n\n\t\tif(file_exists($app_path.$path.$result))\n\t\t{\n\t\t\treturn $base_url.$path.$result;\t\n\t\t} else {\n\t\t\treturn $base_url.$path.'default.jpg';\t\n\t\t}\n\t}", "public function getProfileImage() {\r\n $profileImage = SystemSetting::getByKey(\"ARC_USER_IMAGE\", $this->id);\r\n if (!empty($profileImage->value)) {\r\n return system\\Helper::arcGetPath() . \"assets/profile/\" . $profileImage->value;\r\n }\r\n return system\\Helper::arcGetPath() . \"assets/profile/placeholder.png\";\r\n }", "public function getAvatarAttribute()\n {\n return 'https://i.pravatar.cc/50?u='.$this->email;\n }", "public function avatar(){\n if($this->avatar){\n return asset('/avatars/patients/'.$this->avatar);\n }else{\n return \"https://www.gravatar.com/avatar/{{md5(trim($this->fname))}}?d=mm&s=150\" ;\n }\n }", "public function getProfilePictureUrlAttribute()\n {\n if (empty($this->profile_picture)) {\n return null;\n }\n\n return Storage::url(file_path($this->uploadPath(), $this->profile_picture));\n }", "public function getAvatarImage() : string\n {\n $imagePlaceholder = asset('storage/images/profiles') . '/' . Auth::user()->avatar;\n\n if(empty(Auth::user()->avatar)) {\n $imagePlaceholder = asset('img/user-image-placeholder.png');\n }\n\n return $imagePlaceholder;\n }", "function get_avatar_url($email, $size = 25)\r\n{\r\n return \"http://fr.gravatar.com/avatar/\".md5(strtolower(e(trim($email)))).\"?s=\".$size;//trim used to delete spaces\r\n}", "public function getAvatarUrl()\n {\n if (!is_null($this->getLastAvatar()) && Storage::disk('s3')->exists($this->getLastAvatar()->link)) {\n return Storage::disk('s3')->url($this->getLastAvatar()->link);\n }\n\n return $this->sex ? Storage::disk('s3')->url('avatars/user_woman.png') : Storage::disk('s3')->url('avatars/user_man.png');\n }", "public function getSenderPicUrl()\n {\n if (count($this->sender()->first()) > 0)\n return URL::to($this->sender->user_pic);\n else\n return URL::to('/img/profiles/default.png');\n }", "function get_gravatar( $email, $s = 40, $d = 'mp', $r = 'g', $img = false, $atts = array() ) {\n $url = 'https://www.gravatar.com/avatar/';\n $url .= md5( strtolower( trim( $email ) ) );\n $url .= \"?s=$s&d=$d&r=$r\";\n if ( $img ) {\n $url = '<img src=\"' . $url . '\"';\n foreach ( $atts as $key => $val )\n $url .= ' ' . $key . '=\"' . $val . '\"';\n $url .= ' />';\n }\n return $url;\n}", "function get_gravatar( $email, $s = 75, $d = 'mp', $r = 'g', $img = TRUE, $atts = array() ) {\n $url = 'https://www.gravatar.com/avatar/';\n $url .= md5( strtolower( trim( $email ) ) );\n $url .= \"?s=$s&d=$d&r=$r\";\n if ( $img ) {\n $url = '<img src=\"' . $url . '\"';\n foreach ( $atts as $key => $val )\n $url .= ' ' . $key . '=\"' . $val . '\"';\n $url .= ' />';\n }\n return $url;\n}", "function gravatar($email, $size = 80) {\n\t\t$f3 = \\Base::instance();\n\t\t$rating = $f3->get(\"gravatar.rating\") ? $f3->get(\"gravatar.rating\") : \"pg\";\n\t\t$default = $f3->get(\"gravatar.default\") ? $f3->get(\"gravatar.default\") : \"mm\";\n\t\treturn \"//gravatar.com/avatar/\" . md5(strtolower($email)) .\n\t\t\t\t\"?s=\" . intval($size) .\n\t\t\t\t\"&d=\" . urlencode($default) .\n\t\t\t\t\"&r=\" . urlencode($rating);\n\t}", "function get_gravatar( $email, $s = 80, $d = 'mm', $r = 'g', $img = false, $atts = array() ) {\r\n $url = 'https://www.gravatar.com/avatar/';\r\n $url .= md5( strtolower( trim( $email ) ) );\r\n $url .= \"?s=$s&d=$d&r=$r\";\r\n if ( $img ) {\r\n $url = '<img src=\"' . $url . '\"';\r\n foreach ( $atts as $key => $val )\r\n $url .= ' ' . $key . '=\"' . $val . '\"';\r\n $url .= ' />';\r\n }\r\n return $url;\r\n }", "public function getAvatarAttribute(): string\n {\n return 'https://www.gravatar.com/avatar/'.md5($this->email).'?s=80&d=mm&r=g';\n }", "public function gravatar($size = 30)\n {\n $email = Str::lower($this->email);\n\n $hash = md5($email);\n\n return \"//www.gravatar.com/avatar/{$hash}?size={$size}&default=mm\";\n }", "function get_gravatar( $email, $s = 80, $d = 'mm', $r = 'x', $img = false, $atts = array() ) {\n\t\t\t\t\t\t\t\t$url = 'http://www.gravatar.com/avatar/';\n\t\t\t\t\t\t\t\t$url .= md5( strtolower( trim( $email ) ) );\n\t\t\t\t\t\t\t\t$url .= \"?s=$s&d=$d&r=$r\";\n\t\t\t\t\t\t\t\tif ( $img ) {\n\t\t\t\t\t\t\t\t\t$url = '<img src=\"' . $url . '\"';\n\t\t\t\t\t\t\t\t\tforeach ( $atts as $key => $val )\n\t\t\t\t\t\t\t\t\t\t$url .= ' ' . $key . '=\"' . $val . '\"';\n\t\t\t\t\t\t\t\t\t$url .= ' />';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn $url;\n\t\t\t\t\t\t\t}", "public static function getGravatar($email=false, $s=80, $d='mp', $r='g') {\n $url = 'https://www.gravatar.com/avatar/';\n if($email == false && (!isset($_SESSION['logged_user_email']) || empty($_SESSION['logged_user_email']))){\n $url .= md5(strtolower(random_str(5, 'a')));\n } else {\n $url .= md5(strtolower(trim($email ? $email : $_SESSION['logged_user_email'])));\n }\n $url .= \"?s=$s&d=$d&r=$r\";\n\n return $url;\n }", "public function defaultAvatarUrl()\n {\n $providerURL = 'https://ui-avatars.com/api/';\n $url = $providerURL . '?' . http_build_query([\n 'name' => urlencode($this->name),\n 'size' => $this->getAvatarSize(),\n 'color' => $this->getAvatarTextColor(),\n 'background' => $this->getAvatarBackgroundColor(),\n ]);\n \n return $url;\n }", "function get_gravatar( $email, $s = 80, $d = 'mm', $r = 'g', $img = false, $atts = array() )\n{\n\t$url = 'http://www.gravatar.com/avatar/';\n\t$url .= md5( strtolower( trim( $email ) ) );\n\t$url .= \"?s=$s&d=$d&r=$r\";\n\tif ( $img )\n\t{\n\t\t$url = '<img src=\"' . $url . '\"';\n\t\tforeach ( $atts as $key => $val )\n\t\t\t$url .= ' ' . $key . '=\"' . $val . '\"';\n\t\t$url .= ' />';\n\t}\n\treturn $url;\n}", "public function getProfilePhotoUrlAttribute()\n {\n return $this->profile_photo_path\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->defaultProfilePhotoUrl();\n }", "public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path ?: $this->defaultProfilePhotoUrl();\n }", "function get_gravatar( $email, $s = 80, $d = 'mm', $r = 'g', $img = false, $atts = array() ) {\n\t\t$url = 'http://www.gravatar.com/avatar/';\n\t\t$url .= md5( strtolower( trim( $email ) ) );\n\t\t$url .= \"?s=$s&d=$d&r=$r\";\n\t\tif ( $img ) {\n\t\t\t$url = '<img src=\"' . $url . '\"';\n\t\t\tforeach ( $atts as $key => $val ){\n\t\t\t\t$url .= ' ' . $key . '=\"' . $val . '\"';\n\t\t\t}\n\t\t\t$url .= ' />';\n\t\t}\n\treturn $url;\n\t}", "function get_gravatar( $email, $s = 80, $d = 'mm', $r = 'g', $img = false, $atts = array() ) {\n $url = 'http://www.gravatar.com/avatar/';\n $url .= md5( strtolower( trim( $email ) ) );\n $url .= \"?s=$s&d=$d&r=$r\";\n if ( $img ) {\n $url = '<img src=\"' . $url . '\"';\n foreach ( $atts as $key => $val )\n $url .= ' ' . $key . '=\"' . $val . '\"';\n $url .= ' />';\n }\n return $url;\n}", "public function getGravatar($email, $size)\n {\n return 'http://www.gravatar.com/avatar/' . md5(strtolower(trim($email))) . '.jpg?' . ($size ? \"s=$size\" : null) . '&d=retro';\n }", "function get_gravatar($size=null) {\n return 'http://www.gravatar.com/avatar/' . md5(strtolower(trim(CAsdf::Instance()->user['email']))) . '.jpg?r=pg&amp;d=wavatar&amp;' . ($size ? \"s=$size\" : null);\n}", "public function getImageAvatarUrl() {\n return CommonProcess::getHostUrl() . $this->getImageAvatarPath();\n }", "public function getGravatarUrl(string $emailAddress = '', array $parameters = []): string\n {\n $url = 'https://secure.gravatar.com/avatar/';\n $url .= md5(mb_strtolower(trim($emailAddress))) . '.jpg';\n\n $url .= '?s=' . (isset($parameters['size']) ? (int) $parameters['size'] : 80);\n $url .= '&amp;d=' . ($parameters['imageset'] ?? 'mm');\n $url .= '&amp;r=' . ($parameters['rating'] ?? 'g');\n\n return $url;\n }", "function getProfileUrl($username, $full = false) {\n $url = \"https://my-secondlife.s3.amazonaws.com/users/\".strtolower($username).\"/\".($full ? \"\" : \"thumb_\").\"sl_image.png\";\n if(curl($url) !== false)\n {\n return $url;\n }\n else\n {\n return \"/static4/images/avatar.jpg\";\n }\n}", "public function getAvatarUrl()\n {\n return $this->getData('avatar_url');\n }", "function getUserImageInitial($userId, $name)\n{\n return getAvatarUrl().\"?name=$name&size=30&rounded=true&color=fff&background=\".getRandomColor($userId);\n}", "public function getProfileLink()\n\t{\n\t\treturn site_url('profile/' . $this->hash);\n\t}", "public static function src($email, $size = null)\r\n {\r\n // Size not provided, use default size in config\r\n if ($size == null)\r\n {\r\n $size = Config::get('gravatar.size');\r\n }\r\n\r\n // Config settings\r\n $default = Config::get('gravatar.default');\r\n $rating = Config::get('gravatar.rating');\r\n \r\n $url = 'http://www.gravatar.com/avatar/';\r\n $url .= md5(strtolower(trim($email)));\r\n $url .= \"?s=$size&d=$default&r=$rating\";\r\n return $url;\r\n }", "public function gravatar($email, $options = null, $ext = null)\n {\n $hash = md5(strtolower(trim((string)$email)));\n $options = $this->_filterOptions((array)$options);\n $optionsQueryString = (!empty($options)) ? '?' . http_build_query($options) : '';\n $ext = ($ext !== null) ? '.' . trim(ltrim((string)$ext, '.')) : '';\n\n return self::AVATAR_SERVER . '/' . $hash . $ext . $optionsQueryString;\n }", "public function avatarUser()\n {\n return asset(\"storage/images/$this->avatar\");\n }", "public function avatar($size = 100) {\n if (null === $this->user) {\n return null;\n }\n\n if ('PFed' == $this->xot->main_module) {\n /**\n * @var PfedModelProfileContract $profile\n */\n $profile = $this->getProfile();\n\n if ($profile->getMedia('avatar')->count() > 0) {\n return $profile->getMedia('avatar')->last()->original_url;\n }\n }\n\n $email = md5(mb_strtolower(trim((string) $this->user->email)));\n $default = urlencode('https://tracker.moodle.org/secure/attachment/30912/f3.png');\n\n return \"https://www.gravatar.com/avatar/$email?d=$default&s=$size\";\n }", "function cjpopups_wp_avatar_url($user_id_or_email, $size = 150){\n\t$user_id = cjpopups_user_info($user_id_or_email, 'ID');\n\t$get_avatar = get_avatar( $user_id, $size );\n preg_match(\"/src='(.*?)'/i\", $get_avatar, $matches);\n return ( $matches[1] );\n}", "function profileUrl()\r\n {\r\n return \"/user/show/{$this->id}\";\r\n }", "private function getPicture($email, $size = 200) {\r\n return '//www.gravatar.com/avatar/' . md5($email) . '?d=mm&s=' . $size;\r\n }", "public function getProfilePicture();", "public function getIconAvatarUrl() {\n return $this->imageUrl . '.jpg';\n }", "public static function profileImageUrl($user = null, $size = 28)\n\t\t{\n\t\t\tif($user) {\n\t\t\t\tif(isset($user['avatar'])) {\n\t\t\t\t\t$url = parse_url($user['avatar']);\n\t\t\t\t\tif(isset($url['query'])) {\n\t\t\t\t\t\t$url['query'] = 'sz=' . $size;\n\t\t\t\t\t\treturn $url['scheme'] . '://' . $url['host'] . '/' . $url['path'] . '?' . $url['query'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif($user['avatar']) {\n\t\t\t\t\t\t\treturn $user['avatar'] . '?sz=' . $size;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn Render::image('no-photo.jpg');\n\t\t}", "public function getAvatarURL(){\r\n\t\treturn $this->buildCharacterAvatarURL($this->armoryAdapter->getWowArmoryUrl(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getLevel(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getGenderId(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getRaceId(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getWowClassId());\r\n }", "public function getAvatar()\n {\n return $this->getFirstMediaUrl() ?: get_gravatar($this->email);\n }", "public function getFullAvatarUrl() {\n return $this->imageUrl . '_full.jpg';\n }", "function AvatarUrl($avatar_url, $facebook, $facebook_id) {\n\tglobal $setting;\n\tif($avatar_url == '') { \n\t\tif ($facebook == 1) {\n\t\t\t$avatar = 'http://graph.facebook.com/'.$facebook_id.'/picture';\n\t\t}\n\t\telse {\n\t\t\t$avatar = $setting['site_url'].'/uploads/avatars/default.png';\n\t\t}\n\t}\n\telse {\n\t\t$avatar = $setting['site_url'].'/uploads/avatars/'.$avatar_url;\n\t}\n\treturn $avatar;\n}", "public static function getUrlAvatar($email, $s = 32, $d = 'identicon', $r = 'pg')\n {\n\n $url = 'https://www.gravatar.com/avatar/';\n $url .= md5(strtolower(trim($email)));\n $url .= \"?s={$s}&d={$d}&r={$r}\";\n return $url;\n }", "protected function get_user_image_url($user) {\n global $CFG;\n\n // Beacuse bug #141 forceloginforprofileimage=enabled\n // i must check if this contiguration is enalbe and by pass it.\n $path = '/';\n $filename = 'f1';\n $usercontext = context_user::instance($user->id, IGNORE_MISSING);\n if (empty($CFG->forceloginforprofileimage)) {\n // Not enable so it's very easy.\n $url = moodle_url::make_pluginfile_url($usercontext->id, 'user', 'icon', null, $path, $filename);\n $url->param('rev', $user->picture);\n } else {\n\n // It's enable, so i must copy the profile image to somewhere else, so i can get the image;\n // Try to get the profile image file.\n $fs = get_file_storage();\n $file = $fs->get_file($usercontext->id, 'user', 'icon', 0, '/', $filename . '.png');\n\n if (!$file) {\n $file = $fs->get_file($usercontext->id, 'user', 'icon', 0, '/', $filename . '.jpg');\n if (!$file) {\n // I Can't get the file, sorry.\n return '';\n }\n }\n\n // With the file, now let's copy to plugin filearea.\n $fileinfo = self::get_certificate_tmp_fileinfo($this->get_context()->id);\n\n // Since f1 is the same name for all user, i must to rename the file, i think\n // add userid, since it's unique.\n $fileinfo['filename'] = 'f1-' . $user->id;\n\n // I must verify if image is already copied, or i get an error.\n // This file will be removed as soon as certificate file is generated.\n if (!$fs->file_exists($fileinfo['contextid'], $fileinfo['component'], $fileinfo['filearea'],\n $fileinfo['itemid'], $fileinfo['filepath'], $fileinfo['filename'])) {\n // File don't exists yet, so, copy to tmp file area.\n $fs->create_file_from_storedfile($fileinfo, $file);\n }\n\n // Now creating the image URL.\n $url = moodle_url::make_pluginfile_url($fileinfo['contextid'], $fileinfo['component'], $fileinfo['filearea'],\n null, $fileinfo['filepath'], $fileinfo['filename']);\n }\n return '<img src=\"' . $url->out() . '\" width=\"100\" height=\"100\" />';\n }", "function getEditAvatarUrl() {\n return assemble_url('people_company_user_edit_avatar', array(\n 'company_id' => $this->getCompanyId(),\n 'user_id' => $this->getId(),\n ));\n }", "function getAvatarUrl($large = false) {\n $size = $large ? '40x40' : '16x16';\n $mtime = filemtime($this->getAvatarPath($size));\n\n if($mtime === false) {\n return ROOT_URL . \"/avatars/default.$size.gif\";\n } else {\n return ROOT_URL . '/avatars/' . $this->getId() . \".$size.jpg?updated_on=$mtime\";\n } // if\n }", "public static function get_avatar_url($user_id_or_email, $size = 30) {\n return get_avatar_url($user_id_or_email, array('size'=> $size));\n }", "public function getAvatarUrl()\n {\n return $this->avatar_url;\n }", "public function getAvatarUrl()\n {\n return $this->avatar_url;\n }", "public function getAvatarUrl()\n {\n return $this->avatarUrl;\n }", "public function getAvatarUrl()\n {\n return $this->avatarUrl;\n }", "public function getAvatar()\n {\n return $this->getImageurl();\n }", "protected function _getProfilePicturePath()\n {\n if ($this->_properties['profile_picture_dir'] && $this->getOriginal('profile_picture')) {\n return '../files/users/profile_picture/' . $this->_properties['profile_picture_dir'] . '/square_' . $this->getOriginal('profile_picture'); \n }\n return 'default-profile_picture.png';\n }", "public function getAvatar()\n {\n return $this->getProfilePicture();\n }", "function get_user_profile_pic( $user_id, $height = 100, $width = 100 ) {\n\t$user_data = get_userdata( intval( $user_id ) );\n\n\tif ( $user_data ->user_photo != '' ) {\n\t\t$img_data = '<img name=\"user_photo\" class=\"agent_photo\" id=\"user_photo\" src=\"' . $user_data ->user_photo . '\" width=\"' . $width . '\" height=\"' . $height . '\" />';\n\t} else {\n\n\t\t\t$img_data = '<img name=\"user_photo\" class=\"agent_photo\" id=\"user_photo\" src=\"' . get_bloginfo( 'template_directory' ) . '/images/avatar_post.png\" width=\"' . $width . '\" height=\"' . $height . '\" />';\n\t}\n\n\t\techo $img_data;\n}", "function upm_get_avatar($avatar = '') {\r\n global $current_user;\r\n wp_get_current_user();\r\n\r\n if( $current_user && is_object($current_user) && is_a($current_user, 'WP_User')) {\r\n if ($current_user->has_cap('partner') && !empty($current_user->user_image)) {\r\n $avatar = wp_get_attachment_image_url($current_user->user_image,'thumbnail', false);\r\n } else {\r\n $avatar = get_avatar_url($current_user->ID);\r\n }\r\n }\r\n return \"<img class='avatar avatar-64 photo' src='\" . $avatar . \"'>\";\r\n}", "public function getGravatarAddress()\n\t{\n\t\treturn $this->gravatar_address;\n\t}", "function gravatar($rating = false, $size = false, $default = false, $border = false) {\n\tglobal $comment;\n\t$out = \"http://www.gravatar.com/avatar.php?gravatar_id=\".md5($comment->comment_author_email);\n\tif($rating && $rating != '')\n\t\t$out .= \"&amp;rating=\".$rating;\n\tif($size && $size != '')\n\t\t$out .=\"&amp;size=\".$size;\n\tif($default && $default != '')\n\t\t$out .= \"&amp;default=\".urlencode($default);\n\tif($border && $border != '')\n\t\t$out .= \"&amp;border=\".$border;\n\techo $out;\n}", "function avatar($user, $options = array())\n {\n if ($this->Settings->gravatar_enabled) {\n\n if (isset($user['User'])) {\n $user = $user['User'];\n }\n\n if (empty($user['mail'])) {\n $email = null;\n } else {\n $email = $user['mail'];\n }\n\n if ($email == null) {\n return null;\n }\n\n // def gravatar_url\n $email_hash = md5($email);\n $options_default = array(\n 'default' => null,\n 'rating' => 'PG',\n 'alt' => 'avatar',\n 'class' => 'gravatar'\n );\n $options = array_merge($options, $options_default);\n if (!empty($options['default'])) {\n $options['default'] = htmlspecialchars($options['default'], ENT_QUOTES);\n }\n\n $url = \"http://www.gravatar.com/avatar.php?gravatar_id=${email_hash}\";\n\n foreach (array('rating', 'size', 'default') as $opt) {\n if (!empty($opt)) {\n $value = htmlspecialchars($options[$opt], ENT_QUOTES);\n $url .= \"&{$opt}={$value}\";\n }\n }\n // end gravatar_url\n\n # Return the HTML img tag for the given email address's gravatar.\n foreach (array('class', 'alt', 'size') as $opt) {\n $options[$opt] = htmlspecialchars($options[$opt], ENT_QUOTES);\n }\n // TODO: replace with helper \n return \"<img class=\\\"{$options['class']}\\\" alt=\\\"{$options['alt']}\\\" width=\\\"{$options['size']}\\\" height=\\\"{$options['size']}\\\" src=\\\"{$url}\\\" />\" \n; }\n }", "public function getUrl() {\n return $this->getProfileUri();\n }", "public function getPublicUrl() {\n\t\treturn \"http://flickr.com/photos/{$this->getUserId()}/{$this->getId()}/\";\n\t}", "public function getGravatarIdAttribute(): string\n {\n return md5($this->author->email);\n }", "function generateAvatar($fullname)\n {\n $avatarName = urlencode(\"{$fullname}\");\n return \"https://ui-avatars.com/api/?name={$avatarName}&background=838383&color=FFFFFF&size=140&rounded=true\";\n }", "function getEmptyUserImageUrl() {\n\t\treturn url('images/user.png');\n\t}", "function getprofileimage($username){\n $user = DB::table('users')->where('username', $username)->first();\n $profileimage = $user->profileimage;\n if($profileimage == \"\"){\n\t$profileimagepath = \"/images/user.png\";\n return($profileimagepath);\n }\n $profileimagepath = \"/image/\".$username.\"/profileimage/\".$profileimage;\n return($profileimagepath);\n}", "function _leggy_make_avatar_thumb($username, $userpicture = null) {\n if (! strlen($username)) {\n $username = anonymous_numpty;\n }\n $this_link = 'user/'.$username;\n $site_author = user_load(variable_get('victoriac_custom_site_author_id','1'));\n if($username == $site_author->name) {\n $this_link = 'about';\n }\n \n if($userpicture){\n $this_img = theme('imagecache','avatar',$userpicture, $username, $username);\n }else{\n $this_img = theme('image', path_to_theme().'/images/avatar_thumb.png' , $username, $username);\n }\n $ret = l($this_img, $this_link, array(html=>true, attributes=>array('class' => 'avatar_thumb')));\n \n return $ret;\n}", "function user_get_avatar_path($user_id, $width=60)\n{\n\tif(file_exists(\"img/avatar/\".$user_id.\".png\"))\n\t\treturn \"img/avatar/\".$user_id.\".png\";\n\telse\n\t\treturn \"http://www.gravatar.com/avatar/\".md5( strtolower( trim( user_get_email($user_id) ) ) ).\"?s=\".$width;\n\t\t// return \"img/no_avatar.png\";\n}" ]
[ "0.8228067", "0.79609513", "0.78571045", "0.78442013", "0.7733157", "0.752398", "0.7515414", "0.7403009", "0.73866755", "0.73330367", "0.7307078", "0.7291679", "0.7241204", "0.7205576", "0.71945435", "0.7167073", "0.71546173", "0.71373457", "0.71316975", "0.71290326", "0.7116225", "0.711232", "0.7095244", "0.7090846", "0.705283", "0.70484746", "0.7023395", "0.70203567", "0.70087296", "0.6997803", "0.6977034", "0.69704694", "0.69700766", "0.69342846", "0.69324315", "0.6932403", "0.6920428", "0.6916803", "0.69088686", "0.6890655", "0.68779135", "0.6840358", "0.68364596", "0.6836426", "0.68344593", "0.68028945", "0.6792428", "0.67755157", "0.67609614", "0.67603403", "0.675899", "0.6757583", "0.6753585", "0.6751834", "0.6750727", "0.67237496", "0.671191", "0.67042524", "0.6692929", "0.6675605", "0.6675223", "0.6671193", "0.6653824", "0.6651583", "0.6638529", "0.6627951", "0.66207284", "0.6603172", "0.6601983", "0.66014224", "0.6583226", "0.6556466", "0.6549351", "0.65484726", "0.65348506", "0.6513256", "0.6510293", "0.6502035", "0.6498984", "0.64984417", "0.6494217", "0.6494217", "0.64666635", "0.64666635", "0.64622074", "0.64555657", "0.64473015", "0.6431352", "0.6429005", "0.64274573", "0.6415951", "0.6415884", "0.64128876", "0.640261", "0.639055", "0.638994", "0.6371573", "0.6365912", "0.63652897", "0.63550353" ]
0.71799755
15
///////////////////////////////// Super User Permissions ///////////////////////////////// Elevates the current user to super user status. This grants all permissions to everything. BE CAREFUL. Typically, this is reserved for cron jobs that need to work with models belonging to other users. WARNING: do not forget to remove super user permissions when done with demoteToNormalUser() or else the permissions system will be rendered moot until the request/app exits
public function promoteToSuperUser() { $this->superUser = true; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __allowSuperAdminOnly() {\n\t\t$isSuperAdmin = $this->_isSuperAdmin();\n\t\tif ($isSuperAdmin === false) {\n\t\t\t$this->redirect('/admin/users/accessDenied');\n\t\t}\n\t}", "function grant_super_admin($user_id)\n {\n }", "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}", "function getIsSuperAdmin(){\r\n\t\tif(!isset($this->user->permissions))\r\n\t\t\treturn false;\r\n\t\treturn ($this->user && $this->user->permissions>=11);\r\n\t}", "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 isSuperUser()\n\t{\n\t\treturn $this->hasPermission('superuser');\n\t}", "function isSuperAdmin() {\n return ((int) $this->curUserInfo->is_admin == 1) ? true : false;\n }", "public function isSuperAdmin(){\r\n if($this->user_type == 'SuperAdmin'){\r\n return true;\r\n }\r\n return false;\r\n}", "public function _isAdmin() {\n\t\t$user_id = $this->Auth->user('id');\n\t\t$aro = array('model' => 'User', 'foreign_key' => $user_id); \n\t\t$aco = 'role/super/admin';\n\t\treturn $this->Acl->check($aro, $aco);\n\t}", "public function setSuper($user, $super = true);", "public function isSuperAdmin()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getIsSuperAdmin() : false;\r\n }", "function revoke_super_admin($user_id)\n {\n }", "function ucdmanager_isSuperadmin($uid=null) {\n\t$user_account = null;\n\tif ( $uid ) {\n\t\t$user_account = user_load($uid);\n\t}\n\t// return user_access('bypass node access', $user_account);\n\treturn user_access('administer nodes', $user_account);\n}", "private function grantAdminAccess()\n {\n if ($this->checkColumn(\"shopgate\", TABLE_ADMIN_ACCESS)) {\n // Create column shopgate in admin_access...\n xtc_db_query(\n \"alter table \" . TABLE_ADMIN_ACCESS\n . \" ADD shopgate INT( 1 ) NOT NULL\"\n );\n\n // ... grant access to to shopgate for main administrator\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate=1 where customers_id=1 LIMIT 1\"\n );\n\n if (!empty($_SESSION['customer_id'])\n && $_SESSION['customer_id'] != 1\n ) {\n // grant access also to current user\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 1 where customers_id='\"\n . $_SESSION['customer_id']\n . \"' LIMIT 1\"\n );\n }\n\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 5 where customers_id = 'groups'\"\n );\n }\n }", "public function isSuperUser()\n {\n return $this->superUser;\n }", "function upgrade_1284() {\n # Note: The ALL domain is not (yet) deleted to stay backwards-compatible for now (will be done in a later upgrade function)\n\n $result = db_query(\"SELECT username FROM \" . table_by_key('domain_admins') . \" where domain='ALL'\");\n\n if ($result['rows'] > 0) {\n while ($row = db_array ($result['result'])) {\n printdebug (\"Setting superadmin flag for \" . $row['username']);\n db_update('admin', 'username', $row['username'], array('superadmin' => db_get_boolean(true)) );\n }\n }\n}", "protected function isSuperAdmin(): bool {\n\t\treturn true;\n\t}", "public function isSuperAdmin() {\n return $this->getGuardUser() ? $this->getGuardUser()->getIsSuperAdmin() : false;\n }", "public function getIsSuperAdminAttribute()\n {\n return $this->hasRole(Role::superAdmin());\n }", "function is_superadmin()\n{\n\tif (! is_login()) {\n\t\treturn false;\n\t}\n\n\tif (isset($_SESSION['_user_role']) &&\n\t\t$_SESSION['_user_role'] == '100'\n\t) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public function isSuperAdmin();", "function is_super_admin($user_id = \\false)\n {\n }", "public function overtake_permissions($intUserID){\n\t\t$this->db->query(\"UPDATE __sessions SET :params WHERE session_id = '\".$this->sid.\"'\", array(\n\t\t\t\t'session_perm_id'\t\t\t\t\t=> $intUserID,\n\t\t));\n\t}", "function isSuperUser($active=true){\n $user=(isset($_SESSION[\"superuser\"])? $_SESSION[\"superuser\"] : $_SESSION[\"onlineuser\"]);\n if (isset($user)&&$user->isSuperAdmin()){\n\tif (!isset($_SESSION[\"superuser\"])){\n\t $_SESSION[\"superuser\"]=$_SESSION[\"onlineuser\"];\n\t}\n\t\n\tif ($active){\n\t return $_SESSION[\"superuser\"];\n\t} else {\n\t return true;\n\t}\n\t\n } else {\n\tif ($active){\n\t //$_SESSION[\"redirect\"]=$_SERVER[\"PHP_SELF\"];\n\t $_SESSION[\"redirect\"]= $_SERVER[\"REQUEST_URI\"];\n\t header(\"Location: logout.php\");\n\t exit;\n\t} else {\n\t return false;\n\t}\n } \n}", "function pilau_edit_user_cap_protect_admins( $allcaps, $cap, $args ) {\n\n\t// If the check is about editing or deleting users and the user is specified\n\tif ( in_array( $args[0], array( 'edit_user', 'delete_user' ) ) && ! empty( $args[2] ) ) {\n\n\t\t// Get the user\n\t\t$user = new WP_User( $args[2] );\n\n\t\t// If the user in question is an admin and the current user isn't...\n\t\tif ( user_can( $user, 'update_core' ) && ! user_can( $args[1], 'update_core' ) ) {\n\t\t\t$allcaps[ $args[0] . 's' ] = false;\n\t\t}\n\n\t}\n\n\treturn $allcaps;\n}", "public function SystemAdministratorAction()\n {\n $this->requireRoleOrRedirect('SystemAdministrator');\n $this->view->setLayout('application');\n $this->view->userProfile = (new \\Apprecie\\Library\\Security\\Authentication())->getAuthenticatedUser(\n )->getUserProfile();\n }", "public function isSuperAdmin()\n {\n return ($this->hasRole(HakAkses::SUPER_ADMIN));\n }", "public function demoteToNormalUser()\n {\n $this->superUser = false;\n\n return $this;\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 isSuper(): bool\n {\n return $this->hasRole('super');\n }", "private function isSuperAdmin()\n {\n return $this->authorizationChecker->isGranted('ROLE_SUPER_ADMIN');\n }", "#[CustomOpenApi\\Operation(id: 'userSupervised', tags: [Tags::User, Tags::V1])]\n #[CustomOpenApi\\Parameters(model: User::class)]\n #[CustomOpenApi\\Response(resource: UserResource::class, isCollection: true)]\n public function supervised()\n {\n $filter = fn($query) => $query->whereDescendantOf(auth()->user());\n return CustomQueryBuilder::buildResource(User::class, UserResource::class, $filter);\n }", "public function beforeSave()\n {\n //Cannot edit role id == 1 because Supper Administrator access all permission\n $auth = Users::getCurrentUser();\n if ($this->is_super_admin == 1 && $auth['is_super_admin'] != 1) {\n return false;\n }\n return true;\n }", "public function uninstall() {\n\t\t$this->load->model( 'user/user_group' );\n\t\t// access - modify pavomenu edit\n\t\t$this->model_user_user_group->removePermission( $this->user->getId(), 'access', 'extension/module/pavomenu/menu' );\n\t\t$this->model_user_user_group->removePermission( $this->user->getId(), 'modify', 'extension/module/pavomenu/menu' );\n\t\t// END REMOVE USER PERMISSION\n\t}", "public function removeUserAdminPermissions ( Request $request )\n {\n \n $id = $request['id'];\n $user = User::find( $id );\n\n if( $user->id == \\Auth::user()->id )\n {\n return(\n back()\n ->with( [ 'flash_error' => 'You cannot update your own admin access.' ] )\n );\n }\n\n $user->is_admin = false;\n $user->save();\n\n return(\n back()\n ->with( [ 'flash_success' => 'You have successfully removed this users admin access.' ] )\n );\n \n }", "public function isSuperAdmin() : bool\n\t{\n\t\tif ($this->id == VENUS_SUPER_ADMIN_ID) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "protected function isCurrentUserAdmin() {}", "function upgradePermissions166()\n{\n Permission::model()->refreshMetaData(); // Needed because otherwise Yii tries to use the outdate permission schema for the permission table\n $oUsers=User::model()->findAll();\n foreach($oUsers as $oUser)\n {\n if ($oUser->create_survey==1)\n {\n $oPermission=new Permission;\n $oPermission->entity_id=0;\n $oPermission->entity='global';\n $oPermission->uid=$oUser->uid;\n $oPermission->permission='surveys';\n $oPermission->create_p=1;\n $oPermission->save();\n }\n if ($oUser->create_user==1 || $oUser->delete_user==1)\n {\n $oPermission=new Permission;\n $oPermission->entity_id=0;\n $oPermission->entity='global';\n $oPermission->uid=$oUser->uid;\n $oPermission->permission='users';\n $oPermission->create_p=$oUser->create_user;\n $oPermission->delete_p=$oUser->delete_user;\n $oPermission->update_p=1;\n $oPermission->read_p=1;\n $oPermission->save();\n }\n if ($oUser->superadmin==1)\n {\n $oPermission=new Permission;\n $oPermission->entity_id=0;\n $oPermission->entity='global';\n $oPermission->uid=$oUser->uid;\n $oPermission->permission='superadmin';\n $oPermission->read_p=1;\n $oPermission->save();\n }\n if ($oUser->configurator==1)\n {\n $oPermission=new Permission;\n $oPermission->entity_id=0;\n $oPermission->entity='global';\n $oPermission->uid=$oUser->uid;\n $oPermission->permission='settings';\n $oPermission->update_p=1;\n $oPermission->read_p=1;\n $oPermission->save();\n }\n if ($oUser->manage_template==1)\n {\n $oPermission=new Permission;\n $oPermission->entity_id=0;\n $oPermission->entity='global';\n $oPermission->uid=$oUser->uid;\n $oPermission->permission='templates';\n $oPermission->create_p=1;\n $oPermission->read_p=1;\n $oPermission->update_p=1;\n $oPermission->delete_p=1;\n $oPermission->import_p=1;\n $oPermission->export_p=1;\n $oPermission->save();\n }\n if ($oUser->manage_label==1)\n {\n $oPermission=new Permission;\n $oPermission->entity_id=0;\n $oPermission->entity='global';\n $oPermission->uid=$oUser->uid;\n $oPermission->permission='labelsets';\n $oPermission->create_p=1;\n $oPermission->read_p=1;\n $oPermission->update_p=1;\n $oPermission->delete_p=1;\n $oPermission->import_p=1;\n $oPermission->export_p=1;\n $oPermission->save();\n }\n if ($oUser->participant_panel==1)\n {\n $oPermission=new Permission;\n $oPermission->entity_id=0;\n $oPermission->entity='global';\n $oPermission->uid=$oUser->uid;\n $oPermission->permission='participantpanel';\n $oPermission->create_p=1;\n $oPermission->save();\n }\n }\n $sQuery = \"SELECT * FROM {{templates_rights}}\";\n $oResult = Yii::app()->getDb()->createCommand($sQuery)->queryAll();\n foreach ( $oResult as $aRow )\n {\n $oPermission=new Permission;\n $oPermission->entity_id=0;\n $oPermission->entity='template';\n $oPermission->uid=$aRow['uid'];\n $oPermission->permission=$aRow['folder'];\n $oPermission->read_p=1;\n $oPermission->save();\n }\n}", "protected function isCurrentUserAdmin() {}", "public function getSuperusers()\n\t{\n\t\t$assignments = $this->_authManager->getAssignmentsByItemName( Rights::module()->superuserName );\n\n\t\t$userIdList = array();\n\t\tforeach( $assignments as $userId=>$assignment )\n\t\t\t$userIdList[] = $userId;\n\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->addInCondition(Rights::module()->userIdColumn, $userIdList);\n\n\t\t$userClass = Rights::module()->userClass;\n\t\t$users = CActiveRecord::model($userClass)->findAll($criteria);\n\t\t$users = $this->attachUserBehavior($users);\n\n\t\t$superusers = array();\n\t\tforeach( $users as $user )\n\t\t\t$superusers[] = $user->name;\n\n\t\t// Make sure that we have superusers, otherwise we would allow full access to Rights\n\t\t// if there for some reason is not any superusers.\n\t\tif( $superusers===array() )\n\t\t\tthrow new CHttpException(403, Rights::t('core', 'There must be at least one superuser!'));\n\n\t\treturn $superusers;\n\t}", "public function isSuperAdmin()\n {\n return ('superadmin' == $this->role);\n }", "public function isSuper() {\n\t\treturn ($this->isAdmin() || $this->Session->read('Acl.isSuper'));\n\t}", "public function refreshUserACLs() {\r\n if ($this->modx->getUser()) {\r\n $this->modx->user->getAttributes(array(), '', true);\r\n }\r\n }", "public function run()\n {\n $this -> disableForeignKeys();\n\n User::find(1) -> assignRole(config('sprint.access.role.super'));\n\n $this -> enableForeignKeys();\n }", "public function setRoleSupervisor()\n {\n // $role = Role::where('name', 'supervisor')->first();\n // $permissions = Permission::where('name', 'like', 'blog-%')->get();\n // $role->syncPermissions($permissions);\n }", "public function run() {\n\n\t\tDB::beginTransaction();\n\n\t\t$superadmin = Role::where('name', '=', 'super_admin')->first();\n\t\t// $shrek = User::where('name','=','Job Boosts Admin')->first();\n\t\t//dd($shrek->hasRole('supper_admin'));\n\n\t\t// if (!$shrek->hasRole('super_admin'))\n\t\t// {\n\t\t// $shrek->attachRole( $superadmin->id );\n\t\t// }\n\n\t\t$this->command->info('Admin user seeded :-)');\n\n\t\t$module_name = ['Role', 'User', 'Cms', 'Faq', 'EmailTemplate', 'Setting', 'HomepageSlider', 'ContactUs', 'Coach', 'Staff'];\n\t\tforeach ($module_name as $item) {\n\t\t\tif ($item == 'EmailTemplate') {\n\t\t\t\t$permistion_list = ['Edit', 'List'];\n\t\t\t} else if ($item == 'Setting') {\n\t\t\t\t$permistion_list = ['Edit', 'List', 'Delete'];\n\t\t\t} else if ($item == 'ContactUs') {\n\t\t\t\t$permistion_list = ['List', 'Delete'];\n\t\t\t} else if ($item == 'Coach') {\n\t\t\t\t$permistion_list = ['Create', 'Edit', 'Delete', 'List', 'Manage'];\n\t\t\t} else {\n\t\t\t\t$permistion_list = ['Create', 'Edit', 'Delete', 'List'];\n\t\t\t}\n\t\t\t//$permistion_list = ['Create','Edit','Delete','List'];\n\t\t}\n\n\t\tfor ($i = 0; $i < count($module_name); $i++) {\n\t\t\tfor ($j = 0; $j < count($permistion_list); $j++) {\n\t\t\t\tif ($module_name[$i] == 'Coach' && $permistion_list[$j] == 'Manage') {\n\t\t\t\t\t$existing_perm = Permission::where('name', strtolower($permistion_list[$j]) . '-' . strtolower($module_name[$i]) . '-availability')->exists();\n\t\t\t\t} else {\n\t\t\t\t\t$existing_perm = Permission::where('name', strtolower($permistion_list[$j]) . '-' . strtolower($module_name[$i]))->exists();\n\t\t\t\t}\n\n\t\t\t\t//dd(strtolower($permistion_list[$j]).'-'.strtolower($module_name[$i]), $existing_perm);\n\t\t\t\tif (!$existing_perm) {\n\t\t\t\t\t$createRole = new Permission();\n\t\t\t\t\tif ($module_name[$i] == 'Coach' && $permistion_list[$j] == 'Manage') {\n\t\t\t\t\t\t$createRole->name = strtolower($permistion_list[$j]) . '-' . strtolower($module_name[$i]) . '-availability';\n\t\t\t\t\t\t$createRole->display_name = $permistion_list[$j] . ' ' . $module_name[$i] . ' availability';\n\t\t\t\t\t\t$createRole->description = 'Can ' . $permistion_list[$j] . ' ' . strtolower($module_name[$i]) . ' availability';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$createRole->name = strtolower($permistion_list[$j]) . '-' . strtolower($module_name[$i]);\n\t\t\t\t\t\t$createRole->display_name = $permistion_list[$j] . ' ' . $module_name[$i];\n\t\t\t\t\t\t$createRole->description = 'Can ' . $permistion_list[$j] . ' ' . strtolower($module_name[$i]);\n\t\t\t\t\t}\n\t\t\t\t\t$createRole->module_name = $module_name[$i];\n\t\t\t\t\t$createRole->save();\n\n\t\t\t\t\t$superadmin->attachPermission($createRole);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tDB::commit();\n\n\t}", "public function restore_permissions(){\n\t\t$this->db->query(\"UPDATE __sessions SET :params WHERE session_id = '\".$this->sid.\"'\", array(\n\t\t\t\t'session_perm_id'\t\t\t\t\t=> ANONYMOUS,\n\t\t));\n\t}", "public function setDefaultPermissions()\n {\n $this->allow('guest', 'default_error');\n $this->allow('guest', 'default_uploader');\n $this->allow('guest', 'default_lang');\n $this->allow('guest', 'people_auth');\n $this->allow('guest', 'api_auth');\n $this->allow('guest', 'api_search');\n $this->allow('guest', 'api_company');\n $this->allow('guest', 'api_entidad');\n $this->allow('guest', 'frontend_index');\n $this->allow('guest', 'frontend_auth');\n $this->allow('guest', 'frontend_account');\n $this->allow('guest', 'frontend_auction');\n $this->allow('guest', 'frontend_search');\n $this->allow('guest', 'frontend_product');\n $this->allow('guest', 'frontend_page');\n /**\n * User Access Level Permissions\n */\n $this->allow('user', 'default_index');\n $this->allow('user', 'default_error');\n $this->allow('user', 'default_uploader');\n $this->allow('user', 'default_lang');\n $this->allow('user', 'people_auth');\n $this->allow('user', 'search_index');\n $this->allow('user', 'frontend_search');\n $this->allow('user', 'frontend_product');\n $this->allow('user', 'frontend_page');\n $this->allow('user', 'people_user', array(\n 'my', // View My Details Page\n 'view', // View User Details Page\n 'changepassword', // Change Password Page\n 'updateavatar', // Update Avatar Lightbox\n 'getavatar', // Get Avatar JSON Call\n 'get-addr-avatar','setavatar', // Set Avatar JSON Call\n 'removeavatar' // Remove Avatar JSON Call\n ));\n\n /* $this->allow('user', 'company_manage', array(\n 'index', // Company List Page\n 'view' // Company View Page\n ));*/\n }", "public static function isSuperModerator() {\n return (int)$_SESSION['user']['supermoderator'] === 1;\n }", "public function isSuperAdmin() {\n return $this->admin == 2;\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}", "protected function isAdminUser() {}", "public static function isSuperAdmin($userId){\n return self::isRole($userId,'roleSuperAdmin');\n }", "protected function update_user_is () {\n\t\t$this->is_guest = $this->user_id == User::GUEST_ID;\n\t\t$this->is_user = false;\n\t\t$this->is_admin = false;\n\t\tif ($this->is_guest) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * Checking of user type\n\t\t */\n\t\t$groups = User::instance()->get_groups($this->user_id) ?: [];\n\t\tif (in_array(User::ADMIN_GROUP_ID, $groups)) {\n\t\t\t$this->is_admin = true;\n\t\t\t$this->is_user = true;\n\t\t} elseif (in_array(User::USER_GROUP_ID, $groups)) {\n\t\t\t$this->is_user = true;\n\t\t}\n\t}", "function btwp_restrict_admin_access() {\n\t\n\tglobal $current_user;\n\tget_currentuserinfo();\n\t\n\tif( !array_key_exists( 'administrator', $current_user->caps ) ) {\n\t\twp_redirect( get_bloginfo( 'url' ) );\n\t\texit;\n\t}\n\n}", "public static function hf_user_permission() {\n $current_user = wp_get_current_user();\n $current_user->roles = apply_filters('hf_add_user_roles', $current_user->roles);\n $current_user->roles = array_unique($current_user->roles);\n $user_ok = false;\n\n $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));\n if ($current_user instanceof WP_User) {\n $can_users = array_intersect($wf_roles, $current_user->roles);\n if (!empty($can_users)) {\n $user_ok = true;\n }\n }\n return $user_ok;\n }", "public static function hf_user_permission() {\n $current_user = wp_get_current_user();\n $current_user->roles = apply_filters('hf_add_user_roles', $current_user->roles);\n $current_user->roles = array_unique($current_user->roles);\n $user_ok = false;\n\n $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));\n if ($current_user instanceof WP_User) {\n $can_users = array_intersect($wf_roles, $current_user->roles);\n if (!empty($can_users)) {\n $user_ok = true;\n }\n }\n return $user_ok;\n }", "public static function hf_user_permission() {\n $current_user = wp_get_current_user();\n $current_user->roles = apply_filters('hf_add_user_roles', $current_user->roles);\n $current_user->roles = array_unique($current_user->roles);\n $user_ok = false;\n\n $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));\n if ($current_user instanceof WP_User) {\n $can_users = array_intersect($wf_roles, $current_user->roles);\n if (!empty($can_users)) {\n $user_ok = true;\n }\n }\n return $user_ok;\n }", "public static function hf_user_permission() {\n $current_user = wp_get_current_user();\n $current_user->roles = apply_filters('hf_add_user_roles', $current_user->roles);\n $current_user->roles = array_unique($current_user->roles);\n $user_ok = false;\n\n $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));\n if ($current_user instanceof WP_User) {\n $can_users = array_intersect($wf_roles, $current_user->roles);\n if (!empty($can_users)) {\n $user_ok = true;\n }\n }\n return $user_ok;\n }", "public function update_user_level_from_caps()\n {\n }", "private function authorizeAdmins() {\n\n $authorizedRoleIds = Configure::read('acl.role.access_plugin_role_ids');\n $authorizedUserIds = Configure::read('acl.role.access_plugin_user_ids');\n\n $modelRoleFk = $this->_getRoleForeignKeyName();\n\n if (in_array($this->Auth->user($modelRoleFk), $authorizedRoleIds) || in_array(\n $this->Auth->user($this->getUserPrimaryKeyName()),\n $authorizedUserIds)) {\n // Allow all actions. CakePHP 2.0\n $this->Auth->allow('*');\n\n // Allow all actions. CakePHP 2.1\n $this->Auth->allow();\n }\n }", "function isSystemAdmin()\n{\n if (auth()->check()) {\n return auth()->user()->role->priority == 100 ? true : false;\n }\n\n return false;\n}", "public function testSuperAdminCanImpersonateUser(): void\n {\n $username = $this->fixtures->getReference('super_admin')->getUsername();\n $this->formLogIn($username);\n\n $crawler = $this->client->request('GET', \"/admin/sonata/user/user/list\");\n $this->assertSame(\n Response::HTTP_OK,\n $this->client->getResponse()->getStatusCode()\n );\n $this->assertSame(\n 5,\n $crawler->filter('a[title=\"Impersonate User\"]')->count()\n );\n }", "protected function editLockPermissions() {}", "public function updateSecurityGroups($forceReset)\n {\n // DB connectie\n $dbCon = $this->_dbCon;\n\n if ($forceReset || ($this->_settings->get('securityversion') < 0.27)) {\n /* Truncate de huidige permissies */\n $dbCon->rawExec('DELETE FROM grouppermissions');\n\n /* Grant the logon right to the anonymous user - closed system group */\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid) VALUES(1, '.SpotSecurity::spotsec_perform_login.')');\n\n /* Default permissions for anonymous users */\n $anonPerms = [SpotSecurity::spotsec_view_spots_index, SpotSecurity::spotsec_perform_login, SpotSecurity::spotsec_perform_search,\n SpotSecurity::spotsec_view_spotdetail, SpotSecurity::spotsec_retrieve_nzb, SpotSecurity::spotsec_view_spotimage,\n SpotSecurity::spotsec_view_statics, SpotSecurity::spotsec_create_new_user, SpotSecurity::spotsec_view_comments,\n SpotSecurity::spotsec_view_spotcount_total, ];\n foreach ($anonPerms as $anonPerm) {\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid) VALUES(2, '.$anonPerm.')');\n } // foreach\n\n /* Default permissions for authenticated users */\n $authedPerms = [SpotSecurity::spotsec_download_integration, SpotSecurity::spotsec_mark_spots_asread, SpotSecurity::spotsec_view_rssfeed,\n SpotSecurity::spotsec_edit_own_userprefs, SpotSecurity::spotsec_edit_own_user, SpotSecurity::spotsec_post_comment,\n SpotSecurity::spotsec_perform_logout, SpotSecurity::spotsec_use_sabapi, SpotSecurity::spotsec_keep_own_watchlist,\n SpotSecurity::spotsec_keep_own_downloadlist, SpotSecurity::spotsec_keep_own_seenlist, SpotSecurity::spotsec_view_spotcount_filtered,\n SpotSecurity::spotsec_select_template, SpotSecurity::spotsec_consume_api, SpotSecurity::spotsec_allow_custom_stylesheet,\n SpotSecurity::spotsec_keep_own_filters, SpotSecurity::spotsec_report_spam, SpotSecurity::spotsec_post_spot,\n SpotSecurity::spotsec_blacklist_spotter, SpotSecurity::spotsec_view_statistics, ];\n foreach ($authedPerms as $authedPerm) {\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid) VALUES(3, '.$authedPerm.')');\n } // foreach\n\n /* Viewing of spotweb avatar images is a security right so administrators can globally disable this */\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid,objectid) VALUES(2, '.SpotSecurity::spotsec_view_spotimage.\", 'avatar')\");\n\n /* Allow authenticated users to consume Spotweb using an API */\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_consume_api.\", 'rss')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_consume_api.\", 'newznabapi')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_consume_api.\", 'getnzb')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_consume_api.\", 'getspot')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_download_integration.\", 'disable')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_download_integration.\", 'client-sabnzbd')\");\n\n /* Allow certain notification services */\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid) VALUES(3, '.SpotSecurity::spotsec_send_notifications_services.')');\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(2, '.SpotSecurity::spotsec_send_notifications_services.\", 'welcomemail')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_send_notifications_services.\", 'email')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_send_notifications_services.\", 'twitter')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_send_notifications_services.\", 'prowl')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(4, '.SpotSecurity::spotsec_send_notifications_services.\", 'growl')\");\n\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid) VALUES(3, '.SpotSecurity::spotsec_send_notifications_types.')');\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_send_notifications_types.\", 'watchlist_handled')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_send_notifications_types.\", 'spot_posted')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_send_notifications_types.\", 'nzb_handled')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_send_notifications_types.\", 'report_posted')\");\n\n /* Trusted users are allowed to some additional download integration options etc */\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(4, '.SpotSecurity::spotsec_download_integration.\", 'push-sabnzbd')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(4, '.SpotSecurity::spotsec_download_integration.\", 'save')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(4, '.SpotSecurity::spotsec_download_integration.\", 'runcommand')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(4, '.SpotSecurity::spotsec_download_integration.\", 'nzbget')\");\n // Being able to erase downloads has become its seperate rights (GH issue #935)\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid,objectid) VALUES(4, '.SpotSecurity::spotsec_keep_own_downloadlist.\", 'erasedls')\");\n\n /* Default permissions for administrative users */\n $adminPerms = [SpotSecurity::spotsec_list_all_users, SpotSecurity::spotsec_retrieve_spots, SpotSecurity::spotsec_edit_other_users,\n SpotSecurity::spotsec_delete_user, SpotSecurity::spotsec_edit_groupmembership,\n SpotSecurity::spotsec_display_groupmembership, SpotSecurity::spotsec_edit_securitygroups,\n SpotSecurity::spotsec_set_filters_as_default, SpotSecurity::spotsec_view_spotweb_updates,\n SpotSecurity::spotsec_edit_settings, ];\n foreach ($adminPerms as $adminPerm) {\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid) VALUES(5, '.$adminPerm.')');\n } // foreach\n\n // Notifications of these are only allowed to be sent to administrators\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(5, '.SpotSecurity::spotsec_send_notifications_types.\", 'retriever_finished')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(5, '.SpotSecurity::spotsec_send_notifications_types.\", 'user_added')\");\n } // if\n\n //#######################################################################\n //# Security level 0.28\n //#######################################################################\n if ($forceReset || ($this->_settings->get('securityversion') < 0.28)) {\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_send_notifications_types.\", 'newspots_for_filter')\");\n } // if\n\n //#######################################################################\n //# Security level 0.29\n //#######################################################################\n if ($forceReset || ($this->_settings->get('securityversion') < 0.29)) {\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_select_template.\", 'we1rdo')\");\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(3, '.SpotSecurity::spotsec_select_template.\", 'mobile')\");\n } // if\n\n //#######################################################################\n //# Security level 0.30\n //#######################################################################\n if ($forceReset || ($this->_settings->get('securityversion') < 0.30)) {\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid) VALUES(5, '.SpotSecurity::spotsec_edit_spotdetail.')');\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid) VALUES(5, '.SpotSecurity::spotsec_view_spot_editor.')');\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid) VALUES(5, '.SpotSecurity::spotsec_show_spot_was_edited.')');\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid) VALUES(5, '.SpotSecurity::spotsec_delete_spot.')');\n } // if\n\n //#######################################################################\n //# Security level 0.32\n //#######################################################################\n if ($forceReset || ($this->_settings->get('securityversion') < 0.32)) {\n $dbCon->rawExec('INSERT INTO grouppermissions(groupid,permissionid, objectid) VALUES(4, '.SpotSecurity::spotsec_download_integration.\", 'nzbvortex')\");\n } // if\n\n //#######################################################################\n // Security level 0.33\n //#######################################################################\n if ($forceReset || ($this->_settings->get('securityversion') < 0.33)) {\n $dbCon->rawExec(\"DELETE FROM grouppermissions WHERE objectid = 'notifo';\");\n }\n }", "public function isSuperAdmin()\n {\n return in_array($this->type, [self::SUPER_ADMIN_TYPE]);\n }", "public function isJoomlaSuperAdmin() {\n return $this->authorise('core.admin', 'root.1');\n }", "function install_root_user() {\n $fields = array(\n 'username' => $site_config['adminUser'],\n 'password' => $site_config['adminPassword'],\n 'role' => DEFAULT_ADMIN_RID,\n 'email' => $site_config['adminEmail'],\n 'name' => $site_config['adminName'],\n 'language' => Session::get('lang'),\n 'active' => 1\n );\n $new_user = new User();\n if($new_user->create($fields)) {\n return true;\n }\n else {\n System::addMessage('error', rt('The site administrator could not be created. Please verify that your server meets the requirements for the application and that your database user has sufficient permissions ot make changes in the database'));\n }\n}", "public function isJoomlaSuperAdmin(JUser $user) {\n\t\treturn $user->authorise('core.admin', 'root.1');\n }", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function getIsSuperAdmin()\r\n\t{\r\n\t\tif($this->isGuest) return false;\r\n\t\treturn isset($this->superAdmins[$this->identity->username]);\r\n\t}", "function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}", "function subsite_manager_is_superadmin($user_guid = 0){\n static $superadmin_cache;\n\n $result = false;\n\n $user_guid = sanitise_int($user_guid, false);\n\n if(empty($user_guid)){\n $user_guid = elgg_get_logged_in_user_guid();\n }\n\n if(!empty($user_guid)){\n if(!isset($superadmin_cache)){\n $superadmin_cache = array();\n }\n\n if(!isset($superadmin_cache[$user_guid])){\n $superadmin_cache[$user_guid] = false;\n\n $query = \"SELECT value\";\n $query .= \" FROM \" . get_config(\"dbprefix\") . \"private_settings\";\n $query .= \" WHERE name = 'superadmin'\";\n $query .= \" AND entity_guid = \" . $user_guid;\n\n if ($setting = get_data_row($query)) {\n if($setting->value == true){\n $superadmin_cache[$user_guid] = true;\n }\n }\n }\n\n $result = $superadmin_cache[$user_guid];\n }\n\n return $result;\n }", "public function authorize()\n {\n return isSuperAdmin();\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 }", "function first_user_as_forge_manager()\n {\n initialize_forge_management_permissions();\n $user = User::all()->first();\n $user->assignRole('manage-forge');\n }", "function isSuperAdmin(){\n\t\tif(isset($_SESSION['type']) && $_SESSION['type']=='superadmin'){\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function setAsAdmin()\n {\n if (!in_array('admin', $this->roles)) {\n $this->roles[] = 'admin';\n }\n }", "function first_user_as_teacher()\n {\n initialize_forge_management_permissions();\n $user = User::all()->first();\n $user->assignRole('teacher');\n }", "public function approveByUser() {\n $this->status = parent::STATUS_APPROVED_BY_USER;\n $this->admin_id = NULL;\n\n //no reason to keep this (cause we will save to history)\n $this->decline_reason = null;\n $this->comment = null;\n \n return $this->save(false);\n }", "public function canModifyVisibilityOfUsers();", "protected function fixPermission() {}", "public function ensureAdministratorAccess() {\r\n /** @var modUserGroup $adminGroup */\r\n $adminGroup = $this->modx->getObject('modUserGroup',array('name' => 'Administrator'));\r\n /** @var modAccessPolicy $adminContextPolicy */\r\n $adminContextPolicy = $this->modx->getObject('modAccessPolicy',array('name' => 'Context'));\r\n if ($adminGroup) {\r\n if ($adminContextPolicy) {\r\n /** @var modAccessContext $adminAdminAccess */\r\n $adminAdminAccess = $this->modx->newObject('modAccessContext');\r\n $adminAdminAccess->set('principal',$adminGroup->get('id'));\r\n $adminAdminAccess->set('principal_class','modUserGroup');\r\n $adminAdminAccess->set('target',$this->object->get('key'));\r\n $adminAdminAccess->set('policy',$adminContextPolicy->get('id'));\r\n $adminAdminAccess->save();\r\n }\r\n }\r\n }", "public function CopyUserRights()\n {\n if (false === $this->isCopyPermissionsAllowed()) {\n return;\n }\n\n if (null !== $this->getInputFilterUtil()->getFilteredInput('copyUserRightsUserID')) {\n $copyUserRightsUserID = $this->getInputFilterUtil()->getFilteredInput('copyUserRightsUserID');\n $oCmsUser = TdbCmsUser::GetNewInstance();\n if ($oCmsUser->Load($copyUserRightsUserID)) {\n // reset group, role and portal rights\n $this->RemoveMLTConnection('cms_usergroup_mlt');\n $this->RemoveMLTConnection('cms_role_mlt');\n $this->RemoveMLTConnection('cms_portal_mlt');\n\n $aUserGroups = $oCmsUser->GetMLTIdList('cms_usergroup', 'cms_usergroup_mlt');\n foreach ($aUserGroups as $sUserGroupId) {\n $this->AddMLTConnection('cms_usergroup_mlt', $sUserGroupId);\n }\n\n $aRoles = $oCmsUser->GetMLTIdList('cms_role', 'cms_role_mlt');\n foreach ($aRoles as $sRoleId) {\n $this->AddMLTConnection('cms_role_mlt', $sRoleId);\n }\n\n $aPortals = $oCmsUser->GetMLTIdList('cms_portal', 'cms_portal_mlt');\n foreach ($aPortals as $sPortalId) {\n $this->AddMLTConnection('cms_portal_mlt', $sPortalId);\n }\n }\n }\n }", "public function modify(User $user): bool {\n if ($user->is_super_admin) {\n return true;\n }else if ($user->tokenCan(['modify-registrations-dev', 'modify-registrations-stage', 'modify-registrations-prod'])) {\n return true;\n }else {\n return false;\n }\n }", "public function isUserAdmin()\n\t{\n\t if ($this->isAdmin()) {\n\t \treturn true;\n\t }\n\t \n\t $permissions = $this->group->permissions;\n\t \n\t return array_key_exists('system', $permissions)\n\t && in_array('user', $permissions['system']);\n\t}", "public function allowUser() {\n \t$level = -1;\n\t if ($this->userData !== null){\n\n\t $level = $this->userData->level;\n\n\t\t}\n\t\treturn $level;\n\t \n\t}", "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 getIsSuperAdminAttribute($value)\n {\n return $value == 1 ? true : false;\n }", "public function makeAdministrator()\n {\n $this->setRole('administrator');\n }", "public function testNormalUserShouldNotRevokeAdminStatus()\n {\n $user = factory(User::class)->make(['root_admin' => false]);\n $service = $this->getService();\n $service->setUserLevel(User::USER_LEVEL_USER);\n\n $this->repository->shouldReceive('update')->with($user->id, [])->once()->andReturnNull();\n\n $response = $service->handle($user, ['root_admin' => true]);\n $this->assertInstanceOf(Collection::class, $response);\n $this->assertTrue($response->has('model'));\n $this->assertTrue($response->has('exceptions'));\n }", "public function getSuperAdministrador()\n {\n return $this->superAdministrador;\n }", "protected function setupAdminUser()\n {\n $GLOBALS['current_user'] = \\BeanFactory::getBean('Users')->getSystemUser();\n }", "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 canManageUsers()\n {\n return true;\n }", "public function user_mode() {\n if( (!isset($_SESSION[\"admin\"][\"user_mode\"])) || ($_SESSION[\"admin\"][\"user_mode\"] != 1) ) {\n $_SESSION[\"admin\"][\"user_mode\"] = 1;\n } elseif($_SESSION[\"admin\"][\"user_mode\"] == 1) {\n $_SESSION[\"admin\"][\"user_mode\"] = 0;\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 procMenuAdminUpdateAuth()\n\t{\n\t\t$menuItemSrl = Context::get('menu_item_srl');\n\t\t$exposure = Context::get('exposure');\n\t\t$htPerm = Context::get('htPerm');\n\n\t\t$oMenuModel = getAdminModel('menu');\n\t\t$itemInfo = $oMenuModel->getMenuItemInfo($menuItemSrl);\n\t\t$args = $itemInfo;\n\n\t\t// Menu Exposure update\n\t\t// if exposure target is only login user...\n\t\tif(!$exposure)\n\t\t{\n\t\t\t$args->group_srls = '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$exposure = explode(',', $exposure);\n\t\t\tif(in_array($exposure, array('-1','-3')))\n\t\t\t{\n\t\t\t\t$args->group_srls = $exposure;\n\t\t\t}\n\n\t\t\tif($exposure) $args->group_srls = implode(',', $exposure);\n\t\t}\n\n\t\t$output = executeQuery('menu.updateMenuItem', $args);\n\t\tif(!$output->toBool())\n\t\t{\n\t\t\treturn $output;\n\t\t}\n\n\t\t// Module Access update\n\t\tunset($args);\n\t\t$oMenuAdminModel = getAdminModel('menu');\n\t\t$menuInfo = $oMenuAdminModel->getMenu($itemInfo->menu_srl);\n\n\t\t$oModuleModel = getModel('module');\n\t\t$moduleInfo = $oModuleModel->getModuleInfoByMid($itemInfo->url, $menuInfo->site_srl);\n\n\t\t$xml_info = $oModuleModel->getModuleActionXML($moduleInfo->module);\n\n\t\t$grantList = $xml_info->grant;\n\t\tif(!$grantList) $grantList = new stdClass;\n\n\t\t$grantList->access = new stdClass();\n\t\t$grantList->access->default = 'guest';\n\t\t$grantList->manager = new stdClass();\n\t\t$grantList->manager->default = 'manager';\n\n\t\t$grant = new stdClass;\n\t\tforeach($grantList AS $grantName=>$grantInfo)\n\t\t{\n\t\t\tif(!$htPerm[$grantName])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$htPerm[$grantName] = explode(',', $htPerm[$grantName]);\n\n\t\t\t// users in a particular group\n\t\t\tif(is_array($htPerm[$grantName]))\n\t\t\t{\n\t\t\t\t$grant->{$grantName} = $htPerm[$grantName];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// -1 = Log-in user only, -2 = site members only, 0 = all users\n\t\t\telse\n\t\t\t{\n\t\t\t\t$grant->{$grantName}[] = $htPerm[$grantName];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$grant->{$group_srls} = array();\n\t\t}\n\n\t\tif(count($grant))\n\t\t{\n\t\t\t$oModuleController = getController('module');\n\t\t\t$oModuleController->insertModuleGrants($moduleInfo->module_srl, $grant);\n\t\t}\n\n\t\t// recreate menu cache file\n\t\t$this->makeXmlFile($itemInfo->menu_srl);\n\t}", "function checkPermissions($userToCheck, $loggedInUser=null){\r\n\tif($loggedInUser == null){\r\n\t\t//...ask the session for the currently logged in user\r\n\t\t$loggedInUser = $_SESSION['userName'];\r\n\t}\r\n\t//If the logged in user is not the passed in user, and not a superuser...\r\n\tif(strcasecmp($loggedInUser, $userToCheck) != 0 && !isSuperUser($loggedInUser)){\r\n\t\t\t//This user did not enter the data and therefore may not edit it.\r\n\t\t\tdie (\"You do not have the rights to modify or remove this data.\");\r\n\t\t}\r\n}", "public function run()\n {\n if (!Role::whereName('Super Admin')->first()){\n Role::create(['name' => 'Super Admin', 'is_business' => 0, 'business_id' => 0, 'guard_name' => 'web']);\n }\n\n $user = User::first();\n $user->assignRole('Super Admin');\n\n $users = User::whereIsBusiness(1)->get();\n\n foreach ($users as $user){\n $role = optional(optional($user->business)->plan)->role;\n\n if ($role) {\n $user->assignRole($role);\n }\n }\n }" ]
[ "0.69079274", "0.6745763", "0.66878134", "0.65931726", "0.65859765", "0.6282568", "0.62758195", "0.6175562", "0.617072", "0.605698", "0.60408735", "0.60200965", "0.6015181", "0.6006418", "0.5982928", "0.5970617", "0.5950362", "0.5945626", "0.59228784", "0.587156", "0.58685124", "0.5867437", "0.58491427", "0.5840265", "0.5836741", "0.58307785", "0.58185923", "0.5817436", "0.57966244", "0.5795709", "0.5792313", "0.5766091", "0.57638276", "0.57589036", "0.5730993", "0.57058334", "0.5701342", "0.56987536", "0.5696066", "0.5687197", "0.56829226", "0.5682695", "0.5662218", "0.5661078", "0.5628905", "0.5627393", "0.5620538", "0.56164664", "0.56160927", "0.5601134", "0.5597266", "0.55925506", "0.5590241", "0.558796", "0.5580906", "0.5564447", "0.5564447", "0.5564447", "0.5564447", "0.5559597", "0.55584", "0.5554264", "0.55452543", "0.5543553", "0.55012447", "0.548559", "0.547963", "0.5472672", "0.5465785", "0.54647964", "0.5464429", "0.5460219", "0.5459549", "0.5453456", "0.5449781", "0.54255086", "0.54232806", "0.54162395", "0.5413438", "0.5382441", "0.53819513", "0.5377004", "0.5356958", "0.5353946", "0.5346086", "0.5338591", "0.53255457", "0.5314176", "0.53130823", "0.53093207", "0.53015405", "0.53011554", "0.52910405", "0.52751803", "0.5267948", "0.52575964", "0.52468073", "0.52443063", "0.5238985", "0.52266634" ]
0.6588281
4
Demotes the current user back to a normal user.
public function demoteToNormalUser() { $this->superUser = false; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unimpersonateUser()\n {\n $realId = $this->session->remove('__realId');\n if ($realId !== null) {\n $this->user->identity->remove();\n $this->session->set($this->user->idParam, $realId);\n $identity = User::findOne($realId);\n $this->user->setIdentity($identity);\n $this->restoreBackedUpToken();\n }\n }", "private function _setDefaultUser()\n {\n $user = User::getDefaultUser();\n Globals::setUser($user);\n Zend_Auth::getInstance()->clearIdentity();\n }", "private function clearLoggedUser() {\n\t\t$session = $this->getUserSession();\n\t\tif ($this->isAdmin()) {\n\t\t\t$session->setUser($this->getUserModel());\n\t\t} else {\n\t\t\t$session->setCustomer($this->getUserModel());\n\t\t}\n\t}", "public function unlogin() {\n\t\t\tif ($user = $this->authorisator->getUser()) {\n\t\t\t\t/* @var $user ILoginUserDigest */\n\t\t\t\t$user->dao()->merge($user->setLoginKey(null));\n\t\t\t\t$this->authorisator->dropUser();\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->session->isStarted()) {\n\t\t\t\t$this->session->assign($this->getLoginKeyParamName(), null);\n\t\t\t}\n\t\t}", "public function disconnetUser() {\n\t\tsession_start();\n\t\tunset($_SESSION['id_users']);\n\t\tunset($_SESSION['username']);\n\t\theader('Location: index.php');\n\t}", "protected function switchUserBack() {\n if ($this->isUserSwitched) {\n $this->accountSwitcher->switchBack();\n $this->isUserSwitched = FALSE;\n }\n }", "public function stopImpersonateUser(): void\n {\n $this->impersonateUser = null;\n }", "function logout_guestuser() {\n global $USER;\n if (isguestuser()) {\n foreach ($USER as $key => $val) {\n unset($USER->{$key});\n }\n $USER->id = 0;\n }\n}", "public function reset()\n {\n $this->values[self::_USER] = null;\n }", "public function reset()\n {\n $this->values[self::_USER] = null;\n }", "public function reset()\n {\n $this->values[self::_USER] = null;\n }", "function disconnect_user() {\n\tunset( $_SESSION['GHOME'] );\n\tunset( $_SESSION['GHOME_CUSER'] );\n}", "protected function teardown() {\n User::delete($this->state[\"user\"]->id);\n }", "protected function teardown() {\n User::delete($this->state[\"user\"]->id);\n }", "public function logoutUser()\n {\n // Unset session-key user\n $this->di->get(\"session\")->delete(\"my_user_id\");\n $this->di->get(\"session\")->delete(\"my_user_name\");\n //$this->di->get(\"session\")->delete(\"my_user_password\");\n $this->di->get(\"session\")->delete(\"my_user_email\");\n //$this->di->get(\"session\")->delete(\"my_user_created\");\n //$this->di->get(\"session\")->delete(\"my_user_updated\");\n //$this->di->get(\"session\")->delete(\"my_user_deleted\");\n //$this->di->get(\"session\")->delete(\"my_user_active\");\n $this->di->get(\"session\")->delete(\"my_user_admin\");\n }", "public static function logoutUser( ) {\r\n self::$database->update(\"UPDATE users set sid=? where sid=?\", \r\n \"\", session_id());\r\n session_destroy();\r\n }", "function LogOut() {\n\t\tunset($user);\n\t\t$loggedIn=false;\n\t}", "protected function setupAdminUser()\n {\n $GLOBALS['current_user'] = \\BeanFactory::getBean('Users')->getSystemUser();\n }", "public function closeUser()\n {\n $this->isUser = false;\n }", "static function momentDisconect()\r\n {\r\n $user = self::getCurrentUser();\r\n\r\n if ($user !== NULL)\r\n {\r\n $user->setOffline(1);\r\n self::updateUser($user);\r\n }\r\n }", "public static function logOutUser($compat_mode = false)\n\t{\n\t\tself::$instance->loadUserById(0, true, '');\n\t\tself::reloadByUser(self::$instance, $compat_mode);\n\t}", "public function logoutUser() {\r\n\t\t$this->coreAuthenticationFactory->logoutUser ();\r\n\t}", "public static function refreshUser() {\n\t\t$user = self::getUser();\n\t\t\n\t\t$refreshedUser = db_UserManager::getInstance()->find($user['id']);\n\t\t\n\t\tself::setUser($refreshedUser);\n\t}", "function logout()\n {\n $user = $this->getAuthenticatedUser();\n if (!$user) return;\n\n unset($_SESSION['MFW_authenticated_user']);\n }", "function different_user() {\n $this->destroy_session_and_data();\n echo \"Ввойдите занова\";\n }", "public function getCurrentUser()\n {\n $userId = Security::getUserId();\n if (!empty($userId)) {\n $this->uid = $userId;\n }\n }", "public function logoff() {}", "public function logoff() {}", "public function logoff() {}", "public function closeUser ()\n\t{\n\t\t$this->_username = null;\n\t}", "public function logout_user() {\n\t\tif(isset($_SESSION['eeck'])) {\n\t\t\tunset($_SESSION['eeck']);\n\t\t}\n\t}", "public function logoutUser() {\n $this->session->unsetSession(self::$storedUserId);\n $this->session->setFlashMessage(2);\n self::$isLoggedIn = false;\n }", "function beSelf(){\r\n\t\t$_SESSION['userid'] = $_SESSION['realUserId'];\r\n\t\t$_SESSION['roleid'] = $_SESSION['realRoleId'];\r\n\t\tunset( $_SESSION['realRoleId'] );\r\n\t\tunset( $_SESSION['realUserId'] );\r\n\t}", "static function logout() {\n self::forget(self::currentUser());\n unset($_SESSION['userId']);\n session_destroy();\n }", "public function logout()\r\n\t{\r\n\t\tif(!$this->loggedIn()) return;\r\n\t\t$query = 'UPDATE users SET fingerprint=NULL WHERE id=' . $this->user->id . ' LIMIT 1';\r\n\t\tmysql_query($query);\r\n\t\tsetcookie('qw_login', '', time()-60*60*24, '/');\r\n\t\tsetcookie('tree_grid_cookie', '', time()-60*60*24, '/');\r\n\t\t$this->user = false;\r\n\t}", "public function clear_virtual_user_id();", "public function disablePostAuthentication()\n {\n $this->sessionStorage->user['twofactor_activated'] = false;\n }", "function json_oauth_force_reauthentication() {\n\tif ( is_user_logged_in() ) {\n\t\t// Another handler has already worked successfully, no need to\n\t\t// reauthenticate.\n\n\t\treturn;\n\t}\n\n\t// Force reauthentication\n\tglobal $current_user;\n\t$current_user = null;\n\tget_currentuserinfo();\n}", "public function profileLogout()\n {\n unset($this->getApp()->getSession()->BRACP_PROFILE_ID);\n self::$loggedUser = null;\n }", "public function destroy() {\n\t\t\t$this->session->unset('user');\n\t\t}", "public function getCurrentUser();", "public function tearDown() {\n User::find($this->user_id)->delete();\n }", "public function logoff();", "public function Logout() {\n\n $cookie = json_decode(\\FluitoPHP\\Request\\Request::GetInstance()->\n Cookie($this->\n config['id']), true);\n\n if (isset($cookie['salt_id'])) {\n\n $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n Delete($this->\n GetPrefix() . 'usersalt', array(\n array(\n 'column' => 'salt_id',\n 'operator' => '=',\n 'rightvalue' => $cookie['salt_id']\n )\n ))->\n Query();\n\n \\FluitoPHP\\Response\\Response::GetInstance()->\n SetCookie($this->\n config['id'], '', 0, '', '', false, true);\n }\n\n $this->\n currentUser = null;\n }", "public static function getDefaultPurse($user);", "public function getGuestUser() {\n\t\t\treturn null;\n\t\t}", "function pnUserLogOut()\r\n{\r\n list($dbconn) = pnDBGetConn();\r\n $pntable = pnDBGetTables();\r\n\r\n if (pnUserLoggedIn()) {\r\n // Reset user session information (new table)\r\n $sessioninfocolumn = &$pntable['session_info_column'];\r\n $sessioninfotable = $pntable['session_info'];\r\n $query = \"UPDATE $sessioninfotable\r\n SET $sessioninfocolumn[uid] = 0\r\n WHERE $sessioninfocolumn[sessid] = '\" . pnVarPrepForStore(session_id()) . \"'\";\r\n $dbconn->Execute($query);\r\n\r\n pnSessionDelVar('rememberme');\r\n pnSessionDelVar('uid');\r\n }\r\n}", "public function __destruct()\n\t{\n\t\tApp::user()->setToSession();\n//\t\tApp::user()->setToCookie();\n\t}", "function wp_revoke_user($id)\n {\n }", "public static function getCurrentUser();", "function clear_auth_cookie_clear_online_user() {\n\t\t$userinfo = wp_get_current_user();\n\n\t\tif ( ! empty( $userinfo->ID ) ) {\n\t\t\t$this->clear_online_user( $userinfo->ID );\n\t\t}\n\t}", "function user_logout(){\n $_SESSION['user'] = '';\n}", "public function logOut()\n {\n $auth = new AuthenticationService();\n\n if ($auth->hasIdentity()) {\n Session::getDefaultManager()->forgetMe();\n $auth->clearIdentity();\n }\n }", "public function resetAuthentication()\n\t{\n\t\t$this->_authentication = false;\n\t}", "public function unimpersonate()\n {\n $adminEmail = $this->impersonateService->getStorage()->read();\n $userEmail = $this->authService->getStorage()->read();\n\n $this->impersonateService->getStorage()->clear();\n $this->authService->getStorage()->write($adminEmail);\n\n $this->getEventManager()->trigger(ImpersonateEvents::EVENT_NAME_UNIMPERSONATE, $this, [\n [\n 'admin' => $adminEmail,\n 'user' => $userEmail,\n ],\n sprintf(ImpersonateEvents::EVENT_MESSAGE_UNIMPERSONATE, $userEmail, $adminEmail),\n Logger::NOTICE\n ]);\n\n return true;\n }", "function user_logging_out($user_id) {\n \n }", "public function deleteUser()\n {\n $this->delete();\n }", "public static function logOut()\r\n {\r\n (new Session())->remove(static::$userIdField);\r\n }", "public function destroy()\n {\n $userId = Helper::getIdFromUrl('user');\n \n if ((Helper::checkUrlIdAgainstLoginId($userId)) !== 'super-admin') {\n Usermodel::load()->destroy($userId);\n } else { \n View::render('errors/403.view', [\n 'message' => 'You cannot delete yourself!',\n ]);\n }\n }", "function userSignOut() {\n\t@session_start();\t//Start the session with no warning in case it already exists\n\n\t//Just clear all login session variables\n\tunset($_SESSION['userId']);\n\tunset($_SESSION['username']);\n\tunset($_SESSION['password']);\n}", "public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }", "public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }", "public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }", "public function Logoff();", "function revoke_super_admin($user_id)\n {\n }", "public function destroy() {\n\t\t$guestUser = new User();\n\t\t$guestUser->setRole(User::ROLE_GUEST);\n session_destroy();\n\t\treturn $guestUser;\n\t}", "public function logout(): void\n\t{\n\t\t/** @var \\App\\Models\\User $user */\n\t\t$user = Auth::user();\n\t\tLog::channel('login')->info(__METHOD__ . ':' . __LINE__ . ' -- User (' . $user->username . ') has logged out.');\n\t\tAuth::logout();\n\t\tSession::flush();\n\t}", "function reset ()\r\n {\r\n $this->_log->trace(\"resetting User\");\r\n\r\n $this->set_id(USER_ID_RESET_VALUE);\r\n $this->set_name(USER_NAME_RESET_VALUE);\r\n $this->set_current_list_name(\"\");\r\n $this->set_lang(LANG_EN);\r\n $this->set_date_format(DATE_FORMAT_EU);\r\n $this->set_decimal_mark(DECIMAL_MARK_POINT);\r\n $this->set_lines_per_page(12);\r\n $this->set_theme(THEME_BLUE);\r\n $this->set_can_create_list(\"0\");\r\n $this->set_can_create_user(\"0\");\r\n $this->set_is_admin(\"0\");\r\n $this->set_times_login(\"0\");\r\n $this->set_login(\"0\");\r\n $_SESSION[\"list_states\"] = $this->_json->encode(array());\r\n }", "public function logOut(){\n $this->authToken=\"\";\n $this->loggedUser=\"\";\n $this->clearAuthCookie();\n }", "public static function logout() {\n\t\t\tself::initialize();\n\t\t\tself::$customer = NULL;\n\t\t\t// to prevent any shennanegans in case a user logs out in the middle of checking out\n\t\t\t// need to update to properly transition into guest/anonymous checkout\n\t\t\t$_SESSION['user'] = NULL;\n\t\t\tunset($_SESSION['user']);\n\t\t\tredirect('/customer');\n\t\t}", "function user_logging_out($user_id)\n\t{\n\t}", "public function logoutUser() {\n $this->debugPrint(\"Logging out user...\");\n\n if ($this->auth_http_method == 'DIGEST')\n $data = $this->parseDigest($_SERVER['PHP_AUTH_DIGEST']);\n\n if ($this->session_check_method == 'BOTH' || $this->session_check_method == 'NONCE' && !empty($data))\n $this->{$this->nonce_expire_function}($data['nonce']);\n if ($this->session_check_method == 'BOTH' || $this->session_check_method == 'COOKIE') {\n session_start();\n $_SESSION['lastseen'] = time() - ($this->cookie_expire + 3600 );\n }\n if ($this->redirect_on_logout) {\n echo <<<EOF\n <html>\n <meta http-equiv=\"refresh\" content=\"0; url={$this->redirect_on_logout_url}?error=2\" />\n <body><h2>{$this->logout_text}</h2></body>\n </html>\nEOF;\n } else {\n echo \"<html><body><h2>{$this->logout_text}</h2></body></html>\";\n }\n exit();\n }", "public function restoring(User $user)\n {\n //\n }", "public function tearDown()\n\t{\n\t\t$user = User::withTrashed()->where('_id', $this->testUser->_id)->first()->forceDelete();\n\t\t$this->testUser = array();\n\t}", "public static function unsetAdministrator($userId) {\n $sql = \"DELETE FROM Administrators WHERE id = \" . $userId;\n return parent::insertDatabase($sql);\n }", "function initilize_logout(){\r\n\t\tredirect('auth/initilize_logout');\r\n\t\tif (is_logged_in_user()) {\r\n\t\t\t$this->general_model->update_login_manager($this->session->userdata(LOGIN_POINTER));\r\n\t\t\t$this->session->unset_userdata(array(AUTH_USER_POINTER => '',LOGIN_POINTER => '') );\r\n\t\t\t// added by nithin for unseting the email username\r\n\t\t\t$this->session->unset_userdata('mail_user');\r\n\t\t}\r\n\t}", "function getUser() {\r\n\t\treturn false;\r\n\t}", "function admin_logout() {\r\n\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERID');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERNAME');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USEREMAIL');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERTYPE');\r\n $this->redirect(DEFAULT_ADMINURL);\r\n }", "public function dedicate(){ // only use during install\n global $USER;\n checkCapabilities('install:dedicate', $USER->role_id);\n $db = DB::prepare('UPDATE users SET creator_id = ?');\n return $db->execute(array($this->creator_id));\n }", "public function clearUserDropAward($uid)\n\t{\n\t $sql = \"UPDATE casino_user SET status=-1 WHERE status=0 AND uid=:uid \";\n\t $this->_wdb->query($sql,array('uid' => $uid));\n\t}", "public function logOff();", "protected function set_current_user()\n\t{\n\t\tif (class_exists('Auth'))\n\t\t{\n\t\t\t// Load our current logged in user for convenience\n\t\t\tif ($this->auth->is_logged_in())\n\t\t\t{\n\t\t\t\t$this->current_user = clone $this->auth->user();\n\n\t\t\t\t$this->current_user->user_img = gravatar_link($this->current_user->email, 22, $this->current_user->email, \"{$this->current_user->email} Profile\");\n\n\t\t\t\t// if the user has a language setting then use it\n\t\t\t\tif (isset($this->current_user->language))\n\t\t\t\t{\n\t\t\t\t\t$this->config->set_item('language', $this->current_user->language);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Make the current user available in the views\n\t\t\tif (!class_exists('Template'))\n\t\t\t{\n\t\t\t\t$this->load->library('Template');\n\t\t\t}\n\t\t\tTemplate::set('current_user', $this->current_user);\n\t\t}\n\t}", "public static function setDefaultPurse($user, $purse);", "Public Function RestoreUser($ID)\n\t{\n\t\t$Data = array('deleted'=>0);\n\t\t$this->_db->update('bevomedia_user', $Data, 'id = ' . $ID);\n\t\t$this->_db->update('bevomedia_user_info', $Data, 'id = ' . $ID);\n\t}", "public function detachUser($user, $reload = true);", "function desactivar_authuser($id)\n\t{\n\t\t$query = \"UPDATE authuser set status=0 WHERE id = $id'\";\n\t\t$result=mysql_query($query);\n\t\treturn $result;\n\t}", "protected function tearDown()\n\t{\n\t\tparent::tearDown ();\n\t\tEnUser::release();\n\t\tRPCContext::getInstance()->resetSession();\n\t\tRPCContext::getInstance()->unsetSession('global.uid');\n\t}", "protected function tearDown()\n\t{\n\t\tparent::tearDown ();\n\t\tEnUser::release();\n\t\tRPCContext::getInstance()->resetSession();\n\t\tRPCContext::getInstance()->unsetSession('global.uid');\n\t}", "public function signOut() {\n\n $this->getAttributeHolder()->removeNamespace('sfGuardSecurityUser');\n $this->user = null;\n $this->clearCredentials();\n $this->setAuthenticated(false);\n $expiration_age = sfConfig::get('app_sf_guard_plugin_remember_key_expiration_age', 15 * 24 * 3600);\n $remember_cookie = sfConfig::get('app_sf_guard_plugin_remember_cookie_name', 'sfRemember');\n sfContext::getInstance()->getUser()->setAttribute('view', '');\n sfContext::getInstance()->getResponse()->setCookie($remember_cookie, '', time() - $expiration_age);\n }", "function system_delete_user($uid)\n{\n}", "public function declineMembership(KittyInterface $kitty, UserInterface $user);", "public function logoff()\n\t{\n\t\t$this->session->sess_destroy();\n\t\tredirect(base_url());\n\t}", "public function logout()\n {\n $this->webUser = false;\n $this->refresh();\n \\Bdr\\Vendor\\Database::logout();\n }", "public function simulateUser() {}", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }" ]
[ "0.7529753", "0.69122195", "0.6704955", "0.65128493", "0.64253587", "0.6311096", "0.62500435", "0.6101565", "0.5996663", "0.5996663", "0.59962934", "0.59714663", "0.5932396", "0.5932396", "0.5878607", "0.5861854", "0.5861407", "0.5794638", "0.57779634", "0.577666", "0.5724945", "0.5714239", "0.5704189", "0.5695705", "0.5685004", "0.5665921", "0.565491", "0.56544316", "0.56539136", "0.5653351", "0.56326735", "0.5620592", "0.5619028", "0.5614902", "0.5603597", "0.55876136", "0.5581938", "0.5578839", "0.55676043", "0.55579025", "0.55522734", "0.5539615", "0.552899", "0.5526278", "0.5498044", "0.5491616", "0.5479564", "0.54734296", "0.5465317", "0.5463445", "0.5460963", "0.54603696", "0.5456952", "0.5454015", "0.54416746", "0.54387945", "0.54383284", "0.5433348", "0.54289156", "0.54281694", "0.5410237", "0.5410237", "0.5410237", "0.5408856", "0.5405204", "0.5399999", "0.53962815", "0.53923243", "0.53914756", "0.53877705", "0.53849", "0.53818536", "0.5381454", "0.5381262", "0.5380829", "0.5380625", "0.5378586", "0.5375695", "0.53665274", "0.5361407", "0.5360233", "0.5357478", "0.5351805", "0.53442526", "0.53417695", "0.5338791", "0.5338774", "0.5338774", "0.5329344", "0.532651", "0.531985", "0.53195757", "0.5319192", "0.5318211", "0.53181314", "0.53181314", "0.53181314", "0.53181314", "0.53181314", "0.53181314" ]
0.66805047
3
Checks if this user is a super user.
public function isSuperUser() { return $this->superUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSuperUser()\n\t{\n\t\treturn $this->hasPermission('superuser');\n\t}", "public function isSuper(): bool\n {\n return $this->hasRole('super');\n }", "public function isSuper() {\n\t\treturn ($this->isAdmin() || $this->Session->read('Acl.isSuper'));\n\t}", "public static function isSuper(){\n if ( isset($_SESSION['super']) && ($_SESSION['super'] == 1)){\n return true;\n } else {\n return false;\n }\n }", "public function isSuperuser($userId)\n\t{\n\t\t$assignments = $this->_authManager->getAuthAssignments($userId);\n\t\treturn isset($assignments[ $this->superuserName ]);\n\t}", "public function isSuperAdmin()\n {\n return ($this->hasRole(HakAkses::SUPER_ADMIN));\n }", "function isSuperAdmin() {\n return ((int) $this->curUserInfo->is_admin == 1) ? true : false;\n }", "public function isSuperAdmin()\n {\n return ('superadmin' == $this->role);\n }", "public function isSuperAdmin() : bool\n\t{\n\t\tif ($this->id == VENUS_SUPER_ADMIN_ID) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function getIsSuperAdmin()\r\n\t{\r\n\t\tif($this->isGuest) return false;\r\n\t\treturn isset($this->superAdmins[$this->identity->username]);\r\n\t}", "public function isSuperAdmin() {\n return $this->getGuardUser() ? $this->getGuardUser()->getIsSuperAdmin() : false;\n }", "public function isSuperAdmin()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getIsSuperAdmin() : false;\r\n }", "private function isSuperAdmin()\n {\n return $this->authorizationChecker->isGranted('ROLE_SUPER_ADMIN');\n }", "function getIsSuperAdmin(){\r\n\t\tif(!isset($this->user->permissions))\r\n\t\t\treturn false;\r\n\t\treturn ($this->user && $this->user->permissions>=11);\r\n\t}", "public function isSuperAdmin() {\n return $this->admin == 2;\n }", "protected function isSuperAdmin(): bool {\n\t\treturn true;\n\t}", "public function isSuperAdmin()\n {\n return in_array($this->type, [self::SUPER_ADMIN_TYPE]);\n }", "public function isSuperUser($user)\n {\n return $this->hasRoles($user, [Role::label(Role::SUPER_USER)]);\n }", "private function isLoggedInAsSuper($request)\n {\n return ($request->session()->has('super') || $request->user()->isSuper());\n }", "public static function isSuperUser($user){\n\t\t$email = $user;\n\t\tif(is_object($user) && get_class($user) == \"User\"){\n\t\t\t$email = $user->getEmail();\n\t\t}\n\t\treturn in_array($email, array(\n\t\t\t\"[email protected]\",\n\t\t\t\"[email protected]\",\n\t\t\t\"[email protected]\"\n\t\t));\n\t}", "function is_superadmin()\n{\n\tif (! is_login()) {\n\t\treturn false;\n\t}\n\n\tif (isset($_SESSION['_user_role']) &&\n\t\t$_SESSION['_user_role'] == '100'\n\t) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public static function isSuperModerator() {\n return (int)$_SESSION['user']['supermoderator'] === 1;\n }", "public function getIsSuperAdminAttribute()\n {\n return $this->hasRole(Role::superAdmin());\n }", "function isSuperAdmin(){\n\t\tif(isset($_SESSION['type']) && $_SESSION['type']=='superadmin'){\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function isAllowed() {\n\t\tif (!$this->session->has('auth')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = User::findFirst(array('username' => $this->session->get('auth')));\n\n\t\treturn $user->getSuperUser() ? true : false;\n\t}", "function is_super_admin($user_id = \\false)\n {\n }", "public static function isSuperAdmin($userId){\n return self::isRole($userId,'roleSuperAdmin');\n }", "public function isSuperAdmin();", "function ucdmanager_isSuperadmin($uid=null) {\n\t$user_account = null;\n\tif ( $uid ) {\n\t\t$user_account = user_load($uid);\n\t}\n\t// return user_access('bypass node access', $user_account);\n\treturn user_access('administer nodes', $user_account);\n}", "public function isSuperAdmin(){\r\n if($this->user_type == 'SuperAdmin'){\r\n return true;\r\n }\r\n return false;\r\n}", "public function is_super_admin($username) {\r\n\t\t\t$query = 'SELECT `category_name` FROM `user_rights` WHERE `username` = :username AND `category_name`=:Super_Administrator';\r\n\t\t\t$statement = $this->con->prepare($query);\r\n\t\t\t$statement->bindValue(':username', $username);\r\n\t\t\t$statement->bindValue(':Super_Administrator', 'Super_Administrator');\r\n\t\t\t\r\n\t\t\t$statement->execute();\r\n\t\t\t$valid = ($statement->rowCount() == 1);\r\n\t\t\t$statement->closeCursor();\r\n\t\t\treturn $valid;\r\n\t\t}", "function subsite_manager_is_superadmin($user_guid = 0){\n static $superadmin_cache;\n\n $result = false;\n\n $user_guid = sanitise_int($user_guid, false);\n\n if(empty($user_guid)){\n $user_guid = elgg_get_logged_in_user_guid();\n }\n\n if(!empty($user_guid)){\n if(!isset($superadmin_cache)){\n $superadmin_cache = array();\n }\n\n if(!isset($superadmin_cache[$user_guid])){\n $superadmin_cache[$user_guid] = false;\n\n $query = \"SELECT value\";\n $query .= \" FROM \" . get_config(\"dbprefix\") . \"private_settings\";\n $query .= \" WHERE name = 'superadmin'\";\n $query .= \" AND entity_guid = \" . $user_guid;\n\n if ($setting = get_data_row($query)) {\n if($setting->value == true){\n $superadmin_cache[$user_guid] = true;\n }\n }\n }\n\n $result = $superadmin_cache[$user_guid];\n }\n\n return $result;\n }", "private function isUser() : bool\n {\n return $this->role('user');\n }", "function isSuperUser($active=true){\n $user=(isset($_SESSION[\"superuser\"])? $_SESSION[\"superuser\"] : $_SESSION[\"onlineuser\"]);\n if (isset($user)&&$user->isSuperAdmin()){\n\tif (!isset($_SESSION[\"superuser\"])){\n\t $_SESSION[\"superuser\"]=$_SESSION[\"onlineuser\"];\n\t}\n\t\n\tif ($active){\n\t return $_SESSION[\"superuser\"];\n\t} else {\n\t return true;\n\t}\n\t\n } else {\n\tif ($active){\n\t //$_SESSION[\"redirect\"]=$_SERVER[\"PHP_SELF\"];\n\t $_SESSION[\"redirect\"]= $_SERVER[\"REQUEST_URI\"];\n\t header(\"Location: logout.php\");\n\t exit;\n\t} else {\n\t return false;\n\t}\n } \n}", "public function isUser()\n\t{\n\t\tif( $this->permission != array_search( 'user', $this->permissions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public function isJoomlaSuperAdmin(JUser $user) {\n\t\treturn $user->authorise('core.admin', 'root.1');\n }", "public function isJoomlaSuperAdmin() {\n return $this->authorise('core.admin', 'root.1');\n }", "function user_AuthIsUser() {\n\tglobal $AUTH;\n\t\n\treturn isset($AUTH['user']) && ($AUTH['user'] !== 0);\n}", "public function isSystemUser(): bool\n {\n return $this->system;\n }", "public function okay_user($user)\n {\n if (!Session::get('superadmin') && ($user->type == 'superadmin' || $user->type == 'admin')) return false;\n return true;\n }", "private function isSuperUser($feide_email, $subscriber_details) {\n\n\t\t\tif($subscriber_details == false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// UNINETT employees super users by default\n\t\t\tif(strtolower(end(explode('@', $feide_email))) == 'uninett.no') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// If \"teknisk kontakt\" with priority == 1 in Kind\n\t\t\tif(@strtolower($subscriber_details->contact_person->e_post) == strtolower($feide_email)) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t//\n\t\t\treturn false;\n\t\t}", "private function __allowSuperAdminOnly() {\n\t\t$isSuperAdmin = $this->_isSuperAdmin();\n\t\tif ($isSuperAdmin === false) {\n\t\t\t$this->redirect('/admin/users/accessDenied');\n\t\t}\n\t}", "public function isUserAdmin()\n\t{\n\t if ($this->isAdmin()) {\n\t \treturn true;\n\t }\n\t \n\t $permissions = $this->group->permissions;\n\t \n\t return array_key_exists('system', $permissions)\n\t && in_array('user', $permissions['system']);\n\t}", "protected function isAdminUser() {}", "function checkPermissions() {\n \t//If blog owner or super user\n \t$current_user = wp_get_current_user();\n\t\tif(is_super_admin() || (get_bloginfo('admin_email') === $current_user->user_email)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isAdmin()\n {\n return $this->isSuperUser() || $this->isMemberOf('admin');\n }", "public function isUserAdmin()\n\t{\n\t\treturn (Bn::getValue('user_type') == 'A');\n\t}", "protected function inSuperAdminGroup(UserInterface $user)\n {\n $allowed = false;\n\n try {\n $group = $this->getSentry()->getGroupProvider()->findByName('Super Admin');\n\n if ($user->inGroup($group))\n $allowed = true;\n\n unset($group);\n } catch (GroupNotFoundException $e) {}\n\n return $allowed;\n }", "public function hasuser()\n {\n return is_object($this->luser);\n }", "function is_SuperAdmin(){\r\n\tif ( $_SESSION['quickname']==\"accounts\" AND (substr($_SERVER['PHP_SELF'], -16) != 'admin_logout.php') && $_SESSION['cid']==1) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}", "public function getIsSuperAdminAttribute($value)\n {\n return $value == 1 ? true : false;\n }", "public function create(User $user)\n {\n return $user->isSuperAdmin();\n }", "public function hasUser()\n {\n return $this->getUser() !== null;\n }", "public function isSuper()\n {\n return $this->isConfigurable() || $this->isGrouped();\n }", "public function view(User $user)\n {\n return $user->isSuperAdmin();\n }", "function isUserAdmin() {\r\n $user = $_SESSION['user'];\r\n return checkAdminStatus($user);\r\n }", "public function is_admin()\n\t{\n\t\t$user = $this->get_current_user();\n\t\tif($user !== NULL)\n\t\t{\n\t\t\tif($user['auth'] == 255)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function checkIsAdmin()\n {\n return $this->user_admin;\n }", "public function isGuest()\n {\n return !$this->validateUser();\n }", "public function isTestUser() {\n $retVal = false;\n\n if (strtolower($this->username) == 'appletest') {\n $retVal = true;\n }\n\n return $retVal;\n }", "public function show(User $user)\n {\n return $user->isSuperAdmin();\n }", "public function is_user_auth(){\n if($this->user_id==auth()->user()->id){\n return true;\n }else{\n return false;\n }\n }", "public function isAdmin()\n {\n return $this->hasRole(static::ROLE_SUPER_ADMIN) || $this->hasRole(static::ROLE_ADMIN);\n }", "static public function isUser(){\n if ( isset($_SESSION['id']) && $_SESSION['id'] != 0 ) {\n return true;\n } else {\n return false;\n }\n }", "function validAdminUser( $user_session ) {\n\t$ValidUser = 0;\n\t\n\tif ( array_key_exists( 'idn_super_admin', $user_session ) ) {\n\t\tif ( $user_session[ 'idn_super_admin' ] == 1 ) $ValidUser = 1;\n\t}\n\n\tif ( $ValidUser == 0 ) {\n\t\treturn FALSE;\n\t}\n\t\n\treturn TRUE;\n}", "protected function _is_super_admin($member)\n {\n $user_level = $this->get_member_row_field($member, 'usergroup');\n if ($user_level == 4) {\n return true;\n }\n return false;\n }", "public static function isAuth() {\r\n if (isset($_SESSION['username']) && (($_SESSION['authorized'] == 'ADMIN')\r\n OR ($_SESSION['authorized'] == 'SUPERUSER')\r\n OR ($_SESSION['authorized'] == 'MEMBER')))\r\n return true;\r\n }", "protected function isCurrentUserAdmin() {}", "protected function isCurrentUserAdmin() {}", "public static function hasUser()\n\t\t{\n\t\t\tif (!Yii::$app instanceof Application)\n\t\t\t\treturn FALSE;\n\n\t\t\tif (!Yii::$app->db->getTableSchema(User::tableName()))\n\t\t\t\treturn FALSE;\n\n\t\t\ttry {\n\t\t\t\t$identityClass = Yii::$app->user->identityClass;\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$identityClass = FALSE;\n\t\t\t}\n\n\t\t\tif (!$identityClass)\n\t\t\t\treturn FALSE;\n\n\t\t\treturn !Yii::$app->user->isGuest;\n\t\t}", "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 hasAdminUser()\n {\n try {\n $statement = $this->connection->query('SELECT COUNT(*) AS count FROM tl_user WHERE admin=1');\n\n if ($statement->fetch(\\PDO::FETCH_OBJ)->count > 0) {\n return true;\n }\n } catch (DBALException $e) {\n // ignore\n }\n\n return false;\n }", "private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function setSuper($user, $super = true);", "function is_user()\n\t{\n\n\tif ($this->session->userdata('user') == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\telse\n\t\t{\n\t\t\treturn true;\n\n\t\t}\n\n\t}", "function isAdmin(){\n\t\treturn ($this->userlevel == ADMIN_LEVEL || $this->username == ADMIN_NAME);\n\t}", "function isUser(){\n\t\tif(isset($_SESSION['type']) && $_SESSION['type']=='user')\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public function _isAdmin() {\n\t\t$user_id = $this->Auth->user('id');\n\t\t$aro = array('model' => 'User', 'foreign_key' => $user_id); \n\t\t$aco = 'role/super/admin';\n\t\treturn $this->Acl->check($aro, $aco);\n\t}", "public function isSuper();", "function es_superadmin()\n{\n if(Auth::user()->perfil_id == 4)\n {\n return true;\n }else{\n return false;\n }\n}", "public function guest() {\n\t\t\t// If user has session, return false\n\t\t\tif ($this->session->has('user')) return false;\n\t\t\t// If user is Authed return fales\n\t\t\tif ($this->auth()) return false;\n\t\t\t// Else, return true\n\t\t\treturn true;\n\t\t}", "public function create(User $user)\n {\n return $user->isAdmin() || $user->isSupervisor();\n }", "public function create(User $user)\n {\n return $user->isAdmin() || $user->isSupervisor();\n }", "public function mustbeuser()\n {\n if (!$this->hasuser())\n {\n $this->web()->noaccess();\n }\n }", "public function isAdmin() : bool\n\t{\n\t\tif ($this->isSuperAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->loadUsergroups();\n\t\tif (in_array(App::USERGROUPS['admins'], $this->usergroup_ids)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isSupervisor() {\n\t\tif ($this->getLevelId() == 1)\n\t\t\treturn true;\n\t\t$groups = $this->getGroups();\n\t\tforeach ($groups as $group){\n\t\t\tif ($group->getGroupId() == 1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isAdmin() {\n return ($this->userlevel == ADMIN_LEVEL ||\n $this->username == ADMIN_NAME);\n }", "function isAdmin(){\r\n\r\n\t\tif($this->user_type == 'Admin'){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function isAdmin()\n {\n return ($this->username === \"admin\");\n }", "protected function userIsAdmin ()\n {\n $tokenHeader = apache_request_headers();\n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm);\n\n if($datosUsers->nombre==\"admin\")\n {\n return true;\n }\n else\n {\n return false;\n } \n }", "public function destroy(User $user)\n {\n return $user->isSuperAdmin();\n }", "public function create(User $user)\n {\n if($user->role=='super_admin')\n return false;\n return true;\n }", "public static function currentUserisParent()\n {\n return (check_user_role('parent')) ? true : false;\n }", "public function isSystem()\n {\n return $this->getAttribute('id') == self::SYSTEM_USER_ID;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "private function wf_user_permission(){\n\t\t$current_user = wp_get_current_user();\n\t\t$user_ok = false;\n\t\tif ($current_user instanceof WP_User) {\n\t\t\tif (in_array('administrator', $current_user->roles) || in_array('shop_manager', $current_user->roles)) {\n\t\t\t\t$user_ok = true;\n\t\t\t}\n\t\t}\n\t\treturn $user_ok;\n\t}", "public static function check_superadmin($url='../'){\n\t\tself::check_auth();\n\n\t\tif(!Session::has('user') || (Session::has('user') && !Auth::isSuperAdmin())){\n\t\t\tView::redirect($url,['danger'=>'شما اجازه دسترسی به این صفحه را ندارید']);\n\t\t}\n\t}", "public function is_developer() {\n\t\treturn $this->user->exists() && in_array(self::DEVELOPER_ROLE_NAME, $this->user->roles);\n\t}", "protected function isPowerUser()\n {\n return $this->user->can('sys_properties_edit', $this->app->modules[$this->area]);\n }", "protected function user_authorized()\n\t{\n\t\t// If the user has the super role, then allow access\n\t\t$super_role = Kohana::config('acl.super_role');\n\t\tif ($super_role AND in_array($super_role, $this->user->roles_list()))\n\t\t\treturn TRUE;\n\t\t// If the user is in the user list, then allow access\n\t\tif (in_array($this->user->id, $this->rule['users']))\n\t\t\treturn TRUE;\n\t\t\t\n\t\t// If the user has all (AND) the capabilities, then allow access\n\t\t$difference = array_diff($this->rule['capabilities'], $this->user->capabilities_list());\n\t\tif ( ! empty($this->rule['capabilities']) AND empty($difference))\n\t\t\treturn TRUE;\n\n\t\t// If there were no capabilities allowed, check the roles\n\t\tif (empty($this->rule['capabilities']))\n\t\t{\n\t\t\t// If the user has one (OR) the roles, then allow access\n\t\t\t$intersection = array_intersect($this->rule['roles'], $this->user->roles_list());\n\t\t\tif ( ! empty($intersection))\n\t\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}" ]
[ "0.8656607", "0.8067006", "0.7806444", "0.7735465", "0.7717412", "0.7711298", "0.7690409", "0.7686475", "0.76703", "0.7548985", "0.7546685", "0.75208914", "0.7514398", "0.7484136", "0.74354565", "0.74181664", "0.7391688", "0.7342893", "0.73301756", "0.72911024", "0.7204467", "0.7179951", "0.71788913", "0.70450824", "0.70068353", "0.70052147", "0.6923989", "0.68912697", "0.6833097", "0.6790496", "0.67539155", "0.6711759", "0.66691583", "0.662905", "0.6575942", "0.65550995", "0.6459369", "0.6456695", "0.64140886", "0.6360949", "0.63384104", "0.63344663", "0.63318264", "0.6314711", "0.626704", "0.6239111", "0.6231301", "0.62183744", "0.6204442", "0.61885273", "0.6175304", "0.6155945", "0.6145321", "0.6142094", "0.61382943", "0.61038846", "0.6093625", "0.60817164", "0.60628647", "0.60583365", "0.60506696", "0.6048284", "0.604407", "0.60303664", "0.60292816", "0.60084504", "0.59993345", "0.59907657", "0.59902203", "0.59797275", "0.59767073", "0.59648424", "0.59577185", "0.5955874", "0.5933116", "0.59251964", "0.5906923", "0.5888148", "0.58736515", "0.5873101", "0.5868001", "0.58653", "0.58653", "0.5863217", "0.5861486", "0.5842747", "0.5842291", "0.58400065", "0.58382285", "0.5834381", "0.583176", "0.5826627", "0.58192503", "0.58173025", "0.58058846", "0.58051103", "0.58001035", "0.5795031", "0.5794247", "0.57903206" ]
0.8446523
1
///////////////////////////////// Registration ///////////////////////////////// Sets the temporary link attached to the user.
function setTemporaryLink(UserLink $link) { $this->_temporaryLink = $link; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTemporaryLink()\n {\n return $this->_temporaryLink;\n }", "public function registration_link():string{\n\t\treturn 'finspot:FingerspotReg;'.base64_encode(REGISTRATION_PATH.$this->id);\n\t}", "public function uploadlink() {\n $defaults = array();\n\n $defaults[\"straat\"] = \"straatnaam of de naam van de buurt\";\n $defaults[\"huisnummer\"] = \"huisnummer\";\n $defaults[\"maker\"] = \"maker\";\n $defaults[\"personen\"] = \"namen\";\n $defaults[\"datum\"] = \"datum of indicatie\";\n $defaults[\"titel\"] = \"titel\";\n $defaults[\"naam\"] = \"Je naam\";\n $defaults[\"email\"] = \"Je e-mailadres\";\n $defaults[\"tags\"] = \"\";\n\n $this->set('defaults', $defaults);\n }", "public function updateUserLinked\t(){\n\t\t\n\t\t}", "public function add_registration_link_text() {\n\t\t\tprintf(\n\t\t\t\t'<p class=\"ast-woo-form-actions\">\n\t\t\t\t\t%1$s\n\t\t\t\t\t<a href=\"#ast-woo-register\" data-type=\"do-register\" class=\"ast-woo-account-form-link\">\n\t\t\t\t\t\t%2$s\n\t\t\t\t\t</a>\n\t\t\t\t</p>',\n\t\t\t\tapply_filters( 'astra_addon_woo_account_register_heading', __( 'Not a member?', 'astra-addon' ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t\tapply_filters( 'astra_addon_woo_account_register_string', __( 'Register', 'astra-addon' ) ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t);\n\t\t}", "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "public function link() {\n return isset($this->_adaptee->user_info['user_username']) ? \"profile.php?user=\".$this->_adaptee->user_info['user_username'] : null;\n }", "public function register($temp)\n {\n // Initialise the table with JUser.\n $user = new JUser;\n $data = (array) $this->getData();\n\n // Merge in the registration data.\n foreach($temp as $k => $v) {\n $data[$k] = $v;\n }\n\n // Prepare the data for the user object.\n $data['email'] = JStringPunycode::emailToPunycode($data['email1']);\n $data['password'] = $data['password1'];\n $data['name'] = $data['firstname'].' '.$data['lastname'];\n $data['activation'] = $data['block'] = 0;\n\n // Bind the data.\n if(!$user->bind($data)) {\n $this->setError(JText::sprintf('COM_KETSHOP_REGISTRATION_BIND_FAILED', $user->getError()));\n return false;\n }\n\n // Load the users plugin group.\n JPluginHelper::importPlugin('user');\n\n // Store the data.\n if(!$user->save()) {\n $this->setError(JText::sprintf('COM_KETSHOP_REGISTRATION_SAVE_FAILED', $user->getError()));\n return false;\n }\n\n // N.B: The linking with the ketshop customer as well as his addresses is performed by the\n // ketshop user plugin in the onUserAfterSave section.\n\n $config = JFactory::getConfig();\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Compile the notification mail values.\n $data = $user->getProperties();\n $data['fromname'] = $config->get('fromname');\n $data['mailfrom'] = $config->get('mailfrom');\n $data['sitename'] = $config->get('sitename');\n $data['siteurl'] = JUri::root();\n\n $emailSubject = JText::sprintf('COM_USERS_EMAIL_ACCOUNT_DETAILS', $data['name'], $data['sitename']);\n $emailBody = JText::sprintf('COM_USERS_EMAIL_REGISTERED_BODY_NOPW', $data['name'], $data['sitename'], $data['siteurl']);\n\n // Send the registration email.\n $return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $data['email'], $emailSubject, $emailBody);\n\n // Check for an error.\n if($return !== true) {\n $this->setError(JText::_('COM_USERS_REGISTRATION_SEND_MAIL_FAILED'));\n return false;\n }\n\n return $user->id;\n }", "function save($ref){\n //this primarily means add/update links\n\n //lookup user id.\n DB::db_query(\"user_id_lookup\", \"SELECT id FROM \\\"user\\\" WHERE username='\".$_SESSION[\"username\"].\"';\");\n if(DB::db_check_result(\"user_id_lookup\") > 0){\n $user_id = DB::db_get_field(\"user_id_lookup\", \"id\"); \n if($user_id == \"\") error(\"Bad User id.\"); \n }\n \n //lookup reference id\n DB::db_query(\"reference_id_lookup\", \"SELECT id FROM reference WHERE reference_id='\".$ref->reference_id.\"';\");\n if(DB::db_check_result(\"reference_id_lookup\") > 0){\n $reference_id = DB::db_get_field(\"reference_id_lookup\", \"id\");\n if($reference_id == \"\") error(\"Bad Reference id.\"); \n }\n\n if(!isset($ref->id)){\n \n //this means we are inserting so we need to: look up the\n //inserted reference's id, look up the users id, then\n //insert the REFERENCE_OF_USER link as appropriate.\n\n $link = new Link;\n $link->from_id = $reference_id;\n $link->to_id = $user_id;\n $link->type = LINK_REFERENCE_OF_USER;\n $link->save();\n \n }\n\n /* This is not being used atm as resource_id is in the reference table\n\n //we are updating hence we need to: check if the\n //REFERENCE_FROM_RESOURCE appropriate link exists, if it doesn't\n //then add it.\n\n if($ref->resource_id != \"\" && $ref->resource_id != \"-1\"){\n\n echo \"here\";\n \n\n DB::db_query(\"link_id_lookup\", \"SELECT id FROM links WHERE from_id='\".$ref->reference_id.\"' \n AND to_id='\".$ref->resource_id.\"' \n AND type='\".LINK_REFERENCE_FROM_RESOURCE.\"';\");\n if(DB::db_num_rows(\"link_id_lookup\") <= 0){\n \n $link = new Link;\n $link->id = $link_id;\n $link->from_id = $reference_id;\n $link->to_id = $ref->resource_id;\n $link->type = LINK_REFERENCE_FROM_RESOURCE;\n $link->save(); \n \n }\n \n } */\n \n }", "public function referal($tale_id, $error = NULL){\n\n\t\t# displays signup \n\n\t\t# setup view\n\t\t\t$this->template->content = View::instance('v_users_referal');\n\t\t\t$this->template->title = \"Sign up\";\n\t\t\t$this->template->content->tale_id = $tale_id;\n\n\t\t# Pass data to the view\n\t\t$this->template->content->error = $error;\n\n\t\t# render\n\t\t\techo $this->template;\n\t}", "function getLink() {\n return new Hyperlink($this->getName(),\"/user/$this->id\",'userlink');\n }", "function clearTemporaryLink()\n {\n $this->_temporaryLink = null;\n return $this;\n }", "public function forgot_password_link($user)\n {\n $data['first_name'] = $user->first_name;\n\n $token = $data['token'] = str_random(100); // Generate random string values - limit 100\n $url = $data['url'] = URL::to('/').'/';\n\n $data['locale'] = App::getLocale();\n\n $password_resets = new PasswordResets;\n\n $password_resets->email = $user->email;\n $password_resets->token = $data['token'];\n $password_resets->created_at = date('Y-m-d H:i:s');\n \n $password_resets->save(); // Insert a generated token and email in password_resets table\n logger(\"testingg llogger\");\n $email = $user->email;\n $content = [\n 'first_name' => $user->first_name, \n 'url'=> $url,\n 'token' => $token\n ];\n // Send Forgot password email to give user email\n try {\n Mail::to($email)->queue(new ForgotPasswordMail($content));\n return true;\n // $jsonString = file_get_contents($destinationPath); \n }\n catch (\\Exception $e) {\n return false ;\n // $jsonString = \"\"; \n }\n }", "function setUrlLink(){\n if( $this->id == 0 ) return;\n $url = $this->aFields[\"url\"]->toString();\n if( $url == \"\" ) return;\n $url = strip_tags( preg_replace( \"/[\\\"']/\", \"\", $url ) );\n if( !$this->aFields[\"url\"]->editable ) $this->aFields[\"url\"]->display = false;\n $this->aFields[\"url_link\"]->display = true;\n $this->aFields[\"url_link\"]->value = \"<a href=\\\"\".$url.\"\\\">\".$url.\"</a>\";\n }", "protected function storeReturnUrl(TemporaryCredentials $temp)\n {\n if ($url = $this->request->input('return_url')) {\n $key = 'oauth_return_url_'.$temp->getIdentifier();\n $this->cache->put($key, $url, ProviderContract::CACHE_TTL);\n }\n }", "function userSetTemporaryPassword($email) {\n\tqbLogin();\n\tglobal $qb;\n\tglobal $temp_password;\n\t$response = $qb->DoQuery(C_DBID_USERS, \"{'\".C_FID_USER_EMAIL.\"'.EX.'\".$email.\"'}\", 'a');\n\tif (isset($response[0]['3'])) {\n\t\t// Generate and encrypt a temporary password\n\t\t//$temp_password = random_string(10);\n\t\t$temp_password = random_str(10);\n\t\t//$temp_password = substr(bin2hex(openssl_random_pseudo_bytes(128)),0,10);\n\t\t$enc_temp_password = encrypt($temp_password);\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'fid' => C_FID_USER_TEMPORARY_PASSWORD,\n\t\t\t\t'value' => $enc_temp_password\n\t\t\t)\n\t\t);\n\t\t$qb->EditRecord(C_DBID_USERS, $response[0]['3'], $fields); // Save the temporary password in QuickBase\n\t\tsendMail($email, null, 'forgot', $temp_password); // Send the user their temporary password\n\t}\n}", "public function admin_referral() {\n \tif (!empty($this->request->data)) {\n \t\tif ($this->__save()) {\n \t\t\t$this->__setMessage(__('Settings saved.', true));\n \t\t} else {\n \t\t\t$this->__setError(__('can\\'t save settings.', true));\n \t\t}\n \t}\n \t$data = $this->Setting->getReferralSettings();\n \t$this->request->data = $data;\n \t$this->set('data', $data);\n \t$this->set('tabs', $this->Setting->getTabs($this->params));\n }", "public function addUserLink($link = array()) {\n foreach( $link as $name => $href ) {\n $this->user_links[$name] = $href;\n }\n }", "function generate_link_hash($link_name)\n{\n\tglobal $user;\n\n\tif (!isset($user->data[\"hash_$link_name\"]))\n\t{\n\t\t$user->data[\"hash_$link_name\"] = substr(sha1($user->data['user_form_salt'] . $link_name), 0, 8);\n\t}\n\n\treturn $user->data[\"hash_$link_name\"];\n}", "function requestUserLogin($linkText)\n{\n $authSubUrl = getAuthSubUrl();\n echo \"<a href=\\\"{$authSubUrl}\\\">{$linkText}</a>\";\n}", "public function getTempLink()\n {\n return $this->temp_loc;\n }", "function setLink($link) {\r\n $this->_link = $link;\r\n }", "function setLink($link) {\r\n $this->_link = $link;\r\n }", "function setLink(&$link)\n {\n $this->_link = $link;\n }", "public function user_confirmation($link)\n\t{\n\t\t//load user model\n\t\t$this->load->model('user');\n\t\t\n\t\t//send link to valid_link user function\n\t\tif ($this->user->valid_link($link))\n\t\t{\n\t\t\t//link is valid, try creating new user\n\t\t\tif($this->user->new_user($link))\n\t\t\t{\n\t\t\t\t//user created, send to registration completion page to enter info\n\t\t\t\t$this->load->view('registration_view');\n\t\t\t}\n\t\t\telse echo 'Error creating new user.';\n\t\t}\n\t\telse echo 'Invalid link.';\n\t}", "public function set_temporary_credentials() {\n $connection = new TwitterOAuth($this->_config['consumer_key'], $this->_config['consumer_secret']);\n $temporary_credentials = $connection->getRequestToken();\n\n $this->_ci->session->set_userdata( 'oauth_token', $temporary_credentials['oauth_token'] );\n $this->_ci->session->set_userdata( 'oauth_token_secret', $temporary_credentials['oauth_token_secret'] );\n\n $redirect_url = $connection->getAuthorizeURL($temporary_credentials);\n return $redirect_url;\n }", "function createLoginLinkRequest(User $user);", "public function setLink($link);", "function generate_follow_link() {\n\t\treturn str_replace( 'swfw_username', $this->username, $this->url);\n\t}", "protected function prepare_links($user)\n {\n }", "function videos_save_link( $post_id ){\n\tif ( !isset( $_POST['yt_link_box_nonce'] ) || !wp_verify_nonce( $_POST['yt_link_box_nonce'], basename( __FILE__ ) ) ){\n\treturn;}\n \n // Check the user's permissions.\nif ( ! current_user_can( 'edit_post', $post_id ) ){\n\treturn;\n}\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post->ID;\n}\n //save value\n if ( isset( $_REQUEST['yt_link'] ) ) {\n\tupdate_post_meta( $post_id, '_yt_link', sanitize_text_field( $_POST['yt_link'] ) );\n}\n \n}", "function press_save_link( $post_id ){\n\tif ( !isset( $_POST['press_link_box_nonce'] ) || !wp_verify_nonce( $_POST['press_link_box_nonce'], basename( __FILE__ ) ) ){\n\treturn;}\n \n // Check the user's permissions.\nif ( ! current_user_can( 'edit_post', $post_id ) ){\n\treturn;\n}\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post_id;\n}\n //save value\n if ( isset( $_REQUEST['press_link'] ) ) {\n\tupdate_post_meta( $post_id, '_press_link', sanitize_text_field( $_POST['press_link'] ) );\n}\n \n}", "function myAccountLink(){\n\tglobal $current_user;\n\tget_currentuserinfo();\n\n\tif ( is_user_logged_in() ) {\n\t\t$link = \"<a href='/my-account'>Logged in as: \" . $current_user->user_firstname . \" \" . $current_user->user_lastname . \"</a>\";\n\t} else {\n\t\t$link = '';\n\t}\n\n\treturn $link;\n}", "public function linkPass()\n {\n }", "public static function hookLinkBegin($dummy, $target, &$text, &$customAttribs, &$query, &$options, &$ret) {\n global $wgUser;\n global $wgRealUsernames_linktext;\n global $wgRealUsernames_linkref;\n global $wgRealUsernames_append_username;\n\n // Nothing to do if text and ref replacement are not enabled.\n if ($wgRealUsernames_linktext !== true && $wgRealUsernames_linkref !== true) {\n return true;\n }\n\n // Nothing to do if links are not to user and talk namespaces.\n if (!in_array($target->getNamespace(), array(NS_USER, NS_USER_TALK))) {\n return true;\n }\n\n $username = $target->getText();\n wfDebugLog('RealUsernames', __METHOD__ . \": link received \".$username);\n\n // Get the real username for the username\n $realusername = self::get_realusername_from_username($username);\n // Default to username if not realusername is found.\n if ($realusername === '') {\n $realusername = $username;\n } else {\n wfDebugLog('RealUsernames', __METHOD__ . \": link change \". $username . \" to \" . $realusername);\n }\n\n // Let's apply real usernames to the texts.\n if ($wgRealUsernames_linktext === true) {\n // if ($text === ${username}) { // Only replace if the text was originally the username.\n if ($text === \"<bdi>${username}</bdi>\") { // (since MW link text comes surrounded by <bdi> tag, so looking for it.\n $text = $realusername;\n // With $wgRealUsernames_append_username enabled, users with \"block\" permissions\n // see the username together with the real username.\n if ($wgRealUsernames_append_username === true && $wgUser->isAllowed('block')) {\n // Only if real username and username are different.\n if ($username !== $realusername) {\n $text = $text . ' (' . $username . ')';\n }\n }\n }\n wfDebugLog('RealUsernames', __METHOD__ . \": link text change to \" . $realusername);\n }\n // Let's apply real usernames to the hrefs.\n if ($wgRealUsernames_linkref === true) {\n $target->mTextform = $realusername;\n $target->mDbkeyform = str_replace(' ', '_', $target->mTextform);\n $target->mUrlform = wfUrlencode($target->mDbkeyform);\n // Get and cache articleID to render a good or wrong link.\n $target->mArticleID = self::get_article_id($target);\n $options = array_diff($options, array('broken')); // Don't accept any predefined \"broken\" link. Recalculate.\n wfDebugLog('RealUsernames', __METHOD__ . \": link href change to \" . $target->mDbkeyform);\n }\n return true;\n }", "function dblions_fb_link() {\n\t$fblink = esc_attr( get_option( 'facebook_link' ) );\n\tcreate_input_field( array(\n\t\t\t'facebook_link', 'text', \n\t\t\t$fblink, 'Facebook Link'\n\t\t) );\n}", "public function p_referal($tale_id){\n\n\t\t#check for empty fields\n\t\tforeach($_POST as $field => $value){\n\t\t\tif(empty($value)){\n\t\t\t\tRouter::redirect('/users/signup/empty-fields');\n\t\t\t}\n\t\t}\n\n\t\t#check for duplicate email\n\t\tif ($this->userObj->confirm_unique_email($_POST['email']) == false){\n\t\t\t#send back to signup page\n\t\t\tRouter::redirect(\"/users/signup/duplicate\");\n\t\t}\n\n\t\t#adding data to the user\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\n\t\t#encrypt password\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t#create encrypted token via email and a random string\n\t\t$_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\n\t\t#assign the user to the referred story\n\t\t$_POST['current_tale'] = $tale_id;\n\n\t\t#Insert into the db\n\t\t$user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\n\t\t#get this user's ID, set as current author for this tale\n\n\t\t$q = \"SELECT user_id\n\t\tFROM users\n\t\tWHERE email = '\".$_POST['email'].\"'\";\n\t\t$id = DB::instance(DB_NAME)->select_field($q);\n\n\t\t$t = \"SELECT *\n\t\tFROM tales\n\t\tWHERE tale_id = \".$tale_id;\n\n\t\t$tale = DB::instance(DB_NAME)->select_rows($t);\n\n\t\t$data = Array(\n\t\t\t\"current_author\" => $id);\n\n\t\t$update_tale = DB::instance(DB_NAME)->update(\"tales\", $data, \"WHERE tale_id = '\".$tale_id.\"'\");\n\n\n\t\t# log in the new user\n\n\t\tsetcookie(\"token\", $_POST['token'], strtotime('+2 weeks'), '/');\n\n\t\t# redirect to home\n\t\tRouter::redirect('/users/home');\n\t}", "public function setLink($link){\n\t\t$this->link = $link;\n\t}", "function ptl_signnow_signing_link($user_details) {\n $document_id = (isset($_SESSION['document_id']) && !empty($_SESSION['document_id'])) ? $_SESSION['document_id'] : '';\n $signerToken = (isset($_SESSION['signer_token']) && !empty($_SESSION['signer_token'])) ? $_SESSION['signer_token'] : '';\n\n // If no document exists, or user has requested a new link, create a new document and token\n if ($document_id == '') {\n ptl_signnow_invite_signer($user_details);\n $document_id = (isset($_SESSION['document_id']) && !empty($_SESSION['document_id'])) ? $_SESSION['document_id'] : '';\n $signerToken = (isset($_SESSION['signer_token']) && !empty($_SESSION['signer_token'])) ? $_SESSION['signer_token'] : '';\n }\n \n if (!empty($signerToken) && !empty($document_id)) {\n $signHref = SignNow::$webBaseURL . \"dispatch?route=fieldinvite&document_id=\".$document_id.\"&access_token=\".$signerToken.\"&redirect_uri=http://tadaoa.com&mobileweb=mobileweb_only\";\n return $signHref;\n }\n //we have an empty token or document id\n return '';\n}", "public static function setdata($num_links, $pt_user, $pt_pass, $username){\n\t\tglobal $CONFIG;\t\n\t\t\n\t\tif(ptregister::Data(\"INSERT INTO {$CONFIG->dbprefix}pt_register \n\t\t\t\t\t\t\t\t (`university`, `pt_username`, `password`, `username`) VALUES\n\t\t\t\t\t\t\t\t ('$num_links', '$pt_user', '$pt_pass', '$username')\", 'add')){\n\t\t\t\t\t return true;\t\n\t\t\t\t\t}\n\t\t\n}", "public static function addnew(Link $link)\n {\n $ID=$user->ID;\n $PhysicalAddress=$Link->PhysicalAddress;\n $FriendlyAddress=$Link->FriendlyAddress;\n date_default_timezone_set(\"Africa/Cairo\");\n $today = date(\"Y-m-d H:i:s\");\n DB::add(\"links\",\"PhysicalAddress,FriendlyAddress,CreatedDateTime,LastUpdatedDateTime,IsDeleted\",\"'$PhysicalAddress','$FriendlyAddress','$today','$today',0\");\n \n \n // $conn->close();\n //header(\"Location:AddLink.php\");\n }", "protected function handleLink() : void // links char with account\n {\n if (!User::$id || empty($this->_get['id']))\n {\n trigger_error('AjaxProfile::handleLink - profileId empty or user not logged in', E_USER_ERROR);\n return;\n }\n\n $uid = User::$id;\n if ($this->_get['user'] && User::isInGroup(U_GROUP_ADMIN | U_GROUP_BUREAU))\n {\n if (!($uid = DB::Aowow()->selectCell('SELECT id FROM ?_account WHERE user = ?', $this->_get['user'])))\n {\n trigger_error('AjaxProfile::handleLink - user \"'.$this->_get['user'].'\" does not exist', E_USER_ERROR);\n return;\n }\n }\n\n if ($this->undo)\n DB::Aowow()->query('DELETE FROM ?_account_profiles WHERE accountId = ?d AND profileId IN (?a)', $uid, $this->_get['id']);\n else\n {\n foreach ($this->_get['id'] as $prId) // only link characters, not custom profiles\n {\n if ($prId = DB::Aowow()->selectCell('SELECT id FROM ?_profiler_profiles WHERE id = ?d AND realm IS NOT NULL', $prId))\n DB::Aowow()->query('INSERT IGNORE INTO ?_account_profiles VALUES (?d, ?d, 0)', $uid, $prId);\n else\n {\n trigger_error('AjaxProfile::handleLink - profile #'.$prId.' is custom or does not exist', E_USER_ERROR);\n return;\n }\n }\n }\n }", "public function __construct(User $user,string $link)\n {\n $this->user = $user;\n $this->link = $link;\n }", "function _wp_credits_add_profile_link(&$display_name, $username, $profiles)\n {\n }", "function owa_post_link($link) {\r\n\r\n\t$owa = owa_getInstance();\r\n\r\n\treturn $owa->add_link_tracking($link);\r\n\t\t\r\n}", "public function __construct($setPasswordLink)\n {\n $this->setPasswordLink = $setPasswordLink;\n }", "function add()\n\t{\n\t\t// Initialize variables.\n\t\t$app = & JFactory::getApplication();\n\n\t\t// Clear the link id from the session.\n\t\t$app->setUserState('redirect.edit.link.id', null);\n\n\t\t// Redirect to the edit screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=link&layout=edit&hidemainmenu=1', false));\n\t}", "public function __construct($link)\n {\n //\n $this->link = $link;\n $this->sender = auth()->user()->name;\n }", "public function createUserLink($request)\n {\n return $this->start()->uri(\"/api/identity-provider/link\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function set_link($link){\n\t\t$this->set_channel_element('link', $link);\n\t}", "public function register($u) {\n $this->user_id = $u; \n }", "public function setLink(string $link): void\n {\n $this->link = $link;\n }", "function addUserTemp($data)\n {\n $pwd = $this->encrypt_password($data[$this->dataFields['password']]);\n //$pwd = \"'\".$data[$this->dataFields['password']].\"'\";\n $activation = $this->randomPass();\n \n $dob_str = NULL;\n if($data[$this->dataFields[\"dob\"]] == \"\"){\n $dob_str = \"NULL\";\n }else{\n $dob_tmp = explode(\"/\", $data[$this->dataFields[\"dob\"]]);\n if(sizeof($dob_tmp) == 3)\n $dob_str = \"'\".$dob_tmp[2].\"-\".$dob_tmp[1].\"-\".$dob_tmp[0].\"'\";\n } \n if($data[$this->dataFields[\"newsletter_flag\"]] != '1' && $data[$this->dataFields[\"newsletter_flag\"]] != '0'){\n $data[$this->dataFields[\"newsletter_flag\"]] = 1;\n }\n \n $res = $this->query(\"INSERT INTO `{$this->userTempTable}` (`{$this->tbTmpFields['password']}`, `{$this->tbTmpFields['first_name']}`, `{$this->tbTmpFields['last_name']}`, `{$this->tbTmpFields['gender']}`, `{$this->tbTmpFields['dob']}`, `{$this->tbTmpFields['telephone']}`,`{$this->tbTmpFields['fax']}`,`{$this->tbTmpFields['email']}`, `{$this->tbTmpFields['newsletter_flag']}`, `{$this->tbTmpFields['company']}`, `{$this->tbTmpFields['address']}`, `{$this->tbTmpFields['postal']}`, `{$this->tbTmpFields['city']}`, `{$this->tbTmpFields['country']}`, `{$this->tbTmpFields['primary_flag']}`, `{$this->tbTmpFields['activation_code']}`, `{$this->tbTmpFields['date_registered']}`) VALUES ('\".$pwd.\"', '\".$data[$this->dataFields[\"first_name\"]].\"', '\".$data[$this->dataFields[\"last_name\"]].\"', '\".$data[$this->dataFields[\"gender\"]].\"', \".$dob_str.\", '\".$data[$this->dataFields[\"telephone\"]].\"', '\".$data[$this->dataFields[\"fax\"]].\"', '\".$data[$this->dataFields[\"email\"]].\"', '\".$data[$this->dataFields[\"newsletter_flag\"]].\"', '\".$data[$this->dataFields[\"company\"]].\"', '\".$data[$this->dataFields[\"address\"]].\"', '\".$data[$this->dataFields[\"postal\"]].\"', '\".$data[$this->dataFields[\"city\"]].\"', '\".$data[$this->dataFields[\"country\"]].\"', \".$data[$this->dataFields[\"primary_flag\"]].\", '\".$activation.\"', CURRENT_TIMESTAMP)\");\n \n if($res){\n $activation_link = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'&email='.$data[$this->dataFields[\"email\"]].'&activate='.$activation;\n //echo $activation_link.\"<p>\"; \n\n // SEND ACTIVATION EMAIL\n return $this->sendActivation($data[$this->dataFields[\"first_name\"]], $activation_link, $data[$this->dataFields['email']]);\n }else{\n return false;\n } \n }", "function itstar_send_registration_admin_email($user_id){\n // add_user_meta( $user_id, 'hash', $hash );\n \n \n\n $message = '';\n $user_info = get_userdata($user_id);\n $to = get_option('admin_email'); \n $un = $user_info->display_name; \n $pw = $user_info->user_pass;\n $viraclub_id = get_user_meta( $user_id, 'viraclub', 1);\n\n $subject = __('New User Have Registered ','itstar').get_option('blogname'); \n \n $message .= __('Username: ','itstar').$un;\n $message .= \"\\n\";\n $message .= __('Password: ','itstar').$pw;\n $message .= \"\\n\\n\";\n $message .= __('ViraClub ID: ','itstar').'V'.$viraclub_id;\n\n \n //$message .= 'Please click this link to activate your account:';\n // $message .= home_url('/').'activate?id='.$un.'&key='.$hash;\n $headers = 'From: <[email protected]>' . \"\\r\\n\"; \n wp_mail($to, $subject, $message); \n}", "function UstawLinkRezygnacji($Link) {\n\t\t$this->LinkRezygnacji = $Link;\n\t}", "public function set() {\n\t\t$this->token = uniqid(rand(), true);\n\n\t\t$this->time = time();\n\n\t\t$this->$referer = $_SERVER['HTTP_REFERER'];\n\n\t\tif ($this->isEnable()) {\n\t\t\t$_SESSION['token'] = $this->token;\n\t\t\t$_SESSION['token_time'] = $this->time;\n\t\t\t$_SESSION['token_referer'] = $this->$referer;\n\t\t}\n\t}", "function tmp_admin_user_admin_bar( WP_Admin_Bar $wp_admin_bar ) {\n\n\t// Bail if current user doesnt have cap.\n\tif ( ! current_user_can( apply_filters( 'tmp_admin_user_menu_cap', 'manage_options' ) ) ) {\n\t\treturn;\n\t}\n\n\t// Add the link to the menu page.\n\t$wp_admin_bar->add_node(\n\t\tarray(\n\t\t\t'id' => 'tmp-admin-user-new',\n\t\t\t'title' => __( 'Temporary Admin', 'temporary-admin-user' ),\n\t\t\t'href' => TempAdminUser_Helper::get_menu_link(),\n\t\t\t'parent' => 'new-content',\n\t\t\t'meta' => array(\n\t\t\t\t'title' => __( 'Temporary Admin', 'temporary-admin-user' ),\n\t\t\t),\n\t\t)\n\t);\n}", "public function register() \n\t{\n $referer = isset($_GET['referer']) ? htmlentities($_GET['referer'], ENT_QUOTES) : '';\n\t\t\n\t\t$this->View->RenderMulti(['_templates/header','user/register']);\n }", "public function createReferralLink() : string\n {\n $url = $this->storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_WEB);\n $encrypt = urlencode($this->encryptor->encrypt($this->customerSession->getCustomerId()));\n $link = $url . \"?ref=\" . $encrypt;\n return $link;\n }", "function sos_wp_register( $before = '<li>', $after = '</li>', $echo = true ) {\n if ( ! is_user_logged_in() ) {\n if ( get_option('users_can_register') )\n $link = $before . '<a href=\"' . esc_url( wp_registration_url() ) . '\" class=\"btn btn-info\">' . __('Create Account') . '</a>' . $after;\n else\n $link = '';\n } elseif ( current_user_can( 'read' ) ) {\n $link = $before . '<a href=\"' . admin_url() . '\" class=\"btn btn-info\">' . __('View Dashboard') . '</a>' . $after;\n } else {\n $link = '';\n }\n\n /**\n * Filters the HTML link to the Registration or Admin page.\n *\n * Users are sent to the admin page if logged-in, or the registration page\n * if enabled and logged-out.\n *\n * @since 1.5.0\n *\n * @param string $link The HTML code for the link to the Registration or Admin page.\n */\n $link = apply_filters( 'register', $link );\n\n if ( $echo ) {\n echo $link;\n } else {\n return $link;\n }\n}", "function login_unlink() {\n\n\t\t\t$current_user_id = get_current_user_id();\n\n\t\t\tif ( $current_user_id ) {\n\n\t\t\t\t$linkid_user_id = get_user_meta( $current_user_id, self::WP_USER_META_VALUE_LINKID_USER_ID, true );\n\n\t\t\t\tif ( ! trim( $linkid_user_id ) ) {\n\n\t\t\t\t\t// generate the response\n\t\t\t\t\t$response = json_encode(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'status' => \"ERROR\",\n\t\t\t\t\t\t\t'message' => __( \"Cannot unlink accounts. Logged in user not linked to any linkID account\", \"link-linkid\" )\n\t\t\t\t\t\t)\n\t\t\t\t\t);;\n\n\t\t\t\t\t// response output\n\t\t\t\t\theader( \"Content-Type: application/json\" );\n\t\t\t\t\techo $response;\n\n\t\t\t\t\tdie();\n\t\t\t\t}\n\n\t\t\t\t//User is logged in. and has an associated linkID user ID.\n\t\t\t\tdelete_user_meta( $current_user_id, self::WP_USER_META_VALUE_LINKID_USER_ID );\n\n\t\t\t\t// generate the response\n\t\t\t\t$response = json_encode(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'status' => \"SUCCESS\",\n\t\t\t\t\t\t'message' => __( \"Accounts successfully unlinked. Please wait while page reloads.\", \"link-linkid\" )\n\t\t\t\t\t)\n\t\t\t\t);;\n\n\t\t\t\t// response output\n\t\t\t\theader( \"Content-Type: application/json\" );\n\t\t\t\techo $response;\n\n\t\t\t\tdie();\n\n\t\t\t} else {\n\n\t\t\t\t// generate the response\n\t\t\t\t$response = json_encode(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'status' => \"ERROR\",\n\t\t\t\t\t\t'message' => __( \"Cannot unlink accounts. Currently no logged in user.\", \"link-linkid\" )\n\t\t\t\t\t)\n\t\t\t\t);;\n\n\t\t\t\t// response output\n\t\t\t\theader( \"Content-Type: application/json\" );\n\t\t\t\techo $response;\n\n\t\t\t\tdie();\n\n\t\t\t}\n\n\t\t}", "public function link($uid)\r\n {\r\n global $_SMALLURL;\r\n $username = $this->core($uid)->get(\"username\");\r\n return \"//{$_SMALLURL['domain']}/user/{$username}\";\r\n }", "public function getAccountLink()\n {\n return $this->account_link;\n }", "public function register() {\n\t\t$result = $this->Member_Model->get_max_id();\n\t\t$current_next_id = $result + 1;\n\n\t\t$this->breadcrumbs->set(['Register' => 'members/register']);\n\t\t$data['api_reg_url'] = base64_encode(FINGERPRINT_API_URL . \"?action=register&member_id=$current_next_id\");\n\n\t\tif ($this->session->userdata('current_finger_data')) {\n\t\t\t$this->session->unset_userdata('current_finger_data');\n\t\t}\n\n\t\t$this->render('register', $data);\n\t}", "public function set_link($link) \n\t{\n\t\tif($this->version == RSS2 || $this->version == RSS1)\n\t\t{\n\t\t\t$this->add_element('link', $link);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->add_element('link','',array('href'=>$link));\n\t\t\t$this->add_element('id', zajlib_feed::uuid($link,'urn:uuid:'));\n\t\t} \n\t\t\n\t}", "function saveLinkToPhoto(){\n if(isset($_SESSION['temp_photo_loc'])){\n $randomString = $this->generateRandomString();\n $this->car_photo=$randomString;\n $new_file = \"C:/Apache24/htdocs/sola-avto-stran/yii-appli/frontend/web/assets/car_photos/\".$randomString.\".png\";\n rename(\"C:/Apache24/htdocs/sola-avto-stran/yii-appli/frontend/web/assets/temp/\".$_SESSION[\"temp_photo_loc\"].\".png\",$new_file);\n $this->save();\n //da deletamo sliko iz temporery loc\n $temporery = TempPhotos::findOne(([\"temp_photo\"=>$_SESSION['temp_photo_loc']]));\n $temporery->delete();\n //ko damo submit, sliko shranimo in jo potem lahko odstranimo iz session\n unset($_SESSION['temp_photo_loc']);\n }else{\n $this->car_photo=\"no_photo\";\n $this->save();\n }\n }", "function tm_loginpage_custom_link() {\n\treturn esc_url( home_url( '/' ) );\n}", "public function register($temp)\n\t{\n\t\t$data = (array) $this->getData();\n\n\t\t// Merge in the registration data.\n\t\tforeach ($temp as $k => $v)\n\t\t{\n\t\t\t$data[$k] = $v;\n\t\t}\n\n\t\t// Volunteer Model\n\t\t$volunteer = JModelLegacy::getInstance('Volunteer', 'VolunteersModel', array('ignore_request' => true));\n\n\t\tif (!$volunteer->save($data))\n\t\t{\n\t\t\t$this->setError(JText::sprintf('COM_VOLUNTEERS_REGISTRATION_SAVE_FAILED', $volunteer->getError()));\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Global config\n\t\t$config = JFactory::getConfig();\n\n\t\t// Compile the notification mail values.\n\t\t$data['fromname'] = $config->get('fromname');\n\t\t$data['mailfrom'] = $config->get('mailfrom');\n\t\t$data['sitename'] = $config->get('sitename');\n\t\t$data['siteurl'] = JUri::root();\n\n\t\t$emailSubject = JText::sprintf(\n\t\t\t'COM_USERS_EMAIL_ACCOUNT_DETAILS',\n\t\t\t$data['firstname'] . ' ' . $data['lastname'],\n\t\t\t$data['sitename']\n\t\t);\n\n\t\t$emailBody = JText::sprintf(\n\t\t\t'COM_USERS_EMAIL_REGISTERED_BODY_NOPW',\n\t\t\t$data['firstname'] . ' ' . $data['lastname'],\n\t\t\t$data['sitename'],\n\t\t\t$data['siteurl']\n\t\t);\n\n\t\t// Send the registration email.\n\t\tJFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $data['email'], $emailSubject, $emailBody);\n\n\t\treturn $volunteer;\n\t}", "public function &setExternalChangePasswordUrl($value);", "function socialnetwork_writeLink($member_id, $modulo, $type, $image = false, $ref = false, $tb = false, $class=\"\",$user=true) {\n\t\tif ($member_id == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t$account = new Account($member_id);\n\t\t$profile = new Profile($member_id);\n\t\t$contact = db_getFromDB(\"contact\", \"account_id\", db_formatNumber($member_id), \"1\");\n\n\t\t$name_title = string_htmlentities(string_ucwords($profile->nickname && $account->has_profile == \"y\"? $profile->nickname: $contact->first_name.\" \".$contact->last_name));\n\t\tif ($profile->getNumber(\"account_id\") > 0){\n\t\t\t$name_link = string_ucwords($profile->nickname && $account->has_profile == \"y\"? $profile->nickname: $contact->first_name.\" \".$contact->last_name);\n\t\t}\n\n\t\tif ($account->has_profile == 'y' && SOCIALNETWORK_FEATURE == \"on\" && $account->getNumber(\"id\") > 0) {\n\t\t\t\n\t\t\tif (MODREWRITE_FEATURE == \"on\") {\n\t\t\t\tif (is_numeric($image)) {\n\t\t\t\t\t$imgObj = new Image($image, true);\n\t\t\t\t\tif ($imgObj->imageExists()) {\n\t\t\t\t\t\tif ($ref == true) {\n\t\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html');\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" onclick=\\\"urlRedirect('javascript:void(0);');\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$link .= $imgObj->getTag(true, PROFILE_IMAGE_WIDTH, PROFILE_IMAGE_HEIGHT);\n\t\t\t\t\t\t$link .= \"</a>\";\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($ref == true) {\n\t\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html');\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" onclick=\\\"urlRedirect('javascript:void(0);');\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($profile->facebook_image) {\n\t\t\t\t\t\t\timage_getNewDimension(PROFILE_IMAGE_WIDTH, PROFILE_IMAGE_HEIGHT, $profile->facebook_image_width ? $profile->facebook_image_width : 100, $profile->facebook_image_height ? $profile->facebook_image_height : 100, $newWidth, $newHeight);\n\t\t\t\t\t\t\t$link .= \"<img width=\\\"$newWidth\\\" height=\\\"$newHeight\\\" src=\\\"\".$profile->facebook_image.\"\\\" border=\\\"0\\\" title=\\\"\".$name_title.\"\\\" alt=\\\"\".$name_title.\"\\\" />\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (string_strpos($_SERVER[\"PHP_SELF\"], \"sitemgr\") || string_strpos($_SERVER[\"PHP_SELF\"], \"members\")){\n\t\t\t\t\t\t\t\t$link .= \"<span class=\\\"no-image no-link\\\"></span>\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$link .= \"<span class=\\\"no-image\\\"></span>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$link .= \"</a>\";\n\n\t\t\t\t\t}\n\t\t\t\t} else if (!$image && !$ref) {\n\t\t\t\t\tif ($tb == true) {\n\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html');\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" onclick=\\\"urlRedirect('javascript:void(0);');\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($user){\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if ($ref == true) {\n\t\t\t\t\tif ($user){\n\t\t\t\t\t\t$link = SOCIALNETWORK_URL.\"/\".$profile->getString(\"friendly_url\").\".html\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$link = \"href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (is_numeric($image)) {\n\t\t\t\t\t$imgObj = new Image($image, true);\n\t\t\t\t\tif ($imgObj->imageExists()) {\n\t\t\t\t\t\tif ($ref == true) {\n\t\t\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"');\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$link .= $imgObj->getTag(true, PROFILE_IMAGE_WIDTH, PROFILE_IMAGE_HEIGHT);\n\t\t\t\t\t\t$link .= \"</a>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($ref == true) {\n\t\t\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"');\\\"title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"\\\"title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\";\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($profile->facebook_image) {\n\t\t\t\t\t\t\timage_getNewDimension(PROFILE_IMAGE_WIDTH, PROFILE_IMAGE_HEIGHT, $profile->facebook_image_width, $profile->facebook_image_height, $newWidth, $newHeight);\n\t\t\t\t\t\t\t$link .= \"<img width=\\\"$newWidth\\\" height=\\\"$newHeight\\\" src=\\\"\".$profile->facebook_image.\"\\\" border=\\\"0\\\" alt=\\\"\".$profile->nickname.\"\\\" />\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$link .= \"<img width=\\\"\".PROFILE_IMAGE_WIDTH.\"\\\" height=\\\"\".PROFILE_IMAGE_HEIGHT.\"\\\" src=\\\"\".DEFAULT_URL.\"/images/profile_noimage.gif\\\" border=\\\"0\\\" alt=\\\"No Image\\\" />\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$link .= \"</a>\";\n\t\t\t\t\t}\n\t\t\t\t} else if (!$image && !$ref) {\n\t\t\t\t\tif ($tb == true) {\n\t\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" onclick=\\\"urlRedirect('\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"');\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($user) { \n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"\".SOCIALNETWORK_URL.\"/index.php?id=\".$member_id.\"\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$link = \"<a \".$class.\" href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\" title=\\\"\".$name_title.\"\\\">\".$name_link.\"</a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if ($ref == true) {\n\t\t\t\t\tif ($user) {\n\t\t\t\t\t\t$link = SOCIALNETWORK_URL.\"/index.php?id=\".$member_id;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$link = \"href=\\\"javascript:void(0);\\\" style=\\\"cursor:default\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tif (SOCIALNETWORK_FEATURE == \"on\" && $ref) {\n\t\t\t\t$link = \"<img width=\\\"\".PROFILE_IMAGE_WIDTH.\"\\\" height=\\\"\".PROFILE_IMAGE_HEIGHT.\"\\\" src=\\\"\".DEFAULT_URL.\"/images/profile_noimage.gif\\\" border=\\\"0\\\" alt=\\\"No Image\\\" />\";\n\t\t\t} else {\n\t\t\t\tif ($name_link){\n\t\t\t\t\t$link = \"<strong>\".$name_link.\"</strong>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $link;\n\t}", "public function referredSignup($ref)\n {\n $findRef = User::where('refer_id', $ref)->firstOrFail();\n if (empty($findRef)) {\n return redirect('/');\n } else {\n // store refer ID to session\n session()->put('referred', $findRef->refer_id);\n session()->flash('success', 'Thank you for visiting GOENERGEE, Please Proceed to Signup');\n return redirect()->route('guest.signup');\n // return view('referral-signup')->withRef($findRef->refer_id);\n }\n }", "public function userTempFolder(): string\n {\n /** @var \\TYPO3\\CMS\\Core\\Resource\\Folder $folder */\n $folder = $this->getBeUser()->getDefaultUploadTemporaryFolder();\n return $folder->getPublicUrl();\n }", "function save()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit('Invalid Token');\n\n\t\t// Get some objects from the JApplication\n\t\t$db\t\t= &JFactory::getDbo();\n\t\t$user\t= &JFactory::getUser();\n\n\t\t// Must be logged in\n\t\tif ($user->get('id') < 1) {\n\t\t\tJError::raiseError(403, JText::_('ALERTNOTAUTH'));\n\t\t\treturn;\n\t\t}\n\n\t\t//get data from the request\n\t\t$post = JRequest::getVar('jform', array(), 'post', 'array');\n\n\t\t$model = $this->getModel('weblink');\n\n\t\tif ($model->store($post)) {\n\t\t\t$msg = JText::_('Weblink Saved');\n\t\t} else {\n\t\t\t$msg = JText::_('Error Saving Weblink');\n\t\t}\n\n\t\t// Check the table in so it can be edited.... we are done with it anyway\n\t\t$model->checkin();\n\n\t\t// Get the user groups setup to receive notifications of new weblinks.\n\t\t$access = new JAccess();\n\t\t$groups = $access->getAuthorisedUsergroups('com_weblinks.submit.notify');\n\t\t$groups = count($groups) ? implode(',', $groups) : '0';\n\n\t\t// list of admins\n\t\t$query = 'SELECT u.email, u.name' .\n\t\t\t\t' FROM #__users AS u' .\n\t\t\t\t' JOIN #__users_usergroup_map AS m ON m.group_id IN ('.$groups.')' .\n\t\t\t\t' AND u.sendEmail = 1';\n\t\t$db->setQuery($query);\n\t\tif (!$db->query()) {\n\t\t\tJError::raiseError(500, $db->stderr(true));\n\t\t\treturn;\n\t\t}\n\t\t$adminRows = $db->loadObjectList();\n\n\t\t// send email notification to admins\n\t\tforeach ($adminRows as $adminRow) {\n\t\t\tJUtility::sendAdminMail($adminRow->name, $adminRow->email, '', JText::_('Web Link'), $post['title'].\" URL link \".$post[url], $user->get('username'), JURI::base());\n\t\t}\n\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_weblinks&view=category&id='.$post['catid'], false), $msg);\n\t}", "public function set_tgmpa_url() {\n\n\t\t\t$this->tgmpa_menu_slug = ( property_exists( $this->tgmpa_instance, 'menu' ) ) ? $this->tgmpa_instance->menu : $this->tgmpa_menu_slug;\n\t\t\t$this->tgmpa_menu_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_tgmpa_menu_slug', $this->tgmpa_menu_slug );\n\n\t\t\t$tgmpa_parent_slug = ( property_exists( $this->tgmpa_instance, 'parent_slug' ) && $this->tgmpa_instance->parent_slug !== 'themes.php' ) ? 'admin.php' : 'themes.php';\n\n\t\t\t$this->tgmpa_url = apply_filters( $this->theme_name . '_theme_setup_wizard_tgmpa_url', $tgmpa_parent_slug . '?page=' . $this->tgmpa_menu_slug );\n\n\t\t}", "public function redirectAfterRegister($redirect)\n {\n return wc_get_page_permalink('myaccount');\n }", "protected function link_user_to_site($domain)\n\t{\n\t\t$this->db->insert('linked', array('user_id' => session('user_id'), 'domain_id' => $domain->id, 'created' => date(\"Y-m-d H:i:s\")));\n\t}", "function setLink($url)\n\t{\n\t\t$this->link = $url;\n\t}", "function formLink(){\n\t\t$yuiSuggest = &weSuggest::getInstance();\n\n\t\t$textname = 'we_' . $this->Name . '_txt[LinkPath]';\n\t\t$idname = 'we_' . $this->Name . '_txt[LinkID]';\n\t\t$extname = 'we_' . $this->Name . '_txt[LinkHref]';\n\t\t$linkType = $this->getElement('LinkType') ? : 'no';\n\t\t$linkPath = f('SELECT Path FROM ' . FILE_TABLE . ' WHERE ID = ' . intval($this->getElement('LinkID')), '', $this->DB_WE);\n\n\t\t$RollOverFlagName = 'we_' . $this->Name . '_txt[RollOverFlag]';\n\t\t$RollOverFlag = $this->getElement('RollOverFlag') ? 1 : 0;\n\t\t$RollOverIDName = 'we_' . $this->Name . '_txt[RollOverID]';\n\t\t$RollOverID = $this->getElement('RollOverID') ? : '';\n\t\t$RollOverPathname = 'we_' . $this->Name . '_txt[RollOverPath]';\n\t\t$RollOverPath = f('SELECT Path FROM ' . FILE_TABLE . ' WHERE ID = ' . intval($RollOverID), '', $this->DB_WE);\n\n\t\t$checkFlagName = 'check_' . $this->Name . '_RollOverFlag';\n\t\t$cmd1 = \"document.we_form.elements['\" . $idname . \"'].value\";\n\t\t$but1 = we_html_button::create_button(we_html_button::SELECT, \"javascript:we_cmd('we_selector_document', \" . $cmd1 . \",'\" . FILE_TABLE . \"','\" . we_base_request::encCmd($cmd1) . \"','\" . we_base_request::encCmd(\"document.we_form.elements['\" . $textname . \"'].value\") . \"','\" . we_base_request::encCmd(\"opener._EditorFrame.setEditorIsHot(true);opener.document.we_form.elements['we_\" . $this->Name . \"_txt[LinkType]'][2].checked=true;\") . \"','',0,'',\" . (permissionhandler::hasPerm(\"CAN_SELECT_OTHER_USERS_FILES\") ? 0 : 1) . \");\");\n\n\t\t$cmd1 = \"document.we_form.elements['\" . $RollOverIDName . \"'].value\";\n\t\t$but2 = we_html_button::create_button(we_html_button::SELECT, \"javascript:we_cmd('we_selector_image', \" . $cmd1 . \",'\" . FILE_TABLE . \"','\" . we_base_request::encCmd($cmd1) . \"','\" . we_base_request::encCmd(\"document.we_form.elements['\" . $RollOverPathname . \"'].value\") . \"','\" . we_base_request::encCmd(\"opener._EditorFrame.setEditorIsHot(true);opener.document.we_form.elements['\" . $RollOverFlagName . \"'].value=1;opener.document.we_form.elements['\" . $checkFlagName . \"'].checked=true;\") . \"','',0,'\" . we_base_ContentTypes::IMAGE . \"',\" . (permissionhandler::hasPerm(\"CAN_SELECT_OTHER_USERS_FILES\") ? 0 : 1) . \");\");\n\n\n\t\t$cmd1 = \"document.we_form.elements['\" . $extname . \"'].value\";\n\t\t$butExt = permissionhandler::hasPerm('CAN_SELECT_EXTERNAL_FILES') ?\n\t\t\twe_html_button::create_button(we_html_button::SELECT, \"javascript:we_cmd('browse_server','\" . we_base_request::encCmd($cmd1) . \"','',\" . $cmd1 . \",'\" . we_base_request::encCmd(\"opener._EditorFrame.setEditorIsHot(true);opener.document.we_form.elements['we_\" . $this->Name . \"_txt[LinkType]'][1].checked=true;\") . \"')\") : \"\";\n\n\t\tif(defined('OBJECT_TABLE')){\n\t\t\t$objidname = 'we_' . $this->Name . '_txt[ObjID]';\n\t\t\t$objtextname = 'we_' . $this->Name . '_txt[ObjPath]';\n\t\t\t$objPath = f('SELECT Path FROM ' . OBJECT_FILES_TABLE . ' WHERE ID = ' . intval($this->getElement('ObjID')), '', $this->DB_WE);\n\t\t\t$cmd1 = \"document.we_form.elements['\" . $objidname . \"'].value\";\n\t\t\t$butObj = we_html_button::create_button(we_html_button::SELECT, \"javascript:we_cmd('we_selector_document',\" . $cmd1 . \",'\" . OBJECT_FILES_TABLE . \"','\" . we_base_request::encCmd($cmd1) . \"','\" . we_base_request::encCmd(\"document.we_form.elements['\" . $objtextname . \"'].value\") . \"','\" . we_base_request::encCmd(\"opener._EditorFrame.setEditorIsHot(true);opener.document.we_form.elements['we_\" . $this->Name . \"_txt[LinkType]'][3].checked=true;\") . \"','','','objectFile',\" . (permissionhandler::hasPerm(\"CAN_SELECT_OTHER_USERS_OBJECTS\") ? 0 : 1) . \");\");\n\t\t}\n\n\t\t// Create table\n\t\t$_content = new we_html_table(array('class' => 'default'), (defined('OBJECT_TABLE') ? 11 : 9), 2);\n\t\t$row = 0;\n\t\t// No link\n\t\t$_content->setCol($row, 0, array('style' => 'vertical-align:top;padding-bottom:10px;'), we_html_forms::radiobutton('no', ($linkType === 'no'), 'we_' . $this->Name . '_txt[LinkType]', g_l('weClass', '[nolink]'), true, 'defaultfont', '_EditorFrame.setEditorIsHot(true);'));\n\t\t$_content->setCol($row++, 1, null, '');\n\n\t\t// External link\n\t\t$_ext_link_table = new we_html_table(array('class' => 'default'), 1, 2);\n\n\t\t$_ext_link_table->setCol(0, 0, null, $this->htmlTextInput('we_' . $this->Name . '_txt[LinkHref]', 25, $this->getElement('LinkHref'), '', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"', \"text\", 280));\n\t\t$_ext_link_table->setCol(0, 1, null, $butExt);\n\n\t\t$_ext_link = \"href\" . we_html_element::htmlBr() . $_ext_link_table->getHtml();\n\n\t\t$_content->setCol($row, 0, array('style' => 'vertical-align:top;padding-bottom:10px;'), we_html_forms::radiobutton(we_base_link::TYPE_EXT, ($linkType == we_base_link::TYPE_EXT), 'we_' . $this->Name . '_txt[LinkType]', g_l('weClass', '[extern]'), true, 'defaultfont', '_EditorFrame.setEditorIsHot(true)'));\n\t\t$_content->setCol($row++, 1, array('class' => 'defaultfont', 'style' => 'vertical-align:top'), $_ext_link);\n\n\n\t\t// Internal link\n\t\t$yuiSuggest->setAcId('internalPath');\n\t\t$yuiSuggest->setContentType(implode(',', array(we_base_ContentTypes::FOLDER, we_base_ContentTypes::WEDOCUMENT, we_base_ContentTypes::IMAGE, we_base_ContentTypes::JS, we_base_ContentTypes::CSS, we_base_ContentTypes::HTML, we_base_ContentTypes::APPLICATION, we_base_ContentTypes::QUICKTIME)));\n\t\t$yuiSuggest->setInput($textname, $linkPath);\n\t\t$yuiSuggest->setResult($idname, $this->getElement('LinkID'));\n\t\t$yuiSuggest->setTable(FILE_TABLE);\n\t\t$yuiSuggest->setSelectButton($but1);\n\t\t$yuiSuggest->setMaxResults(10);\n\t\t$yuiSuggest->setMayBeEmpty(0);\n\t\t$yuiSuggest->setWidth(280);\n\t\t$yuiSuggest->setSelector(weSuggest::DocSelector);\n\t\t$yuiSuggest->setLabel('href');\n\t\t$_int_link = $yuiSuggest->getHTML();\n\n\t\t$_content->setCol($row, 0, array('style' => 'vertical-align:top'), we_html_forms::radiobutton(we_base_link::TYPE_INT, ($linkType == we_base_link::TYPE_INT), 'we_' . $this->Name . '_txt[LinkType]', g_l('weClass', '[intern]'), true, 'defaultfont', '_EditorFrame.setEditorIsHot(true);'));\n\t\t$_content->setCol($row++, 1, array('class' => 'defaultfont', 'style' => 'vertical-align:top'), $_int_link);\n\n\t\t// Object link\n\t\tif(defined('OBJECT_TABLE')){\n\n\t\t\t$yuiSuggest->setAcId('objPathLink');\n\t\t\t$yuiSuggest->setContentType(\"folder,\" . we_base_ContentTypes::OBJECT_FILE);\n\t\t\t$yuiSuggest->setInput($objtextname, $objPath);\n\t\t\t$yuiSuggest->setResult($objidname, $this->getElement('ObjID'));\n\t\t\t$yuiSuggest->setTable(OBJECT_FILES_TABLE);\n\t\t\t$yuiSuggest->setSelectButton($butObj);\n\t\t\t$yuiSuggest->setMaxResults(10);\n\t\t\t$yuiSuggest->setMayBeEmpty(0);\n\t\t\t$yuiSuggest->setWidth(280);\n\t\t\t$yuiSuggest->setSelector(weSuggest::DocSelector);\n\t\t\t$yuiSuggest->setLabel('href');\n\t\t\t$_obj_link = $yuiSuggest->getHTML();\n\n\n\t\t\t$_content->setCol($row, 0, array('style' => 'vertical-align:top;padding-top:10px;'), we_html_forms::radiobutton(we_base_link::TYPE_OBJ, ($linkType == we_base_link::TYPE_OBJ), 'we_' . $this->Name . '_txt[LinkType]', g_l('linklistEdit', '[objectFile]'), true, 'defaultfont', '_EditorFrame.setEditorIsHot(true);'));\n\t\t\t$_content->setCol($row++, 1, array('class' => 'defaultfont', 'style' => 'vertical-align:top'), $_obj_link);\n\t\t}\n\n\t\t// Target\n\t\t$_content->setCol($row++, 0, array('colspan' => 2, 'class' => 'defaultfont', 'style' => 'vertical-align:top;padding:20px 0px;'), g_l('weClass', '[target]') . we_html_element::htmlBr() . we_html_tools::targetBox('we_' . $this->Name . '_txt[LinkTarget]', 33, 0, '', $this->getElement('LinkTarget'), '_EditorFrame.setEditorIsHot(true);', 20, 97));\n\n\n\t\t// Rollover image\n\t\t$yuiSuggest->setAcId('rollOverPath');\n\t\t$yuiSuggest->setContentType(implode(',', array(we_base_ContentTypes::FOLDER, we_base_ContentTypes::WEDOCUMENT, we_base_ContentTypes::IMAGE, we_base_ContentTypes::JS, we_base_ContentTypes::CSS, we_base_ContentTypes::HTML, we_base_ContentTypes::APPLICATION, we_base_ContentTypes::QUICKTIME)));\n\t\t$yuiSuggest->setInput($RollOverPathname, $RollOverPath);\n\t\t$yuiSuggest->setResult($RollOverIDName, $RollOverID);\n\t\t$yuiSuggest->setTable(FILE_TABLE);\n\t\t$yuiSuggest->setSelectButton($but2);\n\t\t$yuiSuggest->setMaxResults(10);\n\t\t$yuiSuggest->setMayBeEmpty(0);\n\t\t$yuiSuggest->setWidth(280);\n\t\t$yuiSuggest->setSelector(weSuggest::DocSelector);\n\t\t$yuiSuggest->setLabel('href');\n\t\t$_rollover = $yuiSuggest->getHTML();\n\n\t\t$_content->setCol($row, 0, array('style' => 'vertical-align:top'), we_html_forms::checkbox(1, $RollOverFlag, $checkFlagName, 'Roll Over', false, 'defaultfont', \"_EditorFrame.setEditorIsHot(true); this.form.elements['\" . $RollOverFlagName . \"'].value = (this.checked ? 1 : 0); \") . we_html_element::htmlHidden($RollOverFlagName, $RollOverFlag));\n\t\t$_content->setCol($row, 1, array('class' => 'defaultfont', 'style' => 'vertical-align:top'), $_rollover);\n\n\t\treturn $_content->getHtml();\n\t}", "function register_block_core_social_link()\n {\n }", "function AddLink($long_url)\n\t{\n\t\t$data['redirect_link'] = $long_url;\n\t\t$this->db->insert('links', $data);\t\t\n\t\treturn dechex(mysql_insert_id());\n\t}", "function support_dynamo_first_activation() {\n wp_redirect(get_bloginfo('wpurl').'/wp-admin/admin.php?page=dynamo_support_&view=account');\n }", "function activate_account_via_email_link() {\r\n\t\t\tif ( isset($_REQUEST['act']) && $_REQUEST['act'] == 'activate_via_email' && isset($_REQUEST['hash']) && is_string($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 &&\r\n\t\t\t isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id']) ) { // valid token\r\n\r\n\t\t\t\t$user_id = absint( $_REQUEST['user_id'] );\r\n\t\t\t\tdelete_option( \"um_cache_userdata_{$user_id}\" );\r\n\r\n\t\t\t\tum_fetch_user( $user_id );\r\n\r\n\t\t\t\tif ( strtolower($_REQUEST['hash']) !== strtolower( um_user('account_secret_hash') ) )\r\n\t\t\t\t\twp_die( __( 'This activation link is expired or have already been used.','ultimate-member' ) );\r\n\r\n\t\t\t\tUM()->user()->approve();\r\n\t\t\t\t$redirect = ( um_user('url_email_activate') ) ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');\r\n\t\t\t\t$login = (bool) um_user('login_email_activate');\r\n\r\n\t\t\t\t// log in automatically\r\n\t\t\t\tif ( ! is_user_logged_in() && $login ) {\r\n\t\t\t\t\t$user = get_userdata($user_id);\r\n\t\t\t\t\t$user_id = $user->ID;\r\n\r\n\t\t\t\t\t// update wp user\r\n\t\t\t\t\twp_set_current_user( $user_id, $user->user_login );\r\n\t\t\t\t\twp_set_auth_cookie( $user_id );\r\n\r\n\t\t\t\t\tob_start();\r\n\t\t\t\t\tdo_action( 'wp_login', $user->user_login, $user );\r\n\t\t\t\t\tob_end_clean();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tum_reset_user();\r\n\t\t\t\t/**\r\n\t\t\t\t * UM hook\r\n\t\t\t\t *\r\n\t\t\t\t * @type action\r\n\t\t\t\t * @title um_after_email_confirmation\r\n\t\t\t\t * @description Action on user activation\r\n\t\t\t\t * @input_vars\r\n\t\t\t\t * [{\"var\":\"$user_id\",\"type\":\"int\",\"desc\":\"User ID\"}]\r\n\t\t\t\t * @change_log\r\n\t\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t\t * @usage add_action( 'um_after_email_confirmation', 'function_name', 10, 1 );\r\n\t\t\t\t * @example\r\n\t\t\t\t * <?php\r\n\t\t\t\t * add_action( 'um_after_email_confirmation', 'my_after_email_confirmation', 10, 1 );\r\n\t\t\t\t * function my_after_email_confirmation( $user_id ) {\r\n\t\t\t\t * // your code here\r\n\t\t\t\t * }\r\n\t\t\t\t * ?>\r\n\t\t\t\t */\r\n\t\t\t\tdo_action( 'um_after_email_confirmation', $user_id );\r\n\r\n\t\t\t\texit( wp_redirect( $redirect ) );\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "function add_login_link() {\n $login_uri = $this->get_login_uri(wp_login_url());\n echo \"\\t\" . '<p id=\"http-authentication-link\"><a class=\"button-primary\" href=\"' . htmlspecialchars($login_uri) . '\">Log In with Shibboleth</a></p>' . \"\\n\";\n }", "function userAnchor($User, $CssClass = null, $Options = null) {\n static $NameUnique = null;\n if ($NameUnique === null) {\n $NameUnique = c('Garden.Registration.NameUnique');\n }\n\n if (is_array($CssClass)) {\n $Options = $CssClass;\n $CssClass = null;\n } elseif (is_string($Options)) {\n $Options = array('Px' => $Options);\n }\n\n $Px = GetValue('Px', $Options, '');\n\n $Name = GetValue($Px.'Name', $User, t('Unknown'));\n // $Text = GetValue('Text', $Options, htmlspecialchars($Name)); // Allow anchor text to be overridden.\n$Text = GetValue('Text', $Options, '');\nif ($Text == '') {\n // get all fields since that is better for caching!\n $profileFields = Gdn::userMetaModel()->getUserMeta($User->UserID, 'Profile.%', 'Profile.');\n $Text = $profileFields['Profile.'.c('Nickname.Fieldname')];\n if ($Text == '') {\n $Text = htmlspecialchars($Name);\n }\n // return\n} else {\n $Text = htmlspecialchars($Name);\n}\n $Attributes = array(\n 'class' => $CssClass,\n 'rel' => GetValue('Rel', $Options)\n );\n if (isset($Options['title'])) {\n $Attributes['title'] = $Options['title'];\n }\n $UserUrl = UserUrl($User, $Px);\n\n return '<a href=\"'.htmlspecialchars(Url($UserUrl)).'\"'.Attribute($Attributes).'>'.$Text.'</a>';\n }", "function get_edit_user_link($user_id = \\null)\n {\n }", "function plugin_settings_link($links)\n\t\t{\n\t\t\t//$settings_link = '<a href=\"options-general.php?page=WP_Custom_Login\">Settings</a>';\n\t\t\t//array_unshift($links, $settings_link);\n\t\t\t//return $links;\n\t\t}", "public function update_user($email,$link){\n $query = $this->db->where('01_email', $email)\n ->set('forgot_token', $link)\n ->update('register_01');\n if($query){\n return true;\n }else{\n return false;\n }\n }", "function renren_account_auto_create($renren_user = null) {\n global $user;\n if (!isset($renren_user)) {\n $renren_user = renren_user_profile();\n if (!isset($renren_user)) {\n return false;\n }\n }\n // renren account is already exists\n if ($hishanghai_uid = hishanghai_account_uid_with_renren($renren_user->uid)) {\n $account = user_load($hishanghai_uid);\n if ($account) {\n $user = $account;\n drupal_goto('');\n }\n else {\n return;\n }\n }\n else {\n // renren account is not already exists\n // we create for user\n $user_edit = array(\n 'name' => check_plain($renren_user->name),\n 'mail' => '[email protected]',\n 'pass' => user_password(),\n 'status' => 1,\n 'init' => check_plain($renren_user->name),\n 'access' => time(),\n );\n // check the user name \n if ($account = user_load(array('name' => $user_edit['name']))) {\n drupal_set_message(t('Sorry, We already have %name in our %site', array('%name' => $account->name, '%site' => variable_get('site_name', ''))));\n return;\n }\n else {\n $account = user_save(NULL, $user_edit);\n if ($account->uid) {\n if (!renren_account_insert($account->uid, $renren_user->uid)) {\n drupal_set_message(t('Sorry, there have errors accours.Please contact site adminstrator for support'));\n return;\n }\n else {\n $user = $account;\n drupal_set_message(t('Please complete the follow register form to create account on %site', array('%site' => variable_get('site_name', ''))));\n drupal_goto(\"user/$account->uid/settings\");\n }\n }\n else {\n drupal_set_message(t('Sorry, there have errors accors.Please contact site adminstrator for support'));\n return;\n }\n }\n }\n}", "function save_extra_user_profile_fields( $user_id ) {\n if ( !current_user_can( 'edit_user', $user_id ) ) { \n return false; \n }\n\n\n $socialLinks=array(\"twitter\" => $_POST['twitter'] , \"facebook\" => $_POST['facebook'],\"instagram\" => $_POST['instagram']);\n\n \n update_user_meta(\n $user_id,\n 'social_links',\n $socialLinks\n );\n}", "protected function prepare_links(\\WP_User $user, $item)\n {\n }", "function genLink () {\n\t\t\t$db_host=\"127.0.0.1\";\n\t\t\t$db_nombre=\"gallery\";\n\t\t\t$db_user=\"gallery\";\n\t\t\t$db_pass=\"gallery\";\n\t\t\t$link=mysql_connect($db_host, $db_user, $db_pass) or die (\"Error conectando a la base de datos.\");\n\t\t\tmysql_select_db($db_nombre ,$link) or die(\"Error seleccionando la base de datos.\");\n\t\t\t$this->link = $link;\n\t\t}", "function uultra_update_user_custom_link_admin()\r\n\t{\r\n\t\t$package_id = $_POST[\"package_id\"];\r\n\t\t\r\n\t\t\t\t\r\n\t\t$modules = get_option('userultra_default_user_features_custom');\r\n\t\t$modules_custom = get_option('userultra_default_user_features_added_admin');\r\n\t\t\r\n\t\t$id = $_POST[\"link_id\"];\t\t\t\t\r\n\t\t$uu_title = $_POST[\"uu_title\"];\r\n\t\t$uu_slug = strtolower($_POST[\"uu_slug\"]);\r\n\t\t$uu_type = $_POST[\"uu_type\"];\r\n\t\t\r\n\t\t$uu_icon = $_POST[\"uu_icon\"];\r\n\t\t\r\n\t\t\r\n\t\t$html = '';\r\n\t\t\r\n\t\t\r\n\t\tif(isset($modules[$id]) && $uu_title!=\"\" && $uu_icon!=\"\")\r\n\t\t{\r\n\t\t\t$link =$modules[$id] ;\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif($link['link_type']=='custom')\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$modules[$id]['title'] =$uu_title;\r\n\t\t\t\t$modules[$id]['icon'] =$uu_icon;\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//custom array\r\n\t\t\t\t$modules_custom[$id]['title'] =$uu_title;\r\n\t\t\t\t$modules_custom[$id]['icon'] =$uu_icon;\r\n\t\t\t\t\t\t\r\n\t\t\t\t$html = __('Done!', 'xoousers');\r\n\t\t\t\t\r\n\t\t\t\t//check for slug\r\n\t\t\t\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\t//this is a native link so we just update the title\t\t\t\t\t\r\n\t\t\t\t$modules[$id]['title'] =$uu_title;\t\r\n\t\t\t\t$modules[$id]['icon'] =$uu_icon;\t\t\t\t\r\n\t\t\t\t$html = __('Done!', 'xoousers');\r\n\t\t\t\r\n\t\t\t}\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t$html = __('All fields mandatory!', 'xoousers');\r\n\t\t}\r\n\t\t\r\n\t\techo $html;\r\n\t\tupdate_option('userultra_default_user_features_custom',$modules);\r\n\t\tupdate_option('userultra_default_user_features_added_admin',$modules_custom);\r\n\t\tdie();\r\n\t\r\n\t}", "function tumblr_users_register_user($userinfo, $access_token){\n\t\t\n\t\t$password = random_string(32);\n\n\t\t$email = \"{$userinfo->response->user->name}@donotsend-tumblr.com\";\n\n\t\t$user = users_create_user(array(\n\t\t\t\"username\" => $userinfo->response->user->name,\n\t\t\t\"email\" => $email,\n\t\t\t\"password\" => $password,\n\t\t));\n\n\t\tif (! $user){\n\t\t\treturn not_okay(\"dberr_user\");\n\t\t}\n\n\t\t$tumblr_user = tumblr_users_create_user(array(\n\t\t\t'user_id' => $user['user']['id'],\n\t\t\t'oauth_token' => $access_token['oauth_token'],\n\t\t\t'oauth_secret' => $access_token['oauth_token_secret'],\n\t\t\t'tumblr_username' => $userinfo->response->user->name,\n\t\t\t'following' => $userinfo->response->user->following,\n\t\t\t'likes' => $userinfo->response->user->likes,\n\t\t\t'default_post_format' => $userinfo->response->user->default_post_format\n\t\t));\n\n\t\tif (! $tumblr_user){\n\t\t\treturn not_okay(\"dberr_tumblruser\");\n\t\t}\n\n\t\treturn okay(array(\n\t\t\t'user' => $user,\n\t\t\t'tumblr_user' => $tumblr_user,\n\t\t));\n\t}", "function register()\n {\n $saveData = null;\n // result is an array data if save data to db success, else it is false\n $saveData = $this->model->khachhang->registerCustomerAccount();\n // if save data success, send mail to user\n if ($saveData != false) {\n $linkVerify = baseUrl('user/verify/') . $saveData['activation'];\n $title = \"Verification Link | MobileShop| Subscription\";\n $content = \"\";\n $content .= \"Xin chào \" . $saveData['username'] . \",<br /><br />\";\n $content .= \"Vui lòng kích vào nút bên dưới để xác nhận tài khoản của bạn trên website \" . BASE_URL . \".<br />\";\n $content .= \"<span style='background-color:#07c;margin-top:15px;width: 115px;height: 40px;display:block;border-radius: 40px;cursor: pointer;'>\n <span style='display:block;padding:10px;cursor: pointer;'>\n <a href='{$linkVerify}' target='_blank' style='color:white;'>\n VERIFY EMAIL\n </a>\n </span>\n </span>\";\n $nTo = $saveData['username'];\n $mTo = $saveData['email'];\n $diachicc = \"\";\n $mailSuccess = sendMail($title, $content, $nTo, $mTo, $diachicc);\n if ($mailSuccess) {\n redirect('user/success');\n } else {\n redirect('user/fail');\n }\n } else {\n redirect('user/fail');\n }\n\n }", "function ahr_add_settings_link( $links ) {\r\n \r\n\tglobal $AHR_SLUG;\r\n\t\r\n $settings_link = \"<a href='options-general.php?page=$AHR_SLUG'>\" . __( 'Settings' ) . '</a>';\r\n array_unshift( $links, $settings_link );\r\n \r\n return $links;\r\n \r\n}", "public function setFormLink($link) {\n $this->form_link = $link;\n }", "function Register()\r\n\t{\r\n\t\tglobal $Site;\r\n\t\t//if all the details is valid save the user on data base\r\n\t\tif ($this->IsValid())\r\n\t\t{\r\n\t\t\t$MemberID = GetID(\"member\", \"MemberID\");//getting last MemberID +1 for adding one more user\r\n\t\t\t$DateAdded = date(\"Y-m-d H:i:s\");\r\n\t\t\t$DateUpdated = $DateAdded;\r\n\t\t\t$IsEnable = 1;\r\n\t\t\t$pass = base64_encode($this->Password);\r\n\t\t\t$SQL = \"insert into member (MemberID, ProfileType, FirstName, LastName, TelNo, Email, Password, IsActive, IsEnable, DateAdded, DateUpdated) values ($MemberID, 'user', '$this->FirstName', '$this->LastName', '$this->PhoneNumber', '$this->Email', '$pass', '1' , '$IsEnable', '$DateAdded', '$DateUpdated')\";\r\n\t\t\tGetRS($SQL);\r\n\t\t\t$_SESSION['SAWMemberID'] = $MemberID;//cookie- to not allow impersonation of another user PHP gives each customer ID\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}\t\t\r\n\t}", "public function displayGoogleRegisterLink()\n {\n if ($this->use_google_login === true) {\n $client = $this->newGoogleClient($this->getGoogleOptions());\n $auth_url = $client->createAuthUrl();\n \n if (isset($auth_url)) {\n echo '<p class=\"google-register oauth-login\"><a href=\"'.$auth_url.'\">'.__('Register with Google', 'okv-oauth').'</a></p>';\n }\n \n if (isset($_REQUEST['error'])) {\n $this->googleRegisterError($_REQUEST['error'], true);\n return false;\n }\n \n if (isset($_COOKIE['google_access_token']) && !empty($_COOKIE['google_access_token'])) {\n $check_user_result = $this->googleRegisterCheckUser();\n if ($check_user_result === false) {\n return false;\n } elseif (is_array($check_user_result)) {\n // check user passed. now it is ready to prepare register form.\n echo '<script>'.\"\\n\";\n echo 'var okvoauth_google_register_got_code = true;'.\"\\n\";\n echo 'var okvoauth_google_wp_user_login = \\''.(isset($check_user_result['wp_user_login']) ? $check_user_result['wp_user_login'] : '').'\\';'.\"\\n\";\n echo 'var okvoauth_google_wp_user_email = \\''.(isset($check_user_result['wp_user_email']) ? $check_user_result['wp_user_email'] : '').'\\';'.\"\\n\";\n echo 'var okvoauth_google_wp_user_avatar = \\''.(isset($check_user_result['wp_user_avatar']) ? $check_user_result['wp_user_avatar'] : '').'\\';'.\"\\n\";\n echo '</script>'.\"\\n\";\n }\n unset($check_user_result);\n }\n \n unset($auth_url, $client);\n return true;\n } else {\n return false;\n }\n }", "public function save_term_link( $term_id, $tt_id ){\n\t\t\tif( isset( $_POST['term_link'] ) && '' !== $_POST['term_link'] ){\n\t\t\t\t$link = $_POST['term_link'];\n\t\t\t\tadd_term_meta( $term_id, 'term_link', $link, true );\n\t\t\t}\n\t\t}", "function fm_get_user_link($linkid) {\r\n\tglobal $USER;\r\n\r\n\tif (!$linksrec = get_record('fmanager_link', \"id\", $linkid, 'owner', $USER->id, 'ownertype', OWNERISUSER)) {\r\n\t\terror(get_string('errnoviewfile','block_file_manager'));\r\n\t}\r\n\treturn $linksrec;\r\n}" ]
[ "0.6377997", "0.5984485", "0.5952041", "0.5725836", "0.5650684", "0.5540842", "0.5490224", "0.54593796", "0.54348767", "0.54314286", "0.53844345", "0.5360663", "0.5346193", "0.5344653", "0.53431016", "0.53301203", "0.5314621", "0.5307288", "0.5291185", "0.5272707", "0.52722704", "0.526157", "0.526157", "0.5219539", "0.5218894", "0.5213829", "0.52006286", "0.5190496", "0.5187235", "0.5187154", "0.5184697", "0.5177857", "0.51735264", "0.51734257", "0.51599073", "0.51348287", "0.51176876", "0.5116387", "0.5115867", "0.50965977", "0.50675553", "0.50601536", "0.50507796", "0.5047093", "0.5046664", "0.50462294", "0.5041087", "0.50288206", "0.5027925", "0.5026263", "0.5011178", "0.5010705", "0.5005991", "0.5005156", "0.49881762", "0.4982318", "0.49822897", "0.4976701", "0.49687192", "0.49561265", "0.4952711", "0.4943377", "0.49429157", "0.4939651", "0.49380615", "0.49366844", "0.4926204", "0.49227887", "0.4921924", "0.49113056", "0.49106926", "0.49086687", "0.49085578", "0.4906837", "0.49065414", "0.4901914", "0.48905885", "0.48836693", "0.48814842", "0.48789358", "0.48758596", "0.48726094", "0.48639026", "0.48587325", "0.48546076", "0.48479667", "0.48479015", "0.48474088", "0.4839638", "0.48382944", "0.4834874", "0.48236442", "0.482292", "0.48167184", "0.48166615", "0.48066613", "0.48053774", "0.48047644", "0.4800807", "0.48001805" ]
0.7245877
0
Clears the temporary link attached to the user.
function clearTemporaryLink() { $this->_temporaryLink = null; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTemporaryLink(UserLink $link)\n {\n $this->_temporaryLink = $link;\n return $this;\n }", "public function unlink() {\n $this->credential->setAccessToken(null);\n $this->credential->setTokenType(null);\n }", "protected function clearCachedUserData()\n {\n $user = Auth::user();\n\n if ($user) {\n $user->deleteUserData();\n }\n }", "public static function clear_temp_user_data( $user_login ) {\n\t\tif ( $temp_id = self::get_guest_id() ) {\n\t\t\tlearn_press_remove_cookie( 'learn_press_user_guest_id' );\n\t\t\tdelete_transient( 'learn_press_user_guest_' . $temp_id );\n\n\t\t\tglobal $wpdb;\n\n\t\t\t$query = $wpdb->prepare(\n\t\t\t\t\"\n\t\t\t\tSELECT user_item_id\n\t\t\t\tFROM {$wpdb->prefix}learnpress_user_items a\n\t\t\t\tINNER JOIN {$wpdb->prefix}learnpress_user_itemmeta b ON a.user_item_id = b.learnpress_user_item_id AND b.meta_key = %s And b.meta_value = %s\n\t\t\t\",\n\t\t\t\t'temp_user_id',\n\t\t\t\t'yes'\n\t\t\t);\n\n\t\t\t$user_item_ids = $wpdb->get_row( $query );\n\t\t\tif ( $user_item_ids ) {\n\t\t\t\t$query = $wpdb->prepare(\n\t\t\t\t\t\"\n\t\t\t\t\tDELETE a.*, b.*\n\t\t\t\t\tFROM {$wpdb->prefix}learnpress_user_items a\n\t\t\t\t\tINNER JOIN {$wpdb->prefix}learnpress_user_itemmeta b\n\t\t\t\t\tWHERE a.user_item_id = b.learnpress_user_item_id\n\t\t\t\t\tAND a.user_id = %d\n\t\t\t\t\",\n\t\t\t\t\t$temp_id\n\t\t\t\t);\n\t\t\t\t$wpdb->query( $query );\n\t\t\t}\n\t\t}\n\t}", "function clear_auth_cookie_clear_online_user() {\n\t\t$userinfo = wp_get_current_user();\n\n\t\tif ( ! empty( $userinfo->ID ) ) {\n\t\t\t$this->clear_online_user( $userinfo->ID );\n\t\t}\n\t}", "public function removeTemporary();", "function getTemporaryLink()\n {\n return $this->_temporaryLink;\n }", "public function clearUserFavorites()\n\t{\n\t\t$this->collUserFavorites = null; // important to set this to NULL since that means it is uninitialized\n\t}", "protected function clearUserDataFromStorage()\n {\n $this->session->remove($this->getName());\n\n $recaller = $this->recaller();\n\n if (! is_null($recaller)) {\n $this->getCookieJar()->queue($this->getCookieJar()\n ->forget($this->getRecallerName()));\n\n $this->provider->deleteRememberToken($recaller->id(), $recaller->token());\n }\n }", "public function clear()\n {\n $this->links = [];\n }", "public function reset()\n {\n $this->values[self::_USER] = null;\n }", "public function reset()\n {\n $this->values[self::_USER] = null;\n }", "public function reset()\n {\n $this->values[self::_USER] = null;\n }", "public function actionCleartemp()\n {\n $uploadPath = '../web/web_mat/temp/';\n $file = scandir($uploadPath);\n foreach ($file as $key => $value) {\n if ($key >= 2) {\n unlink($uploadPath . $value);\n }\n }\n }", "function clear_online_user( $user_id ) {\n\t\t$online_users = UM()->Online()->get_users();\n\n\t\tif ( ! empty( $online_users[ $user_id ] ) ) {\n\t\t\tunset( $online_users[ $user_id ] );\n\t\t\tupdate_option( 'um_online_users', $online_users );\n\n\t\t\tupdate_option( 'um_online_users_last_updated', time() );\n\t\t}\n\t}", "public function destroy() {\n\t\t\t$this->session->unset('user');\n\t\t}", "private function clearTemporaryFiles($usertempdir)\n\t{\n\t\tif (file_exists($usertempdir))\n\t\t{\n\t\t\t$handle=opendir($usertempdir);\n\t\t\n\t\t\twhile (($file = readdir($handle))!==false)\n\t\t\t{\n\t\t\t\t@unlink($usertempdir.'/'.$file);\n\t\t\t}\n\t\t\n\t\t\tclosedir($handle);\n\t\t}\n\t}", "public function clear_virtual_user_id();", "static function forget(User $user) {\n $user->forget();\n setcookie( \"userId\", '');\n setcookie( \"rememberToken\", '');\n }", "public static function forceClearUserSession()\n {\n global $user;\n $uid = $user->uid;\n error_log(\"About to clear session via forceClearUserSession for user $uid\");\n unset($_SESSION['CREATED']); \n unset($_SESSION[CONST_NM_RAPTOR_CONTEXT]);\n\n $all_literalnames = self::getAllSessionValueNames();\n foreach($all_literalnames as $onename=>$onevalue)\n {\n unset($_SESSION[$onename]);\n }\n error_log(\"Cleared session via forceClearUserSession for user $uid\");\n }", "public function unlinkTwitter() {\n $this->setOauthToken(NULL);\n $this->setOauthTokenSecret(NULL);\n $this->setScreenName(NULL);\n $this->setTwitterId(NULL);\n }", "public function logout()\r\n\t{\r\n\t\tif(!$this->loggedIn()) return;\r\n\t\t$query = 'UPDATE users SET fingerprint=NULL WHERE id=' . $this->user->id . ' LIMIT 1';\r\n\t\tmysql_query($query);\r\n\t\tsetcookie('qw_login', '', time()-60*60*24, '/');\r\n\t\tsetcookie('tree_grid_cookie', '', time()-60*60*24, '/');\r\n\t\t$this->user = false;\r\n\t}", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function logout () {\n $this->clear();\n }", "public static function Clear(){\n $user = !empty($_SESSION['user']) ? $_SESSION['user'] : '';\n $userId = !empty($_SESSION['userid']) ? $_SESSION['userid'] : '';\n if (!empty($user) && !empty($userId)){\n $db = Database::getConnection();\n if ($db->connect_error){\n //add some logging here\n return;\n }\n\n //remove all pulses\n $query = \"DELETE FROM \" . PULSE_TABLE . \" WHERE `user_id`=?\";\n $stmt = $db->prepare($query);\n $stmt->bind_param(\"i\", $userId);\n $stmt->execute();\n }\n }", "function clear()\n {\n $this->tags = [];\n $this->extra = [];\n $this->user = null;\n }", "private function clear()\n {\n unlink($this->getConfig()->read('tmp_dir') . Evaluator::FILENAME);\n rmdir($this->getConfig()->read('tmp_dir'));\n }", "public function clearUserTags()\n\t{\n\t\t$this->collUserTags = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearTempLog(): void\n {\n $this->tempLog = '';\n }", "public function profileLogout()\n {\n unset($this->getApp()->getSession()->BRACP_PROFILE_ID);\n self::$loggedUser = null;\n }", "protected function clearUserSessionFromCache()\r\n\t{\r\n\t\t$this->cache->tags([$this->config['cache.prefix'], '_s' . session_id()])->flush();\t\t\r\n\t}", "public function clear()\n {\n unlink($this->file);\n }", "private function clearSharedCache() {\n\t if( $this->mId ) {\n\t\t global $wgMemc;\n\t\t $wgMemc->delete( wfMemcKey( 'cedar_user', 'id', $this->mId ) );\n\t }\n }", "public function logout_user() {\n\t\tif(isset($_SESSION['eeck'])) {\n\t\t\tunset($_SESSION['eeck']);\n\t\t}\n\t}", "public function reset()\n {\n $this->values[self::_USERID] = null;\n $this->values[self::_USER_SUMMARY] = null;\n }", "function login_unlink() {\n\n\t\t\t$current_user_id = get_current_user_id();\n\n\t\t\tif ( $current_user_id ) {\n\n\t\t\t\t$linkid_user_id = get_user_meta( $current_user_id, self::WP_USER_META_VALUE_LINKID_USER_ID, true );\n\n\t\t\t\tif ( ! trim( $linkid_user_id ) ) {\n\n\t\t\t\t\t// generate the response\n\t\t\t\t\t$response = json_encode(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'status' => \"ERROR\",\n\t\t\t\t\t\t\t'message' => __( \"Cannot unlink accounts. Logged in user not linked to any linkID account\", \"link-linkid\" )\n\t\t\t\t\t\t)\n\t\t\t\t\t);;\n\n\t\t\t\t\t// response output\n\t\t\t\t\theader( \"Content-Type: application/json\" );\n\t\t\t\t\techo $response;\n\n\t\t\t\t\tdie();\n\t\t\t\t}\n\n\t\t\t\t//User is logged in. and has an associated linkID user ID.\n\t\t\t\tdelete_user_meta( $current_user_id, self::WP_USER_META_VALUE_LINKID_USER_ID );\n\n\t\t\t\t// generate the response\n\t\t\t\t$response = json_encode(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'status' => \"SUCCESS\",\n\t\t\t\t\t\t'message' => __( \"Accounts successfully unlinked. Please wait while page reloads.\", \"link-linkid\" )\n\t\t\t\t\t)\n\t\t\t\t);;\n\n\t\t\t\t// response output\n\t\t\t\theader( \"Content-Type: application/json\" );\n\t\t\t\techo $response;\n\n\t\t\t\tdie();\n\n\t\t\t} else {\n\n\t\t\t\t// generate the response\n\t\t\t\t$response = json_encode(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'status' => \"ERROR\",\n\t\t\t\t\t\t'message' => __( \"Cannot unlink accounts. Currently no logged in user.\", \"link-linkid\" )\n\t\t\t\t\t)\n\t\t\t\t);;\n\n\t\t\t\t// response output\n\t\t\t\theader( \"Content-Type: application/json\" );\n\t\t\t\techo $response;\n\n\t\t\t\tdie();\n\n\t\t\t}\n\n\t\t}", "public function unlinkTempFiles() {}", "public function unlinkTempFiles() {}", "public function clear()\r\n {\r\n return apc_clear_cache('user');\r\n }", "public function unlinkAccount()\n {\n }", "public function logout()\n {\n $_SESSION['user_id'] = null;\n unset($_SESSION['user_id']);\n }", "static function logout() {\n self::forget(self::currentUser());\n unset($_SESSION['userId']);\n session_destroy();\n }", "function the_champ_unlink(){\r\n\tif(isset($_POST['provider'])){\r\n\t\tglobal $user_ID;\r\n\t\t$linkedAccounts = get_user_meta($user_ID, 'thechamp_linked_accounts', true);\r\n\t\t$primarySocialNetwork = get_user_meta($user_ID, 'thechamp_provider', true);\r\n\t\tif($linkedAccounts || $primarySocialNetwork){\r\n\t\t\t$socialNetworkToUnlink = sanitize_text_field($_POST['provider']);\r\n\t\t\t$linkedAccounts = maybe_unserialize($linkedAccounts);\r\n\t\t\t$currentSocialId = get_user_meta($user_ID, 'thechamp_current_id', true);\r\n\t\t\tif($primarySocialNetwork == $socialNetworkToUnlink){\r\n\t\t\t\tif($currentSocialId == get_user_meta($user_ID, 'thechamp_social_id', true)){\r\n\t\t\t\t\tdelete_user_meta($user_ID, 'thechamp_current_id');\r\n\t\t\t\t}\r\n\t\t\t\tdelete_user_meta($user_ID, 'thechamp_social_id');\r\n\t\t\t\tdelete_user_meta($user_ID, 'thechamp_provider');\r\n\t\t\t\tdelete_user_meta($user_ID, 'thechamp_large_avatar');\r\n\t\t\t\tdelete_user_meta($user_ID, 'thechamp_avatar');\r\n\t\t\t}else{\r\n\t\t\t\tif($currentSocialId == $linkedAccounts[$socialNetworkToUnlink]){\r\n\t\t\t\t\tdelete_user_meta($user_ID, 'thechamp_current_id');\r\n\t\t\t\t}\r\n\t\t\t\tunset($linkedAccounts[$socialNetworkToUnlink]);\t\r\n\t\t\t\tupdate_user_meta($user_ID, 'thechamp_linked_accounts', maybe_serialize($linkedAccounts));\r\n\t\t\t}\r\n\t\t\tthe_champ_ajax_response(array('status' => 1, 'message' => ''));\r\n\t\t}\r\n\t}\r\n\tdie;\r\n}", "public function clear() {\n header( \"Location:\" . $this->url() );\n }", "public function removeUser()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_user]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_user]);\n\t\t}\n\t}", "public function clearTemporaryData()\n {\n $this->deleteVariable('visit_pic_1');\n $this->deleteVariable('visit_pic_2');\n $this->deleteVariable('visit_pic_3');\n $this->deleteVariable('temp_preset');\n\n // $this->sessionUnset('itemId');\n $this->sessionUnset('tags');\n $this->sessionUnset('categories');\n\n return true;\n }", "public function clearUserDemoss()\n {\n $this->collUserDemoss = null; // important to set this to NULL since that means it is uninitialized\n }", "public function eraseCredentials(): void\n {\n // $this->plainPassword = null;\n }", "function clean_user_cache($user)\n {\n }", "protected function teardown() {\n User::delete($this->state[\"user\"]->id);\n }", "protected function teardown() {\n User::delete($this->state[\"user\"]->id);\n }", "public function unlinkFacebook() {\n $this->setFacebookId(NULL);\n $this->setFbTokenExpireDate(NULL);\n $this->setAccessToken(NULL);\n }", "public function destroy($id)\n {\n $link = Link::where('id', $id)->first();\n\n if($link->user_id == Auth::id()){\n $link->delete();\n }\n }", "public function clear()\n\t{\n\t\t$this->connection()->delete('cookies');\n\t}", "public function clearUserAwardss()\n\t{\n\t\t$this->collUserAwardss = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function remove() {\n JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n // Initialise variables.\n $app = JFactory::getApplication();\n $model = $this->getModel('Link', 'LinksModel');\n\n // Get the user data.\n $data = JFactory::getApplication()->input->get('jform', array(), 'array');\n\n // Attempt to save the data.\n $return = $model->delete($data['id']);\n\n // Check for errors.\n if ($return === false) {\n $this->setMessage(JText::sprintf('Delete failed', $model->getError()), 'warning'); \n } else {\n // Check in the profile.\n if ($return) {\n $model->checkin($return);\n }\n\n // Clear the profile id from the session.\n $app->setUserState('com_links.edit.link.id', null);\n\n // Flush the data from the session.\n $app->setUserState('com_links.edit.link.data', null);\n \n $this->setMessage(JText::_('COM_LINKS_ITEM_DELETED_SUCCESSFULLY'));\n }\n \n // Redirect to the list screen.\n $menu = & JSite::getMenu();\n $item = $menu->getActive();\n $this->setRedirect(JRoute::_($item->link, false));\n }", "public function logout()\n\t{\n\t\t$this->user = null;\n\n\t\t$this->session->forget(static::$key);\n\t}", "public function forceDeleted(User $user)\n {\n $this->clearCache($this->key);\n\n FileHelpers::deleteFile($user->avatar);\n }", "public function logout(){\r\n unset($_SESSION['user_id']);\r\n unset($this->user_id);\r\n $this->signed_in = false;\r\n }", "public function eraseCredentials()\n {\n // if you had a plainPassword property, you'd nullify it here\n\n $this->plainPassword = null;\n }", "public function ClearTemporaryPassword()\n\t{\n\t\tif ( ($this->TempPassword) || ($this->TempPasswordSalt) )\n\t\t{\n\t\t\t$this->TempPassword = null;\n\t\t\t$this->TempPasswordSalt = null;\n\t\t\t$this->write();\n\t\t}\n\t\treturn $this;\n\t}", "public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }", "public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }", "public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }", "public static function cleanTempStorage() {\n unset($_SESSION[self::$appSessionName][self::$storageName]);\n }", "public function clear_cookie()\n {\n }", "public function destroy(Link $link)\n {\n //\n }", "public function clearUsuarioTarefas()\n\t{\n\t\t$this->collUsuarioTarefas = null; // important to set this to NULL since that means it is uninitialized\n\t}", "private function deleteTempFile() {\n if ($this->datastreamInfo['content']['type'] == 'file' && $this->copied == TRUE) {\n unlink($this->datastreamInfo['content']['content']);\n }\n }", "public function eraseCredentials()\n {\n $this->password = null;\n }", "function delLogin(){\n unlink($this->fHtaccess);\n }", "function delLogin(){\n unlink($this->fHtaccess);\n }", "public function unlinkLinkedIn() {\n $this->setLinkedinOauthToken(NULL);\n $this->setLinkedinOauthTokenSecret(NULL);\n $this->setLinkedInId(NULL);\n }", "public function logout()\n {\n $this->deleteAllPersistentData();\n $this->accessToken = null;\n $this->user = null;\n $this->idToken = null;\n $this->refreshToken = null;\n }", "public function eraseCredentials()\n {\n // if you had a plainPassword property, you'd nullify it here\n // $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n // if you had a plainPassword property, you'd nullify it here\n // $this->plainPassword = null;\n }", "private function logout() {\n $_SESSION['user'] = null;\n $_SESSION['valid'] = false;\n }", "public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_USER_SUMMARY] = null;\n }", "public function unlinkTempFiles()\n {\n $typo3temp = PATH_site . 'typo3temp/';\n foreach (glob($typo3temp . $this->tempFilePrefix . '*') as $tempFile) {\n @unlink($tempFile);\n }\n }", "private function clearLoggedUser() {\n\t\t$session = $this->getUserSession();\n\t\tif ($this->isAdmin()) {\n\t\t\t$session->setUser($this->getUserModel());\n\t\t} else {\n\t\t\t$session->setCustomer($this->getUserModel());\n\t\t}\n\t}", "public static function logout(): void\n {\n // Remove from the session (user object)\n unset($_SESSION['user']);\n }", "public function disconnetUser() {\n\t\tsession_start();\n\t\tunset($_SESSION['id_users']);\n\t\tunset($_SESSION['username']);\n\t\theader('Location: index.php');\n\t}", "public function resetExternalAction() {\n\t\tif (in_array(APPLICATION_ENV, array('development', 'sandbox', 'testing', 'demo'))) {\n\t\t\t$this->_validateRequiredParameters(array('user_id', 'user_key', 'starbar_id'));\n\t\t\tDb_Pdo::execute(\"DELETE FROM user_social WHERE user_id = ?\", $this->user_id);\n\t\t\tDb_Pdo::execute(\"UPDATE user SET username = '' WHERE id = ?\", $this->user_id);\n\t\t\treturn $this->_resultType(true);\n\t\t} else {\n\t\t\treturn $this->_resultType(false);\n\t\t}\n\t}", "public function reset(string $token, User $user);", "public function reset()\n {\n $this->values[self::user_id] = null;\n $this->values[self::list_type] = null;\n $this->values[self::page] = null;\n $this->values[self::page_size] = null;\n }", "public static function action_clean_user_cache( $user_id ) {\n\t\t$keys = array(\n\t\t\t'user-' . $user_id,\n\t\t\t'rest-user-' . $user_id,\n\t\t);\n\t\tpantheon_wp_clear_edge_keys( $keys );\n\t}", "protected function _clearAuthToken()\n {\n delete_transient($this->tokenOptionName);\n }", "public function logout(){\n\t\tunset($_SESSION['ccUser']);\n\t}", "public function logout(){\n\t\tunset($_SESSION['ccUser']);\n\t}", "public function destroy()\n {\n $userId = Helper::getIdFromUrl('user');\n \n if ((Helper::checkUrlIdAgainstLoginId($userId)) !== 'super-admin') {\n Usermodel::load()->destroy($userId);\n } else { \n View::render('errors/403.view', [\n 'message' => 'You cannot delete yourself!',\n ]);\n }\n }", "public function clearLogin() {\n\t\tsetcookie(\"login-email\", \"\", time(), \"/\");\n\t}", "public function clearUserAwards()\n\t{\n\t\t$this->collUserAwards = null; // important to set this to NULL since that means it is uninitialized\n\t}" ]
[ "0.6479358", "0.63353336", "0.60632753", "0.60345715", "0.60232234", "0.5948072", "0.58667064", "0.5866026", "0.5856409", "0.58261806", "0.5790806", "0.57888466", "0.57888466", "0.5779552", "0.57674336", "0.5752255", "0.5721877", "0.5716556", "0.5706657", "0.5636891", "0.56188685", "0.5614545", "0.55821764", "0.55821764", "0.55821764", "0.55821764", "0.55821764", "0.55821764", "0.55821764", "0.55821764", "0.55821764", "0.5579166", "0.557509", "0.55699635", "0.5563107", "0.55428", "0.55417633", "0.55353105", "0.55117893", "0.5508676", "0.54993063", "0.54825306", "0.54802155", "0.54774344", "0.54743475", "0.54735774", "0.5472786", "0.54692346", "0.54546225", "0.5447325", "0.5439881", "0.5431552", "0.541975", "0.5418434", "0.54128975", "0.541206", "0.54090035", "0.53853095", "0.53853095", "0.5381447", "0.537469", "0.53721815", "0.536112", "0.5357263", "0.5356261", "0.5343476", "0.5338889", "0.53351116", "0.53299826", "0.5329047", "0.5329047", "0.5329047", "0.5325856", "0.5323139", "0.53220654", "0.5321912", "0.5312671", "0.53017145", "0.5301096", "0.5301096", "0.5297673", "0.5297063", "0.52966374", "0.52966374", "0.52947885", "0.52847743", "0.5272166", "0.5269872", "0.5268537", "0.5263442", "0.5259111", "0.5254322", "0.5248057", "0.52480495", "0.5245035", "0.52428883", "0.52428883", "0.5241849", "0.52336633", "0.52307624" ]
0.71915627
0
Gets the temporary link from user registration.
function getTemporaryLink() { return $this->_temporaryLink; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registration_link():string{\n\t\treturn 'finspot:FingerspotReg;'.base64_encode(REGISTRATION_PATH.$this->id);\n\t}", "public function getTempLink()\n {\n return $this->temp_loc;\n }", "public function link() {\n return isset($this->_adaptee->user_info['user_username']) ? \"profile.php?user=\".$this->_adaptee->user_info['user_username'] : null;\n }", "function pms_get_register_success_url() {\r\n\r\n $settings = get_option( 'pms_general_settings' );\r\n\r\n if ( isset( $settings['register_success_page'] ) && $settings['register_success_page'] != -1 )\r\n return get_permalink( $settings['register_success_page'] );\r\n\r\n return '';\r\n }", "public function getSpotiiRegisterUrl()\n {\n return $this->registerUrl;\n }", "public function userTempFolder(): string\n {\n /** @var \\TYPO3\\CMS\\Core\\Resource\\Folder $folder */\n $folder = $this->getBeUser()->getDefaultUploadTemporaryFolder();\n return $folder->getPublicUrl();\n }", "public function generateRegisterUrl(): string\n {\n // This is why we 'fake' the username to a uniqid, to use the test system's token storage.\n return sprintf(\n '%s/register/%s',\n $this->accountEndpoint,\n $this->generateToken(\"register_\" . uniqid())\n );\n }", "public function getProfileLink()\n\t{\n\t\treturn site_url('profile/' . $this->hash);\n\t}", "public function getAccountLink()\n {\n return $this->account_link;\n }", "public function getActivationUrl() {\n\t\t$activationUrl = '/registration/activation';\n\t\tif (isset ( $this->profile )) {\n\t\t\t$params ['key'] = $this->activationKey;\n\t\t\t$params ['email'] = $this->profile->email;\n\t\t\t\n\t\t\treturn Yii::app ()->controller->createAbsoluteUrl ( $activationUrl, $params );\n\t\t}\n\t}", "public function redirectAfterRegister($redirect)\n {\n return wc_get_page_permalink('myaccount');\n }", "function myAccountLink(){\n\tglobal $current_user;\n\tget_currentuserinfo();\n\n\tif ( is_user_logged_in() ) {\n\t\t$link = \"<a href='/my-account'>Logged in as: \" . $current_user->user_firstname . \" \" . $current_user->user_lastname . \"</a>\";\n\t} else {\n\t\t$link = '';\n\t}\n\n\treturn $link;\n}", "public function getActivationUrl()\n\t{\n\t\tif (Yum::module('registration')) {\n\t\t\t$activationUrl = Yum::module('registration')->activationUrl;\n\t\t\tif (is_array($activationUrl) && isset($this->profile)) {\n\t\t\t\t$activationUrl = $activationUrl[0];\n\t\t\t\t$params['key'] = $this->activationKey;\n\t\t\t\t$params['email'] = $this->profile->email;\n\n\t\t\t\treturn Yii::app()->controller->createAbsoluteUrl($activationUrl, $params);\n\t\t\t}\n\t\t}\n\t\treturn Yum::t('Activation Url cannot be retrieved');\n\t}", "function getLink() {\n return new Hyperlink($this->getName(),\"/user/$this->id\",'userlink');\n }", "public function createReferralLink() : string\n {\n $url = $this->storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_WEB);\n $encrypt = urlencode($this->encryptor->encrypt($this->customerSession->getCustomerId()));\n $link = $url . \"?ref=\" . $encrypt;\n return $link;\n }", "public function getActivationUrl()\n\t{\n\t\treturn url('account/activate/'.$this->id.'/'.$this->activation_token);\n\t}", "protected function getOneTimeLoginUrl() {\n $user = User::load(1);\n \\Drupal::moduleHandler()->load('user');\n return user_pass_reset_url($user);\n }", "function generate_follow_link() {\n\t\treturn str_replace( 'swfw_username', $this->username, $this->url);\n\t}", "public function getUnRegisterUrl()\n {\n return $this->UnRegisterUrl;\n }", "public function getLinkRegister($format = UrlGeneratorInterface::RELATIVE_PATH)\n {\n return $this->generator->generate('authProfileRegister', [], $format);\n }", "public function getRegistrationCompareUrl () {\n\t $date = date('Y-m-d H:i:s', $this->regisrtime);\n\t $date = urlencode($date);\n return 'http://'.$_SERVER['HTTP_HOST'].'/users/confirmregistration/?date='.$date.'&id='.$this->id.'&code='.$this->getRegistrationCode();\n }", "protected function verificationUrl()\n {\n return Url::temporarySignedRoute(\n 'verification.verify',\n Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),\n ['id' => $this->user->getKey()]\n );\n }", "public function getCreateAccountUrl()\n {\n $url = $this->getData('create_account_url');\n if (is_null($url)) {\n $url = $this->helper('customer')->getRegisterUrl();\n }\n return $url;\n }", "public function generateUserTokenUrl(AccountInterface $account);", "function getRedirectLink()\n {\n global $wgRequest;\n if($this->user->isTemporary)\n {\n // User is viewing this from liveshow, means we have to redirect back to ViewSurvey page,\n // and not the wiki page.\n // In this case 'returnto' value does not mean anything, we know where to return.\n $t = Title::newFromText('Special:ViewSurvey');\n\n $url = $t->getLocalURL('liveshow='.$this->user->getTemporaryKey($this->page_id)\n .'&id='.$this->page_id\n .'&userID='.$this->user->userID).'#survey_id_'.$this->page_id;\n return $url;\n }\n else\n {\n $title = Title::newFromText($wgRequest->getVal('returnto'));\n return $title->getLocalURL();\n }\n }", "function wp_registration_url()\n {\n }", "public function add_registration_link_text() {\n\t\t\tprintf(\n\t\t\t\t'<p class=\"ast-woo-form-actions\">\n\t\t\t\t\t%1$s\n\t\t\t\t\t<a href=\"#ast-woo-register\" data-type=\"do-register\" class=\"ast-woo-account-form-link\">\n\t\t\t\t\t\t%2$s\n\t\t\t\t\t</a>\n\t\t\t\t</p>',\n\t\t\t\tapply_filters( 'astra_addon_woo_account_register_heading', __( 'Not a member?', 'astra-addon' ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t\tapply_filters( 'astra_addon_woo_account_register_string', __( 'Register', 'astra-addon' ) ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t);\n\t\t}", "public function sendForgotPasswordLink(){\n return $this->repository->sendForgotPasswordLink();\n }", "function get_generic_link() {\n\t\treturn $this->url;\n\t}", "public function getRegistrationInitURL() {\n\t\treturn Mage::helper(\"adminhtml\")->getUrl(self::URL_REGISTRATION_INIT);\n\t}", "function setTemporaryLink(UserLink $link)\n {\n $this->_temporaryLink = $link;\n return $this;\n }", "public function getForgotPasswordUrl()\n {\n return $this->helper('customer')->getForgotPasswordUrl();\n }", "function buildLink($ip, $cognome, $nome, $email, $hash){\n $link='http://'.$ip.'/PhpMySqlAndroid/userConfirmEmail.php?'.\n 'cognome='.$cognome.\n '&nome='.$nome.\n '&email='.$email.\n '&hash='.$hash;\n\n return $link;\n }", "public function authLink() {\n return $this->direct();\n }", "public function forgot_password_link($user)\n {\n $data['first_name'] = $user->first_name;\n\n $token = $data['token'] = str_random(100); // Generate random string values - limit 100\n $url = $data['url'] = URL::to('/').'/';\n\n $data['locale'] = App::getLocale();\n\n $password_resets = new PasswordResets;\n\n $password_resets->email = $user->email;\n $password_resets->token = $data['token'];\n $password_resets->created_at = date('Y-m-d H:i:s');\n \n $password_resets->save(); // Insert a generated token and email in password_resets table\n logger(\"testingg llogger\");\n $email = $user->email;\n $content = [\n 'first_name' => $user->first_name, \n 'url'=> $url,\n 'token' => $token\n ];\n // Send Forgot password email to give user email\n try {\n Mail::to($email)->queue(new ForgotPasswordMail($content));\n return true;\n // $jsonString = file_get_contents($destinationPath); \n }\n catch (\\Exception $e) {\n return false ;\n // $jsonString = \"\"; \n }\n }", "public function getPageUrl()\n {\n if ($this->hasData(static::REGISTRATION_URL)) {\n return $this->getData(static::REGISTRATION_URL);\n } elseif ($this->hasData(static::CONFIGURATION_URI)) {\n return $this->getData(static::CONFIGURATION_URI);\n } elseif ($this->hasData(static::REGISTRATION_URI)) {\n return $this->getData(static::REGISTRATION_URI);\n }\n\n return '';\n }", "public function urlOfRegisterPage($redirectBack = null)\n {\n return sprintf(\n '%s/auth/register?client_id=%s&redirect_uri=%s',\n $this->root,\n $this->client_id,\n $redirectBack ?: $this->redirect_uri\n );\n }", "public function urlTemporaryCredentials()\n {\n return 'https://api.twitter.com/oauth/request_token';\n }", "public function getActivationUrl(ICrugeStoredUser $user)\r\n {\r\n return\r\n rtrim(CrugeUtil::config()->baseUrl, \"/\")\r\n . CrugeUtil::uiaction('activationurl', array('key' => $user->authkey));\r\n }", "static private function getActivationLink($hash) {\r\n\t\treturn System::getFullDomain().'login.php?activate='.$hash;\r\n\t}", "function _s_reset_password_link() {\n return sprintf( '<a href=\"%s/lost-password/\">%s</a>', site_url(), __( 'Forgot your password?' ) );\n}", "public function getAuthSetupLink() {\n return @$this->attributes['auth_setup_link'];\n }", "function sos_wp_register( $before = '<li>', $after = '</li>', $echo = true ) {\n if ( ! is_user_logged_in() ) {\n if ( get_option('users_can_register') )\n $link = $before . '<a href=\"' . esc_url( wp_registration_url() ) . '\" class=\"btn btn-info\">' . __('Create Account') . '</a>' . $after;\n else\n $link = '';\n } elseif ( current_user_can( 'read' ) ) {\n $link = $before . '<a href=\"' . admin_url() . '\" class=\"btn btn-info\">' . __('View Dashboard') . '</a>' . $after;\n } else {\n $link = '';\n }\n\n /**\n * Filters the HTML link to the Registration or Admin page.\n *\n * Users are sent to the admin page if logged-in, or the registration page\n * if enabled and logged-out.\n *\n * @since 1.5.0\n *\n * @param string $link The HTML code for the link to the Registration or Admin page.\n */\n $link = apply_filters( 'register', $link );\n\n if ( $echo ) {\n echo $link;\n } else {\n return $link;\n }\n}", "function requestUserLogin($linkText)\n{\n $authSubUrl = getAuthSubUrl();\n echo \"<a href=\\\"{$authSubUrl}\\\">{$linkText}</a>\";\n}", "public function getConfirmInscriptionURL(){\n return $this->rootUrl().\"confirmInscription\";\n }", "protected function defaultSuccessUrl()\n {\n return $this->user->getReturnUrl();\n }", "public function getExternalChangePasswordUrl();", "protected function _join_url()\n {\n return get_forum_base_url() . '/member.php?action=register';\n }", "public function getForgotPasswordUrl() {\n return $this->_customerUrl->getForgotPasswordUrl ();\n }", "public function getAccountUrl()\n {\n return $this->accountUrl;\n }", "protected function getConfirmEmailUrl()\n {\n $hash = base64_encode($this->user->password_hash);\n $email = $this->person->email;\n $baseUrl = NotificationUtil::getApplicationBaseUrl();\n $confirmEmailUrl = $baseUrl . $this->getValidateUrl() . '?hash=' . $hash . '&email=' . $email;\n return $confirmEmailUrl;\n }", "function grabUserAccountInfo(){\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\t\t\n\t\t$app \t = JFactory::getApplication();\n\t\t$session = JFactory::getSession();\n\t\t$post \t = $app->input->post->getArray();\n\t\t\n\t\t$session->set('userInfo', $post, 'register');\n\t\t\n\t\t//find step 3 or 4; step 4 = normal registration; step 3 = skip plan\n\t\t$skipPlan \t= $session->get('skipPlan', 0, 'register');\n\t\t$step = ($skipPlan) ? 'step=3' : 'step=4';\n\t\t\n\t\t$link = JRoute::_('index.php?option=com_jblance&view=guest&layout=usergroupfield&'.$step, false);\n\t\t$this->setRedirect($link);\n\t\treturn false;\n\t}", "public function getShortcutLinkText ()\n {\n $text = $this->scopeConfig->getValue(\n 'b2bregistration/register/shortcut_link_text',\n ScopeInterface::SCOPE_STORE\n );\n return $text;\n }", "public function displayGoogleRegisterLink()\n {\n if ($this->use_google_login === true) {\n $client = $this->newGoogleClient($this->getGoogleOptions());\n $auth_url = $client->createAuthUrl();\n \n if (isset($auth_url)) {\n echo '<p class=\"google-register oauth-login\"><a href=\"'.$auth_url.'\">'.__('Register with Google', 'okv-oauth').'</a></p>';\n }\n \n if (isset($_REQUEST['error'])) {\n $this->googleRegisterError($_REQUEST['error'], true);\n return false;\n }\n \n if (isset($_COOKIE['google_access_token']) && !empty($_COOKIE['google_access_token'])) {\n $check_user_result = $this->googleRegisterCheckUser();\n if ($check_user_result === false) {\n return false;\n } elseif (is_array($check_user_result)) {\n // check user passed. now it is ready to prepare register form.\n echo '<script>'.\"\\n\";\n echo 'var okvoauth_google_register_got_code = true;'.\"\\n\";\n echo 'var okvoauth_google_wp_user_login = \\''.(isset($check_user_result['wp_user_login']) ? $check_user_result['wp_user_login'] : '').'\\';'.\"\\n\";\n echo 'var okvoauth_google_wp_user_email = \\''.(isset($check_user_result['wp_user_email']) ? $check_user_result['wp_user_email'] : '').'\\';'.\"\\n\";\n echo 'var okvoauth_google_wp_user_avatar = \\''.(isset($check_user_result['wp_user_avatar']) ? $check_user_result['wp_user_avatar'] : '').'\\';'.\"\\n\";\n echo '</script>'.\"\\n\";\n }\n unset($check_user_result);\n }\n \n unset($auth_url, $client);\n return true;\n } else {\n return false;\n }\n }", "protected function storeReturnUrl(TemporaryCredentials $temp)\n {\n if ($url = $this->request->input('return_url')) {\n $key = 'oauth_return_url_'.$temp->getIdentifier();\n $this->cache->put($key, $url, ProviderContract::CACHE_TTL);\n }\n }", "public function generate(\\WP_User $User, $token) {\n $url = \\home_url();\n $url = \\add_query_arg( self::USER_PARAM, $User->ID, $url );\n $url = \\add_query_arg( self::TOKEN_PARAM, $token, $url );\n $url = \\add_query_arg( self::NONCE_PARAM, \\wp_create_nonce(self::NONCE_ACTION), $url );\n return $url;\n }", "function generateInviteLink(){\n\t\treturn \"https://app.healthlynked.com/#!/group_join_invite/\".$this->secret.\"?return_url=access_control\";\n\t}", "function get_shortcut_link()\n {\n }", "public function getLink();", "public function getLink();", "public function get_link() {\r\n return $this->link;\r\n }", "public function getLink($type='')\n\t{\n\t\tif (!$id = $this->get('uidNumber'))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$link = 'index.php?option=com_members&id=' . $id;\n\n\t\t// If it doesn't exist or isn't published\n\t\t$type = strtolower($type);\n\t\tswitch ($type)\n\t\t{\n\t\t\tcase 'edit':\n\t\t\tcase 'changepassword':\n\t\t\t\t$link .= '&task=' . $type;\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\treturn $link;\n\t}", "function getLink(): string;", "protected function getRedirectionUrl(UserInterface $user)\n {\n return $this->container->get('router')->generate('fos_user_profile_show');\n }", "protected function getRedirectionUrl(UserInterface $user)\n {\n return $this->container->get('router')->generate('fos_user_profile_show');\n }", "public function referredSignup($ref)\n {\n $findRef = User::where('refer_id', $ref)->firstOrFail();\n if (empty($findRef)) {\n return redirect('/');\n } else {\n // store refer ID to session\n session()->put('referred', $findRef->refer_id);\n session()->flash('success', 'Thank you for visiting GOENERGEE, Please Proceed to Signup');\n return redirect()->route('guest.signup');\n // return view('referral-signup')->withRef($findRef->refer_id);\n }\n }", "public function get_link()\n {\n\n return $this->link;\n }", "public function getOfficialLink();", "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "function generate_link_hash($link_name)\n{\n\tglobal $user;\n\n\tif (!isset($user->data[\"hash_$link_name\"]))\n\t{\n\t\t$user->data[\"hash_$link_name\"] = substr(sha1($user->data['user_form_salt'] . $link_name), 0, 8);\n\t}\n\n\treturn $user->data[\"hash_$link_name\"];\n}", "public function getVerificationLink(): ?string\n {\n return $this->verificationLink;\n }", "protected function redirectTo()\n {\n $url = Skill::checkUserStatus();\n return $url;\n }", "public function getSenderUrl()\n {\n if (count($this->sender()->first()) > 0)\n return URL::to('/profile/'.$this->sender()->first()->username);\n else\n return URL::to('#');\n }", "public function getTemporaryUrl(DateTimeInterface $expiration, array $options = []): string\n {\n throw UrlCannotBeDetermined::filesystemDoesNotSupportTemporaryUrls();\n }", "public function url()\n {\n return parent::url().'register';\n }", "public function getLinkAttribute(): string\n {\n return url('users', $this);\n }", "public function getLink() {}", "public function get_renewal_url() {\n\t\t$renewal_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'renew',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $renewal_url;\n\t}", "public function inviteLink(): string {\n return tools::inviteLink($this->id);\n }", "function getAddUserUrl(){\n return assemble_url('people_company_user_add', array('company_id' => $this->getId())); \n }", "function getUserlink($id, $name = '')\n{\n\tif(!$name)\n\t\t$name = getUsername($id);\n\n\tif($name)\n\t\treturn makeLink($name, 'a=viewuserdetails&user=' . $id, SECTION_USER);\n\telse\n\t\treturn 'Guest';\n}", "public function getForgetPasswordUrl() {\n\t\treturn $this->getEmailActionLink('email/changePassword');\n\t}", "public function getUrl()\n\t{\n\t\treturn App\\Purifier::decodeHtml($this->get('linkto'));\n\t}", "public function generateAutoLoginLink($params){\n $dataRequest = array();$dataRequestAppend = array();\n // Destination ID\n if (isset($params['r'])){\n $dataRequest['r'] = $params['r']; $dataRequestAppend[] = '/(r)/'.rawurlencode(base64_encode($params['r']));\n }\n // User ID\n if (isset($params['u']) && is_numeric($params['u'])){\n $dataRequest['u'] = $params['u']; $dataRequestAppend[] = '/(u)/'.rawurlencode($params['u']);\n }\n // Username\n if (isset($params['l'])){\n $dataRequest['l'] = $params['l']; $dataRequestAppend[] = '/(l)/'.rawurlencode($params['l']);\n }\n if (!isset($params['l']) && !isset($params['u'])) {\n throw new Exception('Username or User ID has to be provided');\n }\n // Expire time for link\n if (isset($params['t'])){\n $dataRequest['t'] = $params['t'];\n $dataRequestAppend[] = '/(t)/'.rawurlencode($params['t']);\n }\n $hashValidation = sha1($params['secret_hash'].sha1($params['secret_hash'].implode(',', $dataRequest)));\n return \"index.php/user/autologin/{$hashValidation}\".implode('', $dataRequestAppend);\n }", "function activate_url() {\r\n\t\t\tif ( !um_user('account_secret_hash') ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\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_activate_url\r\n\t\t\t * @description Change activate user URL\r\n\t\t\t * @input_vars\r\n\t\t\t * [{\"var\":\"$url\",\"type\":\"string\",\"desc\":\"Activate URL\"}]\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_activate_url', 'function_name', 10, 1 ); ?>\r\n\t\t\t * @example\r\n\t\t\t * <?php\r\n\t\t\t * add_filter( 'um_activate_url', 'my_activate_url', 10, 1 );\r\n\t\t\t * function my_activate_url( $url ) {\r\n\t\t\t * // your code here\r\n\t\t\t * return $url;\r\n\t\t\t * }\r\n\t\t\t * ?>\r\n\t\t\t */\r\n\t\t\t$url = apply_filters( 'um_activate_url', home_url() );\r\n\t\t\t$url = add_query_arg( 'act', 'activate_via_email', $url );\r\n\t\t\t$url = add_query_arg( 'hash', um_user('account_secret_hash'), $url );\r\n\t\t\t$url = add_query_arg( 'user_id', um_user('ID'), $url );\r\n\r\n\t\t\treturn $url;\r\n\t\t}", "public function getEditRegister(){\n\t\treturn base_url(route_to('escuela_edit', $this->id_escuela));\n\t}", "public function getURL()\n {\n return $this->uRL;\n }", "public function getAccountURL()\n {\n return $this->config['account_url'];\n }", "function url_signup($person): string\n{\n $base = getOption('page_signup', 'signup');\n $params = 'pkey=' . $person->web_key;\n return url_build($base, $params);\n}", "protected function getRedirectionUrl(UserInterface $user)\n {\n return $this->container->get('router')->generate('sonata_user_profile_show');\n }", "public function register($temp)\n {\n // Initialise the table with JUser.\n $user = new JUser;\n $data = (array) $this->getData();\n\n // Merge in the registration data.\n foreach($temp as $k => $v) {\n $data[$k] = $v;\n }\n\n // Prepare the data for the user object.\n $data['email'] = JStringPunycode::emailToPunycode($data['email1']);\n $data['password'] = $data['password1'];\n $data['name'] = $data['firstname'].' '.$data['lastname'];\n $data['activation'] = $data['block'] = 0;\n\n // Bind the data.\n if(!$user->bind($data)) {\n $this->setError(JText::sprintf('COM_KETSHOP_REGISTRATION_BIND_FAILED', $user->getError()));\n return false;\n }\n\n // Load the users plugin group.\n JPluginHelper::importPlugin('user');\n\n // Store the data.\n if(!$user->save()) {\n $this->setError(JText::sprintf('COM_KETSHOP_REGISTRATION_SAVE_FAILED', $user->getError()));\n return false;\n }\n\n // N.B: The linking with the ketshop customer as well as his addresses is performed by the\n // ketshop user plugin in the onUserAfterSave section.\n\n $config = JFactory::getConfig();\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Compile the notification mail values.\n $data = $user->getProperties();\n $data['fromname'] = $config->get('fromname');\n $data['mailfrom'] = $config->get('mailfrom');\n $data['sitename'] = $config->get('sitename');\n $data['siteurl'] = JUri::root();\n\n $emailSubject = JText::sprintf('COM_USERS_EMAIL_ACCOUNT_DETAILS', $data['name'], $data['sitename']);\n $emailBody = JText::sprintf('COM_USERS_EMAIL_REGISTERED_BODY_NOPW', $data['name'], $data['sitename'], $data['siteurl']);\n\n // Send the registration email.\n $return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $data['email'], $emailSubject, $emailBody);\n\n // Check for an error.\n if($return !== true) {\n $this->setError(JText::_('COM_USERS_REGISTRATION_SEND_MAIL_FAILED'));\n return false;\n }\n\n return $user->id;\n }", "function NeedToRegister(){\n \t$HTML = '';\n\n \t$HTML .= _JNEWS_REGISTER_REQUIRED . '<br />';\n\n\t\t $text = _NO_ACCOUNT.\" \";\n\t\t if ( isset( $GLOBALS[JNEWS.'cb_integration'] ) && $GLOBALS[JNEWS.'cb_integration'] ) {\n\t\t\t $linkme = 'option=com_comprofiler&task=registers';\n\t\t } else {\n\t\t \tif( version_compare(JVERSION,'1.6.0','>=') ){ //j16\n\t\t \t\t$linkme = 'option=com_users&view=registration';\n\t\t \t} else {\n\t\t \t\t$linkme = 'option=com_user&task=register';\n\t\t \t}\n\t\t }\n\n\t\t $linkme = jNews_Tools::completeLink($linkme,false);\n\n\t\t $text .= '<a href=\"'. $linkme.'\">';\n\t\t $text .= _CREATE_ACCOUNT.\"</a>\";\n\t\t $HTML .= jnews::printLine( $this->linear, $text );\n\n \treturn $HTML;\n }", "public function get_link()\n\t{\n\t\treturn $this->link;\n\t}", "function tm_loginpage_custom_link() {\n\treturn esc_url( home_url( '/' ) );\n}", "public function get_users_href() {\n $users = $this->get_users();\n $ret_str = \"\";\n foreach($users as $index=>$user) {\n $ret_str .= $user->get_ahref();\n if($index != count($users)-1) {\n $ret_str .= \" , \";\n }\n }\n return $ret_str;\n }", "protected function getRedirectionUrl(UserInterface $user)\n {\n return $this->container->get('router')->generate('sylius_account_change_password');\n }", "public static function getLink()\n {\n return self::$link;\n }", "function activate_account_via_email_link() {\r\n\t\t\tif ( isset($_REQUEST['act']) && $_REQUEST['act'] == 'activate_via_email' && isset($_REQUEST['hash']) && is_string($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 &&\r\n\t\t\t isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id']) ) { // valid token\r\n\r\n\t\t\t\t$user_id = absint( $_REQUEST['user_id'] );\r\n\t\t\t\tdelete_option( \"um_cache_userdata_{$user_id}\" );\r\n\r\n\t\t\t\tum_fetch_user( $user_id );\r\n\r\n\t\t\t\tif ( strtolower($_REQUEST['hash']) !== strtolower( um_user('account_secret_hash') ) )\r\n\t\t\t\t\twp_die( __( 'This activation link is expired or have already been used.','ultimate-member' ) );\r\n\r\n\t\t\t\tUM()->user()->approve();\r\n\t\t\t\t$redirect = ( um_user('url_email_activate') ) ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');\r\n\t\t\t\t$login = (bool) um_user('login_email_activate');\r\n\r\n\t\t\t\t// log in automatically\r\n\t\t\t\tif ( ! is_user_logged_in() && $login ) {\r\n\t\t\t\t\t$user = get_userdata($user_id);\r\n\t\t\t\t\t$user_id = $user->ID;\r\n\r\n\t\t\t\t\t// update wp user\r\n\t\t\t\t\twp_set_current_user( $user_id, $user->user_login );\r\n\t\t\t\t\twp_set_auth_cookie( $user_id );\r\n\r\n\t\t\t\t\tob_start();\r\n\t\t\t\t\tdo_action( 'wp_login', $user->user_login, $user );\r\n\t\t\t\t\tob_end_clean();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tum_reset_user();\r\n\t\t\t\t/**\r\n\t\t\t\t * UM hook\r\n\t\t\t\t *\r\n\t\t\t\t * @type action\r\n\t\t\t\t * @title um_after_email_confirmation\r\n\t\t\t\t * @description Action on user activation\r\n\t\t\t\t * @input_vars\r\n\t\t\t\t * [{\"var\":\"$user_id\",\"type\":\"int\",\"desc\":\"User ID\"}]\r\n\t\t\t\t * @change_log\r\n\t\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t\t * @usage add_action( 'um_after_email_confirmation', 'function_name', 10, 1 );\r\n\t\t\t\t * @example\r\n\t\t\t\t * <?php\r\n\t\t\t\t * add_action( 'um_after_email_confirmation', 'my_after_email_confirmation', 10, 1 );\r\n\t\t\t\t * function my_after_email_confirmation( $user_id ) {\r\n\t\t\t\t * // your code here\r\n\t\t\t\t * }\r\n\t\t\t\t * ?>\r\n\t\t\t\t */\r\n\t\t\t\tdo_action( 'um_after_email_confirmation', $user_id );\r\n\r\n\t\t\t\texit( wp_redirect( $redirect ) );\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "function ptl_signnow_signing_link($user_details) {\n $document_id = (isset($_SESSION['document_id']) && !empty($_SESSION['document_id'])) ? $_SESSION['document_id'] : '';\n $signerToken = (isset($_SESSION['signer_token']) && !empty($_SESSION['signer_token'])) ? $_SESSION['signer_token'] : '';\n\n // If no document exists, or user has requested a new link, create a new document and token\n if ($document_id == '') {\n ptl_signnow_invite_signer($user_details);\n $document_id = (isset($_SESSION['document_id']) && !empty($_SESSION['document_id'])) ? $_SESSION['document_id'] : '';\n $signerToken = (isset($_SESSION['signer_token']) && !empty($_SESSION['signer_token'])) ? $_SESSION['signer_token'] : '';\n }\n \n if (!empty($signerToken) && !empty($document_id)) {\n $signHref = SignNow::$webBaseURL . \"dispatch?route=fieldinvite&document_id=\".$document_id.\"&access_token=\".$signerToken.\"&redirect_uri=http://tadaoa.com&mobileweb=mobileweb_only\";\n return $signHref;\n }\n //we have an empty token or document id\n return '';\n}", "public function getLink(): string;" ]
[ "0.66361535", "0.6517011", "0.6459022", "0.62687826", "0.62031275", "0.61700606", "0.61397725", "0.6110055", "0.6071891", "0.6024001", "0.59574497", "0.59408706", "0.5908403", "0.58708066", "0.5862238", "0.58469903", "0.58068836", "0.5785397", "0.5782469", "0.5757268", "0.57569", "0.5755782", "0.57409555", "0.5703364", "0.56941277", "0.56688166", "0.56684315", "0.5636914", "0.5625994", "0.56216127", "0.55996156", "0.5594543", "0.5574387", "0.55577683", "0.5522286", "0.5519825", "0.5502565", "0.54775697", "0.54540825", "0.54537755", "0.5440229", "0.5437802", "0.5426795", "0.54248285", "0.5417215", "0.5410451", "0.5402291", "0.53970546", "0.5388907", "0.5378236", "0.5376482", "0.53763336", "0.53722584", "0.5368094", "0.5362048", "0.53519505", "0.5349654", "0.53442276", "0.53400874", "0.53400874", "0.53345716", "0.5328518", "0.5326043", "0.5323389", "0.5323389", "0.5317633", "0.53162533", "0.5314566", "0.5313407", "0.5305999", "0.52885413", "0.5285294", "0.52787393", "0.52781713", "0.52695274", "0.5263176", "0.5251679", "0.5245321", "0.5241379", "0.52404284", "0.5240023", "0.5235834", "0.5224577", "0.5222307", "0.52186376", "0.5217795", "0.5216388", "0.5195041", "0.51909417", "0.5187184", "0.5186489", "0.5178735", "0.51779455", "0.5161164", "0.5160353", "0.5149827", "0.51485527", "0.51479423", "0.51333416", "0.51322436" ]
0.7446525
0
///////////////////////////////// Utilities ///////////////////////////////// Gets the mailer parameters when sending email to this user.
protected function getMailerParams() { $app = $this->getApp(); return [ 'base_url' => $app['base_url'], 'siteEmail' => $app['config']->get('app.email'), 'email' => $this->email, 'username' => $this->name(true), 'to' => [ [ 'email' => $this->email, 'name' => $this->name(true), ], ], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepareAndGetMailParams()\n {\n $sendParam['title'] = strip_tags($this->notification->post->title);\n $sendParam['subject'] = \"[{$this->config->site->name}] \" . strip_tags($this->notification->post->title);\n $sendParam['post_url'] = $this->notificationService->getRelatedPostUrl($this->notification);\n $sendParam['settings_url'] = container('config')->site->url . '/settings';\n $sendParam['html_content'] = $this->prepareHtmlContent($sendParam);\n $sendParam['text_content'] = $this->getTextContent($this->prepareTextlContent($sendParam));\n\n return $sendParam;\n }", "protected function getEmailParams($params) {\n $siteInfo = $this->container->get('e2w_siteinfo_service');\n $whitelabel = $siteInfo->getLabeledUrl($params['owner']->getLabel(), $params['owner']->getAgentId());\n $translator = $this->container->get('translator');\n\n $get5Url = $whitelabel['url'];\n\n $unsubscribeUrl = $get5Url . \"/dashboard/unsubscribe/\" . $params['owner']->getId() . \".\" . $params['owner']->getHash() . \"/low_review\";\n $actionUrl = $get5Url . '/agency/redirect-to-business/' . $params['owner']->getId() . '/customer-' . $params['customer']->getId();\n\n $emailParams = array(\n 'action_url' => $actionUrl,\n //'unsubscribe_url' => $unsubscribeUrl,\n 'get5_url' => $get5Url,\n 'current_year' => date('Y'),\n 'business_name' => $params['business']->getName(),\n 'subject' => $translator->trans('Customer Feedback Alert for %businessName%', array('%businessName%' => $params['business']->getName())),\n 'isAllstate' => $siteInfo->isAllstate($whitelabel['domain']),\n 'isWhitelabeled' => $whitelabel['labeled']\n );\n\n $emailParams['team'] = $whitelabel['labeled'] ? $whitelabel['info']['title'] : 'GetFiveStars';\n\n return $emailParams;\n }", "protected function mail_config(){\n\t\t\t\t\n\t\treturn array(\n\t\t\t\"protocol\" \t\t=> \"smtp\",\n\t\t\t\"smtp_secure\"\t=> \"ssl\",\n\t\t\t\"smtp_host\" \t=> \"mail.hostname.com\",\n\t\t\t\"smtp_port\"\t\t=> 465,\n\t\t\t\"smtp_timeout\"\t=> 5,\n\t\t\t\"smtp_user\"\t\t=> \"[email protected]\",\n\t\t\t\"smtp_pass\"\t\t=> \"password\",\n\t\t\t\"mailtype\"\t\t=> \"html\",\n\t\t\t\"crlf\"\t\t\t=> \"\\r\\n\",\n\t\t\t\"newline\"\t\t=> \"\\r\\n\",\n\t\t\t\"wordwrap\"\t\t=> true\n\t\t);\n\t\t\n\t\t\n\t}", "public function getPosterEmail() {\n\t\treturn $this->posterEmail;\n\t}", "function get_hoster_email()\t{\n\t\t// some mandants may have configured an individual hoster_email in their TS-Template\n\t\tif(!empty($this->conf['contact_email']) && t3lib_div::validEmail($this->conf['contact_email'])){\n\t\t\treturn $this->conf['contact_email'];\n\t\t}\n\n\t\t// default: take the email-adress given in tx_civserv_configuration\n\t\t$hoster_email=\"\";\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'cf_value',\t\t\t \t\t\t\t\t\t\t// SELECT ...\n\t\t\t'tx_civserv_configuration',\t\t\t\t\t\t// FROM ...\n\t\t\t'cf_key = \"mail_to\"',\t\t// AND title LIKE \"%blabla%\"', // WHERE...\n\t\t\t'', \t\t\t\t\t\t\t\t\t\t\t// GROUP BY...\n\t\t\t'', \t\t\t\t\t\t\t\t\t\t\t// ORDER BY...\n\t\t\t'' \t\t\t\t\t\t\t\t\t\t\t\t// LIMIT to 10 rows, starting with number 5 (MySQL compat.)\n\t\t);\n\t\tif($res){\n\t\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\t\t\t$hoster_email = $row['cf_value'];\n\t\t}else{\n\t\t\t$hoster_email = \"info@some_hoster.de\";\n\t\t}\n\t\tif ($hoster_email == ''){\n\t\t\t$hoster_email = \"info@some_hoster.de\";\n\t\t}\n\t\treturn $hoster_email;\n\t}", "public function getUserMail() {\n return $this->mail;\n }", "public function getBuyerEmail() {\n return $this->params[\"original\"][\"buyer_email\"];\n }", "function admin_get_smtp_config()\n{\n global $app, $globalSettings;\n\n $mail = ['username' => $globalSettings[SMTP_USER],\n 'password' => $globalSettings[SMTP_PASSWORD],\n 'smtpserver' => $globalSettings[SMTP_SERVER],\n 'smtpport' => $globalSettings[SMTP_PORT],\n 'smtpenc' => $globalSettings[SMTP_ENCRYPTION]];\n $app->render('admin_mail.html', [\n 'page' => mkPage(getMessageString('admin_mail'), 0, 2),\n 'mail' => $mail,\n 'encryptions' => mkEncryptions(),\n 'isadmin' => is_admin()]);\n}", "public function getMail()\n {\n return $this->Mail_user;\n }", "public function getEmail()\n {\n return $this->getParam(self::EMAIL);\n }", "public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "public function gatherActivationEmailProperties() {\n /* generate a password and encode it and the username into the url */\n $pword = $this->modx->user->generatePassword();\n $confirmParams['lp'] = $this->login->base64url_encode($pword);\n $confirmParams['lu'] = $this->login->base64url_encode($this->user->get('username'));\n $confirmParams = array_merge($this->persistParams,$confirmParams);\n\n /* if using redirectBack param, set here to allow dynamic redirection\n * handling from other forms.\n */\n $redirectBack = $this->modx->getOption('redirectBack',$_REQUEST,$this->controller->getProperty('redirectBack',''));\n if (!empty($redirectBack)) {\n $confirmParams['redirectBack'] = $redirectBack;\n }\n $redirectBackParams = $this->modx->getOption('redirectBackParams',$_REQUEST,$this->controller->getProperty('redirectBackParams',''));\n if (!empty($redirectBackParams)) {\n $confirmParams['redirectBackParams'] = $redirectBackParams;\n }\n\n /* generate confirmation url */\n if ($this->login->inTestMode) {\n $confirmUrl = $this->modx->makeUrl(1,'',$confirmParams,'full');\n } else {\n $confirmUrl = $this->modx->makeUrl($this->controller->getProperty('activationResourceId',1),'',$confirmParams,'full');\n }\n\n /* set confirmation email properties */\n $emailTpl = $this->controller->getProperty('activationEmailTpl','lgnActivateEmailTpl');\n $emailTplAlt = $this->controller->getProperty('activationEmailTplAlt','');\n $emailTplType = $this->controller->getProperty('activationEmailTplType','modChunk');\n $emailProperties = $this->user->toArray();\n $emailProperties['confirmUrl'] = $confirmUrl;\n $emailProperties['tpl'] = $emailTpl;\n $emailProperties['tplAlt'] = $emailTplAlt;\n $emailProperties['tplType'] = $emailTplType;\n $emailProperties['password'] = $this->dictionary->get($this->controller->getProperty('passwordField','password'));\n\n $this->setCachePassword($pword);\n return $emailProperties;\n }", "function email_settings()\r\n\t{\r\n\t\tglobal $ibforums, $std, $print;\r\n\r\n\t\tif ($ibforums->member['disable_mail'])\r\n\t\t{\r\n\t\t\t$ibforums->lang['no_mail'] = sprintf($ibforums->lang['no_mail'], $ibforums->member['disable_mail_reason']);\r\n\r\n\t\t\t$this->output .= View::make(\"global.warn_window\", ['message' => $ibforums->lang['no_mail']]);\r\n\t\t} else\r\n\t\t{\r\n\r\n\t\t\t// PM_REMINDER: First byte = Email PM when received new\r\n\t\t\t// \t\t\tSecond byte= Show pop-up when new PM received\r\n\r\n\t\t\t$info = array();\r\n\r\n\t\t\tforeach (array('hide_email', 'allow_admin_mails', 'email_full', 'email_pm', 'auto_track') as $k)\r\n\t\t\t{\r\n\t\t\t\tif (!empty($this->member[$k]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$info[$k] = 'checked';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$info['key'] = $this->md5_check;\r\n\r\n\t\t\t$this->output .= View::make(\"ucp.email\", ['Profile' => $info]);\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}", "public static function getSender() \n { \n return emailSettings::$sender; \n }", "public function getEmailConf()\n\t{\n\t\treturn $this->email_conf;\n\t}", "private function setVariables(){\n $this->mail->isSMTP();\n //$this->mail->SMTPDebug = 2;\n $this->mail->SMTPDebug = 0;\n //$this->mail->SMTPDebug = 1;\n //$this->mail->SMTPDebug = 4;\n $this->mail->Host = 'smtp.gmail.com';\n //$this->mail->SMTPDebug = 0;\n $this->mail->Port = 587;\n //Set the encryption system to use - ssl (deprecated) or tls\n $this->mail->SMTPSecure = 'tls';\n //Whether to use SMTP authentication\n $this->mail->SMTPAuth = true;\n //Username to use for SMTP authentication - use full email address for gmail\n $this->mail->Username = \"[email protected]\";\n //Password to use for SMTP authentication\n $this->mail->Password = \"password\";\n //Set who the message is to be sent from\n $this->mail->setFrom('[email protected]', 'Dries, CardiffMet');\n //Set an alternative reply-to address\n $this->mail->addReplyTo('[email protected]', 'Dries, CardiffMet');\n }", "protected function emailConfig()\n {\n return [\n 'host' => $this->config('mail.host'),\n 'port' => $this->config('mail.port'),\n 'username' => $this->config('mail.username'),\n 'password' => $this->config('mail.password'),\n 'from' => $this->config('mail.from')\n ];\n }", "public function get_email_template_variables()\n\t{\n\t\t$user_data = $this->user_loader->get_user($this->get_data('from_user_id'));\n\n\t\treturn array(\n\t\t\t'AUTHOR_NAME'\t\t\t\t=> htmlspecialchars_decode($user_data['username']),\n\t\t\t'SUBJECT'\t\t\t\t\t=> htmlspecialchars_decode(censor_text($this->get_data('message_subject'))),\n\n\t\t\t'U_VIEW_MESSAGE'\t\t\t=> generate_board_url() . '/ucp.' . $this->php_ext . \"?i=pm&mode=view&p={$this->item_id}\",\n\t\t);\n\t}", "public function getPayerEmail() {\n\t\treturn $this->_getField(self::$PAYER_EMAIL);\n\t}", "function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}", "public function getMailTo ()\n {\n return $this->mail_to;\n }", "function get () {\n $this->_build_mail();\n\n $mail = 'To: '.$this->xheaders['To'].\"\\n\";\n $mail .= 'Subject: '.$this->xheaders['Subject'].\"\\n\";\n $mail .= $this->headers . \"\\n\";\n $mail .= $this->full_body;\n return $mail;\n }", "function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_client');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['client_users_password'] = $this->input->post('client_users_password');\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($this->data['email_vars']['client_users_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n\n }\n\n //admin notification - new client user-------------------------------\n if ($email == 'admin_notification_new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n }\n\n }", "public function getSendTo()\n {\n return $this->NameTo ? sprintf('%s <%s>', $this->NameTo, $this->EmailTo) : $this->EmailTo;\n }", "protected function GetSendReviewCommentNotificationEmail()\n {\n $sSendReviewCommentNotificationEmail = '';\n if (!empty($this->fieldAuthorEmail)) {\n $sSendReviewCommentNotificationEmail = $this->fieldAuthorEmail;\n } elseif (!empty($this->fieldDataExtranetUserId)) {\n $oAuthor = TdbDataExtranetUser::GetNewInstance();\n if ($oAuthor->Load($this->fieldDataExtranetUserId)) {\n $sSendReviewCommentNotificationEmail = $oAuthor->GetUserEMail();\n }\n }\n\n return $sSendReviewCommentNotificationEmail;\n }", "function sendEmails() {\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\n\t\t$emailUser = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailUser = str_replace(\"<br />\", \"\\n\", $emailUser);\n\t\t$emailAdmin = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailAdminBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailAdmin = str_replace(\"<br />\", \"\\n\", $emailAdmin);\n\t\t$emailFrom = $this->data['tx_gokontakt_emailFrom'];\n\t\t$emailFromName = $this->data['tx_gokontakt_emailFromName'];\n\t\t$emailToAdmin = $this->data['tx_gokontakt_emailToAdmin'];\n\n\t\t$this->sendEmail($this->pi_getLL('subject_email_user'), $emailUser, '', $emailFrom, $emailFromName, $this->piVars['email']);\n\t\t$this->sendEmail($this->pi_getLL('subject_email_admin'), $emailAdmin, '', $emailFrom, $emailFromName, $emailToAdmin);\n\t}", "public function diviroids_user_email($atts)\n {\n return DiviRoids_Security::get_current_user('user_email');\n }", "public function getmail() {\n\t\treturn $this->mail;\n\t}", "function _webform_defaults_email() {\r\n return array(\r\n 'name' => '',\r\n 'form_key' => NULL,\r\n 'pid' => 0,\r\n 'weight' => 0,\r\n 'value' => '',\r\n 'mandatory' => 0,\r\n 'email' => 1,\r\n 'extra' => array(\r\n 'width' => '',\r\n 'disabled' => 0,\r\n 'email' => 0,\r\n 'description' => '',\r\n 'attributes' => array(),\r\n ),\r\n );\r\n}", "public function toMail($notifiable)\n {\n $user = User::find($notifiable->id);\n $payload = [\n 'to' => \"[email protected]\",\n 'senderName' => \"Emocional.reg\",\n 'css' => \"\",\n 'logo' => [\n 'path' => Config::get('app.url') . \"/assets/front/img/email/logo.png\",\n 'width' => 401,\n 'height' => 81\n ],\n 'reminder' => '<a href=\"https://www.emocionalreg.com/aviso-legal/\" target=\"_blank\">Aviso legal</a>',\n 'reminder' => 'Este email no recibe comunicaciones entrantes. Si tienes cualquier\n pregunta o solicitud y quieres contactar con nosotros,\n escrÍbenos a <a href=\"mailto:[email protected]\" target=\"_blank\">\n <strong>[email protected]</strong></a>.',\n 'unsubscribe' => '<a href=\"https://www.emocionalreg.com/\" target=\"_blank\">Emocionalreg.com</a>',\n 'password' => env('APP_URL') . \"/password/reset\",\n 'linkedin' => \"emocionalreg-com\",\n 'twitter' => \"emocionalreg\",\n 'facebook' => \"emocionalreg\",\n 'youtube' => \"emocionalreg\",\n 'address' => \"B-?????\"\n ];\n return (new MailMessage)->view(\n 'posts::mail.email_post',\n ['post' => $this->post, 'user' => $user, 'payload' => $payload]\n );\n /*\n\n return (new MailMessage)->view(\n 'posts::mail.email_post', ['post' => $this->post, 'user' => $user]\n );*/\n }", "private static function getSettings($mail) {\n // $mail->SMTPDebug = 3;\n\n $mail->CharSet = \"utf-8\"; // set charset to utf8\n $mail->SMTPAuth = true; // use smpt auth\n $mail->SMTPSecure = 'ssl';//env('EMAILHELPER_SMTP', 'tls'); // or ssl\n $mail->SMTPAutoTLS = false;\n $mail->Host = Config::get('app.EMAILHELPER_HOST');\n $mail->Port = Config::get('app.EMAILHELPER_PORT'); \n $mail->Username = Config::get('app.EMAILHELPER_USERNAME');\n $mail->Password = Config::get('app.EMAILHELPER_PASSWORD');\n\n return $mail;\n\t}", "public static function get_options() {\n\t\treturn get_option( 'omnimailer' ) ?: self::get_default_options();\n\t}", "public function get_orderer_mail()\n\t{\n\t\t$orderer = $this->prop(\"purchaser\");\n\t\tif(is_oid($orderer))\n\t\t{\n\t\t\t$o = obj($orderer);\n\t\t\treturn $o->get_mail();\n\t\t}\n\t\treturn null;\n\t}", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "function workbench_post_get_email_from() {\n $email_from = workbench_post_get_config('email_from');\n return $email_from ? $email_from : variable_get('site_mail', '');\n}", "public function getMailer()\n {\n return $this->get('mailer');\n }", "public function getMail()\n {\n return $this->mail;\n }", "public function getMail()\n {\n return $this->mail;\n }", "public function getMail()\n {\n return $this->mail;\n }", "public function getMail()\n {\n return $this->mail;\n }", "protected function getSenderEmailAddress() {}", "protected function getSenderEmailAddress() {}", "public function getNotificationEmail() {}", "private function _setEmailParams($requestFor, $requestObject = array()) {\n try {\n if ($requestFor != '' && !empty($requestObject)) {\n switch ($requestFor) {\n case 2:\n $this->mailParam['{%REGISTER_USER%}'] = $requestObject['vFirstName'];\n $this->mailParam['{%REGISTER_TYPE%}'] = $this->db->get_where('tbl_admin_type', array('iAdminTypeID' => $requestObject['iAdminTypeID']))->row_array()['vAdminTitle'];\n $this->mailParam['{%USER_NAME%}'] = $requestObject['vEmail'];\n $this->mailParam['{%PASSWORD%}'] = $requestObject['vPassword'];\n $this->mailParam['{%LOGIN_LINK%}'] = BASE_URL . 'login';\n break;\n }\n }\n } catch (Exception $ex) {\n throw new Exception('Error in _setEmailParams function - ' . $ex);\n }\n }", "public function sendEmailWithMailer($receiver){\n require(\"PHPMailer/PHPMailerAutoload.php\");\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->Host = \"smtp.gmail.com\";\n $mail->SMTPAuth = true;\n $mail->Username = \"[email protected]\";\n $mail->Password = \"Nila1234\";\n $mail->SMTPSecure = \"ssl\";\n $mail->Port = 465;\n\n $mail->From = \"[email protected]\";\n $mail->FromName = \"Unter Taxi Company\";\n $mail->AddAddress($receiver);\n $mail->WordWrap = 50;\n $mail->IsHTML(true);\n $mail->Subject = \"Information about your requested Taxi.\";\n $mail->Body = \"Hello, your Taxi will arrive within the next 20 minutes. Thank you for your order. Your Unter Taxi Company.\";\n\n //Sends the email\n if(!$mail->Send())\n {echo \"Message could not be sent<p>\";\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n exit;\n }else {\n echo \"ERROR\";\n }\n }", "public function getMail()\n {\n return $this->email;\n }", "public function prepareMailDataTransac($parameters = '')\n {\n // [email protected]\n $parameters['sender'] = array(\n 'email' => '[email protected]',\n 'name' => '123BestDeal Klantenservice'\n );\n $this->parameters = new SendSmtpEmail($parameters);\n }", "private function _getFromWrapper()\n\t{\n\t\tglobal $webmaster_email;\n\n\t\t// The email address of the sender, irrespective of the envelope name above\n\t\tif (!empty($this->_modSettings['maillist_mail_from']))\n\t\t{\n\t\t\treturn $this->_modSettings['maillist_mail_from'];\n\t\t}\n\n\t\tif (!empty($this->_modSettings['maillist_sitename_address']))\n\t\t{\n\t\t\treturn $this->_modSettings['maillist_sitename_address'];\n\t\t}\n\n\t\treturn $webmaster_email;\n\t}", "public function getGiftcardSenderEmail();", "public function toMail($notifiable)\n {\n if ($this->user->type() == 'cso') {\n $type = \"примател\";\n } else {\n $type = \"донатор\";\n }\n $message = (new MailMessage)->subject('[Сите Сити] Променет е профилот на ' . $type . 'от.')\n ->line('Направени се следниве измени:')\n ->line('Тип: ' . $type)\n ->line('Име: ' . $this->user->first_name)\n ->line('Презиме: ' . $this->user->last_name)\n ->line('Емаил: ' . $this->user->email)\n ->line('Организација: ' . $this->user->organization->name)\n ->line('Адреса: ' . $this->user->address)\n ->line('Телефон: ' . $this->user->phone)\n ->line('Локација: ' . $this->user->location->name);\n return $message;\n }", "public static function get_admin_contact_mail(){\n if (array_key_exists(\"contact_email\",self::get_site_setting())){\n return self::get_site_setting()['contact_email'];\n }else{\n return '';\n }\n \n }", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "public function toMail($notifiable)\n {\n\n switch($this->type)\n {\n case 'request':\n {\n return (new emailMembership($this->user,$this->membership,$this->type))->to('[email protected]', 'admin');\n }\n break;\n\n case 'activate':\n {\n return (new emailMembership($this->user,$this->membership,$this->type))->to($this->user->email, $this->user->name.''.$this->user->surname);\n }\n break;\n\n default: break;\n }\n }", "function sendInfoMail()\t{\n\t\tif ($this->conf['infomail'] && $this->conf['email.']['field'])\t{\n\t\t\t$recipient='';\n\t\t\t$emailfields=t3lib_div::trimexplode(',',$this->conf['email.']['field']);\t\t\t\t\n\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t$recipient.=$recipient?$Arr[$this->conf['email.']['field']].';'.$recipient:$Arr[$this->conf['email.']['field']];\n\t\t\t}\n\t\t\t$fetch = t3lib_div::_GP('fetch');\n\t\t\tif ($fetch)\t{\n\t\t\t\t\t// Getting infomail config.\n\t\t\t\t$key= trim(t3lib_div::_GP('key'));\n\t\t\t\tif (is_array($this->conf['infomail.'][$key.'.']))\t\t{\n\t\t\t\t\t$config = $this->conf['infomail.'][$key.'.'];\n\t\t\t\t} else {\n\t\t\t\t\t$config = $this->conf['infomail.']['default.'];\n\t\t\t\t}\n\t\t\t\t$pidLock='';\n\t\t\t\tif (!$config['dontLockPid'] && $this->thePid)\t{\n\t\t\t\t\t$pidLock='AND pid IN ('.$this->thePid.') ';\n\t\t\t\t}\n\n\t\t\t\t\t// Getting records\n\t\t\t\tif (t3lib_div::testInt($fetch))\t{\n\t\t\t\t\t$DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$this->conf['uidField'],$fetch,$pidLock,'','','1');\n\t\t\t\t} elseif ($fetch) {\t// $this->conf['email.']['field'] must be a valid field in the table!\n\t\t\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t\t\tif ($ef) $DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$ef,$fetch,$pidLock,'','','100');\n\t\t\t\t\t\tif (count($DBrows )) break;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Processing records\n\t\t\t\tif (is_array($DBrows))\t{\n\t\t\t\t\t//$recipient = $DBrows[0][$this->conf['email.']['field']];\n\t\t\t\t\tif ($this->conf['evalFunc'])\t{\n\t\t\t\t\t\t$DBrows[0] = $this->userProcess('evalFunc',$DBrows[0]);\n\t\t\t\t\t}\n\t\t\t\t\t$this->compileMail($config['label'], $DBrows, $this->getFeuserMail($DBrows[0],$this->conf), $this->conf['setfixed.']);\n\t\t\t\t} elseif ($this->cObj->checkEmail($fetch)) {\n\t\t\t\t\t$this->sendMail($fetch, '', '',trim($this->cObj->getSubpart($this->templateCode, '###'.$this->emailMarkPrefix.'NORECORD###')));\n\t\t\t\t}\n\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL_SENT###');\n\t\t\t} else {\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL###');\n\t\t\t}\n\t\t} else $content='Error: infomail option is not available or emailField is not setup in TypoScript';\n\t\treturn $content;\n\t}", "public function getFromEmail()\n {\n return $this->getValue('OpsWayemailsettings/test/fromEmail');\n }", "public function mail()\n\t{\n\t\treturn $this->_mail;\n\t}", "public function getProjectCreationMailCredentials() {\n\n if (!isset(Yii::app()->params['googlePlayProjectCreation_mailCredentials']))\n return null;\n\n if (!isset(Yii::app()->params['googlePlayProjectCreation_mailCredentials']['host']))\n return null;\n\n if (!isset(Yii::app()->params['googlePlayProjectCreation_mailCredentials']['user']))\n return null;\n\n if (!isset(Yii::app()->params['googlePlayProjectCreation_mailCredentials']['pass']))\n return null;\n\n return Yii::app()->params['googlePlayProjectCreation_mailCredentials'];\n }", "public static function get_reminder_recipient() {\n $recipient = get_option( 'sb_domain_reminder_recipient' );\n if( empty( $recipient ) ) {\n $recipient = get_bloginfo( 'admin_email' );\n }\n return $recipient;\n }", "public function getCustomerEmail()\n {\n return $this->getParameter('customerEmail');\n }", "public function send() {\n $mail = $this->initializeMail();\n $mail->subject = $this->subject; \n $mail->MsgHTML($this->body);\n if($this->is_admin) {\n //send email to the admin\n $mail->setFrom($this->sender->email, $this->sender->name);\n $mail->addAddress(Config::get('app.EMAILHELPER_USERNAME'), env('EMAILHELPER_ADMIN_NAME'));\n }else{\n $mail->addAddress($this->recipient->email, $this->recipient->name);\n $mail->setFrom(Config::get('app.EMAILHELPER_USERNAME'), env('EMAILHELPER_ADMIN_NAME'));\n \n }\n $mail->send();\n return $mail;\n }", "public function getUser()\n\t{\n\t\treturn $this->config('email');\n\t}", "public function getMail();", "protected function getSenderEmailName() {}", "protected function getSenderEmailName() {}", "public function parameters($notifiable)\n\t{\n\t\treturn [\n\t\t\t'app_name' => config('app.name'),\n\t\t\t'token' => $this->trade ? $this->trade->id : null,\n\t\t\t'chat_id' => $this->trade ? $this->trade->chat_id : null,\n\t\t\t'user_name' => $notifiable->name,\n\t\t];\n\t}", "public function sendMailRenovacionPlan( $sendparams = array() ){\r\t\t\r\t\t$uri = JFactory::getURI();\r\t\t\r\t\t//parametros para el metodo que obtiene el formulario de pago\r\t\t$params_pay = array(\r\t\t\t\t'btn_input' => '<input type=\"image\" src=\"'.$uri->root().'components/com_referidos/assets/images/img-pay.png\" alt=\"Pagar desde Payu Latam\" title=\"Pagar desde Payu Latam\" />'\r\t\t\t,\t'planuser' => $sendparams[ 'planuser' ]\r\t\t\t,\t'userid' => $sendparams[ 'userid' ]\r\t\t\t,\t'nomplan' => $this->nom_plan\r\t\t\t,\t'valorpesos' => number_format( $this->valor_pesos , 2 , '.' , '')\r\t\t\t,\t'valordolar' => number_format( $this->valor_dolares , 2 , '.' , '')\r\t\t\t,\t'emailuser' => $sendparams[ 'emailuser' ]\r\t\t\t,\t'nameuser' => $sendparams[ 'nameuser' ]\r\t\t);\r\t\t\r\t\t//destinatari\r\t\t$para = $sendparams[ 'emailuser' ];\r\t\t\r\t\t// subject\r\t\t$titulo = ucfirst( $sendparams[ 'nameuser' ] ).', necesitas renovar tu plan';\r\t\t\r\t\t// message\r\t\t$mensaje = '\r\t\t\t<html>\r\t\t\t\t<head>\r\t\t\t\t <title>Renovaci&oacute;n Plan JooinWorld</title>\r\t\t\t\t</head>\r\t\t\t\t<body>\r\t\t\t\t\t<div class=\"content-mail\" style=\"font-family: \\'Calibri\\', \\'Helvetica Neue\\'; width: 80%; height:auto; margin:0 auto; padding:0;\">\r\t\t\t\t\t\t<div class=\"titulo\" style=\"width:100%; height:61px; background-color:#566EAC; color:#ffffff; padding: 2px 37px;\">\r\t\t\t\t\t\t\t<img src=\"'.$uri->root().'templates/jooinworld-home/images/logo.png\">\r\t\t\t\t\t\t\t<!--<span style=\"color:#CDCBE3; font-size:12px; padding: 5px 10px;\">uniendo al mundo</span>-->\r\t\t\t\t\t\t</div>\r\t\t\t\t\t\t<div class=\"cuerpo\" style=\"width:100%; padding: 25px; font-size:14px;\">\r\t\t\t\t\t\t\t<h3 style=\"color:#000000\">Hola <span style=\"color: #566EAC;\" class=\"text-blue\">'.ucfirst( $sendparams[ 'nameuser' ] ).'</span></h3>\r\t\t\t\t\t\t\t<p style=\"margin: 20px 0px; text-align:justify;\" >\r\t\t\t\t\t\t\tNesecitas renovar tu plan '.strtoupper($this->nom_plan).', para que no pierdas las comisiones por las personas que has referido, y puedas seguir utilizando este plan para obtener mas personas que pueden llegar a ser referidos tuyos.\r\t\t\t\t\t\t\t</p>\r\t\t\t\t\t\t\t<div class=\"content-img\" style=\"width:100%; text-align:left;\">\r\t\t\t\t\t\t\t\t<img style=\"display:inline-block; border: 1px solid #B2B2B2; border-radius:5px; padding: 2px; margin-right: 5px;\" src=\"'. $uri->root() . ( ( !empty($sendparams[ 'thumb' ]) ) ? $sendparams[ 'thumb' ] : 'images/user-Male-thumb.png').'\" alt=\"'.$sendparams[ 'nameuser' ].'\" />\r\t\t\t\t\t\t\t\t<span style=\"display:inline-block; vertical-align:top; color: #566EAC;\" class=\"text-blue\">'.$sendparams[ 'nameuser' ].'</span>\r\t\t\t\t\t\t\t</div> \r\t\t\t\t\t\t\t<div class=\"agradecimiento\" style=\"width:100%; text-align:left; margin: 0px 0px 10px 0px;\">\r\t\t\t\t\t\t\t\t<h2 style=\"color:#000000\">Gracias</h2>\t\t\t\t\t\t\t\t\r\t\t\t\t\t\t\t</div>\r\t\t\t\t\t\t\t<di style=\"text-align:center; width:100%;\">\r\t\t\t\t\t\t\t\t\t'.$this->formPay( $params_pay ).'\r\t\t\t\t\t\t\t</div>\r\t\t\t\t\t\t</div>\r\t\t\t\t\t</div>\r\t\t\t\t</body>\r\t\t\t</html>\r\t\t';\r\t\t\r\t\t// Para enviar un correo HTML mail, la cabecera Content-type debe fijarse\r\t\t$cabeceras = \"MIME-Version: 1.0 \\r\\n\";\r\t\t$cabeceras .= \"Content-type: text/html; charset=UTF-8 \\r\\n\";\r\t\t\r\t\t// Cabeceras adicionales\r\t\t$cabeceras .= \"To: \" . $para .\" \\r\\n\";\r\t\t$cabeceras .= \"From: [email protected] \\r\\n\";\r\t\t\r\t\t// Mail it\r\t\tmail( $para, $titulo, $mensaje, $cabeceras);\r\t\r\t}", "public function via() { return ['mail']; }", "public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Accept Resignation')\n ->line('Dear '.$this->employee_info->name.',')\n ->line('Your resignation submitted '.date('M. d, Y',strtotime($this->employee_info->upload_date)).' , effective '.date('M. d, Y',strtotime($this->employee_info->last_day)).' was approved by '.auth()->user()->name.'. A copy of this notice shall be given to Human Resources for clearance preparation.')\n // ->action('(click button)', $this->server->server_ip.'/uploaded-letter')\n ->line('An e-mail indicating the next steps shall be sent to you shortly. ')\n ->line('Please check the Offboarding System and your e-mail regularly for updates. ')\n ->line('This is an auto generated email please do not reply')\n ->line('Thank you for using our application!');\n }", "public function toMail($notifiable)\n {\n $mailMessage = (new MailMessage())\n ->error()\n ->subject($this->getMessageText())\n ->line($this->getMessageText());\n\n foreach ($this->getMonitorProperties() as $name => $value) {\n $mailMessage->line($name.': '.$value);\n }\n\n return $mailMessage;\n }", "public function getReqEmail()\n\t{\n\t\treturn $this->req_email;\n\t}", "public function toMail($notifiable)\n {\n $name = $this->user->name;\n\n $mail = new MailMessage;\n $mail ->template(config('emailconfirmation.template'))\n ->level(config('emailconfirmation.level'))\n ->greeting(str_replace(':name', $name, trans('emailconfirmation::emailconfirmation.mail_greeting')))\n ->subject(str_replace(':name', $name, trans('emailconfirmation::emailconfirmation.mail_subject')));\n\n foreach(trans('emailconfirmation::emailconfirmation.mail_introLines') as $line){\n $mail->line(str_replace(':name', $name, $line));\n }\n\n $mail->action(str_replace(':name', $name, trans('emailconfirmation::emailconfirmation.mail_button_text')), url(config('app.url').route('confirm.attempt', $this->user->token, false)));\n\n foreach(trans('emailconfirmation::emailconfirmation.mail_outroLines') as $line){\n $mail->line(str_replace(':name', $name, $line));\n }\n\n $mail->salutation(trans('emailconfirmation::emailconfirmation.mail_salutation'));\n\n return $mail;\n }", "public function toMail($notifiable)\n {\n $cid = $this->job->company_id;\n $jid = $this->job->id;\n return (new MailMessage)\n ->from('[email protected]', 'BuildLabour')\n ->subject('A user has messaged you')\n ->line('A new applicant has arrived.')\n ->action('View Your Job', url(\"/job/applicants?cid=$cid&jid=$jid\"));\n }", "public function getReminderEmail()\n\t{\n\t\treturn $this->user_email;\n\t}", "public function sendnotificationemails($type,$to,$subject,$username,$linkhref){\r\n\r\n $bodyhead=\"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\n <html xmlns='http://www.w3.org/1999/xhtml'>\r\n <head>\r\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\r\n <title>\".$this->getsettings('sitetitle','text').\"</title>\r\n </head><body>\";\r\n if( $this->getsettings('email','logoshow') == '1' ) {\r\n $body = \"<img src='\".$this->getsettings('logo','url').\"' alt='\".$this->getsettings('sitetitle','text').\"' title='\".$this->getsettings('sitetitle','text').\"'/>\";\r\n }\r\n else {\r\n $body = '';\r\n }\r\n\r\n $link = \"<a href='\".$linkhref.\"'>\".$this->getsettings($type,'linktext').\"</a>\";\r\n $emContent = $this->getsettings($type,'text');\r\n $emContent = str_replace(\"[username]\",$username,$emContent);\r\n $emContent = str_replace(\"[break]\",\"<br/>\",$emContent);\r\n $emContent = str_replace(\"[linktext]\",$link,$emContent);\r\n\r\n $body .=\"<p>\".$emContent.\"</p>\";\r\n\r\n $from = $this->getsettings('email','fromname');\r\n $from_add = $this->getsettings('email','fromemail');\r\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\r\n $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\r\n $headers .= \"From: =?UTF-8?B?\". base64_encode($from) .\"?= <$from_add>\\r\\n\" .\r\n 'Reply-To: '.$from_add . \"\\r\\n\" .\r\n 'X-Mailer: PHP/' . phpversion();\r\n mail($to,$subject,$bodyhead.$body.'</body></html>',$headers, '-f'.$from_add);\r\n\r\n if( $type == 'forgotpwdemail' ) {\r\n return '7#email';\r\n }\r\n else {\r\n return '7#register';\r\n }\r\n\r\n die();\r\n\t}", "private static function get_email_setting_fields( $email_notification_key ) {\n\t\t$email_class = self::get_email_class( $email_notification_key );\n\t\t$core_settings = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'plain_text',\n\t\t\t\t'std' => '0',\n\t\t\t\t'label' => __( 'Format', 'wp-job-manager' ),\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'1' => __( 'Send plain text email', 'wp-job-manager' ),\n\t\t\t\t\t'0' => __( 'Send rich text email', 'wp-job-manager' ),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t$email_settings = call_user_func( array( $email_class, 'get_setting_fields' ) );\n\t\treturn array_merge( $core_settings, $email_settings );\n\t}", "public function toMail($notifiable)\n {\n if(!$this->message->message) {\n \n $this->message->message = 'Após levar em consideração todos os requisitos da vaga e suas qualificações profissionais, decidimos não dar prosseguimento com a sua candidatura.';\n }\n\n return (new MailMessage)\n ->subject('Atualização sobre sua candidatura para vaga de ' . $this->application->job->position->label)\n ->greeting('Atualização sobre candidatura')\n ->line($this->message->message)\n ->line('Seu cadastro ficará no nosso banco de dados e será levado em consideração quando tivermos outras oportunidades que se encaixem no seu perfil.');\n }", "public function sendConfEmail() {\r\n\t\t$to = array($this->email => $this->fname . \" \" . $this->lname);\r\n\t\t$emailObj = new mandrillApi($to, \"Welcome to Tackster.com\");\r\n\t\t$htmlString = <<<EOF\r\n<h3>Welcome to Tackster.com</h3>\r\n<p>You have now registered with <a href=\"http://www.tackster.com\">Tackster.com</a>.\r\nWe figure we should keep the greeting short and get you started right away!</p>\r\nLet's go to the site by <a href=\"http://www.tackster.com\"><b>Visting Tackster.com</b></a>!\r\nEOF;\r\n\t\t$emailObj->createEmail($htmlString);\r\n\t\t$emailObj->sendEmail();\r\n\t}", "public function toMail($notifiable)\n {\n\n $email = setting()->key('email');\n\n $message = new MailMessage();\n // dd($message);\n\n\n // $firstName = $setting->value;\n // dd($email);\n // dd($notifiable);\n\n return (new MailMessage)\n ->from($notifiable->email)\n // ->to($email)\n ->greeting('From: ' . $notifiable->name )\n ->line($message)\n // ->line('Thank you for reaching out to '. app_name() .'. We have received your email, and our support team will be in touch with you soon.')\n // ->line('You may refer to our FAQs for more information.')\n // ->action('View FAQs', URL::to('faq'))\n // ->line('Please note that our working hours is 0730 to 1900 (GMT +100) from Monday to Saturday. We regret the delay in reply over the non-working hours.')\n // ->line('Thank you for your understanding.')\n ;\n }", "public function toMail($notifiable)\n {\n if ($this->lrc->leave_request->leave_id==0) {\n $leave_name=\"Annual Leave\";\n }else{\n $leave_name=$this->lrc->leave_request->leave->name;\n }\n return (new MailMessage)\n ->subject('Recall From Leave ')\n ->line(' You have been recalled from your '.$leave_name.' by '.$this->lrc->recaller->name)\n ->line('You are to resume after !'.date('F j, Y',strtotime($lrc->new_date)))\n ->line('Thank you for using our application!');\n }", "function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n\n //------------------------------------queue email in database-------------------------------\n /** THIS WIL NOT SEND BUT QUEUE THE EMAILS*/\n if ($email == 'mailqueue_ticket_reply') {\n\n //email vars\n $this->data['email_vars']['email_title'] = $this->data['lang']['lang_support_ticket_reply'];\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('general_notification_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //dynamic email vars - email body\n $this->data['email_vars']['email_message'] = '\n <div style=\" border:#CCCCCC solid 1px; padding:8px;\">\n <span style=\"text-decoration: underline; font-weight:bold;\">\n ' . $this->data['lang']['lang_title'] . '</span><br>\n ' . $this->input->post('tickets_title') . '<br><br>\n <span style=\"text-decoration: underline; font-weight:bold;\">\n ' . $this->data['lang']['lang_message'] . '</span><br>\n ' . $this->input->post('tickets_replies_message') . '\n <p><div style=\"padding:5px; background-color:#fbe9d0;\">'.$this->data['lang']['lang_support_do_not_reply'].'</div></div>';\n\n //dynamic email vars - general\n $this->data['email_vars']['addressed_to'] = $this->data['lang']['lang_hello'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'].'/ticket/'.$this->input->post('tickets_replies_ticket_id');\n\n //get the email address of staff assigned to this ticket. (email preferences are checked)\n $team_members_email = $this->teamprofile_model->notificationsEmail($this->input->post('tickets_assigned_to_id'));\n $this->data['debug'][] = $this->teamprofile_model->debug_data;\n\n //add to email queue\n if ($team_members_email != '') {\n\n //set sqldata() for database\n $sqldata['email_queue_message'] = parse_email_template($template['message'], $this->data['email_vars']);\n $sqldata['email_queue_subject'] = $this->data['lang']['lang_support_ticket_reply'];\n $sqldata['email_queue_email'] = $team_members_email;\n\n //add to email queue database - excluding uploader (no need to send them an email)\n $this->email_queue_model->addToQueue($sqldata);\n $this->data['debug'][] = $this->email_queue_model->debug_data;\n }\n\n }\n }", "public function getReqAltEmail()\n\t{\n\t\treturn $this->req_alt_email;\n\t}", "public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from('[email protected]')\n ->subject($this->subject)\n ->greeting(\"Olá {$this->user->name},\")\n ->line($this->text)\n ->line(new HtmlString(\"<div align='center' style='margin: auto 60px; background-color: #eee; padding: 30px 15px; font-weight: bold; letter-spacing: 5px; font-size: 1.2rem'>\n {$this->user->validation_code}\n </div>\"))\n ->line(new HtmlString(\"<br><br><br>Obrigado por usar nossa aplicação\"))\n ->salutation('Atenciosamente,');\n }", "public function fromEmail()\n\t{\n\t\treturn get_option('social_curator_notification_from_email');\n\t}", "public function getMail()\n\t{\n\n\t\treturn $this->mail;\n\t}", "private function getAdminEmail()\n {\n return sfConfig::get('app_rt_registration_admin_email', sfConfig::get('app_rt_admin_email'));\n }", "public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject(\"You have a new friend request!\")\n ->line($this->sender->name.' sent you a friend request!')\n ->action('Accept Their Request', url('/user/'.$this->sender->username))\n ->line('Thanks for using Liv');\n }", "public function toMail($notifiable)\n {\n $user = $this->user;\n $profile = $this->user->profile;\n $event = $user->events()->latest()->first();\n\n if($this->password == false)\n {\n return (new MailMessage)\n ->subject('Registration for ' . Str::ucfirst($event->title))\n ->greeting('Dear ' . Str::ucfirst($profile->title) . ' ' .Str::ucfirst($profile->name))\n ->line('You registered for ' . Str::ucfirst($event->title) . ' ' . 'Date: ' . $event->start_date->toDayDateTimeString() )\n ->action('Event Site', url('/'))\n ->line('Thank you for registering for this special Conference!');\n }else{\n return (new MailMessage)\n ->subject('Registration for ' . Str::ucfirst($event->title))\n ->greeting('Dear ' . Str::ucfirst($profile->title) . ' ' .Str::ucfirst($profile->name))\n ->line('You registered for ' . Str::ucfirst($event->title) . ' ' . 'Date: ' . $event->start_date->toDayDateTimeString() )\n ->line(\"Login Details\")\n ->line(\"Email: $user->email | Password: $this->password\")\n ->action('Event Site', url('/'))\n ->line('Thank you for registering for this special Conference!');\n }\n\n }", "public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Your request for ' . $this->ticket->form->template->name . ' (Ticket No. ' . $this->ticket->id . ') has been updated!')\n ->line('')\n ->line('Request has been updated:')\n ->line('Cancelled by ' . $this->update->employee->renderFullname())\n ->line('')\n ->line($this->update->description)\n ->line('')\n ->line('For more details you may also view the request by clicking the button below.')\n ->action('View', route('ticket.show', $this->ticket->id)); \n }", "function send_email($email = null, $subject = null, $msg = null, $headers = null) {\n\n $mail = new PHPMailer(); \n //Server settings\n //$mail->SMTPDebug = 2; \n $mail->isSMTP(); // Set mailer to use SMTP\n $mail->Host = Config::SMTP_HOST; // Specify main and backup SMTP servers\n $mail->Username = Config::SMTP_USER; // SMTP username\n $mail->Password = Config::SMTP_PASSWORD; // SMTP password\n $mail->Port = Config::SMTP_PORT; // TCP port to connect to\n $mail->SMTPAuth = true; // Enable SMTP authentication\n $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted\n\n\n $mail->isHTML(true);\n $email->Charset = \"UTF-8\";\n \n $mail->setFrom(\"[email protected]\", 'Nouldine'); // sender email address \n $mail->addAddress('[email protected]'); // receiver email address \n \n \n $mail->Subject = $subject;\n $mail->Body = $msg; \n $mail->AltBody = $msg;\n\n // If the email is not sent \n // Display an error message\n if(!$mail->send()){\n\n echo \"Message could not be sent \\n\";\n echo 'Mailer Error:' . $mail->ErrorInfo;\n\n }\n else {\n\n echo 'Message has been sent';\n }\n\n return mail($email, $subject, $msg, $headers); \n\n}", "public function toMail($notifiable) {\n if ($notifiable instanceof User) {\n if (3 == $this->register_type && null == $notifiable->password) {\n // dddx(['notifiable' => $notifiable, fake()->password()]);\n // $password = fake()->password();\n $password = strval(rand(10000, 99999));\n $handle = Str::before(strval($notifiable->email), '@'); // ?? fake()->name();\n $res = tap($notifiable)->update([\n 'handle' => $handle,\n 'passwd' => $password,\n ]);\n $this->view_params['password'] = $password;\n }\n }\n\n $this->locale = app()->getLocale();\n if (! method_exists($notifiable, 'toArray')) {\n throw new \\Exception('['.__LINE__.']['.__FILE__.']');\n }\n $this->view_params = array_merge($this->view_params, $notifiable->toArray());\n $this->view_params['lang'] = $this->locale;\n\n $verificationUrl = $this->verificationUrl($notifiable);\n\n if (static::$toMailCallback) {\n return call_user_func(static::$toMailCallback, $notifiable, $verificationUrl);\n }\n\n $this->view_params['url'] = (string) $verificationUrl;\n $this->view_params['post_id'] = (string) $this->register_type;\n\n return app(BuildUserMailMessageAction::class)->execute('verify-email', $this->view_params);\n }", "public function getMail():string\n {\n return $this->mail;\n }", "public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from(env('MAIL_FROM_ADDRESS'), $this->name)\n ->line('Hii We Find You are Lost your password Don`t panic.')\n ->line('Below Link give your password back you just want remember this OTP :-\"'.$this->data.'\"')\n ->action('Click Here', url('/otp/validate'))\n ->line('Thank you for using our application!');\n }", "public function getMail()\n {\n return $this->billingMail;\n }", "public function toMail($notifiable)\n {\n $healthUpdate = $this->healthUpdate;\n \n $message = new MailMessage;\n $message->subject('[INFOMINA ELS] - Medical Leave Applied');\n $message->greeting('Hi '.$healthUpdate['name'].',');\n $message->line('It seems like you are unwell. Thus, we have submitted a medical leave on behalf of you.');\n $message->line('Date : '.$healthUpdate['date_from'].' to '.$healthUpdate['date_to']);\n $message->line('Total Day(s) : '.$healthUpdate['total_days']);\n $message->line('Please contact the HR for any changes in action.');\n $message->line('Take care!');\n\n return $message;\n }", "public function toMail($notifiable)\n {\n $text = \"Paper yang anda submit di Event Paper Competition ICW telah dihapus oleh admin. \" .\n \"Submit ulang paper yang memenuhi persyaratan atau hubungi kami untuk info lebih lanjut.\";\n return (new MailMessage)\n ->subject(\"Status Paper di Event Paper Competition ICW\")\n ->greeting(\"Halo, \" . $this->user_name)\n ->line($text)\n ->action('Dashboard Events', config('app.url') .'dashboard')\n ->line('Terima kasih sudah berpartisipasi dalam event kami.');\n }", "public function toMail($notifiable)\n {\n //$location = $this->vdvk->getProposedLocation;\n return (new MailMessage)\n ->subject('Funds has been released Successfully for VDY ')\n ->line('Dear Sir/Madam,')\n ->line('Greetings!!,')\n ->line($this->messgae)\n ->line('Thanks & Regards')\n ->line('VDY VDIS Admin');\n }" ]
[ "0.66469073", "0.5935871", "0.59236914", "0.58808434", "0.58651364", "0.5838087", "0.58282256", "0.5778842", "0.576199", "0.5737972", "0.57207555", "0.5699138", "0.5698846", "0.56985754", "0.5648554", "0.56373966", "0.5615381", "0.5610425", "0.55992424", "0.5593945", "0.55396074", "0.55182177", "0.55159146", "0.54766214", "0.54712373", "0.54593295", "0.5439699", "0.54342693", "0.54327303", "0.5432679", "0.5432093", "0.543178", "0.5428336", "0.5423306", "0.5423306", "0.5423306", "0.5423306", "0.5423306", "0.5411823", "0.5392916", "0.5390975", "0.5390975", "0.5390975", "0.5390975", "0.5359483", "0.5359483", "0.5343403", "0.5343051", "0.5339012", "0.53370523", "0.5330495", "0.53260547", "0.531012", "0.52989537", "0.5295511", "0.52946186", "0.5291237", "0.52876526", "0.52831227", "0.52774215", "0.52770156", "0.5275518", "0.52530026", "0.5251368", "0.5248001", "0.52474356", "0.52421474", "0.52421474", "0.5238337", "0.5232124", "0.5229458", "0.5210483", "0.5210306", "0.5204611", "0.52027214", "0.52012587", "0.52002406", "0.5186493", "0.5186255", "0.5181288", "0.5173166", "0.51722324", "0.5169074", "0.516819", "0.51672953", "0.5165132", "0.51650506", "0.51615417", "0.5161297", "0.5159076", "0.5157154", "0.5156807", "0.5155832", "0.51528805", "0.51501775", "0.514675", "0.51462823", "0.5145718", "0.5143996", "0.51433575" ]
0.7699981
0
Deletes the user account permanently (DANGER!).
public function deleteConfirm($password) { if ($this->id() <= 0) { return false; } if ($this->isAdmin()) { return false; } // the current user can only delete their own account $auth = $this->getApp()['auth']; $user = $auth->getCurrentUser(); if ($user->id() != $this->id()) { return false; } // Verify the supplied the password. $verified = $auth->getStrategy('traditional') ->verifyPassword($this, $password); if (!$verified) { return false; } return $this->grantAllPermissions()->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteUser()\n {\n $this->delete();\n }", "public function delete_user_account() {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,0);\n \n // Delete the user's data saved by apps\n $this->load->file(APPPATH . '/apps/main.php');\n\n // List all apps\n foreach (glob(APPPATH . 'apps/collection/*', GLOB_ONLYDIR) as $dir) {\n\n $app_dir = trim(basename($dir) . PHP_EOL);\n\n // Create an array\n $array = array(\n 'MidrubApps',\n 'Collection',\n ucfirst($app_dir),\n 'Main'\n );\n\n // Implode the array above\n $cl = implode('\\\\', $array);\n\n // Delete user's data\n (new $cl())->delete_account($this->user_id);\n\n }\n \n // Delete connected social accounts\n $this->networks->delete_network('all', $this->user_id);\n \n // Delete campaigns\n $this->campaigns->delete_campaigns($this->user_id);\n \n // Delete templates\n $this->campaigns->delete_templates($this->user_id);\n \n // Delete lists\n $this->campaigns->delete_lists($this->user_id);\n \n // Delete schedules\n $this->campaigns->delete_schedules($this->user_id);\n \n // Load Fourth Helper\n $this->load->helper('fourth_helper');\n \n // Load Tickets Model\n $this->load->model('tickets');\n \n // Delete tickets\n $this->tickets->delete_tickets($this->user_id);\n \n // Load Botis Model\n $this->load->model('botis');\n \n // Delete all user's bots\n $this->botis->delete_user_bots($this->user_id);\n \n // Load Activity Model\n $this->load->model('activity');\n \n // Delete all user's activity\n $this->activity->delete_user_activity($this->user_id);\n \n // Load Media Model\n $this->load->model('media');\n \n // Get all user medias\n $getmedias = $this->media->get_user_medias($this->user_id, 0, 1000000);\n \n // Verify if user has media and delete them\n if ( $getmedias ) {\n \n // Load Media Helper\n $this->load->helper('media_helper');\n \n foreach( $getmedias as $media ) {\n delete_media($media->media_id, false);\n }\n \n }\n \n // Load Team Model\n $this->load->model('team');\n \n // Delete the user's team\n $this->team->delete_members( $this->user_id );\n \n // Load Activities Model\n $this->load->model('activities');\n \n // Delete the user's activities\n $this->activities->delete_activity( $this->user_id, 0 ); \n \n // Delete user account\n if ( $this->user->delete_user($this->user_id) ) {\n \n // Deletes user's session\n $this->session->unset_userdata('username');\n $this->session->unset_userdata('member');\n $this->session->unset_userdata('autodelete');\n \n echo json_encode(array(\n 'success' => TRUE,\n 'message' => $this->lang->line('mm64')\n )); \n \n } else {\n \n echo json_encode(array(\n 'success' => FALSE,\n 'message' => $this->lang->line('mm65')\n )); \n \n }\n \n }", "public function deleteUser()\n {\t\t\n\t\t$user = $this->checkToken();\n\t\tif ($user) {\t\n\t\t\t$userModel = UserModel::find($user->id);\n\t\t\t$userModel->destroy();\n\t\t\t$this->expireToken($userModel);\n\t\t\treturn $this->sendResponse('Your account has been deleted');\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to delete this account');\n }", "public static function deleteAccount(){\n\n //if user is logged in proceed, else send them to login\n if(login::isLoggedIn()){\n \n //if user clicked submit proceed\n if(isset($_POST['delete-account'])) {\n \n //grab the user's id and proceed to deletion\n $userId = login::isLoggedIn();\n \n database::query(\"DELETE FROM login_tokens WHERE fk_users_id = :userId\", array(':userId'=>$userId));\n database::query(\"DELETE FROM users WHERE users_id = :userId\", array(':userId'=>$userId));\n\n controller::redirectTo('login');\n \n }\n \n } else {\n controller::redirectTo('login');\n }\n }", "public function deleteAccount()\n {\n if ($this->checkLoggedIn()) {\n $this->userDAO->deleteAccount($this->session->get('user'));\n $this->session->destroy();\n $this->session->start();\n $this->session->set('delete_account', 'Votre compte à bien été supprimé');\n header('Location: ../public/index.php');\n }\n }", "public function destroy()\n {\n Auth::user()->delete();\n session()->flash('flash_message', __('auth.account_deleted'));\n\n return redirect()->route('home');\n }", "public function delete() {\n\t\t$query = \"DELETE FROM Users WHERE userId = :id\";\n\t\t$query_params = array(':id' => $this->userData['userId']);\n\t\texecuteSQL($query, $query_params);\n\t}", "public function delete()\n { if (is_null($this->id))\n trigger_error(\"User::delete(): Attempt to delete a User object that does not have its ID property set.\", E_USER_ERROR);\n\n // Delete the User\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $st = $conn->prepare(\"DELETE FROM users WHERE id = :id LIMIT 1\");\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT); \n $st->execute();\n \n $conn = null;\n }", "public function delete_delete()\n {\n $response = $this->UserM->delete_user(\n $this->delete('id')\n );\n $this->response($response);\n }", "public function delete() {\n try {\n $db = Database::getInstance();\n $sql = \"DELETE FROM `User` WHERE username = :username\";\n $stmt = $db->prepare($sql);\n $stmt->execute([\"username\" => $this->username]);\n } catch (PDOException $e) {\n exitError(500, \"Internal error.\");\n }\n }", "public function drupalDeleteUser($account)\n {\n $this->connector->user_delete($account->uid);\n }", "public function destroy()\n {\n $userId = Helper::getIdFromUrl('user');\n \n if ((Helper::checkUrlIdAgainstLoginId($userId)) !== 'super-admin') {\n Usermodel::load()->destroy($userId);\n } else { \n View::render('errors/403.view', [\n 'message' => 'You cannot delete yourself!',\n ]);\n }\n }", "public function destroy()\n {\n $user = Auth::user();\n $user->delete();\n\n return redirect()->route('home');\n }", "public function Delete(){\n $query = \"DELETE FROM user where id=\".$this->id;\n\n $result = $this->dbh->exec($query);\n if ($result) {\n Message::setMessage(\"<div class='yes'>Removed Permanently</div>\");\n } else {\n\n Message::setMessage(\"<div class='no'>Failed to Remove</div>\");\n }\n Utility::redirect(\"volunteers.php\");\n }", "public function delete(): void\n {\n $id = $this->id;\n $this->fetch(\n 'DELETE FROM user WHERE id = ?;',\n [$id]\n );\n }", "public function delete_user($user);", "protected function deleteUser()\n {\n $userId = $this->request->variable('user_id',0);\n\n if($userId === 0)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => ['User ID was not supplied']\n ]);\n }\n\n // Determine if this user is an administrator\n $arrUserData = $this->auth->obtain_user_data($userId);\n $this->auth->acl($arrUserData);\n $isAdmin = $this->auth->acl_get('a_');\n\n if($isAdmin)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'User was not deleted because they are an admin',\n 'error' => ['phpBB admin accounts cannot be automatically deleted. Please delete via ACP.']\n ]);\n }\n\n user_delete('remove', $userId);\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user was deleted',\n 'data' => [\n 'user_id' => $userId\n ]\n ]);\n }", "public function on_account_delete( $user_id ) {\n\n\t\t// remove user from all the networks.\n\t\t// how about deleting user data from all the networks?\n\t\tmnetwork_remove_user( $user_id );\n\t}", "public function logoutUser()\n {\n // Unset session-key user\n $this->di->get(\"session\")->delete(\"my_user_id\");\n $this->di->get(\"session\")->delete(\"my_user_name\");\n //$this->di->get(\"session\")->delete(\"my_user_password\");\n $this->di->get(\"session\")->delete(\"my_user_email\");\n //$this->di->get(\"session\")->delete(\"my_user_created\");\n //$this->di->get(\"session\")->delete(\"my_user_updated\");\n //$this->di->get(\"session\")->delete(\"my_user_deleted\");\n //$this->di->get(\"session\")->delete(\"my_user_active\");\n $this->di->get(\"session\")->delete(\"my_user_admin\");\n }", "public function destroy() {\n\t\t\t$this->session->unset('user');\n\t\t}", "public static function logoutUser( ) {\r\n self::$database->update(\"UPDATE users set sid=? where sid=?\", \r\n \"\", session_id());\r\n session_destroy();\r\n }", "public function delete() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"UPDATE users SET state='DELETED' WHERE id = ?\");\n\t\t$stmt->execute(array($this->id));\n\t}", "public function delete()\n {\n $logger = $this->getLogger();\n\n $logger->info(\n 'Deleting user and all their LPAs',\n $this->getAuthenticationService()->getIdentity()->toArray()\n );\n\n try {\n $this->apiClient->httpDelete('/v2/user/' . $this->getUserId());\n } catch (ApiException $ex) {\n $logger->err($ex->getMessage());\n return false;\n }\n\n return true;\n }", "public function deleteUser()\n {\n $user = User::find(Auth::id());\n $user->delete();\n return redirect('/');\n }", "public function delete($id) {\n\t\t// Delete the user\n\t\t$this->getDb()->delete('t_user', array('idUser' => $id));\n\t}", "public function deleteUser($id)\n {\n $user = User::find($id);\n $user->delete();\n }", "public function deleteIdentity ()\n\t{\n\t\tif ($this->session->has('user')) {\n\n\t\t\t$this->session->remove('user');\n\t\t}\n\n\t}", "public function deleteUser ($username)\n\t{\n\t\t$this->_delUserKey($username, self::SETTINGS);\n\t\t$this->_delUserKey($username, self::COOKIES);\n\t}", "public function delete_account($user_id) {\r\n // Connect To The DataBase\r\n $connection = DB::connect();\r\n\r\n // Delete Account\r\n $stmt = \"DELETE FROM users WHERE id = '$user_id'\";\r\n $connection->query($stmt);\r\n\r\n // Delete Profile Likes\r\n $stmt = \"DELETE FROM profile_likes WHERE user_id = '$user_id'\";\r\n $connection->query($stmt);\r\n\r\n $stmt = \"DELETE FROM profile_likes WHERE profile_id = '$user_id'\";\r\n $connection->query($stmt);\r\n\r\n // Delete Post Likes\r\n $stmt = \"DELETE FROM post_likes WHERE user_id = '$user_id'\";\r\n $connection->query($stmt);\r\n\r\n // Delete Post Views\r\n $stmt = \"DELETE FROM post_views WHERE user_id = '$user_id'\";\r\n $connection->query($stmt);\r\n\r\n $post = new Post();\r\n\r\n // Delete All User Posts\r\n $posts = $post->get_all_posts($user_id);\r\n\r\n foreach ($posts as $single) {\r\n $post->delete_post($single['id']);\r\n }\r\n }", "function mysql_deluser($username)\n{\n $user_id = mysql_auth_user_id($username);\n\n dbDelete('entity_permissions', \"`user_id` = ?\", array($user_id));\n dbDelete('users_prefs', \"`user_id` = ?\", array($user_id));\n dbDelete('users_ckeys', \"`username` = ?\", array($username));\n\n return dbDelete('users', \"`username` = ?\", array($username));\n}", "function deleteAccount(){\n try{\n $bdd = dbConnect();\n $stmt = $bdd->prepare(\"DELETE FROM user WHERE username=:username\");\n $stmt->execute(array(\n 'username' => $_SESSION['username']\n ));\n }\n catch(PDOException $e){\n echo \"<br>\" . $e->getMessage();\n }\n }", "public function destroy($id)\n {\n // delete user\n }", "public function delete()\n {\n $this->getMasterApiClient()->deleteSubUser($this->getSubAccountUsername());\n LaravelLog::info('Sub account deleted: ' . $this->getSubAccountUsername());\n parent::delete();\n }", "public function action_deleteaccount()\n\t{\n\t\tglobal $txt, $context, $modSettings, $cur_profile;\n\n\t\tif (!$context['user']['is_owner'])\n\t\t{\n\t\t\tisAllowedTo('profile_remove_any');\n\t\t}\n\t\telseif (!allowedTo('profile_remove_any'))\n\t\t{\n\t\t\tisAllowedTo('profile_remove_own');\n\t\t}\n\n\t\t// Permissions for removing stuff...\n\t\t$context['can_delete_posts'] = !$context['user']['is_owner'] && allowedTo('moderate_forum');\n\n\t\t// Can they do this, or will they need approval?\n\t\t$context['needs_approval'] = $context['user']['is_owner'] && !empty($modSettings['approveAccountDeletion']) && !allowedTo('moderate_forum');\n\t\t$context['page_title'] = $txt['deleteAccount'] . ': ' . $cur_profile['real_name'];\n\n\t\t// make sure the sub-template is set...\n\t\ttheme()->getTemplates()->load('ProfileAccount');\n\t\t$context['sub_template'] = 'deleteAccount';\n\t}", "public function delete($id) {\n // Delete the user\n $this->getDb()->delete('user', array('user_email' => $id));\n }", "Public Function PermanentDelete()\n\t{\n\t\t$this->_db->delete('bevomedia_user', 'ID = ' . $this->id);\n\t\t$this->_db->delete('bevomedia_user_info', 'ID = ' . $this->id);\n\t}", "public function destroy($id)\n {\n $user = User::find($id)->delete();\n }", "public static function delete(Users $user)\n {\n $email=$user->Email;\n DB::delete(\"user\",\"Email='$email' AND IsDeleted=0\");\n \n //$conn->close();\n header('location: DeleteUser.php');\n\n }", "function delete_user($user_id = 0)\n\t{\n\t\t//delete user\n\t\t$this->db->where('user_id', $user_id);\n\t\t$this->db->delete('ci_users');\n\t}", "public function delete()\n {\n foreach ($this->users as $user) {\n $uid = $user->id;\n // delete whole website info for this user\n if ((bool)$this->delete) {\n $model = new FormUserClear($user);\n $model->comments = true;\n $model->content = true;\n $model->feedback = true;\n $model->wall = true;\n $model->make();\n }\n\n // delete avatars\n File::remove('/upload/user/avatar/big/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/medium/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/small/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/original/' . $uid . '.jpg');\n // delete user profile and auth data\n $user->profile()->delete();\n // delete user provider data\n $user->provider()->delete();\n // delete user object\n $user->delete();\n }\n }", "public function softdelete()\n {\n\n $user = User::findOrFail(request()->id);\n\n $user->first_name = NULL;\n $user->middle_name = NULL;\n $user->last_name = NULL;\n $user->email = NULL;\n $user->address = NULL;\n $user->postal = NULL;\n $user->city = NULL;\n $user->phone = NULL;\n\n $user->save();\n $user->delete();\n // Session::flash('success', 'Gebruiker verwijderd');\n return redirect('/users');\n\n }", "public function tearDown() {\n User::find($this->user_id)->delete();\n }", "function deleteUser()\n {\n $validateF = new ValidateFunctions();\n if ($_SESSION['id'] == $_GET['']) {\n logUserOut();\n }\n $id = $validateF->sanitize($_GET['id']);\n $userRp = new UserRepository();;\n $hasUser = $userRp->getOneFromDB($id);\n if ($hasUser != 0) {\n $this->deleteUserImage($id);\n $this->removeUser($id);\n $_SESSION['success'] = ['User deleted successfully'];\n } else {\n $_SESSION['error'] = ['No user found.'];\n }\n header('Location:index.php?action=adminUsers');\n }", "public function unlinkAccount()\n {\n }", "function delete_user()\n {\n\n //return true if successful\n }", "public function userDeleted()\n\t{\n\t\tself::authenticate();\n\n\t\t$userId = FormUtil::getPassedValue('user', null, 'GETPOST');\n\t\tif(!is_string($userId)) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\t$user = $this->entityManager->getRepository('Owncloud_Entity_DeleteUser')->findOneBy(array('uname' => $userId));\n\t\tif(!($user instanceof Owncloud_Entity_DeleteUser)) {\n\t\t\treturn self::ret(false);\n\t\t}\n\t\t$this->entityManager->remove($user);\n\t\t$this->entityManager->flush();\n\n\t\treturn self::ret(true);\n\t}", "public function destroy_user($id)\n\t{\n\t\t/*\n\t\t$admin = Admin::find($id);\n\t\t\n\t\t$admin->delete();\n\t\treturn redirect('admin/user/home_user');\n\t\t*/\n\t}", "public function delete($user)\n {\n $user->deleteProfilePhoto();\n $user->tokens->each->delete();\n\n // $user->delete(); csak logikai törlés a megngedett\n $user->update([\"name\" => \"deleted\".$user->id,\n \"email\" => \"deleted\".$user->id.\"@deleted.com\",\n \"password\" => \"psw\".rand(100000,999999)]);\n\n \\DB::table('members')\n ->where('user_id','=',$user->id)\n ->delete();\n\n }", "public function post_delete() {\n //try to delete the account\n $status = AuxUser::deleteUser();\n if ($status[0]) {\n //if the delete user process worked, log out\n echo '<script>alert(\"Account Deleted\");</script>';\n Response::redirect('/profile/logOut');\n } else {\n //if not, print the error message\n echo '<script>alert(\"'.$status[1].'\");</script>';\n Response::redirect('/profile');\n }\n }", "public function user_delete($data = array())\n\t{\n\t\tunset($data['user']['u_password']);\n\t\t\n\t\t$this->CI->logger->add('users/user_delete', $data);\n\t}", "public function destroy($id)\n\t{\n\t\t$user = User::find($id);\n\n\t\t// Check if signed in user matches user to be deleted\n\t\tif (Auth::user()->getId() == $user->id) {\n\n\t\t\tAuth::logout();\n\n\t\t\t$user->delete();\n\n\t\t\t// Redirect\n\t\t\tSession::flash('info_message', 'Account Deleted!');\n\t\t\treturn redirect(route('users.index'));\n\t\t} else {\n\t\t\tSession::flash('info_message', 'You do not have that permission');\n\t\t\treturn redirect(route('users.show', [$id]));\n\t\t}\n\t}", "private function deleteUser()\r\n {\r\n if (isset($_GET['id'])) {\r\n\r\n $id_user = $_GET['id'];\r\n UserDAO::deleteUser($id_user);\r\n $_SESSION['deleteUser'] = '';\r\n header('Location:' . BASE_URL . \"users\");\r\n exit();\r\n }\r\n }", "function deleteUserAccount(){\n\t\t\t$id = $_POST[\"id\"];\n\t\t\t$this->db->set('status', 'Deactivated');\n\t\t\t$this->db->where('userID', $id);\n\t\t\t$query = $this->db->update('users');\n\t\t\t\n\t\t\tif($query){\n\t\t\t\techo \"done\";\n\t\t\t}\n\t\t\t\n\t\t}", "public function destroy(User $user)\n {\n $user->delete();\n }", "public function destroy(User $user)\n {\n $user->delete();\n }", "public function deleteUser($id)\n {\n $this->apiClient->deleteUser(['id' => $id]);\n }", "function wyz_delete_user() {\n\t$nonce = filter_input( INPUT_POST, 'nonce' );\n\t$user_id = get_current_user_id();\n\t$pass = filter_input( INPUT_POST, 'password' );\n\tif ( ! wp_verify_nonce( $nonce, 'wyz_delete_' . $user_id . '_user' ) ) {\n\t\twp_die(0);\n\t}\n\n\t$user = get_user_by( 'id', $user_id );\n\tif ( !$user || !wp_check_password( $pass, $user->data->user_pass, $user_id) )\n\t wp_die(0);\n\n\tWyzHelpers::delete_user_data( $user );\n\twp_delete_user( $user->ID );\n\twp_die( 1 );\n\t//wp_die( array( $output, $count ) );\n}", "public function destroy($id)\n {\n $user = User::find($id);\n $user->delete();\n Auth::logout();\n return redirect('login')->with('status', 'Administrator account removed! Please Re-Login');\n }", "public function deleteUser($appUserID)\n {\n $this->sdb->query('delete from appuser where id=$1', array($appUserID));\n $this->sdb->query('delete from appuser_role_link where uid=$1', array($appUserID));\n }", "function delete($conn)\n{\n $response[\"loggedIn\"] = getSessionValue(\"user\", \"\") != \"\";\n if (!$response[\"loggedIn\"])\n {\n $response[\"error\"] = \"You must login to delete your user account.\";\n return $response;\n } \n \n // make sure the user exists...\n $userID = getSessionValue(\"user\", \"\")[\"userID\"];\n $stmt = $conn->prepare(\"SELECT USER_ID FROM USER WHERE USER_ID = ?\");\n $stmt->bind_param(\"i\", $userID);\n $stmt->execute();\n if (!$stmt->fetch()) \n {\n $response[\"error\"] = sprintf(\"User %d does not exist.\", $userID);\n return $response;\n }\n $stmt->close();\n \n // delete the user...\n $stmt = $conn->prepare(\"DELETE FROM USER WHERE USER_ID = ?\");\n $stmt->bind_param(\"i\", $userID);\n $stmt->execute();\n \n // log the user out...\n setSessionValue(\"user\", \"\");\n $response[\"loggedIn\"] = false;\n return $response;\n}", "public function destroy($id)\n {\n User::find($id)->delete();\n }", "public function destroy($id)\n {\n $user = User::find($id);\n $user->delete();\n }", "public function destroy($id)\n {\n $user = User::find($id);\n $user->delete();\n }", "function deleteUser($username)\r\n {\r\n $this->querySimpleExecute('delete from t_user where useUsername = ' . $username);\r\n }", "public function deleteAction() {\n $uid = $this->getInput('uid');\n $info = Admin_Service_User::getUser($uid);\n if ($info && $info['groupid'] == 0) $this->output(-1, '此用户无法删除');\n if ($uid < 1) $this->output(-1, '参数错误');\n $result = Admin_Service_User::deleteUser($uid);\n if (!$result) $this->output(-1, '操作失败');\n $this->output(0, '操作成功');\n }", "public function deleted(User $user)\n {\n debug('User deleted');\n }", "function admin_logout() {\r\n\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERID');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERNAME');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USEREMAIL');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERTYPE');\r\n $this->redirect(DEFAULT_ADMINURL);\r\n }", "public function logoutUser() {\r\n\t\t$this->coreAuthenticationFactory->logoutUser ();\r\n\t}", "public function deleting(User $user)\n {\n if($user->isForceDeleting()) \n {\n $this->forceDeleting($user);\n }\n }", "public function destroy($id)\n {\n //\n $user = User::find($id);\n $user->delete();\n return redirect('/home/accountlist');\n }", "public function destroy(User $user)\n {\n User::find($user->id)->delete();\n }", "public function destroy(User $user)\n {\n User::find($user->id)->delete();\n }", "static function logout() {\n self::forget(self::currentUser());\n unset($_SESSION['userId']);\n session_destroy();\n }", "public function destroy()\n {\n $user = $this->getAuthenticatedUser();\n try\n {\n $user->delete();\n } catch (Exception $e) {\n return $this->setStatusCode(409)->respondWithError(\"Cannot delete user.\");\n }\n return $this->respond(['status' => 'success']);\n\n }", "public function deleteAccountAction() {\n //get the request object\n $request = $this->getRequest();\n //check if form is posted\n if ($request->getMethod() == 'POST') {\n //get the session object\n $session = $request->getSession();\n //get the user object from the firewall\n $user = $this->getUser();\n //set the delete flag\n $user->setEnabled(FALSE);\n //get the entity manager\n $em = $this->getDoctrine()->getManager();\n //get the social accounts object\n $socialAccounts = $user->getSocialAccounts();\n //remove the social accounts object if exist\n if ($socialAccounts) {\n $em->remove($socialAccounts);\n }\n //save the changes\n $em->flush();\n //logout the user\n $this->get('security.context')->setToken(null);\n //invalidate the current user session\n $session->invalidate();\n //set the success flag\n $session->getFlashBag()->set('success', $this->get('translator')->trans('Your account has been deleted'));\n //redirect to the login page\n return $this->redirect($this->generateUrl('login'));\n }\n return $this->render('ObjectsUserBundle:User:delete_account.html.twig');\n }", "public function deleting(User $user)\n {\n //\n }", "public function deleting(User $user)\n {\n //\n }", "public function deleting(User $user)\n {\n //\n }", "public function destroy($id)\n {\n //prevent other user to access to this page\n $this->authorize(\"isAdmin\");\n \n //delete user\n $user = User::findOrFail($id);\n $user->delete();\n }", "public function destroy(User $model);", "public function delete($params) {\n $token = $this->require_authentication();\n $userid = $token->getUser()->getUserId();\n\n // delete user object, redirect to homepage\n try {\n $res = User::delete($this->getDBConn(), $userid);\n } catch (\\PDOException $dbErr) {\n $this->addFlashMessage('Database error on deleting user:<br>'.$dbErr->getMessage(), self::FLASH_LEVEL_SERVER_ERR);\n $this->redirect(\"/\");\n }\n\n // make sure user is logged out after deletion\n session_unset();\n session_destroy();\n session_start();\n\n $this->addFlashMessage(\"Deleted user.\", self::FLASH_LEVEL_INFO);\n\n if ($res) {\n error_log(\"Deleted user \".$userid);\n $this->redirect(\"/\");\n } else {\n $this->error404('/users/delete/' . $userid);\n }\n }", "public function destroy($id)\n {\n $stm_user = \\App\\UserProfile::where('user_id',$id)->first()->delete();\n $users = User::find($id);\n $users->destroy($id);\n \\Session::flash('message','User has been deleted successfully');\n }", "protected function _destroyUser($username) {}", "public function destroy($id)\n {\n $user = User::find($id);\n if($user->id != auth()->user()->id)\n {\n $user->delete();\n return redirect('/user')->with('success', 'User records Deleted successfully');\n }\n else{\n return redirect('/user')->with('error', 'You cannot delete your own account');\n }\n }", "function system_delete_user($uid)\n{\n}", "public function destroy(User $user)\n {\n if(Auth::user()->is_admin == true ){\n\n $user->delete();\n\n Session::flash('message', 'The user account has been deleted.');\n Session::flash('alert-class', 'flash-success');\n\n return redirect()->route('home');\n }\n else {\n Session::flash('message', 'You don\\'t have permission to delete this user account.');\n Session::flash('alert-class', 'flash-danger');\n\n return response()->redirect('home');\n }\n }", "public function deleteUser($userId = FALSE) {\n\n if ($userId) {\n $this->db->delete('user', array('usr_id' => $userId));\n }\n }", "public function logoutUser() {\n $this->session->unsetSession(self::$storedUserId);\n $this->session->setFlashMessage(2);\n self::$isLoggedIn = false;\n }", "public function deleteUser(){\n\t\t$sql = \"SELECT COUNT(aid) AS theCount FROM administrator where uid=:uid\";\n\n\t\tif($stmt = $this->_db->prepare($sql)){\n\t\t\t$stmt->bindParam(\":uid\", $_SESSION['UID'], PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t\t$row = $stmt->fetch();\n\t\t\tif($row['theCount']==0){\n\t\t\t\treturn \"<h2> Error </h2>\" . \n\t\t\t\t\t\"<p> Only administrators can do this. </p>\";\n\t\t\t}\n\t\t\t$stmt ->closeCursor();\n\t\t}\n\t\telse{\n\t\t\treturn \"Something went wrong checking the admin table.\";\n\t\t}\n\t\t\n\t\t//TODO: send the deleted user an email telling them they have been deleted\n\t\t\n\t\t$sql = \"DELETE FROM user WHERE uid=:uid\";\n\t\tif($stmt = $this->_db->prepare($sql)){\n\t\t\t$stmt->bindParam(\":uid\", $_GET['u'], PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t}\n\t\telse{\n\t\t\treturn \"Something went wrong deleting the user.\";\n\t\t}\n\n\t\treturn \"done\";\n\t}", "public function destroy($id)\n {\n $username = User::where('id',$id)->value('username');\n\n $log = new Log([\n 'status' => ''.strtoupper(auth()->user()->username).' delete user ['.$username.'].'\n ]);\n $log->save();\n\n User::destroy($id);\n\n // Return response\n return response()->json([\n 'success' => true,\n 'message' => \"User Account has been deleted.\",\n ]);\n }", "public function destroy($id)\n\t{\n\t\tif ($this->auth->user()->id !== $id)\n\t\t{\n\t\t\t$this->notify->success('You do not have permission to delete this account.')->flash();\n\n\t\t\treturn $this->redirect->back();\n\t\t}\n\n\t\t$user = $this->user->findOrFail($id);\n\t\t$user->forceDelete();\n\n\t\t$this->notify->success('Your account has been deleted.')->flash();\n\n\t\treturn $this->redirect->route('login');\n\t}", "public function destroy($id)\n {\n\n $user = User::find($id);\n $user->delete();\n\n }", "public function deleteUser($email) {\r\n\t\t$sqlObj = new DataBase();\r\n\t\t$id = (int) $this->searchUser($email);\r\n\t\tif ($id != FALSE) {\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`user_credentials` WHERE `user_credentials`.`id`=$id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`user_profile` WHERE `user_profile`.`uc_id` = $id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`track` WHERE `track`.`uc_id` = $id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`bmk_activity` WHERE `bmk_activity`.`uc_id` = $id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`bmk_entry` WHERE `bmk_entry`.`uc_id` = $id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`bmk_activity` WHERE `bmk_activity`.`uc_id` = $id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t}\r\n\t\t$sqlObj->destroy();\r\n\t}", "function user_delete($user_id) {\n\t\t\n\t\tif(!$this->has_access(__FUNCTION__, __CLASS__, $this->output_data['module'])) {\n\t\t\tset_warning_message('Sory you\\'re not allowed to access this page.');\n\t\t\tredirect('admin');\n\t\t\texit;\n\t\t} elseif($user_id == get_user_id()){\n\t\t\tset_warning_message('Sory you cannot delete your own account.');\n\t\t\tredirect('admin');\n\t\t\texit;\n\t\t} else { \n\t\t\t$this->user_model->delete_user($user_id);\n\t\t\tset_success_message('Successfully delete user');\n\t\t\t$this->show_list();\n\t\t}\n\t}", "public function delete(){\t\t\tif( is_null( $this->id ) ) trigger_error( \"User::delete(): Attempt to delete a user object that does not have its ID property set.\", E_USER_ERROR );\r\n\t\t\t\r\n\t\t\t//Delete the object\r\n\t\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t\t$st = $conn->prepare ( \"DELETE FROM \".TABLENAME_GROUPS.\" WHERE id = :id LIMIT 1\" );\r\n\t\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t\t$st->execute();\r\n\t\t\t$conn = null;\t\t\r\n\t\t}", "public function destroy($id)\n {\n $user = User::withTrashed()->where('id', $id)->firstOrFail();\n\n if($user) {\n\n if($user->trashed()) {\n\n $user->forceDelete();\n\n } else {\n $user->delete();\n }\n } \n return redirect(route('home'));\n }", "public function destroy(User $user)\n {\n $currentUser = Auth::user();\n \n if ($user->id !== $currentUser->id) {\n \n $user->save();\n $user->delete();\n\n Alert::success('Success', 'User deleted successfully');\n return redirect('users');\n }\n Alert::error('Error', 'User not deleted');\n return back()->with('error');\n }", "public function deleting(Profile $profile)\n {\n $profile->user->delete();\n }", "public function deleteUserById($user_id){\n $this->dao->deleteUserByid($user_id);\n }", "public function disconnetUser() {\n\t\tsession_start();\n\t\tunset($_SESSION['id_users']);\n\t\tunset($_SESSION['username']);\n\t\theader('Location: index.php');\n\t}", "public function destroy(User $account)\n {\n if ( $account->delete() )\n {\n $toastr = Session::flash('toastr', [ \n [\n 'heading' => 'Success',\n 'text' => 'Account successfully removed!', \n 'icon' => 'success', \n ],\n ]);\n }\n\n return redirect('accounts/');\n }" ]
[ "0.80796385", "0.7814329", "0.76608986", "0.7640679", "0.7541677", "0.7523015", "0.74926573", "0.72269547", "0.71670294", "0.7146755", "0.7092586", "0.707935", "0.70350283", "0.69743186", "0.6973685", "0.69732744", "0.6970319", "0.69675094", "0.696012", "0.6954495", "0.6937739", "0.6924225", "0.691584", "0.6882419", "0.68798226", "0.6868977", "0.6867897", "0.68676394", "0.68509835", "0.6836521", "0.68221265", "0.6818295", "0.6791655", "0.6784442", "0.6782322", "0.67813706", "0.6780436", "0.67718536", "0.675598", "0.674884", "0.67226714", "0.6717921", "0.67124575", "0.67118245", "0.67048705", "0.6698515", "0.66981006", "0.66840696", "0.66824186", "0.66534233", "0.66521645", "0.6651302", "0.6650962", "0.6649691", "0.6649691", "0.66431624", "0.6641908", "0.663962", "0.66364574", "0.663439", "0.6621955", "0.6620602", "0.6620602", "0.66201067", "0.6595519", "0.6594286", "0.65894955", "0.6587371", "0.65838915", "0.6583017", "0.65773356", "0.65773356", "0.6567658", "0.6561938", "0.65556467", "0.6553993", "0.6553993", "0.6553993", "0.65473163", "0.65466094", "0.6545609", "0.6544188", "0.6544075", "0.6543294", "0.6541317", "0.6539156", "0.6539129", "0.65153295", "0.65128", "0.6511636", "0.65080357", "0.6505463", "0.650215", "0.64929783", "0.6491414", "0.6488976", "0.6488039", "0.64870745", "0.64865774", "0.64799523", "0.6473797" ]
0.0
-1
Get an empty query for this model.
public function emptyQuery() { return Content::query(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultQuery()\n {\n return $this->model->newQuery()->where(function ($q) {\n $q->whereNull('team_id');\n $q->orWhere('team_id', app(ActiveTeam::class)->get()->id);\n });\n }", "public function newQueryWithoutScopes()\n {\n $builder = $this->newBuilder();\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n return $builder->setModel($this);\n }", "public function newQueryWithoutScopes();", "public function emptyQuery()\n {\n return Image::query();\n }", "public function newQueryWithoutScopes()\n {\n $builder = $this->newEloquentBuilder($this->newBaseQueryBuilder());\n\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n\n return $builder->setModel($this)\n //->setfillableColumns($this->fillable)\n ->with($this->with)\n ->withCount($this->withCount);\n }", "public static function empty() : DBQueryResult {\n return new DBQueryResult('', '', []);\n }", "public static function getEmptyObject() {\n if (!self::$empty) {\n self::$empty = new pQryEmpty();\n }\n return self::$empty;\n }", "public function newQueryWithoutRelationships();", "public static function get_query()\n\t{\n\t\treturn self::new_instance_records()->get_query();\n\t}", "public static function query()\n {\n // Create a new model instance for the query to ensure\n // that the model's initialize() method gets called.\n // Otherwise, the property definitions will be incomplete.\n $model = new static();\n\n return new Query($model);\n }", "public function newQuery()\n {\n return $this->model->newQueryWithoutScopes();\n }", "public static function query()\n {\n return (new static)->newQuery();\n }", "public static function query()\n {\n return (new static)->newQuery();\n }", "public function query() {\n // Leave empty to avoid a query on this field.\n }", "protected function _getQuery()\n {\n return $this->_queryFactory->get();\n }", "public function clear(){\n\t\t\t//empty query creation variables\n\t\t\t$this->parameters = array();\n\t\t\t$this->select = false;\n\t\t\t$this->orderBy = false;\n\t\t\t$this->limit();\n\t\t\t$this->offset();\n\t\t\t$this->insert = false;\n\t\t\t$this->where = false;\n\t\t\treturn $this;\n\t\t}", "protected function baseQuery()\n {\n $model = $this->getModelNamespace();\n return App::make($model);\n }", "public function empty() : DBQueryResult {\n return $this->db->run(\"DELETE FROM `$this->_name`\");\n }", "public static function createQuery()\n\t{\n\t\treturn new ActiveQuery(['modelClass' => get_called_class()]);\n\t}", "public function newQueryWithoutScopes(): Builder\n {\n return $this->newModelQuery();\n }", "protected function query() {\n\t\treturn new Query($this);\n\t}", "public function createQuery()\n {\n $query = $this->persistenceManager->createQueryForType($this->objectType);\n if ($this->defaultOrderings !== []) {\n $query->setOrderings($this->defaultOrderings);\n }\n if ($this->defaultQuerySettings !== null) {\n $query->setQuerySettings(clone $this->defaultQuerySettings);\n }\n return $query;\n }", "public function newModelQuery();", "public function get_query(){\n return $this->build_query()->query;\n }", "protected function getQuery() {\n $query = new Query();\n if($this->valid()) {\n $query->setQuery(new GtNode($this->dataStore->getIdentifier(), $this->key()));\n }\n $query->setLimit(new LimitNode($this->limit));\n $query->setSort(new SortNode([\n $this->dataStore->getIdentifier() => SortNode::SORT_ASC\n ]));\n return $query;\n }", "public function getQuery() {\n if ($this->query == null) {\n $this->query = new PgQuery();\n }\n return $this->query;\n }", "protected function createQuery()\n {\n return \\PropelQuery::from($this->class);\n }", "protected function retrieveOrCreateQueryInstance()\n {\n return $this->queryBuilder ?? $this->queryBuilder = new $this->model();\n }", "public function first(): QueryInterface\n\t{\n\t\tif ($this->isEmpty()) {\n\t\t\treturn new Query();\n\t\t}\n\n\t\treturn $this[0];\n\t}", "public function newQueryWithoutScope($scope);", "public function query()\n {\n if ($model = $this->model) {\n return new $model();\n }\n }", "public function getBaseQuery()\n {\n $instance = User::where('role', '!=', User::ROLE_USER);\n\n if (!empty($this->filter['nickname'])) {\n $instance->where('users.nickname', 'like', $this->filter['nickname'] . '%');\n }\n\n if (!empty($this->filter['role'])) {\n $instance->where('users.role', '=', $this->filter['role']);\n }\n\n if (!empty($this->filter['permissions'])) {\n foreach ($this->filter['permissions'] as $permission) {\n $instance\n ->whereRaw('(permissions & ' . $permission . ') != 0')\n ->orWhere('users.role', '=', User::ROLE_ROOT);\n }\n }\n\n if (!empty($this->filter['created_date_period'])) {\n $instance\n ->whereDate('users.created_at', '>=', $this->filter['created_date_period']['from'])\n ->whereDate('users.created_at', '<=', $this->filter['created_date_period']['to']);\n } elseif (!empty($this->filter['created_date'])) {\n $instance->whereDate('users.created_at', $this->filter['created_date']);\n }\n\n return $instance;\n }", "public function testBuildFromEmpty()\n {\n $query = $this->getQuery()\n ->buildFrom()\n ;\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function query()\n {\n return $this->_query;\n }", "public function clearWhere() {\n $this->where = '';\n return $this;\n }", "private function cleanQuery()\n {\n $this->where = [];\n $this->bind = [];\n\n return $this;\n }", "public function Query(){\r\n\t\treturn self::get_query();\r\n\t}", "public function query(): Query\n {\n return new Query($this->getWebservice(), $this);\n }", "public function getQuery() : QueryBuilder\n {\n return $this->query;\n }", "public function getQUERY()\n {\n return $this->QUERY;\n }", "public function getQuery()\n {\n /* Return self->query */\n return $this->query;\n }", "public function getQuery()\n {\n return isset($this->query) ? $this->query : null;\n }", "public function getQuery()\n {\n $query = $this->createQueryBuilder('m');\n\n return $query;\n }", "public function setGeneralDefaultQuery()\n {\n return $this;\n }", "public function newQuery()\n {\n return $this->registerGlobalScopes($this->newQueryWithoutScopes());\n }", "public function createQuery() {\n\t\treturn $this->queryFactory->create($this->objectType);\n\t}", "public function createStandardQueryBuilder()\n {\n return $this->createQueryBuilder()\n ->field('status')->notEqual(MultimediaObject::STATUS_PROTOTYPE)\n ->field('islive')->equals(false);\n }", "public function getQuery(): Query\n {\n $foreignModel = $this->foreignModel;\n $query = new Query(new $foreignModel());\n $this->initQuery($query);\n\n return $query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function testBuildWhereEmpty()\n {\n $query = $this->getQuery();\n\n $this->assertSame(\n '',\n $query->buildWhere()\n );\n }", "function query()\n\t{\n\t\treturn $this->query;\n\t}", "public static function empty(): self\n {\n return new self(null);\n }", "public function newQuery()\n {\n return new self($this->connection, $this->processor);\n }", "public function getQuery()\n {\n return $this->_query;\n }", "public function getQuery()\r\n\t{\r\n\t\treturn $this->query;\r\n\t}", "public function getQuery() {\n return $this->query;\n }", "public function createQuery()\n {\n $query = parent::createQuery();\n $query->getQuerySettings()->setRespectStoragePage(false);\n return $query;\n }", "public function getQuery(): ActiveQuery\n {\n return ContactData::find();\n }", "public function resetQuery(): ?Builder;", "public function getQuery() {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->get(self::_QUERY);\n }", "public function removeEmptyPairs(): static\n {\n return $this->removeEmptyQueryPairs();\n }", "protected function sourceQuery(){\n $query = parent::sourceQuery();\n $query->condition('i.field_name', array_keys($this->getFieldNameMappings()), 'NOT IN');\n return $query;\n }", "public function newQuery()\n {\n $datasource = $this->getDatasource();\n\n $query = new Builder($datasource, $datasource->getPostProcessor());\n\n return $query->setModel($this);\n }", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function query() {\n\t\treturn Documents::instance()->query();\n\t}", "public function query()\n {\n return (new Query($this))->entity($this->getEntityName());\n }", "public function query(): QueryBuilder;", "public function getQuery()\n\t{\n\t\treturn $this->query;\n\t}", "public function getQuery()\r\n {\r\n return $this->m_query;\r\n }", "public function getQuery() {\n return $this->query;\n }", "public function newQuery();", "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "public function getEmpty()\n\t{\n\t\t$entity = new $this->entityClass();\n\t\treturn $this->loadRelations($entity);\n\t}", "public static function withAnyStatus()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope());\n }", "function clear()\n{\n\t$this->close();\n\t$this->query = array('select' => array('*'));\n\treturn $this;\n}", "public function getBaseQuery()\n {\n $instance = Media\n ::where(function ($query) {\n $query->notBanned();\n });\n\n if(!empty($this->boundary_coordinates)) {\n $instance\n ->whereBetween('profiles.lat', [$this->boundary_coordinates['min_lat'], $this->boundary_coordinates['max_lat']])\n ->whereBetween('profiles.lng', [$this->boundary_coordinates['min_lng'], $this->boundary_coordinates['max_lng']]);\n }\n\n $instance\n ->leftJoin('profiles', $this->content_type . '.user_id', '=', 'profiles.user_id')\n ->inRandomOrder()\n ->select([$this->content_type . '.*']);\n\n return $this->setIgnoredUsers($instance);\n }", "protected function query(): Builder\n {\n $query = $this->make()->newQuery();\n\n // Loads the active model if set, for use in getOne(), update(), delete(), etc.\n if ($this->activeModelInstance) {\n $query->where(\n $this->activeModelInstance->getKeyName(),\n $this->activeModelInstance->getKey()\n );\n }\n\n return $query;\n }" ]
[ "0.76495457", "0.76254785", "0.7282372", "0.7181244", "0.70589983", "0.6870792", "0.6868853", "0.6846359", "0.68052167", "0.679631", "0.67434055", "0.67417955", "0.67417955", "0.66920865", "0.6679704", "0.6657223", "0.6643897", "0.6548368", "0.6538156", "0.65365356", "0.65291154", "0.65198684", "0.6507197", "0.6431866", "0.6430438", "0.6388343", "0.6378123", "0.6353076", "0.63364315", "0.6331865", "0.633185", "0.63259816", "0.6312416", "0.63114566", "0.63114566", "0.63114566", "0.63114566", "0.63114566", "0.63114566", "0.63114566", "0.63114566", "0.63114566", "0.62891775", "0.62244225", "0.621237", "0.6204163", "0.61825216", "0.6182314", "0.6176476", "0.6172711", "0.61710465", "0.61649597", "0.6161328", "0.6148115", "0.6144964", "0.6144186", "0.6131869", "0.61290735", "0.61290735", "0.61290735", "0.61290735", "0.61290735", "0.61290735", "0.61290735", "0.61290735", "0.61290735", "0.61290735", "0.6125936", "0.61190236", "0.6110134", "0.61080164", "0.6101566", "0.60985523", "0.6093121", "0.608524", "0.60800236", "0.6078467", "0.6077132", "0.6076248", "0.6072763", "0.60699016", "0.6064655", "0.6063841", "0.6063841", "0.6063841", "0.60619855", "0.6046995", "0.60435396", "0.60415715", "0.6030976", "0.60252833", "0.60244477", "0.60185426", "0.60140806", "0.60140806", "0.6004061", "0.6003435", "0.6001561", "0.59983116", "0.59914196" ]
0.8157269
0
set the protect model to the admin user this will be used in the repository
function __construct(Page $model) { $this->model = $model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\n {\n return AdminUser::class;\n }", "public function admin(){\n return $this->belongsToOne('App\\User');\n }", "function userAdmin( )\n {\n return $this->UserAdmin ;\n }", "function setUserAdmin( $value )\n {\n $this->UserAdmin = $value;\n }", "public function makeAdministrator()\n {\n $this->setRole('administrator');\n }", "protected function setupAdminUser()\n {\n $GLOBALS['current_user'] = \\BeanFactory::getBean('Users')->getSystemUser();\n }", "public function admin() {\n return $this->belongsTo(Admin::class);\n }", "protected function signInAdmin()\n {\n $user = \\Statamic\\Facades\\User::make();\n $user->id(1)->email('[email protected]')->makeSuper();\n $this->be($user);\n return $user;\n }", "public function SetAdmin ($admin = TRUE);", "public function admin()\n {\n return $this->belongsTo(Admin::class);\n }", "public function admin()\n {\n return $this->belongsTo(Admin::class);\n }", "protected function isAdminUser() {}", "public function getAdminAttribute()\n {\n return User::whereId($this->accountId)->first();\n }", "public function model()\n {\n return Admin::class;\n }", "public function model()\n {\n return Admin::class;\n }", "public function adminOnly();", "public function adminOnly();", "public function ensureAdministratorAccess() {\r\n /** @var modUserGroup $adminGroup */\r\n $adminGroup = $this->modx->getObject('modUserGroup',array('name' => 'Administrator'));\r\n /** @var modAccessPolicy $adminContextPolicy */\r\n $adminContextPolicy = $this->modx->getObject('modAccessPolicy',array('name' => 'Context'));\r\n if ($adminGroup) {\r\n if ($adminContextPolicy) {\r\n /** @var modAccessContext $adminAdminAccess */\r\n $adminAdminAccess = $this->modx->newObject('modAccessContext');\r\n $adminAdminAccess->set('principal',$adminGroup->get('id'));\r\n $adminAdminAccess->set('principal_class','modUserGroup');\r\n $adminAdminAccess->set('target',$this->object->get('key'));\r\n $adminAdminAccess->set('policy',$adminContextPolicy->get('id'));\r\n $adminAdminAccess->save();\r\n }\r\n }\r\n }", "public function getAdministrator() {}", "public function withAdminAccessToken()\n {\n return $this->withAccessToken($this->randomUserId(), 'admin');\n }", "protected function isCurrentUserAdmin() {}", "protected function isCurrentUserAdmin() {}", "public function __construct()\n {\n if((strpos(\\Helpers\\Session::get('ROLES'),'A')||strpos(\\Helpers\\Session::get('ROLES'),'Z'))===false)\n \\Helpers\\Url::redirect('login');\n parent::__construct();\n $this -> _model_ = new \\Models\\Admin();\n }", "public function setAdmin($admin) {\n \n if($admin == 1) { $this->username = 1; }\n \n else { $this->username = 0; }\n }", "public function adminUser(): ?AdminUser\n {\n return Auth::guard(config('kontour.guard'))->user();\n }", "function Zenphoto_Administrator($user, $valid) {\n\t\tparent::PersistentObject('administrators', array('user' => $user, 'valid'=>$valid), NULL, false, empty($user));\n\t}", "public function userAuthClass()\n {\n return Yii::$app->adminuser;\n }", "public function setAsAdmin()\n {\n if (!in_array('admin', $this->roles)) {\n $this->roles[] = 'admin';\n }\n }", "public function requireAdmin(){\n if( ! Authentifiacation::isAdmin()){\n Authentifiacation::rememberRequestedPage();\n Flash::addMessage('You need to have admin status to access this page', Flash::INFO);\n self::redirect('/login/new');\n }\n }", "public function getUserModel() {\n\t\treturn ($this->isAdmin()) ? Mage::getSingleton('admin/user') : Mage::getSingleton('customer/customer');\n\t}", "function getAdmin() {\n if (auth()->guard('staff')->check()) {\n // Check if the auth user is a staff => get the admin id\n $project_id = auth()->guard('staff')->user()->project_id;\n $project = App\\Models\\Project::where('id', $project_id)->first();\n // We already have a relationship between the User and the Project models\n $user = $project->user;\n } else {\n $user = auth()->user();\n }\n return $user;\n }", "public function makeAdminToLogin()\n {\n return factory(User::class)->create([\n 'role' => User::ROLE_ADMIN\n ]);\n }", "public static function setAdministrator($userId) {\n $sql = \"INSERT INTO Administrators (id) VALUES ('$userId');\";\n return parent::insertDatabase($sql);\n }", "public function admin()\n {\n return $this->hasOne(Admin::class);\n }", "public function admins()\n {\n return $this->belongsToMany(Config::get('guardian.admin_user'), Config::get('guardian.role_admin_user_table'), Config::get('guardian.role_foreign_key'), Config::get('guardian.admin_user_foreign_key'));\n }", "public function admin(): self\n {\n return $this->state(['admin_only' => true]);\n }", "public function admin() {\n return $this->teachers()->where('role', '=', User::SCHOOL_ADMIN)->first();\n }", "private function grantAdminAccess()\n {\n if ($this->checkColumn(\"shopgate\", TABLE_ADMIN_ACCESS)) {\n // Create column shopgate in admin_access...\n xtc_db_query(\n \"alter table \" . TABLE_ADMIN_ACCESS\n . \" ADD shopgate INT( 1 ) NOT NULL\"\n );\n\n // ... grant access to to shopgate for main administrator\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate=1 where customers_id=1 LIMIT 1\"\n );\n\n if (!empty($_SESSION['customer_id'])\n && $_SESSION['customer_id'] != 1\n ) {\n // grant access also to current user\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 1 where customers_id='\"\n . $_SESSION['customer_id']\n . \"' LIMIT 1\"\n );\n }\n\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 5 where customers_id = 'groups'\"\n );\n }\n }", "public function change()\n {\n $AdminTable = TableRegistry::get('Bakkerij/CakeAdmin.Administrators');\n $user = $AdminTable->newEntity([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => 'test',\n 'active' => 1\n ]);\n $AdminTable->save($user);\n }", "function beforeFilter() {\n\t\tparent::beforeFilter();\n $this->Auth->fields = array(\n 'username' => 'username', \n 'password' => 'password'\n );\n\t\t$this->Session->delete('Auth.redirect');\n\t\t$this->Auth->userModel = 'Adminuser';\n\t\t\n\t\t$this->Auth->allow('login','index');\n\t\t$this->Auth->loginAction = array('controller' => 'adminusers', 'action' => 'login','admin'=>true);\n\t\t$this->Auth->loginRedirect = array('controller' => 'EmployerSiteUsages', 'action' => '','superadmin'=>true);\n\t\t$this->Auth->userScope = array('Adminuser.active' => 'yes');\t\t\n \t}", "public function adminUserConditionMatchesAdminUser() {}", "private function setUser()\n {\n return $this->user = Auth::check() ? Auth::user() : app(config('auth.model'));\n }", "protected function setGuard()\n {\n $user = request()->user ?? null;\n\n switch ($user) {\n case 'client':\n $this->guard = 'client-api';\n break;\n default:\n $this->guard = 'web';\n break;\n }\n\n }", "public static function getAdminUser()\n {\n return User::find(1);\n }", "public function createAdminUser(JacliModelDatabase $db)\n\t{\n\t}", "protected function setUserModel()\n {\n if ($model = $this->getUserModel()) {\n Models::setUsersModel($model);\n }\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "protected function guard()\n {\n return Auth::guard('admin');\n }", "public function getAdmin()\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) {\n $this->_f3->set('admin', $admin);\n }\n }", "public function currentauthUser() {\n return $this->belongsTo('App\\AdminUser', 'author_id');\n }", "function beforeFilter() { \n\t\tparent::beforeFilter();\n $this->Auth->fields = array(\n 'username' => 'username', \n 'password' => 'password'\n );\n\t\t$this->Session->delete('Auth.redirect');\n\t\t$this->Auth->userModel = 'Adminuser';\n\t\t//$this->Auth->allow('login');\n\t\t//$this->Auth->loginAction = array('controller' => 'roles', 'action' => 'login','admin'=>true);\n\t\t$this->Auth->loginRedirect = array('controller' => 'roles', 'action' => 'home','superadmin'=>true);\n\t\t$this->Auth->userScope = array('Adminuser.active' => 'yes');\n \t}", "function assignBackAuth() {\n AuthComponent::$sessionKey = 'Auth.Admin';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.store_id' => $this->Session->read('admin_store_id'), 'User.role_id' => 3, 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "function userModel() { \n $model = config('auth.model');\n return new $model;\n }", "public function adminCreator(){\n return $this->belongsTo('App\\User','created_by');\n }", "function first_user_as_forge_manager()\n {\n initialize_forge_management_permissions();\n $user = User::all()->first();\n $user->assignRole('manage-forge');\n }", "public function run()\n {\n $admin = new User();\n $admin->name = \"admin\";\n $admin->email = \"[email protected]\";\n $admin->password = bcrypt('password');\n $admin->visible_password = \"password\";\n $admin->email_verified_at =now();\n $admin->occupation = \"CEO\";\n $admin->address= \"Egypt\";\n $admin->phone = \"1230025479\";\n $admin->is_admin = 1 ;\n $admin->save();\n\n\n }", "public function administrador(){\n return $this->belongsTo('App\\Model\\administrador');\n }", "public function adminPermisionListing()\n\t\t\t{\n\t\t\t\t$cls\t\t\t=\tnew adminUser();\n\t\t\t\t$cls->unsetSelectionRetention(array($this->getPageName()));\n\t\t\t\t $_SESSION['pid']\t=\t$_GET['id'];\n\t\t\t\t \n\t\t\t}", "public function admin()\n\t{\n\t\tif (Auth::user()) \n\t\t{\n\t\t\t$user = Auth::user();\n\n\t\t\tif ($user['user_type'] === 0)\n\t\t\t{\n\t\t\t\treturn view('pages.admin');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn redirect('home');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn view('auth.login');\n\t\t}\n\t}", "function __construct(){\n $this->middleware(function ($request, $next) {\n $this->user= Auth::user();\n if($this->user->user_type!=1){\n return redirect('/admin/home');\n }\n return $next($request);\n });\n }", "function beforeFilter() {\n\t\tparent::beforeFilter();\n $this->Auth->fields = array(\n 'username' => 'username', \n 'password' => 'password'\n );\n\t\t$this->Session->delete('Auth.redirect');\n\t\t$this->Auth->userModel = 'Adminuser';\n\t\t\n\t\t$this->Auth->allow('login');\n\t\t$this->Auth->loginAction = array('controller' => 'adminusers', 'action' => 'login','admin'=>true);\n\t\t$this->Auth->loginRedirect = array('controller' => 'SiteWideResumes', 'action' => '','superadmin'=>true);\n\t\t$this->Auth->userScope = array('Adminuser.active' => 'yes');\t\t\n \t}", "protected function model()\n {\n return User::class;\n }", "protected function guard()\n {\n return Auth::guard('admins');\n }", "public function adminCreated(){\n return $this->belongsTo(User::class, 'admin_created_id');\n }", "function admin_user_id()\n {\n return Admin::app()->auth()->id();\n }", "public function getAdmin($id)\n {\n return $this->user->where('salon_id',$id)->first();\n }", "function admin_user(): ?Authenticatable\n {\n return Admin::app()->user();\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 run()\n {\n $this->disableForeignKeys();\n\n $user = User::query()->find(1);\n $user->assignRole(config('access.users.app_admin_role'));\n\n $this->enableForeignKeys();\n \n }", "public function user()\n {\n return $this->app->auth->guard('admin')->user();\n }", "public function run()\n {\n $this->createdUsers = factory(App\\User::class, 5)->create();\n $adminUser = factory(App\\User::class, 1)->create()->first();\n $adminUser->email = '[email protected]';\n $adminUser->accessControls()->saveMany(AccessControls::all());\n $adminUser->save();\n $this->createdUsers->push($adminUser);\n return $this;\n }", "public function init() {\n $authorization = Zend_Auth::getInstance();\n if ($authorization->hasIdentity()) {\n $this->view->user_id = Zend_Auth::getInstance()->getStorage()->read()->id;\n $this->view->is_admin=Zend_Auth::getInstance()->getStorage()->read()->is_Admin;\n }\n\n\n $this->_helper->layout->setLayout('admin');\n\n $this->model = new Application_Model_DbTable_MaterialContent();\n }", "public function staff()\n {\n return $this->belongsTo('App\\Admin\\User');\n }", "public function saveAdmin($admin = null){\n $admin = $admin instanceof Admin ? $admin : new Admin;\n\n $admin->fill(request()->only('role','name','email'));\n\n if(request()->filled('password')){\n $admin->password = bcrypt(request()->password);\n }\n $admin->save();\n return $admin;\n }", "private function _setIdentity(){\n $this->_setUserData($this->getClassUser()->getIdentity());\n }", "public function adminUpdated(){\n return $this->belongsTo(User::class, 'admin_updated_id');\n }", "public function adminMatters(){\n\n }", "public function __construct() {\r\n parent::Admin_Controller();\r\n $this->load->model('user/user_m', 'model_user');\r\n }", "function testIsAdmin() {\n $this->User =& ClassRegistry::init('User');\n }", "public function GetAdmin ();", "public function isAdmin(){\n\t\tparent::isAdmin();\n\t}", "public function admin_profile() {\n\n // nothing done here, everything happens in the view\n\n $user = $this->User->findById($this->Auth->user('id'));\n $this->set(compact('user'));\n }", "function assignFrontAuth() {\n AuthComponent::$sessionKey = 'Auth.User';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.merchant_id' => $this->Session->read('merchant_id'), 'User.role_id' => array('4', '5'), 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "public function isSuperAdmin(){\r\n if($this->user_type == 'SuperAdmin'){\r\n return true;\r\n }\r\n return false;\r\n}", "function admin_auth()\n {\n return auth(config(\"admin.auth_guard\"));\n }", "public function admin()\n {\n return view('admin/settings', [\n 'user' => Auth::user()\n ]);\n }", "public function user()\n {\n return $this->belongsTo(Config::get('odotmedia.advertisements.user.model'));\n }", "public static function authAdmin() {\n if (Yii::$app->user->can(\"administrator\") || Yii::$app->user->can(\"adminsite\")) {\n return TRUE; //admin ใหญ่\n }\n }", "public function adminUpdator(){\n return $this->belongsTo('App\\User','updated_by');\n }", "protected static function isAdminUser() {\r\n throw new \\Excpetion('yet to implement');\r\n }", "function current_admin()\n {\n return admin_auth()->user();\n }", "public function isAdmin() {}", "public function mustbeadmin()\n {\n if (!$this->hasadmin())\n {\n $this->web()->noaccess();\n }\n }", "public function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\r\n\t\t$this->load->model(ADMIN_PREFIX . '/admin_auth_model');\r\n\t}" ]
[ "0.671602", "0.64701205", "0.6364213", "0.63076234", "0.6147593", "0.61101615", "0.61015445", "0.60588425", "0.6057786", "0.6049278", "0.6049278", "0.60417366", "0.59784704", "0.59615624", "0.59615624", "0.5950313", "0.5950313", "0.5941667", "0.59262383", "0.5889636", "0.5883102", "0.5877654", "0.5867972", "0.58656806", "0.5860801", "0.585898", "0.5852198", "0.58288115", "0.5798329", "0.57851404", "0.57768595", "0.5755483", "0.57348675", "0.5714641", "0.5695043", "0.56922644", "0.56782264", "0.5675215", "0.5670566", "0.56610286", "0.5648989", "0.5639537", "0.5635527", "0.56273514", "0.5616935", "0.56166464", "0.56147796", "0.56147796", "0.56147796", "0.56147796", "0.56147796", "0.56147796", "0.56147796", "0.561305", "0.5609884", "0.560851", "0.5600747", "0.559842", "0.5595987", "0.5589167", "0.55864996", "0.55843955", "0.55722857", "0.5571941", "0.5568193", "0.5548737", "0.554139", "0.5541048", "0.55403936", "0.5539487", "0.5534819", "0.5524471", "0.55197006", "0.55197006", "0.55197006", "0.551879", "0.551739", "0.5514081", "0.55137986", "0.55096066", "0.5495757", "0.5495643", "0.5495635", "0.5488701", "0.54653144", "0.5461255", "0.5453437", "0.5448743", "0.5447489", "0.5446312", "0.54419714", "0.5431405", "0.54291725", "0.5426584", "0.5426297", "0.54243344", "0.54239744", "0.5423085", "0.54194355", "0.54113114", "0.54097944" ]
0.0
-1
List the pending requests
public function listRequests($filters = []) { $query = ''; if($filters instanceof \Connect\RQL\Query){ $query = $filters->compile(); } else { if ($this->config->products) { $filters['asset.product.id__in'] = implode(",", $this->config->products); } if ($filters) { $query = '?' . preg_replace('/%5B[0-9]+%5D/simU', '', http_build_query($filters)); $query = urldecode($query); } } $body = $this->sendRequest('GET', '/requests' . $query); /** @var Request[] $models */ $models = Model::modelize('requests', json_decode($body)); foreach ($models as $index => $model) { $models[$index]->requestProcessor = $this; } return $models; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listRequests()\r\n {\r\n return $this->BunqClient->getHttpService()->get(\r\n $this->getResourceEndpoint()\r\n );\r\n }", "public function getAllPending(): array;", "public function all_pending_course_request(){\n\t\t\t$load = new Load();\n\t\t\t$request_model = $load->model('course_request_model');\n\t\t\t$all_course_request = $request_model->getByWhere('course_request','request_status','pending');\n \n\t\t\treturn $all_course_request;\n\t\t}", "private function getPendingEvents ()\n {\n return EventQueue::pending()->with('event_detail')\n ->orderBy('scheduled_start_time', 'asc')\n ->limit(100)\n ->get();\n }", "public function index()\n {\n $page = request()->get('page') == 'all' ? 'all' : \n (request()->get('page') > 1 ? request()->get('page') - 1 : 0);\n \n $status = request()->get('status') ? request()->get('status') : 'pending';\n\n try {\n $reqs = Req::where('status', $status)\n ->orderBy('id', 'desc')\n ->when($page !== 'all', function ($query) use ($page) {\n return $query->skip($page * 10)\n ->take(10);\n })\n ->get();\n } catch (Exception $e) {\n return response()->json([\n 'errors' => $e->getMessage()\n ], 400);\n }\n\n return response()->json([\n 'items' => $reqs,\n 'count' => count($reqs)\n ]);\n }", "public function getPrequestList(){\n return $this->_get(5);\n }", "function getPendingScheduleRequests($tchid)\n\t{\n\t\t\n\t\t// Demo\n\t\t$qry = \"select sr.*, first_name, fullname from schedulerequests sr \n\t\t\t\tinner join tbl_users u on u.slno=sr.studentid \n\t\t\t\twhere sr.teacherid=\".intval($tchid).\" and sr.req_sch_date >= CURRENT_DATE() \n\t\t\t\tand sr.scheduleid=0 and sr.slotid=0 and sr.status is null and sr.std_req_confirm='Y'\";\n\t\t$res1=$this->runQuery($qry);\n\t\t\n\t\t// Paid\n\t\t$qry = \"select sr.*, s.slot_from, s.slot_to, first_name, fullname from schedulerequests sr \n\t\t\t\tinner join tbl_users u on u.slno=sr.studentid \n\t\t\t\tinner join tbl_slotmaster s on s.slno=sr.slotid \n\t\t\t\twhere sr.teacherid=\".intval($tchid).\" and sr.req_sch_date >= CURRENT_DATE() \n\t\t\t\tand sr.scheduleid=0 and sr.slotid > 0 and sr.status is null and sr.std_req_confirm='Y'\";\n\t\t$res2=$this->runQuery($qry);\t\t\n\t\t\n\t\treturn array($res1,$res2);\n\t}", "public function pending(Request $request)\n {\n $users = UsersDirectory::orderBy('id', 'desc')->get();\n return response()->json($users);\n }", "public function listPendingSubmissions(Request $request) {\n\t\t$pager = $this->pager($request, $this->getDoctrine()->getRepository(JokeSubmission::class)->findPending());\n\t\treturn $this->render('Joke/listSubmissions.html.twig', ['pager' => $pager]);\n\t}", "protected function get_possible_requests(){\n\t\treturn array( \n\t\t\t'view_cashflows',\n\t\t\t'add_cashflow',\n\t\t\t$this->get_request(),\n\t\t);\n\t}", "public function getListRequest()\n {\n $db = $this->dblocal;\n try\n {\n $stmt = $db->prepare(\"SELECT @rownum := @rownum + 1 AS urutan,t.* FROM m_request t, \n (SELECT @rownum := 0) r ORDER BY id_request ASC\");\n $stmt->execute();\n $stat[0] = true;\n $stat[1] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $stat;\n }\n catch(PDOException $ex)\n {\n $stat[0] = false;\n $stat[1] = $ex->getMessage();\n return $stat;\n }\n }", "public function getPendingRelRequests(Member $member);", "public function friendRequestsPending() {\n // Returns a pending friend requests to me\n // where accepted = false\n // false, means someone added YOU\n return $this->friendOf()->wherePivot('accepted', false)->get();\n }", "function printNewRequests() {\r\n $criteria = array('status' => Appeal::$STATUS_NEW);\r\n return printAppealList($criteria);\r\n}", "public function myPendingFriends()\n {\n $args = array();\n\n return $this->_request('user/pending', $args, true);\n }", "public function getPending()\n\t{\n\t\treturn $this->pending;\n\t}", "public function getRequests()\n {\n return $this->requests;\n }", "public function get_pending_actions($request,$count_only = false){\n \n $results = $this->assignment->pendingActionsForRequest($request);\n if($count_only){\n return count($results);\n }else{\n return $results;\n }\n }", "public function pendingqueslist()\n\t{\n\n\n\n\t\t$data['rs'] = $this->lib_model->Select('m_addques', 'id,createdBy,name,about,status,subjectcode,createdBy', array('createdBy' => $this->session->EmpId,'status' => 0));\n\t\trsort($data['rs']);\n\t\t\n\t\t$this->load->view('f/f_header', $data);\n\t\t$this->load->view('f/f_pendingqueslist');\n\t\t$this->load->view('f/f_footer');\n\t}", "public function requests() : array\n {\n return $this->requests;\n }", "public function getPendingPost();", "public function pendingAction() {\n $em = $this->getDoctrine()->getManager();\n $advertisingPackages = $em->getRepository('AppBundle:AdvertisingPackage')->findBy(\n array('status' => 0, 'validUntil' => null),\n array('createdAt' => 'DESC')\n );\n\n return $this->render('AdminBundle:AdvertisingPackage:index.html.twig', array(\n 'advertisingPackages' => $advertisingPackages\n ));\n }", "public function index_pending()\n {\n $reservations = auth('user')->user()->pending_reservations()->paginate(20);\n $response['status'] = 'success';\n $response['reservations'] = $reservations;\n return response()->json($response, Response::HTTP_OK);\n }", "public function getRequests() {\n\n $requests = isset($this->data['requests']) ? $this->data['requests'] : array();\n\n return $requests;\n }", "public function getRequests()\n {\n return $this->data['requests'];\n }", "public function getPendingSchedules()\n {\n return $this->db->where('status', self::STATUS_PENDING)\n ->get($this->cron_schedule_table_name)\n ->result_array();\n }", "public function getPendingEvents(): array;", "function qa_page_queue_pending()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\tqa_preload_options();\n\t$loginuserid = qa_get_logged_in_userid();\n\n\tif (isset($loginuserid)) {\n\t\tif (!QA_FINAL_EXTERNAL_USERS)\n\t\t\tqa_db_queue_pending_select('loggedinuser', qa_db_user_account_selectspec($loginuserid, true));\n\n\t\tqa_db_queue_pending_select('notices', qa_db_user_notices_selectspec($loginuserid));\n\t\tqa_db_queue_pending_select('favoritenonqs', qa_db_user_favorite_non_qs_selectspec($loginuserid));\n\t\tqa_db_queue_pending_select('userlimits', qa_db_user_limits_selectspec($loginuserid));\n\t\tqa_db_queue_pending_select('userlevels', qa_db_user_levels_selectspec($loginuserid, true));\n\t}\n\n\tqa_db_queue_pending_select('iplimits', qa_db_ip_limits_selectspec(qa_remote_ip_address()));\n\tqa_db_queue_pending_select('navpages', qa_db_pages_selectspec(array('B', 'M', 'O', 'F')));\n\tqa_db_queue_pending_select('widgets', qa_db_widgets_selectspec());\n}", "public function getMyRequests()\n {\n $owner= $this->getUserFromToken();\n $owner_id = $owner['id'];\n $requests= req::where('sender',$owner_id)->get();\n\n $totalReqs = array();\n foreach ($requests as $req) {\n $user = app('App\\Http\\Controllers\\usersController')->getUserById($req['recipient']);\n if($user!=[]){\n $obj = array(\n 'name' => $user[0]['name'],\n 'username' => $user[0]['username'],\n 'id'=>$user[0]['id']\n );\n array_push($totalReqs,$obj);\n }\n }\n return $totalReqs;\n }", "public function getAvailableTasks();", "public function testSuccessfulListPendingAttendants()\n {\n $this->ajaxGet('/' . self::ROUTE_PREFIX . '/pending/list?page=1&size=2')\n ->seeJsonContains([\n 'code' => 0,\n ]);\n }", "public function get_pending_actions() {\r\n\t\tif ($this->user_id) {\r\n\t\t\t$sql = \"SELECT t1.token_id, t1.date_issued, t2.user_to_endorse, t2.date_id, t3.datename, t3.begin_datetime, t3.end_datetime\r\n\t\t\tFROM `pending_actions` as t1 \r\n\t\t\tLEFT JOIN `pending_user_endorsements` as t2 \r\n\t\t\tON t2.token_id = t1.token_id\r\n\t\t\tLEFT JOIN `badminton_dates` as t3 \r\n\t\t\tON t3.date_id = t2.date_id\r\n\t\t\tWHERE t1.date_issued <= NOW()\r\n\t\t\tAND t1.active = '\" .PendingAction::ACTIVE . \"'\r\n\t\t\tAND t1.awaiting_user = '$this->user_id'\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\t$actions = array();\r\n\t\t\twhile ($row = mysqli_fetch_array($actions, MYSQLI_ASSOC)) {\r\n\t\t\t\t$row['user_to_endorse'] = new ProfileUser(array(\r\n\t\t\t\t\t'user_id' => $row['user_to_endorse'],\r\n\t\t\t\t\t'username' => $row['username'],\r\n\t\t\t\t\t'reputation' => $row['reputation'])\r\n\t\t\t\t);\r\n\t\t\t\t$row['cause_date'] = new BadmintonDate($row);\r\n\t\t\t\t$pending_action = new PendingEndorsementToken($row);\r\n\t\t\t\tarray_push($actions, $pending_actions);\r\n\t\t\t}\r\n\t\t\treturn $actions;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UnexpectedValueException('UnexpectedValueException occured on method call ' . __METHOD__ . ' because the user id is invalid');\r\n\t\t}\r\n\t}", "function getTotalPending() {\n\t\treturn $this->getOption(self::STAT_TOTAL_PENDING, 0);\n\t}", "public static function returnConfirmedRequests(Database $db)\n {\n try\n {\n $statusSent = Item::ALLOWED_STATUSES[2];\n $statusRecieved = Item::ALLOWED_STATUSES[3];\n\n $query =\n \"SELECT request.request_id, item.*, user.*, user_requester.*\n FROM item \n RIGHT JOIN request ON request.request_id = item.item_id\n LEFT JOIN user ON user.user_id = request.user_id\n LEFT JOIN user_requester ON user_requester.user_id = user.user_id\n WHERE item.status = '$statusSent' OR item.status = '$statusRecieved'\";\n\n $db->runQuery($query);\n $requestsList = array();\n\n foreach ($db->results as $row)\n {\n $item = new Item($row[1], $row[2], $row[3], $row[4], $row[5], $row[6], $row[7], $row[8], $row[9]);\n $receiver = new Recipient($row[10],$row[11],$row[12],$row[13],$row[14],$row[15],$row[16],\n $row[17], $row[19], $row[21],$row[22],$row[23],$row[24],$row[25],$row[26]\n );\n $request = new Request($item, $receiver);\n $request->setRequestId($row[0]);\n\n array_push($requestsList, $request);\n }\n return $requestsList;\n }\n catch (DatabaseException $e)\n {\n $e->echoDetails();\n }\n catch (Exception $e)\n {\n echo \"Exception in method \". __METHOD__;\n }\n }", "public function pending_util_records() {\n\t\treturn $this->util->select( array( 'flag' => null ) );\n\t}", "public function getRequests() {\n $secure = false;\n $haveLocations = false;\n return getRequests($this->testInfo->getId(), $this->testInfo->getRootDirectory(), $this->run,\n $this->cached ? 1 : 0, $secure, $haveLocations, false, true);\n }", "#[Pure]\n public function getFinishedRequests() {}", "function drush_acapi_ac_task_list() {\n $api_args = acapi_get_site_args();\n $format = acapi_get_option('format');\n $state = drush_get_option('state', NULL);\n $days = drush_get_option('days', NULL);\n $limit = drush_get_option('limit', NULL);\n $params = array();\n if (isset($state)) {\n $params['state'] = $state;\n }\n if (isset($days)) {\n $params['days'] = $days;\n }\n if (isset($limit)) {\n $params['limit'] = $limit;\n }\n\n list($status, $result) = acapi_call(\n 'GET',\n '/sites/:realm::site/tasks',\n $api_args,\n $params,\n array(),\n array('display' => !empty($format))\n );\n\n $simulate = drush_get_option('simulate', FALSE);\n if ($simulate) {\n return;\n }\n\n if (empty($format)) {\n $display = array();\n foreach ($result as $id => $task) {\n $display[$task->id] = $task->description;\n }\n drush_print_table(drush_key_value_to_array_table($display));\n }\n}", "public function pending()\n\t{\n\t\texit;\n\t\t$sub_app_id = $this->_get_app_id().\"02\";\n\t\t$_SESSION[\"LISTPAGE\"] = current_url().\"?\".$_SERVER['QUERY_STRING'];\n\n\t\tif ($this->input->post(\"posted\"))\n\t\t{\n\t\t\tif ($type = $this->input->post(\"type\"))\n\t\t\t{\n\t\t\t\t$this->so_service->get_dao()->trans_start();\n\t\t\t\tif ($so_obj = $this->so_service->get(array(\"so_no\"=>$this->input->post(\"so_no\"))))\n\t\t\t\t{\n\t\t\t\t\t$extends = 1;\n\t\t\t\t\tswitch ($type)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase \"b\":\n\t\t\t\t\t\t\t$so_obj->set_status('1');\n\t\t\t\t\t\t\t$this->so_service->get_socc_dao()->q_delete(array(\"so_no\"=>$this->input->post(\"so_no\")));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"c\":\n\t\t\t\t\t\t\tswitch($this->input->post('hold_reason'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase 'cscc':\n\t\t\t\t\t\t\t\tcase 'csvv':\n\t\t\t\t\t\t\t\t\t$this->credit_check_model->fire_cs_request($this->input->post(\"so_no\"),$this->input->post(\"hold_reason\"));\n\t\t\t\t\t\t\t\t\t$sohr_obj = $this->so_service->get_sohr_dao()->get();\n\t\t\t\t\t\t\t\t\t$sohr_obj->set_so_no($this->input->post(\"so_no\"));\n\t\t\t\t\t\t\t\t\t$sohr_obj->set_reason($this->input->post(\"hold_reason\"));\n\t\t\t\t\t\t\t\t\t$extends = $this->so_service->get_sohr_dao()->insert($sohr_obj);\n\t\t\t\t\t\t\t\t\t$so_obj->set_hold_status('1');\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'confirm_fraud':\n\t\t\t\t\t\t\t\t\t$socc_obj = $this->so_service->get_socc_dao()->get(array(\"so_no\"=>$this->input->post(\"so_no\")));\n\t\t\t\t\t\t\t\t\t$socc_obj->set_fd_status(2);\n\t\t\t\t\t\t\t\t\t$extends = $this->so_service->get_socc_dao()->update($socc_obj);\n\t\t\t\t\t\t\t\t\t$sohr_obj = $this->so_service->get_sohr_dao()->get();\n\t\t\t\t\t\t\t\t\t$sohr_obj->set_so_no($this->input->post(\"so_no\"));\n\t\t\t\t\t\t\t\t\t$sohr_obj->set_reason($this->input->post(\"hold_reason\"));\n\t\t\t\t\t\t\t\t\t$extends = $extends && $this->so_service->get_sohr_dao()->insert($sohr_obj);\n\t\t\t\t\t\t\t\t\t$so_obj->set_status(0);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"p\":\n\t\t\t\t\t\tcase \"pe\":\n\t\t\t\t\t\t\t$so_obj->set_status('3');\n\t\t\t\t\t\t\tif (($promo_code = $so_obj->get_promotion_code()) != \"\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->promotion_code_service->promo_code = $promo_code;\n\t\t\t\t\t\t\t\t$this->promotion_code_service->update_no_taken();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (!$this->so_service->update($so_obj) || !$extends)\n\t\t\t\t\t{\n\t\t\t\t\t\t$_SESSION[\"NOTICE\"] = \"ERROR \".__LINE__.\" : \".$this->db->_error_message();\n\t\t\t\t\t\t$this->so_service->get_dao()->trans_complete();\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$this->so_service->get_dao()->trans_complete();\n\t\t\t\t\t\tif($type == \"pe\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->pmgw->so = $so_obj;\n\t\t\t\t\t\t\t$this->pmgw->fire_success_event();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tredirect($_SESSION[\"LISTPAGE\"]);\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$_SESSION[\"NOTICE\"] = \"ERROR \".__LINE__.\" : \".$this->db->_error_message();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t$where = array();\n\t\t$option = array();\n\n\t\tif ($this->input->get(\"so_no\") != \"\")\n\t\t{\n\t\t\t$where[\"so.so_no LIKE \"] = \"%\".$this->input->get(\"so_no\").\"%\";\n\t\t}\n\n\t\tif ($this->input->get(\"email\") != \"\")\n\t\t{\n\t\t\t$where[\"c.email LIKE \"] = \"%\".$this->input->get(\"email\").\"%\";\n\t\t}\n\n\t\tif ($this->input->get(\"delivery_charge\"))\n\t\t{\n\t\t\tfetch_operator($where, \"so.delivery_charge\", $this->input->get(\"delivery_charge\"));\n\t\t}\n\n\t\tif ($this->input->get(\"offline_fee\"))\n\t\t{\n\t\t\tfetch_operator($where, \"soe.offline_fee\", $this->input->get(\"offline_fee\"));\n\t\t}\n\n\t\tif ($this->input->get(\"amount\"))\n\t\t{\n\t\t\tfetch_operator($where, \"so.amount\", $this->input->get(\"amount\"));\n\t\t}\n\n\t\t$where[\"biz_type\"] = \"OFFLINE\";\n\t\t$where[\"so.status\"] = \"2\";\n\t\t$where[\"so.hold_status\"] = \"0\";\n\t\t$option[\"so_item\"] = \"1\";\n\t\t$option[\"hide_payment\"] = \"1\";\n\n\t\t$sort = $this->input->get(\"sort\");\n\t\t$order = $this->input->get(\"order\");\n\n\t\t$limit = '20';\n\n\t\t$pconfig['base_url'] = $_SESSION[\"LISTPAGE\"];\n\t\t$option[\"limit\"] = $pconfig['per_page'] = $limit;\n\t\tif ($option[\"limit\"])\n\t\t{\n\t\t\t$option[\"offset\"] = $this->input->get(\"per_page\");\n\t\t}\n\n\t\tif (empty($sort))\n\t\t\t$sort = \"so_no\";\n\n\t\tif (empty($order))\n\t\t\t$order = \"desc\";\n\n\t\t$option[\"orderby\"] = $sort.\" \".$order;\n\t\t$option[\"notes\"] = TRUE;\n\t\t$option[\"extend\"] = TRUE;\n\t\t$option[\"credit_chk\"] = TRUE;\n\t\t$option[\"hide_client\"] = FALSE;\n\n\t\t$data[\"objlist\"] = $this->so_service->get_dao()->get_list_w_name($where, $option);\n\t\t$data[\"total\"] = $this->so_service->get_dao()->get_list_w_name($where, array(\"notes\"=>1, \"extend\"=>1, \"num_rows\"=>1, \"credit_chk\"=>1));\n\n\t\tinclude_once(APPPATH.\"language/\".$sub_app_id.\"_\".$this->_get_lang_id().\".php\");\n\t\t$data[\"lang\"] = $lang;\n\n\t\t$pconfig['total_rows'] = $data['total'];\n\t\t$this->pagination_service->set_show_count_tag(TRUE);\n\t\t$this->pagination_service->initialize($pconfig);\n\n\t\t$data[\"notice\"] = notice($lang);\n\n\t\t$data[\"sortimg\"][$sort] = \"<img src='\".base_url().\"images/\".$order.\".gif'>\";\n\t\t$data[\"xsort\"][$sort] = $order==\"asc\"?\"desc\":\"asc\";\n\t\t$data[\"searchdisplay\"] = \"\";\n\n\t\t$this->load->view('order/phone_sales/phone_sales_pending_v', $data);\n\t}", "public function getOrdersInProgress(Request $request)\n {\n $id = $request->id;\n $aOrdersInPorgress = Order::with('user', 'order_item.menu_item')\n ->where('restaurant_id', '=', $id)\n ->where('status', '=', 1)\n ->where('accepted', '=', 1)\n ->orderBy('delivery_time', 'asc')\n ->get();\n return response()->json($aOrdersInPorgress);\n }", "public function getPendingSteps();", "public function isPending()\n {\n return true;\n }", "public function clearPending();", "public function getAllInfoActivity()\n {\n return QcOverTimeRequest::where('action', $this->getDefaultHasAction())->get();\n }", "public function index() {\n $pending = Pending::all();\n require_once('app/views/pending/index.php');\n }", "public function request() { if($this->allowed(USER_WORKER)) {\n switch($this->action) {\n case 'pendingAmount':\n $this->getPending();\n break;\n case 'pendingList':\n $this->getRequests();\n break;\n case 'rejectedList':\n $this->getRequests('rejected');\n break;\n case 'acceptedList':\n $this->getRequests('accepted');\n break;\n case 'reject':\n $this->reject();\n break;\n case 'accept':\n $this->accept();\n break;\n default:\n $this->updateValue();\n break;\n }\n // direct update\n // TODO\n } else if ( ! $this->action ) {\n if($this->institution && testInstitution($this->institution)) {\n $this->appendToQueue();\n } else {\n $this->denied();\n }\n }\n }", "public function index()\n {\n $tasks = Task::latest()->get();\n\n return response($tasks, Response::HTTP_ACCEPTED);\n }", "function countPending() {\n return IncomingMails::count(array('state > 0'));\n }", "public function pendingTickets() {\n $tickets = $this->whereHas('status', function($query) {\n return $query->where('name', 'Solved');\n });\n\n return $tickets;\n }", "public function get_activejobs_list($request) {\n\n\t\tglobal $updraftplus;\n\t\n\t\t$download_status = empty($request['downloaders']) ? array() : $this->get_download_statuses(explode(':', $request['downloaders']));\n\n\t\tif (!empty($request['oneshot'])) {\n\t\t\t$job_id = get_site_option('updraft_oneshotnonce', false);\n\t\t\t// print_active_job() for one-shot jobs that aren't in cron\n\t\t\t$active_jobs = (false === $job_id) ? '' : $this->print_active_job($job_id, true);\n\t\t} elseif (!empty($request['thisjobonly'])) {\n\t\t\t// print_active_jobs() is for resumable jobs where we want the cron info to be included in the output\n\t\t\t$active_jobs = $this->print_active_jobs($request['thisjobonly']);\n\t\t} else {\n\t\t\t$active_jobs = $this->print_active_jobs();\n\t\t}\n\t\t$logupdate_array = array();\n\t\tif (!empty($request['log_fetch'])) {\n\t\t\tif (isset($request['log_nonce'])) {\n\t\t\t\t$log_nonce = $request['log_nonce'];\n\t\t\t\t$log_pointer = isset($request['log_pointer']) ? absint($request['log_pointer']) : 0;\n\t\t\t\t$logupdate_array = $this->fetch_log($log_nonce, $log_pointer);\n\t\t\t}\n\t\t}\n\t\t$res = array(\n\t\t\t// We allow the front-end to decide what to do if there's nothing logged - we used to (up to 1.11.29) send a pre-defined message\n\t\t\t'l' => htmlspecialchars(UpdraftPlus_Options::get_updraft_lastmessage()),\n\t\t\t'j' => $active_jobs,\n\t\t\t'ds' => $download_status,\n\t\t\t'u' => $logupdate_array,\n\t\t\t'automatic_updates' => $updraftplus->is_automatic_updating_enabled()\n\t\t);\n\n\t\t$res['hosting_restriction'] = $updraftplus->is_hosting_backup_limit_reached();\n\n\t\treturn $res;\n\t}", "public function pending(): array\n {\n $migrationFileCount = (int)iterator_count(\n new FilesystemIterator(\n database_path(\"migrations\"),\n FilesystemIterator::SKIP_DOTS\n )\n );\n\n $migrationTableCount = count(\n $this->connection->select(\"SELECT id FROM migrations;\")\n );\n\n $pending = $migrationFileCount - $migrationTableCount;\n\n return [\n \"pending\" => $pending <= 0 ? 0 : $pending,\n \"total\" => $migrationFileCount,\n ];\n }", "function getPendingRequests(Staff &$staff) {\n\t$rows = array();\n if (isset($staff)) {\n /* Your code goes here */\n\t\t$link = Utility::getDefaultDBConnection();\n\t\t$query = \"select * from leave_requests where staff_id='\".$staff->getID().\"' and is_approved='PENDING'\";\n\t\t$result = mysqli_query($link, $query) or die(mysqli_error($link));\n\t\tif($result){\n\t\t\twhile($row = mysqli_fetch_array($result)){\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\t\t}\n }\n return $rows;\n}", "public function checkQueuedEditsAction()\n {\n $reqIds = $this->_getParam(\"req_ids\");\n $this->_helper->json($this->checkQueuedEdits($reqIds));\n }", "public function GetPendingTransactions() {\r\n if (!$this->bootstrap_node) {\r\n $transactionsByPeer = BootstrapNode::GetPendingTransactions($this->chaindata,$this->isTestNet);\r\n foreach ($transactionsByPeer as $transactionByPeer) {\r\n $this->chaindata->addPendingTransactionByBootstrap($transactionByPeer);\r\n }\r\n }\r\n }", "private static function getRemainingRequestsParams()\n {\n return [\n Config::$itones_request_maximum,\n MyRadio_User::getInstance()->getID(),\n Config::$itones_request_period,\n ];\n }", "public function list()\n\t\t{\n\t return Task::all();\n\t\t}", "public function pending()\n {\n $prefix = config('vapor-ui.queue.prefix');\n\n if (empty($prefix)) {\n return 0;\n }\n\n $queue = $this->queueResolver->__invoke();\n\n return collect($this->sqs->getQueueAttributes([\n 'AttributeNames' => [\n 'ApproximateNumberOfMessages',\n 'ApproximateNumberOfMessagesNotVisible',\n 'ApproximateNumberOfMessagesDelayed',\n ],\n 'QueueUrl' => \"$prefix/$queue\",\n ])['Attributes'])->sum();\n }", "public function get_in12_requests()\n\t{\n\t return $this->db->select('request_cid,request_acc_number,request_summ,request_quote,request_id,request_comment,request_type,request_wallet')\n\t\t->from('pamm_requests')\n\t\t->where('request_status', '0')\n\t\t->where('request_urgent', '0')\n\t\t->where(\"request_type IN ('1','2')\")\n\t\t->order_by('request_type', 'ASC')\t\n\t\t->get()->result();\n\n\t}", "public function getQueue()\n {\n return $this->doRequest('GET', \"queue\", []);\n }", "public function scheduled()\n\t{\n\t\ttry {\n\t\t\t$requests = UserRequests::where( 'status', 'SCHEDULED' )\n\t\t\t\t->where( 'fleet_id', 0 )\n\t\t\t\t->RequestHistory();\n\n\t\t\t$acceptRequestID =\n\t\t\t\tPoolTransaction::where( 'fleet_id', 0 )->pluck( 'request_id' )\n\t\t\t\t\t->toArray();\n\t\t\t$request1 =\n\t\t\t\tUserRequests::where( 'status', 'SCHEDULED' )->RequestHistory()\n\t\t\t\t\t->whereIn( 'id', $acceptRequestID );\n\n\t\t\t$requests = $requests->union( $request1 )->get();\n\t\t\t\n\t\t\t//pool list that fleets create\n\t\t\t$self_pool_list = PrivatePools::where(['status'=>1,'from_fleet_id'=>'0']);\n\t\t\t//pool list that other fleets accepts\n\t\t\t$accept_pool_list_id = PrivatePoolPartners::where(['status'=>1,'action_id'=>'0'])->pluck('pool_id')->toArray();\n\t\t\t$accept_pool_list = PrivatePools::whereIn('id',$accept_pool_list_id);\n\n\t\t\t$private_pool_list = $self_pool_list->union($accept_pool_list)->get();\n\n\n\t\t\treturn view( 'admin.request.scheduled', compact( 'requests','private_pool_list' ) );\n\t\t} catch ( Exception $e ) {\n\t\t\treturn back()->with( 'flash_error',\n\t\t\t\ttrans( 'admin.something_wrong' ) );\n\t\t}\n\t}", "public function getApprovalRequests()\n {\n return $this->approval_requests;\n }", "public function scheduled() {\n\t\ttry {\n\n\t\t\t$requests = UserRequests::where( 'status', 'SCHEDULED' )\n\t\t\t\t->RequestHistory()->get();\n\t\t\t// dd($requests);\n\t\t\t// echo json_encode($requests); exit;\n\t\t\treturn view( 'admin.request.scheduled', compact( 'requests' ) );\n\t\t} catch ( Exception $e ) {\n\t\t\treturn back()->with( 'flash_error',\n\t\t\t\ttrans( 'admin.something_wrong' ) );\n\t\t}\n\t}", "private function getDeletionRequests()\n {\n return $this->db_get_account_del_req();\n }", "public function actionPending(){\n $viewType = \"pending\";\n\n \n $searchModel = new SearchRepair();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $viewType);\n\n return $this->render('pending', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider\n ]);\n }", "public function pendingCertificates()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/pending-certificates');\n }", "function get_requests($acc_number)\n\t{\n\t return $this->db->select('pamm_requests.*, pamm_requests_status_type.pamm_requests_status_name AS status_word')\n\t\t->from('pamm_requests')\n\t\t->join('pamm_requests_status_type', 'pamm_requests.request_status=pamm_requests_status_type.pamm_requests_status_code', 'left')\n\t\t->where('request_acc_number', $acc_number)\t\n\t\t->order_by('request_date', 'ASC')\n\t\t->order_by('request_comment', 'DESC')\n\t\t->get()->result();\n\t}", "public function isPending()\r\n {\r\n return $this->status >= 0 && $this->status < 100;\r\n }", "public function declineAllPendingThreads()\n {\n return $this->ig->request('direct_v2/threads/decline_all/')\n ->addPost('_csrftoken', $this->ig->client->getToken())\n ->addPost('_uuid', $this->ig->uuid)\n ->setSignedPost(false)\n ->getResponse(new Response\\GenericResponse());\n }", "public function getPendingCount()\n {\n return $this->pending_count;\n }", "public static function getRemainingRequests()\n {\n return self::$db->fetchOne(self::REQUESTS_REMAINING_SQL, self::getRemainingRequestsParams())['remaining'];\n }", "public function friendRequestPending() {\n return $this->friendOf()->wherePivot('accepted', false)->get();\n }", "public function get_pending_failed()\n {\n $obj = new View();\n $queryobj = new Jamf_model();\n $sql = \"SELECT COUNT(CASE WHEN `comands_completed` = '1' THEN 1 END) AS Completed,\n COUNT(CASE WHEN `comands_pending` = '1' THEN 1 END) AS Pending,\n COUNT(CASE WHEN `comands_failed` = '1' THEN 1 END) AS Failed\n FROM `jamf`\n LEFT JOIN reportdata USING (serial_number)\n \".get_machine_group_filter();\n $obj->view('json', array('msg' => current($queryobj->query($sql))));\n }", "public function requestQueued()\n {\n $response = $this->checkRequest();\n $this->entities = array();\n\n return $response;\n }", "public function listTasks()\n\t{\n\t\t$this->import('BackendUser', 'User');\n\n\t\t$tasksReg = 0;\n\t\t$tasksNew = 0;\n\t\t$tasksDue = 0;\n\t\t$arrReturn = array();\n\n\t\t$objTask = $this->Database->prepare(\"SELECT t.deadline, s.status, s.assignedTo FROM tl_task t LEFT JOIN tl_task_status s ON t.id=s.pid AND s.tstamp=(SELECT MAX(tstamp) FROM tl_task_status ts WHERE ts.pid=t.id)\" . (!$this->User->isAdmin ? \" WHERE (t.createdBy=? OR s.assignedTo=?)\" : \"\"))\n\t\t\t\t\t\t\t\t ->execute($this->User->id, $this->User->id);\n\n\t\tif ($objTask->numRows) \n\t\t{\n\t\t\t$time = time();\n\n\t\t\twhile ($objTask->next())\n\t\t\t{\n\t\t\t\tif ($objTask->status == 'completed')\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($objTask->deadline <= $time)\n\t\t\t\t{\n\t\t\t\t\t++$tasksDue;\n\t\t\t\t}\n\t\t\t\telseif ($objTask->status == 'created' && $objTask->assignedTo == $this->User->id)\n\t\t\t\t{\n\t\t\t\t\t++$tasksNew;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++$tasksReg;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($tasksReg > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_info\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksCur'], $tasksReg) . '</p>';\n\t\t\t}\n\n\t\t\tif ($tasksNew > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_new\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksNew'], $tasksNew) . '</p>';\n\t\t\t}\n\n\t\t\tif ($tasksDue > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_error\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksDue'], $tasksDue) . '</p>';\n\t\t\t}\n\t\t}\n\n\t\treturn implode(\"\\n\", $arrReturn);\n\t}", "public function getSpecialOfferTransactionPending() {\n $time_stamp = time() - 24*60*60; //1 day\n \n $results = array();\n $qb = $this->createQueryBuilder('t');\n $qb->select('t')\n ->where(' t.transactionType= :transactionType and t.status = :status and t.timeStamp >= :time_stamp ')\n ->setParameter('transactionType', 'PAY_ONCE_OFFER')\n ->setParameter('time_stamp', $time_stamp)\n ->setParameter('status', 'PENDING');\n $results = $qb->getQuery()->getResult();\n return $results;\n }", "public function GetQueuedJobs()\n {\n $JOBS = $this->DB->GET('MUP.injector.jobs', ['status' => 'QUEUED', 'pmta' => $this->HOSTID, 'active' => '1', 'ORDER' => ['date' => 'ASC']], ['id', 'target', 'pool'], 100000);\n if (empty($JOBS)) {\n $this->ALERTS[] = FAIL.\" ~ <<< No Jobs to Inject...\";\n }else{\n if (isset($JOBS['id']))\n $JOBS = [$JOBS['id']=> $JOBS];\n foreach ($JOBS as $ID => $JOB) \n if (!isset($this->QueuedJobs[$JOB['pool']][$JOB['target']])) \n $this->QueuedJobs[$JOB['pool']][$JOB['target']] = ltrim($ID, '0');\n $this->Debug('QUEUED JOBS', $this->QueuedJobs);\n }\n }", "public function lists(): InstantMessageResponse;", "public function get_all() {\n try {\n \n $where = $this->getSafe('where', '');\n $order_by = $this->getSafe('order_by', '');\n \n $db = $this->app->getDbo();\n \n $data = array (\n 'order_by' => $order_by,\n 'where' => $where\n );\n \n $list = $this->messagequeue_model->get_all($data);\n \n $ret = array (\n 'messages' => $list\n );\n \n $this->renderJson($ret);\n \n } catch (Exception $ex) {\n $this->app->write_log('messagequeue_get_all_exception - ' . $ex->getMessage());\n \n $ret = $this->message(1, 'messagequeue_get_all_exception', $ex->getMessage());\n $this->renderJson($ret);\n }\n }", "public function viewallmaintenancerequestsAction(){\n\t\t$maint = new Maintenance_Model_MaintenanceRequest();\n\t\t$records = $maint->fetchAllRequests();\n\n\t\tif( $records ){\n\t\t $this->view->paginator = $this->paginate($records);\n\t\t}\n\t}", "public function getCheckInTaskListList(){\n return $this->_get(2);\n }", "public function index()\n {\n $list = RequestStatus::all();\n\n event(new EJoin(...$list));\n\n return response()->json($list);\n }", "public function pendingBorrowRequest()\n {\n return view('member.pending_books');\n }", "public function pending_tickets()\n {\n return $this->hasMany('App\\Models\\Tickets', 'mailbox_id', 'id')->where('status', 'pending');\n }", "public function indexAction()\n {\n $pendingItems = $this->trackingService->getPendingTrackingItems();\n\n $this->view->items = $pendingItems;\n $this->title = \"Tracking Fulfillment Queue\";\n $this->selfLink = $this->view->apiEndPoint . \"/tracking-fulfillment\";\n\n $this->render('index');\n }", "public function getRequests_() {\n return $this->__requests;\n }", "public static function getStatusList()\n {\n return BaseServiceDelivery::getStatusList();\n }", "public function getMailsReadyForSending()\n {\n $qb = $this->doctrine->getEntityManager()->createQueryBuilder();\n $result = $qb->select('a')\n ->from('MailerBundle:MailQueue', 'a')\n ->where('a.status = :pending_status')\n ->andWhere('a.sendAt <= CURRENT_TIMESTAMP()')\n ->setParameter('pending_status', MailStatuses::PENDING)\n ->getQuery()\n ->getResult();\n \n return $result;\n }", "public function getStatuses()\n {\n $endpoint = $this->endpoints['getStatuses'];\n return $this->sendRequest($endpoint['method'], $endpoint['uri']);\n }", "public function postGetPollerWaitList(): array\n {\n $statement = $this->pearDB->query(\"\n SELECT id, address as ip, name as server_name FROM `platform_topology`\n WHERE `type` = 'poller' AND pending = '1'\n \");\n\n return $statement->fetchAll();\n }", "public function pending_tasks()\n {\n return $this->hasMany('App\\Models\\Crm\\Task', 'lead_id')->where('is_done', false);\n }", "private function db_get_account_del_req()\n {\n $terminationRequests = RequestedTermination::all();\n return $terminationRequests;\n }", "public function display_order_pending()\n\t{\n\t\tif ($this->checkLogin('A') == '') {\n\t\t\tredirect('admin');\n\t\t} else {\n\t\t\t$this->data['heading'] = 'Failed payment list';\n\t\t\t$rep_code = ltrim($this->session->userdata('fc_session_admin_rep_code'), '0');\n\t\t\tif ($rep_code != '') {\n\t\t\t\t$condition = ' and h.rep_code=\"' . $rep_code . '\"';\n\t\t\t} else {\n\t\t\t\t$condition = '';\n\t\t\t}\n\t\t\t$this->data['orderList'] = $this->order_model->view_order_details('Pending', $condition, $rep_code);\n\t\t\t//echo $this->db->last_query(); exit;\n\t\t\t$this->load->view('admin/order/display_orders_pending', $this->data);\n\t\t}\n\t}", "function get_patient_queue()\n {\n return Appointments::whereStatus(2)->get();\n }", "public function pending() {\n $model = new ReferralModel;\n $refs = $model\n ->tableAlias('r')\n ->join('customers', ['r.customer_id', '=', 'c.id'], 'c')\n // Join to get employee full name\n ->leftOuterJoin('wp_users', ['r.estimator_id', '=', 'wpu.id'], 'wpu')\n ->leftOuterJoin(\n 'wp_usermeta',\n \"wpu.id = wpum1.user_id AND wpum1.meta_key='first_name'\",\n 'wpum1'\n )\n ->leftOuterJoin(\n 'wp_usermeta',\n \"wpu.id = wpum2.user_id AND wpum2.meta_key='last_name'\",\n 'wpum2'\n )\n ->selectMany(\n 'r.id', 'r.address', 'r.city',\n 'r.state', 'r.zip_code', 'r.primary_phone_number',\n 'r.status', 'r.date_requested', 'r.lat', 'r.lng'\n )\n ->selectMany(\n 'r.id', 'r.customer_id', 'r.address', 'r.city',\n 'r.state', 'r.zip_code', 'r.primary_phone_number', 'r.priority',\n 'r.status', 'r.date_requested', 'r.lat', 'r.lng'\n )\n ->selectExpr(\"CONCAT_WS(' ',wpum1.meta_value, wpum2.meta_value)\", 'estimator_full_name')\n ->select('c.display_name', 'customer_display_name')\n ->where('r.status', 'Pending')\n ->whereNull('r.route_id')\n ->orderByDesc('r.date_requested')\n ->findArray();\n $this->renderJson($refs);\n }", "public function pending()\n {\n $this->viewData['index'] = [\n 'topics' => Topic::withoutGlobalScope(ApprovedTopicScope::class)\n ->pending()\n ->paginate(),\n 'filter' => 'pending',\n ];\n\n return parent::contentIndex();\n }", "public function index()\n {\n return TaskStatus::all();\n }", "function getPendingTask(){\n $item = new RepairServiceModel();\n return $item->viewPendingTask();\n }", "public function getTaskListList(){\n return $this->_get(2);\n }", "public function fetch_all_tasks()\n {\n //\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $requests = $em->getRepository('AppBundle:Request')->findBy(array(), array('date' => 'DESC'));\n \n return $this->render('request/index.html.twig', array(\n 'requests' => $requests,\n ));\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n return $this->repository->all();\n }" ]
[ "0.70767593", "0.70722795", "0.68819374", "0.6545676", "0.64211327", "0.6415138", "0.6252808", "0.62441504", "0.62315136", "0.62193036", "0.62039465", "0.61149687", "0.60981727", "0.5998885", "0.59964275", "0.59868234", "0.59623104", "0.59546995", "0.5932672", "0.59290415", "0.5906545", "0.5886596", "0.5865611", "0.585948", "0.5845693", "0.58381027", "0.5805446", "0.5805", "0.57564056", "0.57364345", "0.5705963", "0.56856203", "0.56752163", "0.5650267", "0.56417125", "0.56198585", "0.5618843", "0.5597682", "0.55768913", "0.55741394", "0.55730826", "0.5552517", "0.55515194", "0.5551022", "0.55470484", "0.5541446", "0.5535719", "0.5534742", "0.55286646", "0.55274767", "0.5516675", "0.55149406", "0.55095035", "0.54976726", "0.5493089", "0.5491208", "0.5481206", "0.5480609", "0.54770243", "0.54714644", "0.54680336", "0.5454916", "0.54513085", "0.544727", "0.54363924", "0.5429994", "0.54224586", "0.54140574", "0.54029113", "0.5402312", "0.539403", "0.5377448", "0.53744584", "0.5358428", "0.53516376", "0.5351409", "0.5350776", "0.53470343", "0.5346664", "0.5345568", "0.5345281", "0.53444", "0.53353", "0.53325707", "0.53325033", "0.53262055", "0.5293697", "0.528839", "0.5288181", "0.5287074", "0.52772754", "0.5275067", "0.526963", "0.52667934", "0.5254667", "0.52532023", "0.5252494", "0.5248286", "0.5239743", "0.52314544", "0.52308244" ]
0.0
-1
Gets Activation template for a given request
public function renderTemplate($templateId, $request) { $query = ($request instanceof Request) ? $request->id : $request; return $this->sendRequest('GET', '/templates/' . $templateId . '/render?request_id=' . $query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActivateTpl(){\n return $this->templates['activate'];\n }", "protected function getTemplate()\r\n {\r\n $request = Registry::getInstance()->get('Request');\r\n\r\n return implode(\r\n DIRECTORY_SEPARATOR,\r\n array(\r\n APPLICATION_PATH,\r\n $this->templatePath,\r\n $request->getControllerName(),\r\n $request->getActionName() . $this->templateExtention\r\n )\r\n );\r\n }", "public function getTemplate() {}", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "private function getTemplate()\n {\n $key = $this->getTemplateKey();\n\n // find template for refused short notice\n if (\n $this->busReg->isShortNoticeRefused() === true\n && isset(self::$templatesRefusedShortNotice[$key])\n ) {\n return self::$templatesRefusedShortNotice[$key];\n }\n\n // find template by status\n if (isset(self::$templates[$key])) {\n return self::$templates[$key];\n }\n\n throw new BadRequestException('Template not found for bus registration');\n }", "protected function getTemplate() {\n\t\treturn new Template('Premanager', 'changeEmail');\n\t}", "function getTemplate();", "function get_template()\n {\n }", "public function get_template()\n {\n }", "public function get_template()\n {\n }", "public function getTemplate(Request $req) {\n\ttry{\n\t $res['errors'] = false;\n\t $res['template'] = file_get_contents('../resources/views/templates/'.$req->template.'.blade.php');\n\t return response()->json($res);\n\t} catch (Exception $e){\n\t $res['errors'] = TRUE;\n\t $res['message'][] = $e->getMessage();\n\t return response()->json($res);\n\t}\n }", "protected function getActionTemplate() {\r\n\t\t\t$router = Core\\Includer::getRouter();\r\n\t\t\t$routeConf = $router->getRouteConfig(BasicFunctions::getRoute());\r\n\t\t\t$templateFile = $routeConf['template'];\r\n\t\t\t$templateFolder = $routeConf['module'];\r\n\t\t\t\t\r\n\t\t\treturn TEMPLATES_PATH . BasicFunctions::getSkin()\r\n\t\t\t\t. DIRECTORY_SEPARATOR . 'controller'\r\n\t\t\t\t. DIRECTORY_SEPARATOR . $templateFolder\r\n\t\t\t\t. DIRECTORY_SEPARATOR . $templateFile;\r\n }", "public function retrieveEmailTemplatePreview($request)\n {\n return $this->start()->uri(\"/api/email/template/preview\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function template() {\n\n // check for a cached template name\n if(isset($this->cache['template'])) return $this->cache['template'];\n\n // get the template name\n $templateName = $this->intendedTemplate();\n\n if($this->kirby->registry->get('template', $templateName)) {\n return $this->cache['template'] = $templateName; \n } else {\n return $this->cache['template'] = 'default';\n }\n\n }", "abstract public function getTemplate();", "function get_template($template){\n\n\t\t\t$login_arr = $this->action_parser($this->action,'template') ;\n\n\t\t\t$pos = array_search($template, $login_arr['template']['name']); \n\n\t\t\treturn $login_arr['template']['path'][$pos];\n\n\t\t}", "public static function getTemplate() {\n $settings = self::getSettings();\n \n return $settings->template;\n }", "public function getTemplate() \n {\n return $_SESSION['template'];\n \n }", "protected function getTemplatesRequest(){\n\t\t\n\t\t//If the user is logged in\n\t\tif($this->getModel()->checkLogin(true))\n\t\t{\n\t\t\t// Set the state and tell plugins.\n\t\t\t$this->setState('GETTING_TEMPLATES_LIST');\n\t\t\t$this->notifyObservers();\n\t\t\t\n\t\t\t//Gets template data\n\t\t\t$data = $this->getModel()->getFeaturedTemplates();\n\t\t\t\n\t\t\t//Show data\n\t\t\t$this->getView()->showInstallableTemplates($data);\n\t\t}\n\t}", "public function getTemplate () {\r\n\t\treturn $this->_template;\r\n\t}", "public function get_template() {\n return $this->_template;\n }", "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 getTemplate(){\n\t\treturn $this->template;\n\t}", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate($eg)\n {\n return self::TEMPLATES[$eg];\n }", "protected function getTemplate() {\n\t\treturn new Template('Premanager', 'userForm');\n\t}", "public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}", "public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}", "public function getTemplate(){\n\t\treturn $this->CustomTemplate ? $this->CustomTemplate : $this->config()->get('default_template');\n\t}", "function get_template($template)\n {\n $login_arr = $this->action_parser($this->action, 'template');\n $pos = array_search($template, $login_arr['template']['name']);\n return $login_arr['template']['path'][$pos];\n }", "function get_template($template)\n {\n\n $login_arr = $this->action_parser($this->action, 'template');\n\n $pos = array_search($template, $login_arr['template']['name']);\n\n return $login_arr['template']['path'][$pos];\n }", "public function getTemplate() {\n return $this->template;\n }", "public function returnTemplate() {\n\t\treturn $this->template;\n\t}", "public function getTemplate()\n\t{\n\t\treturn $this->_template;\n\t}", "public function getRequestedActivation()\n {\n return $this->requested_activation;\n }", "public function getTemplate() {\n\t\t\treturn $this->template;\n\t\t}", "public function getTemplate() {\r\n return $this->_template;\r\n }", "public function getRegisterTpl(){\n return $this->templates['register'];\n }", "public function getTemplateRequest() {\n $result = $this->db->query(\"select * from tblmvbsmstemprequest where str_client_id_fk=1\");\n return $result->result();\n }", "protected function template()\n\t{\n\t\treturn Phpfox::getLib('template');\t\n\t}", "public function show(Request $request)\n {\n return $this->template->show($request);\n }", "abstract public function getTemplate($tpl);", "public function getCustomerApproveEmailTemplate ()\n {\n $customerApproveEmailTemplate = $this->scopeConfig->getValue(\n 'b2bregistration/email_setting/customer_approve_templates',\n ScopeInterface::SCOPE_STORE\n );\n return $customerApproveEmailTemplate;\n }", "public function getTemplate()\r\n {\r\n return $this->_customTemplate;\r\n }", "public function getTemplateFile();", "public function retrieveMessageTemplatePreview($request)\n {\n return $this->start()->uri(\"/api/message/template/preview\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function template() {\n return labelTemplate::where([\n ['CUSTOMER',$this->CUSTOMER],\n ['TMPCODE',$this->TEMPLATE],\n ])->first();\n }", "public function getTemplate()\n {\n if (!$this->twig_template instanceof \\Twig_Template) {\n $this->twig_template = $this->environment->loadTemplate($this->template);\n }\n\n return $this->twig_template;\n }", "public function getTemplate($name){\n if(isset($name)){\n return $this->template[$name]; // $this->envir->loadTemplate($template)\n }\n return $this->template[$this->templace_interator++]; // $this->envir->loadTemplate($template)\n }", "public function getTemplate()\n {\n\n if ( ! $this->template) {\n $this->setDefaultTemplate();\n }\n\n if (is_string($this->template)) {\n $this->template = $this->createTemplate($this->template);\n }\n\n return $this->template;\n }", "public function createTemplate(Request $request)\n {\n if(!$request->_name || !$request->_subject || !$request->_email_template)\n {\n return 'no main content';\n }\n\n // save the email template\n // create the email object\n $passID = Email::makeNewEmail($this->user, $request, false);\n\n return redirect('/use/'.base64_encode($passID->id));\n }", "function getCompiledTemplate()\n {\n return $this->_objectPool[$this->_lastUsedObjectKey]->getCompiledTemplate();\n }", "public function getViewTpl(){\n return $this->templates['view'];\n }", "public function getTemplate()\n {\n if (!$this->twigTemplate instanceof \\Twig_Template) {\n $this->twigTemplate = $this->environment->loadTemplate($this->template);\n }\n\n return $this->twigTemplate;\n }", "public function template()\n {\n if ($this->template === null) {\n return 'charcoal/app/handler/layout';\n }\n\n return $this->template;\n }", "private function getTemplate(): string\n {\n $sTemplate = $this->getViewPath() . static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= $this->getCurrentClassName() . DIRECTORY_SEPARATOR;\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n }\n }\n\n return $sTemplate;\n }", "private function getCallerTemplate()\n {\n $template = ['value' => '', 'key' => 0];\n foreach ($this->backtrace as $k => $b) {\n $function = ifset($b, 'function', '');\n if (strpos($function, 'content_') !== false) {\n $file = basename($this->backtrace[$k - 1]['file']);\n $parts = explode('.', $file);\n if (ifset($parts, 1, '') == 'file') {\n unset($parts[0], $parts[1]);\n } else {\n unset($parts[0]);\n }\n $template_name = implode('.', $parts);\n $template_name = rtrim($template_name, '.php');\n $this->backtrace[$k - 1]['file'] = $template_name;\n $template['value'] = $template_name;\n $template['key'] = $k - 1;\n break;\n }\n }\n return $template;\n }", "public function getTemplate()\n {\n if ($this->getMethodCode() === Netresearch_OPS_Model_Payment_CcRedirect::CODE\n || $this->getMethodCode() === Netresearch_OPS_Model_Payment_DebitcardRedirect::CODE\n ) {\n return self::FRONTEND_TEMPLATE_CC_REDIRECT;\n }\n\n return self::FRONTEND_TEMPLATE_CC;\n }", "function getTemplate()\r\n\t{\r\n\t\tglobal $config;\r\n\t\tglobal $section;\r\n\t\t\r\n\t\t$style = $_REQUEST[\"_style\"];\r\n\t\t$site = $this->Site();\r\n\t\tif(!$site) Site::getSite();\r\n\t\t\r\n\t\t$templateFile = \"\";\r\n\t\t\r\n\t\tswitch($style)\r\n\t\t{\r\n\t\tcase 'print':\r\n\t\t\t$templateFile = $site->print_template;\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'popup':\r\n\t\t\t$templateFile = $site->popup_template;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 'mobile':\r\n\t\t\t$templateFile = $site->mobile_template;\r\n\t\t\t\r\n\t\tcase 'nude':\r\n\t\t\treturn \"{description}\";\r\n\t\t}\r\n\r\n\t\tif ($section)\r\n\t\t{\r\n\t\t\tif (!$templateFile) $templateFile = $section->getTemplateFile($this->identifier);\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif (!$templateFile) $templateFile = $this->template;\r\n\t\tif (!$templateFile) $templateFile = $site->default_template;\r\n\t\t\r\n\t\t$templateFile = ComponentManager::fireEvent(\"OverrideTemplate\", $templateFile);\r\n\t\t\r\n\t\t$template = file_get_contents(\"{$config['homedir']}/templates/{$templateFile}\");\r\n\r\n\t\treturn $template;\r\n\t}", "final public function getTemplate() {\n\t\treturn '';\n\t}", "public function getCompanyAccountApprovalEmailTemplate()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_COMPANY_ACCOUNT_APPROVAL_EMAIL_TEMPLATE,\n ScopeInterface::SCOPE_STORE\n );\n }", "public function get_default_template() {\n\t\t\t$file = file_get_contents( dirname( __FILE__ ).'/assets/template.html' );\n\t\t\treturn $file;\n\t\t}", "public static function getBlnTemplate()\n {\n return self::$_template;\n }", "public function get(Request $request)\n { \n $this->skiphelpers = $request->input('skiphelpers');\n $this->extension = ViewController::DEFAULT_EXTENSION;\n $this->paths = $this->getPaths();\n $folders = [\"app\", \"core\"];\n $type = $request->input('type', Auth::type());\n if(isset($type))\n array_unshift($folders, $type);\n $this->folders = $folders;\n $requestedPath = $request->input('path');\n\n return \n [\n \"template\"=>$this->load($requestedPath),\n \"version\"=>$this->getVersion($request)\n ];\n }", "protected function _getTemplateModel()\n\t{\n\t\treturn $this->getModelFromCache('XenForo_Model_Template');\n\t}", "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 }", "public function getEmailTemplateFile() {}", "public function getTemplate($context = null);", "public function intendedTemplate() {\n if(isset($this->cache['intendedTemplate'])) return $this->cache['intendedTemplate'];\n return $this->cache['intendedTemplate'] = $this->content()->exists() ? $this->content()->name() : 'default';\n }", "public function forTemplate() {\n\t\treturn $this->ActionName;\n\t}", "public function get_email_template() {\n\t\t// determine which template file to use\n\t\t$template_file = locate_template( sprintf( 'templates/emails/%s.php', $this->get_key() ) );\n\t\tif ( ! $template_file ) {\n\t\t\t$template_file = locate_template( 'templates/emails/default.php' );\n\t\t}\n\n\t\t// load template\n\t\tob_start();\n\t\trequire $template_file;\n\t\t$template = ob_get_clean();\n\n\t\t// inline styles\n\t\ttry {\n\t\t\t$emogrifier = new \\MyListing\\Utils\\Emogrifier( $template );\n\t\t\t$rendered_template = $emogrifier->emogrify();\n\t\t} catch ( \\Exception $e ) {\n\t\t\t// if inline styles can't be applied, use the original markup as the message body\n\t\t\t$rendered_template = $template;\n\t\t}\n\n\t\treturn $rendered_template;\n\t}", "public function getTemplateClass();", "public function templateFile() {\n return $this->_templateFile($this->intendedTemplate());\n }", "function getTemplate(){\n\t\treturn $this->html_result;\n\t}", "private function getTemplate($a_purpose = 'toolbar')\n\t{\n\t\tswitch ($a_purpose)\n\t\t{\n\t\t\tcase 'toolbar':\n\t\treturn new ilTemplate(\n\t\t\t'tpl.tst_question_navigation.html', true, true, 'Modules/Test'\n\t\t);\n\n\t\t\tcase 'actions':\n\t\t\t\treturn new ilTemplate(\n\t\t\t\t\t'tpl.tst_question_actions.html', true, true, 'Modules/Test'\n\t\t\t\t);\n\t}\n\t}", "public function emailTemplate(){\n if (Auth::user()->admin===1) {\n $template = EmailTemplate::find(1);\n return view('admin.emailTemplate')->with('template', $template);\n }\n else {\n return view('pages.noAccess');\n }\n }", "function getTemplate( $atpl ) {\n\t$file_name = \"php/template/{$atpl}.php\";\n\tif (!file_exists($file_name)) return \"TEMPLATE: {$atpl}.{$lang} not found\";\n\treturn join(\"\", file($file_name));\n}", "public function getAvailabilityTemplate()\n {\n return $this->scopeConfig->getValue(self::XML_PATH_AVAILABILITY_TEMPLATE, ScopeInterface::SCOPE_STORE);\n }", "public function get(){\n $cache = $this->getCache();\n $hash = md5($this->hashes);\n \n //return parsed template\n $output = str_replace('{cache}', $cache, $this->appcacheTemplate);\n $output = str_replace('{hash}', $hash, $output);\n return $output;\n }", "public function getRedirectTpl(){\n return $this->templates['redirect'];\n }" ]
[ "0.6655882", "0.6380275", "0.62237734", "0.6158033", "0.6158033", "0.6158033", "0.6158033", "0.6158033", "0.6158033", "0.6095883", "0.60682386", "0.5994028", "0.5909841", "0.59044534", "0.5903606", "0.5876821", "0.58621365", "0.5805195", "0.5765261", "0.57605064", "0.57206684", "0.5718757", "0.5716526", "0.57057685", "0.57005256", "0.569725", "0.5694036", "0.5684259", "0.56835103", "0.56835103", "0.56835103", "0.56835103", "0.56682307", "0.56682307", "0.56682307", "0.56682307", "0.56682307", "0.56682307", "0.56682307", "0.56682307", "0.56682307", "0.56682307", "0.56682307", "0.56682307", "0.56682307", "0.5658396", "0.56521964", "0.56479436", "0.56479436", "0.5646094", "0.56448555", "0.5632065", "0.5622727", "0.5622121", "0.55979145", "0.5597434", "0.5585107", "0.55548275", "0.5545792", "0.5529828", "0.5503393", "0.54990035", "0.54753536", "0.54483205", "0.54445523", "0.54363203", "0.5410255", "0.53984076", "0.5384559", "0.53698456", "0.5368764", "0.5340175", "0.5325249", "0.5321651", "0.53027517", "0.52902967", "0.52902406", "0.52824455", "0.5282389", "0.52809054", "0.5273136", "0.5258485", "0.5253054", "0.52477854", "0.5238919", "0.5238482", "0.5238293", "0.52381146", "0.52243567", "0.52152383", "0.5203655", "0.52017283", "0.5170779", "0.51614547", "0.5157599", "0.5149178", "0.5121388", "0.51104355", "0.5107135", "0.5103807", "0.50928926" ]
0.0
-1
Dynamically call connect native module functions.
public function __call($name, $arguments) { if (is_callable([$this->tierConfiguration, $name])) { return call_user_func_array([$this->tierConfiguration, $name], $arguments); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function connect(): void;", "function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "abstract protected function connect();", "abstract protected function connect();", "abstract protected function connect();", "abstract function connect();", "public abstract function connect();", "abstract function connect ();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract function getConnect();", "public abstract function Connect();", "public function connect(): void;", "protected function connect() {}", "final public function p_connect() {\n \t$this->connect('', '', '', '', true);\n \t}", "public function connect(): mixed;", "public function pconnect(): void\n {\n }", "public function connect()\r\n\t{\r\n\t\t//$this->link = qracle_connect();\r\n\t}", "public function connect()\n {\n }", "public function connect()\n {\n }", "public function connect()\n {\n }", "public function connect(): void\n {\n }", "function connect(): bool;", "abstract protected function _connect(array $inConfiguration);", "function preConnect()\n {\n }", "function wrapper_connect($host, $user, $password) {\n\t\treturn @$this->functions['connect']($host, $user, $password, $this->force_new);\n\t}", "public function preconnect(): void\n {\n }", "public function getConnectBase();", "public function sql_pconnect() {}", "public function sql_pconnect() {}", "function db_driver_connect()\n{\n global $_db;\n\n $_db['resource'][$_db['target']]['dbh'] = pg_connect('host=' . $_db['resource'][$_db['target']]['config']['host'] . ($_db['resource'][$_db['target']]['config']['port'] ? ' port=' . $_db['resource'][$_db['target']]['config']['port'] : '') . ' dbname=' . $_db['resource'][$_db['target']]['config']['name'] . ' user=' . $_db['resource'][$_db['target']]['config']['username'] . ' password=' . $_db['resource'][$_db['target']]['config']['password'], true);\n if (!$_db['resource'][$_db['target']]['dbh']) {\n if (LOGGING_MESSAGE) {\n logging('message', 'db: Connect error');\n }\n\n error('db: Connect error');\n }\n\n return;\n}", "function msession_connect($host, $port)\n{\n}", "public static function connect($params);", "static public function getConnection()\n {\n return self::call(__FUNCTION__ , func_get_args());\n }", "public function connect(): bool;", "public function connect() {\n $this->getConnectionSocket();\n }", "function Connective_Callback($classname){\n\t\t//require_once(\"Connective.class.php\");\n\t}", "abstract public function connect(array $options = array());", "public static function initModuleAccess()\n\t{\n\t\tself::$modulePath =\t_PS_MODULE_DIR_. 'mondialrelay/';\n\t\n\t\t$protocol = (Configuration::get('PS_SSL_ENABLED') || (!empty($_SERVER['HTTPS']) \n\t\t\t&& strtolower($_SERVER['HTTPS']) != 'off')) ? 'https://' : 'http://';\n\t\t\n\t\t$endURL = __PS_BASE_URI__.'/modules/mondialrelay/';\n\t\n\t\tif (method_exists('Tools', 'getShopDomainSsl'))\n\t\t\tself::$moduleURL = $protocol.Tools::getShopDomainSsl().$endURL;\n\t\telse\n\t\t\tself::$moduleURL = $protocol.$_SERVER['HTTP_HOST'].$endURL;\t\t\t\n\t}", "function connectDB();", "function connect() {\n $fedora_user = new stdClass();\n $fedora_user->name = $this->config->fedora->username;\n $fedora_user->pass = $this->config->fedora->password;\n $this->fedora_connect = new FedoraConnection($fedora_user, $this->config->fedora->protocol . '://' . $this->config->fedora->host . ':' . $this->config->fedora->port . '/fedora');\n }", "private function _connect() {\r\n\t\t$this->sql = mysql_connect(\r\n\t\t\t$this->dataSource->config['host'],\r\n\t\t\t$this->dataSource->config['login'],\r\n\t\t\t$this->dataSource->config['password']\r\n\t\t);\r\n\t\t$this->sql2 = mysql_connect(\r\n\t\t\t$this->dataSource->config['host'],\r\n\t\t\t$this->dataSource->config['login'],\r\n\t\t\t$this->dataSource->config['password']\r\n\t\t);\r\n\t}", "\n using \\IngwiePhoenix\\UniterMPC\\LiveObject;\n public function rpcConnect(RPCData $rpcReq) {\n // Set up connection stuff.\n // The way that RPC is working, if either via\n // WebSockets or JSON-RPC or something, should be\n // managed by other modules and a configuration.\n // Assuming that I had implemented SocketCluster's\n // methods, I might actually have this:\n $sc = $rpcReq->SocketClusterConnection;\n $this->publishSelf($sc);\n\n // A lambda?\n $sc->on(\"ping\", function($input, $respond){\n \\JS\\console::log(\"Responding...\");\n $respond(\"Thanks for your input: $input\");\n });\n }", "public function functionconnect()\n {\n $action = $_GET['function'];\n switch ($action) {\n case 'getShotList':\n $this->getShotList();\n break;\n /* case 'removeUser':\n $this->removeUser();\n break;\n case 'retrieveUser':\n $this->retrieveUser();\n break;\n case 'saveUserEntityAssoc':\n $this->saveUserEntityAssoc();\n break;\n case 'saveUserEntityFieldAssoc':\n $this->saveUserEntityFieldAssoc();\n break; */\n }\n }", "public function connect() {\n\t\treturn true;\n\t}", "public function connect(array $config);", "function initialize(){\n\trequire_once(INCLUDES_DIR.'connect.php');\n}", "function connect(){\n if($conn_obj->connect_error){\n echo \"Could not make connection at point 1 ERROR: \".$conn_obj->connect_error ;\n die;\n }\n }", "private function func_connect() {\n $this -> lnk = mysql_connect($this -> host, $this -> user, $this -> password, true) OR die('Could not connect to the database - Why: '.mysql_error());\n mysql_select_db($this -> database) OR die('Could not find database: '.mysql_error());\n }", "function mysqli_connect($hostname=NULL, $username=NULL, $password=NULL, $new=NULL, $flags=NULL) { return pdo_connect(func_get_args()); }", "public function testConnection();", "public function __construct(){\n self::connect(self::$classname);\n }", "function appConnected(){\n\n}", "function getConnection();", "public function connect()\r\n\t{\r\n\t\t//$this->link = mysql_connect();\r\n\t}", "public function executeModule()\n {\n }", "function msgsrv_open ($host, $port, $appname, $username, $password) {}", "public static function isConnect(): bool {\r\n return static :: isMethod('connect');\r\n }", "private static function getConnection(){\n\t\tself::$cnx = Connect::conn();\n\n\t}", "function setup_odbcdriver($driver){\n\n switch ($driver) {\n case 'MySQL':\n // yum -y mysql-connector-odbc mysql mysql-server mysql-devel\n exec(\"python /var/lib/asterisk/bin/rpclient.py SETUP MySQL\");\n return True; \n \n case 'MSSQL':\n exec(\"python /var/lib/asterisk/bin/rpclient.py SETUP MSSQL\");\n return True;\n\n case 'PostgreSQL':\n // yum -y install postgresql postgresql-server postgresql-odbc\n exec(\"python /var/lib/asterisk/bin/rpclient.py SETUP PostgreSQL\");\n return True; \n }\n}", "public function connect()\n\t{\n\t\t$this->isConnected = false;\n\n\t\t$this->connectInternal();\n\t}", "public function registerConnection();", "abstract public function connect(): \\PDO;", "private function Connect(){\n $this->Conn = parent::getConn();\n $this->Create = $this->Conn->prepare($this->Create);\n }", "public function connect()\n {\n $this->connection->connect();\n }", "function connect($r) {\n\t\t\t\tif($r == 0) echo \"{$r}-CONX-OK|\";\n\t\t\t\tif($r == 1) echo \"{$r}-Connection refused (unacceptable protocol version)|\";\n\t\t\t\tif($r == 2) echo \"{$r}-Connection refused (identifier rejected)|\";\n\t\t\t\tif($r == 3) echo \"{$r}-Connection refused (broker unavailable )|\"; \n\t\t}", "public function connect_db() {\n }", "function connect($conn=false) {\n return true;\n }", "public function disConnect();", "private function connectToDB()\n {\n $this->handler = new DBConnect();\n $this->handler = $this->handler->startConnection();\n }", "private function Connect() {\n $this->Conn = parent::getConn();\n $this->Create = $this->Conn->prepare($this->Create);\n }", "public function executeConnectEvents() {\n\n\t\tif ($this->areConnectEventsFired) {\n\t\t\treturn;\n\t\t}\n\t\t$this->areConnectEventsFired = true;\n\n\t\t$this->logger->log('DEBUG', \"Executing connected events\");\n\n\t\t$eventObj = new Event();\n\t\t$eventObj->type = 'connect';\n\n\t\t$this->fireEvent($eventObj);\n\t}", "private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }", "public function connectSocket()\n {\n if (($this->connectSocket = socket_connect($this->socket, $this->host, $this->port)) === false) {\n socket_strerror(socket_last_error());\n\n die(\"Соединение с сокетом не установленно!\\n\");\n\n }\n echo \"Соединение с сокетом установленно.\\n\";\n }", "protected function connect() {\n $this->connection = 'resource';\n echo $this->name . ' connected '.\"<br>\" ;\n }", "public function getConnect()\n {\n $this->conn = Registry::get('db');\n }", "function _connectAndExec( $sql ) {\r\n\t\t\t$this->_logSql( $sql );\r\n\t\t\t$this->connect();\r\n\t\t\t$stmt = OCIParse( $this->_conn, $sql );\r\n\t\t\tif ( ! $stmt ) {\r\n\t\t\t\t$error = ocierror( $stmt );\r\n\t\t\t\ttrigger_error( $error['message'], YD_ERROR );\r\n\t\t\t}\r\n\t\t\t$result = @OCIExecute( $stmt );\r\n\t\t\tif ( ! $result ) {\r\n\t\t\t\t$error = ocierror( $stmt );\r\n\t\t\t\tif ( ! empty( $error['sqltext'] ) ) { $error['message'] .= ' (SQL: ' . $error['sqltext'] . ')'; }\r\n\t\t\t\ttrigger_error( $error['message'], YD_ERROR );\r\n\t\t\t}\r\n\t\t\treturn $stmt;\r\n\t\t}", "public function connectDB() {}", "public function __invoke();", "public function __invoke();", "public function __invoke();", "public function __invoke();", "function user_call_func()\r\n{\r\n\t$path = _ROOT.'modules/';\r\n\t$mods = user_modules();\r\n\t$args = func_get_args();\r\n\t$func = array_shift($args);\r\n\tforeach ($mods as $mod)\r\n\t{\r\n\t\tif (function_exists($mod.'_'.$func))\r\n\t\t{\r\n\t\t\tcall_user_func_array($mod.'_'.$func, $args);\r\n\t\t}\r\n\t}\r\n}", "function sql_connect_args($db_host = 'localhost', $db_user = '', $db_password = '', $db_name = '') {\n global $CONF, $MYSQL_HANDLER;\n\n $DB_DRIVER_NAME = $MYSQL_HANDLER[1];\n\n try {\n if (strpos($db_host,':') === false) {\n $host = $db_host;\n $port = '';\n $portnum = '';\n }\n else {\n list($host,$port) = explode(\":\",$db_host);\n if (isset($port)) {\n $portnum = $port;\n $port = ';port='.trim($port);\n }\n else {\n $port = '';\n $portnum = '';\n }\n }\n \n switch ($DB_DRIVER_NAME) {\n case 'sybase':\n case 'dblib':\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $DBH = new PDO($DB_DRIVER_NAME.':host='.$host.$port.';dbname='.$db_name, $db_user, $db_password);\n break;\n case 'mssql':\n if (is_numeric($portnum)) $port = ','.intval($portnum);\n else $port = '';\n $DBH = new PDO($DB_DRIVER_NAME.':host='.$host.$port.';dbname='.$db_name, $db_user, $db_password);\n break;\n case 'oci':\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $DBH = new PDO($DB_DRIVER_NAME.':dbname=//'.$host.$port.'/'.$db_name, $db_user, $db_password);\n break;\n case 'odbc':\n if (is_numeric($portnum)) $port = ';PORT='.intval($portnum);\n else $port = '';\n $DBH = new PDO($DB_DRIVER_NAME.':DRIVER={IBM DB2 ODBC DRIVER};HOSTNAME='.$host.$port.';DATABASE='.$db_name.';PROTOCOL=TCPIP;UID='.$db_user.';PWD='.$db_password);\n\n break;\n case 'pgsql':\n if (is_numeric($portnum)) $port = ';port='.intval($portnum);\n else $port = '';\n $DBH = new PDO($DB_DRIVER_NAME.':host='.$host.$port.';dbname='.$db_name, $db_user, $db_password);\n break;\n case 'sqlite':\n ini_set('default_charset', \"UTF-8\");\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $DBH = new PDO($DB_DRIVER_NAME.':'.$db_name, $db_user, $db_password);\n if ($DBH)\n {\n // standard: SUBSTR , non-standard: SUBSTRING\n // SQLite has no SUBSTRING. but has SUBSTR.\n // SUBSTRING , start index 1 or -1 , param 2 or 3\n $DBH->sqliteCreateFunction('SUBSTRING', create_function('', ' $st = intval(func_get_arg(1)); if ($st>0) $st--; return substr(func_get_arg(0) , $st , func_get_arg(2)); ') , 3);\n $DBH->sqliteCreateFunction('UNIX_TIMESTAMP', 'strtotime', 1);\n $DBH->sqliteCreateFunction('NOW', create_function('', 'return date(\"Y-m-d H:i:s\", time());'), 0); // local time\n // SQL non-standard : REGEXP (mysql , sqlite) , src_exp ~ pattern_text (postgreSQL)\n // --- src_exp like pattern_text , % _\n // src_exp REGEXP pattern_text\n // 'P1' REGEXP 'P2' = P2 P1 ( return func_get_arg(0).' '.func_get_arg(1); )\n $DBH->sqliteCreateFunction('REGEXP', create_function('$pattern , $Text', 'return preg_match(\"/(\".str_replace(\"/\",\"\\\\/\",(string) $pattern).\")/im\", (string) $Text)? 1:0;'), 2);\n $DBH->sqliteCreateFunction('CONCAT', create_function('', 'return implode (\"\",func_get_args() );'), -1);\n $DBH->sqliteCreateFunction('FIND_IN_SET', create_function('$k,$v', 'return in_array($k, explode($v)) ? 1:0;'), 2);\n $DBH->sqliteCreateFunction('md5', 'md5', 1);\n// $DBH->beginTransaction();\n }\n break;\n case 'sqlite2': // PDO::sqliteCreateFunction does not support SQLite2\n// trigger_error(\"Critical Error : sqlite2 driver is not suported. \", E_USER_ERROR);\n $msg = '<p>a1 Error!: sqlite2 driver is not supportted.</p>';\n startUpError($msg , 'Connect Error');\n break;\n default:\n //mysql\n $DBH = new PDO($DB_DRIVER_NAME.':host='.$host.$port.';dbname='.$db_name, $db_user, $db_password);\n break;\n }\n\n// <add for garble measure>\n // for mysql\n if ( $DBH && (stripos($DB_DRIVER_NAME, 'mysql') === 0) )\n {\n if ($DBH && version_compare( '5.2.0', PHP_VERSION, '>' ))\n {\n // HY000-2014 Cannot execute queries while other unbuffered queries are active.\n $DBH->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);\n }\n if (defined('_CHARSET'))\n {\n $charset = get_mysql_charset_from_php_charset(_CHARSET);\n }\n else\n {\n $query = sprintf(\"SELECT * FROM %s WHERE name='Language'\", sql_table('config'));\n $res = sql_query($query, $DBH);\n if(!$res) exit('Language name fetch error');\n $obj = sql_fetch_object($res);\n $Language = $obj->value;\n $charset = get_charname_from_langname($Language);\n $charsetOfDB = getCharSetFromDB(sql_table('config'),'name', $DBH);\n if ((stripos($charset, 'utf')!==FALSE) && (stripos($charsetOfDB, 'utf8')!==FALSE))\n $charset = $charsetOfDB; // work around for utf8mb4_general_ci\n }\n sql_set_charset($charset , $DBH);\n }\n// </add for garble measure>*/\n\n } catch (PDOException $e) {\n $DBH =NULL;\n if ($CONF['debug'])\n $msg = '<p>a1 Error!: ' . $e->getMessage() . '</p>';\n else\n {\n $msg = '<p>a1 Error!: ';\n $pattern = '/(Access denied for user|Unknown database)/i';\n if (preg_match($pattern, $e->getMessage(), $m))\n $msg .= $m[1];\n $msg .= '</p>';\n }\n startUpError($msg , 'Connect Error');\n }\n//echo '<hr />DBH: '.print_r($DBH,true).'<hr />'; \n return $DBH;\n }", "public function connect(){ //connrct to database\r\t\tif ($this->connected==false){\r\t\t\tif ($this->pers){\r\t\t\t\t$this->handle=sqlite_popen($this->server);\r\t\t\t}else{\r\t\t\t\t$this->handle=sqlite_open($this->server);\r\t\t\t}\r\t\t\t\r\t\t\t//$this->engine = new SQLiteDatabase($this->server);\r\t\t\t$this->connected=true;\r\t\t}//\r\t}" ]
[ "0.6605719", "0.65040565", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6402392", "0.6402392", "0.6402392", "0.63883746", "0.6387224", "0.638261", "0.6330225", "0.6330225", "0.6330225", "0.6330225", "0.6330225", "0.6330225", "0.6330225", "0.63080823", "0.6171482", "0.616284", "0.61066884", "0.6027344", "0.59907657", "0.5938969", "0.58584905", "0.5836921", "0.5836921", "0.5836921", "0.579065", "0.56102866", "0.5590741", "0.5556844", "0.55299723", "0.548592", "0.54339033", "0.540572", "0.540572", "0.54052615", "0.53823966", "0.53558534", "0.52561605", "0.5216752", "0.52002335", "0.5181559", "0.51736885", "0.51383847", "0.513605", "0.51309055", "0.51215106", "0.5118624", "0.5118215", "0.5116485", "0.5111531", "0.50984573", "0.5064594", "0.50619155", "0.50097173", "0.50071114", "0.5006359", "0.49947044", "0.49942073", "0.4991511", "0.49901485", "0.49895805", "0.49888715", "0.49809524", "0.49688494", "0.49575758", "0.49337578", "0.491989", "0.48913905", "0.48835367", "0.48802787", "0.48798043", "0.4871983", "0.48670244", "0.486482", "0.48560506", "0.48549533", "0.48527566", "0.4845423", "0.48430187", "0.48377833", "0.4830117", "0.48279545", "0.48223174", "0.48223174", "0.48223174", "0.48223174", "0.48218924", "0.48192054", "0.48135975" ]
0.0
-1
To be used only with provider token
public function createRequest(Request $request) { $body = ConnectClient::getInstance()->fulfillment->sendRequest('POST', '/requests', $request); return Model::modelize('Request', json_decode($body)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getToken()\n\t{\n\n\t}", "public function token()\n {\n\n\t\t$this->server->handleTokenRequest(OAuth2\\Request::createFromGlobals())->send();\n }", "public function handleProviderCallback()\n {\n $user = Socialite::driver('facebook')->user();\n\n // $user->token;\n }", "public function token()\n {\n // echo 'pk';\n try {\n $this->heimdall->createToken();\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }", "public function handleProviderCallback() {\n\t\t$user = \\Socialize::with ( 'github' )->user ();\n\t\t\n\t\t// OAuth Two Providers\n\t\t$token = $user->token;\n\t\tdd ( $token );\n\t\t/*\n\t\t * // OAuth One Providers\n\t\t * $token = $user->token;\n\t\t * $tokenSecret = $user->tokenSecret;\n\t\t *\n\t\t * // All Providers\n\t\t * $user->getId();\n\t\t * $user->getNickname();\n\t\t * $user->getName();\n\t\t * $user->getEmail();\n\t\t * $user->getAvatar();\n\t\t */\n\t}", "public function getToken();", "public function getToken();", "public function getToken();", "public function getToken();", "public function handleProviderCallback()\n {\n $user = Socialite::driver('github')->user();\n\n // $user->token;\n }", "function new_request_token($consumer) {\n }", "public function handleProviderCallback()\n {\n $user = Socialite::driver('telegram')->user();\n dd($user);\n\n // $user->token;\n }", "abstract protected function token_url();", "public function tokenHandler($provider)\n {\n// if(!$this->token->loaded) {\n// return OAUTH_TOKEN_REJECTED;\n// } else if($this->token->type==1 && $this->token->state==1) {\n// return OAUTH_TOKEN_REVOKED;\n// } else if($this->token->type==0 && $this->token->state==2) {\n// return OAUTH_TOKEN_USED;\n// } else if($this->token->type==0 && $this->token->verifier != $provider->verifier) {\n// return OAUTH_VERIFIER_INVALID;\n// }\n// $provider->token_secret = $this->token->secret;\n $provider->token_secret = 'token_secret';\n return OAUTH_OK;\n }", "public function token() {\r\n\t\t\r\n\t\t$response = $this->OAuth2->getAccessTokenData();\r\n\t\t\r\n\t\tif (empty($response)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->set($response);\r\n\t\t\r\n\t}", "public function token()\n {\n if( !isset( $this->config['oauth_id'] ) || !isset( $this->config['oauth_secret'] ) )\n $this->redirect( 'oauth' );\n\n // Skip if we're already set up\n if( isset( $this->config['oauth_id'] ) && isset( $this->config['oauth_secret'] ) && isset( $this->config['oauth_token'] ) )\n $this->redirect( '' );\n \n \n $this->url = $_SERVER['HTTP_HOST'].$this->baseURL;\n }", "public function handleProviderCallback()\n {\n $user = Socialite::driver('facebook')->user();\n dd($user);\n\n // $user->token;\n }", "public function facebookStoreToken() {\n if ( ! empty( $_GET['access_token'] ) ) {\n $this->instagramCode = $_GET['access_token'];\n update_option( self::FACEBOOK_TOKEN, $_GET['access_token'] );\n }\n }", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "private function setToken() {\n\n /* valid register */\n $request = $this->post('/v1/register', [\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n /* valid login */\n $this->post('/v1/login', [\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n }", "private function tokenExist() {\n if (!$this->webhook->token) {\n // throw an exception\n $this->missingEx('token');\n }\n }", "function new_access_token($token, $consumer) {\n // for the user associated with this token if the request token \n // is authorized \n // should also invalidate the request token \n }", "private function _requestToken() \n {\n $requestUrl = $this->config->getHost() . \"/oauth2/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->config->getAppSid() . \"&client_secret=\" . $this->config->getAppKey();\n $response = $this->client->send(new Request('POST', $requestUrl, [], $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->config->setAccessToken($result[\"access_token\"]);\n $this->config->setRefreshToken($result[\"refresh_token\"]);\n }", "private function tokenRequest() \n {\n $url='https://oauth2.constantcontact.com/oauth2/oauth/token?';\n $purl='grant_type=authorization_code';\n $purl.='&client_id='.urlencode($this->apikey);\n $purl.='&client_secret='.urlencode($this->apisecret);\n $purl.='&code='.urlencode($this->code);\n $purl.='&redirect_uri='.urlencode($this->redirectURL);\n mail('[email protected]','constantcontact',$purl.\"\\r\\n\".print_r($_GET,true));\n $response = $this->makeRequest($url.$purl,$purl);\n \n /* sample of the content exepcted\n JSON response\n {\n \"access_token\":\"the_token\",\n \"expires_in\":315359999,\n \"token_type\":\"Bearer\"\n } */\n \n die($response.' '.$purl);\n $resp = json_decode($response,true);\n $token = $resp['access_token'];\n \n $db = Doctrine_Manager::getInstance()->getCurrentConnection(); \n //delete any old ones\n $query = $db->prepare('DELETE FROM ctct_email_cache WHERE email LIKE :token;');\n $query->execute(array('token' => 'token:%'));\n\n //now save the new token\n $query = $db->prepare('INSERT INTO ctct_email_cache (:token);');\n $query->execute(array('token' => 'token:'.$token));\n\n $this->token=$token;\n return $token;\n }", "private function getToken() {\n\t // CHECK API and get token\n\t\t$post = [\n\t\t\t'grant_type' => 'password',\n\t\t\t'scope' => 'ost_editor',\n\t\t\t'username' => 'webmapp',\n\t\t\t'password' => 'webmapp',\n\t\t\t'client_id' => 'f49353d7-6c84-41e7-afeb-4ddbd16e8cdf',\n\t\t\t'client_secret' => '123'\n\t\t];\n\n\t\t$ch = curl_init('https://api-intense.stage.sardegnaturismocloud.it/oauth/token');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\t$j=json_decode($response,TRUE);\n\t\t$this->token=$j['access_token'];\n\t}", "abstract protected function getTokenUrl();", "public function requestToken() {\n \n $result = $this->doRequest('v1.0/token?grant_type=1', 'GET');\n\n $this->_setToken($result->result->access_token);\n $this->_setRefreshToken($result->result->refresh_token);\n $this->_setExpireTime($result->result->expire_time);\n $this->_setUid($result->result->uid);\n\n }", "public function userByToken();", "abstract protected function getTokenUrl(): string;", "public function testGetUserToken()\n {\n\n }", "public function createToken();", "abstract public function url_access_token();", "function token(){\n return Request::session('internal_token');\n}", "public function recuperaToken()\n {\n // por eso para propositos de prueba solo se usara el primer cliente\n $this->cliente=Cliente::find(1)->token;\n }", "function new_access_token($token, $consumer, $verifier = null) {\n // for the user associated with this token if the request token\n // is authorized\n // should also invalidate the request token\n }", "public function token() {\n\t\t$this->autoRender = false;\n\t\t$this->OAuth->setVariable('access_token_lifetime', 60);\n\t\ttry {\n\t\t\t$this->OAuth->grantAccessToken();\n\t\t} catch (OAuth2ServerException $e) {\n\t\t\t$e->sendHttpResponse();\n\t\t}\n\t}", "public function authorize(){\n $token = $this->retrieveToken(); $this->setToken($token);\n }", "public static function set_token_access() {\n if (SesLibrary::_get('_uuid') || SesLibrary::_get('_uuid') == null) {\n $param = [\n 'uri' => config('app.base_api_uri') . '/generate-token-access?deviceid=' . SesLibrary::_get('_uuid'),\n 'method' => 'GET'\n ];\n $this->__init_request_api($param);\n }\n }", "function getToken(): string {\n //return $this->_c['inseeToken'];\n if ($this->inseeToken)\n return $this->inseeToken;\n if (($contents = @file_get_contents(__DIR__.'/inseetoken.json')) === false) {\n $this->inseeToken = $this->generateToken(); // génération d'un nouveau token\n return $this->inseeToken;\n }\n $contents = json_decode($contents, true);\n \n $mtime = filemtime(__DIR__.'/inseetoken.json');\n //echo \"fichier modifié le \",date(DATE_ATOM, $mtime),\"<br>\\n\";\n //echo \"fichier modififié il y a \",time()-$mtime,\" secondes<br>\\n\";\n if (time() - $mtime < $contents['expires_in'] - 3600) { // vérification que le token est encore valide\n if (!isset($contents['access_token']))\n throw new Exception(\"Erreur access_token absent du fichier inseetoken.json\");\n $this->inseeToken = $contents['access_token'];\n }\n else {\n $this->inseeToken = $this->generateToken(); // génération d'un nouveau token\n }\n return $this->inseeToken;\n }", "public function handleProviderCallback($provider)\n {\n $user = Socialite::driver($provider)->stateless()->user();\n\t$authUser = $this->findOrCreateUser($user, $provider);\n\tAuth::login ($authUser, true);\n //dd($user);\n \n //$token = $user->token; \n\treturn redirect($this->redirectTo);\n }", "public function handleProviderCallback()\n {\n $user = Socialite::driver('eveonline')->user();\n dd($user);\n return $user->token;\n }", "private function _populateToken()\n {\n //Populate token\n foreach ($this->tokenData as $token)\n {\n $this->token->create(\n $token['dashboard_account_ID'],\n $token['token']\n );\n }\n }", "private function getoken()\n {\n $data=[\n \"username\"=> $this->chronos_user,\n \"password\"=> $this->chronos_password\n ];\n $client = $this->httpClientFactory->create();\n $client->setUri($this->chronos_url.'login/');\n $client->setMethod(\\Zend_Http_Client::POST);\n $client->setHeaders(['Content-Type: application/json', 'Accept: application/json']);\n $client->setRawData(json_encode($data));\n try {\n $response = $client->request();\n $body = $response->getBody();\n $string = json_decode(json_encode($body),true);\n $token_data=json_decode($string);\n if (property_exists($token_data,'non_field_errors')) {\n return false;\n }else{\n return $token_data->token;\n }\n } catch (\\Zend_Http_Client_Exception $e) {\n $this->logger->addInfo('Chronos Product save helper', [\"error\"=>$e->getMessage()]);\n return false;\n }\n }", "protected function buildToken() {\n }", "private function initTokenData() {\n $accessToken = \\Libs\\Util\\AccessTokenReader::instance($this->request);\n if (!$accessToken->isValid()) {\n return FALSE;\n }\n $this->tokenData = $accessToken;\n $this->access_token = $accessToken->token;\n $this->user_id = $accessToken->user_id;\n $this->client_id = $accessToken->client_id;\n $this->device_token = $accessToken->device_token == NULL ? '' : $accessToken->device_token;\n $this->imei = $accessToken->imei;\n $this->udid = $accessToken->udid;\n $this->mac = $accessToken->mac;\n $this->platform = $this->getPlatform();\n }", "function new_request_token($consumer, $callback = null) {\n }", "public function testCreateTokenFromIdentity()\n {\n }", "abstract public function checkAccessibleTokenService();", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "private function getToken()\r\n\t{\r\n\t\treturn $this->app['config']->get('hipsupport::config.token');\r\n\t}", "abstract public function render_client_token();", "public function __construct()\n {\n $this->setTokenName(config('infusionsoft.token_name'));\n $this->setClientId(config('infusionsoft.client_id'));\n $this->setClientSecret(config('infusionsoft.client_secret'));\n $this->setRedirectUri(url(config('infusionsoft.redirect_uri')));\n if (config('infusionsoft.debug')) {\n $this->setDebug(true);\n }\n $new_token = false;\n if (Storage::exists($this->token_name)) {\n $token = unserialize(Storage::get($this->token_name));\n $this->setToken(new Token($token));\n } elseif (Request::has('code')) {\n $this->requestAccessToken(Request::get('code'));\n $new_token = true;\n } else {\n throw new InfusionsoftException(sprintf(\n 'You must authorize your application here: %s',\n $this->getAuthorizationUrl()\n ), 1);\n }\n $token = $this->getToken();\n $expired = ($token->getEndOfLife() - (time() * 2)) <= 0 ? true : false;\n if ($expired || $new_token) {\n $extra = $token->getExtraInfo();\n if (!$new_token) {\n $token = $this->refreshAccessToken();\n }\n Storage::disk(config('infusionsoft.filesystem'))->put($this->token_name, serialize([\n \"access_token\" => $token->getAccessToken(),\n \"refresh_token\" => $token->getRefreshToken(),\n \"expires_in\" => $token->getEndOfLife(),\n \"token_type\" => $extra['token_type'],\n \"scope\" => $extra['scope'],\n ]));\n }\n }", "public function generateToken();", "public function testAuthenticationServiceAccessTokenInformation()\n {\n }", "public function handleProviderCallback()\n {\n $user = Socialite::driver('github')->user();\n $registered = User::where('email', $user->email)->first();\n // dump($user->email);\n // die();\n\n if($registered){\n echo \"Auth attempt matched\";\n Auth::login($registered);\n }else{\n echo \"auth attempt not matched\";\n $row = new User;\n $row->email = $user->email;\n // $row->avatar = $user->avatar;\n $row->name = $user->name;\n $row->save();\n }\n echo Auth::user()->name;\n\n $user->token;\n dump($user);\n die();\n\n }", "private function requestToken() \n {\n $requestUrl = $this->configuration->getBaseUrl() . \"connect/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->configuration->getClientId() . \"&client_secret=\" . $this->configuration->getClientSecret();\n $headers = [];\n $headers['Content-Type'] = \"application/x-www-form-urlencoded\";\n $headers['Content-Length'] = strlen($postData);\n $response = $this->client->send(new Request('POST', $requestUrl, $headers, $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->configuration->setAccessToken($result[\"access_token\"]);\n }", "public function readToken() {}", "abstract public function getAuthToken();", "public function handleProviderCallback()\n {\n// $googleInfo = Socialite::driver('google')->user();\n $facebookInfo = Socialite::driver('facebook')->user();\n return $facebookInfo->getEmail(); //Returns the email id of an user\n\n // $user->token;\n }", "public function handleProviderCallback( $provider ) {\n\n\t\t$user = Socialite::driver( $provider )->user();\n\t\t$authUser = $this->findOrCreateUser( $user, $provider );\n\t\tAuth::login($authUser, true);\n\t\t// Creating a token without scopes...\n\t\t$token = $authUser->createToken('Token Name')->accessToken;\n\t\theader(\"Location: \" . env('FRONTEND_URL') .\"/main/templates/create?type=iframe&code=\" . $token);\n\t\texit();\n\t}", "private function tokenHandler()\n {\n // Prevent for infinite loop.\n // Because this method use post method to get JWT. And POST method also call this method itself.\n if (!$this->verifyToken) {\n return;\n }\n\n $this->checkConfiguration();\n\n $cachedJWT = $this->cache->getItem('jwt');\n\n if (!$cachedJWT->isHit()) { // Check JWT presence.\n $this->verifyToken = false;\n\n $this->cacheJsonWebToken($cachedJWT);\n\n $this->verifyToken = true;\n }\n\n if ($this->isTokenExpired($cachedJWT->get())) { // Check JWT expired.\n $this->verifyToken = false;\n\n $this->cacheJsonWebToken($cachedJWT);\n\n $this->verifyToken = true;\n\n }\n\n // Save JWT\n $this->jwt = $cachedJWT->get();\n }", "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n\n\n }", "public function dataProviderForgenerateTrustedPropertiesToken() {}", "private function use_token()\n\t\t{\n\t\t\tif (!isset($_COOKIE['auth_token']) || isset($_SESSION['token_used']))\n\t\t\t\treturn false;\n\n\t\t\t$_SESSION['token_used'] = true;\n\t\t\t$token = explode(';', $_COOKIE['auth_token']);\n\t\t\t$user = $this->users->getUser(null, null, $token[0]);\n\n\t\t\tif (!$user)\n\t\t\t\treturn false;\n\n\t\t\tswitch($this->token_validate($user, $token))\n\t\t\t{\n\t\t\t\tcase -1:\n\t\t\t\t\treturn false;\n\n\t\t\t\tcase 0:\n\t\t\t\t\t$this->grant_token($user, $this->get_token($user));\n\t\t\t\t\t$_SESSION['verified'] = false;\n\t\t\t\t\t$_SESSION['userid'] = $user->id;\n\t\t\t\t\t$_SESSION['state'] = $this->multifactor ? AUTH_MULTIFACTOR : AUTH_NONE;\n\t\t\t\t\treturn $user;\n\n\t\t\t\tcase 1:\n\t\t\t\t\t$_SESSION['verified'] = true;\n\t\t\t\t\t$_SESSION['userid'] = $user->id;\n\t\t\t\t\t$_SESSION['state'] = $this->users->getState($user);\n\t\t\t\t\treturn $user;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function run()\n {\n $accessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzMjkiLCJqdGkiOiI5NDdjODdlMWI0MTU1N2Q1NzRiMmIzOTgzM2ViZWJjZWY3NjZmZTA3Yjc5NjllYTI3NTc1NTgwNTYzNTBlOGUyMjBlMDhhZTA0ZjhlYzM3MyIsImlhdCI6MTYyNTI0MjM0MywibmJmIjoxNjI1MjQyMzQzLCJleHAiOjE2NTY3NzgzNDMsInN1YiI6IjE0NjEiLCJzY29wZXMiOltdfQ.RjIAPcd6oSptTTKM0HhDIp8vA_xqhI5iccoxw1whZRvCzYHVii-WHiHU3JwRQDtJXKzRheqqcioUKkpoHH2SZQ1biWX0S5mqmunITFLoIHXhi61YYp4ctvlfvxud-9EGeQ4agqLazGDwxgCAwbo5dJRhvSX_SLcq0XLIdHU-_WqYXyb1Cy7vejsfR2Tx26vDqKsneHOiOTji7RT8TRg0Ej222WivgfBfcB-FzKPlFoKp6kYoSeLBvd5hZLERzFjfeWDVd38S4zxTFoSZH6Sg-WqZ5s3472CJ36_zWsh3R3Ebu0S7s-0uriCkdrVlzNY1xZABkVAedd-JyNgmKgA-zVb4AsNUXOqKJ-S7Nn3uVZmdbBWYjMPJBomsjt3xSSP4zq3-aJGJabG-GMvzWSGMxBDQeYlzFy_B3JLK0ZWaWLFN8eLJsHuHhF2zjypcPZkOajuQvrXNSFgm69_x57SSveM0eFkcbcvYzfHDcw6EvBrwPcvGE9RDajqBz3_So57WJRx2P_S7DJm64O_1m53AsmJz34MQxwCcDSUc7ZKwEX8mRRcu2RjWWoCLvOtA3mWx7v8nuREKXweBeHgSoPwXAJLIlsLT0yWVT603mseTVZ1MDSdtr46demlr_FGwqsKHyu5Fz54SBMpUEsqD3qIkFDT4VMc6Ge8v3ll_WVRui3M';\n\n $client = new ClientGuzzle([\n 'headers' => [\n 'Accept' => 'application/json',\n 'Authorization' => 'Bearer '.$accessToken,\n 'Content-Type' => 'application/json'\n ],\n ]);\n\n $response = $client->get('https://www.lioren.cl/api/ciudades');\n $responseBody = json_decode((string) $response->getBody(), true);\n foreach($responseBody as $ciudad){\n Ciudad::create([\n 'nombre' => $ciudad['nombre'],\n 'codigo' => $ciudad['id'],\n ]);\n }\n }", "public function getProvider()\n {\n return $this->tokens;\n }", "public function refreshToken()\n {\n $token = $this->getToken();\n }", "protected function getTokenUrl()\n {\n return 'https://auth.kodular.io/oska/access_token';\n }", "public function gettoken()\n{\n if (isset($_GET['code'])) {\n // Check that state matches\n if (isset($_GET['state']) && isset($_SESSION['oauth_state'])) {\n if (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth_state'])) {\n exit('State provided in redirect does not match expected value.');\n } \n // Clear saved state\n unset($_SESSION['oauth_state']); \n }\n\n // Initialize the OAuth client\n $oauthClient = new \\League\\OAuth2\\Client\\Provider\\GenericProvider([\n 'clientId' => $this->config->item('OAUTH_APP_ID'),\n 'clientSecret' => $this->config->item('OAUTH_APP_PASSWORD'),\n 'redirectUri' => $this->config->item('OAUTH_REDIRECT_URI'),\n 'urlAuthorize' => $this->config->item('OAUTH_AUTHORITY').$this->config->item('OAUTH_AUTHORIZE_ENDPOINT'),\n 'urlAccessToken' => $this->config->item('OAUTH_AUTHORITY').$this->config->item('OAUTH_TOKEN_ENDPOINT'),\n 'urlResourceOwnerDetails' => '',\n 'scopes' => $this->config->item('OAUTH_SCOPES')\n ]);\n\n try {\n\n // Make the token request\n $accessToken = $oauthClient->getAccessToken('authorization_code', [\n 'code' => $_GET['code']\n ]);\n\n //echo 'Access token: '.$accessToken->getToken();\n return $accessToken->getToken();\n }\n catch (League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException $e) {\n exit('ERROR getting tokens: '.$e->getMessage());\n }\n exit();\n }\n elseif (isset($_GET['error'])) {\n exit('ERROR: '.$_GET['error'].' - '.$_GET['error_description']);\n }\n}", "public function getPartnerRequestToken()\n {\n $uri = $this->urlRequestToken();\n\n $client = $this->createHttpClient();\n\n $header = $this->temporaryPartnerRequestTokenProtocolHeader($uri);\n $authorizationHeader = array('Authorization' => $header);\n $headers = $this->buildHttpClientHeaders($authorizationHeader);\n\n //echo '<br/>'.$uri;\n //var_dump($headers);\n\n try {\n $response = $client->post($uri, $headers)->send();\n } catch (BadResponseException $e) {\n return $this->handleTemporaryCredentialsBadResponse($e);\n }\n\n $body = $response->getBody();\n //$resp = $this->createTemporaryCredentials($response->getBody());\n parse_str($body, $data);\n //echo \"dump data\";\n //var_dump($data);\n\n $oauth_token = $data['oauth_token'];\n $oauth_token_secret = $data['oauth_token_secret'];\n //echo 'DECODE<br/>';\n //echo \"oauth_token: \" . $oauth_token.'<br/>';\n //echo \"oauth_secret\" . $oauth_token_secret.'<br/>';\n\n\n\n //////////////////////////////\n $uri = $this->urlAccessToken();\n\n $client = $this->createHttpClient();\n\n $credentials = $this->createClientCredentials(['identifier' => $oauth_token, 'secret' => $oauth_token_secret]);\n\n $header = $this->temporaryPartnerAccessTokenProtocolHeader($uri, $credentials);\n $authorizationHeader = array('Authorization' => $header);\n $headers = $this->buildHttpClientHeaders($authorizationHeader);\n\n //echo '<br/>'.$uri;\n //var_dump($headers);\n\n try {\n $response = $client->post($uri, $headers)->send();\n } catch (BadResponseException $e) {\n //var_dump($e);\n //exit;\n return $this->handleTemporaryCredentialsBadResponse($e);\n }\n\n $body = $response->getBody();\n //$resp = $this->createTemporaryCredentials($response->getBody());\n parse_str($body, $data);\n $oauth_token = $data['oauth_token'];\n $oauth_token_secret = $data['oauth_token_secret'];\n\n //echo \"final:<br/>\";\n //var_dump($data);\n $resp = $data;\n\n return $resp;\n }", "public function handleProviderCallback()\n {\n if( request()->get('code') ) {\n $vkuser = Socialite::driver('vkontakte')->user();\n $user_id = $vkuser->getId();\n $idUser = User::where('vk_id', $user_id)->first();\n if (!$idUser) {\n $newUser = new User();\n $newUser->vk_id = $user_id;\n $newUser->first_name = $vkuser->user['first_name'];\n $newUser->last_name = $vkuser->user['last_name'];\n $newUser->email = $vkuser->accessTokenResponseBody['email'];\n $newUser->access_role = User::DONOR;\n\n //лажа по получению фотки с большим разрешением\n $request_params = array(\n 'user_id' => $user_id,\n 'fields' => 'photo_200',\n 'v' => '5.52',\n 'access_token' => $vkuser->token\n );\n $get_params = http_build_query($request_params);\n $result = json_decode(file_get_contents('https://api.vk.com/method/users.get?'. $get_params));\n $newUser->avatar = $result->response[0]->photo_200;\n\n $newUser->save();\n Auth::login($newUser, true);\n\n $donor = new Donor();\n $donor->id = $newUser->id;\n\n } else Auth::login($idUser, true);\n\n // return redirect()->route('profile', $idUser->getQueueableId());\n return redirect()->route('donor.profile');\n }\n return redirect()->route('donor.profile');\n }", "function loadToken() {\r\n\t\treturn isset($_SESSION['token']) ? $_SESSION['token'] : null;\r\n\t}", "public function ensureToken()\n {\n if ($this->tokenExpiry === null) {\n $this->regenerateToken();\n }\n }", "public function load_token() {\n \n \n global $cfg;\n\n $db = new PDO(\"mysql:host={$cfg->db_host};dbname={$cfg->db_name}\", $cfg->db_user, $cfg->db_password);\n \n\n // look for an existing token\n\n if (isset($cfg->oauth_token)) {\n $this->access_token = $cfg->oauth_token;\n $this->webhookurl = $cfg->app_webhook;\n return TRUE;\n }\n\n $stmt = $db->prepare(\"SELECT * FROM tokenstore WHERE teamid = ?\");\n $stmt->bindParam(1, $this->teamid);\n\n if ($stmt->execute()) {\n $token = $stmt->fetchAll();\n $this->access_token = openssl_decrypt($token[0]['oauth_token'], $cfg->enctype, $cfg->salt, $cfg->salt);\n $this->app_id = $token[0]['app_id'];\n $this->app_user_id = $token[0]['app_user_id'];\n $this->installer_user_id = $token[0]['installer_user_id'];\n $this->webhookurl = isset($token[0]['webhook_url']) ? $token[0]['webhook_url'] : $cfg->app_webhook;\n \n return TRUE; \n }\n\n return FALSE;\n\n\n }", "public function testSendVerificationTokenGet()\n {\n }", "public function init()\n {\n $this->accessToken = 'EAAPgIZBacbTMBAJnVjjmoOW3tjZClqcJDUP3NZB5Dbi72zA2Ix8tE5qviZAE4BF3UqluxlZCLAOnlqe0WYeTXGZBTesuyGPQXb7iPZAC2qOWnX376GvrvZAiO34bcEJ7TYyPqgqV2uLZAkvHD8DkjuPZC7OEpS91ydHnNXbEPpclLSQQZDZD';\n }", "function authGet() { }", "function gen_token()\n\t{\n\t\t$ci = get_instance()->load->helper('myencrypt');\n\t\treturn create_token();\n\t}", "abstract protected function retrieveSessionToken() ;", "public function getTokenUrl();", "protected function verify_token()\n {\n // lookup API Key record by value from HTTP header\n if (isset($this->rest->key) && is_null($this->rest->key)) {\n $key = $this->input->get_request_header(config_item('rest_key_name'));\n if (is_null($key)) {\n $key = $this->input->get_post('Token');\n }\n if (is_null($key)) {\n return;\n }\n $this->mApiKey = $this->api_keys->get_by(config_item('rest_key_column'), $key);\n if (!is_null($this->mApiKey)) {\n $this->rest->key = $this->mApiKey->{config_item('rest_key_column')};\n\n isset($this->mApiKey->user_id) && $this->rest->user_id = $this->mApiKey->user_id;\n isset($this->mApiKey->level) && $this->rest->level = $this->mApiKey->level;\n isset($this->mApiKey->ignore_limits) && $this->rest->ignore_limits = $this->mApiKey->ignore_limits;\n\n $this->_apiuser = $this->mApiKey;\n }\n\n } else {\n $this->mApiKey = $this->_apiuser;\n }\n\n if (!empty($this->mApiKey)) {\n $this->mUser = $this->users->get_by('username', $this->mApiKey->user_id);\n // only when the API Key represents a user\n if (!empty($this->mUser)) {\n $this->mUserRoles = $this->i2_auth->get_user_roles($this->mUser->id);\n// $this->mUserTenant = $this->users->get_user_tenant($this->mUser->id);\n $this->mUserTenant = $this->i2_auth->get_user_tenant($this->mUser->id);\n $this->tenant_table_prefix = $this->mUserTenant->tenant_name;\n $this->set_t_prefix();\n $this->mUserMainRole = $this->mUserRoles[0]->name;\n } else {\n // anonymous access via API Key\n $this->mUserMainRole = 'anonymous';\n }\n }\n }", "public function handleProviderCallback($provider)\n {\n \n try {\n $user = $this->userRepository->findOrCreateProvider($this->getProviderUser($provider), $provider);\n } catch (GeneralException $e) {\n return redirect()->route(home_route())->withFlashDanger($e->getMessage());\n }\n\n if (is_null($user)) {\n return redirect()->route(home_route())->withFlashDanger(__('exceptions.frontend.auth.unknown'));\n }\n\n // Check to see if they are active.\n if (! $user->isActive()) {\n throw new GeneralException(__('exceptions.frontend.auth.deactivated'));\n }\n\n // Account approval is on\n if ($user->isPending()) {\n throw new GeneralException(__('exceptions.frontend.auth.confirmation.pending'));\n }\n\n // User has been successfully created or already exists\n auth()->login($user, true);\n\n // Set session variable so we know which provider user is logged in as, if ever needed\n session([config('access.socialite_session_name') => $provider]);\n\n event(new UserLoggedIn(auth()->user()));\n\n $user = User::findorFail(auth()->user()->id);\n $token = $user->createToken('Personal Access Token')->accessToken;\n return response()->json(['status' => 'success', 'socialToken' => $token]);\n\n \n\n // Return to the intended url or default to the class property\n // return redirect()->intended(route(home_route()))->with(['socialToken'=>$token]);\n\n\n\n }", "public function expiredtoken($name){\n $url = $this->Social->RequestNewToken();\n //set some data\n $this->set('name',$name);\n $this->set('url',$url);\n \n }", "public function createNewToken()\n {\n return $this->getBandrek()->generateToken();\n }", "function getToken() {\n $user_agent = $_SERVER[\"HTTP_USER_AGENT\"];\n //Test if it is a shared client\n if (!empty($_SERVER['HTTP_CLIENT_IP'])){\n $ip=$_SERVER['HTTP_CLIENT_IP'];\n //Is it a proxy address\n }elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){\n $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n }else{\n $ip=$_SERVER['REMOTE_ADDR'];\n }\n //echo \"sesion:\" . $_SESSION[\"tokenH\"] . \"client:\" . md5($ip . \":\" . $user_agent); \n return md5($ip . \":\" . $user_agent); \n }", "function new_token_create($billing_first_name,$billing_last_name,$card_no,$month,$year,$cvc,$billing_city,$billing_country,$billing_address_1,$billing_address_2,$billing_state,$billing_email)\n {\n \t\n \ttry {\n \t $token= \\Stripe\\Token::create(array(\n \t\t \"card\" => array(\n\t \"name\" => $billing_first_name. \" \" .$billing_last_name,\n \t\t \"number\" => $card_no,\n \t\t \"exp_month\" => $month,\n \t\t \"exp_year\" => $year,\n \t \"cvc\" => $cvc,\n \t \"address_city\"=> $billing_city,\n \"address_country\"=> $billing_country,\n \"address_line1\"=> $billing_address_1,\n \"address_line2\"=> $billing_address_2,\n \"address_state\"=> $billing_state,\n \t\t \"metadata\" => array(\"customer_email\" => $billing_email),\n \t\t )\n\t\t ));\n\n\t\t} catch(\\Stripe\\Exception\\CardException $e) {\n \n echo 'Status is:' . $e->getHttpStatus() . '\\n';\n echo 'Type is:' . $e->getError()->type . '\\n';\n echo 'Code is:' . $e->getError()->code . '\\n';\n \n echo 'Param is:' . $e->getError()->param . '\\n';\n echo 'Message is:' . $e->getError()->message . '\\n';\n } catch (\\Stripe\\Exception\\RateLimitException $e) {\n \n } catch (\\Stripe\\Exception\\InvalidRequestException $e) {\n \n } catch (\\Stripe\\Exception\\AuthenticationException $e) {\n \n } catch (\\Stripe\\Exception\\ApiConnectionException $e) {\n \n } catch (\\Stripe\\Exception\\ApiErrorException $e) {\n\n } catch (Exception $e) {\n \techo $e;\n \n } \n return $token; \n\t}", "function accessTokenURL() { return 'https://api.twitter.com/oauth/access_token'; }", "protected function request_token() {\r\n\t\t$code = $this->tmhOAuth->request(\r\n\t\t\t'POST',\r\n\t\t\t$this->tmhOAuth->url('oauth/request_token', ''),\r\n\t\t\tarray(\r\n\t\t\t\t'oauth_callback' => SocialHelper::php_self()\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif ($code == 200) {\r\n\t\t\t$_SESSION['oauth'] = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\r\n\t\t\t$this->authorize();\r\n\t\t} else {\r\n\t\t\t$this->addError();\r\n\t\t}\r\n\t}", "abstract protected function getSocialMediaLoginToken(): string;", "abstract protected function getUserByToken($token);", "public function get_request_token($callback);", "private function _getToken()\n {\n $postData = array(\n 'UserApiKey' => $this->username,\n 'SecretKey' => $this->password,\n 'System' => 'joomla_acy_3_5_v_3_0'\n );\n $postString = json_encode($postData);\n\n $ch = curl_init($this->apidomain.$this->getApiTokenUrl());\n curl_setopt(\n $ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json'\n )\n );\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);\n\n $result = curl_exec($ch);\n curl_close($ch);\n\n $response = json_decode($result);\n $resp = false;\n if (is_object($response)) {\n @$IsSuccessful = $response->IsSuccessful;\n if ($IsSuccessful == true) {\n @$TokenKey = $response->TokenKey;\n $resp = $TokenKey;\n } else {\n $resp = false;\n }\n }\n return $resp;\n }", "public function createTokens()\n {\n\n }", "private function tokenInit()\n {\n $tempSession = uniqid();\n echo \"************************************************* MONZO AUTHENTICATION WORKFLOW ***********************************************************\\n\";\n echo \"Please visit the following URL in your browser and follow instructions \\n\";\n echo \"###########\\n\";\n echo \"\\n\";\n echo \"https://auth.monzo.com/?client_id=$this->clientId&redirect_uri=$this->redirectUri&response_type=code&state=$tempSession \\n\";\n echo \"\\n\";\n echo \"###########\\n\";\n echo \"When you get email from Monzo, copy the link button (Right click -> Copy link Location) from the email and paste here. Do not click it. \\n\";\n echo \"*********************************************************************************************************************************************\\n\";\n $verificationUrl = readline(\"Email link: \");\n parse_str(parse_url($verificationUrl, PHP_URL_QUERY) , $urlParams);\n if (array_key_exists('code', $urlParams) && array_key_exists('state', $urlParams))\n {\n if ($urlParams['state'] === $tempSession)\n {\n $data = array(\n 'grant_type' => 'authorization_code',\n 'client_id' => $this->clientId,\n 'client_secret' => $this->clientSecret,\n 'redirect_uri' => $this->redirectUri,\n 'code' => $urlParams['code']\n );\n $tokenData = $this->getJson('/oauth2/token', $data, false);\n if (isset($tokenData['access_token']) && isset($tokenData['refresh_token']))\n {\n $this->bearerToken = $tokenData['access_token'];\n $this->refreshToken = $tokenData['refresh_token'];\n if ($this->validateTokens())\n {\n $this->storeTokens($tokenData['access_token'], $tokenData['refresh_token']);\n }\n else\n {\n syslog(LOG_ERR, \"Monzo: Newly created tokens not valid\");\n throw new Exception('Monzo: Newly created Tokens not valid');\n }\n }\n else\n {\n syslog(LOG_ERR, \"Monzo: Tokens not found\");\n throw new Exception('Monzo: Tokens not found');\n }\n }\n else\n {\n syslog(LOG_ERR, \"Monzo: State does not match the one that was sent to Monzo.\");\n throw new Exception('Monzo: State does not match the one that was sent to Monzo.');\n }\n }\n else\n {\n syslog(LOG_ERR, \"Monzo: Code and State ids not found in the email URL\");\n throw new Exception('Monzo: Code and State ids not found in the email URL');\n }\n }", "public function regenerateToken();" ]
[ "0.7112789", "0.68405384", "0.67412883", "0.67335963", "0.6719355", "0.671025", "0.671025", "0.671025", "0.671025", "0.6708169", "0.6696814", "0.6612021", "0.6595612", "0.6490803", "0.64782923", "0.64050883", "0.640002", "0.6373231", "0.63728666", "0.63728666", "0.63728666", "0.63728666", "0.63628787", "0.6351793", "0.6339986", "0.6328134", "0.63210416", "0.6299601", "0.6249477", "0.6234993", "0.62346166", "0.62212", "0.62041837", "0.62009406", "0.61909425", "0.61866647", "0.6151916", "0.6149588", "0.6148972", "0.6148961", "0.6145126", "0.61336565", "0.61315435", "0.6130012", "0.6102988", "0.60932094", "0.6088673", "0.60864323", "0.60862696", "0.6084575", "0.6083709", "0.60831994", "0.60831994", "0.60779226", "0.60779226", "0.605972", "0.60472107", "0.60434115", "0.6042545", "0.60396063", "0.6030437", "0.6030148", "0.6024448", "0.60184085", "0.6018249", "0.60142094", "0.60127884", "0.60091406", "0.6007004", "0.5998451", "0.5996103", "0.5993012", "0.5992061", "0.5979537", "0.5978765", "0.5977444", "0.59729517", "0.59683084", "0.59655845", "0.5949501", "0.5935216", "0.59348625", "0.5933088", "0.5929724", "0.59071434", "0.59043723", "0.59014314", "0.5898362", "0.5894164", "0.5893332", "0.58881146", "0.5886508", "0.58797276", "0.5878292", "0.5877455", "0.587736", "0.58751345", "0.58687645", "0.58625203", "0.5851546", "0.583865" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request, $media_id) { $request->request->add(['media_id' => $media_id]); $this->validate($request, [ 'user_id' => 'required|exists:users,id', 'media_id' => 'required|exists:media,uuid', 'from' => 'required|numeric', 'to' => 'required|numeric' ]); $media = Media::where('uuid', $request->input('media_id'))->firstOrFail(); $stat = new \App\VideoStatisticRecord(); $stat->user_id = $request->input('user_id'); $stat->media_id = $media->id; $stat->from = $request->input('from'); $stat->to = $request->input('to'); $stat->save(); return $stat; }
{ "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
Get all parts with id's in the list provided
public static function find_by_ids($entity_data, $entity_ids) { $search_results = array(); $entities = call_user_func(array($entity_data['entity_name'], 'find'), $entity_ids); foreach ($entities as $key => $entity) { array_push($search_results, EntityAPIUtils::entity_to_data($entity_data, $entity, false)); } return $search_results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function get_ids();", "public function getIds();", "public function getIds();", "public function getLinesByID($idlist) {\n $mid = 0;\n $results = array();\n $this->stmt_getLinesByID->bindValue(':tid', $this->fileid, PDO::PARAM_INT);\n $this->stmt_getLinesByID->bindParam(':mid', $mid, PDO::PARAM_INT);\n foreach ($idlist as $mid) {\n $this->stmt_getLinesByID->execute();\n if ($res = $this->stmt_getLinesByID->fetch(PDO::FETCH_ASSOC)) $results[] = $res;\n }\n return $results;\n }", "public function getAllIds();", "public function getServiceRequestParts($partsIds)\n {\n // return $parts = DB::table('product_parts')\n return $parts = ProductPart::select(DB::raw('group_concat(product_parts.name SEPARATOR \", \") as name'))\n ->join('product_part_service_request', 'product_parts.id', '=', 'product_part_service_request.product_part_id')\n ->whereIn('product_parts.id',$partsIds)\n ->groupBy('product_part_service_request.service_request_id')\n ->get()->first();\n }", "protected function _sub_ids($eq=false) {\n $ret = array();\n $ce = reset($this->ids);\n $cb = key($this->ids);\n $doc = $this->doc();\n foreach($doc->ids as $b => $e) {\n if($b < $cb || !$eq && $b == $cb) continue;\n if($b < $ce) {\n $ret[$b] = $e;\n }\n else {\n $ce = next($this->ids);\n if(!$ce) break; // end of context\n $cb = key($this->ids);\n }\n }\n return $ret;\n }", "public static function getIds($contents)\n { \n $return = [];\n foreach ($contents as $value) \n {\n $return[] = $value->id;\n }\n return $return;\n }", "public function getSimpleList($ids=''){\n\n\n }", "public function getByIds(array $ids);", "public function ids( array $params = array() );", "public function getAllIds(): array;", "public static function listByIds($ids) {\n $condition = array('`id` IN ('.implode(',', $ids).')');\n $start = 0;\n $limit = count($ids);\n $result = DB_Verify_Gems::getList($condition,$start, $limit);\n $list = array();\n foreach($result as $item) {\n $list[$item['id']] = $item;\n }\n return $list;\n }", "public function getItemIds();", "static function get_ids_from_list ($list_video_ids){\r\n\r\n if(empty($list_video_ids)){\r\n return;\r\n }\r\n\r\n $buffy = array();\r\n\r\n //this is needed because we could have more space between each movie id\r\n $remove_spaces = trim(str_replace(array('&nbsp;', ' '),array(''), htmlentities($list_video_ids, ENT_QUOTES)));\r\n\r\n if(!empty($remove_spaces)) {\r\n\r\n $video_id_explode = explode(',', $remove_spaces);\r\n $video_id_explode_map = array_map('trim',$video_id_explode);//extra trim just in case\r\n\r\n //make an array of video id's'\r\n foreach($video_id_explode_map as $video_id) {\r\n $trim_video_id = trim($video_id);\r\n\r\n //check to prevent duplicates id's\r\n if (!in_array($trim_video_id, $buffy)) {\r\n $buffy[] = $trim_video_id;\r\n }\r\n }\r\n }\r\n\r\n return $buffy;\r\n }", "public static function getList($id) {\n $list = R::load('list', $id);\n return $list->id ? $list : null;\n }", "public function parts()\n {\n return $this->identifierParts;\n }", "function automap_filter_by_ids(&$obj, $params = null) {\n if(isset($params['filter_by_ids']) && $params['filter_by_ids'] != '') {\n $allowed_ids = array_flip(explode(',', $params['filter_by_ids']));\n automap_filter_tree($allowed_ids, $obj);\n }\n}", "function getIds( array $Objects );", "public function getObjectIds();", "public function getMulti( $ids ){\n\n // $IdPlaceholders = trim( str_repeat('?,', count($ids) ), ',' );\n\n $ids = join(',', $ids);\n\n $sql = \"\n SELECT\n tc.*,\n tcp.id AS challenge_id,\n tcp.user_id AS challenger_id,\n tcp.img AS challenger_img,\n tcp.joined as joined\n FROM `hotornot-dev`.tblChallenges AS tc\n LEFT JOIN `hotornot-dev`.tblChallengeParticipants AS tcp\n ON tc.id = tcp.challenge_id\n WHERE tc.id IN ( $ids )\n ORDER BY tcp.joined\";\n\n $stmt = $this->prepareAndExecute( $sql );\n\n //$params = array( $ids );\n //$stmt = $this->prepareAndExecute( $sql, $params );\n\n $data = $stmt->fetchAll( PDO::FETCH_CLASS, 'stdClass' );\n }", "public function testGetListOfSpecificIds()\n {\n $itemIds = [];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n\n $search = 'ids:'.implode(',', $itemIds);\n\n $response = $this->api->getList($search);\n $this->assertErrors($response);\n $this->assertEquals(count($itemIds), $response['total']);\n\n foreach ($response['lists'] as $item) {\n $this->assertTrue(in_array($item['id'], $itemIds));\n $this->api->delete($item['id']);\n $this->assertErrors($response);\n }\n }", "public function myFindaIdAll($id) {\n $parameters = array();\n $values = array('a,partial b.{id,nomprojet},partial c.{id,nomUser},partial d.{id,nom,description},f');\n\n $query = $this->createQueryBuilder('a')\n ->select($values)\n ->leftJoin('a.idProjet', 'b')\n ->leftJoin('a.demandeur', 'c')\n ->leftJoin('a.idStatus', 'd')\n ->leftJoin('a.picture', 'f')\n ->addSelect('g')\n //->addSelect('g')\n ->distinct('GroupConcat(g.nom) AS kak')\n ->leftJoin('a.idEnvironnement', 'g')\n ->leftJoin('a.comments', 'h')\n //->addSelect('e')\n ->addSelect('partial e.{id,nomUser}')\n ->distinct('GroupConcat(e.nomUser)')\n ->leftJoin('a.idusers', 'e');\n $query->add('orderBy', 'a.id DESC')\n ->andwhere('a.id = :myid');\n $query->setParameter('myid', $id);\n\n\n return $query->getQuery()->getSingleResult();\n }", "function wp_parse_id_list($input_list)\n {\n }", "function getChilds($id = NULL);", "protected function get_retrieved_ids() {\n $ids = $this->parse_ids($items);\n \n $sidx = $eidx = 0;\n if (is_array($this->page_size)) {\n $sidx = $this->page_size[0];\n $eidx = $this->page_size[1];\n if ($sidx < 0)\n $sidx = 0;\n if ($eidx < $sidx)\n $eidx = $sidx;\n if ($eidx >= count($ids))\n $eidx = count($ids) - 1;\n \n $len = $eidx - $sidx + 1;\n if ($sidx >= count($ids))\n $ids = array();\n else\n $ids = array_slice($ids, $sidx, $len);\n }\n\n list($start_count, $max_count) = $this->get_page_limit($this->page_size);\n $num_to_display = $max_count - $start_count + 1;\n $ids = array_slice($ids, $start_count, $num_to_display);\n\n // This is supposed to come at the end of the retrieval, but I don't know where to put it yet.\n // This is legacy code anyway and is going byebye soon.\n //$output[\"eod\"] = $start_count < $max_count;\n //$output[\"counts\"][\"displayed\"] = $start_count;\n //if (!$output[\"eod\"])\n // $output[\"counts\"][\"displayed\"]--;\n return $ids;\n }", "function &LoadMultipleFromId($ids, $loadProperties = false)\n\t{\n\t\tglobal $gCms, $sql_queries, $debug_errors;\n\t\t$cpt = count($ids);\n\t\t$contents=array();\n\t\tif ($cpt==0) \n\t\t{\n\t\t\treturn $contents;\n\t\t}\n\t\t$config = &$gCms->GetConfig();\n\t\t$db = &$gCms->GetDb();\n\t\t$id_list = '(';\n\t\tfor ($i=0;$i<$cpt;$i++) \n\t\t{\n\t\t\t$id_list .= (int)$ids[$i];\n\t\t\tif ($i<$cpt-1)\n\t\t\t{\n\t\t\t\t$id_list .= ',';\n\t\t\t}\n\t\t}\n\t\t$id_list .= ')';\n\t\tif ($id_list=='()') \n\t\t{\n\t\t return $contents;\n\t\t}\n\t\t$result = false;\n\t\t$query = \"SELECT * FROM \".cms_db_prefix().\"content WHERE content_id IN $id_list\";\n\t\t$rows =& $db->Execute($query);\n\n\t\tif ($rows)\n\t\t{\n\t\t\twhile (isset($rows) && $row = &$rows->FetchRow())\n\t\t\t{\n\t\t\t\tif (in_array($row['type'], array_keys(ContentOperations::ListContentTypes()))) \n\t\t\t\t{\n\t\t\t\t\t$classtype = strtolower($row['type']);\n\t\t\t\t\t$contentobj =& ContentOperations::CreateNewContent($classtype);\n\t\t\t\t\t$contentobj->LoadFromData($row,false);\n\t\t\t\t\t$contents[]=$contentobj;\n\t\t\t\t\t$result = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$rows->Close();\n\t\t}\n\t\tif (!$result)\n\t\t{\n\t\t\tif (true == $config[\"debug\"])\n\t\t\t{\n\t\t\t\t# :TODO: Translate the error message\n\t\t\t\t$debug_errors .= \"<p>Could not retrieve content from db</p>\\n\";\n\t\t\t}\n\t\t}\n\n\t\tif ($result && $loadProperties)\n\t\t{\n\t\t\tforeach ($contents as $content) \n\t\t\t{\n\t\t\t\tif ($content->mPropertiesLoaded == false)\n\t\t\t\t{\n\t\t\t\t\tdebug_buffer(\"load from id is loading properties\");\n\t\t\t\t\t$content->mProperties->Load($content->mId);\n\t\t\t\t\t$content->mPropertiesLoaded = true;\n\t\t\t\t}\n\n\t\t\t\tif (NULL == $content->mProperties)\n\t\t\t\t{\n\t\t\t\t\t$result = false;\n\n\t\t\t\t\t# debug mode\n\t\t\t\t\tif (true == $config[\"debug\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t# :TODO: Translate the error message\n\t\t\t\t\t\t$debug_errors .= \"<p>Could not load properties for content</p>\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach ($contents as $content) \n\t\t{\n\t\t\t$content->Load();\n\t\t}\n\n\t\treturn $contents;\n\t}", "public abstract static function getListID();", "public function findArray($id);", "public function getIdsList() {\n return $this->_get(1);\n }", "public function filterIds(int ...$ids): self;", "public function getParts(Request $request)\n {\n /*$item = \\App\\WorkItem::find($request->get('item'));\n\n if(!is_null($item))\n $res['res'] = $item->parts()->whereNotIn('id', $request->get('selected'))->pluck('part', 'id');\n else\n $res['res'] = null;*/\n if($request->has('selected'))\n $res['res'] = \\App\\Part::whereNotIn('id', $request->get('selected'))\n ->orderBy('part')\n ->pluck('id', 'part');\n else\n $res['res'] = \\App\\Part::orderBy('part')->pluck('id', 'part');\n\n return $res; \n }", "function listByID($id) {\n $select = $this->select();\n $select = $this->select()->where('id = ?', $id);\n $rows = $this->fetchAll($select);\n return $rows->toArray();\n }", "function get_ids($file){\r\n $h1count = preg_match_all('/(id=\"(\\w*)\")/is',$file,$patterns);\r\n $res = array();\r\n array_push($res,$patterns[2]);\r\n array_push($res,count($patterns[2]));\r\n return $res;\r\n}", "public function getList($id)\n {\n $crawler = $this->request('GET', $this->baseUrl.'/list/'.$id);\n $listBy = $crawler->filterXPath('//div[@data-list-id=\"'.$id.'\"]/div[@class=\"byline\"]/a');\n\n $exportFile = $crawler->filterXPath('//div[contains(@class, \"see-more\")]/div[contains(@class, \"create\")]/div[@class=\"export\"]/a')->attr('href');\n $csvExport = file_get_contents($this->baseUrl.$exportFile);\n\n foreach (explode(\"\\n\", $csvExport) as $csvRow) {\n if (!isset($headers)) {\n // first row will ALWAYS be header unless csv is changed\n $headers = str_getcsv($csvRow);\n } elseif ($csvRow) {\n $data = str_getcsv($csvRow);\n foreach ($data as $key => $value) {\n $key = $headers[$key];\n if (in_array($key, $this->listReturnedFields)) {\n $temp[$key] = $value;\n }\n }\n\n if (isset($temp)) {\n $return[] = $temp;\n unset($temp);\n }\n }\n }\n\n return isset($return) ? array(\n 'listby' => $listBy->text(),\n 'list' => $return,\n ) : false;\n }", "private function extractIdsArray($data)\n {\n return array_pluck($data['photoset'], 'id');\n }", "private function selectChildListItemDefinitionIds() {\n\t\ttry {\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"SELECT\tlist_item_definition_id\n\t\t\t\tFROM parent_list_item_definitions\n\t\t\t\tWHERE instance_id = :instId AND parent_list_item_definition_id = :id\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\t$res = array();\n\n\t\t\twhile ($rd = $sth->fetch(\\PDO::FETCH_ASSOC)) {\n\t\t\t\t$id = intval($rd[\"list_item_definition_id\"]);\n\t\t\t\t$res[$id] = (object)array(\"id\" => $id);\n\t\t\t}\n\n\t\t\treturn $res;\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "function get_video_id_list($section_id, $content_id) {\n\n global $data_base;\n\n $request = $data_base->prepare(\"\n SELECT *\n FROM imago_info_video \n WHERE section_id = ?\n AND content_id = ? \n \");\n\n $request->execute(array($section_id, $content_id));\n\n return $request->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getByIds($ids){\r\n\t\t$pfx = $this->c->dbprefix;\r\n\t\t$conn = $this->conn();\r\n\r\n\t\t$sql = \"select\r\n\t\t\tid,type,title,optionlength,\r\n\t\t\toption1,option2,option3,option4,option5,option6,option7,\r\n\t\t\tdescription,cent,id_quiz,id_parent,layout,path_listen\r\n\t\t\t from \".$pfx.\"wls_question where id in (\".$ids.\") or (id_parent !=0 and id_parent in (\".$ids.\")) order by id; \";\r\n\r\n\t\t$res = mysql_query($sql,$conn);\r\n\t\tif($res==false)die($sql);\r\n\t\t$data = array();\r\n\t\twhile($temp = mysql_fetch_assoc($res)){\r\n\t\t\tif($temp==false)die($sql);\r\n\t\t\t$temp['title'] = str_replace(\"__IMAGEPATH__\",$this->c->filePath.\"images/\",$temp['title']);\r\n\t\t\t$data[] = $temp;\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "public function findByIds(array $ids);", "function getByIdsRange(array $ids, Suggestor $suggestor, DataHolder $dataHolder = NULL);", "public function getIds() {\n $sources = array();\n \n $sources[] = $this->id;\n \n foreach ($this->points as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->lines as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->polygons as &$g) {\n $sources[] = $g->id;\n }\n if ( !empty($this->address) ) {\n $sources[] = $this->address->id;\n }\n foreach ($this->relationships as &$r) {\n $sources[] = $r->id;\n }\n \n return array_filter($sources);\n }", "public function getParts(): array\n {\n return $this->parts;\n }", "public function all()\n\t{\n\t\treturn $this->parts;\n\t}", "public function getIdList() {\n migrate_instrument_start(\"Retrieve $this->listUrl\");\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n migrate_instrument_stop(\"Retrieve $this->listUrl\");\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n return $this->getIDsFromJSON($data);\n }\n }\n Migration::displayMessage(t('Loading of !listurl failed:',\n array('!listurl' => $this->listUrl)));\n return NULL;\n }", "static public function getItemIDsFromList($pm_list_name_or_id, $pa_idnos, $pa_options=null) {\n\t\tif(isset($pa_options['dontIncludeSubItems']) && (!isset($pa_options['dont_include_sub_items']) || !$pa_options['dont_include_sub_items'])) { $pa_options['dont_include_sub_items'] = $pa_options['dontIncludeSubItems']; }\n\t \t\n\t\tif (isset($pa_options['dont_include_sub_items']) && $pa_options['dont_include_sub_items']) {\n\t\t\t$pa_options['noChildren'] = true;\n\t\t}\n\t\t$t_list = new ca_lists();\n\t\t$t_item = new ca_list_items();\n\t\t$va_item_ids = array();\n\t\tforeach($pa_idnos as $vs_idno) {\n\t\t\t$vn_item_id = null;\n\t\t\tif (is_numeric($vs_idno)) { \n\t\t\t\t$vn_item_id = (int)$vs_idno; \n\t\t\t} else {\n\t\t\t\t$vn_item_id = (int)$t_list->getItemIDFromList($pm_list_name_or_id, $vs_idno);\n\t\t\t}\n\t\t\t\n\t\t\tif ($vn_item_id && !(isset($pa_options['noChildren']) || $pa_options['noChildren'])) {\n\t\t\t\tif ($qr_children = $t_item->getHierarchy($vn_item_id, array())) {\n\t\t\t\t\twhile($qr_children->nextRow()) {\n\t\t\t\t\t\t$va_item_ids[$qr_children->get('item_id')] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($vn_item_id) {\n\t\t\t\t\t$va_item_ids[$vn_item_id] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn array_keys($va_item_ids);\n\t}", "public function groupIds();", "public function multiple(array $ids): ?ExternalModelListInterface;", "public function getIds()\n {\n\n }", "public function fetchByIds(array $ids);", "function readByIds($ids){\r\n\r\n\t$ids_arr = str_repeat('?,', count($ids) - 1) . '?';\r\n\r\n\t// query to select products\r\n\t$query = \"SELECT id, name, price FROM \" . $this->table_name . \" WHERE id IN ({$ids_arr}) ORDER BY name\";\r\n\r\n\t// prepare query statement\r\n\t$stmt = $this->conn->prepare($query);\r\n\r\n\t// execute query\r\n\t$stmt->execute($ids);\r\n\r\n\t// return values from database\r\n\treturn $stmt;\r\n}", "public static function getPartRowSetsBy($table = null, $typeid = null, $id = null) {\r\n\t\t$partRowSets = NULL;\r\n\t\ttry {\r\n\t\t\t$db = Database::getDB ();\r\n\t\t\t//$query = \"SELECT * FROM :$table WHERE (\";//= :$id)\";\r\n\t\t\t//$query = \"SELECT * FROM harddrives WHERE (hdriveId = $id)\";\r\n\t\t\t//\"harddrives\", \"hdriveId\", \"1hdd05\"\r\n\r\n\t\t\t//if (strcmp($typeid, \"hdriveId\") == 0)\r\n\t\t\t//\t$query = $query.\"hdriveId\";\r\n\t\t\t\r\n\t\t\t//$query = $query.\" = :$id)\";\r\n\t\t\t\r\n\t\t\t//$query = \"SELECT * FROM harddrives WHERE (hdriveId = '1hdd05')\";\r\n\t\t\t$query = \"SELECT * FROM \".$table.\" WHERE (`\".$typeid.\"` = '\".$id.\"')\";\r\n\t\t\t\t\r\n\t\t\t$statement = $db->prepare($query);\r\n\t\t\t//$statement->bindParam(\":$table\", $table);\r\n\t\t\t//$statement->bindParam(\":$typeid\", $typeid);\r\n\t\t\t//$statement->bindParam(\":$id\", $id);\r\n\t\t\t$statement->execute ();\r\n\t\t\t\r\n\t\t\t$partRowSets = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\t$statement->closeCursor ();\r\n\t\t} catch (Exception $e) { // Not permanent error handling\r\n\t\t\techo \"<p>Error getting part rows by $type: \" . $e->getMessage () . \"</p>\";\r\n\t\t}\r\n\t\treturn $partRowSets;\r\n\t}", "public function getMultiple($_ids, $_containerIds = NULL) {\n }", "public function parts(){\n\t\t$parts = array();\n\t\tforeach($this->data['parts'] as $index => $part){\n\t\t\t$parts[$part->id] = new Movie($part->id);\n\t\t}\n\t\treturn $parts;\n\t}", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "protected function getItems($id)\n\t{\n\t\t// SELECT aktualnich vazanych zaznamu\n\t\t$list = ORM::factory($this->orm_model)->where('`'.$this->parentColumn.'`='.$id);\n\t\tif(!empty($this->where)) $list->where($this->where);\n\t\tif(!empty($this->order)) $list->orderby($this->order, $this->order_direction);\n\t\treturn $list->find_all();\n\t}", "public function getByIds($ids)\n {\n $sql = \"SELECT * FROM `%s` WHERE `%s` IN (%s)\";\n $array = array_fill(0, count($ids), \"?\");\n $places = implode(\",\", $array);\n $this->_sql[] = sprintf($sql, $this->_table, $this->_key, $places);\n\n $parameters = array();\n foreach ($ids as $id) {\n $parameters[] = array($this->_key => $id);\n }\n $this->_parameters[] = $this->parameterize($parameters);\n }", "static function idsFromPhotos($photos) {\n $ids = array();\n foreach ($photos as $photo) {\n $ids[] = $photo->getId();\n }\n return $ids;\n }", "private function extractIds($models)\n {\n $ids = [];\n foreach($models as $model){\n $ids[] = $model->id;\n }\n return $ids;\n }", "function idaho_webmaster_get_children_ids( $id, $items ) {\n\n\t\t$ids = wp_filter_object_list( $items, array( 'menu_item_parent' => $id ), 'and', 'ID' );\n\n\t\tforeach ( $ids as $id ) {\n\t\t\t$ids = array_merge( $ids, idaho_webmaster_get_children_ids( $id, $items ) );\n\t\t}\n\n\t\treturn $ids;\n\t}", "function listarPorId($id){\r\n\t\t$sql = 'CALL sp_se_idioma(\"AND u.id = '.$id.'\"); ';\r\n\t\t$arrResultado = $this->getArrayObjs(Conexao::executarSql($sql));\r\n\t\treturn $arrResultado;\r\n\t}", "public function getIngredientes($id) {\n $ingredientesArray = \\app\\models\\Recetasproducto::find()->where(['recetastbl_id' => $id])->all();\n return $ingredientesArray;\n }", "static function findBookList($id1, $id2) {\n $search_book_list = $GLOBALS['DB']->query(\"SELECT * FROM book_list WHERE author_id = {$id1} AND book_id = {$id2}\");\n $found_books = array();\n $found_book = $search_book_list->fetchAll(PDO::FETCH_ASSOC);\n foreach ($found_book as $book){\n $author_id = $book['author_id'];\n $book_id = $book['book_id'];\n $due_date = $book['due_date'];\n $checkout_patron_id = $book['checkout_patron_id'];\n $id = $book['id'];\n $new_book = new BookList($author_id, $book_id, $due_date, $checkout_patron_id, $id);\n array_push($found_books, $new_book);\n }\n return $found_books;\n }", "public function getByIds(array $ids): TaskCollection\n {\n }", "public function ids() {\n\t\t$q = $this->query();\n\t\t$q->select(Salesperson::aliasproperty('id'));\n\t\treturn $q->find()->toArray();\n\t}", "public function getSubdivisionList();", "function get_maps_by_ids ($ids) {\r\n\t\tif (!is_array($ids)) return false;\r\n\t\t$clean = array();\r\n\t\tforeach ($ids as $id) {\r\n\t\t\tif ((int)$id) $clean[] = (int)$id;\r\n\t\t}\r\n\t\tif (empty($clean)) return false;\r\n\t\t$table = $this->get_table_name();\r\n\t\t$maps = $this->wpdb->get_results(\"SELECT * FROM {$table} WHERE id IN(\" . join(',', $clean) . \")\", ARRAY_A);\r\n\t\tif (is_array($maps)) foreach ($maps as $k=>$v) {\r\n\t\t\t$maps[$k] = $this->prepare_map($v);\r\n\t\t}\r\n\t\treturn $maps;\r\n\t}", "function &LoadMultipleFromAlias($ids, $loadProperties = false)\n\t{\n\t\tglobal $gCms, $sql_queries, $debug_errors;\n\t\t$contents=array();\n\t\tif (!is_array($ids) || count($ids) == 0)\n\t\t{\n\t\t\treturn $contents;\n\t\t}\n\t\t$db = &$gCms->GetDb();\n\t\t$config =& $gCms->GetConfig();\n\n\t\t$param_qs = array();\n\t\tfor ($i=0; $i<count($ids); $i++) \n\t\t{\n\t\t\t$param_qs[] = '?';\n\t\t}\n\n\t\t$result = false;\n\t\t$query = \"SELECT * FROM \".cms_db_prefix().\"content WHERE content_alias IN \" . join(', ', $param_qs);\n\t\t$rows =& $db->Execute($query, $ids);\n\n\t\twhile (isset($rows) && $row=&$rows->FetchRow())\n\t\t{\n\t\t\t#Make sure the type exists. If so, instantiate and load\n\t\t\tif (in_array($row['type'], array_keys(ContentOperations::ListContentTypes()))) \n\t\t\t{\n\t\t\t\t$classtype = strtolower($row['type']);\n\t\t\t\t$contentobj =& ContentOperations::CreateNewContent($classtype);\n\t\t\t\t$contentobj->LoadFromData($row,false);\n\t\t\t\t$contents[] =& $contentobj;\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t}\n\n\t\tif ($rows) $rows->Close();\n\n\t\tif (!$result)\n\t\t{\n\t\t\tif (true == $config[\"debug\"])\n\t\t\t{\n\t\t\t\t# :TODO: Translate the error message\n\t\t\t\t$debug_errors .= \"<p>Could not retrieve content from db</p>\\n\";\n\t\t\t}\n\t\t}\n\n\t\tif ($result && $loadProperties)\n\t\t{\n\t\t\tforeach ($contents as $content) \n\t\t\t{\n\t\t\t\tif ($content->mPropertiesLoaded == false)\n\t\t\t\t{\n\t\t\t\t\tdebug_buffer(\"load from id is loading properties\");\n\t\t\t\t\t$content->mProperties->Load($content->mId);\n\t\t\t\t\t$content->mPropertiesLoaded = true;\n\t\t\t\t}\n\n\t\t\t\tif (NULL == $content->mProperties)\n\t\t\t\t{\n\t\t\t\t\t$result = false;\n\n\t\t\t\t\t# debug mode\n\t\t\t\t\tif (true == $config[\"debug\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t# :TODO: Translate the error message\n\t\t\t\t\t\t$debug_errors .= \"<p>Could not load properties for content</p>\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach ($contents as $content) \n\t\t{\n\t\t\t$content->Load();\n\t\t}\n\t\treturn $contents;\n\t}", "function subcategoryIds($id = null, &$ids = []) {\n\tif (is_null ( $id )) {\n\t\t$id = $this->id;\n\t}\n\t\n\t// Find subcategory IDs\n\t$categoryIds = $this->query ()->where ( 'parent_id', $id )->lists ( 'id' );\n\t\n\t// Add each ID to the list and recursively find other subcategory IDs\n\tforeach ( $categoryIds as $categoryId ) {\n\t\t$ids [] = $categoryId;\n\t\t$ids += $this->subcategoryIds ( $categoryId, $ids );\n\t}\n\t\n\treturn $ids;\n}", "function email_get_ids($ids) {\n\t$identities = array();\n\n\tif ( $ids ) {\n\t\tforeach ($ids as $id) {\n\t\t\t$identities[] = $id->id;\n\t\t}\n\t}\n\n\t// Character alfanumeric, becase optional_param clean anothers tags.\n\t$strids = implode('a', $identities);\n\n\treturn $strids;\n}", "public function relatedInsurences($id)\n\t{\n\t\t$dat = $this->database->table(self::TABLE_NAME)->get($id);\n\n\t\t$pole = array();\n\t\tforeach ($dat->related('lek_pojistovny.ID_leku') as $med)\n\t\t\t$pole[] = $med->ID_pojistovny;\n\t\treturn $this->database->table('pojistovny')->where('ID_pojistovny', $pole);\n\t}", "public function testFindAllWithListAttributeValues(): void\n {\n $tree = new Soup('\n <a id=\"1\">1</a>\n <a id=\"2\">2</a>\n <a id=\"3\">3</a>\n <a>No ID.</a>');\n\n $this->assertSelects(['1', '3'], $tree->findAll(id: ['1', '3', '4']));\n }", "public function getReferenceIdsList(){\n return $this->_get(2);\n }", "public static function filter_query_ids( $ids, $params ) {\n $config = self::get_config();\n $page = $config['page'];\n $context = empty( $params['context'] ) ? null : $params['context'];\n\n if ( $context == 'map' && ! empty( $page ) && ! empty( $params['post-id'] ) && $params['post-id'] == $page ) {\n $referer = isset( $_SERVER['HTTP_REFERER'] ) ? esc_attr( $_SERVER['HTTP_REFERER'] ) : null;\n\n if( ! empty( $referer ) ) {\n // Get IDs from the referer URL\n $parts = parse_url( $referer );\n parse_str( $parts['query'], $query );\n $ids = empty( $query['ids'] ) ? array() : esc_attr( $query['ids'] );\n\n if ( ! empty( $ids ) ) {\n $ids = array_map( 'intval', explode( ',', $ids ) );\n return $ids;\n }\n } else {\n // Get IDs from comparison list\n $compare = self::get_comparison_list();\n\n if ( ! empty( $compare ) ) {\n return $compare;\n }\n }\n }\n\n return $ids;\n }", "function get_ids_byAid($aid, $sort=true, $has_keys=false) {\n $ret = self::$_ar_;\n if(!$has_keys) $aid = self::array_select($this->attr_idx, $aid);\n foreach($aid as $aid => $aix) {\n if(!is_array($aix)) $aix =array($aix=>$this->ids[$aix]);\n if(empty($ret)) $ret = $aix;\n else foreach($aix as $id => $e) $ret[$id] = $e;\n }\n if($sort && $ret) ksort($ret);\n return $ret;\n }", "function findPourDefinitionPartie($definitionPartieId) {\n \n $queryTxt = 'SELECT * FROM DefinitionPartie_Pion\r\n WHERE DefinitionPartieId = :id';\r\n $query = self::$db->prepare($queryTxt);\r\n $query->bindValue(':id', $definitionPartieId);\n \r\n $query->setFetchMode(PDO::FETCH_ASSOC);\n $query->execute();\n $listeItems = array();\n // $query contient les id des pions a creer\n foreach($query as $row) {\n $unItem = $this->find(array($row['PionId']));\n if ($unItem <> null) {\n $listeItems[] = $unItem;\n }\n }\n return $listeItems;\n }", "public function getExcludedIds();", "public function index($id, $id_part, $id_match)\n {\n //\n }", "function get_all_specialities($obj, $idlist=array())\n{\n\tif(!empty($idlist))\n\t{\n\t\t$condition = \" categorystamp IN ('\".implode(\"','\", $idlist).\"') \";\n\t}\n\telse\n\t{\n\t\t$condition = \" 1=1 \";\n\t}\n\t$speciality_result = $obj->db->query($obj->Query_reader->get_query_by_code('get_speciality_list', array('condition'=>$condition)));\n\treturn $speciality_result->result_array();\n}", "public function fetchParts( $filter = null, $includeDigests = false )\n {\n $context = new ezcMailPartWalkContext( array( __CLASS__, 'collectPart' ) );\n $context->includeDigests = $includeDigests;\n $context->filter = $filter;\n $context->level = 0;\n $this->walkParts( $context, $this );\n return $context->getParts();\n }", "public function getIdentifiers();", "private function searchById($id){\n \n $searchResults = null;\n $items = $this->items;\n if(strlen(trim($id)) == 0 ) return $searchResults;\n \n foreach($items as $item){\n if($item->id == $id){\n $searchResults[] = $item;\n } \n }\n \n return $searchResults;\n \n }", "public function get_ids($objs)\n {\n $ids = array();\n foreach ($objs as $obj) {\n if ($obj->id) {\n array_push($ids, $obj->id);\n }\n }\n return $ids;\n }", "function get_slider_stories($ids){\r\n\r\n\t $res \t\t= '';\r\n\r\n\t $ci \t\t\t= & get_instance();\r\n\r\n\t $comma_id\t= implode(',',$ids); \r\n\r\n \t if(count($ids)>0){\r\n\r\n\t\t\t$ci->db->select('spidypickId, spideyImage, spidyName, headline,story_url, releaseDate');\r\n\r\n\t\t\t$ci->db->where_in('spidypickId',$ids);\r\n\r\n\t\t\t$ci->db->where(array('status'=>'1'));\r\n\r\n\t\t\t$ci -> db -> order_by(\"FIELD ( spidypickId, $comma_id )\", '', FALSE);\r\n\r\n\t\t\t$res \t\t= $ci->db->get(\"spidypick\")->result_array();// echo '***'.$ci->db->last_query();exit();\r\n\r\n \t }\r\n\r\n \t return $res;\r\n\r\n}", "public function getListId();", "public function getChildIds($all=false, $milestones = 0)\n\t{\n\t\t$childProjects = $this->getProjects($all, $milestones);\n\t\t// go through and build an 'in' clause from all child projects\t\n\t\t\n\t\t$ids = array();\n\t\tforeach ($childProjects as $project) {\n\t\t\t$ids[] = $project->id;\n\t\t}\n\t\treturn $ids;\n\t}", "public function getList($ids=null, $order_by = null, $order = null, $limit = null) {\r\n\t\t\r\n\t\t$query = \"SELECT * FROM $this->att\";\r\n\t\t\t\r\n\t\tif(count($ids) != 0) {\r\n\t\t\t\r\n\t\t\t$query .= \" WHERE \";\r\n\t\t\t\r\n\t\t\twhile (list($ind, $val) = each($ids)) {\r\n\t\t\t\t\r\n\t\t\t\tif($ind != 0) $query .= \" OR \";\r\n\t\t\t\tif($val != \"\") $query .= \" $this->att.attachment_id = $val\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t}\t\r\n\t\t\t\t\t\r\n\t\tif($order_by != null && $order != null) $query .= \" ORDER BY \" . $order_by . \" $order\";\r\n\t\t\r\n\t\tif($limit != null) $query .= \" LIMIT \" . $limit;\t\t\t\r\n\t\t\t\t\t\r\n\t\treturn $this->executeQuery($query);\r\n\t\t\t\t\r\n\t}", "protected function _fetch_object_id_list($group_id, $only_first = false)\r\n {\r\n if (is_null($this->_content_type_id) OR 0 == (int) $group_id)\r\n {\r\n return false;\r\n }\r\n\r\n $indexes = implode(\",\", vBSphinxSearch_Core::get_sphinx_index_map($this->_content_type_id));\r\n if (empty($indexes))\r\n {\r\n return false;\r\n }\r\n\r\n $limit = vBSphinxSearch_Core::SPH_DEFAULT_RESULTS_LIMIT;\r\n \r\n $query = 'SELECT *\r\n FROM \r\n ' . $indexes . '\r\n WHERE\r\n contenttypeid = ' . $this->_content_type_id . ' AND\r\n groupid = ' . $group_id . ($only_first ? ' AND isfirst = 1' : '') . '\r\n LIMIT ' . $limit . ' OPTION max_matches=' . $limit;\r\n\r\n $this->_id_list = array();\r\n for ($i = 0; $i < vBSphinxSearch_Core::SPH_RECONNECT_LIMIT; $i++)\r\n {\r\n $con = vBSphinxSearch_Core::get_sphinxql_conection();\r\n if (false != $con)\r\n {\r\n $result_res = mysql_query($query, $con);\r\n if ($result_res)\r\n {\r\n while ($docinfo = mysql_fetch_assoc($result_res))\r\n {\r\n $this->_id_list[] = $docinfo['primaryid'];\r\n }\r\n return true;\r\n }\r\n }\r\n }\r\n $error = mysql_error();\r\n $message = \"\\n\\nSphinx: Can't get primaryid list for groupid=$group_id\\nUsed indexes: $indexes\\n Error:\\n$error\\n\";\r\n vBSphinxSearch_Core::log_errors($message);\r\n\r\n return false;\r\n }", "public function getParts()\n {\n return $this->parts;\n }", "public function getParts()\n {\n return $this->parts;\n }", "function _get_selected_entry_ids($playa_data)\n\t{\n\t\tglobal $DB;\n\n\t\t$selected_entry_ids = array();\n\n\t\t$rel_ids = $this->_get_rel_ids($playa_data);\n\t\tif (count($rel_ids))\n\t\t{\n\t\t\t$rels = $DB->query('SELECT rel_id, rel_child_id\n\t\t\t FROM exp_relationships\n\t\t\t WHERE rel_id IN ('.implode(',', $rel_ids).')');\n\n\t\t\tif ($rels->num_rows)\n\t\t\t{\n\t\t\t\t$selected_entry_ids_by_rel_id = array();\n\n\t\t\t\tforeach($rels->result as $rel)\n\t\t\t\t{\n\t\t\t\t\t$selected_entry_ids_by_rel_id[$rel['rel_id']] = $rel['rel_child_id'];\n\t\t\t\t}\n\n\t\t\t\tforeach($rel_ids as $rel_id)\n\t\t\t\t{\n\t\t\t\t\tif (array_key_exists($rel_id, $selected_entry_ids_by_rel_id))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected_entry_ids[] = $selected_entry_ids_by_rel_id[$rel_id];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $selected_entry_ids;\n\t}", "public function getParts()\n\t{\n\t\treturn $this->parts;\n\t}", "function subtree_ids($id) {\n\t\t// zjistim idcka kategorii v podstromu\n\t\t$category_ids = $this->children($id);\n\t\t$category_ids = Set::extract('/Category/id', $category_ids);\n\t\t\n\t\t$category_ids[] = $id;\n\t\t\n\t\treturn $category_ids;\n\t}", "private function selectParentListItemDefinitionIds() {\n\t\ttry {\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"SELECT\tparent_list_item_definition_id\n\t\t\t\tFROM parent_list_item_definitions\n\t\t\t\tWHERE instance_id = :instId AND list_item_definition_id = :id\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\t$res = array();\n\n\t\t\twhile ($rd = $sth->fetch(\\PDO::FETCH_ASSOC)) {\n\t\t\t\t$id = intval($rd[\"parent_list_item_definition_id\"]);\n\t\t\t\t$res[$id] = (object)array(\"id\" => $id);\n\t\t\t}\n\n\t\t\treturn $res;\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}" ]
[ "0.64211637", "0.6004124", "0.6004124", "0.59873", "0.583833", "0.5833695", "0.5796205", "0.573125", "0.57001585", "0.5693698", "0.56521666", "0.56065035", "0.5601299", "0.559823", "0.558715", "0.55368316", "0.552551", "0.55111474", "0.54915637", "0.5477433", "0.54038537", "0.53893113", "0.5387434", "0.5380656", "0.53492033", "0.5342318", "0.5340191", "0.5339241", "0.5335551", "0.5334555", "0.5333598", "0.5332176", "0.5321649", "0.53033906", "0.5302886", "0.5300783", "0.5279195", "0.52728665", "0.5259126", "0.5239222", "0.52056026", "0.5194496", "0.51707757", "0.5163435", "0.51594067", "0.514363", "0.5123714", "0.51221037", "0.51144177", "0.5102753", "0.51012295", "0.5095524", "0.5090907", "0.508506", "0.5078746", "0.5078746", "0.5078746", "0.5078746", "0.5078746", "0.5078746", "0.5078746", "0.5078746", "0.50735205", "0.50708", "0.50610834", "0.5053538", "0.5041896", "0.5041868", "0.5039932", "0.5038711", "0.50310105", "0.5026186", "0.5020546", "0.50134164", "0.501012", "0.50067335", "0.5006446", "0.50057995", "0.50054675", "0.50024825", "0.49953336", "0.49949303", "0.4994856", "0.4993752", "0.4990283", "0.498058", "0.49790695", "0.49715528", "0.4966796", "0.49590415", "0.49550572", "0.49542764", "0.49513632", "0.49489796", "0.4946677", "0.49446383", "0.49446383", "0.49405012", "0.4938438", "0.49254027", "0.4919345" ]
0.0
-1
Get all parts with id's in the list provided
public static function find_all($entity_data) { $search_results = array(); $entities = call_user_func(array($entity_data['entity_name'], 'all')); foreach ($entities as $key => $entity) { $entity_data = EntityAPIUtils::entity_to_data($entity_data, $entity, false); array_push($search_results, $entity_data); } return $search_results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function get_ids();", "public function getIds();", "public function getIds();", "public function getLinesByID($idlist) {\n $mid = 0;\n $results = array();\n $this->stmt_getLinesByID->bindValue(':tid', $this->fileid, PDO::PARAM_INT);\n $this->stmt_getLinesByID->bindParam(':mid', $mid, PDO::PARAM_INT);\n foreach ($idlist as $mid) {\n $this->stmt_getLinesByID->execute();\n if ($res = $this->stmt_getLinesByID->fetch(PDO::FETCH_ASSOC)) $results[] = $res;\n }\n return $results;\n }", "public function getAllIds();", "public function getServiceRequestParts($partsIds)\n {\n // return $parts = DB::table('product_parts')\n return $parts = ProductPart::select(DB::raw('group_concat(product_parts.name SEPARATOR \", \") as name'))\n ->join('product_part_service_request', 'product_parts.id', '=', 'product_part_service_request.product_part_id')\n ->whereIn('product_parts.id',$partsIds)\n ->groupBy('product_part_service_request.service_request_id')\n ->get()->first();\n }", "protected function _sub_ids($eq=false) {\n $ret = array();\n $ce = reset($this->ids);\n $cb = key($this->ids);\n $doc = $this->doc();\n foreach($doc->ids as $b => $e) {\n if($b < $cb || !$eq && $b == $cb) continue;\n if($b < $ce) {\n $ret[$b] = $e;\n }\n else {\n $ce = next($this->ids);\n if(!$ce) break; // end of context\n $cb = key($this->ids);\n }\n }\n return $ret;\n }", "public static function getIds($contents)\n { \n $return = [];\n foreach ($contents as $value) \n {\n $return[] = $value->id;\n }\n return $return;\n }", "public function getSimpleList($ids=''){\n\n\n }", "public function getByIds(array $ids);", "public function ids( array $params = array() );", "public function getAllIds(): array;", "public static function listByIds($ids) {\n $condition = array('`id` IN ('.implode(',', $ids).')');\n $start = 0;\n $limit = count($ids);\n $result = DB_Verify_Gems::getList($condition,$start, $limit);\n $list = array();\n foreach($result as $item) {\n $list[$item['id']] = $item;\n }\n return $list;\n }", "public function getItemIds();", "static function get_ids_from_list ($list_video_ids){\r\n\r\n if(empty($list_video_ids)){\r\n return;\r\n }\r\n\r\n $buffy = array();\r\n\r\n //this is needed because we could have more space between each movie id\r\n $remove_spaces = trim(str_replace(array('&nbsp;', ' '),array(''), htmlentities($list_video_ids, ENT_QUOTES)));\r\n\r\n if(!empty($remove_spaces)) {\r\n\r\n $video_id_explode = explode(',', $remove_spaces);\r\n $video_id_explode_map = array_map('trim',$video_id_explode);//extra trim just in case\r\n\r\n //make an array of video id's'\r\n foreach($video_id_explode_map as $video_id) {\r\n $trim_video_id = trim($video_id);\r\n\r\n //check to prevent duplicates id's\r\n if (!in_array($trim_video_id, $buffy)) {\r\n $buffy[] = $trim_video_id;\r\n }\r\n }\r\n }\r\n\r\n return $buffy;\r\n }", "public static function getList($id) {\n $list = R::load('list', $id);\n return $list->id ? $list : null;\n }", "public function parts()\n {\n return $this->identifierParts;\n }", "function automap_filter_by_ids(&$obj, $params = null) {\n if(isset($params['filter_by_ids']) && $params['filter_by_ids'] != '') {\n $allowed_ids = array_flip(explode(',', $params['filter_by_ids']));\n automap_filter_tree($allowed_ids, $obj);\n }\n}", "function getIds( array $Objects );", "public function getObjectIds();", "public function getMulti( $ids ){\n\n // $IdPlaceholders = trim( str_repeat('?,', count($ids) ), ',' );\n\n $ids = join(',', $ids);\n\n $sql = \"\n SELECT\n tc.*,\n tcp.id AS challenge_id,\n tcp.user_id AS challenger_id,\n tcp.img AS challenger_img,\n tcp.joined as joined\n FROM `hotornot-dev`.tblChallenges AS tc\n LEFT JOIN `hotornot-dev`.tblChallengeParticipants AS tcp\n ON tc.id = tcp.challenge_id\n WHERE tc.id IN ( $ids )\n ORDER BY tcp.joined\";\n\n $stmt = $this->prepareAndExecute( $sql );\n\n //$params = array( $ids );\n //$stmt = $this->prepareAndExecute( $sql, $params );\n\n $data = $stmt->fetchAll( PDO::FETCH_CLASS, 'stdClass' );\n }", "public function myFindaIdAll($id) {\n $parameters = array();\n $values = array('a,partial b.{id,nomprojet},partial c.{id,nomUser},partial d.{id,nom,description},f');\n\n $query = $this->createQueryBuilder('a')\n ->select($values)\n ->leftJoin('a.idProjet', 'b')\n ->leftJoin('a.demandeur', 'c')\n ->leftJoin('a.idStatus', 'd')\n ->leftJoin('a.picture', 'f')\n ->addSelect('g')\n //->addSelect('g')\n ->distinct('GroupConcat(g.nom) AS kak')\n ->leftJoin('a.idEnvironnement', 'g')\n ->leftJoin('a.comments', 'h')\n //->addSelect('e')\n ->addSelect('partial e.{id,nomUser}')\n ->distinct('GroupConcat(e.nomUser)')\n ->leftJoin('a.idusers', 'e');\n $query->add('orderBy', 'a.id DESC')\n ->andwhere('a.id = :myid');\n $query->setParameter('myid', $id);\n\n\n return $query->getQuery()->getSingleResult();\n }", "public function testGetListOfSpecificIds()\n {\n $itemIds = [];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n $response = $this->api->create($this->testPayload);\n $this->assertErrors($response);\n $itemIds[] = $response[$this->api->itemName()]['id'];\n\n $search = 'ids:'.implode(',', $itemIds);\n\n $response = $this->api->getList($search);\n $this->assertErrors($response);\n $this->assertEquals(count($itemIds), $response['total']);\n\n foreach ($response['lists'] as $item) {\n $this->assertTrue(in_array($item['id'], $itemIds));\n $this->api->delete($item['id']);\n $this->assertErrors($response);\n }\n }", "function wp_parse_id_list($input_list)\n {\n }", "function getChilds($id = NULL);", "function &LoadMultipleFromId($ids, $loadProperties = false)\n\t{\n\t\tglobal $gCms, $sql_queries, $debug_errors;\n\t\t$cpt = count($ids);\n\t\t$contents=array();\n\t\tif ($cpt==0) \n\t\t{\n\t\t\treturn $contents;\n\t\t}\n\t\t$config = &$gCms->GetConfig();\n\t\t$db = &$gCms->GetDb();\n\t\t$id_list = '(';\n\t\tfor ($i=0;$i<$cpt;$i++) \n\t\t{\n\t\t\t$id_list .= (int)$ids[$i];\n\t\t\tif ($i<$cpt-1)\n\t\t\t{\n\t\t\t\t$id_list .= ',';\n\t\t\t}\n\t\t}\n\t\t$id_list .= ')';\n\t\tif ($id_list=='()') \n\t\t{\n\t\t return $contents;\n\t\t}\n\t\t$result = false;\n\t\t$query = \"SELECT * FROM \".cms_db_prefix().\"content WHERE content_id IN $id_list\";\n\t\t$rows =& $db->Execute($query);\n\n\t\tif ($rows)\n\t\t{\n\t\t\twhile (isset($rows) && $row = &$rows->FetchRow())\n\t\t\t{\n\t\t\t\tif (in_array($row['type'], array_keys(ContentOperations::ListContentTypes()))) \n\t\t\t\t{\n\t\t\t\t\t$classtype = strtolower($row['type']);\n\t\t\t\t\t$contentobj =& ContentOperations::CreateNewContent($classtype);\n\t\t\t\t\t$contentobj->LoadFromData($row,false);\n\t\t\t\t\t$contents[]=$contentobj;\n\t\t\t\t\t$result = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$rows->Close();\n\t\t}\n\t\tif (!$result)\n\t\t{\n\t\t\tif (true == $config[\"debug\"])\n\t\t\t{\n\t\t\t\t# :TODO: Translate the error message\n\t\t\t\t$debug_errors .= \"<p>Could not retrieve content from db</p>\\n\";\n\t\t\t}\n\t\t}\n\n\t\tif ($result && $loadProperties)\n\t\t{\n\t\t\tforeach ($contents as $content) \n\t\t\t{\n\t\t\t\tif ($content->mPropertiesLoaded == false)\n\t\t\t\t{\n\t\t\t\t\tdebug_buffer(\"load from id is loading properties\");\n\t\t\t\t\t$content->mProperties->Load($content->mId);\n\t\t\t\t\t$content->mPropertiesLoaded = true;\n\t\t\t\t}\n\n\t\t\t\tif (NULL == $content->mProperties)\n\t\t\t\t{\n\t\t\t\t\t$result = false;\n\n\t\t\t\t\t# debug mode\n\t\t\t\t\tif (true == $config[\"debug\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t# :TODO: Translate the error message\n\t\t\t\t\t\t$debug_errors .= \"<p>Could not load properties for content</p>\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach ($contents as $content) \n\t\t{\n\t\t\t$content->Load();\n\t\t}\n\n\t\treturn $contents;\n\t}", "protected function get_retrieved_ids() {\n $ids = $this->parse_ids($items);\n \n $sidx = $eidx = 0;\n if (is_array($this->page_size)) {\n $sidx = $this->page_size[0];\n $eidx = $this->page_size[1];\n if ($sidx < 0)\n $sidx = 0;\n if ($eidx < $sidx)\n $eidx = $sidx;\n if ($eidx >= count($ids))\n $eidx = count($ids) - 1;\n \n $len = $eidx - $sidx + 1;\n if ($sidx >= count($ids))\n $ids = array();\n else\n $ids = array_slice($ids, $sidx, $len);\n }\n\n list($start_count, $max_count) = $this->get_page_limit($this->page_size);\n $num_to_display = $max_count - $start_count + 1;\n $ids = array_slice($ids, $start_count, $num_to_display);\n\n // This is supposed to come at the end of the retrieval, but I don't know where to put it yet.\n // This is legacy code anyway and is going byebye soon.\n //$output[\"eod\"] = $start_count < $max_count;\n //$output[\"counts\"][\"displayed\"] = $start_count;\n //if (!$output[\"eod\"])\n // $output[\"counts\"][\"displayed\"]--;\n return $ids;\n }", "public abstract static function getListID();", "public function findArray($id);", "public function filterIds(int ...$ids): self;", "public function getIdsList() {\n return $this->_get(1);\n }", "public function getParts(Request $request)\n {\n /*$item = \\App\\WorkItem::find($request->get('item'));\n\n if(!is_null($item))\n $res['res'] = $item->parts()->whereNotIn('id', $request->get('selected'))->pluck('part', 'id');\n else\n $res['res'] = null;*/\n if($request->has('selected'))\n $res['res'] = \\App\\Part::whereNotIn('id', $request->get('selected'))\n ->orderBy('part')\n ->pluck('id', 'part');\n else\n $res['res'] = \\App\\Part::orderBy('part')->pluck('id', 'part');\n\n return $res; \n }", "function listByID($id) {\n $select = $this->select();\n $select = $this->select()->where('id = ?', $id);\n $rows = $this->fetchAll($select);\n return $rows->toArray();\n }", "public function getList($id)\n {\n $crawler = $this->request('GET', $this->baseUrl.'/list/'.$id);\n $listBy = $crawler->filterXPath('//div[@data-list-id=\"'.$id.'\"]/div[@class=\"byline\"]/a');\n\n $exportFile = $crawler->filterXPath('//div[contains(@class, \"see-more\")]/div[contains(@class, \"create\")]/div[@class=\"export\"]/a')->attr('href');\n $csvExport = file_get_contents($this->baseUrl.$exportFile);\n\n foreach (explode(\"\\n\", $csvExport) as $csvRow) {\n if (!isset($headers)) {\n // first row will ALWAYS be header unless csv is changed\n $headers = str_getcsv($csvRow);\n } elseif ($csvRow) {\n $data = str_getcsv($csvRow);\n foreach ($data as $key => $value) {\n $key = $headers[$key];\n if (in_array($key, $this->listReturnedFields)) {\n $temp[$key] = $value;\n }\n }\n\n if (isset($temp)) {\n $return[] = $temp;\n unset($temp);\n }\n }\n }\n\n return isset($return) ? array(\n 'listby' => $listBy->text(),\n 'list' => $return,\n ) : false;\n }", "function get_ids($file){\r\n $h1count = preg_match_all('/(id=\"(\\w*)\")/is',$file,$patterns);\r\n $res = array();\r\n array_push($res,$patterns[2]);\r\n array_push($res,count($patterns[2]));\r\n return $res;\r\n}", "private function extractIdsArray($data)\n {\n return array_pluck($data['photoset'], 'id');\n }", "private function selectChildListItemDefinitionIds() {\n\t\ttry {\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"SELECT\tlist_item_definition_id\n\t\t\t\tFROM parent_list_item_definitions\n\t\t\t\tWHERE instance_id = :instId AND parent_list_item_definition_id = :id\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\t$res = array();\n\n\t\t\twhile ($rd = $sth->fetch(\\PDO::FETCH_ASSOC)) {\n\t\t\t\t$id = intval($rd[\"list_item_definition_id\"]);\n\t\t\t\t$res[$id] = (object)array(\"id\" => $id);\n\t\t\t}\n\n\t\t\treturn $res;\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "function get_video_id_list($section_id, $content_id) {\n\n global $data_base;\n\n $request = $data_base->prepare(\"\n SELECT *\n FROM imago_info_video \n WHERE section_id = ?\n AND content_id = ? \n \");\n\n $request->execute(array($section_id, $content_id));\n\n return $request->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getByIds($ids){\r\n\t\t$pfx = $this->c->dbprefix;\r\n\t\t$conn = $this->conn();\r\n\r\n\t\t$sql = \"select\r\n\t\t\tid,type,title,optionlength,\r\n\t\t\toption1,option2,option3,option4,option5,option6,option7,\r\n\t\t\tdescription,cent,id_quiz,id_parent,layout,path_listen\r\n\t\t\t from \".$pfx.\"wls_question where id in (\".$ids.\") or (id_parent !=0 and id_parent in (\".$ids.\")) order by id; \";\r\n\r\n\t\t$res = mysql_query($sql,$conn);\r\n\t\tif($res==false)die($sql);\r\n\t\t$data = array();\r\n\t\twhile($temp = mysql_fetch_assoc($res)){\r\n\t\t\tif($temp==false)die($sql);\r\n\t\t\t$temp['title'] = str_replace(\"__IMAGEPATH__\",$this->c->filePath.\"images/\",$temp['title']);\r\n\t\t\t$data[] = $temp;\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "public function findByIds(array $ids);", "function getByIdsRange(array $ids, Suggestor $suggestor, DataHolder $dataHolder = NULL);", "public function getIds() {\n $sources = array();\n \n $sources[] = $this->id;\n \n foreach ($this->points as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->lines as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->polygons as &$g) {\n $sources[] = $g->id;\n }\n if ( !empty($this->address) ) {\n $sources[] = $this->address->id;\n }\n foreach ($this->relationships as &$r) {\n $sources[] = $r->id;\n }\n \n return array_filter($sources);\n }", "public function getParts(): array\n {\n return $this->parts;\n }", "public function all()\n\t{\n\t\treturn $this->parts;\n\t}", "public function getIdList() {\n migrate_instrument_start(\"Retrieve $this->listUrl\");\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n migrate_instrument_stop(\"Retrieve $this->listUrl\");\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n return $this->getIDsFromJSON($data);\n }\n }\n Migration::displayMessage(t('Loading of !listurl failed:',\n array('!listurl' => $this->listUrl)));\n return NULL;\n }", "static public function getItemIDsFromList($pm_list_name_or_id, $pa_idnos, $pa_options=null) {\n\t\tif(isset($pa_options['dontIncludeSubItems']) && (!isset($pa_options['dont_include_sub_items']) || !$pa_options['dont_include_sub_items'])) { $pa_options['dont_include_sub_items'] = $pa_options['dontIncludeSubItems']; }\n\t \t\n\t\tif (isset($pa_options['dont_include_sub_items']) && $pa_options['dont_include_sub_items']) {\n\t\t\t$pa_options['noChildren'] = true;\n\t\t}\n\t\t$t_list = new ca_lists();\n\t\t$t_item = new ca_list_items();\n\t\t$va_item_ids = array();\n\t\tforeach($pa_idnos as $vs_idno) {\n\t\t\t$vn_item_id = null;\n\t\t\tif (is_numeric($vs_idno)) { \n\t\t\t\t$vn_item_id = (int)$vs_idno; \n\t\t\t} else {\n\t\t\t\t$vn_item_id = (int)$t_list->getItemIDFromList($pm_list_name_or_id, $vs_idno);\n\t\t\t}\n\t\t\t\n\t\t\tif ($vn_item_id && !(isset($pa_options['noChildren']) || $pa_options['noChildren'])) {\n\t\t\t\tif ($qr_children = $t_item->getHierarchy($vn_item_id, array())) {\n\t\t\t\t\twhile($qr_children->nextRow()) {\n\t\t\t\t\t\t$va_item_ids[$qr_children->get('item_id')] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($vn_item_id) {\n\t\t\t\t\t$va_item_ids[$vn_item_id] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn array_keys($va_item_ids);\n\t}", "public function groupIds();", "public function multiple(array $ids): ?ExternalModelListInterface;", "public function getIds()\n {\n\n }", "function readByIds($ids){\r\n\r\n\t$ids_arr = str_repeat('?,', count($ids) - 1) . '?';\r\n\r\n\t// query to select products\r\n\t$query = \"SELECT id, name, price FROM \" . $this->table_name . \" WHERE id IN ({$ids_arr}) ORDER BY name\";\r\n\r\n\t// prepare query statement\r\n\t$stmt = $this->conn->prepare($query);\r\n\r\n\t// execute query\r\n\t$stmt->execute($ids);\r\n\r\n\t// return values from database\r\n\treturn $stmt;\r\n}", "public function fetchByIds(array $ids);", "public static function getPartRowSetsBy($table = null, $typeid = null, $id = null) {\r\n\t\t$partRowSets = NULL;\r\n\t\ttry {\r\n\t\t\t$db = Database::getDB ();\r\n\t\t\t//$query = \"SELECT * FROM :$table WHERE (\";//= :$id)\";\r\n\t\t\t//$query = \"SELECT * FROM harddrives WHERE (hdriveId = $id)\";\r\n\t\t\t//\"harddrives\", \"hdriveId\", \"1hdd05\"\r\n\r\n\t\t\t//if (strcmp($typeid, \"hdriveId\") == 0)\r\n\t\t\t//\t$query = $query.\"hdriveId\";\r\n\t\t\t\r\n\t\t\t//$query = $query.\" = :$id)\";\r\n\t\t\t\r\n\t\t\t//$query = \"SELECT * FROM harddrives WHERE (hdriveId = '1hdd05')\";\r\n\t\t\t$query = \"SELECT * FROM \".$table.\" WHERE (`\".$typeid.\"` = '\".$id.\"')\";\r\n\t\t\t\t\r\n\t\t\t$statement = $db->prepare($query);\r\n\t\t\t//$statement->bindParam(\":$table\", $table);\r\n\t\t\t//$statement->bindParam(\":$typeid\", $typeid);\r\n\t\t\t//$statement->bindParam(\":$id\", $id);\r\n\t\t\t$statement->execute ();\r\n\t\t\t\r\n\t\t\t$partRowSets = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\t$statement->closeCursor ();\r\n\t\t} catch (Exception $e) { // Not permanent error handling\r\n\t\t\techo \"<p>Error getting part rows by $type: \" . $e->getMessage () . \"</p>\";\r\n\t\t}\r\n\t\treturn $partRowSets;\r\n\t}", "public function getMultiple($_ids, $_containerIds = NULL) {\n }", "public function parts(){\n\t\t$parts = array();\n\t\tforeach($this->data['parts'] as $index => $part){\n\t\t\t$parts[$part->id] = new Movie($part->id);\n\t\t}\n\t\treturn $parts;\n\t}", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "protected function getItems($id)\n\t{\n\t\t// SELECT aktualnich vazanych zaznamu\n\t\t$list = ORM::factory($this->orm_model)->where('`'.$this->parentColumn.'`='.$id);\n\t\tif(!empty($this->where)) $list->where($this->where);\n\t\tif(!empty($this->order)) $list->orderby($this->order, $this->order_direction);\n\t\treturn $list->find_all();\n\t}", "public function getByIds($ids)\n {\n $sql = \"SELECT * FROM `%s` WHERE `%s` IN (%s)\";\n $array = array_fill(0, count($ids), \"?\");\n $places = implode(\",\", $array);\n $this->_sql[] = sprintf($sql, $this->_table, $this->_key, $places);\n\n $parameters = array();\n foreach ($ids as $id) {\n $parameters[] = array($this->_key => $id);\n }\n $this->_parameters[] = $this->parameterize($parameters);\n }", "static function idsFromPhotos($photos) {\n $ids = array();\n foreach ($photos as $photo) {\n $ids[] = $photo->getId();\n }\n return $ids;\n }", "private function extractIds($models)\n {\n $ids = [];\n foreach($models as $model){\n $ids[] = $model->id;\n }\n return $ids;\n }", "function listarPorId($id){\r\n\t\t$sql = 'CALL sp_se_idioma(\"AND u.id = '.$id.'\"); ';\r\n\t\t$arrResultado = $this->getArrayObjs(Conexao::executarSql($sql));\r\n\t\treturn $arrResultado;\r\n\t}", "function idaho_webmaster_get_children_ids( $id, $items ) {\n\n\t\t$ids = wp_filter_object_list( $items, array( 'menu_item_parent' => $id ), 'and', 'ID' );\n\n\t\tforeach ( $ids as $id ) {\n\t\t\t$ids = array_merge( $ids, idaho_webmaster_get_children_ids( $id, $items ) );\n\t\t}\n\n\t\treturn $ids;\n\t}", "public function getIngredientes($id) {\n $ingredientesArray = \\app\\models\\Recetasproducto::find()->where(['recetastbl_id' => $id])->all();\n return $ingredientesArray;\n }", "static function findBookList($id1, $id2) {\n $search_book_list = $GLOBALS['DB']->query(\"SELECT * FROM book_list WHERE author_id = {$id1} AND book_id = {$id2}\");\n $found_books = array();\n $found_book = $search_book_list->fetchAll(PDO::FETCH_ASSOC);\n foreach ($found_book as $book){\n $author_id = $book['author_id'];\n $book_id = $book['book_id'];\n $due_date = $book['due_date'];\n $checkout_patron_id = $book['checkout_patron_id'];\n $id = $book['id'];\n $new_book = new BookList($author_id, $book_id, $due_date, $checkout_patron_id, $id);\n array_push($found_books, $new_book);\n }\n return $found_books;\n }", "public function getByIds(array $ids): TaskCollection\n {\n }", "public function ids() {\n\t\t$q = $this->query();\n\t\t$q->select(Salesperson::aliasproperty('id'));\n\t\treturn $q->find()->toArray();\n\t}", "public function getSubdivisionList();", "function get_maps_by_ids ($ids) {\r\n\t\tif (!is_array($ids)) return false;\r\n\t\t$clean = array();\r\n\t\tforeach ($ids as $id) {\r\n\t\t\tif ((int)$id) $clean[] = (int)$id;\r\n\t\t}\r\n\t\tif (empty($clean)) return false;\r\n\t\t$table = $this->get_table_name();\r\n\t\t$maps = $this->wpdb->get_results(\"SELECT * FROM {$table} WHERE id IN(\" . join(',', $clean) . \")\", ARRAY_A);\r\n\t\tif (is_array($maps)) foreach ($maps as $k=>$v) {\r\n\t\t\t$maps[$k] = $this->prepare_map($v);\r\n\t\t}\r\n\t\treturn $maps;\r\n\t}", "function &LoadMultipleFromAlias($ids, $loadProperties = false)\n\t{\n\t\tglobal $gCms, $sql_queries, $debug_errors;\n\t\t$contents=array();\n\t\tif (!is_array($ids) || count($ids) == 0)\n\t\t{\n\t\t\treturn $contents;\n\t\t}\n\t\t$db = &$gCms->GetDb();\n\t\t$config =& $gCms->GetConfig();\n\n\t\t$param_qs = array();\n\t\tfor ($i=0; $i<count($ids); $i++) \n\t\t{\n\t\t\t$param_qs[] = '?';\n\t\t}\n\n\t\t$result = false;\n\t\t$query = \"SELECT * FROM \".cms_db_prefix().\"content WHERE content_alias IN \" . join(', ', $param_qs);\n\t\t$rows =& $db->Execute($query, $ids);\n\n\t\twhile (isset($rows) && $row=&$rows->FetchRow())\n\t\t{\n\t\t\t#Make sure the type exists. If so, instantiate and load\n\t\t\tif (in_array($row['type'], array_keys(ContentOperations::ListContentTypes()))) \n\t\t\t{\n\t\t\t\t$classtype = strtolower($row['type']);\n\t\t\t\t$contentobj =& ContentOperations::CreateNewContent($classtype);\n\t\t\t\t$contentobj->LoadFromData($row,false);\n\t\t\t\t$contents[] =& $contentobj;\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t}\n\n\t\tif ($rows) $rows->Close();\n\n\t\tif (!$result)\n\t\t{\n\t\t\tif (true == $config[\"debug\"])\n\t\t\t{\n\t\t\t\t# :TODO: Translate the error message\n\t\t\t\t$debug_errors .= \"<p>Could not retrieve content from db</p>\\n\";\n\t\t\t}\n\t\t}\n\n\t\tif ($result && $loadProperties)\n\t\t{\n\t\t\tforeach ($contents as $content) \n\t\t\t{\n\t\t\t\tif ($content->mPropertiesLoaded == false)\n\t\t\t\t{\n\t\t\t\t\tdebug_buffer(\"load from id is loading properties\");\n\t\t\t\t\t$content->mProperties->Load($content->mId);\n\t\t\t\t\t$content->mPropertiesLoaded = true;\n\t\t\t\t}\n\n\t\t\t\tif (NULL == $content->mProperties)\n\t\t\t\t{\n\t\t\t\t\t$result = false;\n\n\t\t\t\t\t# debug mode\n\t\t\t\t\tif (true == $config[\"debug\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t# :TODO: Translate the error message\n\t\t\t\t\t\t$debug_errors .= \"<p>Could not load properties for content</p>\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach ($contents as $content) \n\t\t{\n\t\t\t$content->Load();\n\t\t}\n\t\treturn $contents;\n\t}", "function subcategoryIds($id = null, &$ids = []) {\n\tif (is_null ( $id )) {\n\t\t$id = $this->id;\n\t}\n\t\n\t// Find subcategory IDs\n\t$categoryIds = $this->query ()->where ( 'parent_id', $id )->lists ( 'id' );\n\t\n\t// Add each ID to the list and recursively find other subcategory IDs\n\tforeach ( $categoryIds as $categoryId ) {\n\t\t$ids [] = $categoryId;\n\t\t$ids += $this->subcategoryIds ( $categoryId, $ids );\n\t}\n\t\n\treturn $ids;\n}", "public function relatedInsurences($id)\n\t{\n\t\t$dat = $this->database->table(self::TABLE_NAME)->get($id);\n\n\t\t$pole = array();\n\t\tforeach ($dat->related('lek_pojistovny.ID_leku') as $med)\n\t\t\t$pole[] = $med->ID_pojistovny;\n\t\treturn $this->database->table('pojistovny')->where('ID_pojistovny', $pole);\n\t}", "function email_get_ids($ids) {\n\t$identities = array();\n\n\tif ( $ids ) {\n\t\tforeach ($ids as $id) {\n\t\t\t$identities[] = $id->id;\n\t\t}\n\t}\n\n\t// Character alfanumeric, becase optional_param clean anothers tags.\n\t$strids = implode('a', $identities);\n\n\treturn $strids;\n}", "public function testFindAllWithListAttributeValues(): void\n {\n $tree = new Soup('\n <a id=\"1\">1</a>\n <a id=\"2\">2</a>\n <a id=\"3\">3</a>\n <a>No ID.</a>');\n\n $this->assertSelects(['1', '3'], $tree->findAll(id: ['1', '3', '4']));\n }", "public function getReferenceIdsList(){\n return $this->_get(2);\n }", "function get_ids_byAid($aid, $sort=true, $has_keys=false) {\n $ret = self::$_ar_;\n if(!$has_keys) $aid = self::array_select($this->attr_idx, $aid);\n foreach($aid as $aid => $aix) {\n if(!is_array($aix)) $aix =array($aix=>$this->ids[$aix]);\n if(empty($ret)) $ret = $aix;\n else foreach($aix as $id => $e) $ret[$id] = $e;\n }\n if($sort && $ret) ksort($ret);\n return $ret;\n }", "function findPourDefinitionPartie($definitionPartieId) {\n \n $queryTxt = 'SELECT * FROM DefinitionPartie_Pion\r\n WHERE DefinitionPartieId = :id';\r\n $query = self::$db->prepare($queryTxt);\r\n $query->bindValue(':id', $definitionPartieId);\n \r\n $query->setFetchMode(PDO::FETCH_ASSOC);\n $query->execute();\n $listeItems = array();\n // $query contient les id des pions a creer\n foreach($query as $row) {\n $unItem = $this->find(array($row['PionId']));\n if ($unItem <> null) {\n $listeItems[] = $unItem;\n }\n }\n return $listeItems;\n }", "public function index($id, $id_part, $id_match)\n {\n //\n }", "public static function filter_query_ids( $ids, $params ) {\n $config = self::get_config();\n $page = $config['page'];\n $context = empty( $params['context'] ) ? null : $params['context'];\n\n if ( $context == 'map' && ! empty( $page ) && ! empty( $params['post-id'] ) && $params['post-id'] == $page ) {\n $referer = isset( $_SERVER['HTTP_REFERER'] ) ? esc_attr( $_SERVER['HTTP_REFERER'] ) : null;\n\n if( ! empty( $referer ) ) {\n // Get IDs from the referer URL\n $parts = parse_url( $referer );\n parse_str( $parts['query'], $query );\n $ids = empty( $query['ids'] ) ? array() : esc_attr( $query['ids'] );\n\n if ( ! empty( $ids ) ) {\n $ids = array_map( 'intval', explode( ',', $ids ) );\n return $ids;\n }\n } else {\n // Get IDs from comparison list\n $compare = self::get_comparison_list();\n\n if ( ! empty( $compare ) ) {\n return $compare;\n }\n }\n }\n\n return $ids;\n }", "public function getExcludedIds();", "function get_all_specialities($obj, $idlist=array())\n{\n\tif(!empty($idlist))\n\t{\n\t\t$condition = \" categorystamp IN ('\".implode(\"','\", $idlist).\"') \";\n\t}\n\telse\n\t{\n\t\t$condition = \" 1=1 \";\n\t}\n\t$speciality_result = $obj->db->query($obj->Query_reader->get_query_by_code('get_speciality_list', array('condition'=>$condition)));\n\treturn $speciality_result->result_array();\n}", "public function fetchParts( $filter = null, $includeDigests = false )\n {\n $context = new ezcMailPartWalkContext( array( __CLASS__, 'collectPart' ) );\n $context->includeDigests = $includeDigests;\n $context->filter = $filter;\n $context->level = 0;\n $this->walkParts( $context, $this );\n return $context->getParts();\n }", "public function getIdentifiers();", "private function searchById($id){\n \n $searchResults = null;\n $items = $this->items;\n if(strlen(trim($id)) == 0 ) return $searchResults;\n \n foreach($items as $item){\n if($item->id == $id){\n $searchResults[] = $item;\n } \n }\n \n return $searchResults;\n \n }", "public function get_ids($objs)\n {\n $ids = array();\n foreach ($objs as $obj) {\n if ($obj->id) {\n array_push($ids, $obj->id);\n }\n }\n return $ids;\n }", "public function getListId();", "function get_slider_stories($ids){\r\n\r\n\t $res \t\t= '';\r\n\r\n\t $ci \t\t\t= & get_instance();\r\n\r\n\t $comma_id\t= implode(',',$ids); \r\n\r\n \t if(count($ids)>0){\r\n\r\n\t\t\t$ci->db->select('spidypickId, spideyImage, spidyName, headline,story_url, releaseDate');\r\n\r\n\t\t\t$ci->db->where_in('spidypickId',$ids);\r\n\r\n\t\t\t$ci->db->where(array('status'=>'1'));\r\n\r\n\t\t\t$ci -> db -> order_by(\"FIELD ( spidypickId, $comma_id )\", '', FALSE);\r\n\r\n\t\t\t$res \t\t= $ci->db->get(\"spidypick\")->result_array();// echo '***'.$ci->db->last_query();exit();\r\n\r\n \t }\r\n\r\n \t return $res;\r\n\r\n}", "public function getChildIds($all=false, $milestones = 0)\n\t{\n\t\t$childProjects = $this->getProjects($all, $milestones);\n\t\t// go through and build an 'in' clause from all child projects\t\n\t\t\n\t\t$ids = array();\n\t\tforeach ($childProjects as $project) {\n\t\t\t$ids[] = $project->id;\n\t\t}\n\t\treturn $ids;\n\t}", "public function getList($ids=null, $order_by = null, $order = null, $limit = null) {\r\n\t\t\r\n\t\t$query = \"SELECT * FROM $this->att\";\r\n\t\t\t\r\n\t\tif(count($ids) != 0) {\r\n\t\t\t\r\n\t\t\t$query .= \" WHERE \";\r\n\t\t\t\r\n\t\t\twhile (list($ind, $val) = each($ids)) {\r\n\t\t\t\t\r\n\t\t\t\tif($ind != 0) $query .= \" OR \";\r\n\t\t\t\tif($val != \"\") $query .= \" $this->att.attachment_id = $val\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t}\t\r\n\t\t\t\t\t\r\n\t\tif($order_by != null && $order != null) $query .= \" ORDER BY \" . $order_by . \" $order\";\r\n\t\t\r\n\t\tif($limit != null) $query .= \" LIMIT \" . $limit;\t\t\t\r\n\t\t\t\t\t\r\n\t\treturn $this->executeQuery($query);\r\n\t\t\t\t\r\n\t}", "protected function _fetch_object_id_list($group_id, $only_first = false)\r\n {\r\n if (is_null($this->_content_type_id) OR 0 == (int) $group_id)\r\n {\r\n return false;\r\n }\r\n\r\n $indexes = implode(\",\", vBSphinxSearch_Core::get_sphinx_index_map($this->_content_type_id));\r\n if (empty($indexes))\r\n {\r\n return false;\r\n }\r\n\r\n $limit = vBSphinxSearch_Core::SPH_DEFAULT_RESULTS_LIMIT;\r\n \r\n $query = 'SELECT *\r\n FROM \r\n ' . $indexes . '\r\n WHERE\r\n contenttypeid = ' . $this->_content_type_id . ' AND\r\n groupid = ' . $group_id . ($only_first ? ' AND isfirst = 1' : '') . '\r\n LIMIT ' . $limit . ' OPTION max_matches=' . $limit;\r\n\r\n $this->_id_list = array();\r\n for ($i = 0; $i < vBSphinxSearch_Core::SPH_RECONNECT_LIMIT; $i++)\r\n {\r\n $con = vBSphinxSearch_Core::get_sphinxql_conection();\r\n if (false != $con)\r\n {\r\n $result_res = mysql_query($query, $con);\r\n if ($result_res)\r\n {\r\n while ($docinfo = mysql_fetch_assoc($result_res))\r\n {\r\n $this->_id_list[] = $docinfo['primaryid'];\r\n }\r\n return true;\r\n }\r\n }\r\n }\r\n $error = mysql_error();\r\n $message = \"\\n\\nSphinx: Can't get primaryid list for groupid=$group_id\\nUsed indexes: $indexes\\n Error:\\n$error\\n\";\r\n vBSphinxSearch_Core::log_errors($message);\r\n\r\n return false;\r\n }", "public function getParts()\n {\n return $this->parts;\n }", "public function getParts()\n {\n return $this->parts;\n }", "function _get_selected_entry_ids($playa_data)\n\t{\n\t\tglobal $DB;\n\n\t\t$selected_entry_ids = array();\n\n\t\t$rel_ids = $this->_get_rel_ids($playa_data);\n\t\tif (count($rel_ids))\n\t\t{\n\t\t\t$rels = $DB->query('SELECT rel_id, rel_child_id\n\t\t\t FROM exp_relationships\n\t\t\t WHERE rel_id IN ('.implode(',', $rel_ids).')');\n\n\t\t\tif ($rels->num_rows)\n\t\t\t{\n\t\t\t\t$selected_entry_ids_by_rel_id = array();\n\n\t\t\t\tforeach($rels->result as $rel)\n\t\t\t\t{\n\t\t\t\t\t$selected_entry_ids_by_rel_id[$rel['rel_id']] = $rel['rel_child_id'];\n\t\t\t\t}\n\n\t\t\t\tforeach($rel_ids as $rel_id)\n\t\t\t\t{\n\t\t\t\t\tif (array_key_exists($rel_id, $selected_entry_ids_by_rel_id))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected_entry_ids[] = $selected_entry_ids_by_rel_id[$rel_id];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $selected_entry_ids;\n\t}", "public function getParts()\n\t{\n\t\treturn $this->parts;\n\t}", "function subtree_ids($id) {\n\t\t// zjistim idcka kategorii v podstromu\n\t\t$category_ids = $this->children($id);\n\t\t$category_ids = Set::extract('/Category/id', $category_ids);\n\t\t\n\t\t$category_ids[] = $id;\n\t\t\n\t\treturn $category_ids;\n\t}", "private function selectParentListItemDefinitionIds() {\n\t\ttry {\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"SELECT\tparent_list_item_definition_id\n\t\t\t\tFROM parent_list_item_definitions\n\t\t\t\tWHERE instance_id = :instId AND list_item_definition_id = :id\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\t$res = array();\n\n\t\t\twhile ($rd = $sth->fetch(\\PDO::FETCH_ASSOC)) {\n\t\t\t\t$id = intval($rd[\"parent_list_item_definition_id\"]);\n\t\t\t\t$res[$id] = (object)array(\"id\" => $id);\n\t\t\t}\n\n\t\t\treturn $res;\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}" ]
[ "0.6420084", "0.60030794", "0.60030794", "0.5988216", "0.58373505", "0.58330727", "0.57944685", "0.5730895", "0.5700448", "0.56927484", "0.5651546", "0.5605905", "0.5600647", "0.55976015", "0.5583606", "0.5539566", "0.5526694", "0.55116004", "0.54907256", "0.54771364", "0.54035336", "0.53903836", "0.5388253", "0.53813976", "0.5353182", "0.53427374", "0.5340805", "0.5340009", "0.53387153", "0.53329414", "0.5331711", "0.5330526", "0.53251606", "0.5305886", "0.53058535", "0.5300377", "0.5278942", "0.5272868", "0.52593964", "0.5237842", "0.52036065", "0.5193186", "0.5170629", "0.5162218", "0.5158806", "0.5141591", "0.5123452", "0.51211864", "0.5113908", "0.5102234", "0.51019007", "0.5096872", "0.5090419", "0.5085336", "0.5077685", "0.5077685", "0.5077685", "0.5077685", "0.5077685", "0.5077685", "0.5077685", "0.5077685", "0.50771624", "0.5070292", "0.50599223", "0.50519913", "0.5044444", "0.50441134", "0.5043674", "0.50386524", "0.5030023", "0.5024621", "0.50198877", "0.50140387", "0.5011248", "0.50083166", "0.50083154", "0.5007527", "0.5004703", "0.500108", "0.4995509", "0.4995394", "0.49944147", "0.4993685", "0.49910584", "0.4978625", "0.49783826", "0.497239", "0.4969551", "0.4957164", "0.49549553", "0.495403", "0.49503773", "0.4947785", "0.49466664", "0.49443644", "0.49443644", "0.49384224", "0.49381396", "0.49288994", "0.49183455" ]
0.0
-1
getAllBlocks Extract all block names defined in a twig source file
public static function getAllBlocks($source) { preg_match_all("/\{%\s+block\s+([a-zA-Z\_0-9]+)\s+%\}/", $source, $matches); return $matches[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load_blocks_list() {\n $tmp_blocks = apply_filters('wpucacheblocks_blocks', array());\n $blocks = array();\n foreach ($tmp_blocks as $id => $block) {\n /* Path ex : /tpl/header/block.php */\n if (!isset($block['fullpath']) && !isset($block['path'])) {\n /* A path should always be defined */\n continue;\n }\n /* Full path to the file */\n if (!isset($block['fullpath'])) {\n $block['fullpath'] = get_stylesheet_directory() . $block['path'];\n }\n\n /* Reload hooks */\n if (!isset($block['reload_hooks']) || !is_array($block['reload_hooks'])) {\n $block['reload_hooks'] = array();\n } else {\n /* Keep a list of all hooks used */\n foreach ($block['reload_hooks'] as $hook) {\n $this->reload_hooks[$hook] = $hook;\n }\n }\n\n if (!isset($block['minify'])) {\n $block['minify'] = true;\n }\n\n /* Expiration time */\n if (!isset($block['expires'])) {\n $block['expires'] = 3600;\n } else {\n /* Allow infinite lifespan for a cached block ( no front reload ) */\n if ($block['expires'] == 0) {\n $block['expires'] = false;\n }\n }\n $blocks[$id] = $block;\n }\n return $blocks;\n }", "function get_dynamic_block_names()\n {\n }", "private function get_dynamic_block_names() {\n\t\t$blocks = array();\n\t\tforeach ( get_dynamic_block_names() as $name ) {\n\t\t\tif ( 0 !== strpos( $name, 'llms/' ) ) {\n\t\t\t\t$blocks[] = $name;\n\t\t\t}\n\t\t}\n\t\treturn apply_filters( 'llms_blocks_get_dynamic_block_names', $blocks );\n\t}", "protected function getBlocks()\n\t{\n\t\treturn blx()->entries->getAllBlocks();\n\t}", "public function getBlockNames()\n {\n return array_keys($this->blocks);\n }", "public function getBlocks(): Collection;", "function get_blocks ( $template = null ) {\r\n if ( empty ( $template ) ) {\r\n return false;\r\n }\r\n\r\n if ( strpos( $template, config_item( 'twig_extension') ) === false ) {\r\n $template .= $this->CI->config->item( 'twig_extension' );\r\n }\r\n\r\n $template = $this->_twig->loadTemplate( $template );\r\n\r\n return $template->getBlocks();\r\n }", "public function getThemeBlocks();", "public function getAllBlocks()\n\t{\n\t\treturn $this->m_regionBlocks;\n\t}", "public function getBlocks() {\n // Get blocks definition.\n $definitions = $this->blockManager->getFilteredDefinitions('block_ui', $this->contextRepository->getAvailableContexts());\n foreach ($this->getRestrictedBlocks() as $plugin_id) {\n if (isset($definitions[$plugin_id])) {\n unset($definitions[$plugin_id]);\n }\n }\n\n return $definitions;\n }", "public function getGroupedBlocks() {\n $definitions = $this->getBlocks();\n $definitions = $this->blockManager->getGroupedDefinitions($definitions);\n $keys = array_map(function ($key) {\n return preg_replace('@[^a-z0-9-]+@', '_', strtolower($key));\n }, array_keys($definitions));\n\n return array_combine($keys, array_values($definitions));\n }", "private function getBlocksManifests(): array\n\t{\n\t\t$sep = \\DIRECTORY_SEPARATOR;\n\t\t$path = Components::getProjectPaths('blocksDestinationCustom');\n\n\t\treturn \\array_map(\n\t\t\tfunction (string $blockPath) {\n\t\t\t\t$block = \\implode(' ', (array)\\file(($blockPath)));\n\n\t\t\t\t$block = Components::parseManifest($block);\n\n\t\t\t\tif (!isset($block['blockName'])) {\n\t\t\t\t\tthrow InvalidBlock::missingNameException($blockPath);\n\t\t\t\t}\n\n\t\t\t\tif (!isset($block['classes'])) {\n\t\t\t\t\t$block['classes'] = [];\n\t\t\t\t}\n\n\t\t\t\tif (!isset($block['attributes'])) {\n\t\t\t\t\t$block['attributes'] = [];\n\t\t\t\t}\n\n\t\t\t\tif (!isset($block['hasInnerBlocks'])) {\n\t\t\t\t\t$block['hasInnerBlocks'] = false;\n\t\t\t\t}\n\n\t\t\t\treturn $block;\n\t\t\t},\n\t\t\t(array)\\glob(\"{$path}*{$sep}manifest.json\")\n\t\t);\n\t}", "public function all(): array\n {\n return $this->blocks->all();\n }", "function expose_blocks($content) {\n $raw_blocks = parse_blocks($content);\n $blocks = array();\n\n foreach ($raw_blocks as $block) {\n if ($block['blockName']) { \n $block['content'] = render_block($block);\n $blocks[] = $block;\n }\n }\n\n return $blocks;\n}", "private function buildBlocks($body){\n\n return $body['blocks'];\n }", "public function blocklistAction()\n {\n // Module name\n $name = $this->params('name', '');\n\n $rowset = Pi::model('block')->select(['module' => $name]);\n $blocks = [];\n foreach ($rowset as $row) {\n if ('tab' == $row->type) {\n continue;\n }\n $blocks[] = [\n 'id' => $row->id,\n 'name' => $row->name,\n 'caption' => $row->title,\n 'description' => $row->description,\n ];\n }\n\n return [\n 'status' => 1,\n 'data' => $blocks,\n ];\n }", "public function GetAll() {\n\t\treturn $this->BlockList;\n\t}", "public function blocks()\n {\n return $this->blocks ?: $this->blocks = $this->loadBlocks();\n }", "function _get_block_templates_paths($base_directory)\n {\n }", "public function getBlockDefinitions(){\n\t\tif($this->blockDefinitions->isEmpty() && count($this->sections)){\n\t\t\t$this->loadBlockDefinitions();\n\t\t}\n\n\t\treturn $this->blockDefinitions;\n\t}", "public function availableBlocks(): array\n {\n return Billingo::get('invoices/blocks');\n }", "public function getBlocks() : array {\n\n\t\t\treturn $this->blocks;\n\t\t}", "public function getBlocks(): Collection\n {\n return $this->blocks;\n }", "public function getBlocks()\n {\n return $this->blocks;\n }", "public function getBlocks()\n {\n return $this->blocks;\n }", "protected function loadThemeBlocks()\n {\n $this->blocks = [];\n $blocksDirectory = new DirectoryIterator($this->getFolder() . '/blocks');\n foreach ($blocksDirectory as $entry) {\n if ($entry->isDir() && ! $entry->isDot()) {\n $blockSlug = $entry->getFilename();\n $block = new ThemeBlock($this, $blockSlug);\n $this->blocks[$blockSlug] = $block;\n }\n }\n }", "protected function _collectBlocks()\n {\n if ($blocks = $this->_layoutHandleUpdatesXml->xpath('//block/label/..')) {\n /* @var $block Mage_Core_Model_Layout_Element */\n foreach ($blocks as $block) {\n if ((string)$block->getAttribute('name') && $this->_filterBlock($block)) {\n $helper = Mage::helper(Mage_Core_Model_Layout::findTranslationModuleName($block));\n $this->_blocks[(string)$block->getAttribute('name')] = $helper->__((string)$block->label);\n }\n }\n }\n asort($this->_blocks, SORT_STRING);\n }", "public function get_blocks ()\n {\n return $this->_blocks;\n }", "public function getAllDeclarationBlocks() {\n\t\t$aResult = array();\n\t\t$this->allDeclarationBlocks($aResult);\n\t\treturn $aResult;\n\t}", "public function getProcessingBlocks()\n {\n static $resultBlocks = array();\n\n if (empty($resultBlocks)) {\n $blocks = explode(';', $this->getStoreConfig(self::XML_PATH_OTHER_BLOCKS));\n\n $resultBlocks = array();\n foreach ($blocks as $blockName) {\n $blockName = trim($blockName);\n if (!empty($blockName)) {\n $resultBlocks[] = $blockName;\n }\n }\n }\n\n return $resultBlocks;\n }", "public static function getBlockRenderList()\n {\n return ['onePageBlock'];\n }", "public function loadBlockDefinitions(){\n\t\tforeach($this->sections as $section){\n\t\t\tforeach( $section['allowedBlocks'] as $block_id ) {\n\t\t\t\t$path = Block::locateDefinition( $block_id);\n\n\t\t\t\tif (!is_null($path)) {\n\t\t\t\t\t$block = Block::fromDefinitionFile($path);\n\t\t\t\t\t$this->blockDefinitions->push($block);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function get_the_block_template_html()\n {\n }", "protected function fetchBlocks()\n {\n if (null === $this->blocks)\n {\n $this->blocks = array();\n\n $allBlocks = ContentBlockQuery::create()\n ->find()\n ;\n\n foreach ($allBlocks as $block)\n {\n /* @var $block ContentBlock */\n $this->blocks[$block->getName()][$block->getLocale()] = $block;\n }\n }\n }", "protected function loadBlocks()\n {\n $blocks = [];\n\n if ($pcosBlocks = $this->pcos('blocks')) {\n foreach ($pcosBlocks as $pcos) {\n $blocks[] = $this->newBlock($pcos);\n }\n }\n\n return $this->newBlockCollection($blocks);\n }", "public function getThemeBlocks()\n {\n return $this->blocks;\n }", "function felix_block_names() {\n \n $blocks = array(\n 'disabled' => __( 'Disabled', 'felix-landing-page' ),\n 'header' => __( 'Header', 'felix-landing-page' ),\n 'jumbotron' => __( 'Hero', 'felix-landing-page' ),\n 'navbar' => __( 'Navigation Bar', 'felix-landing-page' ),\n 'products' => __( 'Featured Products', 'felix-landing-page' ),\n 'content' => __( 'Content', 'felix-landing-page' ),\n 'articles' => __( 'Featured Articles', 'felix-landing-page' ),\n 'footer' => __( 'Footer' )\n );\n \n return $blocks;\n \n}", "public function getRelatedBlocks() {\n $blockLib = new \\Cx\\Modules\\Block\\Controller\\BlockLibrary();\n $blocks = $blockLib->_getBlocksForPageId($this->getId());\n return $blocks;\n }", "public function getBlocks($param)\n {\n $blocks = Mage::getStoreConfig($param);\n $arr_result = array();\n\n if (!empty($blocks)):\n $arr_result = explode(\"|\", $blocks);\n endif;\n\n return $arr_result;\n }", "function _block_skinr_load_blocks($theme) {\n $cache = &drupal_static(__FUNCTION__, array());\n\n if (!isset($cache['code_blocks'])) {\n $cache['code_blocks'] = array();\n // Gather the blocks defined by modules.\n foreach (module_implements('block_info') as $module) {\n $module_blocks = module_invoke($module, 'block_info');\n foreach ($module_blocks as $delta => $block) {\n // Add identifiers.\n $block['module'] = $module;\n $block['delta'] = $delta;\n $block['theme'] = $theme;\n $cache['code_blocks'][$module][$delta] = $block;\n }\n }\n }\n\n if (!isset($cache['blocks'][$theme])) {\n $regions = system_region_list($theme);\n\n $current_blocks = $cache['code_blocks'];\n // These are {block}.bid values to be kept.\n $bids = array();\n $or = db_or();\n\n foreach ($cache['code_blocks'] as $module => $module_blocks) {\n foreach ($module_blocks as $delta => $block) {\n // Compile a condition to retrieve this block from the database.\n $condition = db_and()\n ->condition('module', $module)\n ->condition('delta', $delta);\n $or->condition($condition);\n }\n }\n\n $database_blocks = db_select('block', 'b')\n ->fields('b')\n ->condition($or)\n ->condition('theme', $theme)\n ->execute();\n foreach ($database_blocks as $block) {\n // Preserve info which is not in the database.\n $block->info = $current_blocks[$block->module][$block->delta]['info'];\n // The cache mode can only by set from hook_block_info(), so that has\n // precedence over the database's value.\n if (isset($current_blocks[$block->module][$block->delta]['cache'])) {\n $block->cache = $current_blocks[$block->module][$block->delta]['cache'];\n }\n // Blocks stored in the database override the blocks defined in code.\n $current_blocks[$block->module][$block->delta] = get_object_vars($block);\n // Preserve this block.\n $bids[$block->bid] = $block->bid;\n }\n drupal_alter('block_info', $current_blocks, $theme, $cache['code_blocks']);\n\n foreach ($current_blocks as $module => $module_blocks) {\n foreach ($module_blocks as $delta => $block) {\n if (!empty($block['region']) && $block['region'] != BLOCK_REGION_NONE && !isset($regions[$block['region']])) {\n // Disabled modules are moved into the BLOCK_REGION_NONE later so no\n // need to move the block to another region.\n $current_blocks[$module][$delta]['status'] = 0;\n }\n // Set region to none if not enabled and make sure status is set.\n if (empty($block['status'])) {\n $current_blocks[$module][$delta]['status'] = 0;\n $current_blocks[$module][$delta]['region'] = BLOCK_REGION_NONE;\n }\n }\n }\n\n $cache['blocks'][$theme] = array();\n foreach ($current_blocks as $module => $module_blocks) {\n foreach ($module_blocks as $delta => $block) {\n if (!$block['status']) {\n continue;\n }\n $cache['blocks'][$theme][$block['module'] . '__' . $block['delta']] = (object) $block;\n }\n }\n asort($cache['blocks'][$theme]);\n }\n\n return $cache['blocks'][$theme];\n}", "function wp_get_block_name_from_theme_json_path($path)\n {\n }", "function getBlockOutputs() {\n\tglobal $settings;\n\t//echo \"getting blocks\";\n\t\n\t$blockOutput = array();\n\t\n\t$blocksTmp = file_get_contents($settings['channelMemoryMapsFile']);\n\t\n\t//print_r($blocksTmp);\n\t\n\t$blocks = explode(\"\\n\",$blocksTmp);\n\t\n\t//print_r($blocks);\n\t$blockIndex=0;\n\t\n\tfor($blockIndex =0; $blockIndex<=count($blocks)-1;$blockIndex++) {\n\t\t$blockParts = explode(\",\",$blocks[$blockIndex]);\n\t\t$blockOutput[] = $blockParts[0];\n\t\t//$blockIndex++;\n\t\t//$blockOutput [] =\n\t}\n\t//print_r($blockOutput);\n\t\n\treturn $blockOutput;\n}", "function wp_get_first_block($blocks, $block_name)\n {\n }", "protected function resolveTemplate($template)\n {\n $blocks = array();\n foreach ($template->getBlockNames() as $name) {\n $blocks[$name] = $template;\n }\n\n return $blocks;\n }", "public function getDefaultBlocks()\n\t{\n\t\t$sections = [];\n\t\tforeach($this->sections as $section_def){\n\t\t\t$section = [ 'name' => $section_def['name'], 'blocks' => []];\n\t\t\tif(isset($section_def['defaultBlocks']) && !empty($section_def['defaultBlocks'])){\n\t\t\t\tforeach($section_def['defaultBlocks'] as $block_id){\n\t\t\t\t\t$block_def = Block::fromDefinitionFile(Block::locateDefinition($block_id));\n\t\t\t\t\tif($block_def){\n\t\t\t\t\t\t$section['blocks'][] = $block_def->getDefaultData($this->name, $section_def['name']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sections[] = $section;\n\t\t}\n\t\treturn $sections;\n\t}", "public function blocks() { return $this->_m_blocks; }", "function get_default_block_template_types()\n {\n }", "public function getSubBlocks();", "function bigbluebuttonbn_get_file_areas() {\n $areas = array();\n $areas['presentation'] = get_string('mod_form_block_presentation', 'bigbluebuttonbn');\n\n return $areas;\n}", "public function getBlocksDataFullRaw(): void\n\t{\n\t\t// Get global settings direct from file.\n\t\t$settings = $this->getSettingsManifest();\n\n\t\t$namespace = $settings['namespace'];\n\n\t\t$blocks = \\array_map(\n\t\t\tstatic function ($block) use ($namespace) {\n\t\t\t\t// Check if blocks-namespace is defined in block or in global manifest settings.\n\t\t\t\t$block['namespace'] = $namespace;\n\t\t\t\t$block['blockFullName'] = \"{$namespace}/{$block['blockName']}\";\n\n\t\t\t\treturn $block;\n\t\t\t},\n\t\t\t$this->getBlocksManifests()\n\t\t);\n\n\t\t// Register store and set all the data.\n\t\tComponents::setStore();\n\t\tComponents::setSettings($settings);\n\t\tComponents::setBlocks($blocks);\n\t\tComponents::setComponents($this->getComponentsManifests());\n\t\tComponents::setVariations($this->getVariationsManifests());\n\t\tComponents::setConfigFlags();\n\t\tComponents::setPaths();\n\n\t\tif (Components::getConfigUseWrapper()) {\n\t\t\tComponents::setWrapper($this->getWrapperManifest());\n\t\t}\n\t}", "public function blocks_for_region($region) {\n $blockcontents = $this->page->blocks->get_content_for_region($region, $this);\n $blocks = $this->page->blocks->get_blocks_for_region($region);\n $lastblock = null;\n $zones = array();\n foreach ($blocks as $block) {\n $zones[] = $block->title;\n }\n $output = '';\n\n $oddnumberblocks = (count($blockcontents) % 2);\n foreach ($blockcontents as $index => $bc) {\n if ($bc instanceof block_contents) {\n $blockclass = '';\n if ($this->page->pagelayout == 'mydashboard') {\n $blockclass = 'db-singleblock';\n $currentblocktype = $bc->attributes['data-block'];\n if ($currentblocktype == \"calendar_month\" || $currentblocktype == \"calendar_upcoming\") {\n $blockclass = 'db-doubleblock';\n // Then add ml-auto or mr-auto depending on the side of the block.\n $blockclass .= ' ';\n $blockclass .= (($index % 2) ? ' ml-auto ' : ' mr-auto ');\n }\n }\n $output .= $this->block($bc, $region, $blockclass);\n $lastblock = $bc->title;\n } else if ($bc instanceof block_move_target) {\n $output .= $this->block_move_target($bc, $zones, $lastblock, $region);\n } else {\n throw new coding_exception('Unexpected type of thing (' . get_class($bc) . ') found in list of block contents.');\n }\n }\n return $output;\n }", "function get_blocks( $content, $post_id = 0 ) {\n\t$output = [];\n\t$blocks = parse_blocks( $content );\n\n\tforeach ( $blocks as $block ) {\n\t\t$block_data = handle_do_block( $block, $post_id );\n\t\tif ( $block_data ) {\n\t\t\t$output[] = $block_data;\n\t\t}\n\t}\n\n\treturn $output;\n}", "public function getBlockLoader()\n {\n return $this['pantono.service.blocks'];\n }", "function get_block_types() {\n\treturn array(\n\t\t'Text'=>TextBlock::GetLabel(),\n\t\t'RSS'=>RSSBlock::GetLabel(),\n\t\t'Timeline'=>TimelineBlock::GetLabel(),\n\t\t'Quote'=>QuoteBlock::GetLabel(),\n\t\t'Links'=>LinksBlock::GetLabel(),\n\t\t'Calendar'=>CalendarBlock::GetLabel()\n\t);\n}", "public function actionGetBlocks()\n {\n $this->requirePostRequest();\n $this->requireAjaxRequest();\n\n // get elemendIds from POST\n $elemendIds = craft()->request->getPost('elemendIds');\n\n $criteria = craft()->elements->getCriteria(ElementType::MatrixBlock);\n $criteria->id = $elemendIds;\n $blocks = $criteria->find();\n\n\n // return blockTypeIdsByElementId or false\n if ( $blocks ) {\n $this->returnJson(array(\n 'success' => true,\n 'blocks' => $blocks\n ));\n } else {\n $this->returnJson(array(\n 'success' => false\n ));\n }\n }", "public function getall($args)\n {\n // create an empty items array\n $items = array();\n\n // Security check\n if (!SecurityUtil::checkPermission('Blocks::', '::', ACCESS_OVERVIEW)) {\n return $items;\n }\n\n $dbtable = DBUtil::getTables();\n $blockstable = $dbtable['blocks'];\n $blockscolumn = $dbtable['blocks_column'];\n $sort = isset($args['sort']) && $args['sort'] ? $args['sort'] : '';\n $sortdir = isset($args['sortdir']) && $args['sortdir'] ? $args['sortdir'] : 'ASC';\n if ($sort) {\n $sort .= \" $sortdir\";\n } else {\n $sort = 'title';\n }\n\n // backwards parameter compatability\n if (isset($args['modid']) && is_numeric($args['modid'])) {\n $args['module_id'] = $args['modid'];\n }\n\n // initialise the where arguments array\n $whereargs = array();\n\n // filter by block position\n if (isset($args['blockposition_id']) && is_numeric($args['blockposition_id']) && $args['blockposition_id']) {\n $where = \"pid = $args[blockposition_id]\";\n $bids = DBUtil::selectFieldArray('block_placements', 'bid', $where);\n $bidList = $bids ? implode(',', $bids) : -1;\n $whereargs[] = \"$blockscolumn[bid] IN ($bidList)\";\n }\n\n // filter by active block status\n if (isset($args['inactive']) && $args['inactive']) {\n $args['active_status'] = 0;\n }\n if (isset($args['active_status']) && is_numeric($args['active_status']) && $args['active_status']) { // new logic\n $whereargs[] = \"$blockscolumn[active] = \" . ($args['active_status'] == 1 ? '1' : '0');\n }\n\n // filter by module\n if (isset($args['module_id']) && is_numeric($args['module_id']) && $args['module_id']) {\n $whereargs[] = \"$blockscolumn[mid] = '\" . DataUtil::formatForStore($args['module_id']) . \"'\";\n }\n\n // filter by language\n if (isset($args['language']) && $args['language']) {\n $whereargs[] = \"$blockscolumn[language] = '\" . DataUtil::formatForStore($args['language']) . \"'\";\n }\n\n // construct the where clause\n $where = '';\n if (!empty($whereargs)) {\n $where = 'WHERE ' . implode(' AND ', $whereargs);\n }\n\n $permFilter = array();\n $permFilter[] = array(\n 'component_left' => 'Blocks',\n 'component_middle' => '',\n 'component_right' => '',\n 'instance_left' => 'bkey',\n 'instance_middle' => 'title',\n 'instance_right' => 'bid',\n 'level' => ACCESS_OVERVIEW);\n\n $joinInfo = array();\n $joinInfo[] = array(\n 'join_table' => 'modules',\n 'join_field' => 'name',\n 'object_field_name' => 'module_name',\n 'compare_field_table' => 'mid',\n 'compare_field_join' => 'id');\n\n return DBUtil::selectExpandedObjectArray('blocks', $joinInfo, $where, $sort, -1, -1, '', $permFilter);\n }", "protected function _getBlockArray()\n {\n return array(\n \n /*\n * Minicart section\n */\n array(\n 'version' => '0.0.1',\n 'identifier' => 'header_contact_information',\n 'stores' => [0],\n 'title' => 'Header Contact Information',\n 'content' => <<<HTML\n<div id=\"phone-hrs\">\n <a href=\"https://goo.gl/maps/seJQCD3gzao\" target=\"_blank\">Visit Us</a> or Call Us: <a id=\"phone-number\" href=\"tel:+18009387925\">(800) 938-7925</a> &nbsp;&nbsp; Today's Hours: 7:00am - 6:00pm\n</div>\nHTML\n ),\n array(\n 'version' => '0.0.3',\n 'identifier' => 'home_sidebar',\n 'stores' => [0],\n 'title' => 'Home Sidebar',\n 'content' => <<<HTML\n<div class=\"sidebar\">\n <div class=\"home-side-menu\">\n <h2 class=\"side-menu-title\">CATEGORIES</h2>\n {{block class=\"Smartwave\\Megamenu\\Block\\Topmenu\" name=\"sw.sidenav\" template=\"Smartwave_Megamenu::sidemenu.phtml\" ttl=\"3600\"}} </div>\n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\">\n <h2><a href=\"#\">Blog Articles</a></h2>\n <ul class=\"recent-blog\" style=\"list-style:none; padding-inline-start:12px; padding-right:12px;\">\n <li><a title=\"Bosch Laser Level - GLL3-330CG\" href=\"https://www.masterwholesale.com/blog/bosch-green-line-laser-level-review/\" target=\"_blank\">Review: Bosch Green Line Laser Level</a></li>\n <li><a title=\"Makita LXT Lithium Ion Cordless Brushless Angle Grinder\" href=\"https://www.masterwholesale.com/blog/makita-18v-lxt-lithium-ion-cordless-brushless-angle-grinder-review/\" target=\"_blank\">Review: Makita&nbsp;<span>LXT Cordless Brushless Angle Grinder&nbsp;</span></a></li>\n <li><a title=\"Mixing Laticrete PermaColor Grout\" href=\"https://www.masterwholesale.com/blog/how-to-mix-small-batch-laticrete-permacolor-select-grout/\" target=\"_blank\">How to Mix a Small Batch of Laticrete PermaColor Grout</a></li>\n <li><a title=\"Polishing Tile Edges with Diamond Hand Polishing Pads\" href=\"https://www.masterwholesale.com/blog/polish-stone-porcelain-tile-diamond-hand-polishing-pads/\" target=\"_blank\">How to Polish Tile Edges w/ Diamond Hand Polishing Pads</a></li>\n <li><a title=\"Stoning Porcelain and Stone Tile\" href=\"https://www.masterwholesale.com/blog/stone-edge-porcelain-tile-stone/\" target=\"_blank\">How to Stone or Edge Porcelain and Stone Tiles</a></li>\n <li><a title=\"Bridge Saw vs Sliding Table Saw\" href=\"https://www.masterwholesale.com/blog/366-2/\" target=\"_blank\">Bridge Saw vs Sliding Table Saw</a></li>\n <li><a title=\"How to Core with a Diamond Core Drill Bit\" href=\"https://www.masterwholesale.com/blog/dry-core-drill-tile-stone/\" target=\"_blank\">How to Dry Core Drill on Stone or Tile</a></li>\n <li><a title=\"How to Reopen a diamond Core Bit \" href=\"https://www.masterwholesale.com/blog/master-wholesale-reopen-diamond-core-bit/\" target=\"_blank\">How to Sharpen or Reopen a Diamond Core Bit</a></li>\n <li><a title=\"Resin Glass Blade Shootout\" href=\"https://www.masterwholesale.com/blog/resin-glass-blade-shootout/\" target=\"_blank\">Resin Glass Blade Shootout with Blake Adsero</a></li>\n <li><a title=\"Makita Polishing Kit\" href=\"https://www.masterwholesale.com/blog/makita-pw5001c-wet-polishing-kit-master-wholesale/\" target=\"_blank\">How to Polish an Exposed Edge on Stone Tile</a></li>\n <li><a title=\"Deluxe Dry Polishing Kit\" href=\"https://www.masterwholesale.com/blog/?p=254\" target=\"_self\">MWI Deluxe Dry Polishing Kit Demo</a></li>\n <li><a title=\"Laser Level Shootout\" href=\"https://www.masterwholesale.com/blog/laser-level-shootout/\" target=\"_self\">Laser Level Shootout</a></li>\n <li><a title=\"Ishii Tile Cutters\" href=\"https://www.masterwholesale.com/blog/how-to-assemble-and-use-the-ishii-blue-tile-cutters/\" target=\"_self\">How to Assemble and Use Ishii BlueTile Cutters</a></li>\n <li><a title=\"Diamond Blade Shootout\" href=\"https://www.masterwholesale.com/blog/tile-saw-diamond-blade-shootout/\" target=\"_self\">Tile Saw Diamond Blade Shootout</a></li>\n </ul>\n </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\" class=\"owl-carousel\">\n <div class=\"item\" style=\"text-align:center;\"> <img src=\"\" alt=\"\" style=\"display:inline-block;\"/> </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\" style=\"text-align:center;\"> {{block class=\"Magento\\Framework\\View\\Element\\Template\" name=\"single_special\" template=\"Magento_Catalog::product/view/single_special.phtml\" ttl=\"3600\"}} </div>\n </div>\n <!-- end --> \n </div>\nHTML\n ),\n );\n }", "function wprt_blog_entry_layout_blocks() {\n\n\t// Get layout blocks\n\t$blocks = wprt_get_mod( 'blog_entry_composer' );\n\n\t// If blocks are 100% empty return defaults\n\t$blocks = $blocks ? $blocks : 'title,meta,excerpt_content,readmore';\n\n\t// Convert blocks to array so we can loop through them\n\tif ( ! is_array( $blocks ) ) {\n\t\t$blocks = explode( ',', $blocks );\n\t}\n\n\t// Set block keys equal to vals\n\t$blocks = array_combine( $blocks, $blocks );\n\n\t// Return blocks\n\treturn $blocks;\n}", "public function index() {\n return $this->systemManager->getBlockContents();\n }", "public function getBlockList() {\n\t\t\n\t\treturn $this->_getResponse(self::URL_USERS_BLOCK_LIST, $this->_query);\n\t}", "function wpex_portfolio_entry_blocks() {\n\n\t// Get layout blocks\n\t$blocks = wpex_get_mod( 'portfolio_entry_composer' );\n\n\t// If blocks are 100% empty return defaults\n\t$blocks = $blocks ? $blocks : 'media,title,content,read_more';\n\n\t// Convert blocks to array so we can loop through them\n\tif ( ! is_array( $blocks ) ) {\n\t\t$blocks = explode( ',', $blocks );\n\t}\n\n\t// Apply filters to entry layout blocks\n\t$blocks = apply_filters( 'wpex_portfolio_entry_blocks', $blocks );\n\n\t// Return blocks\n\treturn $blocks;\n\n}", "public function get_block_spec()\n {\n if (is_null($this->blockSpec)) {\n $spec_json_file =\n $this->get_theme_custom_block_dir() .\n \"/\" .\n $this->get_config()->get(\"viewspecJsonFilename\");\n if (file_exists($spec_json_file)) {\n $block_spec = json_decode(\n file_get_contents($spec_json_file),\n true\n );\n if ($block_spec && is_array($block_spec)) {\n $this->blockSpec = $block_spec;\n }\n }\n }\n\n return $this->blockSpec;\n }", "function wpex_portfolio_post_blocks() {\n\n\t// Get layout blocks\n\t$blocks = wpex_get_mod( 'portfolio_post_composer' );\n\n\t// If blocks are 100% empty return defaults\n\t$blocks = $blocks ? $blocks : 'content,share,related';\n\n\t// Convert blocks to array so we can loop through them\n\tif ( ! is_array( $blocks ) ) {\n\t\t$blocks = explode( ',', $blocks );\n\t}\n\n\t// Apply filters to entry layout blocks\n\t$blocks = apply_filters( 'wpex_portfolio_single_blocks', $blocks );\n\n\t// Return blocks\n\treturn $blocks;\n\n}", "function gutenberg_prepare_blocks_for_js() {\n\t$block_registry = WP_Block_Type_Registry::get_instance();\n\t$blocks = array();\n\t$keys_to_pick = array( 'title', 'description', 'icon', 'category', 'keywords', 'supports', 'attributes' );\n\n\tforeach ( $block_registry->get_all_registered() as $block_name => $block_type ) {\n\t\tforeach ( $keys_to_pick as $key ) {\n\t\t\tif ( ! isset( $block_type->{ $key } ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( ! isset( $blocks[ $block_name ] ) ) {\n\t\t\t\t$blocks[ $block_name ] = array();\n\t\t\t}\n\n\t\t\t$blocks[ $block_name ][ $key ] = $block_type->{ $key };\n\t\t}\n\t}\n\n\treturn $blocks;\n}", "public function loadAllContentBlocksForRender()\n\t{\n\t\t$lang = $this->getCurrentLang();\n\t\t$contentBlocks = ContentBlockTable::getInstance()->loadAllCurrentVersions($this->id, $lang);\n\n\t\tforeach ($contentBlocks as $contentBlock)\n\t\t{\n\t\t\t// We have to link the ContentBlock back to this group - it needs to know about the group for its definition\n\t\t\t$contentBlock->ContentGroup = $this;\n\n\t\t\t// We have constructed the query so that Versions just contains the current version\n\t\t\t$currentContentBlockVersion = $contentBlock->Versions->getFirst();\n\n\t\t\t// The ContentBlockVersion needs to be linked back to the ContentBlock, as it gets its definitions from there\n\t\t\t$currentContentBlockVersion->ContentBlock = $contentBlock;\n\t\t\t$contentBlockLang = $contentBlock->getCurrentLang();\n\n\t\t\t// By setting this, the ContentBlock will not need to do an additional DB query to load its current version.\n\t\t\t$contentBlock->setCurrentVersionsCache($currentContentBlockVersion, $contentBlockLang);\n\t\t}\n\n\t\t$this->ContentBlocks = $contentBlocks;\n\t}", "function getBlock()\n {\n\t\t$args = new safe_args();\n\t\t$args->set('app_name', \t$_SESSION['customization']['applications']['app_name'], 'sqlsafe');\n\t\t$args->set('block_id', \tNOTSET, 'sqlsafe');\n\t\t$args = $args->get(func_get_args());\n\t\t$GLOBALS['appshore_data']['server']['xml_render'] = true;\t\n\t\t\n\t\tif( $args['block_id'] )\n\t\t\t$result['customization'] = getManyAssocArrays('select * from db_blocks where app_name = \"'.$args['app_name'].\n\t\t\t\t'\" and block_id = \"'.$args['block_id'].'\"');\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$result['return'] = 'success';\n\t\t$result['message'] = '';\n \t\treturn $result;\n }", "function get_global_content_blocks()\n {\n #global $db_settings, $pdo;\n $gcb_result = Database::$content->query(\"SELECT id, identifier, content FROM \".Database::$db_settings['gcb_table'].\" ORDER BY id ASC\");\n while($row = $gcb_result->fetch())\n {\n $gcb[$row['identifier']] = $row['content'];\n #if($row['content_formatting']==1) $gcb[$row['id']] = auto_html($gcb[$row['id']]);\n }\n if(isset($gcb))\n {\n return $gcb;\n }\n return false;\n }", "public function getCachedBlocks()\n {\n return $this->cachedBlocks;\n }", "public static function get_by_name($key)\n\t{\n\t\tself::set_table('CMS_Blocks');\n\t\tself::set_select('CMS_BlocksBody');\n\t\tself::set_col('CMS_BlocksName', $key);\n\t\t$data = self::get();\n\t\treturn (isset($data[0]['CMS_BlocksBody'])) ? $data[0]['CMS_BlocksBody'] : '';\n\t}", "function block_admin_display_prepare_blocks1($theme) {\r\n $blocks = _block_rehash($theme);\r\n $compare_theme = &drupal_static('_block_compare:theme');\r\n $compare_theme = $theme;\r\n usort($blocks, '_block_compare');\r\n return $blocks;\r\n}", "public function filter_block_list($blocklist = array())\n\t{\n\t\t$blocklist['singlepage_content'] = _t(\"Statische Seite\", __CLASS__);\n\t\tif(Post::type('photoset')) {\n\t\t\t$blocklist['photoset_randomphotos'] = _t(\"Zufällige Fotoauswahl\", __CLASS__);\n\t\t}\n\t\treturn $blocklist;\n\t}", "function parse_blocks($content)\n {\n }", "public static function GET_AREA_BLOCKS(){\n\t $SQL_String = \"SELECT * FROM area_block WHERE am_id=:amid AND _keep=1 ORDER BY ab_id ASC\";\n\t return $SQL_String;\n\t}", "function AllowGutenbergBlocks(){\n $AllowedBlocks = array_merge($this->WPgutenberg_AllowedBlocks, $this->WPgutenberg_CustomAllowedBlocks);\n return $AllowedBlocks;\n }", "public function blocks(){\r\n\t\tif($this->has_admin_panel()) return $this->module_blocks();\r\n return $this->module_no_permission();\r\n\t}", "function wpucacheblocks_block($block_id = '', $lang = false) {\n global $WPUCacheBlocks;\n return $WPUCacheBlocks->get_block_content($block_id, $lang);\n}", "function get_block( $blockname = '', $the_post = null, $blocks = [] ) {\n\tglobal $post;\n\n\tif ( empty( $the_post ) ) {\n\t\t$the_post = $post;\n\t}\n\n\tif ( empty( $blocks ) ) {\n\t\t$blocks = parse_blocks( $the_post->post_content );\n\t}\n\n\tforeach ( $blocks as $block ) {\n\n\t\tif ( ! isset( $block['blockName'] ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( $blockname === $block['blockName'] ) {\n\t\t\treturn $block;\n\t\t} elseif ( isset( $block['innerBlocks'] ) && ! empty( $block['innerBlocks'] ) ) {\n\t\t\t// Scan inner blocks\n\t\t\t$inner_block = get_block( $blockname, null, $block['innerBlocks'] );\n\t\t\tif ( ! empty( $inner_block ) && isset( $inner_block ) ) {\n\t\t\t\treturn $inner_block;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}", "public function run()\n {\n $this->disableForeignKeys();\n $this->truncate('blocks');\n\n /*\n * ABOUT US PAGE BLOCKS\n */\n $blocks = [\n [\n 'page_id' => 1,\n 'title' => 'History',\n 'title_ru' => 'История',\n 'title_it' => 'Mostra di più',\n 'body' => 'The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time. Special care is devoted to details, the selection of tissues, and the coordination of color nuances.\n ',\n 'body_ru' => 'Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз. Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов.',\n 'body_it' => 'La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta. La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore.\n ',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Expression of style',\n 'title_ru' => 'Выражение стиля',\n 'title_it' => 'Espressione dello stile',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesce a ripristinare un design elegante e raffinato che si esprime in una cura amorosa per i dettagli, in una lavorazione a mano che esalta le texture, dando complementi di mobili con un unico e Fascino senza tempo.',\n 'body_ru' => 'Кроме того, в офисной зоне новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражается в любящей заботе о деталях, в ручном производстве, которое превозносит текстуры, придавая вам мебельные дополнения с уникальным и Вневременное очарование',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details, in a hand manufacturing that exalt the textures, giving you furniture complements with a unique and timeless charm',\n 'image' => 'under-history-right.jpg',\n 'title_limit' => 25,\n 'body_limit' => 330,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'The lifelong experience is being reflected in almost every project. At Cavio-Casa, we are welcoming challenges to foster our creativity. People inspire us and we want to inspire them too.<br><br>Everything we do at Cavio-Casa is guided by our vision to ensure that we all go the extra mile to help our customers reach their audiences. So far, we have achieved to play a dynamic role in shaping the jewelry industry.\n ',\n 'body_ru' => 'Жизненный опыт отражается почти во всех проектах. В Cavio-Casa мы приветствуем проблемы, способствующие нашему творчеству. Люди вдохновляют нас, и мы хотим их вдохновить. <br><br> Все, что мы делаем в Cavio-Casa, руководствуется нашим видением, чтобы все мы прошли лишнюю милю, чтобы помочь нашим клиентам достичь своей аудитории. До сих пор мы достигли динамичной роли в формировании ювелирной промышленности.',\n 'body_it' => 'L\\'esperienza permanente si riflette in quasi tutti i progetti. A Cavio-Casa, stiamo accogliendo sfide per promuovere la nostra creatività. La gente ci ispira e vogliamo ispirare anche loro<br><br> Tutto quello che facciamo a Cavio-Casa è guidato dalla nostra visione per assicurarci che tutti noi passiamo il miglio supplementare per aiutare i nostri clienti a raggiungere il loro pubblico. Finora abbiamo raggiunto un ruolo dinamico nella progettazione dell\\'industria dei gioielli.',\n 'image' => 'under-history-left.jpg',\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Philosofhy',\n 'title_ru' => 'Философия',\n 'title_it' => 'Filosofia',\n 'body' => 'The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time. Special care is devoted to details, the selection of tissues, and the coordination of color nuances.',\n 'body_ru' => 'Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз. Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов.',\n 'body_it' => 'La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta. La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore.',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body_it' => 'Tutto quello che facciamo a Cavio-Casa è guidato dalla nostra visione per assicurare che tutti noi andiamo il miglio supplementare per aiutare i nostri clienti a raggiungere il loro pubblico. Finora abbiamo raggiunto un ruolo dinamico nella progettazione dell\\'industria dei gioielli<br><br> L\\'esperienza permanente si riflette in quasi tutti i progetti. A Cavio-Casa, stiamo accogliendo sfide per promuovere la nostra creatività. Le persone ci ispirano e vogliamo ispirare anche loro.',\n 'body_ru' => 'Все, что мы делаем в Cavio-Casa, руководствуется нашим видением, чтобы все мы прошли лишнюю милю, чтобы помочь нашим клиентам достичь своей аудитории. До сих пор мы достигли динамичной роли в формировании ювелирной промышленности.<br>Жизненный опыт отражается почти во всех проектах. В Cavio-Casa мы приветствуем проблемы, способствующие нашему творчеству. Люди вдохновляют нас, и мы хотим вдохновить их тоже.',\n 'body' => 'Everything we do at Cavio-Casa is guided by our vision to ensure that we all go the extra mile to help our customers reach their audiences. So far, we have achieved to play a dynamic role in shaping the jewelry industry.<br>The lifelong experience is being reflected in almost every project. At Cavio-Casa, we are welcoming challenges to foster our creativity. People inspire us and we want to inspire them too.',\n 'image' => null,\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'We have been renowned for the high quality of our hand-made products, the innovative ideas, the effective co-operation with clients around the world and the ability to tailor our services to each customer’s needs surpassing their expectations.<br><br>We are always next to you, full of new ideas, determination and love because we believe in what we do.',\n 'image' => null,\n 'body_ru' => 'Мы были известны высоким качеством наших изделий ручной работы, инновационными идеями, эффективным сотрудничеством с клиентами по всему миру и возможностью адаптировать наши услуги к потребностям каждого клиента, превосходящим их ожидания. <br><br> Мы всегда рядом с вами, полны новых идей, решительности и любви, потому что мы верим в то, что делаем.',\n 'body_it' => 'Siamo stati rinomati per l\\'alta qualità dei nostri prodotti fatti a mano, le idee innovative, l\\'efficace collaborazione con i clienti in tutto il mondo e la capacità di adattare i nostri servizi alle esigenze di ogni cliente che supera le loro aspettative.<br><br> Siamo sempre accanto a voi, pieno di nuove idee, determinazione e amore perché crediamo in ciò che facciamo.',\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body_ru' => '<span class=colored>Свобода</span>для сопоставления<br>разных материалов и отделок<br>и <span class=colored>ошеломляющий</span>визуал.',\n 'image' => null,\n 'body' => 'The <span class=colored>freedom</span>to to juxtapose<br>different materials, finishes<br>and <span class=colored>stunning</span>visual.',\n 'body_it' => 'La <span class=colored>libertà</span>Per giungere a destra<br>Materiali diversi, finiture<br>e <span class=colored>stunning</span>visivo.',\n 'title_limit' => null,\n 'body_limit' => 150,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Mood',\n 'title_ru' => 'Настроение',\n 'title_it' => 'Umore',\n 'body' => 'Special care is devoted to details, the selection of tissues, and the coordination of color nuances. The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time.',\n 'body_ru' => 'Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов. Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз.',\n 'body_it' => 'La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore. La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta.',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Expression',\n 'title_ru' => 'Выражение',\n 'title_it' => 'Espressione',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details.',\n 'body_ru' => 'Кроме того, в офисе новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражает себя в любящей заботе о деталях.',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesumina un design elegante e raffinato che si esprime in una cura amorosa per i dettagli.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Style',\n 'title_ru' => 'Стиль',\n 'title_it' => 'Stile',\n 'body' => 'In a hand manufacturing that exalt the textures, giving you furniture complements with a unique and timeless charm.\n ',\n 'body_ru' => 'В ручном производстве, которые превозносят текстуры, дают вам комплименты мебели с уникальным и неподвластным времени очарованием.',\n 'body_it' => 'In una produzione a mano che esalta le texture, dandovi complimenti per mobili con un fascino unico e senza tempo.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Quality',\n 'title_ru' => 'Качество',\n 'title_it' => 'Qualità',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details.\n ',\n 'body_ru' => 'Кроме того, в офисе новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражает себя в любящей заботе о деталях.',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesumina un design elegante e raffinato che si esprime in una cura amorosa per i dettagli.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n /*\n * Contacts PAGE BLOCKS\n */\n [\n 'page_id' => 2,\n 'title' => 'CAVIO Factory & Showroom',\n 'title_ru' => 'CAVIO Фабрики & Посредники',\n 'title_it' => 'CAVIO Factory & Showroom',\n 'body' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_ru' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_it' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'image' => 'cont-r.jpg',\n 'title_limit' => 26,\n 'body_limit' => 400,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 2,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => 'cont-map.jpg',\n 'title_limit' => null,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 2,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => 'cont-bottom.jpg',\n 'title_limit' => null,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 8,\n 'title' => 'Our philosofy',\n 'title_ru' => 'Наша философия',\n 'title_it' => 'La filosofia',\n 'body' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'body_ru' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'body_it' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'image' => 'phil-image.jpg',\n 'title_limit' => 15,\n 'body_limit' => 810,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 9,\n 'title' => 'Privacy Policy',\n 'title_ru' => 'Политика приватности',\n 'title_it' => 'Politica sulla riservatezza',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => null,\n 'title_limit' => 30,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n /*\n * Showroom page\n */\n\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-2.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-3.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-1.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'Don’t found showroom<br>near you? <span class=colored>Contact main</span><br>',\n 'body_ru' => 'Не нашли салон рядом<br>с вами? <span class=colored>Обратитесь в главный</span><br>',\n 'body_it' => 'Non ho trovato lo showroom<br>vicino a te? <span class=colored>Contatto principale</span><br>',\n 'image' => null,\n 'title_limit' => null,\n 'body_limit' => 100,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => 'Main Showroom',\n 'title_ru' => 'Главный магазин',\n 'title_it' => 'Showroom principale',\n 'body' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_ru' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_it' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'image' => 'main-showroom.jpg',\n 'title_limit' => null,\n 'body_limit' => 320,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n\n ];\n\n DB::table('blocks')->insert($blocks);\n\n\n $this->enableForeignKeys();\n }", "function asu_brand_get_block_students_footer() {\n $settings = asu_brand_get_block_settings();\n $cache_id = 'asu_brand:students_footer';\n return asu_brand_get_cached_content($cache_id, $settings->students_footer_path);\n}", "function getBlocks($surferId) {\n $sql = \"SELECT surferlist_surferid, surferlist_contact, surferlist_blocked\n FROM %s\n WHERE surferlist_surferid = '%s'\n AND surferlist_blocked = 1\";\n $sqlParams = array($this->tableSurferLists, $surferId);\n $blocks = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $blocks[] = $row['surferlist_contact'];\n }\n }\n return $blocks;\n }", "function remove_blocks() {\n if ( is_singular( 'webinar' ) && in_the_loop() && is_main_query() ) {\n //parse the blocks so they can be run through the foreach loop\n $blocks = parse_blocks( get_the_content() );\n foreach ( $blocks as $block ) {\n //look to see if your block is in the post content -> if yes continue past it if no then render block as normal\n \n echo $block['blockName'];\n \n if ( 'lazyblock/top-of-page' === $block['blockName'] ) {\n continue;\n } else {\n echo render_block( $block );\n }\n }\n }\n}", "function extract_blocks($bl_handle, $recurse = false)\r\n\t{\r\n\r\n\t\t$str = $this->get_var($bl_handle);\r\n\t\tif (!$str) return $str;\r\n\t\t$bl_start = 0;\r\n\r\n\t\tlist($bll, $blr) = explode('|', $this->block_start_string);\r\n\t\t$strlen = strlen($bll);\r\n\r\n\r\n\t\t// find them and clean from parent handle\r\n\t\twhile(is_long($bl_start = strpos($str, $bll, $bl_start)))\r\n\t\t{\r\n\t\t\t$pos = $bl_start + $strlen;\r\n\r\n\t\t\t$endpos = strpos($str, $blr, $pos);\r\n\t\t\t$handle = substr($str, $pos, $endpos-$pos);\r\n\r\n\t\t\t$tag = $bll.$handle.$blr;\r\n\t\t\t$endtag = str_replace('|', $handle, $this->block_end_string);\r\n\r\n\t\t\t$start_pos = $bl_start + strlen($tag);\r\n\t\t\t$end_pos = strpos($str, $endtag, $bl_start);\r\n\t\t\tif (!$end_pos) { $this->error(\"phemplate(): block '$handle' has no ending tag\", 'fatal'); }\r\n\t\t\t$bl_end = $end_pos + strlen($endtag);\r\n\r\n\t\t\t$block_code = substr($str, $start_pos, $end_pos-$start_pos);\r\n\t\t\t\r\n\t\t\t$this->set_var($handle, $block_code);\r\n\r\n\t\t\t$part1 = substr($str, 0, $bl_start);\r\n\t\t\t$part2 = substr($str, $bl_end, strlen($str));\r\n\t\t\t\r\n\t\t\t$str = $part1 . $part2;\r\n\r\n\t\t\tif ($recurse) { $this->extract_blocks($handle, 1); }\r\n\r\n\t\t}\r\n\r\n\t\t$this->set_var($bl_handle, $str);\r\n\r\n\t}", "function theme_allowed_block_types($allowed_blocks, $post) {\n\n // if(get_page_template_slug( $post ) === 'template-name.php') {\n // return array();\n // }\n\n return array(\n 'acf/xxx',\n 'acf/home-hero',\n 'acf/text-image-right',\n 'acf/image-left-text', \n 'acf/prospectives-listen',\n 'acf/perspectives-read',\n 'acf/perspectives-learn', \n 'acf/perspectives-generic', \n );\n}", "function getTemplateFiles()\r\n{\r\n\t$directory = \"models/site-templates/\";\r\n\t$languages = glob($directory . \"*.css\");\r\n\t//print each file name\r\n\treturn $languages;\r\n}", "function get_block_file_template($id, $template_type = 'wp_template')\n {\n }", "public function register_blocks() {\n\t\t}", "function sebd7tweaks_API_views_alter_blocks($blocks) {\n $displays = array();\n // For better performance, prepare an array of display by view to ensure not load the view twice or more\n foreach (array_keys($blocks) as $key) {\n list($view_name, $display_name) = explode('-', $key);\n $displays[$view_name][] = $display_name;\n }\n // Use the display title for associated blocks\n foreach ($displays as $view_name => $display_names) {\n // Load the view\n $view = views_get_view($view_name);\n // Load its displays\n $view->init_display();\n // Parse all of them which provide a block\n foreach ($display_names as $display_name) {\n foreach (array($display_name, 'default') as $candidate) {\n if (isset($view->display[$candidate]->display_options['title'])) {\n $blocks[\"$view_name-$display_name\"]['info'] = $view->display[$candidate]->display_options['title'];\n break;\n }\n }\n }\n // Save memory\n $view->destroy();\n }\n // Return blocks list\n return $blocks;\n}", "public function filter_block_list( $block_list )\n\t{\n\t\t$allblocks = $this->allblocks;\n\t\tforeach ( $allblocks as $blockname => $nicename ) {\n\t\t\t$block_list[ $blockname ] = _t( $nicename );\n\t\t}\n\t\treturn $block_list;\n\t}", "public function loadCollections(Block $block): array;", "public function filter_block_list ( $block_list ) {\n\t\t\t$block_list['exportsnapshot'] = _t( 'Latest Export Snapshots' );\n\t\t\treturn $block_list;\n\t\t}", "function fuxt_block_whitelist() {\n\treturn array(\n\t\t'core/paragraph',\n\t\t'core/image',\n\t\t'core/heading',\n\t\t'core/gallery',\n\t\t'core/list',\n\t\t'core/quote',\n\t\t'core/columns',\n\t\t'core/column',\n\t\t'core/embed',\n\t);\n}", "public function get_default_blocks() {\n\n return array(\n\n BLOCK_POS_LEFT => array(),\n\n BLOCK_POS_RIGHT => array('search_forums', 'news_items', 'calendar_upcoming', 'recent_activity')\n\n );\n\n }", "public function getBlockTypes(){\n\t\n\t\tif( empty($this->_block_types) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 't.content_type_id AS value, t.content_type_name AS text' );\n\t\t\t$query->from( '#__zbrochure_content_types AS t' );\n\t\t\t$query->where( 't.content_type_published = 1' );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_block_types = $this->_db->loadObjectList();\n\n\t\t}\n\t\t\n\t\treturn $this->_block_types;\n\t\n\t}", "public static function get_block_data()\n {\n }", "function get_allowed_block_template_part_areas()\n {\n }", "function _polylang_blocklist_tsf_urls( $blocklist ) {\n\t$blocklist[] = [ 'file' => 'autodescription/inc/compat/plugin-polylang.php' ];\n\treturn $blocklist;\n}", "function testBlockIteration()\n {\n $data = array(\n 'a',\n array('b', array('1', '2', '3', '4')),\n 'c',\n array('d', array('5', '6', '7'))\n );\n\n $result = $this->tpl->loadTemplateFile('blockiteration.html', true, true);\n if (PEAR::isError($result)) {\n $this->assertTrue(false, 'Error loading template file: '. $result->getMessage());\n }\n foreach ($data as $value) {\n if (is_array($value)) {\n $this->tpl->setVariable('outer', $value[0]);\n foreach ($value[1] as $v) {\n $this->tpl->setVariable('inner', $v);\n $this->tpl->parse('inner_block');\n }\n } else {\n $this->tpl->setVariable('outer', $value);\n }\n $this->tpl->parse('outer_block');\n }\n $this->assertEquals('a#b|1|2|3|4#c#d|5|6|7#', $this->_stripWhitespace($this->tpl->get()));\n }", "function getTemplateFiles() {\n $directory = \"models/site-templates/\";\n $languages = glob($directory . \"*.css\");\n //print each file name\n return $languages;\n}", "function locate_block_template($template, $type, array $templates)\n {\n }", "function scan_templates_for_translations () {\r\n $this->CI->load->helper( 'file' );\r\n $filename = config_item( 'dummy_translates_filename' );\r\n\r\n // Clean Pattern for new file\r\n $clean_pattern = \"<?php\\n\";\r\n\r\n // Emptying file\r\n write_file( $filename, $clean_pattern );\r\n\r\n $path = realpath( config_item( 'current_template_uri' ) );\r\n $directory = new RecursiveDirectoryIterator( $path );\r\n $iterator = new RecursiveIteratorIterator( $directory );\r\n\r\n // Regex for no deprecated twig templates\r\n $regex = '/^((?!DEPRECATED).)*\\.twig$/i';\r\n $file_iterator = new RegexIterator( $iterator, $regex, RecursiveRegexIterator::GET_MATCH );\r\n\r\n $files = 0;\r\n $arr_strings = array();\r\n\r\n foreach( $file_iterator as $name => $object ) {\r\n $files++;\r\n\r\n // Mega regex for Quoted String tokens with escapable quotes\r\n // http://www.metaltoad.com/blog/regex-quoted-string-escapable-quotes\r\n $pattern = '/{%\\s?trans\\s?((?<![\\\\\\\\])[\\'\"])((?:.(?!(?<![\\\\\\\\])\\1))*.?)\\1/';\r\n $current_file = fopen( $name, 'r' );\r\n\r\n while ( ( $buffer = fgets( $current_file ) ) !== false ) {\r\n if ( preg_match_all( $pattern, $buffer, $matches ) ) {\r\n foreach( $matches[ 2 ] as $match ) {\r\n // Escaping quotes not yet escaped\r\n $match = preg_replace( '/(?<![\\\\\\\\])(\\'|\")/', \"\\'\", $match );\r\n array_push( $arr_strings, \"echo _( '$match' );\\n\" );\r\n }\r\n }\r\n }\r\n\r\n fclose( $current_file );\r\n }\r\n\r\n // Remove duplicates\r\n $arr_strings = array_unique( $arr_strings );\r\n write_file( $filename, implode( $arr_strings ), 'a' );\r\n\r\n $result = array(\r\n 'templates' => $files,\r\n 'strings' => count( $arr_strings ),\r\n 'output' => $filename,\r\n 'lint' => check_php_file_syntax( $filename )\r\n );\r\n\r\n return $result;\r\n }" ]
[ "0.67372894", "0.67216897", "0.6720243", "0.6596654", "0.6427418", "0.64245087", "0.64033616", "0.63791496", "0.6349548", "0.6288271", "0.6253894", "0.62385756", "0.6037089", "0.6031048", "0.6022278", "0.60054207", "0.6003441", "0.5951053", "0.5949634", "0.59451175", "0.5919579", "0.5914657", "0.58999985", "0.58901286", "0.58901286", "0.5887418", "0.5858582", "0.585037", "0.5846801", "0.58346677", "0.57922524", "0.57909846", "0.5790156", "0.5788657", "0.57866895", "0.57721895", "0.5708436", "0.56235516", "0.5585838", "0.5582095", "0.557853", "0.5563464", "0.5544983", "0.55185586", "0.55156314", "0.5500962", "0.54807615", "0.54781216", "0.54777884", "0.5454017", "0.54525095", "0.5444964", "0.54323626", "0.54154056", "0.5412949", "0.5410093", "0.5403517", "0.5366194", "0.53657234", "0.53375685", "0.53292125", "0.5290618", "0.52733016", "0.5263733", "0.5254581", "0.5241484", "0.52399534", "0.5234463", "0.52266425", "0.52183396", "0.5217744", "0.52136654", "0.5210446", "0.52048194", "0.5186726", "0.51796645", "0.5176864", "0.517504", "0.5167978", "0.51483995", "0.51428795", "0.5141131", "0.5136999", "0.5136621", "0.5136144", "0.51327664", "0.51302516", "0.5126939", "0.51220936", "0.51194", "0.5117384", "0.50890726", "0.50863624", "0.50774825", "0.5077148", "0.5075689", "0.5070954", "0.506028", "0.5059181", "0.5049622" ]
0.66291857
3
Implements theme_links() targeting the main menu specifically Outputs Foundation Nav bar
function zurpal_js_alter(&$javascript) { // Swap out jQuery to use an updated version of the library. $javascript['misc/jquery.js']['data'] = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/jquery.js'; $javascript['misc/jquery.js']['version'] = '1.9.0'; //drupal_static_reset('drupal_add_js'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function grav_footer_links() {\n wp_nav_menu(\n \tarray(\n \t\t'menu' => 'footer_links', /* menu name */\n \t\t'theme_location' => 'footer_links', /* where in the theme it's assigned */\n \t\t'container_class' => 'footer-links clearfix' /* container class */\n \t)\n\t);\n}", "function bones_footer_links() {\n wp_nav_menu(\n \tarray(\n 'menu' => 'footer_links', /* menu name */\n 'theme_location' => 'footer_links', /* where in the theme it's assigned */\n 'container_class' => 'footer-links clearfix', /* container class */\n 'fallback_cb' => 'bones_footer_links_fallback' /* menu fallback */\n \t)\n\t);\n}", "function greenfields_display_main_menu()\n{\n wp_nav_menu(\n array(\n 'theme_location' => 'main_nav', /* where in the theme it's assigned */\n 'menu' => 'main_nav', /* menu name */\n 'menu_class' => 'nav navbar-nav',\n 'container' => false, /* container class */\n 'depth' => 2,\n 'walker' => new greenfields_Bootstrap_walker(),\n )\n );\n}", "private function gen_nav_links()\n\t{\n\t\t$this->template->assign_block_vars('navlinks', array(\n\t\t\t'S_IS_CAT'\t\t=> true,\n\t\t\t'S_IS_LINK'\t\t=> false,\n\t\t\t'S_IS_POST'\t\t=> false,\n\t\t\t'FORUM_NAME'\t=> $this->user->lang('BLOG_MAIN'),\n\t\t\t'FORUM_ID'\t\t=> -1,\n\t\t\t'U_VIEW_FORUM'\t=> append_sid('blog'),\n\t\t));\n\t}", "function theme_menu() {\n global $theme;\n $content = new UN_Content();\n $cAll = $content->getMenuContent($theme->langid);\n if (is_array($cAll)) {\n $out = '<ul>';\n if ($theme->indexlink == 1) {\n $out .= '<li><a href=\"index.php'.theme_global_url(true).'\"><span>'._('Main Page').'</span></a></li>';\n }\n foreach($cAll as $c) {\n $link = ($c['pagelink']!=\"\") ? $c['pagelink'] : 'index.php?t=page&amp;id='.$c['pageid'];\n $title = ($c['pagelink']!=\"\") ? $c['pagedetail'] : $c['pagetitle'];\n $out .= '<li><a href=\"'.$link.theme_global_url().'\" title=\"'.strip_tags($title).'\"><span>'.$c['pagetitle'].'</span></a></li>';\n }\n $out .= '</ul>';\n }\n echo $out;\n}", "function bc16_links__topbar_main_menu($variables) {\n $links = menu_tree_output(menu_tree_all_data(variable_get('menu_main_links_source', 'main-menu')));\n $output = _zurb_foundation_links($links);\n $variables['attributes']['class'][] = 'right';\n\n // return '<ul' . drupal_attributes($variables['attributes']) . '><li><a href=\"/\"><i class=\"fa fa-home\"></i></a></li>' . $output . '<li class=\"has-form\"><a href=\"#\" class=\"button radius\">Заказать кейтеринг</a></li></ul>';\n return '<ul' . drupal_attributes($variables['attributes']) . '><li><a href=\"/\"><i class=\"fa fa-home\"></i></a></li>' . $output . '</ul>';\n}", "function theme_nav_menus(){\n\t register_nav_menus( array(\n\t 'main'=>'Main Menu',\n\t 'footer'=>'Footer Menu'\n\t ) );\n\t}", "function grav_main_nav() {\n\t$walker = new grav_walker;\n\n \twp_nav_menu(array( \n \t\t'menu' => 'main_nav', /* menu name */\n \t\t'theme_location' => 'main_nav', /* where in the theme it's assigned */\n \t\t'container_class' => 'menu', /* container class */\n\t\t\t'walker' => $walker /* customizes the output of the menu */\n\t\t\t\n \t));\n}", "function theme_nav_menus(){\n register_nav_menus( array(\n 'main'=>'Main Menu',\n 'footer'=>'Footer Menu'\n ) );\n}", "function my_admin_bar_link() {\n global $wp_admin_bar;\n if ( !is_super_admin() || !is_admin_bar_showing() )\n return;\n $wp_admin_bar->add_menu( array(\n 'id' => 'sharpmachine',\n 'parent' => 'wp-logo',\n 'title' => __( 'Sharp Machine Media'),\n 'href' => 'http://www.sharpmachinemedia.com'\n ) );\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'mailchimp',\n 'parent' => 'wp-logo-external',\n 'title' => __( 'Mailchimp'),\n 'href' => 'http://login.mailchimp.com'\n ) );\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'analytics',\n 'parent' => 'wp-logo-external',\n 'title' => __( 'Analytics'),\n 'href' => 'http://www.google.com/analytics'\n ) );\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'mail',\n 'parent' => 'wp-logo-external',\n 'title' => __( 'Mail'),\n 'href' => 'http://mail.'. substr(get_bloginfo('url'), 7).''\n ) );\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'calendar',\n 'parent' => 'wp-logo-external',\n 'title' => __( 'Calendar'),\n 'href' => 'http://calendar.'. substr(get_bloginfo('url'), 7).''\n ) );\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'docs',\n 'parent' => 'wp-logo-external',\n 'title' => __( 'Docs'),\n 'href' => 'http://docs.'. substr(get_bloginfo('url'), 7).''\n ) );\n}", "function basetheme_nav_init()\n{\n\n\tregister_nav_menus( array(\n 'header' => 'Header',\n 'footer' => 'Footer'\n\t) );\n\n}", "public function main_navigation(){\r\n\r\n echo \"<ul>\";\r\n\r\n if(isset($this->navigationSettings)){\r\n\r\n foreach((array) $this->navigationSettings as $key => $value){\r\n echo \"<li>\";\r\n echo \"<a href='$value'>$key</a>\";\r\n echo \"</li>\";\r\n }\r\n\r\n }\r\n\r\n echo \"</ul>\";\r\n\r\n }", "function folio_register_nav_menu()\n{\n register_nav_menu('primary', 'Sidebar Menu');\n}", "function simple_bootstrap_display_main_menu() {\n wp_nav_menu(\n array( \n 'theme_location' => 'main_nav', /* where in the theme it's assigned */\n 'menu_class' => 'navbar-nav mr-auto',\n 'container' => false, /* container class */\n 'depth' => 2,\n 'walker' => new simple_bootstrap_Bootstrap_walker(),\n )\n );\n}", "function anipics_add_main_menu(){\n register_nav_menu('main_menu', 'Menu principal');\n}", "function ieatwp_default_menu(){ ?>\n\t\t<ul class=\"navbar navbar-right\">\n <li><a href=\"#section_intro\" class=\"easing\">Home</a></li>\n <li><a href=\"#section_about\" class=\"easing\">About</a></li>\n <li><a href=\"#section_work\" class=\"easing\">Strategy</a></li>\n <li><a href=\"#section_resume\" class=\"easing\">Resume</a></li>\n <li><a href=\"#section_portfolio\" class=\"easing\">Portfolio</a></li>\n <li><a href=\"#section_services\" class=\"easing\">Services</a></li>\n <li><a href=\"#section_contact\" class=\"easing\">Contact</a></li>\n </ul>\n<?php }", "function power_do_nav() {\n\n\t// Do nothing if menu not supported.\n\tif ( ! power_nav_menu_supported( 'primary' ) || ! has_nav_menu( 'primary' ) ) {\n\t\treturn;\n\t}\n\n\t$class = 'menu power-nav-menu menu-primary';\n\tif ( power_superfish_enabled() ) {\n\t\t$class .= ' js-superfish';\n\t}\n\n\tpower_nav_menu(\n\t\t[\n\t\t\t'theme_location' => 'primary',\n\t\t\t'menu_class' => $class,\n\t\t]\n\t);\n\n}", "function omega_register_menus() {\n\tregister_nav_menu( 'primary', _x( 'Primary', 'nav menu location', 'omega' ) );\n}", "function fp_menus() {\n\t\n \tregister_nav_menus( \n\t\tarray(\n\t\t\t'header-menu' => 'Header Menu',\n\t\t\t'footer-menu' => 'Footer Menu'\n\t\t) \n\t);\n}", "function theme_footer_links() {\n // display the wp3 menu if available\n wp_nav_menu(array(\n 'container' => '', // remove nav container\n 'container_class' => 'footer-links clearfix', // class of container (should you choose to use it)\n 'menu' => __('Footer Links', 'theme'), // nav name\n 'menu_class' => 'links footer-nav clearfix', // adding custom nav class\n 'theme_location' => 'footer-links', // where it's located in the theme\n 'before' => '', // before the menu\n 'after' => '', // after the menu\n 'link_before' => '', // before each link\n 'link_after' => '', // after each link\n 'depth' => 0, // limit the depth of the nav\n 'fallback_cb' => 'theme_footer_links_fallback', // fallback function\n ));\n}", "protected function render() {\n\n $settings = $this->get_settings();\n\n extract( $settings );\n\n $args = array(\n 'title' => $title,\n 'menu' => $menu,\n );\n\n if( function_exists( 'Alita_secondary_nav_v6' ) ) {\n Alita_secondary_nav_v6( $args);\n }\n }", "function travomath_register_nav_menu() {\n\tregister_nav_menu( 'primary', 'Header Navigation Menu' );\n\tregister_nav_menu( 'secondary', 'Footer Navigation Menu' );\n}", "function basey_head_output() { ?>\n\t<nav class=\"uk-navbar\">\n\t\t<div class=\"uk-container\">\n\t\t\t<a class=\"uk-navbar-brand\" href=\"<?php echo home_url(); ?>\"><img src=\"/wp-content/themes/dyn-build/assets/svg/build/dyn-logo-white.svg\"></a>\n\t\t\t<?php\n\t\t\twp_nav_menu( array(\n\t\t\t\t'menu' => 'primary',\n\t\t\t\t'theme_location' => 'primary',\n\t\t\t\t'depth' => 2,\n\t\t\t\t'container' => '',\n\t\t\t\t'menu_class' => 'uk-navbar-nav uk-hidden-small uk-hidden-medium',\n\t\t\t\t'fallback_cb' => 'basey_primary_menu::fallback',\n\t\t\t\t'walker' => new basey_primary_menu())\n\t\t\t);\n\t\t\t?>\n\t\t\t<div class=\"uk-navbar-flip uk-hidden-large\">\n\t\t\t\t<a href=\"#offcanvas-menu\" class=\"uk-navbar-toggle\" data-uk-offcanvas></a>\n\t\t\t</div>\n\t\t\t<div id=\"navbar-side\" class=\"uk-navbar-flip uk-hidden-small\">\n\t\t\t\t\t<ul class=\"uk-navbar-nav\">\n\t\t\t\t\t\t\t<li><a class=\"uk-text-uppercase uk-text-spaced uk-button-nav\" href=\"#main-contact\" data-uk-modal>Connect</a></li>\n\t\t\t\t\t\t\t<li><a href=\"#main-search\" data-uk-modal><i class=\"icon-search uk-icon-medium\"></i></a></li>\n\t\t\t\t\t\t\t<li class=\"uk-parent\" data-uk-dropdown=\"\" aria-haspopup=\"true\" aria-expanded=\"false\">\n <a href=\"\"><i class=\"icon-circle_account uk-icon-medium\"></i></a>\n <div class=\"uk-dropdown uk-dropdown-navbar uk-dropdown-bottom\" aria-hidden=\"true\" style=\"top: 40px; left: 0px;\" tabindex=\"\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\twp_nav_menu( array(\n\t\t\t\t\t\t\t\t\t\t\t'menu' => 'user',\n\t\t\t\t\t\t\t\t\t\t\t'theme_location' => 'user',\n\t\t\t\t\t\t\t\t\t\t\t'depth' => 2,\n\t\t\t\t\t\t\t\t\t\t\t'container' => '',\n\t\t\t\t\t\t\t\t\t\t\t'menu_class' => 'uk-nav uk-hidden-small',\n\t\t\t\t\t\t\t\t\t\t\t'fallback_cb' => 'basey_primary_menu::fallback',\n\t\t\t\t\t\t\t\t\t\t\t'walker' => new basey_primary_menu())\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t?>\n </div>\n\n </li>\n\t\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t</nav>\n\t<?php\n}", "function dynamo_support_admin_bar_links() {\n global $wp_admin_bar;\n if(current_user_can('access_tickets')) {\n $links['View Tickets'] = get_bloginfo('wpurl').'/wp-admin/edit.php?post_type=ticket';\n $links['New Ticket'] = get_bloginfo('wpurl').'/wp-admin/post-new.php?post_type=ticket';\n }\n if(current_user_can('access_knowledgebase')) {\n $links['View Knowledgebase'] = get_bloginfo('wpurl').'/wp-admin/edit.php?post_type=knowledgebase';\n $links['New Knowledgebase Article'] = get_bloginfo('wpurl').'/wp-admin/post-new.php?post_type=knowledgebase';\n }\n $menu_item = array(\n 'title' => 'Support',\n 'href' => get_bloginfo('wpurl').'/wp-admin/admin.php?page=support-dashboard',\n 'id' => 'sd_links'\n );\n if(dynamo_support_manual_count('open') != '0' && dynamo_support_manual_count('open') != '') {\n //$menu_item['title'] .=' <span id=\"ab-ticket-count\" class=\"update-count\">'.dynamo_support_manual_count('open').'</span>';\n $menu_item['title'] .=' <span id=\"\" class=\"update-count\">'.dynamo_support_manual_count('open').'</span>';\n }\n $wp_admin_bar->add_menu( $menu_item );\n\n foreach($links as $label => $url) {\n $wp_admin_bar->add_menu( array(\n 'title' => $label,\n 'href' => $url,\n 'parent' => 'sd_links',\n\t\t\t'id' => 'sd_links'\n ));\n }\n }", "function reactor_do_nav_bar() { \n\tif ( has_nav_menu('main-menu') ) {\n\t\t$nav_class = ( reactor_option('mobile_menu', 1) ) ? 'class=\"hide-for-small\" ' : ''; ?>\n\t\t<div class=\"main-nav\">\n\t\t\t<nav id=\"menu\" <?php echo $nav_class; ?>role=\"navigation\">\n\t\t\t\t<div class=\"section-container horizontal-nav\" data-section=\"horizontal-nav\" data-options=\"one_up:false;\">\n\t\t\t\t\t<?php reactor_main_menu(); ?>\n\t\t\t\t</div>\n\t\t\t</nav>\n\t\t</div><!-- .main-nav -->\n\t\t\n\t<?php\t\n\tif ( reactor_option('mobile_menu', 1) ) { ?> \n\t\t<div id=\"mobile-menu-button\" class=\"show-for-small\">\n\t\t\t<button class=\"secondary button\" id=\"mobileMenuButton\" href=\"#mobile-menu\">\n\t\t\t\t<span class=\"mobile-menu-icon\"></span>\n\t\t\t\t<span class=\"mobile-menu-icon\"></span>\n\t\t\t\t<span class=\"mobile-menu-icon\"></span>\n\t\t\t</button>\n\t\t</div><!-- #mobile-menu-button --> \n\t<?php }\n\t}\n}", "function theme_features()\n{\n register_nav_menu('headerMenuLocation', 'Header Menu Location');\n register_nav_menu('footerLocationOne', 'Footer Location One');\n register_nav_menu('footerLocationTwo', 'Footer Location Two');\n add_theme_support('title-tag');\n}", "function register_menus() {\n\tregister_nav_menu( 'main', __( 'Main Menu', 'postlight-headless-wp' ) );\n}", "function register_ac_menu() \n{\n register_nav_menu( 'primary', 'Primary Menu' );\n}", "function itcr_links__system_main_menu( $variables ) {\n\t$html = \"<div>\\n\";\n\t$html .= \" <ul>\\n\";\n\tforeach ( $variables[ 'links' ] as $link ) {\n\t\t$html .= \"<li>\" . l( $link[ 'title' ], $link[ 'path' ], $link ) . \"</li>\";\n\t}\n\t$html .= \" </ul>\\n\";\n\t$html .= \"</div>\\n\";\n\treturn $html;\n}", "function menu_theme_setup() {\r\n\t\tregister_nav_menus( array( \r\n\t\t'header' => 'Header menu', \r\n\t\t'footer' => 'Footer menu' \r\n\t\t) );\r\n\t}", "function udemy_theme_setup() {\n\tadd_theme_support('menus'); \n register_nav_menu('primary','Primary Header Navigation');\n register_nav_menu('secondary','Footer Navigation');\n\n}", "function cera_grimlock_vertical_navbar_nav_menu( $args ) {\n\t\tif ( has_nav_menu( 'primary' ) ) :\n\t\t\twp_nav_menu( wp_parse_args( $args, array(\n\t\t\t\t'theme_location' => 'primary',\n\t\t\t) ) );\n\t\tendif;\n\t}", "function flexfour_topbar_menu() {\n\t// display the wp3 menu if available\n wp_nav_menu( \n\tarray( \n\t'menu' => 'topbar', /* menu name */\n\t\t'menu_class' => 'right',\n\t\t'theme_location' => 'topbar', /* where in the theme it's assigned */\n\t\t'container' => 'false', /* container tag */\n\t\t'fallback_cb' => 'wp_page_menu', /* menu fallback */\n\t\t'depth' => '2',\n\t\t\n \t)\n );\n}", "function sp_main_navigation() {\n\t\tif ( function_exists ( 'wp_nav_menu' ) )\n\t\t\twp_nav_menu( array(\n\t\t\t\t'container' => false,\n\t\t\t\t'menu_class'\t => 'menu-nav',\n\t\t\t\t'theme_location' => 'primary_nav',\n\t\t\t\t'fallback_cb' => 'sp_main_nav_fallback'\n\t\t\t\t) );\n\t\telse\n\t\t\tsp_main_nav_fallback();\t\n\t}", "function display_multisite_global_menu() {\n\t//that caching plugin really was ridiculous, wasn't it?\n\tif (is_multisite() && !is_main_site()) {\n\t\tswitch_to_blog(1); //should send us to the main site temporarily\n\t}\n\twp_nav_menu( array (\n\t\t\"theme_location\" => \"global_menu\"\n\t\t//these werent used, divs were created in the header and footer\n\t\t//\"container\" => \"nav\",\n\t\t//\"container_class\" => \"\",\n\t\t//\"container_id\" => \"global_menu\"\n\t) );\n\t//get the nav menu from the main site context\n\tif (is_multisite() && ms_is_switched()) {\n\t\trestore_current_blog(); //revert to the network site if we switched it above\n\t}\n}", "function wp_nav_menu_setup()\n {\n }", "function gwt_drupal_links__system_main_menu($variables) {\n // $links = $variables['links'];\n $links = menu_tree_all_data('main-menu', null, 4);\n /*\n $test = '<pre>'.print_r($links, 1).'</pre>';\n return $test;\n // */\n\n // heading not needed in main menu\n $heading = $variables['heading'];\n // global $language_url;\n $output = '';\n\n $output .= _gwt_drupal_link_render($links, 0, $variables);\n\n return $output;\n}", "function anva_main_navigation_default() {\n\t\n\tif ( ! has_nav_menu( 'primary' ) ) :\n\t\tprintf( '<div class=\"well well-sm\">' . anva_get_local( 'menu_message' ) . '</div>' );\n\t\treturn '';\n\tendif;\n\n\t?>\n\t<a href=\"#\" id=\"navigation-trigger\" class=\"navigation-trigger\" title=\"<?php echo anva_get_local( 'menu' ); ?>\">\n\t\t<i class=\"fa fa-bars\"></i>\n\t</a>\n\t<nav id=\"navigation\" class=\"navigation navigation--style-2 clearfix\">\n\t\t<div class=\"container\">\n\t\t\t<?php\n\t\t\t\tbem_menu( 'primary', 'navigation-menu', array( 'clearfix' ) );\n\t\t\t?>\n\t\t</div>\n\t</nav><!-- #navigation (end) -->\n\t<?php\n}", "function jn_menu_setup() {\n register_nav_menu('primary', __('Primary Menu', 'jn'));\n}", "function sp_main_navigation() {\n\t\tif ( function_exists ( 'wp_nav_menu' ) )\n\t\t\twp_nav_menu( array(\n\t\t\t\t'container' => false,\n\t\t\t\t'menu_class'\t => 'main-menu',\n\t\t\t\t'theme_location' => 'primary_nav',\n\t\t\t\t'fallback_cb' => 'sp_main_nav_fallback'\n\t\t\t\t) );\n\t\telse\n\t\t\tsp_main_nav_fallback();\t\n\t}", "function cera_grimlock_navbar_nav_menu( $args ) {\n\t\tif ( has_nav_menu( 'primary' ) ) :\n\t\t\twp_nav_menu( wp_parse_args( $args, array(\n\t\t\t\t'theme_location' => 'primary',\n\t\t\t) ) );\n\t\tendif;\n\t}", "function admin_bar_render() {\n\tglobal $wp_admin_bar;\n\n\t// Remove an existing link using its $id\n\t// Here we remove the 'Updates' drop-down link\n\t$wp_admin_bar->remove_menu('updates');\n\n\t// Add a new top level menu link\n\t// Here we add a customer support URL link\n\t$customerSupportURL = '/wp-admin/themes.php?page=theme_options';\n\t$wp_admin_bar->add_menu( array(\n\t'parent' => false,\n\t'id' => 'bodyrock',\n\t'title' => __('bodyRock','bodyrock'),\n\t'href' => $customerSupportURL\n\t));\n\n\t// Add a new sub-menu to the link above\n\t// Here we add a link to our contact us web page\n\t$contactUsURL = 'http://bodyrock.fromscratch.xyz/';\n\t$wp_admin_bar->add_menu(array(\n\t'parent' => 'bodyrock',\n\t'id' => 'site',\n\t'title' => __('Site Officiel','bodyrock'),\n\t'href' => $contactUsURL\n\t));\n\n\t$contactUsURL = 'http://gilleshoarau.com/a-propos/';\n\t$wp_admin_bar->add_menu(array(\n\t'parent' => 'bodyrock',\n\t'id' => 'a-propos',\n\t'title' => __('A propos de l\\'auteur'),\n\t'href' => $contactUsURL\n\t));\n}", "function menu_Individuals()\n{\n\treturn wp_nav_menu(array(\n\n\t\t'echo' => false,\n\n\t\t'menu' => 'Individuals',\n\n\t\t'theme_location' => 'primary',\n\n\t\t'container' => true,\n\n\t\t'menu_class' => 'menu',\n\n\t));\n\n}", "function ks_nav() {\n\twp_nav_menu(\n\t\tarray(\n\t\t\t'theme_location' => 'header-menu',\n\t\t\t'menu' => '',\n\t\t\t'container' => 'div',\n\t\t\t'container_class' => 'menu-{menu slug}-container',\n\t\t\t'container_id' => '',\n\t\t\t'menu_class' => 'menu',\n\t\t\t'menu_id' => '',\n\t\t\t'echo' => true,\n\t\t\t'fallback_cb' => 'wp_page_menu',\n\t\t\t'before' => '',\n\t\t\t'after' => '',\n\t\t\t'link_before' => '',\n\t\t\t'link_after' => '',\n\t\t\t'items_wrap' => '<ul>%3$s</ul>',\n\t\t\t'depth' => 0,\n\t\t\t'walker' => ''\n\t\t)\n\t);\n}", "function thoughts_register_theme_menu() {\n register_nav_menu( 'primary', 'Main Navigation Menu' );\n}", "function katayam_theme_setup() {\r\n\t\r\n\tadd_theme_support('menus');\r\n\t\r\n\tregister_nav_menu('primary', 'Primary Header Navigation');\r\n\tregister_nav_menu('secondary', 'Footer Navigation');\r\n\t\r\n}", "function add_Main_Nav() {\n\tregister_nav_menu('header-menu',__( 'Header Menu' ));\n}", "function oh_nav()\n{\n\twp_nav_menu(\n\tarray(\n\t\t'theme_location' => 'header-menu',\n\t\t'menu' => '',\n\t\t'container' => 'div',\n\t\t'container_class' => 'menu-{menu slug}-container',\n\t\t'container_id' => '',\n\t\t'menu_class' => 'menu',\n\t\t'menu_id' => '',\n\t\t'echo' => true,\n\t\t'fallback_cb' => 'wp_page_menu',\n\t\t'before' => '',\n\t\t'after' => '',\n\t\t'link_before' => '',\n\t\t'link_after' => '',\n\t\t'items_wrap' => '<ul class=\"nav navbar-nav navbar-right no-margin alt-font text-normal\" data-in=\"fadeIn\" data-out=\"fadeOut\">%3$s</ul>',\n\t\t'depth' => 0,\n\t\t'walker' => ''\n\t\t)\n\t);\n}", "function links__system_secondary_menu($vars){\n $menu_links = menu_tree_output(menu_tree_all_data('main-menu'));\n\n // Initialize some variables to prevent errors\n $output = '';\n $sub_menu = '';\n\n foreach ($menu_links as $key => $link) {\n // Add special class needed for Foundation dropdown menu to work\n !empty($link['#below']) ? $link['#attributes']['class'][] = 'has-dropdown' : '';\n\n // Render top level and make sure we have an actual link\n if (!empty($link['#href'])) {\n $output .= '<li' . drupal_attributes($link['#attributes']) . '>' . l($link['#title'], $link['#href']);\n // Get sub navigation links if they exist\n foreach ($link['#below'] as $key => $sub_link) {\n if (!empty($sub_link['#href'])) {\n $sub_menu .= '<li>' . l($sub_link['#title'], $sub_link['#href']) . '</li>';\n }\n\n }\n $output .= !empty($link['#below']) ? '<ul class=\"dropdown\">' . $sub_menu . '</ul>' : '';\n\n // Reset dropdown to prevent duplicates\n unset($sub_menu);\n $sub_menu = '';\n\n $output .= '</li>';\n }\n }\n return $output;\n}", "function ento_cdn_menu_link(array $variables) {\n $element = $variables['element'];\n $sub_menu = '';\n\n if ($element['#below']) {\n // Prevent dropdown functions from being added to management menu so it\n // does not affect the navbar module.\n if (($element['#original_link']['menu_name'] == 'management') && (module_exists('navbar'))) {\n $sub_menu = drupal_render($element['#below']);\n }\n elseif ((!empty($element['#original_link']['depth'])) && ($element['#original_link']['depth'] == 1)) {\n // Add our own wrapper.\n unset($element['#below']['#theme_wrappers']);\n $sub_menu = '<ul class=\"dropdown-menu\">' . drupal_render($element['#below']) . '</ul>';\n // Generate as standard dropdown.\n $element['#title'] .= ' <span class=\"caret\"></span>';\n $element['#attributes']['class'][] = 'dropdown';\n $element['#localized_options']['html'] = TRUE;\n\n // Set dropdown trigger element to # to prevent inadvertant page loading\n // when a submenu link is clicked.\n $element['#localized_options']['attributes']['data-target'] = '#';\n $element['#localized_options']['attributes']['class'][] = 'dropdown-toggle';\n $element['#localized_options']['attributes']['data-toggle'] = 'dropdown';\n }\n }\n // On primary navigation menu, class 'active' is not set on active menu item.\n // @see https://drupal.org/node/1896674\n if (($element['#href'] == $_GET['q'] || ($element['#href'] == '<front>' && drupal_is_front_page())) && (empty($element['#localized_options']['language']))) {\n $element['#attributes']['class'][] = 'active';\n }\n\n $output = l($element['#title'], $element['#href'], $element['#localized_options']);\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . \"</li>\\n\";\n}", "function church_admin_admin_bar_render() {\n\n global $wp_admin_bar;\n // Add a new top level menu link\n // Here we add a customer support URL link\n $wp_admin_bar->add_menu( array('parent' => false, 'id' => 'church_admin', 'title' => __('Church Admin','church-admin'), 'href' => admin_url().'admin.php?page=church_admin/index.php' ));\n $wp_admin_bar->add_menu(array('parent' => 'church_admin','id' => 'church_admin_settings', 'title' => __('Settings','church-admin'), 'href' => admin_url().'admin.php?page=church_admin/index.php&action=church_admin_settings' ));\n\t//$wp_admin_bar->add_menu(array('parent' => 'church_admin','id' => 'church_admin_permissions', 'title' => __('Permissions','church-admin'), 'href' => admin_url().'admin.php?page=church_admin_permissions' ));\n $wp_admin_bar->add_menu(array('parent' => 'church_admin','id' => 'plugin_support', 'title' => __('Plugin Support','church-admin'), 'href' => 'http://www.churchadminplugin.com/support/' ));\n}", "function custom_theme_setup() {\n register_nav_menus( array( \n 'header' => 'Header menu', \n 'footer' => 'Footer menu' \n ) );\n}", "function wob_setup() {\n register_nav_menus( array(\n 'primary' => esc_html__( 'Primary', 'acstarter' ),\n 'sitemap' => esc_html__( 'Sitemap', 'acstarter' ),\n ) );\n\n}", "function lepetitfleur_register_nav_menu() {\n\tregister_nav_menu('primary', 'Header Navigtion Menu' );\n}", "function cwd_wp_bootstrapwp_theme_setup() {\n register_nav_menus( array(\n 'front-main-menu' => __( 'Main Menu', 'cwd_wp_bootstrapwp' ),\n 'main-menu' => __( 'Main Menu', 'cwd_wp_bootstrapwp' ),\n 'social-footer' => 'Social Footer Links',\n ) );\n }", "function tccc_theme_menu_link(array $variables) {\n \n $element = $variables['element'];\n $output = '';\n $sub_menu = '';\n \n if ($element['#below']) {\n $sub_menu = drupal_render($element['#below']);\n }\n \n \n //If dummy output different markup \n if($element['#href'] == 'dummy'){\n $output .= '<div class=\"category-link\">' . $element['#title'] . '</div>';\n }\n \n elseif($element['#href'] == 'column'){\n \n $element['#attributes']['class'][] = 'column';\n $output .= '';\n \n }\n \n else {\n $output .= l($element['#title'], $element['#href'], $element['#localized_options']); \n\n if($element['#original_link']['depth'] == 1){\n $output .= '<div class=\"arrow-pointer\"></div>';\n } \n \n }\n \n \n return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . \"</li>\\n\";\n}", "function template_navigation() {\n\t\t$_ENV['menu'] = array();\n\t\t$_ENV['menu']['Main'] = _URL_;\n\t\tModule::includes('menus');\n\t\t$_ENV['menu']['Preferences'] = '?module=prefs';\n\t\t$_ENV['menu']['Logout'] = '?logout=true';\n\n\t\t$buffer = '<ul><li><h2>';\n\t\t$buffer .= array_key_exists('Menu',$_ENV['imgs']['menu']) \n\t\t\t? '<img src=\"'.$_ENV['imgs']['menu']['Menu'].'\" border=\"0\" /> ' : ' ';\n\t\t$buffer .= ' Main Menu</h2><ul>';\n\t\tforeach ($_ENV['menu'] as $module => $items) {\n\t\t\tif (is_array($items)) {\n\t\t\t\t$buffer .= '<li><a href=\"#\">';\n\t\t\t\t$buffer .= array_key_exists($module,$_ENV['imgs']['menu'])\n\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$module].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t$buffer .= $module.'</a><ul>';\n\t\t\t\tforeach ($items as $label => $url) {\n\t\t\t\t\t$buffer .= '<li><a href=\"'.$url.'\">';\n\t\t\t\t\t$buffer .= array_key_exists($label,$_ENV['imgs']['menu'])\n\t\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$label].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t\t$buffer .= $label.'</a></li>';\n\t\t\t\t}\n\t\t\t\t$buffer .= '</ul></li>';\n\t\t\t} else {\n\t\t\t\t$buffer .= '<li><a href=\"'.$items.'\">';\n\t\t\t\t$buffer .= array_key_exists($module,$_ENV['imgs']['menu'])\n\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$module].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t$buffer .= $module.' </a></li>';\n\t\t\t}\t\n\t\t}\n\t\t$buffer .= '</ul></li></ul>';\n\t\treturn $buffer;\n\t}", "function menu_footer_company()\n{\n\treturn wp_nav_menu(array(\n\n\t\t'echo' => false,\n\n\t\t'menu' => 'Footer menu',\n\n\t\t'theme_location' => 'primary',\n\n\t\t'container' => true,\n\n\t\t'menu_class' => 'menu',\n\n\t));\n\n}", "function mpcth_aside_menu(){\r\n\tglobal $mpcth_cake;\r\n\r\n\tif($mpcth_cake['menuPosition'] == 'page'):\r\n\t\tif(has_nav_menu('main')): \r\n\t\t\twp_nav_menu(array( \r\n\t\t\t\t\t\t'theme_location' => 'main', \r\n\t\t\t\t\t\t'container' => '', \r\n\t\t\t\t\t\t'menu_id' => 'mpcth_menu')); \r\n\t\telse: \r\n\t\t\techo '<ul id=\"nav\">';\r\n\t\t\t\twp_list_pages('title_li='); \r\n\t\t\techo '</ul>';\r\n\t\tendif;\r\n\tendif;\r\n}", "function mocca_custom_menu() {\n\n register_nav_menus(array(\n 'bootstrap-menu' => 'Navigtion Bar',\n 'footer-menu' => 'footer Bar',\n ));\n }", "function theme_main_nav_fallback() {\n wp_page_menu(array(\n 'show_home' => true,\n 'menu_class' => 'nav footer-nav clearfix', // adding custom nav class\n 'include' => '',\n 'exclude' => '',\n 'echo' => true,\n 'link_before' => '', // before each link\n 'link_after' => '', // after each link\n ));\n}", "function social_media_menu() {\r\n // display the WordPress Custom Menu if available\r\n wp_nav_menu(array(\r\n 'menu' => 'social-media',\r\n 'theme_location' => 'social',\r\n 'depth' => 2,\r\n 'container' => 'div',\r\n 'container_class' => 'collapse navbar-collapse navbar-ex1-collapse',\r\n 'menu_class' => 'nav navbar-nav soc-med',\r\n 'fallback_cb' => 'wp_bootstrap_navwalker::fallback',\r\n 'walker' => new wp_bootstrap_navwalker()\r\n ));\r\n}", "function show_my_menus(){\n register_nav_menu('mainmenu', 'Huvudmeny');\n register_nav_menu('footermenu', 'Sociala medier');\n register_nav_menu('sidemenu', 'Sidomeny');\n register_nav_menu('blogsidepage', 'Blogg sidomeny sidor');\n register_nav_menu('blogsidearchive', 'Blogg sidomeny arkiv');\n register_nav_menu('blogsidecategory', 'Blogg sidomeny kategorier');\n}", "function theme_setup() {\n register_nav_menus( array(\n 'primary' => __( 'Primary Menu', '%%%PACKAGE_NAME%%%' ),\n 'footer' => __('Footer Menu', '%%%PACKAGE_NAME%%%' )\n ) );\n }", "public function nav()\n\t{\n\t\t$nav['dashboard'] = array('name' => Blocks::t('Dashboard'));\n\t\t$nav['content'] = array('name' => Blocks::t('Content'));\n\t\t$nav['assets'] = array('name' => Blocks::t('Assets'));\n\n\t\tif (Blocks::hasPackage(BlocksPackage::Users) && blx()->userSession->checkPermission('editUsers'))\n\t\t{\n\t\t\t$nav['users'] = array('name' => Blocks::t('Users'));\n\t\t}\n\n\t\t// Add any Plugin nav items\n\t\t$plugins = blx()->plugins->getPlugins();\n\n\t\tforeach ($plugins as $plugin)\n\t\t{\n\t\t\tif ($plugin->hasCpSection())\n\t\t\t{\n\t\t\t\t$lcHandle = strtolower($plugin->getClassHandle());\n\t\t\t\t$nav[$lcHandle] = array('name' => $plugin->getName());\n\n\t\t\t\t// Does the plugin have an icon?\n\t\t\t\t$resourcesPath = blx()->path->getPluginsPath().$lcHandle.'/resources/';\n\n\t\t\t\tif (IOHelper::fileExists($resourcesPath.'icon-16x16.png'))\n\t\t\t\t{\n\t\t\t\t\t$nav[$lcHandle]['hasIcon'] = true;\n\n\t\t\t\t\t$url = UrlHelper::getResourceUrl($lcHandle.'/icon-16x16.png');\n\t\t\t\t\tblx()->templates->includeCss(\"#sidebar #nav-{$lcHandle} { background-image: url('{$url}'); }\");\n\n\t\t\t\t\t// Does it even have a hi-res version?\n\t\t\t\t\tif (IOHelper::fileExists($resourcesPath.'icon-32x32.png'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$url = UrlHelper::getResourceUrl($lcHandle.'/icon-32x32.png');\n\t\t\t\t\t\tblx()->templates->includeHiResCss(\"#sidebar #nav-{$lcHandle} { background-image: url('{$url}'); }\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (blx()->userSession->checkPermission('autoUpdateBlocks'))\n\t\t{\n\t\t\t$numberOfUpdates = blx()->updates->getTotalNumberOfAvailableUpdates();\n\n\t\t\tif ($numberOfUpdates > 0)\n\t\t\t{\n\t\t\t\t$nav['updates'] = array('name' => Blocks::t('Updates'), 'badge' => $numberOfUpdates);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$nav['updates'] = array('name' => Blocks::t('Updates'));\n\t\t\t}\n\t\t}\n\n\t\tif (blx()->userSession->isAdmin())\n\t\t{\n\t\t\t$nav['settings'] = array('name' => Blocks::t('Settings'));\n\t\t}\n\n\t\treturn $nav;\n\t}", "function thiredtheme_menu_item()\n {\n register_nav_menus(\n array(\n 'header'=>__('header menu'),\n 'footer'=>__('footer menu'))); \n }", "function get_registered_nav_menus()\n {\n }", "function ou_df_menu_link(&$variables) {\n $element = $variables['element'];\n $sub_menu = '';\n\n if ($element['#below']) {\n $sub_menu = drupal_render($element['#below']);\n }\n\n $title = $element['#title'];\n if (empty($element['#localized_options']['html'])) {\n $title = check_plain($title);\n }\n $element['#localized_options']['html'] = TRUE;\n $output = l('<span>' . $title . '</span>', $element['#href'], $element['#localized_options']);\n\n if (in_array('active', $element['#attributes']['class']) || in_array('active-trail', $element['#attributes']['class'])) {\n $element['#attributes']['class'][] = 'int-nav-active';\n }\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . \"</li>\\n\";\n}", "function quadro_site_menu() {\n\tglobal $quadro_options;\n\tif ( $quadro_options['menu_header_display'] == 'hide' ) return false;\n\t?>\n\t<h1 class=\"menu-toggle\">\n\t\t<a href=\"#msite-navigation\">\n\t\t\t<span class=\"menu-toggle-icon menu-toggle-icon-1\"></span>\n\t\t\t<span class=\"menu-toggle-icon menu-toggle-icon-2\"></span>\n\t\t\t<span class=\"menu-toggle-icon menu-toggle-icon-3\"></span>\n\t\t</a>\n\t</h1>\n\t<nav id=\"site-navigation\" class=\"main-navigation\">\n\t\t<div class=\"inner-nav\">\n\t\t\t<a class=\"skip-link screen-reader-text\" href=\"#content\"><?php esc_html_e( 'Skip to content', 'indigo' ); ?></a>\n\t\t\t<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>\n\t\t</div>\n\t</nav><!-- #site-navigation -->\n\t<?php\n}", "function simpleton_navmenu() {\n\nif ( function_exists( 'wp_nav_menu' ) )\n\twp_nav_menu( 'menu_class=toppagenavi&fallback_cb=simpleton_navmenu_fallback&theme_location=mainmenu' );\nelse\n\tsimpleton_navmenu_fallback();\n}", "function header_large_menu() {\n\n wp_nav_menu(array(\n 'container' => false, // remove nav container\n 'menu_class' => 'header-large-menu', // adding custom nav class\n 'theme_location' => 'header-large', // where it's located in the theme\n 'depth' => 0, // limit the depth of the nav\n ));\n\n}", "function register_my_menu() {\n register_nav_menu('header-menu',__( 'Header Menu' ));\n}", "function register_my_menu() {\n register_nav_menu('main-menu',__( 'Navegador Primario' ));\n }", "function register_menus() { \n register_nav_menus(\n array(\n 'main-menu' => 'Main Menu', //primary menu\n )\n ); \n}", "function sp_footer_navigation() {\n\t\tif ( function_exists ( 'wp_nav_menu' ) )\n\t\t\twp_nav_menu( array(\n\t\t\t\t'container' => false,\n\t\t\t\t'menu_class'\t => 'footer-nav',\n\t\t\t\t'after'\t\t \t => ' &nbsp;',\n\t\t\t\t'theme_location' => 'footer_nav',\n\t\t\t\t'fallback_cb'\t => 'sp_footer_nav_fallback'\n\t\t\t\t));\t\n\t\telse\n\t\t\tsp_footer_nav_fallback();\t\n\t}", "function wimbase_menu_link(array $variables) {\n $element = $variables['element'];\n $sub_menu = '';\n $icon = NULL;\n\n $menu_icon = isset($element['#localized_options']['menu_icon']) ? $element['#localized_options']['menu_icon'] : NULL;\n // Add menu item icon.\n if (is_array($menu_icon) && $menu_icon['enable'] && $menu_icon['path']) {\n $icon = '<span><img class=\"item-icon rs_skip\" src=\"' . image_style_url($menu_icon['image_style'], $menu_icon['path']) . '\"></span>';\n $element['#localized_options']['html'] = TRUE;\n }\n if ($element['#below']) {\n // Prevent dropdown functions from being added to management menu so it\n // does not affect the navbar module.\n if (($element['#original_link']['menu_name'] === 'management') && (module_exists('navbar'))) {\n $sub_menu = drupal_render($element['#below']);\n }\n elseif ((!empty($element['#original_link']['depth'])) && ($element['#original_link']['depth'] == 1)) {\n // Add our own wrapper.\n unset($element['#below']['#theme_wrappers']);\n $sub_menu = '<ul class=\"dropdown-menu\">' . drupal_render($element['#below']) . '</ul>';\n // Generate as standard dropdown.\n $element['#attributes']['class'][] = 'dropdown';\n $element['#localized_options']['html'] = TRUE;\n\n // Set dropdown trigger element to # to prevent inadvertant page loading\n // when a submenu link is clicked.\n $element['#localized_options']['attributes']['data-target'] = '#';\n $element['#localized_options']['attributes']['class'][] = 'dropdown-toggle';\n $element['#localized_options']['attributes']['data-toggle'] = 'dropdown';\n }\n }\n // On primary navigation menu, class 'active' is not set on active menu item.\n // @see https://drupal.org/node/1896674\n if (($element['#href'] == $_GET['q'] || ($element['#href'] === '<front>' && drupal_is_front_page())) && (empty($element['#localized_options']['language']))) {\n $element['#attributes']['class'][] = 'active';\n }\n $element['#attributes']['class'] = array_diff($element['#attributes']['class'], ['expanded']);\n\n $output = l($icon . $element['#title'], $element['#href'], $element['#localized_options']);\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . \"</li>\\n\";\n}", "function register_my_menu() {\n register_nav_menu( 'blog-menu', __( 'Blog Menu' ) );\n}", "function st_blog_primary_menu()\n\t{\n\n\t\t?>\n\t\t<ul id=\"menu\">\n\t\t\t<li><a href=\"<?php echo esc_url( home_url( '/' ) );?>\"><?php esc_html_e('Home','st-blog');?></a></li>\n\t\t\t<li><a href=\"<?php echo esc_url( admin_url( '/nav-menus.php' ) );?>\"><?php esc_html_e('Set Primary Menu','st-blog');?></a></li>\n\t\t</ul>\n\t<?php\n\t}", "function lcarsframework_admin_bar() {\n\n\t\t$menu = $this->menu_settings();\n\t\tglobal $wp_admin_bar;\n\n\t\t$wp_admin_bar->add_menu( array(\n\t\t\t'parent' => 'appearance',\n\t\t\t'id' => 'of_theme_lcars',\n\t\t\t'title' => __( 'Theme lcars', 'lcarsframework' ),\n\t\t\t'href' => admin_url( 'themes.php?page=' . $menu['menu_slug'] )\n\t\t) );\n\t}", "function sunset_register_nav_menu() {\n\tregister_nav_menu( 'primary', 'Header Navigation Menu' );\n\tregister_nav_menu( 'top-header', 'Top Header Navigation Menu' );\n}", "function register_my_menus() {\n register_nav_menus (\n array(\n 'top-menu' => 'Top menu'\n )\n );\n}", "function registerMenus() {\n\t\t\tregister_nav_menu( 'nav-1', __( 'Top Navigation' ) );\n\t\t}", "function theme_admin_bar_render() {\n\tinclude_once(ABSPATH . 'wp-admin/includes/plugin.php');\n\t\n\t\n\tglobal $wp_admin_bar;\n\t\n\t\n\t$wp_admin_bar->add_menu(array( \n\t\t'id' => CMSMS_SHORTNAME . '_options', \n\t\t'title' => __('Theme Settings', 'cmsmasters'), \n\t\t'href' => admin_url('admin.php?page=cmsms-settings') \n\t));\n\t\n\t$wp_admin_bar->add_menu(array( \n\t\t'parent' => CMSMS_SHORTNAME . '_options', \n\t\t'id' => CMSMS_SHORTNAME . '_theme_settings', \n\t\t'title' => __('Theme Settings', 'cmsmasters'), \n\t\t'href' => admin_url('admin.php?page=cmsms-settings') \n\t));\n\t\n\t\n\tif (is_plugin_active('contact-form-builder/contact-form-builder.php')) {\n\t\t$wp_admin_bar->add_menu(array( \n\t\t\t'parent' => CMSMS_SHORTNAME . '_options', \n\t\t\t'id' => CMSMS_SHORTNAME . '_form_builder', \n\t\t\t'title' => __('Form Builder', 'cmsmasters'), \n\t\t\t'href' => admin_url('admin.php?page=form-builder') \n\t\t));\n\t}\n}", "function register_my_menu() {\n register_nav_menu('footer-menu',__( 'Footer Menu' ));\n}", "function wimbase_menu_link__main_menu($variables) {\n $element = $variables['element'];\n $sub_menu = '';\n\n if ($element['#below']) {\n // Prevent dropdown functions from being added to management menu so it\n // does not affect the navbar module.\n if ((!empty($element['#original_link']['depth'])) && ($element['#original_link']['depth'] == 1)) {\n // Build parent item for mobile.\n $parent = '<li class=\"mobile parent-subitem\">' . l($element['#title'], $element['#href']) . '</li>';\n\n unset($element['#below']['#theme_wrappers']);\n\n // Add our own wrapper.\n $sub_menu = '<ul class=\"dropdown-menu\">' . $parent . drupal_render($element['#below']) . '</ul>';\n\n // Generate as standard dropdown.\n $element['#attributes']['class'][] = 'parent-dropdown';\n $element['#localized_options']['html'] = TRUE;\n }\n $element['#attributes']['class'] = array_diff($element['#attributes']['class'], ['expanded']);\n }\n\n // On primary navigation menu, class 'active' is not set on active menu item.\n // @see https://drupal.org/node/1896674\n if (($element['#href'] == $_GET['q'] || ($element['#href'] === '<front>' && drupal_is_front_page())) && (empty($element['#localized_options']['language']))) {\n $element['#attributes']['class'][] = 'active';\n }\n\n $output = l($element['#title'], $element['#href'], $element['#localized_options']);\n\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . \"</li>\\n\";\n}", "function gymfitness_menus(){ \n register_nav_menus(array(\n 'menu-principal' =>__('Menu principal', 'gymfitness'),\n 'menu-principal2' =>__('Menu principal2', 'gymfitness')\n\n ));\n}", "function full_width_nav() { ?>\n\t<div id=\"nav_area\" class=\"full_width\">\n\t\t<div class=\"page\">\n\t\t\t<?php thesis_nav_menu(); ?>\n\t\t</div>\n\t</div>\n<?php }", "function rt_custom_menu() {\n register_nav_menus(\n array(\n 'top-nav' => __ ('Top menu'),\n 'bottom-nav' => __ ('Bottom menu'),\n )\n );\n}", "function sp_footer_navigation() {\n\t\tif ( function_exists ( 'wp_nav_menu' ) )\n\t\t\twp_nav_menu( array(\n\t\t\t\t'container' => false,\n\t\t\t\t'menu_class'\t => 'footer-nav',\n\t\t\t\t'after'\t\t \t => ' ',\n\t\t\t\t'theme_location' => 'footer_nav',\n\t\t\t\t'fallback_cb'\t => 'sp_footer_nav_fallback'\n\t\t\t\t));\t\n\t\telse\n\t\t\tsp_footer_nav_fallback();\t\n\t}", "function artspace_aboutmenu() {\n\n\t$locations = array(\n\t\t'orange' => __( 'Top About Menu', 'text_domain' ),\n\t);\n\tregister_nav_menus( $locations );\n\n}", "function elzero_add_menu() {\n // register_nav_menu('manin-menu', __('Main Navigation Menu'));\n register_nav_menus(array(\n 'main-menu' => 'Main Navigation Menu',\n 'footer-menu' => 'Footer Classic Menu'\n ));\n}", "function get_navbar($menu) \n{\n\t$html = \"<nav class='navbar'>\\n\";\n\tforeach($menu['items'] as $item) \n\t{\n\t\tif(basename($_SERVER['SCRIPT_FILENAME']) == $item['url'])\n\t\t{\n\t\t\t$item['class'] .= ' selected'; \n\t\t}\n\t\t$html .= \"<p><a href='{$item['url']}' class='{$item['class']}'>{$item['text']}</a>\\n</p>\";\n\t}\n\t$html .= \"</nav>\";\n\treturn $html;\n}", "function theme_features() {\n register_nav_menu('headerMenu', 'Header Menu Location');\n // relevant titles to the browsers tab\n add_theme_support('title-tag');\n}", "function dokan_dashboard_nav( $active_menu = '' ) {\n\n $nav_menu = dokan_get_dashboard_nav();\n $active_menu_parts = explode( '/', $active_menu );\n\n if ( isset( $active_menu_parts[1] ) && $active_menu_parts[0] == 'settings' && array_key_exists( $active_menu_parts[1], $nav_menu['settings']['sub'] ) ) {\n $urls = $nav_menu['settings']['sub'];\n $active_menu = $active_menu_parts[1];\n } else {\n $urls = $nav_menu;\n }\n\n $menu = '<ul class=\"dokan-dashboard-menu\">';\n\n foreach ($urls as $key => $item) {\n $class = ( $active_menu == $key ) ? 'active ' . $key : $key;\n $menu .= sprintf( '<li class=\"%s\"><a href=\"%s\">%s %s</a></li>', $class, $item['url'], $item['icon'], $item['title'] );\n }\n\n $common_links = '<li class=\"dokan-common-links dokan-clearfix\">\n <a title=\"' . __( 'Visit Store', 'dokan-lite' ) . '\" class=\"tips\" data-placement=\"top\" href=\"' . dokan_get_store_url( get_current_user_id()) .'\" target=\"_blank\"><i class=\"fa fa-shopping-bag\"></i></a>\n <a title=\"' . __( 'Edit Account', 'dokan-lite' ) . '\" class=\"tips\" data-placement=\"top\" href=\"' . dokan_get_navigation_url( 'mon-compte' ) . '\"><i class=\"fa fa-user\"></i></a>\n <a title=\"' . __( 'Log out', 'dokan-lite' ) . '\" class=\"tips\" data-placement=\"top\" href=\"' . wp_logout_url( home_url() ) . '\"><i class=\"fa fa-power-off\"></i></a>\n </li>';\n\n $menu .= apply_filters( 'dokan_dashboard_nav_common_link', $common_links );\n\n $menu .= '</ul>';\n\n return $menu;\n}", "function ve_get_header_navigation() {\n?>\n<ul class=\"nav navbar-nav\">\n\t<li><a href=\"<?php echo home_url() ?>\">Front page <span class=\"sr-only\">(current)</span></a></li>\n\t<li class=\"dropdown\">\n\t\t<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-haspopup=\"true\" aria-expanded=\"false\">Companies <span class=\"caret\"></span></a>\n\t\t<ul class=\"dropdown-menu purple\">\n\t\t\t<?php ve_get_company_navigation() ?>\n\t\t</ul>\n\t<li class=\"dropdown\">\n\t <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-haspopup=\"true\" aria-expanded=\"false\">Partnership <span class=\"caret\"></span></a>\n\t <ul class=\"dropdown-menu turquoise\">\n\t\t<?php ve_get_group_of_companies_navigation() ?>\n\t </ul>\n\t</li>\n</ul>\n<?php\n}", "function gymfitness_menus() {\n register_nav_menus( array(\n 'menu-principal' => __( 'Menu Principal', 'gymfitness' )\n ));\n}", "function public_nav_main()\n{\n $view = get_view();\n $nav = new Omeka_Navigation;\n $nav->loadAsOption(Omeka_Navigation::PUBLIC_NAVIGATION_MAIN_OPTION_NAME);\n $nav->addPagesFromFilter(Omeka_Navigation::PUBLIC_NAVIGATION_MAIN_FILTER_NAME);\n return $view->navigation()->menu($nav);\n}", "function uwwtd_menu_link__main_menu(&$variables) {\n $element = $variables['element'];\n\n $sub_menu = ($element['#below'] ? drupal_render($element['#below']) : '');\n $depth = $element['#original_link']['depth'] + 1;\n\n $unused = array('leaf', 'first', 'menu-mlid-' . $element['#original_link']['mlid']);\n $element['#attributes']['class'] = array_diff($element['#attributes']['class'], $unused);\n\n $element['#attributes']['class'][] = 'menu-item';\n $element['#attributes']['class'][] = 'menu-item--depth-' . $element['#original_link']['depth'];\n\n $element['#localized_options']['html'] = TRUE;\n $element['#localized_options']['attributes']['class'][] = 'menu-link';\n $element['#localized_options']['attributes']['class'][] = 'menu-link--depth-' . $element['#original_link']['depth'];\n\n if (!empty($sub_menu)) {\n // Wrap menu-level for each level.\n $sub_menu = '<div class=\"menu-level menu-level--' . $depth . '\">' . $sub_menu . '</div>';\n }\n // krumo($element);\n if ($depth == 2 && $element['#below']) {\n $link = l('<span class=\"title\">' . $element['#title'] . ' <i style=\"float:right;line-height:20px;\" class=\"fa fa-caret-down\"></i></span>', $element['#href'], $element['#localized_options']);\n } elseif ($depth == 3 && $element['#below']) {\n $link = l('<span class=\"title\">' . $element['#title'] . ' <i style=\"float:right;line-height:20px;\" class=\"fa fa-caret-right\"></i></span>', $element['#href'], $element['#localized_options']);\n } else {\n $link = l('<span class=\"title\">' . $element['#title'] . '</span>', $element['#href'], $element['#localized_options']);\n }\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $link . $sub_menu . '</li>';\n\n}", "function custom_nav_item( $menu, stdClass $args ){\n if ( 'primary' != $args->theme_location )\n\n return $menu; \n\t\t// $menu .= '</ul><ul class=\"search-form-container\"><div class=\"search-toggle\"><i class=\"dashicons dashicons-search\"></i>\n\t\t$menu .= '</ul><ul class=\"search-form-container\"><div class=\"search-toggle\"><i class=\"fa fa-search\"></i>\n\t\t\t\t<a href=\"#search-container\" class=\"screen-reader-text\"></a>\n\t\t\t\t</div>'; \n return $menu; \n}", "function adwr_menu_link($vars) {\n //gs\n $menu_class = str_replace(' ', '-', strtolower($vars['element']['#original_link']['link_title']));\n $vars['element']['#attributes']['class'][] = 'menu-li-' . $menu_class;\n if (isset($variables['element']['#localized_options'])) {\n $vars['element']['#localized_options']['attributes']['class'][] = 'menu-' . $menu_class;\n }\n return theme_menu_link($vars);\n}", "function urbanfitness_menus()\n{\n // Wordpress Function\n //registering menu we created\n //pass in a associative array\n register_nav_menus([\n 'main-menu' => 'Main Menu',\n ]);\n}" ]
[ "0.7113077", "0.70320904", "0.6966262", "0.6917811", "0.68781126", "0.6854585", "0.68189496", "0.6788216", "0.6774287", "0.6764216", "0.6724297", "0.6718661", "0.67095035", "0.6706072", "0.6700749", "0.6697152", "0.6693893", "0.6688484", "0.66379315", "0.66367763", "0.65934753", "0.6576236", "0.655611", "0.65440834", "0.654081", "0.65231097", "0.6517163", "0.6505183", "0.6496494", "0.6485082", "0.6483242", "0.64726216", "0.6461425", "0.64548653", "0.64385116", "0.64360887", "0.64290553", "0.64271754", "0.6423696", "0.64182514", "0.64154524", "0.64110047", "0.6409675", "0.64083445", "0.64019114", "0.64001346", "0.63985145", "0.63982356", "0.6393928", "0.63887334", "0.6387861", "0.63784766", "0.63756835", "0.6365552", "0.6365295", "0.63589424", "0.6350432", "0.63294595", "0.63274217", "0.6324408", "0.6319387", "0.63171303", "0.630982", "0.6306728", "0.62995726", "0.629548", "0.6295141", "0.6292088", "0.62909496", "0.6277163", "0.627226", "0.62635154", "0.626097", "0.6260861", "0.62592787", "0.62556916", "0.6251287", "0.6249922", "0.62401456", "0.6239246", "0.62391305", "0.623781", "0.62323004", "0.62308985", "0.6230687", "0.62237173", "0.6220596", "0.6217577", "0.6211082", "0.6204105", "0.6200518", "0.6198976", "0.61949444", "0.61880153", "0.618065", "0.6176896", "0.61752105", "0.6171742", "0.61712474", "0.6169267", "0.6169001" ]
0.0
-1
$migrate_jquery_path = drupal_get_path('theme', 'zurpal') .'/javascripts/foundation/jquerymigrate1.2.1.js';
function zurpal_preprocess_page(&$variables) { //drupal_add_js($migrate_jquery_path,array('scope'=>'header','weight'=>-20)); $app_path = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/app.js'; $topbar_path = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/jquery.foundation.topbar.js'; $options = array( 'type' => 'file', 'scope' => 'footer', ); drupal_add_js($topbar_path, $options); drupal_add_js($app_path, $options); drupal_add_js('jQuery(document).ready(function () { jQuery.noConflict(); });', 'inline'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function zurpal_js_alter(&$javascript)\n{\n// Swap out jQuery to use an updated version of the library.\n $javascript['misc/jquery.js']['data'] = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/jquery.js';\n $javascript['misc/jquery.js']['version'] = '1.9.0';\n //drupal_static_reset('drupal_add_js');\n}", "function gruppo_preprocess_html(&$variables){\n // drupal_add_js('https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js', 'external');\n drupal_add_js('https://code.jquery.com/jquery-migrate-1.2.1.min.js', 'external');\n}", "function dequeue_jquery_migrate( &$scripts){\n\tif(!is_admin()){\n\t\t$scripts->remove( 'jquery');\n\t\t$scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' );\n\t}\n}", "function paraneue_js_alter(&$js) {\n //js from core modules\n foreach ($js as $file => $value) {\n if (strpos($file, 'modules/') !== FALSE) {\n unset($js[$file]);\n }\n }\n //js from contrib modules\n foreach ($js as $file => $value) {\n if (strpos($file, '/modules/') !== FALSE) {\n unset($js[$file]);\n }\n }\n\n foreach ($js as $file => $value) {\n if (strpos($file, 'misc/') !== FALSE) {\n unset($js[$file]);\n }\n }\n\n if(theme_get_setting('paraneue_js_jquery_latest')){\n if (isset($js['misc/jquery.js'])) {\n $js['misc/jquery.js']['data'] = drupal_get_path('theme', 'paraneue') . '/js/jquery-1.8.2.min.js';\n $js['misc/jquery.js']['weight'] = -100;\n }\n }\n\n //http://www.metaltoad.com/blog/mobile-drupal-optimization-results\n if(theme_get_setting('paraneue_js_jquerycdn')){\n $version = theme_get_setting('paraneue_js_jquerycdn_version');\n if (isset($js['misc/jquery.js'])) {\n $js['misc/jquery.js']['data'] ='http://ajax.googleapis.com/ajax/libs/jquery/' . $version . '/jquery.min.js';\n $js['misc/jquery.js']['type'] = 'external';\n $js['misc/jquery.js']['weight'] = -100;\n }\n }\n\n uasort($js, 'drupal_sort_css_js');\n $i = 0;\n foreach ($js as $name => $script) {\n $js[$name]['weight'] = $i++;\n $js[$name]['group'] = JS_DEFAULT;\n $js[$name]['every_page'] = FALSE;\n }\n\n}", "function hejtiger_theme_js() {\n\n\twp_enqueue_script( 'modernizr_js' , get_template_directory_uri() . '/dist/js/modernizr.js' , '', '', false );\n\twp_enqueue_script( 'hejtiger_js' , get_template_directory_uri() . '/dist/js/hejtiger.js' , array('jquery'), '', true );\n\twp_enqueue_script( 'main_js' , get_template_directory_uri() . '/dist/js/main.js' , array('jquery'), '', true );\n\t\n}", "function _barony_base_file_additions() {\n // Add Font Awesome\n drupal_add_js('//use.fontawesome.com/76948938e9.js', 'external');\n // Add Google Fonts\n drupal_add_css('//fonts.googleapis.com/css?family=Uncial+Antiqua|Metamorphous', array('group' => CSS_THEME));\n\n // Custom additions\n drupal_add_js(drupal_get_path('theme', 'barony_base') . '/js/header-movement.js', array('type' => 'file', 'scope' => 'footer'));\n}", "function isa_remove_jquery_migrate( &$scripts) {\n if(!is_admin()) {\n $scripts->remove( 'jquery');\n $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.4.11' );\n }\n}", "function theme_page_javascript($custom_settings)\n{\n $theme_url = clearos_theme_url('AdminLTE');\n\n // The version is used to avoid upgrade/caching issues. Bump when required.\n $version = '7.0.0';\n\n // FIXME: review all of these\n return \"\n\n<script type='text/javascript' src='$theme_url/js/jquery.cookie.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.base64.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery-ui-1.11.1.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/bootstrap.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/lightbox.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.dotdotdot.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/bootstrap-dialog/bootstrap-dialog.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/metisMenu/jquery.metisMenu.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/colorpicker/bootstrap-colorpicker.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/jquery.dataTables.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/dataTables.bootstrap.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/jquery.dataTables.rowReordering.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/bootstrap-slider/bootstrap-slider.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/sparkline/jquery.sparkline.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.resize.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.pie.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.time.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.stack.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.categories.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.flot.axislabels.js'></script>\n<script type='text/javascript' src='$theme_url/js/nav-menu-\" . $custom_settings['menu'] . \".js'></script>\n\n<!--[if IE 7]>\n\n<h1>Your browser is out of date, please update your browser by going to www.microsoft.com/download</h1>\n\n<![endif]-->\n\n<!-- Theme Javascript -->\n<script type='text/javascript' src='$theme_url/js/translations.js.php?v=$version'></script>\n<script type='text/javascript' src='$theme_url/js/widgets.js?v=$version'></script>\n<script type='text/javascript' src='$theme_url/js/marketplace.js?v=$version'></script>\n\n\n\";\n}", "function upgrade_jquery() {\n\tif ( ! is_admin() ) {\n\t\twp_deregister_script( 'jquery' );\n\t\twp_enqueue_script( 'jquery-updated', 'https://code.jquery.com/jquery-3.5.1.slim.min.js' );\n\t\twp_enqueue_script( 'jquery-migrate', 'https://code.jquery.com/jquery-migrate-3.3.1.min.js' );\n\t}\n}", "function my_admin_scripts() {\n\t\t\t wp_deregister_script('jquery');\n\t\t\t wp_register_script('jquery', (\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\"), false, null);\n\t\t\t wp_enqueue_script('jquery');\n\t\t\t wp_enqueue_script( 'jquery-migrate', 'https://code.jquery.com/jquery-migrate-3.0.1.min.js', array('jquery'), '3.0.1', false );\n\t\t}", "function formation_admin_css_and_js() {\n wp_enqueue_script('admin_js', plugins_url('formation-wordpress/assets/js/admin.js'), ['jquery'], '', true);\n}", "function getModule_js() {\n return base_url('module_assets/' . $this->moduleName . '/adviser-module.js');\n }", "function theme_path()\r\n{\r\n return base_path().'/cms/local/'.Cms::getCurrentTheme().'/';\r\n}", "function _s_foundation_scripts() {\n\twp_enqueue_script( '_s-foundation', get_template_directory_uri() . '/js/foundation.js', array( 'jquery' ), '20130115' );\n\twp_enqueue_script( '_s-app', get_template_directory_uri() . '/js/app.js', array( 'jquery' ), '20130115', true );\n}", "function tm_mbr_add_jquery(){\r\n\t//wp_enqueue_style('team-member-style', plugin_dir_url( __FILE__ ).'css/team-member-style.css', array(), 1.0 );\r\n\r\n\twp_enqueue_script( 'jquery' );\r\n\r\n\tif(is_admin()){\r\n\t\twp_enqueue_script( 'lp_admin_js', plugin_dir_url( __FILE__ ).'js/admin.js', array(), 1.0, true );\r\n\t\twp_localize_script( 'lp_admin_js', 'lp_admin_ajax', array(\r\n\t\t\t'ajaxurl'=>admin_url( 'admin-ajax.php' ),\r\n\t\t));\r\n\t}else{\r\n\t\twp_enqueue_script( 'lp_front_js', plugin_dir_url( __FILE__ ).'js/front-end.js', array(), 1.0, true );\r\n\t\twp_localize_script( 'lp_front_js', 'lp_front_ajax', array(\r\n\t\t\t'ajaxurl'=>admin_url( 'admin-ajax.php' ),\r\n\t\t));\r\n\t}\r\n}", "function wpbootstrap_scripts_with_jquery()\n{\n\twp_register_script('jquery', get_template_directory_uri(). '/assetts/js/jquery-migrate-1.4.1.min.js');\n\twp_enqueue_script('jquery');\n\twp_register_script( 'bootstrap-js', get_template_directory_uri() . '/bootstrap/js/bootstrap.js', array( 'jquery' ) );\n\t// For either a plugin or a theme, you can then enqueue the script:\n\twp_enqueue_script( 'bootstrap-js' );\n}", "function pixelgarage_preprocess_html(&$vars) {\n // make sure jQuery UI and effects is loaded for anonymous users\n drupal_add_library('system', 'ui');\n drupal_add_library('system', 'effects');\n\n}", "function theme_js() {\n wp_enqueue_script( 'bootstrap-js', get_template_directory_uri . '/js/bootstrap.min.js', array('jquery'), '', true );\n}", "function load_page_assets() {\n $directory_uri = get_template_directory_uri(); ?>\n <script type=\"module\" src=\"<?php echo $directory_uri . '/modules/services/js/employers.js' ;?>\"></script>\n <link rel=\"stylesheet\" href=\"<?php echo $directory_uri . '/modules/employers/css/employers.css' ;?>\">\n <?php\n}", "function responsive_scripts_basic()\n {\n wp_register_script('foundation-mod', get_template_directory_uri() . '/js/modernizr.js', array( ), '1.0', false ); \n wp_register_script('foundation-main', get_template_directory_uri() . '/js/foundation.min.js', array( 'jquery' ), '5.0.2', true ); \n //wp_register_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', true );\n wp_register_script('foundation_init_js', get_template_directory_uri() . '/js/foundation_init.js', array('foundation-main'), '1.0', true);\n \n wp_enqueue_script( 'foundation-mod' ); \n wp_enqueue_script( 'foundation-main' ); \n wp_enqueue_script( 'foundation_init_js');\n }", "function my_theme_enqueue_scripts() {\n\tif ( ! is_admin() ) {\n\n\t\t// Register Styles\n wp_register_style('foundation', get_stylesheet_directory_uri().'/assets/vendor/foundation/css/foundation.css', $deps=array());\n wp_register_style('app', get_stylesheet_directory_uri().'/assets/app.css', $deps=array('foundation'));\n\n\t\t// Register Scripts\n wp_deregister_script('jquery');\n wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js', $deps=array(), $ver=null);\n wp_register_script('modernizr', get_stylesheet_directory_uri().'/assets/vendor/modernizr/modernizr.js');\n wp_register_script('foundation', get_stylesheet_directory_uri().'/assets/vendor/foundation/js/foundation.min.js', $deps=array('modernizr','jquery'), $ver=false, $in_footer=true);\n\n\t\t// Enqueue Styles\n wp_enqueue_style('app');\n\t\t\n\t\t// Enqueue Scripts\n\t\twp_enqueue_script('foundation');\n\t\t\t\n\t}\n}", "function head_js($includeDefaults = true)\n{\n $headScript = get_view()->headScript();\n\n if ($includeDefaults) {\n $dir = 'javascripts';\n $headScript->prependScript('jQuery.noConflict();')\n ->prependScript('window.jQuery.ui || document.write(' . js_escape(js_tag('vendor/jquery-ui')) . ')')\n // ->prependFile('//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js')\n ->prependScript('window.jQuery || document.write(' . js_escape(js_tag('vendor/jquery')) . ')')\n // ->prependFile('//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js')\n ;\n }\n return $headScript;\n}", "function fondation_jquery_plugins ($scripts) {\n // récent et minifié.\n $jquery_location = find_in_path('javascripts/jquery.min.js');\n $jquery_location = preg_replace('#^../#', '', $jquery_location);\n $scripts[0] = $jquery_location;\n\n return $scripts;\n}", "function isfnet_js_alter(&$javascript) {\n if (isset($javascript['sites/all/modules/field_group/multipage/multipage.js'])) {\n $file = \"sites/all/themes/isfnet/js/multipage.js\";\n $javascript['sites/all/modules/field_group/multipage/multipage.js'] = drupal_js_defaults($file); \n } // END: (isset($ja...\n \t $path = isset($_GET['q']) ? $_GET['q'] : '<front>';\n \t $link = url($path, array('absolute' => TRUE));\n \t if (strstr($link, \"members/\")) {\n \t\t$file = \"sites/all/themes/isfnet/js/jprofile.js\";\n \t\t$javascript[] = drupal_js_defaults($file);\n \t }\n}", "function devTheme_enqueue_script(){\r\n\twp_enqueue_script('jquery');\r\n\twp_enqueue_script('devTheme-admin-script', get_template_directory_uri() . '/admin/admin-script.js');\r\n\twp_enqueue_style('devTheme-admin-style', get_template_directory_uri() . '/admin/admin-style.css');\r\n\twp_enqueue_media();\r\n}", "function add_support_script_frontend(){\n}", "function javascript_adition(){\t\n\t\tif ( ! is_admin() ) : \n\t\t\twp_enqueue_script('jquery');\n\t\t\twp_enqueue_script('healerswiki_js',plugins_url('/',__FILE__).'js/script.js',array('jquery'));\n\t\tendif;\t\t\t\n\t\t\t\t\n\t}", "function fourthdimension_theme_js() {\n\tglobal $wp_scripts;\n\twp_register_script( 'html5_shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', '', '', false );\n\twp_register_script( 'respond_js', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', '', '', false );\n\t$wp_scripts->add_data( 'html5_shiv', 'conditional', 'lt IE 9');\n\t$wp_scripts->add_data( 'respond_js', 'conditional', 'lt IE 9');\n\n\twp_enqueue_script( 'bootstrap.min_js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '', true );\n\twp_enqueue_script( 'custom_js', get_template_directory_uri() . '/js/custom.js', array('jquery'), '', true );\t\t\n}", "function jquery_loadinganimation_init() {\n $module_path = drupal_get_path('module', 'exam');\n $js_settings = _jquery_loadinganimation_get_settings();\n drupal_add_js(array('jquery_loadinganimation' => $js_settings), 'setting');\n drupal_add_js($module_path . '/js/jquery_loadinganimation.js');\n drupal_add_css($module_path . '/css/jquery_loadinganimation.css');\n}", "function hook_sirtaqui_settings() { \r\n return array(\r\n 'list' => array(\r\n 'title' => 'List',\r\n 'page callback' => 'drupal_get_form',\r\n 'page arguments' => array('sirtaqui_displays_node_displays'),\r\n 'file' => 'sirtaqui_displays.admin.inc',\r\n 'file path' => drupal_get_path('module', 'sirtaqui_displays') . '/my_include_directory', // required \r\n ),\r\n 'init' => array(\r\n 'title' => 'Init default build mode',\r\n 'page callback' => 'drupal_get_form',\r\n 'page arguments' => array('sirtaqui_displays_init_default'),\r\n 'file' => 'sirtaqui_displays.admin.inc',\r\n // 'file path' : not required here since script stands at module's root\r\n ),\r\n );\r\n}", "function rst_scripts_method()\n{\n wp_enqueue_script('jquery');\n}", "function rps_add_script()\n{\n\n if (!is_admin()) {\n\n wp_enqueue_script('jquery');\n\n }\n\n}", "function foundationpress_scripts() {\n\t\t//https://github.com/sindresorhus/gulp-rev/blob/master/integration.md\n\t\tfunction css_asset_path($filename) {\n\t\t\t$manifest_path = dirname(dirname(__FILE__)) . '/dist/assets/css/rev-manifest.json';\n\n\t\t\tif (file_exists($manifest_path)) {\n\t\t\t\t$manifest = json_decode(file_get_contents($manifest_path), TRUE);\n\t\t\t} else {\n\t\t\t\t$manifest = [];\n\t\t\t}\n\n\t\t\tif (array_key_exists($filename, $manifest)) {\n\t\t\t\treturn $manifest[$filename];\n\t\t\t}\n\n\t\t\treturn $filename;\n\t\t}\n\n\t\tfunction js_asset_path($filename) {\n\t\t\t$manifest_path = dirname(dirname(__FILE__)) . '/dist/assets/js/rev-manifest.json';\n\n\t\t\tif (file_exists($manifest_path)) {\n\t\t\t\t$manifest = json_decode(file_get_contents($manifest_path), TRUE);\n\t\t\t} else {\n\t\t\t\t$manifest = [];\n\t\t\t}\n\n\t\t\tif (array_key_exists($filename, $manifest)) {\n\t\t\t\treturn $manifest[$filename];\n\t\t\t}\n\n\t\t\treturn $filename;\n\t\t}\n\n\t\t// Enqueue the main Stylesheet.\n\t\twp_enqueue_style(\n\t\t\t'main-stylesheet', \n\t\t\tget_template_directory_uri() . '/dist/assets/css/' . css_asset_path('app.css'),\n\t\t\tarray(),\n\t\t\tdefined( 'WP_DEBUG' ) && WP_DEBUG ? time() : THEME_VER,\n\t\t\t'all'\n\t\t);\n\n\t\t// Enqueue Founation scripts\n\t\twp_enqueue_script(\n\t\t\t'foundation',\n\t\t\tget_template_directory_uri() . '/dist/assets/js/' . js_asset_path('app.js'),\n\t\t\tarray( 'jquery' ),\n\t\t\tdefined( 'WP_DEBUG' ) && WP_DEBUG ? time() : THEME_VER,\n\t\t\ttrue\n\t\t);\n\n\t\t// Add the comment-reply library on pages where it is necessary\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\n /**\n * Unregisteres WP comment reply scrip to fix passive listeners issue\n * since the feature is not being used on the site anyways.\n */\n function wp_dereg_script_comment_reply(){\n wp_deregister_script( 'comment-reply' );\n }\n add_action('init','wp_dereg_script_comment_reply');\n\t}", "function bfc_add_scripts() {\n\twp_register_script('principal', get_template_directory_uri() . '/js/vendor/jquery.js', array(), 'null', true);\n\twp_enqueue_script('principal');\n\twp_register_script('foundation', get_template_directory_uri() . '/js/vendor/foundation.js', array(), 'null', true);\n\twp_enqueue_script('foundation');\n\twp_register_script('modernizr', get_template_directory_uri() . '/js/modernizr.js', array(), 'null', true);\n\twp_enqueue_script('modernizr');\n\twp_register_script('app', get_template_directory_uri() . '/js/app.js', array(), 'null', true);\n\twp_enqueue_script('app');\n\twp_register_script('slick', get_template_directory_uri() . '/js/slick.js', array(), 'null', true);\n\twp_enqueue_script('slick');\n}", "function themeslug_enqueue_script() {\n}", "function wpi_theme_js() {\n\n global $wp_scripts;\n\n wp_register_script('html5_shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', '', '', false);\n wp_register_script('respond_js', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', '', '', false);\n\n $wp_scripts->add_data('html5_shiv', 'conditional', 'lt IE 9');\n $wp_scripts->add_data('respond_js', 'conditional', 'lt IE 9');\n/**\n * Load javascripts used by the theme\n */\n\n\n\n \n wp_enqueue_script('main_js', get_template_directory_uri(). '/js/main.js', array('jquery'), '', true);\n wp_enqueue_script('bootstrap_js', get_template_directory_uri(). '/js/bootstrap.min.js', array('jquery'), '', true);\n \n \n \n \n\n }", "function feather_theme_scripts() {\n\n\t$VER = \"2.0\";\n\t$DEBUG = true;\n\n\t/**\n\t * Load Stylesheets\n\t */\n\n\t// Latest compiled and minified Bootstrap CSS\n\twp_enqueue_style( 'bootstrap', '//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css', array(), null );\n\n\t// Load web fonts.\n\twp_enqueue_style( 'font-serif', '//fonts.googleapis.com/css?family=Montserrat:400,700', array(), null );\n\twp_enqueue_style( 'font-sans', '//fonts.googleapis.com/css?family=Roboto:100,300,500', array(), null );\n\n\t// Font Awesome\n\t//wp_enqueue_style( 'fontawesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', array(), null );\n\n\t// Load our MAIN stylesheet.\n\twp_enqueue_style( 'main', get_stylesheet_uri(), false, $VER );\n\n\t/**\n\t * Load Scripts\n\t */\n\n\t// Grab Google CDN's latest jQuery with a protocol relative URL\n\t// It's kept in the header instead of footer to avoid conflicts with plugins.\n\tif ( ! is_admin() && current_theme_supports('jquery-cdn' ) ) {\n\t\twp_deregister_script('jquery');\n\t\twp_register_script( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js', array(), null, false );\n\t}\n\n\tif ( is_single() && comments_open() && get_option('thread_comments') ) {\n\t\twp_enqueue_script('comment-reply');\n\t}\n\n\t// Latest compiled and minified Bootstrap JavaScript\n\twp_register_script( 'bootstrap', '//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js', array( 'jquery' ), $VER, true );\n\n\t// Custom Feather theme scripts\n\t// wp_register_script( 'feather', get_template_directory_uri() . '/assets/js/scripts.js', array( 'bootstrap' ), $VER, true );\n\n\twp_enqueue_script('jquery');\n\twp_enqueue_script('bootstrap');\n\t//wp_enqueue_script('feather');\n\n}", "function admin_jquery() {\n\t\twp_enqueue_script('jquery');\n\t}", "function team_password_load_js() {\n\t$CI = &get_instance();\n\n\t$viewuri = $_SERVER['REQUEST_URI'];\n\tif (!(strpos($viewuri, '/admin/team_password/category_management') === false)) {\n\t\techo '<script src=\"' . module_dir_url('menu_setup', 'assets/jquery-nestable/jquery.nestable.js') . '\"></script>';\n\t\techo '<link href=\"' . module_dir_url('menu_setup', 'assets/font-awesome-icon-picker/css/fontawesome-iconpicker.min.css') . '\" rel=\"stylesheet\">';\n\t\techo '<script src=\"' . module_dir_url('menu_setup', 'assets/font-awesome-icon-picker/js/fontawesome-iconpicker.js') . '\"></script>';\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/js/category.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\t}\n\n\tif (!(strpos($viewuri, '/admin/team_password/view_normal') === false) || !(strpos($viewuri, '/admin/team_password/view_bank_account') === false) || !(strpos($viewuri, '/admin/team_password/view_credit_card') === false) || !(strpos($viewuri, '/admin/team_password/view_email') === false) || !(strpos($viewuri, '/admin/team_password/view_email') === false) || !(strpos($viewuri, '/admin/team_password/view_server') === false) || !(strpos($viewuri, '/admin/team_password/view_software_license') === false)) {\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/js/normal/permission.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/js/normal/share.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/js/file/file_action.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\t}\n\n\tif (!(strpos($viewuri, '/admin/team_password/team_password_mgt') === false)) {\n\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/plugins/treeview/src/js/bootstrap-treeview.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\t}\n\n\tif (!(strpos($viewuri, '/admin/team_password/add_normal') === false)) {\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/js/normal/add_normal.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\t}\n\tif (!(strpos($viewuri, '/admin/team_password/add_bank_account') === false)) {\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/js/bank_account/add_bank_account.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\t}\n\tif (!(strpos($viewuri, '/admin/team_password/add_credit_card') === false)) {\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/js/credit_card/add_credit_card.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\t}\n\tif (!(strpos($viewuri, '/admin/team_password/add_email') === false)) {\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/js/email/add_email.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\t}\n\n\tif (!(strpos($viewuri, '/admin/team_password/add_server') === false)) {\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/js/server/add_server.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\t}\n\tif (!(strpos($viewuri, '/admin/team_password/add_software_license') === false)) {\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/js/software_license/add_software_license.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\t}\n\tif (!(strpos($viewuri, '/admin/team_password/report') === false)) {\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/js/report/report.js') . '?v=' . TEAM_PASSWORD_REVISION . '\"></script>';\n\t}\n\n\tif (!(strpos($viewuri, '/admin/team_password/dashboard') === false)) {\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/plugins/highcharts/highcharts.js') . '\"></script>';\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/plugins/highcharts/modules/variable-pie.js') . '\"></script>';\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/plugins/highcharts/modules/export-data.js') . '\"></script>';\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/plugins/highcharts/modules/accessibility.js') . '\"></script>';\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/plugins/highcharts/modules/exporting.js') . '\"></script>';\n\t\techo '<script src=\"' . module_dir_url(TEAM_PASSWORD_MODULE_NAME, 'assets/plugins/highcharts/highcharts-3d.js') . '\"></script>';\n\t}\n}", "function addThemeScripts() \n {\n wp_enqueue_script('constructor-theme', CONSTRUCTOR_DIRECTORY_URI.'/js/ready.js', array('jquery'));\n }", "function bweb_scripts() {\r\n wp_enqueue_script('jquery');\r\n}", "function tm_theme_js() {\n\twp_enqueue_script('main_js', get_template_directory_uri() . '/js/min/main-min.js', array('jquery'), '', true);\n\n}", "function as_on_add_scripts() {\n // enqueue backbonejs, underscore\n add_existed_script('backbone');\n add_existed_script('underscore');\n if (as_option('as_option_smooth_scroll', '1')) {\n // Smoothscroll JS\n add_script('smoothscroll', TEMPLATEURL . '/js/smoothscroll.js', array(\n 'jquery'));\n }\n // Modernize JS\n add_script('modernizr', TEMPLATEURL . '/js/libs/modernizr.custom.js', array(\n 'jquery'));\n if (as_option('as_option_retina_img', '1')) {\n add_script('retina', TEMPLATEURL . '/js/libs/retina.min.js', array(\n 'jquery'));\n }\n add_script('front', TEMPLATEURL . '/js/front.js', array(\n 'jquery',\n 'backbone',\n 'underscore'));\n add_script('js-appear', TEMPLATEURL . '/js/libs/main.js', array(\n 'jquery',\n 'jquery'));\n //add js easing when plugin not active\n if (!(function_exists('dslc_register_modules'))) {\n //add js easing\n add_script('js-easing', TEMPLATEURL . '/js/libs/jquery.easing.js', array(\n 'jquery',\n 'jquery'));\n }\n wp_localize_script('front', 'as_globals', array(\n 'ajaxURL' => admin_url('admin-ajax.php'),\n 'imgURL' => get_template_directory_uri() . '/img/'\n ));\n // Custom\n add_script('main', TEMPLATEURL . '/js/main.js', array(\n 'jquery'));\n // add style demo\n if (file_exists(TEMPLATE_DIR . '/demo/js/custom_panel.js')) {\n add_script('custom_panel', TEMPLATEURL . '/demo/js/custom_panel.js', array(\n 'jquery'));\n }\n}", "function focushaus_admin_scripts() {\n wp_enqueue_script('jquery');\n wp_enqueue_script('focushaus', plugins_url('js/focushaus.js', __FILE__), 'jquery', '2.0b');\n }", "private function enqueue_zurb_foundation_scripts() {\n\n\t\t/** Core jQuery Plugins **/\n\n\n\t\t//NOTE if detected Child-Theme app.js will override Parent app.js\n\t\tif( is_child_theme() ) {\n\t\t\twp_register_script( 'prso-theme-app', get_stylesheet_directory_uri() . '/dist/assets/js/app.js', array('jquery'), PRSOTHEMEFRAMEWORK__VERSION, true );\n\t\t\twp_register_script( 'prso-theme-react', get_stylesheet_directory_uri() . '/dist/react/app.js', array('prso-theme-app'), PRSOTHEMEFRAMEWORK__VERSION, true );\n\t\t}\n\n\t\twp_enqueue_script( 'prso-theme-app' );\n\n\t}", "function replace_default_jquery() {\n\tif (!is_admin()) {\n\t\t// comment out the next two lines to load the local copy of jQuery\n\t\twp_deregister_script('jquery');\n\t\t// wp_register_script('jquery', '//cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js', false, null);\n\t\twp_register_script('jquery', get_template_directory_uri() . '/js/jquery-2.1.4.min.js', false, null);\n\t\t// wp_enqueue_script('jquery');\n\t}\n}", "function axj_frontend_scripts() {\t\r\n if(!is_admin()){\r\n\r\n\t\twp_enqueue_script('jquery');\r\n \r\n\t}\r\n}", "function front_scripts() {\n FWP()->display->assets['future-past-front.js'] = plugins_url( '', __FILE__ ) . '/assets/js/front.js';\n }", "function ft_hook_add_js_file() {}", "function Flipbox_Enqueue_scripts() \n{\n wp_enqueue_script('script', plugin_dir_url(__FILE__) . 'js/script.js'); \n \n}", "function plugin_post_new_scripts() {\r\n\t// Register & enqueue our admin.js file along with its dependancies\r\n\t\t\twp_register_script('framework', $this->plugin_url .'framework.js', array('jquery','media-upload','thickbox','editor'));\r\n\t\t\twp_enqueue_script('framework');\r\n\t\t\twp_enqueue_script('farbtastic'); \r\n\t\t\twp_enqueue_script('suggest'); // Allow Jquery Chosen\r\n\t\t\t\r\n\t\t}", "function ajan_core_get_js_dependencies() {\n\treturn apply_filters( 'ajan_core_get_js_dependencies', array( 'jquery' ) );\n}", "function customize_preview_js() {\n\twp_enqueue_script( 'pdvn-customize-actions', get_template_directory_uri() . '/assets/js/admin/actions.js', array( 'jquery' ), '1.0', true );\n}", "function replace_jquery() {\n if (!is_admin()) {\n // comment out the next two lines to load the local copy of jQuery\n wp_deregister_script('jquery');\n wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', false, '1.12.4');\n wp_enqueue_script('jquery');\n }\n}", "function replace_jquery() {\r\n\tif (!is_admin()) {\r\n\t\t// comment out the next two lines to load the local copy of jQuery\r\n\t\twp_deregister_script('jquery');\r\n\t\twp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3');\r\n\t\twp_enqueue_script('jquery');\r\n\t}\r\n}", "function horse_manager_scripts() {\n\n wp_enqueue_script('jquery_check', plugins_url('/js/jquery_check.js', __FILE__), array('jquery'));\n}", "function article_js() {\n return Registry::prop('article', 'js');\n}", "function modifyThemeFooter() {\n?>\n<!-- W3TC-include-js-head -->\n<?php\n}", "function theme_setup_scripts() {\n wp_enqueue_script(\"main\", get_theme_file_uri('/assets/js/script.js'), NULL, '1.0', true);\n wp_register_style('styles', get_template_directory_uri() . '/assets/css/style.css', array(), 'microtime()', 'all');\n wp_enqueue_style('styles'); // Enqueue it!\n // --> Change microtime to version number (for example '1.1') before release!\n\n //Bootstrap\n wp_enqueue_style(\"bootstrap-stylesheet\", 'https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css');\n wp_enqueue_script(\"jquery\", 'https://code.jquery.com/jquery-3.5.1.min.js');\n wp_enqueue_script(\"jquery-form-plugin\", 'https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.3.0/jquery.form.min.js');\n wp_enqueue_script(\"bootstrap-popper\", 'https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js');\n wp_enqueue_script(\"bootstrap-js\", 'https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js');\n\n}", "function dfd_themes_admin_scripts($hook) {\n\t\twp_register_style('dfd-admin-style', get_template_directory_uri() . '/assets/css/admin-panel.css');\n\t\twp_enqueue_style('dfd-admin-style');\n\t\t\n\t\twp_register_script('dfd_post_metaboxes_gallery', get_template_directory_uri().'/assets/admin/js/posts-gallery.js', array( 'jquery' ), false, true);\n\t\twp_register_script('dfd_portfolio_metaboxes_gallery', get_template_directory_uri().'/assets/admin/js/portfolio-gallery.js', array( 'jquery' ), false, true);\n\t\twp_register_script('dfd_gallery_metaboxes_gallery', get_template_directory_uri().'/assets/admin/js/gallery-gallery.js', array( 'jquery' ), false, true);\n\t\t\n\t\twp_enqueue_script('dfd_admin_script', get_template_directory_uri().'/assets/admin/js/admin-scripts.js', array('jquery'), false, true);\n\t\t\n\t\tif(class_exists( 'Vc_Manager', false )) {\n\t\t\tglobal $dfd_native;\n\n\t\t\t$min = '.min';\n\t\t\t\n\t\t\tif(isset($dfd_native['dev_mode']) && $dfd_native['dev_mode'] == 'on' && defined('DFD_DEBUG_MODE') && DFD_DEBUG_MODE) {\n\t\t\t\t$min = '';\n\t\t\t}\n\t\t\t\n\t\t\tif(wp_script_is( 'vc-frontend-editor-min-js', 'enqueued' )) {\n\t\t\t\twp_enqueue_script('vc-inline-editor',get_template_directory_uri().'/assets/admin/js/vc-inline-editor'.$min.'.js',array('vc-frontend-editor-min-js'),'1.5',true);\n\t\t\t} elseif(wp_script_is( 'vc_inline_custom_view_js', 'enqueued' )) {\n\t\t\t\twp_enqueue_script('vc-inline-editor',get_template_directory_uri().'/assets/admin/js/vc-inline-editor.min.js',array('vc_inline_custom_view_js'),'1.5',true);\n\t\t\t}\n\n\t\t\tif($hook == \"post.php\" || $hook == \"post-new.php\" || $hook == \"edit.php\"){\n\t\t\t\twp_enqueue_script('dfd_vc_admin_scripts', get_template_directory_uri().'/assets/admin/js/vc_admin_scripts.js', array('jquery'), false, true);\n\t\t\t}\n\t\t\t\n\t\t\tif(function_exists('dfd_admin_custom_css')) {\n\t\t\t\tdfd_admin_custom_css();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(class_exists('cmb_Meta_Box') && function_exists('dfd_metaboxes_enctype')) {\n\t\t\tdfd_metaboxes_enctype();\n\t\t}\n\t}", "function the_champ_admin_scripts(){\r\n\t?>\r\n\t<script>var theChampWebsiteUrl = '<?php echo esc_url(home_url()) ?>', theChampHelpBubbleTitle = \"<?php echo __('Click to toggle help', 'super-socializer') ?>\"; </script>\r\n\t<?php\r\n\twp_enqueue_script('the_champ_admin_script', plugins_url('js/admin/admin.js', __FILE__), array('jquery', 'jquery-ui-tabs'), THE_CHAMP_SS_VERSION);\r\n}", "function desertdelta_scripts() {\n\n\twp_enqueue_style( 'desertdelta-style', get_stylesheet_uri() );\n\n\twp_register_script( 'corejs-async', get_template_directory_uri() . '/inc/js/compiled.js', array('jquery'), true);\n\twp_enqueue_script('corejs-async');\n\n}", "function upcode_loadJS(){\n if (!is_admin()){\n\t\t// desregistrando o jquery nativo e registrando o do CDN do Google.\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', '//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js', false, '3.2.1');\n\t\twp_enqueue_script('jquery');\n\n\t\t$js = get_template_directory_uri() . '/assets/js/';\n\t\twp_enqueue_script('propper',\t\t\t\t'//cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js', ['jquery']);\n\t\twp_enqueue_script('bootstrap-min',\t'//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js', ['jquery','propper']);\n\t\twp_enqueue_script('fancybox',\t\t\t\t'//cdn.rawgit.com/fancyapps/fancybox/master/dist/jquery.fancybox.min.js', ['jquery']);\n\t\twp_enqueue_script('slick',\t\t\t\t\t'//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.7.1/slick.min.js', ['jquery']);\n\t\twp_enqueue_script('fontawesome',\t\t'//use.fontawesome.com/releases/v5.0.8/js/all.js', ['jquery']);\n\t\twp_enqueue_script('v4-shims',\t\t\t\t'//use.fontawesome.com/releases/v5.0.8/js/v4-shims.js', ['jquery']);\n\n\t\twp_enqueue_script('offcanvas',\t\t$js . 'bootstrap.offcanvas.min.js', ['jquery']);\n\t\twp_enqueue_script('acf-maps', \t\t$js . 'maps.js', ['jquery']);\n\t\twp_enqueue_script('mask', \t\t\t\t$js . 'jquery.mask.min.js', ['jquery']);\n\t\twp_enqueue_script('codigo', \t\t\t$js . 'codigo.js', ['jquery']);\n }\n}", "function wpfolio_setup_scripts(){\n\twp_enqueue_script('hoverIntent', get_template_directory_uri().'/js/hoverIntent.js',array('jquery'));\n\twp_enqueue_script('superfish', get_template_directory_uri().'/js/superfish.js',array('hoverIntent'));\n\twp_enqueue_script('supersubs', get_template_directory_uri().'/js/supersubs.js',array('superfish'));\n\twp_enqueue_script('wpfolio', get_template_directory_uri().'/js/wpfolio.js',array('supersubs'));\n}", "function idaho_webmaster_panels_js_templates() {\n\tinclude get_template_directory().'/inc/tpl/js-templates.php';\n}", "function _appthemes_register_theme_scripts() {\n\n\t// Minimize prod or show expanded in dev.\n\t$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\trequire_once APP_THEME_FRAMEWORK_DIR . '/js/localization.php';\n\n\twp_register_script( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/jquery.colorbox{$min}.js\", array( 'jquery' ), '1.6.1' );\n\twp_register_style( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/colorbox{$min}.css\", false, '1.6.1' );\n\twp_register_style( 'font-awesome', APP_THEME_FRAMEWORK_URI . \"/lib/font-awesome/css/font-awesome{$min}.css\", false, '4.7.0' );\n\n\twp_register_script( 'footable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable{$min}.js\", array( 'jquery' ), '2.0.3' );\n\twp_register_script( 'footable-grid', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.grid{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-sort', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.sort{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-filter', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.filter{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-striping', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.striping{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-paginate', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.paginate{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-bookmarkable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.bookmarkable{$min}.js\", array( 'footable' ), '2.0.3' );\n\n\t_appthemes_localize_theme_scripts();\n}", "function autodidact_theme_setup() {\n\n}", "function saleforce_scripts_plug() {\n if (is_admin()) {\n wp_register_script('backcallscc', plugins_url('js/cussaleforce.js', __FILE__), array('jquery'));\n \n wp_enqueue_script('backcallscc');\n \n $file_for_jav = admin_url('admin-ajax.php');\n $tran_arr = array('jaxfile' => $file_for_jav);\n wp_localize_script('backcallscc', 'fromphp', $tran_arr);\n }\n}", "function cm_replace_jquery() {\n\tif (!is_admin()) {\n\t\t// comment out the next two lines to load the local copy of jQuery\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3');\n\t\twp_enqueue_script('jquery');\n\t}\n}", "function options_permalink_add_js()\n {\n }", "function jumpstart_scripts() {\n // Load stylesheed with dashicons as a dependency.\n // Learn about dashicons: http://melchoyce.github.io/dashicons/\n\twp_enqueue_style( 'jumpstart-style', get_stylesheet_uri(), array( 'dashicons' ) );\n // wp_enqueue_style( 'slick-carousel-style', LIB . '/bower_components/slick-carousel/slick/slick.css', array( 'jquery' ), '1.0', TRUE );\n\n wp_enqueue_script('modernizr', LIB . '/foundation/js/vendor/modernizr.js', array(), '2.8.3', FALSE);\n\n // Load Base Foundation JS.\n wp_enqueue_script( 'foundation', LIB . '/foundation/js/foundation/foundation.js', array( 'jquery' ), '1.0', TRUE );\n wp_enqueue_script( 'fastClick', LIB . '/foundation/js/vendor/fastclick.js', array(), '1.0', TRUE );\n wp_enqueue_script( 'placeholder', LIB . '/foundation/js/vendor/placeholder.js', array('jquery'), '2.0.8', TRUE );\n\n // Foundation Modules\n //wp_enqueue_script( 'foundation-abide', LIB . '/foundation/js/foundation/foundation.abide.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-accordion', LIB . '/foundation/js/foundation/foundation.accordion.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-alert', LIB . '/foundation/js/foundation/foundation.alert.js', array( 'jquery' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-clearing', LIB . '/foundation/js/foundation/foundation.clearing.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n // wp_enqueue_script( 'foundation-dropdown', LIB . '/foundation/js/foundation/foundation.dropdown.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-equalizer', LIB . '/foundation/js/foundation/foundation.equalizer.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n wp_enqueue_script( 'foundation-interchange', LIB . '/foundation/js/foundation/foundation.interchange.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-joyride', LIB . '/foundation/js/foundation/foundation.joyride.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-magellan', LIB . '/foundation/js/foundation/foundation.magellan.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-offcanvas', LIB . '/foundation/js/foundation/foundation.offcanvas.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-orbit', LIB . '/foundation/js/foundation/foundation.orbit.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-reveal', LIB . '/foundation/js/foundation/foundation.reveal.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-slider', LIB . '/foundation/js/foundation/foundation.slider.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n wp_enqueue_script( 'foundation-tab', LIB . '/foundation/js/foundation/foundation.tab.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-tooltip', LIB . '/foundation/js/foundation/foundation.tooltip.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n //wp_enqueue_script( 'foundation-toolbar', LIB . '/foundation/js/foundation/foundation.toolbar.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n wp_enqueue_script( 'foundation-toolbar', LIB . '/foundation/js/foundation/foundation.topbar.js', array( 'jquery', 'foundation' ), '1.0', TRUE );\n\n // All vendor scripts in lib/js/vendor\n wp_enqueue_script( 'vendor-scripts', get_stylesheet_directory_uri() . '/vendor.js', array('jquery', 'foundation'), '1.0', TRUE );\n\n // All custom scripts in lib/js\n wp_enqueue_script( 'custom-scripts', get_stylesheet_directory_uri() . '/scripts.js', array('jquery', 'foundation', 'vendor-scripts'), '1.0', TRUE );\n\n if (in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))) {\n wp_register_script('livereload', 'http://localhost:35729/livereload.js?snipver=1', null, false, true);\n wp_enqueue_script('livereload');\n }\n}", "function reassign_jQuery() {\n wp_deregister_script( 'jquery' );\n wp_deregister_script( 'jquery-core' );\n wp_deregister_script( 'jquery-migrate' );\n\n wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js', array(), '3.4.1', true);\n wp_add_inline_script( 'jquery', \"window.jQuery || document.write('<script src=\\\"\".get_template_directory_uri() .\"/assets/jquery-3.4.1.min.js\\\">\\\\x3C/script>')\");\n \n wp_enqueue_script('jquery');\n\n}", "function foundationpress_scripts() {\n\twp_enqueue_style( 'main-stylesheet', get_template_directory_uri() . '/assets/stylesheets/foundation.css', array(), '2.6.1', 'all' );\n\n\t// Deregister the jquery version bundled with WordPress.\n\twp_deregister_script( 'jquery' );\n\n\t// CDN hosted jQuery placed in the header, as some plugins require that jQuery is loaded in the header.\n\twp_enqueue_script( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js', array(), '2.1.0', false );\n\n\t// If you'd like to cherry-pick the foundation components you need in your project, head over to gulpfile.js and see lines 35-54.\n\t// It's a good idea to do this, performance-wise. No need to load everything if you're just going to use the grid anyway, you know :)\n\twp_enqueue_script( 'foundation', get_template_directory_uri() . '/assets/javascript/foundation.js', array('jquery'), '2.6.1', true );\n\n\t// Add the comment-reply library on pages where it is necessary\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\t}", "function load_theme_js() {\n\n // Register and load js\n\twp_register_script('modernizr-js', get_template_directory_uri() . '/assets/js/modernizr-2.6.2.min.js', false, null, false);\n\twp_enqueue_script('modernizr-js');\n\n\twp_register_script('bootstrap-js', get_template_directory_uri() . '/assets/js/bootstrap.js', false, null, true);\n\twp_enqueue_script('bootstrap-js');\n\n\twp_register_script('barba-js', get_template_directory_uri() . '/assets/js/barba.js', false, null, true);\n\twp_enqueue_script('barba-js');\n\n\twp_register_script('slick-js', get_template_directory_uri() . '/assets/js/slick.min.js', false, null, true);\n\twp_enqueue_script('slick-js');\n\n\twp_register_script('lightbox-js', get_template_directory_uri() . '/assets/js/lightbox.js', false, null, true);\n\twp_enqueue_script('lightbox-js');\n\n\twp_register_script('script-js', get_template_directory_uri() . '/assets/js/script.js', false, null, true);\n\twp_enqueue_script('script-js');\n\n\tif (is_home() || is_front_page()){\n\t\twp_register_script('script-homepage-js', get_template_directory_uri() . '/assets/js/script-homepage.js', false, null, true);\n\t\twp_enqueue_script('script-homepage-js');\n\t} else {\n\t\t// enqueue common scripts here\n\t}\n\n}", "function init_scripts() {\n\t\t\t$curpath = str_replace( basename( __FILE__ ), '', realpath( __FILE__ ) );\n\t\t\tif( file_exists( $curpath . '/post-revision-workflow.admin.js' ) )\n\t\t\t\t$script_loc = plugins_url( '/post-revision-workflow.admin.js', __FILE__ );\n\t\t\telseif( file_exists( $curpath . '/post-revision-workflow/post-revision-workflow.admin.js' ) )\n\t\t\t\t$script_loc = plugins_url( '/post-revision-workflow/post-revision-workflow.admin.js', __FILE__ );\n\t\t\tif( !empty( $script_loc ) ) {\n\t\t\t\twp_register_script( 'post-revision-workflow', $script_loc, array( 'post' ), '0.2a', true );\n\t\t\t\twp_enqueue_script( 'post-revision-workflow' );\n\t\t\t\twp_localize_script( 'post-revision-workflow', 'post_revision_workflow', array(\n\t\t\t\t\t'no_notifications'\t=> __( 'No notifications', $this->text_domain ),\n\t\t\t\t\t'draft_notify' \t\t=> __( 'Draft &amp; notify', $this->text_domain ),\n\t\t\t\t\t'publish_notify'\t=> __( 'Publish &amp; notify', $this->text_domain ),\n\t\t\t\t\t'draft_only'\t\t=> __( 'Draft - no notifications', $this->text_domain )\n\t\t\t\t) );\n\t\t\t/*} else {\n\t\t\t\twp_die( 'The post-revision-workflow script could not be located in ' . $curpath . '/post-revision-workflow.admin.js' . ' or ' . $curpath . '/post-revision-workflow/post-revision-workflow.admin.js' );*/\n\t\t\t}\n\t\t}", "function plugin_admin_scripts() {\r\n\t\t\t// Register & enqueue our admin.js file along with its dependancies\r\n\t\t\twp_register_script('framework', $this->framework_url .'framework.js', array('jquery','media-upload','thickbox','editor'));\r\n\t\t\twp_enqueue_script('framework');\r\n\t\t\t\t\twp_enqueue_script('farbtastic'); \r\n\t\t\twp_enqueue_script('suggest'); // Allow Jquery Chosen\r\n\t\t}", "function m59_theme_enqueue_scripts() {\n\t\t\t\t// javascript\n\t\t\t\twp_enqueue_script('jquery');\n\t\t\t\t//wp_enqueue_script('lazyload', get_stylesheet_directory_uri().'/js/jquery.lazyload.min.js','','',true);\n\t\t\t\tif(ENVIRONMENT != 'dev'){\n\t\t\t\t\twp_enqueue_style( 'live', get_stylesheet_directory_uri().'/styles/live.css', array());\n\t\t\t\t\twp_enqueue_script('jquery.site', get_stylesheet_directory_uri().'/js/live.js', 'jQuery',true);\n\n\t\t\t\t}else{\n\t\t\t\t\twp_enqueue_style( 'dev', get_stylesheet_directory_uri().'/styles/live.css');\n\t\t\t\t\twp_enqueue_script('jquery.site', get_stylesheet_directory_uri().'/js/live.js', 'jQuery','',true);\n\t\t\t\t}\n\t}", "function enqueue_theme_scripts() {\n if ( 'development' === getenv( 'WP_ENV' ) ) {\n $minimalistmadness_template = 'global';\n } else {\n $minimalistmadness_template = 'global.min';\n }\n\n // Disable jQuery (included in all.js and normally on wp-admin)\n if ( ! is_admin() ) wp_deregister_script( 'jquery' );\n if ( ! is_admin() ) wp_deregister_script( 'jquery-core' );\n if ( ! is_admin() ) wp_deregister_script( 'jquery-migrate' );\n\n // Styles.\n wp_enqueue_style( 'styles', get_theme_file_uri( \"css/{$minimalistmadness_template}.css\" ), array(), filemtime( get_theme_file_path( \"css/{$minimalistmadness_template}.css\" ) ) );\n\n // Scripts.\n wp_enqueue_script( 'jquery-core' );\n wp_enqueue_script( 'scripts', get_theme_file_uri( 'js/all.js' ), array(), filemtime( get_theme_file_path( 'js/all.js' ) ), true );\n\n // Required comment-reply script\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n\n wp_localize_script( 'scripts', 'minimalistmadness_screenReaderText', array(\n 'expand' => esc_html__( 'Open child menu', 'minimalistmadness' ),\n 'collapse' => esc_html__( 'Close child menu', 'minimalistmadness' ),\n ) );\n\n wp_localize_script( 'scripts', 'air', array(\n 'nonce' => wp_create_nonce( 'wp_rest' ),\n 'posts_per_page' => 2,\n 'baseurl' => get_rest_url(),\n ) );\n\n wp_localize_script( 'scripts', 'dmrp', array(\n 'id' => get_the_id(),\n 'nonce' => wp_create_nonce( 'dmrp' . get_the_id() ),\n 'ajax_url' => admin_url( 'admin-ajax.php' ),\n 'cookie_timeout' => apply_filters( 'dmrp_cookie_timeout', 3600000 ),\n ) );\n\n // Remove dude-most-read-posts script (included in scripts.js for optimization)\n wp_dequeue_script( 'dmrp' );\n\n}", "function ruven_register_scripts() {\n\n\t$theme_version = wp_get_theme()->get( 'Version' );\n\t//$env = ( wp_get_environment_type() === 'local') ? array('src','/custom', '') : array('assets','','min.');\n\t$env = array('src','/custom', '');\n\n\t//Include WP jQuery\n wp_enqueue_script('jquery');\n\n\twp_enqueue_script( 'ruven-isotope', get_template_directory_uri() . '/assets/js/vendor/isotope.min.js', array('jquery'), $theme_version,\n\tfalse );\n\twp_script_add_data( 'ruven-isotope', 'async', true );\n\n\twp_enqueue_script( 'ruven-swiper', get_template_directory_uri() . '/assets/js/vendor/swiper.min.js',\n\tarray('jquery'), $theme_version,\n\tfalse );\n\twp_script_add_data( 'ruven-swiper', 'async', true );\n\n\twp_enqueue_script( 'ruven', get_template_directory_uri() . '/'. $env[0] .'/js'. $env[1] .'/main.'. $env[2] .'js', array('jquery',\n\t'ruven-isotope', 'ruven-swiper'), $theme_version, false );\n\twp_script_add_data( 'ruven', 'async', true );\n\n\n\n}", "function whq_trumps_js_scripts() {\n if (!is_admin()) {\n remove_action('wp_head', 'wp_print_scripts');\n remove_action('wp_head', 'wp_print_head_scripts', 9);\n remove_action('wp_head', 'wp_enqueue_scripts', 1);\n }\n // IE9 support for HTML5 elements.\n wp_enqueue_script('html5shiv', get_template_directory_uri() . '/public/js/html5shiv.min.js', array(), NULL, true);\n wp_script_add_data('html5shiv', 'conditional', 'lt IE 9');\n // Load in our themes custom JS file.\n wp_enqueue_script('whqtrumpsbase', get_stylesheet_directory_uri() . '/public/js/whqbase.js', array( 'jquery' ), NULL, true);\n}", "function basetheme_scripts() {\n\n //DEREGISTER SCRIPTS\n wp_deregister_script('jquery');\n wp_deregister_script( 'wp-embed' );\n\n\twp_enqueue_style( 'basetheme-style', get_stylesheet_uri() );\n\n wp_enqueue_script( 'jquery', get_template_directory_uri() . '/assets/js/vendor/jquery/jquery-3.5.1.min.js' );\n\twp_enqueue_script( 'basetheme-scripts', get_template_directory_uri() . '/assets/js/app.js' );\n\n\n $datatoBePassed = array (\n 'isHome' => is_home()? 'true' : 'false',\n 'theme_dir' => get_template_directory_uri()\n );\n\n wp_localize_script( 'basetheme-scripts', 'PHPVARS', $datatoBePassed );\n\n}", "function theme_js(){\n\n\t\twp_register_script('custom-script1', get_template_directory_uri() . '/js/menu.js', array('jquery'),'', true);\n\t\twp_register_script('custom-script2', get_template_directory_uri() . '/js/main.js', array('jquery'),'', true);\n\t\twp_register_script('custom-script3', get_template_directory_uri() . '/js/css3-mediaqueries.js', array('jquery'),'', true);\n\t\n\t\twp_enqueue_script('custom-script1', get_template_directory_uri() . '/js/theme.js', array('jquery'),'', true );\n\t\twp_enqueue_script('custom-script2');\n\t\twp_enqueue_script('custom-script3');\n}", "function resolve_relative_paths() {\r\n\t\r\n\t\t/*<link rel=\"shortcut icon\" href=\"../build/theme-gcwu-fegc/images/favicon.ico\" />\r\n\t\t<script src=\"../build/js/jquery.min.js\"></script>\r\n\t\t<link rel=\"stylesheet\" href=\"../build/grids/css/util-ie-min.css\" />\r\n\t\t<noscript><link rel=\"stylesheet\" href=\"../build/theme-gcwu-fegc/css/theme-ns-min.css\" /></noscript>\r\n\t\t<?php include('..' . DS . 'includes' . DS . 'header-eng.txt'); ?>\r\n\t\t<script src=\"../build/theme-gcwu-fegc/js/theme-min.js\"></script>*/\r\n\t\t\r\n\t\t$this->code = ReTidy::reverse_order_substr_preg_replace('<link([^<>]*?) href=\"([^\"]*?)\"([^<>]*?)>', 2, $this->code, '$changed_part = ReTidy::adjust_relative_path($part_to_change, $this->file);');\r\n\t\t$this->code = ReTidy::reverse_order_substr_preg_replace('<script([^<>]*?) src=\"([^\"]*?)\"([^<>]*?)>', 2, $this->code, '$changed_part = ReTidy::adjust_relative_path($part_to_change, $this->file);');\r\n\t\t//print('this one -&gt;<br>');\r\n\t\t/*$this->code = ReTidy::reverse_order_substr_preg_replace('<?php include\\(\\'([^\\']*?)\\'\\); ?>', 1, $this->code, '$changed_part = ReTidy::adjust_relative_path($part_to_change, $this->file);');*/\r\n\t\t$this->code = ReTidy::reverse_order_substr_preg_replace('<\\?php include\\(\\'([^\\']*?)\\'\\); \\?>', 1, $this->code, '$changed_part = ReTidy::adjust_relative_path($part_to_change, $this->file);');\r\n\t\t$this->code = ReTidy::reverse_order_substr_preg_replace('<\\!\\-\\-\\#include file=\"([^\"]*?)\" \\-\\->', 1, $this->code, '$changed_part = ReTidy::adjust_relative_path($part_to_change, $this->file);');\r\n\t\t\r\n\t\t/*<?php include('..' . DS . 'includes' . DS . 'header-eng.txt'); ?>*/\r\n\t\t/*\r\n\t\tpreg_match_all('/<\\?php include\\(\\'([^\\']*?)\\'\\); \\?>/is', $this->code, $matches, PREG_OFFSET_CAPTURE);\r\n\t\t//print($this->code);\r\n\t\t//var_dump($matches);\r\n\t\t//exit(0);\r\n\t\t$counter = sizeof($matches[0]) - 1;\r\n\t\twhile($counter > -1) {\r\n\t\t\t$full_match = $matches[0][$counter][0];\r\n\t\t\t$part_to_change = $matches[1][$counter][0];\r\n\t\t\t$offset = $matches[0][$counter][1];\r\n\t\t\tvar_dump($replacement_to_eval, eval($replacement_to_eval), $part_to_change, $this->file);\r\n\t\t\teval($replacement_to_eval);\r\n\t\t\t$replacement = str_replace($part_to_change, $changed_part, $full_match); // perhaps not perfect\r\n\t\t\tvar_dump($part_to_change, $replacement);\r\n\t\t\t$this->code = substr($this->code, 0, $offset) . $replacement . substr($this->code, $offset + strlen($full_match));\r\n\t\t\t$counter--;\r\n\t\t}*/\r\n\t\t//print('&lt;<br>');\r\n\t}", "function hook_skinr_api() {\r\n return array(\r\n 'api' => 1,\r\n 'path' => drupal_get_path('module', 'modulename'),\r\n );\r\n}", "function jk_scripts(){\n\twp_register_script('materialize-js',get_stylesheet_directory_uri().'/js/bootstrap.min.js',array('jquery'),true);\n\twp_enqueue_script('materialize-js');\n\twp_register_script('myjs',get_stylesheet_directory_uri().'/js/myjs.js',array('jquery'),true);\n\twp_enqueue_script('myjs');\n}", "function forty_theme_assets() {\r\n\r\n\t$var = '1.0.0';\r\n\r\n\t/* CSS */\r\n\twp_enqueue_style( 'font-awesome', get_theme_file_uri('/assets/css/font-awesome.min.css'), null, $var );\r\n\twp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Merriweather:300,700,300italic,700italic|Source+Sans+Pro:900', null, $var );\r\n\twp_enqueue_style( 'main-css', get_theme_file_uri('/assets/css/main.css'), null, $var );\r\n\twp_enqueue_style( 'noscript-css', get_theme_file_uri('/assets/css/noscript.css'), null, $var );\r\n\twp_enqueue_style( 'theme-css', get_stylesheet_uri(), '', $var );\r\n\r\n\t/* JavaScripts */\r\n\twp_enqueue_script( 'jquery' );\r\n\twp_enqueue_script( 'scrollex-js', get_theme_file_uri('/assets/js/jquery.scrollex.min.js'), null, $var );\r\n\twp_enqueue_script( 'scrolly-js', get_theme_file_uri('/assets/js/jquery.scrolly.min.js'), null, $var );\r\n\twp_enqueue_script( 'browser-js', get_theme_file_uri('/assets/js/browser.min.js'), null, $var );\r\n\twp_enqueue_script( 'breakpoints-js', get_theme_file_uri('/assets/js/breakpoints.min.js'), null, $var );\r\n\twp_enqueue_script( 'util-js', get_theme_file_uri('/assets/js/util.js'), null, $var );\r\n\twp_enqueue_script( 'main-js', get_theme_file_uri('/assets/js/main.js'), array('jquery'), $var, true );\r\n\twp_enqueue_script( 'bootstrap-js', get_theme_file_uri('/assets/js/bootstrap.js'), array('jquery'), $var, true );\r\n\r\n\tif( is_singular() && comments_open() && ( get_option( 'thread_comments' ) == 1) ) {\r\n // Load comment-reply.js (into footer)\r\n wp_enqueue_script( 'comment-reply', 'wp-includes/js/comment-reply', array(), false, true );\r\n }\r\n}", "function okr_load_js(){\n $CI = &get_instance();\n $viewuri = $_SERVER['REQUEST_URI'];\n if (!(strpos($viewuri,'/admin/okr') === false)) {\n echo '<script src=\"'.module_dir_url(OKR_MODULE_NAME, 'assets/js/okr.js').'?v=' . VERSION_OKR.'\"></script>';\n echo '<script src=\"'.module_dir_url(OKR_MODULE_NAME, 'assets/plugin/jquery-circle-progress/circle-progress.min.js').'?v=' . VERSION_OKR.'\"></script>';\n }\n if (!(strpos($viewuri,'/admin/okr/setting') === false)) {\n echo '<script src=\"'.module_dir_url(OKR_MODULE_NAME, 'assets/js/setting/setting.js').'?v=' . VERSION_OKR.'\"></script>';\n }\n if (!(strpos($viewuri,'/admin/okr/okrs') === false) || !(strpos($viewuri,'admin/okr/checkin') === false) || !(strpos($viewuri,'/admin/okr/checkin_detailt') === false) || !(strpos($viewuri,'/admin/okr/show_detail_node' ) === false) ) {\n echo '<script src=\"'.module_dir_url(OKR_MODULE_NAME, 'assets/plugin/dist/jstree.min.js').'\"></script>';\n echo '<script src=\"'.module_dir_url(OKR_MODULE_NAME, 'assets/plugin/dist/js/jquery.treegrid.min.js').'\"></script>';\n echo '<script src=\"'.module_dir_url(OKR_MODULE_NAME, 'assets/plugin/paging.js').'\"></script>';\n echo '<script src=\"'.module_dir_url(OKR_MODULE_NAME, 'assets/plugin/Chart/js/jQuery.jHTree.js').'\"></script>';\n echo '<script src=\"'.module_dir_url(OKR_MODULE_NAME, 'assets/plugin/demo.js').'\"></script>';\n echo '<script src=\"'.module_dir_url(OKR_MODULE_NAME, 'assets/plugin/jquery.rate.min.js').'\"></script>';\n echo '<script src=\"'.module_dir_url(OKR_MODULE_NAME, 'assets/plugin/OrgChart-master/jquery.orgchart.js').'\"></script>';\n }\n if (!(strpos($viewuri,'/admin/okr/checkin_detailt') === false) || !(strpos($viewuri,'/admin/okr/view_details' ) === false) || !(strpos($viewuri,'/admin/okr/show_detail_node' ) === false)) {\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/highcharts.js') . '\"></script>';\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/modules/variable-pie.js') . '\"></script>';\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/modules/export-data.js') . '\"></script>';\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/modules/accessibility.js') . '\"></script>';\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/modules/exporting.js') . '\"></script>';\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/highcharts-3d.js') . '\"></script>';\n echo '<script src=\"'.module_dir_url(OKR_MODULE_NAME, 'assets/plugin/jquery.lineProgressbar.js').'\"></script>';\n }\n\n if (!(strpos($viewuri,'/admin/okr/dashboard') === false)) {\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/highcharts.js') . '\"></script>';\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/modules/variable-pie.js') . '\"></script>';\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/modules/export-data.js') . '\"></script>';\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/modules/accessibility.js') . '\"></script>';\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/modules/exporting.js') . '\"></script>';\n echo '<script src=\"' . module_dir_url(OKR_MODULE_NAME, 'assets/plugin/highcharts/highcharts-3d.js') . '\"></script>';\n }\n}", "function theme_register_scripts() {\n wp_register_script('pavi_load_post', PAVI_PLUGIN_ASSETS_URL . '/js/load-post.js', array('jquery') );\n\n /** Localize Scripts */\n wp_localize_script( 'pavi_load_post', 'php_array', array( 'admin_ajax' => admin_url( 'admin-ajax.php' ) ) );\n}", "function cd_ab_add_js() {\n if (is_admin())\n return false;\n\n $cd_ab = get_blog_option(bp_get_root_blog_id(), 'cd_ab');\n if ( $cd_ab['access'] == 'admin' && !is_super_admin() )\n return false;\n\n if ( $cd_ab['action'] == 'click') {\n wp_enqueue_script('CD_AB_JS', plugin_dir_url( __FILE__ ) . '_inc/click.min.js', array('jquery'),true, 2 );\n }else{\n wp_enqueue_script('CD_AB_JS', plugin_dir_url( __FILE__ ) . '_inc/hover.min.js', array('jquery') ,true);\n }\n}", "function sherpa_frontend_scripts() {\r\n\twp_register_script( 'modernizr_respond', get_stylesheet_directory_uri() . '/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js', false, '2.8.3', false );\r\n\t//wp_enqueue_script( 'modernizr_respond' );\r\n\r\n\twp_deregister_script( 'jquery' );\r\n\twp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', false, '1.12.4', false );\r\n\twp_enqueue_script( 'jquery' );\r\n\r\n\tif(file_exists(__DIR__ . '/../js/min/main-min.js')) {\r\n\t\twp_register_script( 'main_js', get_stylesheet_directory_uri() . '/js/min/main-min.js', array( 'jquery'), '1.0.0', true );\t\r\n\t} else {\r\n\t\twp_register_script( 'main_js', get_stylesheet_directory_uri() . '/js/main.js', array( 'jquery'), '1.0.0', true );\r\n\t}\r\n\twp_enqueue_script( 'main_js' );\r\n\r\n\tsherpa_front_and_backend_scripts();\t\r\n}", "function bethel_move_jquery() {\n global $wp_scripts;\n foreach ($wp_scripts->registered as $k => $v) {\n if (substr($k, 0, 6) == 'jquery') {\n if (isset($wp_scripts->registered[$k]->ver) && isset($wp_scripts->registered[$k]->src) && $wp_scripts->registered[$k]->deps) {\n $ver = $wp_scripts->registered[$k]->ver;\n $src = $wp_scripts->registered[$k]->src;\n $deps = $wp_scripts->registered[$k]->deps;\n wp_deregister_script ($k);\n wp_register_script($k, $src, $deps, $ver, true);\n }\n }\n }\n}", "function be_navigation_script() {\n\twp_enqueue_script( 'jquery-touchwipe', get_stylesheet_directory_uri() . '/lib/jquery.touchwipe.min.js', array( 'jquery' ) );\n\twp_enqueue_script( 'be-navigation', get_stylesheet_directory_uri() . '/lib/navigation.js', array( 'jquery' ) );\n}", "public function admin_js()\n\t\t{\n\t\t\twp_enqueue_script('jquery');\n\t\t}", "function wp_ajax_install_theme()\n {\n }", "function export_add_js()\n {\n }", "function enqueue_fastflickr_scripts() {\r\n\t$path = trailingslashit(get_bloginfo('wpurl') ) . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__));\r\n\r\n\twp_enqueue_script('jquery');\r\n\twp_enqueue_script('fastflickr.js', $path . '/fastflickr.js');\r\n}", "function load_theme_scripts() { \n\tif (!is_admin()) { \n\t\t/*wp_deregister_script('jquery'); \n\t\twp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'); \n\t\twp_enqueue_script('jquery'); */\n\t\t//wp_enqueue_script('fancybox', get_template_directory_uri() . '/js/jquery.fancybox.min.js', array('jquery')); \n\t\t// wp_enqueue_script('mousewheel', get_template_directory_uri() . '/js/jquery.mousewheel.min.js', array('jquery')); \n\t\t//wp_enqueue_script('respond', get_template_directory_uri() . '/js/respond.min.js', array('jquery') );\n\t\t//wp_enqueue_script('cycle', get_template_directory_uri() . '/js/jquery.cycle.js', array('jquery') );\n\t\t\n\t\t//wp_enqueue_script('colorbox', get_template_directory_uri() . '/js/jquery.colorbox.js', array('jquery')); \n\t\t//wp_enqueue_script('anythingslider', get_template_directory_uri() . '/js/jquery.anythingslider.min.js', array('jquery'));\n\t\t//wp_enqueue_script('superfish', get_template_directory_uri() . '/js/jquery.superfish.js', array('jquery'));\n\t\t//wp_enqueue_script('hoverIntent', get_template_directory_uri() . '/js/jquery.hoverIntent.min.js', array('jquery'));\n\t\t//wp_enqueue_script('supersubs', get_template_directory_uri() . '/js/jquery.supersubs.min.js', array('jquery'));\n\t\t//wp_enqueue_script('selectivizr', get_template_directory_uri() . '/js/selectivizr.min.js', array('jquery'));\n\t\t//wp_enqueue_script('hotkeys', get_template_directory_uri() . '/js/jquery.hotkeys2.js', array('jquery'));\n // wp_enqueue_script('jquery-ui', get_template_directory_uri(). '/js/jquery-ui.custom/js/jquery-ui.custom.min.js',array('jquery'), '1.1', false);\n wp_enqueue_script('plugins', get_template_directory_uri() . '/js/plugins.js', array('jquery'), 6 );\n\t\twp_enqueue_script('app', get_template_directory_uri() . '/js/app.js', array('jquery'), 6 );\n\t\n\t\tglobal $staticVars;\n\t\twp_localize_script('app', 'jsVars', array( \n\t\t\t'ajaxUrl' => admin_url( 'admin-ajax.php' ),\n\t\t\t'keysListUrl' => $keysListUrl,\n\t\t\t'siteUrl' => $staticVars['siteUrl'],\n\t\t\t'sitetreeUrl' => $staticVars['sitetreeUrl'],\n\t\t\t'eventsUrl' => $staticVars['eventsUrl'],\n\t\t\t'newsUrl' => $staticVars['newsUrl'],\n\t\t\t'keysListUrl' => $staticVars['keysListUrl'],\n\t\t\t'validateMessageRequired' => pll__(\"Privalomas laukelis\"),\n\t\t\t'validateMessageEmail' => pll__(\"Neteisingas el. pašto formatas\"),\n\t\t\t'validateMessageNumber' => pll__(\"Prašome įvesti skaičių\"),\n\t\t));\t\t\n\t} \n}", "function nightsky_user_scripts( ) {\n // enque your own stuff here. CSS should be added to the array above.\n // enqueue a script.\n // wp_enqueue_script( 'id', get_template_directory_uri() . 'path',array('dependencies'), filemtime(get_stylesheet_directory() . 'path'), header_or_footer );\n}", "public function cmf_load_jQuery() {\n global $PAGE;\n\n if (moodle_major_version() >= '2.5') {\n $PAGE->requires->jquery();\n $PAGE->requires->jquery_plugin('migrate');\n $PAGE->requires->jquery_plugin('ui');\n $PAGE->requires->jquery_plugin('ui-css');\n } else {\n $PAGE->requires->js(\"/course/format/course_menu/jquery/jquery-1.9.1.js\");\n $PAGE->requires->js(\"/course/format/course_menu/jquery/jquery-ui.min.js\");\n $PAGE->requires->css(\"/course/format/course_menu/jquery/themes/base/jquery.ui.all.css\");\n }\n \n $PAGE->requires->js(\"/course/format/course_menu/display.js\");\n \n }", "function v2_mumm_include_common_js($variable) {\n $path = drupal_get_path('theme', 'v2_mumm');\n foreach ($variable as $item) {\n drupal_add_js($path . '/js/' . $item . '.js', array(\n 'type' => 'file',\n 'scope' => 'footer',\n 'group' => JS_THEME,\n 'every_page' => TRUE,\n 'weight' => -1,\n ));\n }\n}" ]
[ "0.7491919", "0.66155326", "0.64506966", "0.63435155", "0.63203275", "0.61494094", "0.6082915", "0.60221577", "0.6000548", "0.59756213", "0.59429735", "0.5939543", "0.59253275", "0.5906793", "0.5877728", "0.5873013", "0.5860365", "0.5848788", "0.5805668", "0.57959795", "0.5774826", "0.5769403", "0.5754797", "0.5754018", "0.5753006", "0.5735982", "0.5730008", "0.5729815", "0.5719684", "0.57077044", "0.57064635", "0.57062805", "0.56921554", "0.5687393", "0.56847924", "0.5673983", "0.56251514", "0.5580338", "0.5565202", "0.55629665", "0.5536891", "0.5535118", "0.5534728", "0.5533411", "0.5522031", "0.55194515", "0.5504465", "0.5496002", "0.5493967", "0.5483298", "0.54776436", "0.5476083", "0.54717624", "0.5456984", "0.5453343", "0.54521376", "0.54459316", "0.54459125", "0.5433284", "0.5433238", "0.5430213", "0.5426662", "0.54229414", "0.5422739", "0.54196554", "0.5414483", "0.54122555", "0.5410641", "0.5407859", "0.5407672", "0.5406157", "0.54050964", "0.5404466", "0.5392477", "0.5390838", "0.538995", "0.5388944", "0.5385894", "0.53854597", "0.5375023", "0.53733456", "0.5360863", "0.53608376", "0.5351228", "0.5349891", "0.53486353", "0.53463", "0.5340336", "0.5333743", "0.5330709", "0.5326039", "0.5321675", "0.53192234", "0.5318619", "0.53153694", "0.5314908", "0.5309303", "0.5309053", "0.5308235", "0.53081906" ]
0.7486024
1
Get all the main menu links
function links__system_secondary_menu($vars){ $menu_links = menu_tree_output(menu_tree_all_data('main-menu')); // Initialize some variables to prevent errors $output = ''; $sub_menu = ''; foreach ($menu_links as $key => $link) { // Add special class needed for Foundation dropdown menu to work !empty($link['#below']) ? $link['#attributes']['class'][] = 'has-dropdown' : ''; // Render top level and make sure we have an actual link if (!empty($link['#href'])) { $output .= '<li' . drupal_attributes($link['#attributes']) . '>' . l($link['#title'], $link['#href']); // Get sub navigation links if they exist foreach ($link['#below'] as $key => $sub_link) { if (!empty($sub_link['#href'])) { $sub_menu .= '<li>' . l($sub_link['#title'], $sub_link['#href']) . '</li>'; } } $output .= !empty($link['#below']) ? '<ul class="dropdown">' . $sub_menu . '</ul>' : ''; // Reset dropdown to prevent duplicates unset($sub_menu); $sub_menu = ''; $output .= '</li>'; } } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getSiteLinks() {\n\t\t$menu = new MenuBuilder();\n\n\t\t// About link\n\t\t$title = Title::newFromText( $this->msg( 'aboutpage' )->inContentLanguage()->text() );\n\t\t$msg = $this->msg( 'aboutsite' );\n\t\tif ( $title && !$msg->isDisabled() ) {\n\t\t\t$menu->insert( 'about' )\n\t\t\t\t->addComponent( $msg->text(), $title->getLocalUrl() );\n\t\t}\n\n\t\t// Disclaimers link\n\t\t$title = Title::newFromText( $this->msg( 'disclaimerpage' )->inContentLanguage()->text() );\n\t\t$msg = $this->msg( 'disclaimers' );\n\t\tif ( $title && !$msg->isDisabled() ) {\n\t\t\t$menu->insert( 'disclaimers' )\n\t\t\t\t->addComponent( $msg->text(), $title->getLocalUrl() );\n\t\t}\n\n\t\t// Allow other extensions to add or override tools\n\t\tHooks::run( 'MobileMenu', [ 'sitelinks', &$menu ] );\n\t\treturn $menu->getEntries();\n\t}", "public function getLinksForMenu() : array\n {\n return $this->db->query(\"SELECT page_title, page_link FROM pages\");\n }", "public function getSiteLinks()\n {\n $menufile = $GLOBALS['registry']->get('fileroot') . '/config/menu.php';\n\n if (is_readable($menufile)) {\n include $menufile;\n if (isset($_menu) && is_array($_menu)) {\n return $_menu;\n }\n }\n\n return array();\n }", "function getMainMenu() {\r\n $links = array();\r\n\r\n //Get nav menu id by name\r\n $menu_name = 'primary';\r\n $locations = get_nav_menu_locations();\r\n $menu_id = (isset($locations[$menu_name])) ? $locations[$menu_name] : 0;\r\n\r\n //Get nav menu items\r\n $items = wp_get_nav_menu_items( $menu_id, array(\r\n 'order' => 'ASC',\r\n 'orderby' => 'menu_order',\r\n 'post_type' => 'nav_menu_item',\r\n 'post_status' => 'publish',\r\n 'output' => ARRAY_A,\r\n 'output_key' => 'menu_order',\r\n 'nopaging' => true,\r\n 'update_post_term_cache' => false )\r\n );\r\n\r\n if(!empty($items)) {\r\n foreach($items as $item) {\r\n //active class for pages, categories\r\n $active = false;\r\n\r\n if( ($item->object == 'page') && (is_page($item->object_id)) ) {\r\n $active = 'active';\r\n } \r\n \r\n $links[$item->ID] = array(\r\n 'title' => $item->title,\r\n 'href' => $item->url,\r\n 'class' => $active\r\n );\r\n }\r\n }\r\n\r\n return $links;\r\n}", "public function getMenus() {}", "public function menu_load_links($menu_name)\n {\n return menu_load_links($menu_name);\n }", "function itcr_links__system_main_menu( $variables ) {\n\t$html = \"<div>\\n\";\n\t$html .= \" <ul>\\n\";\n\tforeach ( $variables[ 'links' ] as $link ) {\n\t\t$html .= \"<li>\" . l( $link[ 'title' ], $link[ 'path' ], $link ) . \"</li>\";\n\t}\n\t$html .= \" </ul>\\n\";\n\t$html .= \"</div>\\n\";\n\treturn $html;\n}", "function gwt_drupal_links__system_main_menu($variables) {\n // $links = $variables['links'];\n $links = menu_tree_all_data('main-menu', null, 4);\n /*\n $test = '<pre>'.print_r($links, 1).'</pre>';\n return $test;\n // */\n\n // heading not needed in main menu\n $heading = $variables['heading'];\n // global $language_url;\n $output = '';\n\n $output .= _gwt_drupal_link_render($links, 0, $variables);\n\n return $output;\n}", "public function getlinks()\n {////\n // Define an empty array to hold the list of admin links\n $links = array();\n\n // Return the links array back to the calling function\n return $links;\n }", "public function getlinks()\n {\n $links = array();\n if (UserUtil::isLoggedIn()) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'inbox'),\n 'text' => $this->__('Inbox'),\n 'class' => 'z-icon-es-inbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'outbox'),\n 'text' => $this->__('Outbox'),\n 'class' => 'z-icon-es-outbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'archive'),\n 'text' => $this->__('Archive'),\n 'class' => 'z-icon-es-gears'\n );\n if ($this->getVar('messages_allow_emailnotification')|| $this->getVar('messages_allow_autoreply')) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'settings'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config'\n );\n }\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'newpm'),\n 'text' => $this->__('New message'),\n 'class' => 'z-icon-es-new'\n );\n }\n return $links;\n }", "function links() {\n return array(\n\n );\n }", "public function menuLinks()\n {\n return $this->hasMany('MenuLink', 'menu_id');\n }", "function getMenuItems()\n {\n $this->menuitem(\"xp\", \"\", \"main\", array(\"xp.story\", \"admin\"));\n $this->menuitem(\"stories\", dispatch_url(\"xp.story\", \"admin\"), \"xp\", array(\"xp.story\", \"admin\"));\n }", "function getMenuEntries()\n\t{\n\t\tglobal $rbacsystem, $lng, $tree, $ilUser, $ilSetting;\n\n\t\t// no menu during online tests\n\t\tif ($_SESSION[\"adn_online_test\"])\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\n\t\t$mm_tpl = new ilTemplate(\"tpl.adn_main_menu.html\", true, true, \"Services/ADN/UI\");\n\n\t\tforeach ($this->getAllMenuItems() as $menu => $items)\n\t\t{\n\t\t\t$this->renderSubMenu($mm_tpl, $menu);\n\t\t}\n\t\treturn $mm_tpl->get();\n\n\n\n\t\t$tpl->setCurrentBlock(\"cust_menu\");\n\t\t$tpl->setVariable(\"TXT_CUSTOM\",\n\t\t\tlfCustomMenu::lookupTitle(\"it\", $menu[\"id\"], $ilUser->getLanguage(), true));\n\t\t$tpl->setVariable(\"MM_CLASS\", \"MMInactive\");\n\n\t\tif (is_file(\"./templates/default/images/mm_down_arrow.png\"))\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.png\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.gif\"));\n\t\t}\n\t\t$tpl->setVariable(\"CUSTOM_CONT_OV\", $gl->getHTML());\n\t\t$tpl->setVariable(\"MM_ID\", $menu[\"id\"]);\n\t\t$tpl->parseCurrentBlock();\n\t\t$tpl->setCurrentBlock(\"c_item\");\n\t\t$tpl->parseCurrentBlock();\n\n\t}", "public function getLinks()\n {\n $links = array();\n $submenulinks = array();\n\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'view'), 'text' => $this->__('Users list'), 'class' => 'z-icon-es-view');\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $pending = ModUtil::apiFunc($this->name, 'registration', 'countAll');\n if ($pending) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'viewRegistrations'), 'text' => $this->__('Pending registrations') . ' ('.DataUtil::formatForDisplay($pending).')', 'class' => 'user-icon-adduser');\n }\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADD)) {\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'newUser'), 'text' => $this->__('Create new user'));\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Import users'));\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADMIN)) {\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'exporter'), 'text' => $this->__('Export users'));\n }\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'newUser'), 'text' => $this->__('Create new user'), 'class' => 'z-icon-es-new', 'links' => $submenulinks);\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'search'), 'text' => $this->__('Find users'), 'class' => 'z-icon-es-search');\n }\n if (SecurityUtil::checkPermission('Users::MailUsers', '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mailUsers'), 'text' => $this->__('E-mail users'), 'class' => 'z-icon-es-mail');\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'config'), 'text' => $this->__('Settings'), 'class' => 'z-icon-es-config');\n }\n\n return $links;\n }", "public function getAllMenuItems()\n\t{\n\t\t$out = array();\n\t\n\t\t$sql = \"SELECT\n\t\t\t\t\t`menu`.`link_id`,\n\t\t\t\t\t`menu_tree`.`parent_id`,\n\t\t\t\t\t`menu`.`redirect_url`,\n\t\t\t\t\t`menu_tree`.`sequence_no`,\n\t\t\t\t\t`menu`.`title_menu`,\n\t\t\t\t\t`menu`.`title_page`,\n\t\t\t\t\t`menu`.`template_name`,\n\t\t\t\t\t`menu`.`module_id`,\n\t\t\t\t\t`menu`.`security_level_id`,\n\t\t\t\t\t`menu`.`group_id`,\n\t\t\t\t\t`menu_tree`.`main_link`,\n\t\t\t\t\t`menu_tree`.`quick_link`,\n\t\t\t\t\t`menu_tree`.`bottom_link`,\n\t\t\t\t\t`menu`.`sitemap`,\n\t\t\t\t\t`menu`.`status`\n\t\t\t\tFROM\n\t\t\t\t\t`menu_tree`\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t`menu`\n\t\t\t\tON\n\t\t\t\t\t`menu`.`link_id` = `menu_tree`.`link_id`\n\t\t\t\tORDER BY \n\t\t\t\t\t`menu_tree`.`parent_id`,`menu_tree`.`sequence_no`\n\t\t\t\t\";\n\t\t$stmt = $this->db->prepare($sql);\n\t\t$stmt->bind_result($link_id,$parent_id,$redirect_url,$sequence_no,$title_menu,$title_page,$template_name,$module_id,$security_level_id,$group_id,$main_link,$quick_link,$bottom_link,$sitemap,$status);\n\n\t\t$stmt->execute();\n\t\twhile($stmt->fetch())\n\t\t{\n\t\t\t$out[] = array(\n\t\t\t\t'link_id' => $link_id,\n\t\t\t\t'parent_id' => $parent_id,\n\t\t\t\t'redirect_url' => $redirect_url,\n\t\t\t\t'sequence_no' => $sequence_no,\n\t\t\t\t'title_menu' => $title_menu,\n\t\t\t\t'title_page' => $title_page,\n\t\t\t\t'template_name' => $template_name,\n\t\t\t\t'module_id' => $module_id,\n\t\t\t\t'security_level_id' => $security_level_id,\n\t\t\t\t'group_id' => $group_id,\n\t\t\t\t'main_link' => $main_link,\n\t\t\t\t'quick_link' => $quick_link,\n\t\t\t\t'bottom_link' => $bottom_link,\n\t\t\t\t'sitemap' => $sitemap,\n\t\t\t\t'status' => $status\n\t\t\t);\n\t\t}\n\t\t$stmt->close();\n\t\t\n\t\treturn $out;\n\t}", "function getAdminLinks()\n {\n }", "public function getMenus()\n\t{\n\n\t}", "public function cseMenuLinks() {\n\n\t\tif(Session::getSess('logged') == false) {\n\t\t\t$this->cseMenuLinks .= '\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/regUser\"><span>Регистрация</span></a></li>\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logIn\"><span>Вход</span></a></li>\n\t\t\t';\n\t\t} else {\n\t\t\t$username = $this->setUrl('userNameDisplay');\n\t\t\t$this->cseMenuLinks .= '\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/userProfile/'. $username .'\"><span>Настройки</span></a></li>\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logOut\"><span>Изход</span></a></li>\n\t\t\t';\n\t\t}\n\t}", "public function main_navigation(){\r\n\r\n echo \"<ul>\";\r\n\r\n if(isset($this->navigationSettings)){\r\n\r\n foreach((array) $this->navigationSettings as $key => $value){\r\n echo \"<li>\";\r\n echo \"<a href='$value'>$key</a>\";\r\n echo \"</li>\";\r\n }\r\n\r\n }\r\n\r\n echo \"</ul>\";\r\n\r\n }", "public function getMenuItems()\n {\n $sql = \"\n SELECT\n menu.uid,\n parent_uid,\n sort_order,\n nofollow,\n target,\n class,\n label,\n uri_uid,\n uri,\n menu.archived,\n menu.archived_datetime\n FROM menu\n LEFT JOIN uri\n ON uri.uid = menu.uri_uid\n WHERE menu.archived = '0'\n AND (uri.archived = '0' OR uri.archived IS NULL)\n \";\n\n $sql .= \"\n ORDER BY sort_order;\n \";\n\n $db = new Query($sql);\n $results = $db->fetchAllAssoc();\n\n return $results;\n }", "public function menu_main_menu()\n {\n return menu_main_menu();\n }", "public function liababyMenuLinks() {\n\n\t\tif(Session::getSess('logged') == false) {\n\t\t\t$this->liababyMenuLinks .= '\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/regUser\" title=\"\" subtitle=\"Присъедини се\">Регистрация</a></li>\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logIn\" title=\"\" subtitle=\"Влез в сайта\" class=\"last\">Вход</a></li>\n\t\t\t';\n\t\t} else {\n\t\t\t$username = $this->setUrl('userNameDisplay');\n\t\t\t$this->liababyMenuLinks .= '\n\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/userProfile/'. $username .'\" title=\"\" subtitle=\"вашият профил\">Профил</a></li>\n\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logOut\" title=\"\" subtitle=\"от профила\" class=\"last\">Изход</a></li>\n\t\t\t';\n\t\t}\n\t}", "public function getlinks()\n {\n $links = array();\n\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_READ)) {\n $links[] = array('url' => ModUtil::url($this->name, 'user', 'hooks'),\n 'text' => $this->__('Frontend'),\n 'title' => $this->__('Switch to user area.'),\n 'class' => 'z-icon-es-home');\n }\n if (SecurityUtil::checkPermission($this->name . ':Twitterparm:', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'view', array('ot' => 'twitterparm')),\n 'text' => $this->__('Twitterparms'),\n 'title' => $this->__('Twitterparm list'));\n }\n\n return $links;\n }", "public function getQueryMenus();", "static public function mainNavigation()\n {\n return self::where('parent_id', 0)\n ->where('is_main', 1)\n ->where('is_hidden', 0)\n ->orderBy('list_main_order')\n ->get();\n }", "public function getMenuItems() {\n\n $url = $this->urlHelper;\n $items = [];\n\n //Links Visible always to everyone logged in or not.\n //default Home page - no login required. \n\n /* $items[] = [\n 'id' => 'home',\n 'label' => 'Home',\n 'link' => $url('home')\n ]; */\n\n //add links here for pages that will be visible for all users logged-in or not.\n //you must adjust User\\Module.php (~line 85) onDispatch method to ignore calls for \n //the associated Controller and action or you will end up with an infinite loop.\n /*\n $items[] = [\n 'id' => 'about',\n 'label' => 'About',\n 'link' => $url('about')\n ];\n */\n\n $user = $this->authManager->getLoggedInUser();\n\n //BEGIN Authentication/Rendering Logic\n // Display \"Login\" menu item for not authorized user only. On the other hand,\n // display \"Admin\" and \"Logout\" menu items only for authorized users and any other links \n // that should be visible by logged-in users.\n if (!$user) {\n\n $items[] = [\n 'id' => 'login',\n 'label' => 'Sign in',\n 'link' => $url('login'),\n 'float' => 'right'\n ];\n } else {\n\n //render Customers link for all users with sales_attr_id value in users table\n if (!empty($user->getSales_attr_id())) {\n $items[] = [\n 'id' => 'customers',\n 'label' => 'Customers',\n 'data-ffm-salesperson' => $user->getFullName(),\n 'float' => 'static',\n 'link' => $url('customer', ['action' => 'view', 'id' => $user->getSales_attr_id()])\n ];\n }\n //only display admin drop down for admin users.\n $isAdmin = $this->authManager->isAdmin();\n if ($isAdmin) {\n $items[] = [\n 'id' => 'admin',\n 'label' => '<i class=\"ion-gear-a\"></i>',\n 'float' => 'right',\n 'dropdown' => [\n [\n 'id' => 'users',\n 'label' => 'Manage Users',\n 'link' => $url('users')\n ]\n ]\n ];\n }\n\n $settingsDropDownManageAccount = [\n 'id' => 'manage_account',\n 'label' => 'Manage Account',\n 'link' => $url('users', ['action' => 'edit', 'id' => $user->getId()])\n ];\n\n $settingsDropDownViewAccount = [\n 'id' => 'view_account',\n 'label' => 'View Account',\n 'link' => $url('application', ['action' => 'settings'])\n ];\n\n $settingsDropDownLogout = [\n 'id' => 'logout',\n 'label' => 'Logout',\n 'link' => $url('logout')\n ];\n\n $settingsDropDown = [];\n\n //only add the Manage Account link for Admins.\n if ($isAdmin) {\n $settingsDropDown[] = $settingsDropDownManageAccount;\n }\n\n $settingsDropDown[] = $settingsDropDownViewAccount;\n\n $settingsDropDown[] = $settingsDropDownLogout;\n\n $items[] = [\n 'id' => 'settings',\n 'label' => '<i class=\"ion-person\"></i>' . $user->getUsername(),\n 'float' => 'right',\n 'dropdown' => $settingsDropDown\n ];\n\n $loggedInItems = $this->getLoggedInItems();\n\n if ($loggedInItems)\n array_merge($items, $loggedInItems);\n\n // add items to right of settings in top right corner only for logged-in users here\n //Show Salespeople link only to Admin users\n if ($isAdmin) {\n\n $items[] = [\n 'id' => 'salespeople',\n 'label' => 'Salespeople',\n 'float' => 'static',\n 'link' => $url('salespeople', ['action' => 'index']),\n ];\n }\n }\n\n return $items;\n }", "function theme_menu() {\n global $theme;\n $content = new UN_Content();\n $cAll = $content->getMenuContent($theme->langid);\n if (is_array($cAll)) {\n $out = '<ul>';\n if ($theme->indexlink == 1) {\n $out .= '<li><a href=\"index.php'.theme_global_url(true).'\"><span>'._('Main Page').'</span></a></li>';\n }\n foreach($cAll as $c) {\n $link = ($c['pagelink']!=\"\") ? $c['pagelink'] : 'index.php?t=page&amp;id='.$c['pageid'];\n $title = ($c['pagelink']!=\"\") ? $c['pagedetail'] : $c['pagetitle'];\n $out .= '<li><a href=\"'.$link.theme_global_url().'\" title=\"'.strip_tags($title).'\"><span>'.$c['pagetitle'].'</span></a></li>';\n }\n $out .= '</ul>';\n }\n echo $out;\n}", "public function getlinks()\n {\n $links = array();\n\n if (Content_Util::contentHasPageCreateAccess()) {\n $links[] = array(\n 'url' => ModUtil::url('Content', 'admin', 'newPage'),\n 'text' => $this->__('Add new page'),\n 'class' => 'z-icon-es-new');\n }\n if (SecurityUtil::checkPermission('Content::', '::', ACCESS_EDIT)) {\n $links[] = array(\n 'url' => ModUtil::url('Content', 'admin', 'main'),\n 'text' => $this->__('Page list'),\n 'class' => 'z-icon-es-edit',\n 'links' => array(\n array('url' => ModUtil::url('Content', 'user', 'sitemap'),\n 'text' => $this->__('Sitemap')),\n array('url' => ModUtil::url('Content', 'user', 'extlist'),\n 'text' => $this->__('Extended')),\n array('url' => ModUtil::url('Content', 'user', 'pagelist'),\n 'text' => $this->__('Complete')),\n array('url' => ModUtil::url('Content', 'user', 'categories'),\n 'text' => $this->__('Category list')),\n ));\n }\n\n return $links;\n }", "function get_registered_nav_menus()\n {\n }", "function get_nav_menu_locations()\n {\n }", "function getAllLinks(){\r\n return $this->link_arry;\r\n }", "public function get_links() {\n\t\t$context = $this->context_memoizer->for_current_page();\n\n\t\treturn $context->presentation->breadcrumbs;\n\t}", "public function getLinksList(){\n return $this->_get(9);\n }", "function api_list_menus() {\n\t\t$menus = array();\n\t\tforeach ( get_nav_menu_locations() as $menu_slug => $menu_id ) {\n\n\t\t\t$menu = $menu_id?self::get_menu_object($menu_id):false;\n\t\t\t$menus[ $menu_slug ] = $menu;\n\t\t}\n\n\t\treturn $menus;\n\t}", "function get_menu() {\n return wp_get_nav_menu_items(9);\n }", "public static function getMenus()\n\t{\n\t\t$sql = \"SELECT * FROM mod_menu\";\n\t\t$query = \\SimplCMS::$app->getDbConnection()->query($sql);\n\t\treturn $query->fetchAll( \\PDO::FETCH_ASSOC );\t\t\n\t}", "public function getlinks($args)\n {\n $links = array();\n if (SecurityUtil::checkPermission('IWmain::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('IWmain', 'admin', 'conf'), 'text' => $this->__('Configure parameters'), 'id' => 'iwmain_conf', 'class' => 'z-icon-es-config');\n $links[] = array('url' => ModUtil::url('IWmain', 'admin', 'main2'), 'text' => $this->__('Programmed sequences information'), 'id' => 'iwmain_crone', 'class' => 'z-icon-es-gears');\n }\n return $links;\n }", "public function index()\n {\n return $this->menu->all();\n }", "function menuGetPrimaryItems() {\n $items = array();\n $items[] = array('title' => 'Home', 'url' => '/');\n $items[] = array('title' => 'Blog', 'url' => '/Blog');\n $items[] = array('title' => 'Archive', 'url' => '/Archive');\n\n return menuPrepareItems($items);\n}", "public function get_links()\n {\n }", "public function getLinks()\n {\n return $this->getAllChildren();\n }", "function threed_admin_plugin_menu_links($menu)\n{\n $menu[] = array(\n 'NAME' => 'ThreeD',\n 'URL' => THREED_ADMIN,\n );\n return $menu;\n}", "public function getLinks()\n {\n // Define an empty array to hold the list of admin links\n $links = array();\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'modifyconfig'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config');\n }\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'view'),\n 'text' => $this->__('Tag List'),\n 'class' => 'z-icon-es-view');\n }\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'edit'),\n 'text' => $this->__('New tag'),\n 'class' => 'z-icon-es-new');\n }\n\n return $links;\n }", "public function getMenu();", "public function getLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info'),\n \t\t\t\t 'text' => $this->__(' Info'),\n \t\t\t\t 'class' => 'mediasharex-icon-laptop',\n\t\t\t\t\t\t\t 'links' => $this->getInfoLinks());\n }\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info_docs'),\n \t\t\t\t 'text' => $this->__(' Documentation'),\n \t\t\t\t 'class' => 'mediasharex-icon-cabinet');\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_general'),\n \t\t\t\t 'text' => $this->__(' Settings'),\n \t\t\t\t 'class' => 'mediasharex-icon-cogs',\n\t\t\t\t\t\t\t 'links' => $this->getSettingsLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager'),\n \t\t\t\t 'text' => $this->__(' Content manager'),\n \t\t\t\t 'class' => 'mediasharex-icon-folder',\n\t\t\t\t\t\t\t 'links' => $this->getManagerLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh'),\n \t\t\t\t 'text' => $this->__(' Sources & Handlers'),\n \t\t\t\t 'class' => 'mediasharex-icon-equalizer',\n\t\t\t\t\t\t\t 'links' => $this->getSandHLinks());\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'media_types'),\n \t\t\t\t 'text' => $this->__(' Media types'),\n \t\t\t\t 'class' => 'mediasharex-icon-star',\n\t\t\t\t\t\t\t 'links' => $this->getMediaTypesLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'),\n \t\t\t\t 'text' => $this->__(' Import'),\n \t\t\t\t 'class' => 'mediasharex-icon-loop',\n\t\t\t\t\t\t\t 'links' => $this->getImportLinks());\n }\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\t\n\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mainsettings'), 'text' => $this->__('Main settings'), 'class' => 'z-icon-es-config');\n }\n\n\n\n\n\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managealbums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageitems'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managemediastore'), 'text' => $this->__('Media store'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managehandlers'), 'text' => $this->__('Handlers'), 'class' => 'z-icon-es-display');\n }\n\t\t\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managesources'), 'text' => $this->__('Sources'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageinvitations'), 'text' => $this->__('Invitations'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Import'), 'class' => 'z-icon-es-filter');\n }\t\n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t */\t\n \n return $links;\n }", "protected function get_menu_links($content)\n {\n $crawler = new Crawler($content);\n\n $menu_links_filter = $crawler->filter('li.level2-li');\n $menu_links = $this->get_links_from_filter($menu_links_filter);\n\n return $menu_links;\n }", "public function getMenus()\n {\n $menus = array();\n\n $CoreMenuObject = new CoreMenuObject();\n $CoreMenuObject->setId('performanceutils');\n $CoreMenuObject->setName('admin.performance.utils.link.name');\n $CoreMenuObject->setTitle('admin.performance.utils.link.title');\n $CoreMenuObject->setHref('/admin/performanceutils');\n $CoreMenuObject->setParentId(AdminModule::ADMIN_NAV_ID_SYSTEM);\n $CoreMenuObject->setTarget(AdminModule::ADMIN_NAV_ID);\n array_push($menus, $CoreMenuObject);\n\n return $menus;\n }", "function getMenuItems()\n {\n }", "public static function core_menu(){\r\n\t\t$menu = array();\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','dashboard']);\r\n\t\tarray_push($menu,[$url, _('Dashboard')]);\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','plugins']);\r\n\t\tarray_push($menu,[$url, _('Plugins')]);\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','regandlang']);\r\n\t\tarray_push($menu,[$url, _('Regional and Languages')]);\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','basic_settings']);\r\n\t\tarray_push($menu,[$url, _('Basic Settings')]);\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','themes']);\r\n\t\tarray_push($menu,[$url, _('Apperance')]);\r\n\t\t$url = core\\general::create_url(['service','1','plugin','administrator','action','main','p','administrator','a','blocks']);\r\n\t\tarray_push($menu,[$url, _('Blocks')]);\r\n\t\t$ret = array();\r\n\t\tarray_push($ret, ['<span class=\"glyphicon glyphicon-tasks\" aria-hidden=\"true\"></span>' , _('Administrator')]);\r\n\t\tarray_push($ret,$menu);\r\n\t\treturn $ret;\r\n\t}", "public function getLinks()\n {\n if(null === $this->_link){\n\t\t\t$node = Mage::app()->getConfig()\n\t\t\t\t->getNode('global/faonni_accountnavigation/link');\n\t\t\t$this->_link = $node->asArray();\t\n\t\t}\n\t\treturn $this->_link;\n }", "public function getLinks()\n\t{\n\t\treturn $this->aLinks;\n\t}", "public static function menus()\n {\n return [];\n }", "public static function get_all_registered_navmenus(){\r\n return get_registered_nav_menus(); //create nav menu by ie: register_nav_menu( 'primary', __( 'Primary Menu', 'hoangweb' ) );\r\n }", "function getMenu($links, $vertical) {\n $key=null;$mean=null;\n echo \"<ul>\";\n if($vertical) {\n foreach ($links as $key => $mean) {\n echo \"<li><a href='$mean'>$key</li>\";\n }\n } else {\n foreach ($links as $key => $mean) {\n echo \"<li style='display:inline; margin-right: 10px;'><a href='$mean'>$key</li>\";\n }\n }\n echo \"</ul>\";\n }", "protected function getMainMenuStructure(): array {\n\n return [\n [\n 'id' => 'frontpage',\n 'title' => 'Frontpage',\n 'url' => '/',\n ],\n [\n 'id' => 'task-description',\n 'title' => 'Task description',\n 'url' => '/task-description',\n ],\n ];\n }", "public function getLinks()\n {\n $links = array();\n \n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_READ)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaysysinfo'),\n 'text' => $this->__('Server'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_OVERVIEW)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaybrowserinfo'),\n 'text' => $this->__('Client'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_EDIT)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'backupdb'),\n 'text' => $this->__('Backup'),\n 'class' => 'z-icon-es-export');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'scripts'),\n 'text' => $this->__('Scripts'),\n 'class' => 'z-icon-es-gears');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url('Zfiler', 'admin', 'filer'),\n 'text' => $this->__('Filer'),\n 'class' => 'z-icon-es-folder');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'modifyconfig'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => 'https://github.com/nmpetkov/Ztools/wiki',\n 'text' => $this->__('Wiki'),\n 'class' => 'z-icon-es-help');\n }\n\n return $links;\n }", "public function getLinks()\n\t{\n\t\t$data = $this->curl->curlGetReq($this->baseURL);\n\t\t$query = \"//a/@href\";\n\t\t$links = $this->curl->getDOMData($data,$query);\n\t\t\n\n\t\t//var_dump($links[0]);\n\n\t\tforeach ($links as $link)\n\t\t{\n\t\t\t\n\t\t\tif($link->value == \"/calendar\")\n\t\t\t{\n\t\t\t\t$this->calendarLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t\n\t\t\t}\n\t\t\tif($link->value == \"/cinema\")\n\t\t\t{\n\t\t\t\t$this->cinemaLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t}\n\t\t\tif($link->value == \"/dinner\")\n\t\t\t{\n\t\t\t\t$this->dinnerLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t$this->dinnerLoginLink = $this->dinnerLink.\"login\";\n\t\t\t}\n\n\t\t\n\t\t\n\t\t}\n\t}", "function get_menu( $full_url = true ){\n\t$menu = get_settings( 'menu' );\n\t$blog = get_settings( 'blog' );\n\n\tlist( $blog_label, $blog_url, $blog_enabled ) = get_list(\n\t\t['menu_label', 'url', 'enable'],\n\t\t$blog\n\t);\n\n\t// Unset if there is a menu label similar with the blog link.\n\tif ( isset($menu[$blog_label]) ) unset($menu[$blog_label]);\n\n\t// If the blog is enabled, append the link to the end of the menu.\n\tif ( $blog_enabled ){\n\t\t$blog_url = ltrim( $blog_url, '/' );\n\t\t$menu[$blog_label] = \"/$blog_url\";\n\t}\n\n\tif ( true === $full_url ){\n\t\tforeach ( (array)$menu as $label => $href ){\n\t\t\t$home_url = home_url();\n\t\t\tif ( !is_url($href) ){\n\t\t\t\t$href = !is_array($href)\n\t\t\t\t\t? $home_url . $href\n\t\t\t\t\t: add_url_query( $href, $home_url, true );\n\t\t\t}\n\n\t\t\t$menu[$label] = $href;\n\t\t}\n\t}\n\n\treturn $menu;\n}", "function build_menulistbyurl()\r\n\t{\r\n\t\t$url=$this->input->post('url');\r\n\t\t\r\n\t\t// check if url set \r\n\t\tif(!$url)\r\n\t\t\tdie(\"No referer found\");\r\n\t\t \r\n\t\t// get top most menu which has 0 has parent \r\n\t\t$menu_parent_id='';\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\t$menu_det=$this->erpm->get_menu_parent_id($url,$menu_parent_id);\r\n\t\t\t\r\n\t\t\tif($menu_det[0]['parent']==0)\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\t$menu_parent_id=$menu_det[0]['parent'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\t$parent_id=$menu_det[0]['id'];\r\n\t\t$menus=$this->erpm->get_menubyparentid($parent_id);\r\n\t\t\r\n\t\t/*if($menus)\r\n\t\t{\r\n\t\t\t$menu_list = '';\r\n\t\t\t\tforeach($menus as $menu)\r\n\t\t\t\t\t$menu_list .= '<li><a href=\"'.site_url($menu['link']).'\">'.$menu['name'].\"</a></li>\";\r\n\t\t\t\t\t\r\n\t\t\techo '<ul>'.$menu_list.'</ul>';\r\n\t\t}*/\r\n\t\techo $this->cm_generate_menu($this,$menus,'<ul class=\"left-main-menu\">','</ul>',$selected_ids=array());\r\n\t\t\r\n\t}", "public function get_all_links()\r\n {\r\n \tif (empty($this->course_code))\r\n \t\tdie('Error in get_not_created_links() : course code not set');\r\n \t\r\n \t$course_info = api_get_course_info($this->course_code);\r\n \t$tbl_grade_links = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINK,$course_info['dbName']);\r\n\r\n\t\t$sql = 'SELECT id,title from '.$this->get_exercise_table();\r\n\t\t$result = api_sql_query($sql, __FILE__, __LINE__);\r\n\r\n\t\t$cats=array();\r\n\t\twhile ($data=mysql_fetch_array($result))\r\n\t\t{\r\n\t\t\t$cats[] = array ($data['id'], $data['title']);\r\n\t\t}\r\n\t\treturn $cats;\r\n }", "function public_nav_main()\n{\n $view = get_view();\n $nav = new Omeka_Navigation;\n $nav->loadAsOption(Omeka_Navigation::PUBLIC_NAVIGATION_MAIN_OPTION_NAME);\n $nav->addPagesFromFilter(Omeka_Navigation::PUBLIC_NAVIGATION_MAIN_FILTER_NAME);\n return $view->navigation()->menu($nav);\n}", "public function getMenuItems()\n {\n return $this->adminMenu->all();\n }", "public function getmenu( ) {\n \t$parent = $this->find('all', array(\n 'conditions' => array(\n 'Page.parent_id IS NULL',\n 'Page.is_menu' => 1,\n 'Page.is_active' => 1\n ),\n 'contain'=>array(\n ),\n 'fields'=>array('Page.lft', 'Page.rght'),\n 'order'=>array('Page.lft' => 'ASC')\n ));\n\t\t\n\t\t$recs = array(); \n foreach($parent as $v){\n \t$info = $this->find('threaded', array(\n\t 'conditions' => array(\n\t 'Page.lft >=' => $v['Page']['lft'], \n\t 'Page.rght <=' => $v['Page']['rght'],\n\t 'Page.is_menu' => 1,\n\t 'Page.is_active' => 1\n\t ),\n\t 'contain'=>array()\n\t ));\n\t \n\t $recs = array_merge($recs, $info);\n\t }\n\t\t\n\t\treturn $recs;\n }", "public static function getLinks() {\n $links = Yii::$app->cacheManage->links;\n if ($links) {\n return $links;\n }\n\n $links = LinkOption::getAllLinks();\n if ($links) {\n Yii::$app->cacheManage->links = $links;\n }\n return $links;\n }", "public function getAllMenus()\n {\n $menus = $this->find('all', array(\n 'conditions' => array(\n 'Menu.active' => true,\n ),\n 'order' => array(\n 'Menu.order' => 'asc',\n ),\n 'joins' => array(\n array(\n 'table' => 'product_categories',\n 'alias' => 'ProductCategory',\n 'type' => 'left',\n 'conditions' => array(\n 'Menu.type = \"ProductCategory\"',\n 'Menu.child = ProductCategory.id'\n )\n ),\n array(\n 'table' => 'blog_categories',\n 'alias' => 'BlogCategory',\n 'type' => 'left',\n 'conditions' => array(\n 'Menu.type = \"BlogCategory\"',\n 'Menu.child = BlogCategory.id'\n )\n ),\n array(\n 'table' => 'pages',\n 'alias' => 'Page',\n 'type' => 'left',\n 'conditions' => array(\n 'Menu.type = \"Page\"',\n 'Menu.child = Page.id'\n )\n )\n ),\n 'fields' => array(\n 'Menu.id',\n 'Menu.introduction',\n 'Menu.name',\n 'Menu.image',\n 'Menu.type',\n 'Menu.parent_id',\n 'Menu.child',\n 'ProductCategory.slug',\n 'Page.slug',\n 'BlogCategory.slug'\n )\n ));\n\n return $menus;\n }", "public function menu_navigation_links($menu_name, $level = 0)\n {\n return menu_navigation_links($menu_name, $level);\n }", "public function links() {\n\t\t?>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/15uoww1\" target=\"_blank\"><?php echo __( 'Installation manual', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/W9GDQT\" target=\"_blank\"><?php echo __( 'Frequently Asked Questions', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/WW93Sk\" target=\"_blank\"><?php echo __( 'Report a bug', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/11UE2lF\" target=\"_blank\"><?php echo __( 'Request a function', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/XkivOW\" target=\"_blank\"><?php echo __( 'Submit a translation', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/UlDG4t\" target=\"_blank\"><?php echo __( 'More cool stuff by WPBuddy', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t</ul>\n\t<?php\n\t}", "function uwwtd_menu_link__main_menu(&$variables) {\n $element = $variables['element'];\n\n $sub_menu = ($element['#below'] ? drupal_render($element['#below']) : '');\n $depth = $element['#original_link']['depth'] + 1;\n\n $unused = array('leaf', 'first', 'menu-mlid-' . $element['#original_link']['mlid']);\n $element['#attributes']['class'] = array_diff($element['#attributes']['class'], $unused);\n\n $element['#attributes']['class'][] = 'menu-item';\n $element['#attributes']['class'][] = 'menu-item--depth-' . $element['#original_link']['depth'];\n\n $element['#localized_options']['html'] = TRUE;\n $element['#localized_options']['attributes']['class'][] = 'menu-link';\n $element['#localized_options']['attributes']['class'][] = 'menu-link--depth-' . $element['#original_link']['depth'];\n\n if (!empty($sub_menu)) {\n // Wrap menu-level for each level.\n $sub_menu = '<div class=\"menu-level menu-level--' . $depth . '\">' . $sub_menu . '</div>';\n }\n // krumo($element);\n if ($depth == 2 && $element['#below']) {\n $link = l('<span class=\"title\">' . $element['#title'] . ' <i style=\"float:right;line-height:20px;\" class=\"fa fa-caret-down\"></i></span>', $element['#href'], $element['#localized_options']);\n } elseif ($depth == 3 && $element['#below']) {\n $link = l('<span class=\"title\">' . $element['#title'] . ' <i style=\"float:right;line-height:20px;\" class=\"fa fa-caret-right\"></i></span>', $element['#href'], $element['#localized_options']);\n } else {\n $link = l('<span class=\"title\">' . $element['#title'] . '</span>', $element['#href'], $element['#localized_options']);\n }\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $link . $sub_menu . '</li>';\n\n}", "public function getlinks()\n {\n $links = array();\n\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'main'), 'text' => $this->__('System summary'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 4)), 'text' => $this->__('PHP configuration'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 8)), 'text' => $this->__('PHP modules'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 16)), 'text' => $this->__('Server environment'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 32)), 'text' => $this->__('PHP variables'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'extensions'), 'text' => $this->__('Zikula extensions'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'filesystem'), 'text' => $this->__('Zikula file system'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'ztemp'), 'text' => $this->__('Zikula ztemp directory'));\n }\n\n return $links;\n }", "public function getForMenu(): array\n {\n $categories = $this->getAllActive();\n\n $menu = [];\n\n foreach($categories as $category)\n {\n if($category['parent_id'] != 0){\n $menu[$category['parent_id']]['sub-categories'][] = $this->prepareURL($category)->toArray();\n } else {\n $menu[$category['id']]['category'] = $this->prepareURL($category)->toArray();\n }\n }\n\n foreach ($menu as $key => $value){\n if(!isset($value['category'])){\n unset($menu[$key]);\n }\n }\n\n return $menu;\n }", "public static function getLinks()\n\t{\n\t\treturn static::$links;\n\t}", "public function getLinks()\n {\n $url = Yii::$app->getRequest()->getAbsoluteUrl();\n // change $url_cut_point if you have more prefix in the url of restful api\n $url_cut_point = 5;\n $url_slice = array_slice(preg_split(\"#[?/]#\", $url), 0, $url_cut_point);\n $link = implode('/', $url_slice).'/'.$this->id;\n\n return [ Link::REL_SELF => $link ];\n }", "function getNavs() {\n\t$pageData = getPageData();\n\t$li = '';\n\tforeach($pageData as $k => $v) {\n\t\t$li .= '<li><a href=\"' . COVER_PAGE . '?show=' . $k .'\">' . $k . '</a></li>' . \"\\n\";\n\t}\n\treturn $li;\n}", "public function getForRoutes()\n {\n $menuitems = DB::table('menu__menus')\n ->select(\n 'primary',\n 'menu__menuitems.id',\n 'menu__menuitems.parent_id',\n 'menu__menuitems.module_name',\n 'menu__menuitem_translations.uri',\n 'menu__menuitem_translations.locale'\n )\n ->join('menu__menuitems', 'menu__menus.id', '=', 'menu__menuitems.menu_id')\n ->join('menu__menuitem_translations', 'menu__menuitems.id', '=', 'menu__menuitem_translations.menuitem_id')\n ->where('uri', '!=', '')\n ->where('module_name', '!=', '')\n ->where('status', '=', 1)\n ->where('primary', '=', 1)\n ->orderBy('module_name')\n ->get();\n\n $menuitemsArray = [];\n foreach ($menuitems as $menuitem) {\n $menuitemsArray[$menuitem->module_name][$menuitem->locale] = $menuitem->uri;\n }\n\n return $menuitemsArray;\n }", "function minorite_admin_menu_links($variables) {\n $destination = &drupal_static('admin_menu_destination');\n $elements = $variables['elements'];\n\n if (!isset($destination)) {\n $destination = drupal_get_destination();\n $destination = $destination['destination'];\n }\n\n // The majority of items in the menu are sorted already, but since modules\n // may add or change arbitrary items anywhere, there is no way around sorting\n // everything again. element_sort() is not sufficient here, as it\n // intentionally retains the order of elements having the same #weight,\n // whereas menu links are supposed to be ordered by #weight and #title.\n uasort($elements, 'admin_menu_element_sort');\n $elements['#sorted'] = TRUE;\n\n $output = '';\n foreach (element_children($elements) as $path) {\n // Early-return nothing if user does not have access.\n if (isset($elements[$path]['#access']) && !$elements[$path]['#access']) {\n continue;\n }\n $elements[$path] += array(\n '#attributes' => array(),\n '#options' => array(),\n );\n // Render children to determine whether this link is expandable.\n if (isset($elements[$path]['#type']) || isset($elements[$path]['#theme']) || isset($elements[$path]['#pre_render'])) {\n $elements[$path]['#children'] = drupal_render($elements[$path]);\n }\n else {\n $elements[$path]['#children'] = theme('admin_menu_links', array('elements' => $elements[$path]));\n if (!empty($elements[$path]['#children'])) {\n $elements[$path]['#attributes']['class'][] = 'expandable';\n }\n if (isset($elements[$path]['#attributes']['class'])) {\n $elements[$path]['#attributes']['class'] = $elements[$path]['#attributes']['class'];\n }\n }\n\n // Manual Translate of some admin menu for the content type\n if (!empty($elements[$path]['#href'])) {\n //$new_title = minorite_locale_admin_menu_translate($elements[$path]['#href']);\n if (isset($new_title)) {\n $elements[$path]['#title'] = $new_title;\n }\n }\n\n $link = '';\n // Handle menu links.\n if (isset($elements[$path]['#href'])) {\n // Strip destination query string from href attribute and apply a CSS class\n // for our JavaScript behavior instead.\n if (isset($elements[$path]['#options']['query']['destination']) && $elements[$path]['#options']['query']['destination'] == $destination) {\n unset($elements[$path]['#options']['query']['destination']);\n $elements[$path]['#options']['attributes']['class'][] = 'admin-menu-destination';\n }\n\n $link = l($elements[$path]['#title'], $elements[$path]['#href'], $elements[$path]['#options']);\n }\n // Handle plain text items, but do not interfere with menu additions.\n elseif (!isset($elements[$path]['#type']) && isset($elements[$path]['#title'])) {\n if (!empty($elements[$path]['#options']['html'])) {\n $title = $elements[$path]['#title'];\n }\n else {\n $title = check_plain($elements[$path]['#title']);\n }\n $attributes = '';\n if (isset($elements[$path]['#options']['attributes'])) {\n $attributes = drupal_attributes($elements[$path]['#options']['attributes']);\n }\n $link = '<span' . $attributes . '>' . $title . '</span>';\n }\n\n $output .= '<li' . drupal_attributes($elements[$path]['#attributes']) . '>';\n $output .= $link . $elements[$path]['#children'];\n $output .= '</li>';\n }\n // @todo #attributes probably required for UL, but already used for LI.\n // @todo Use $element['#children'] here instead.\n if ($output) {\n $elements['#wrapper_attributes']['class'][] = 'dropdown';\n $attributes = drupal_attributes($elements['#wrapper_attributes']);\n $output = \"\\n\" . '<ul' . $attributes . '>' . $output . '</ul>';\n }\n return $output;\n}", "public function getMenus(){\n\n }", "public function menu()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'name' => 'users',\n\t\t\t\t'href' => '#',\n\t\t\t\t'submenu' => TRUE,\n\t\t\t\t'menu' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'foo',\n\t\t\t\t\t\t'href' => '#',\n\t\t\t\t\t\t'submenu' => FALSE,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'bar',\n\t\t\t\t\t\t'href' => '#',\n\t\t\t\t\t\t'submenu' => TRUE,\n\t\t\t\t\t\t'menu' => array(\n\t\t\t\t\t\t\t'name' => 'this is a third submenu',\n\t\t\t\t\t\t\t'href' => '#',\n\t\t\t\t\t\t\t'submenu' => FALSE,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'foobar',\n\t\t\t\t'href' => '#',\n\t\t\t\t'submenu' => FALSE,\n\t\t\t),\n\t\t);\n\t}", "public function configureMenuItems(): iterable\n {\n yield MenuItem::linktoDashboard('Dashboard', 'fa fa-home');\n yield MenuItem::linkToCrud('Utilisateur', 'fa fa-user', User::class);\n yield MenuItem::linkToCrud('Commandes', 'fa fa-box', Order::class);\n yield MenuItem::linkToCrud('Catégories', 'fa fa-list', Category::class);\n yield MenuItem::linkToCrud('Produits', 'fa fa-tshirt', Product::class);\n yield MenuItem::linkToCrud('Transporteur', 'fa fa-truck', Carrier::class);\n }", "function _quick_menu () {\n\t\t$menu = array(\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> ucfirst($_GET[\"object\"]).\" main\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> \"\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t);\n\t\treturn $menu;\t\n\t}", "public function run()\n {\n $menus = [\n\n /*\n * Admin\n */\n [\n 'name' => 'Заявки и запросы',\n 'link' => '/admin/',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Заявки OSS',\n 'link' => '/admin/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Запросы SIB',\n 'link' => '/admin/be-partner-requests',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Пользователи',\n 'link' => '/admin/users',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Online Smart System',\n 'link' => '/admin/oss',\n 'icon' => 'fa fa-lg fa-fw fa-database',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Абонементы',\n 'link' => '/admin/oss/subscriptions',\n 'icon' => 'fa fa-fw fa-ticket',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Смена куратора',\n 'link' => '/admin/oss/change-curator',\n 'icon' => 'fa fa-lg fa-fw fa-refresh',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Новости',\n 'link' => '/admin/oss/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение',\n 'link' => '/admin/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpERA',\n 'link' => '/admin/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'SIB',\n 'link' => '/admin/sib',\n 'icon' => 'fa fa-lg fa-fw fa-briefcase',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Новости компании',\n 'link' => '/admin/sib/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Линейка событий',\n 'link' => '/admin/sib/events',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Промо и акции',\n 'link' => '/admin/sib/promos',\n 'icon' => 'fa fa-lg fa-fw fa-gift',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Документация',\n 'link' => '/admin/sib/documents',\n 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Отчеты',\n 'link' => '/admin/reports',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [\n [\n 'name' => 'Финансовая аналитика',\n 'link' => '/admin/reports/financial-analytics',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Рейтинг чеков',\n 'link' => '/admin/reports/check-ratings',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'ФЦ за период',\n 'link' => '/admin/reports/fc-per-period',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'ФЦ по фин. периодам',\n 'link' => '/admin/reports/fc-per-fp',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'История ББС',\n 'link' => '/admin/reports/bbs-history',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'История выплат',\n 'link' => '/admin/reports/payment-history',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Баллы по бинару',\n 'link' => '/admin/reports/binary-points',\n 'icon' => 'fa fa-lg fa-fw fa-line-chart',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Настройки',\n 'link' => '/admin/settings',\n 'icon' => 'fa fa-lg fa-fw fa-cog',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Журнал',\n 'link' => '/admin/journal',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n [\n 'name' => 'Тестирование',\n 'link' => '/admin/test',\n 'icon' => 'fa fa-lg fa-fw fa-cogs',\n 'cabinet_id' => 1,\n 'children' => [],\n ],\n\n\n /*\n * SIB\n */\n [\n 'name' => 'Финансы',\n 'link' => '/finance',\n 'icon' => 'fa fa-lg fa-fw fa-money',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Активность',\n 'link' => '/finance/activity',\n 'icon' => 'fa fa-lg fa-fw fa-clock-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк',\n 'link' => '/finance/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Платежный календарь',\n 'link' => '/finance/payment-calendar',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Лично приглашенные',\n 'link' => '/personal-invited',\n 'icon' => 'fa fa-lg fa-fw fa-share-alt fa-rotate-90',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Классическая схема',\n 'link' => '/classic',\n 'icon' => 'fa fa-lg fa-fw fa-chain',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Я и моя команда',\n 'link' => '/me-and-my-team',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Online Smart System',\n 'link' => '/oss',\n 'icon' => 'fa fa-lg fa-fw fa-database',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Новости OSS',\n 'link' => '/oss/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение OSS',\n 'link' => '/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Абонементы OSS',\n 'link' => '/oss/products',\n 'icon' => 'fa fa-lg fa-fw fa-ticket',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpERA',\n 'link' => '/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Соревнования OSS',\n 'link' => '/oss/competitions',\n 'icon' => 'fa fa-lg fa-fw fa-trophy',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Заявки OSS',\n 'link' => '/oss/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Команда OSS',\n 'link' => '/oss/teams',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк OSS',\n 'link' => '/oss/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Образование',\n 'link' => '/education',\n 'icon' => 'fa fa-lg fa-fw fa-book',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Партнёрское',\n 'link' => '/education/partners',\n 'icon' => 'fa fa-lg fa-fw fa-briefcase',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Школа ERA',\n 'link' => '/education/school-era',\n 'icon' => 'fa fa-lg fa-fw fa-heart-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n [\n 'name' => 'Информация',\n 'link' => '/info',\n 'icon' => 'fa fa-lg fa-fw fa-info-circle',\n 'cabinet_id' => 2,\n 'children' => [\n [\n 'name' => 'Новости компании',\n 'link' => '/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Линейка событий',\n 'link' => '/info/events',\n 'icon' => 'fa fa-lg fa-fw fa-calendar',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Промо и акции',\n 'link' => '/info/promos',\n 'icon' => 'fa fa-lg fa-fw fa-gift',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n [\n 'name' => 'Документы (файлы)',\n 'link' => '/info/documents',\n 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n 'cabinet_id' => 2,\n 'children' => [],\n ],\n ],\n ],\n\n\n /*\n * OSS\n */\n [\n 'name' => 'Новости',\n 'link' => '/oss/info/news',\n 'icon' => 'fa fa-lg fa-fw fa-newspaper-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Обучение',\n 'link' => '/oss/attestation',\n 'icon' => 'fa fa-lg fa-fw fa-mortar-board',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Абонементы',\n 'link' => '/oss/products',\n 'icon' => 'fa fa-lg fa-fw fa-ticket',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'WakeUpEra',\n 'link' => '/oss/wake-up-era',\n 'icon' => 'fa fa-lg fa-fw fa-sun-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Соревнования',\n 'link' => '/oss/competitions',\n 'icon' => 'fa fa-lg fa-fw fa-trophy',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Заявки',\n 'link' => '/oss/requisitions',\n 'icon' => 'fa fa-lg fa-fw fa-check-square-o',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Команда',\n 'link' => '/oss/teams',\n 'icon' => 'fa fa-lg fa-fw fa-users',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Кошелёк',\n 'link' => '/oss/wallet',\n 'icon' => 'fa fa-lg fa-fw fa-credit-card',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n [\n 'name' => 'Информация',\n 'link' => '/oss/info',\n 'icon' => 'fa fa-lg fa-fw fa-info-circle',\n 'cabinet_id' => 3,\n 'children' => [\n// [\n// 'name' => 'Документация',\n// 'link' => '/oss/info/documents',\n// 'icon' => 'fa fa-lg fa-fw fa-file-pdf-o',\n// 'cabinet_id' => 3,\n// 'children' => [],\n// ],\n [\n 'name' => 'Контакты',\n 'link' => '/oss/info/contacts',\n 'icon' => 'fa fa-lg fa-fw fa-phone',\n 'cabinet_id' => 3,\n 'children' => [],\n ],\n ],\n ],\n\n /*\n * Common\n */\n [\n 'name' => 'Мой профиль',\n 'link' => '/profile',\n 'icon' => 'fa fa-lg fa-fw fa-cog',\n 'cabinet_id' => null,\n 'children' => [],\n ],\n ];\n\n foreach ($menus as $menu) {\n $this->menuCreate($menu);\n }\n }", "public function index()\n {\n return Links::all();\n }", "function mnu_EchoMainMenu($selmenuid)\n{\n global $menu;\n for ($i = 0; $i < count($menu); $i++) {\n if ($menu[$i]['visible'] == true) {\n if (!isset($menu[$i]['newwindow']))\n $menu[$i]['newwindow'] = false;\n if ($menu[$i]['newwindow'] == true)\n $target_blank = \"target='_blank'\";\n else\n $target_blank = \"\";\n\n if ($menu[$i]['siteid'] == $selmenuid || is_array($menu[$i]['siteid']) && in_array($selmenuid, $menu[$i]['siteid'])) {\n echo '<li><a class=\"selected bg-green06\" href=\"' . $menu[$i]['filename'] . '\">' . htmlspecialchars($menu[$i]['menustring'], ENT_COMPAT, 'UTF-8') . '</a></li>';\n } else {\n echo '<li><a ' . $target_blank . ' href=\"' . $menu[$i]['filename'] . '\">' . htmlspecialchars($menu[$i]['menustring'], ENT_COMPAT, 'UTF-8') . '</a></li>';\n }\n }\n }\n}", "function getNavigation()\n\t{\n\n\n\t\treturn;\n\n\t\tglobal $gMysql;\n\t\tglobal $member_id;\n\t\t# grab these items\n\t\t$num_views\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_views where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_winks\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_winks where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_favs\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_fav where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_messages\t\t=\t$gMysql->queryItem(\"select count(*) from sm_messages where member_id='$member_id'\",__FILE__,__LINE__);\n\n\n\n\t\t$menuArray\t=\tarray(\n\t\tarray(\n\t\t\"title\"\t\t\t=>\t\"Profile\",\n\t\t\"bShowNumber\"\t=>\tfalse,\n\t\t\"number\"\t\t=>\t0,\n\t\t\"bHeader\"\t\t=>\ttrue,\n\t\t\"className\"\t\t=>\t\"icon-user\",\n\t\t\"link\" \t\t\t=>\t\"http://bbc.co.uk\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Search\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-search\",\n\t\t\"link\" \t\t\t =>\t\"search\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Messages\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_messages,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-mail\",\n\t\t\"link\" \t\t\t =>\t\"inbox\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Views\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_views,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-binoculars\",\n\t\t\"link\" \t\t\t =>\t\"views\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Winks\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_winks,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-eye\",\n\t\t\"link\" \t\t\t =>\t\"winks\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Favourites\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_favs,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-bookmarks\",\n\t\t\"link\" \t\t\t =>\t\"favourites\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Matches\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-heart\",\n\t\t\"link\" \t\t\t =>\t\"matches\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Membership\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-unlocked\",\n\t\t\"link\" \t\t\t =>\t\"membership\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Profile\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-user\",\n\t\t\"link\" \t\t\t =>\t\"profile\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t\t=>\t\"Logout\",\n\t\t\"bShowNumber\"\t\t=>\tfalse,\n\t\t\"number\"\t\t\t=>\t0,\n\t\t\"bHeader\"\t\t\t=>\ttrue,\n\t\t\"className\"\t\t\t=>\t\"icon-switch\",\n\t\t\"link\"\t\t\t\t=>\t\"javacript:confirm('app/m/login/logout');\",\n\t\t),\n\t\t);\n\n\t\t$selectedItem\t=\t3;\n\t\t$index\t\t\t=\t0;\n\n\n\t\t$menuString\t=\t' <ul> ';\n\n\n\t\tforeach ($menuArray as $menuItem)\n\t\t{\n\t\t\t# build html of menu\n\t\t\tif\t($selectedItem == $index)\n\t\t\t{\n\t\t\t\t$menu_line\t=\t'<li class=\"selected\">';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$menu_line\t=\t'<li>';\n\t\t\t}\n\n\n\t\t\t$menu_line\t.=\t'<a href=\"' . $menuItem['link'] . '\" class=\"' . $menuItem['className'] . '\" >' . $menuItem['title'];\n\t\t\t# numerics?\n\t\t\tif\t($menuItem['bShowNumber'] == true)\n\t\t\t{\n\t\t\t\t$menu_line\t.=\t\t' <span class=\"pip\">' . $menuItem['number'] . '</span>';\n\t\t\t}\n\t\t\t$menu_line .= \"</a></li>\\r\\n\";\n\n\t\t\t$menuString\t.=\t$menu_line;\n\n\t\t\t$index++;\n\t\t}\n\t\t$menuString\t.=\t\"</ul>\";\n\n\t\treturn\t$menuString;\n\t}", "private function gen_nav_links()\n\t{\n\t\t$this->template->assign_block_vars('navlinks', array(\n\t\t\t'S_IS_CAT'\t\t=> true,\n\t\t\t'S_IS_LINK'\t\t=> false,\n\t\t\t'S_IS_POST'\t\t=> false,\n\t\t\t'FORUM_NAME'\t=> $this->user->lang('BLOG_MAIN'),\n\t\t\t'FORUM_ID'\t\t=> -1,\n\t\t\t'U_VIEW_FORUM'\t=> append_sid('blog'),\n\t\t));\n\t}", "private function PH_PageMenu(){\n $site_menu = self::$xvi_api->GetSiteMenu();\n $page_menu = self::$xvi_api->GetPageMenu();\n \n $menu =\"\";\n foreach($site_menu as $menu_item=>$menu_path) {\n if (strcmp($menu_item,$page_menu[\"item\"])) { /*not selected menu item*/\n $menu .= \"<li><a href=\\\"\".$menu_path.\"\\\"<span></span>\".$menu_item.\"</a></li>\";\n } else { /* it is selected menu*/\n $menu .= \"<li><a class=\\\"sel\\\" href=\\\"\".$menu_path.\"\\\"<span></span>\".$menu_item.\"</a></li>\";\n }\n }\n return $menu;\n }", "function GetMenu()\n {\n $sql = \"SELECT\n title,\n slug,\n id\n FROM\n pages\";\n $this->setSql($sql);\n return $this->getAll();\n }", "public function getMenus()\n {\n\n $menus = array();\n\n $CoreMenuObject = new CoreMenuObject();\n $CoreMenuObject->setId('adminlessvariables');\n $CoreMenuObject->setName(CoreLanguage::get('admin:system:adminlessvars:link:name'));\n $CoreMenuObject->setHref('/admin/system/lessvariables');\n $CoreMenuObject->setTitle(CoreLanguage::get('admin:system:adminlessvars:link:title'));\n $CoreMenuObject->setTemplate('adminnavsection');\n $CoreMenuObject->setZIndex(20);\n $CoreMenuObject->setParentId(AdminModule::ADMIN_NAV_ID_SYSTEM);\n $CoreMenuObject->setTarget(AdminModule::ADMIN_NAV_ID);\n array_push($menus, $CoreMenuObject);\n\n return $menus;\n\n }", "function log_history_link( $menu_links ){\n $whitelist_roles = array('administrator');\n $user = wp_get_current_user();\n $user_role = (array) $user->roles;\n \n in_array($user_role[0], $whitelist_roles)\n ? $menu_links_prefix = array( 'add-products' => 'Add products' )\n : $menu_links_prefix = array();\n $menu_links = array_slice( $menu_links, 0, 1, true )\n + $menu_links_prefix\n + array_slice( $menu_links, 1, NULL, true );\n \n return $menu_links;\n }", "public function getLinks($languageId){\r\n\t\t\r\n\t\t//Get all menus \r\n\t\t$sql = \"Select * From #menus \r\n\t\t\t\tLeft Outer Join #menu_values On #menus.id = #menu_values.item_id And #menu_values.language_id = $languageId\r\n\t\t\t\tWhere #menus.is_admin = 0 And #menus.is_group = 0\r\n\t\t\t\tOrder By #menus.p_id, #menus.sort_index\"; \r\n\t\t$menus = $this->_select($sql); \r\n\t\t\r\n\t\t$links = array();\r\n\t\tif ($menus) {\r\n\t\t\tforeach($menus as $menu) {\r\n\t\t\t\t$link = new Object(); \r\n\t\t\t\t$link->url = '/'.$menu->url_code; \r\n\t\t\t\t$link->title = $menu->title; \r\n\t\t\t\t$links[] = $link;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $links; \r\n\t}", "function v2_mumm_menu_link__menu_new_main_menu(&$variables) {\n $element = $variables ['element'];\n if (!$element ['#title']) {\n $href_array = explode('/', $element['#href']);\n if ($href_array[0] == 'node' && is_numeric($href_array[1])) {\n $node = node_load($href_array[1]);\n $element['#title'] = $node->title;\n }\n }\n $element['#localized_options']['attributes'] = array(\n 'data-tracking' => '',\n 'data-track-action' => 'click',\n 'data-track-category' => 'header',\n 'data-track-label' => strtolower($element ['#title']),\n 'data-track-type' => 'event',\n );\n $output = l($element ['#title'], $element ['#href'], $element ['#localized_options']);\n\n if (in_array('first', (array)$element['#attributes']['class'])) {\n return '<li class=\"first\">' . $output . '</li>';\n }\n if (in_array('hidden', (array)$element['#localized_options']['attributes']['class'])) {\n return '';\n }\n $class_item_attributes = $element['#original_link']['options']['item_attributes']['class'];\n return '<li class=\"item '.$class_item_attributes.'\">' . $output . '</li>';\n}", "public function get_list_of_menus(){\n\n $items = array();\n\n $args = array(\n 'post_type' => 'erm_menu',\n 'orderby' => 'menu_order',\n 'order' => 'ASC',\n 'post_status' => 'publish',\n 'posts_per_page' => -1 \n );\n\n $menu_posts = get_posts($args);\n\n if ( !empty($menu_posts) ) {\n\n foreach ( $menu_posts as $menu_post ){\n $items[] = array(\n 'title' => $menu_post -> post_title,\n 'url' => $menu_post -> post_name\n );\n }\n\n }\n else{\n return new WP_Error( 'no_menus', 'No menus found', array( 'status' => 404 ) );\n }\n\n return $items;\n\n }", "public static function getMenus()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('a.*, SUM(b.home) AS home')\n\t\t\t->from('#__menu_types AS a')\n\t\t\t->join('LEFT', '#__menu AS b ON b.menutype = a.menutype AND b.home != 0')\n\t\t\t->select('b.language')\n\t\t\t->join('LEFT', '#__languages AS l ON l.lang_code = language')\n\t\t\t->select('l.image')\n\t\t\t->select('l.sef')\n\t\t\t->select('l.title_native')\n\t\t\t->where('(b.client_id = 0 OR b.client_id IS NULL)');\n\n\t\t// Sqlsrv change\n\t\t$query->group('a.id, a.menutype, a.description, a.title, b.menutype,b.language,l.image,l.sef,l.title_native');\n\n\t\t$db->setQuery($query);\n\n\t\ttry\n\t\t{\n\t\t\t$result = $db->loadObjectList();\n\t\t}\n\t\tcatch (RuntimeException $e)\n\t\t{\n\t\t\t$result = array();\n\t\t\tJFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getNavigation() {\n \n $search = $this->search();\n $menuObjects = $search->getRecords();\n $result = array();\n $fields = $this->definition->fields();\n $menuItemField = FieldService::instance()->getFieldByName($fields, \"menuItems\");\n \n //$search->getRelationsForObjects(\"menuItems\", $menuObjects);\n \n foreach($menuObjects as $menuObject) {\n $result[$menuObject->name] = $search->getRelations($menuItemField, $menuObject->id);\n }\n \n return $result;\n }", "public function links_list() {\n\t\t$str = \"\";\n\n\t\tforeach ($this->def_json[\"links\"] as $link) {\n\t\t\t$str .= Builder::root(\"li\", NULL,\n\t\t\t\tBuilder::child(\"a\", array(\"href\" => $link[\"url\"]), $link[\"title\"])\n\t\t\t)->saveHTML();\n\t\t}\n\n\t\treturn $str;\n\t}", "public function configureMenuItems(): iterable\n {\n yield MenuItem::linkToCrud('Пользователи', 'fas fa-users', User::class);\n yield MenuItem::linkToCrud('Отчеты', 'fas fa-file', Report::class)\n ->setDefaultSort(['createdAt' => 'DESC'])\n ;\n yield MenuItem::linkToCrud('Рассматриваемые объекты', 'fas fa-eye', ObjectInQuestion::class)\n ->setDefaultSort(['id' => 'DESC'])\n ;\n yield MenuItem::linkToCrud('Веб-ресурсы', 'fas fa-globe', Resource::class);\n yield MenuItem::linkToCrud('Модели', 'fas fa-object-ungroup', Model::class);\n }", "public function getItems()\n {\n //$urlManager = Yii::$app->urlManager->createUrl();\n $menuItems = [\n 'items' => $this->prepareRawTree()->prepareHasChilds()->getWidgetFormatedArray(),\n 'options' => [\n 'id' => 'left-menu',\n 'class' => 'nav nav-sidebar sortable'\n ],\n 'linkTemplate' => '<a href=\"{url}\">{label_prefix}{label}{label_postfix}</a>',\n 'submenuTemplate' => \"\\n<ul class='sortable nav nav-{level}-level'>\\n{items}\\n</ul>\\n\",\n ];\n //print_r($menuItems);\n return $menuItems;\n }", "public function menuLocations()\n {\n // TODO: add support for menu locations.\n return [];\n\n /*\n $list = ['main-navigation' => __('Main Navigation')];\n foreach ($this->items as $name => $title) {\n $index = Layout::index($name);\n\n $list += isset($index['menus']) ? $index['menus'] : [];\n }\n\n return $list;\n */\n }", "public function sublinks() {\n\t\treturn $this->links;\n\t}", "public static function getCategoryLinks() {\r\n\t\t//get categories from database\r\n\t\t$_db = DBHandler::getInstance ();\r\n\t\t$res = $_db->getAllCategories ();\r\n\t\t\r\n\t\t//loop through categories and create url to category\r\n\t\techo '<ul>';\r\n\t\t$url = $_SERVER ['PHP_SELF'];\r\n\t\techo \"<li><a href=\\\"$url\\\">New Beers</a></li>\";\r\n\t\twhile ( $categories = $res->fetch_object () ) {\r\n\t\t\t$url = $_SERVER ['PHP_SELF'];\r\n\t\t\t$url = $url . \"?categoryid=\" . $categories->category_ID;\r\n\t\t\techo \"<li><a href=\\\"$url\\\">\" . $categories->category_name . \"</a></li>\";\r\n\t\t}\r\n\t\techo '</ul>';\r\n\t}", "function wp_get_nav_menu_items($items, $menu, $args)\n {\n }" ]
[ "0.7617748", "0.7346518", "0.7173838", "0.7138265", "0.70042235", "0.6969077", "0.67202187", "0.67118806", "0.6673371", "0.6672161", "0.66416234", "0.663571", "0.6630273", "0.6629401", "0.6610782", "0.66017115", "0.6600994", "0.65581375", "0.6550936", "0.6536647", "0.65333414", "0.6523079", "0.6521199", "0.65023077", "0.6499591", "0.64983547", "0.64889103", "0.64798504", "0.64610827", "0.6456201", "0.64443845", "0.64422107", "0.6437101", "0.6430985", "0.6419577", "0.64180106", "0.639782", "0.639589", "0.63902426", "0.63871443", "0.63809085", "0.6376422", "0.63675517", "0.6360001", "0.6358339", "0.6357396", "0.6336268", "0.63197964", "0.6308508", "0.629225", "0.62738645", "0.6272995", "0.62713665", "0.6265116", "0.6240339", "0.62365025", "0.62242436", "0.62193584", "0.62132716", "0.6212914", "0.6211469", "0.62078", "0.6207644", "0.620234", "0.61947674", "0.6186253", "0.61807245", "0.617157", "0.61665326", "0.6153138", "0.61515754", "0.61448354", "0.6142638", "0.61415476", "0.6133163", "0.6129637", "0.61078364", "0.60967916", "0.6095034", "0.60914356", "0.6089163", "0.6075423", "0.60742444", "0.60673994", "0.6062293", "0.6061018", "0.6060236", "0.6047961", "0.6041769", "0.60400915", "0.6010926", "0.60059154", "0.59982", "0.5984654", "0.5973203", "0.5971234", "0.5968574", "0.5967216", "0.59611046", "0.5960534", "0.5958628" ]
0.0
-1
Metodo para actualizar un tipo de cerca existente..
public function modificarExamenSocio($examen) { $conn = new mysqli($this->data->getServidor(), $this->data->getUsuario(), $this->data->getContrasena(), $this->data->getDbNombre()); $conn->set_charset("utf8"); if (!$conn) { die("Connection failed: ".mysqli_connect_error()); } $sql = "UPDATE tbexamentuberculosis SET examentuberculosisvigente = '".$examen->getExamenVigente()."', examentuberculosisfechavencimiento = '".$examen->getExamenFechaVencimiento()."' WHERE idsocio = '".$examen->getIdSocio()."'"; $result = $conn->query($sql); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveType()\n {\n }", "function create_or_update_type($data) {\n return $this->save_type($data);\n }", "private function update_type($new_type) { \n\n\t\tif ($this->_update_item('type',$new_type,'50')) { \n\t\t\t$this->type = $new_type;\n\t\t}\n\n\t}", "public function updateType($objectType) {\n\t\tthrow new CmisNotImplementedException(\"updateType\");\t\t\n\t}", "function modificarTipoVenta(){\n\t\t$this->procedimiento='vef.ft_tipo_venta_ime';\n\t\t$this->transaccion='VF_TIPVEN_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_tipo_venta','id_tipo_venta','int4');\n\t\t$this->setParametro('codigo_relacion_contable','codigo_relacion_contable','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('tipo_base','tipo_base','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('id_plantilla','id_plantilla','integer');\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 canAddFieldsToTCATypeAndReplaceExistingOnes() {}", "public function actualizar($objeto){\r\n\t}", "public function save()\n {\n $error = false;\n\n // Save the not language specific part\n $pre_save_agitator_type = new self($this->agitator_type_id, $this->clang_id);\n\n // saving the rest\n if (0 === $this->agitator_type_id || $pre_save_agitator_type !== $this) {\n $query = \\rex::getTablePrefix() .'d2u_machinery_agitator_types SET '\n .\"agitator_ids = '|\". implode('|', $this->agitator_ids) .\"|', \"\n .\"pic = '\". $this->pic .\"' \";\n\n if (0 === $this->agitator_type_id) {\n $query = 'INSERT INTO '. $query;\n } else {\n $query = 'UPDATE '. $query .' WHERE agitator_type_id = '. $this->agitator_type_id;\n }\n\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n if (0 === $this->agitator_type_id) {\n $this->agitator_type_id = (int) $result->getLastId();\n $error = $result->hasError();\n }\n }\n\n if (false === $error) {\n // Save the language specific part\n $pre_save_agitator_type = new self($this->agitator_type_id, $this->clang_id);\n if ($pre_save_agitator_type !== $this) {\n $query = 'REPLACE INTO '. \\rex::getTablePrefix() .'d2u_machinery_agitator_types_lang SET '\n .\"agitator_type_id = '\". $this->agitator_type_id .\"', \"\n .\"clang_id = '\". $this->clang_id .\"', \"\n .\"name = '\". addslashes($this->name) .\"', \"\n .\"translation_needs_update = '\". $this->translation_needs_update .\"' \";\n\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n $error = $result->hasError();\n }\n }\n\n return !$error;\n }", "public function actualizar(){\n }", "public function actualizar(){\n }", "private function _exists() {\n // taky typ uz existuje ?\n $id = $this->equipment->getID();\n if ($id > 0) {\n $this->flash(\"Také vybavenie už existuje.<br/>Presmerované na jeho editáciu.\", \"error\");\n $this->redirect(\"ape/equipment/edit/$id\");\n }\n }", "public function actualizar(){\n }", "public function testUpdateFieldsWrongType(): void { }", "public function alterarTipoServico($tipoServico){\r\n \r\n try {\r\n \r\n $this->validarDadosTipoServico($tipoServico);\r\n return $this->tipoServicoDAO->update($tipoServico);\r\n } catch (DataException $e) {\r\n throw $e; \r\n } \r\n }", "function put($id_tipo_elemento, $data)\n { \n\t $unidad_gestion = $this->_get_ug();\n\t $sistema = $this->_get_sistema();\n\n $spec = $this->get_modelo('TipoElementoAct');\n \n\t rest_validador::validar($data, $spec, true);\n\t $modelo = rest_hidratador::deshidratar_fila($data, $spec);\n \n $modelo['unidad_gestion'] = $unidad_gestion;\n\t\t$modelo['sistema'] = $sistema;\n\n\t\treturn $this->modelo_act->crear_o_actualizar_tipo_elemento($id_tipo_elemento, $modelo);\n }", "public function actualizarTipoResiduo($tipoResiduo){\n //Insertar provincia se invoca al metodo en datos\n $this->tipoResiduoAccesoDatos->conectar();\n $resultado = $this->tipoResiduoAccesoDatos->actualizarTipoResiduo($tipoResiduo);\n $this->tipoResiduoAccesoDatos->cerrarConexion();\n return $resultado;\n }", "public function canAddFieldsToTCATypeAfterExistingOnes() {}", "public function setType($type){ }", "public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "private function replaceDocumentTypeToAccessibleType(): void\n\t{\n\t\t$replaces = [\n\t\t\tStoreDocumentTable::TYPE_ARRIVAL => StoreDocumentTable::TYPE_STORE_ADJUSTMENT,\n\t\t\tStoreDocumentTable::TYPE_STORE_ADJUSTMENT => StoreDocumentTable::TYPE_ARRIVAL,\n\t\t];\n\n\t\tforeach ($replaces as $baseType => $anotherType)\n\t\t{\n\t\t\t$can = $this->accessController->checkByValue(ActionDictionary::ACTION_STORE_DOCUMENT_MODIFY, $baseType);\n\t\t\tif (!$can)\n\t\t\t{\n\t\t\t\t$this->canSelectDocumentType = false;\n\n\t\t\t\t// change current type\n\t\t\t\tif ($this->documentType === $baseType)\n\t\t\t\t{\n\t\t\t\t\t$can = $this->accessController->checkByValue(ActionDictionary::ACTION_STORE_DOCUMENT_MODIFY, $anotherType);\n\t\t\t\t\tif ($can)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->documentType = $anotherType;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function modificarElemento($tipo, $id, $array) {\n\t\tglobal $db;\n\n\t\t$w = $tipo . '_id = \"' . $id . '\"';\n\t\t$update[$tipo . '_titulo'] = $array[$tipo . '_titulo'];\n\t\t$update[$tipo . '_titulo_corto'] = $array[$tipo . '_titulo_corto'];\n\t\t$update[$tipo . '_categoria'] = $array[$tipo . '_categoria'];\n\t\t$update[$tipo . '_categoria2'] = $array[$tipo . '_categoria2'];\n\t\t$update[$tipo . '_icono'] = $array[$tipo . '_icono'];\n\t\t$update[$tipo . '_copete'] = $array[$tipo . '_copete'];\n\t\t$update[$tipo . '_cuerpo'] = $array[$tipo . '_cuerpo'];\n\t\t$update[$tipo . '_codigo'] = $array[$tipo . '_codigo'];\n\t\t$update[$tipo . '_precio'] = $array[$tipo . '_precio'];\n\t\t$update[$tipo . '_stock'] = $array[$tipo . '_stock'];\n\t\t$update[$tipo . '_fecha_alta'] = $array[$tipo . '_fecha_alta'];\n\t\t$update[$tipo . '_fecha_baja'] = $array[$tipo . '_fecha_baja'];\n\t\t$update[$tipo . '_estado'] = $array[$tipo . '_estado'];\n\t\t$update[$tipo . '_destacado'] = $array[$tipo . '_destacado'];\n\t\t$update[$tipo . '_home'] = $array[$tipo . '_home'];\n\t\t$update[$tipo . '_video_youtube'] = $array[$tipo . '_video_youtube'];\n\n\t\t$db->UPDATEJ('tbl_' . $tipo, $update, $w);\n\t}", "abstract public function register_type();", "public function testSetTypeControle() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setTypeControle(\"typeControle\");\n $this->assertEquals(\"typeControle\", $obj->getTypeControle());\n }", "function modificarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_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_herrajeaccesorio','id_herrajeaccesorio','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('herrajeaccesorio','herrajeaccesorio','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 actualizar($registro) {\n \n }", "public function actualizar($registro) {\n \n }", "abstract protected function _regenerate();", "function objCreateType($dbh, $name, $title, $appid = null)\r\n{\r\n\t$otid = 0;\r\n\r\n\t// Prepend with 'co' (custom object) to prevent system object name collision\r\n\t$obj_name = \"co_\".$name;\r\n\r\n\t// Test to make sure object name does not already exist\r\n\tif ($dbh->GetNumberRows($dbh->Query(\"select id from app_object_types where name='$obj_name'\")))\r\n\t\treturn $otid; // fail\r\n\r\n\t$def = new \\Netric\\EntityDefinition($obj_name);\r\n\t$def->title = $title;\r\n\t$def->applicationId = $appid;\r\n\t$def->system = false;\r\n\r\n\t// Save the new object type\r\n $sl = ServiceLocatorLoader::getInstance($dbh)->getServiceLocator();\r\n\t$dm = $sl->get(\"EntityDefinition_DataMapper\");\r\n\t$dm->save($def);\r\n\r\n\t/*\r\n\t// Create new object table and insert into app_object_types\r\n\t$dbh->Query(\"CREATE TABLE objtbl_\".$obj_name.\" (id serial, CONSTRAINT objtbl_\".$obj_name.\"s_pkey PRIMARY KEY (id));\");\r\n\t$results = $dbh->Query(\"insert into app_object_types(name, title, object_table, application_id) \r\n\t\t\t\t\t\t\t values('\".$obj_name.\"', '$title', 'objtbl_\".$obj_name.\"', \".$dbh->EscapeNumber($appid).\");\r\n\t\t\t\t\t\t\t select currval('app_object_types_id_seq') as id;\");\r\n\tif ($dbh->GetNumberRows($results))\r\n\t{\r\n\t\t$otid = $dbh->GetValue($results, 0, \"id\");\r\n\r\n\t\tif ($otid)\r\n\t\t{\r\n\t\t\t// Make sure default feilds are in place\r\n\t\t\t$odef = new CAntObject($dbh, $obj_name);\r\n\t\t\t$odef->fields->verifyDefaultFields();\r\n\r\n\t\t\t// Associate object with application\r\n\t\t\tif ($appid)\r\n\t\t\t\tobjAssocTypeWithApp($dbh, $otid, $appid);\r\n\r\n\t\t\t// Create associations partition\r\n\t\t\t$tblName = \"object_assoc_$otid\";\r\n\t\t}\r\n\t}\r\n\t*/\r\n\r\n\treturn $otid;\r\n}", "function modificarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_ime';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t\r\n\t\t$parametros = $this->aParam->getArregloParametros('asignacion');\r\n\t\t//si esdel tipo matriz verifica en la primera posicion el tipo de vista\r\n\t\tif($this->esMatriz){\r\n\t\t $tipo_operacion =$parametros[0]['tipo_operacion'];\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t$tipo_operacion =$parametros['tipo_operacion'];\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($tipo_operacion=='asignacion'){\r\n\t\t $this->transaccion='tgv_SERVIC_MOD';\r\n } \r\n elseif($tipo_operacion=='cambiar_estado'){ \r\n\t\t $this->transaccion='tgv_SERCAMEST_MOD';\r\n\t\t $this->setParametro('operacion','operacion','varchar');// cuando finaliza los requerimientos, su valor es fin_requerimiento\r\n\t\t //$this->setParametro('id_abogado','id_abogado','int4');\r\n\t\t}\r\n\t\telseif ($tipo_operacion=='def_fechas'){ \r\n\t\t $this->transaccion='tgv_DEFFECHA_MOD';\r\n\t\t // $this->setParametro('operacion','operacion','varchar');// cuando finaliza los requerimientos, su valor es fin_requerimiento\r\n\t\t //$this->setParametro('id_abogado','id_abogado','int4');\r\n\t\t}\r\n\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_servicio','id_servicio','int4');\r\n\t\t$this->setParametro('estado','estado','varchar');\r\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\r\n\t\t$this->setParametro('id_lugar_destino','id_lugar_destino','int4');\r\n\t\t$this->setParametro('id_ep','id_ep','int4');\r\n\t\t$this->setParametro('fecha_asig_fin','fecha_asig_fin','date');\r\n\t\t$this->setParametro('fecha_sol_ini','fecha_sol_ini','date');\r\n\t\t$this->setParametro('descripcion','descripcion','varchar');\r\n\t\t$this->setParametro('id_lugar_origen','id_lugar_origen','int4');\r\n\t\t$this->setParametro('cant_personas','cant_personas','int4');\r\n\t\t$this->setParametro('fecha_sol_fin','fecha_sol_fin','date');\r\n\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\r\n\t\t$this->setParametro('fecha_asig_ini','fecha_asig_ini','date');\r\n\t\t$this->setParametro('id_funcionario_autoriz','id_funcionario_autoriz','int4');\r\n\t\t$this->setParametro('observaciones','observaciones','varchar');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "function modificaAsistencia($fecha, $tipo, $asiento) {\n\t\t$asis = new mAsistencias();\n\t\t$asis->changeAsistencia($fecha, $tipo, $asiento);\n\t}", "static public function ctrEditarTipoContacto(){\n\t\tif(isset($_POST[\"accionTipoContacto\"]) && $_POST[\"accionTipoContacto\"] == \"editar\"){\n\t\t\t$fecha = date('Y-m-d');\n\t\t\t$hora = date('H:i:s');\n\t\t\t$fechaActual = $fecha.' '.$hora;\n\t\t\t$tabla = 'vtama_tipo_contacto';\n\t\t\t$datos = array(\"cod_tipo_contacto\" => $_POST[\"codigoTipoContacto\"],\n\t\t\t\t\t\t \"dsc_tipo_contacto\" => ms_escape_string(trim($_POST[\"nombreTipoContacto\"])),\n\t\t\t\t\t\t \"cod_usr_modifica\" => $_SESSION[\"cod_trabajador\"],\n\t\t\t\t\t\t \"fch_modifica\" => $fechaActual);\n\t\t\t$respuesta = ModeloTipoContacto::mdlEditarTipoContacto($tabla,$datos);\n\t\t\treturn $respuesta;\n\t\t}//if\n\t}", "function setInitiateType( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->InitiateType = $value;\n }", "public function POS_it_checks_updateRec_att_type_changed() {\n // create the record to check\n $type = 'Bob';\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 $taskType->save();\n\n // create the changed record\n $changeType = 'Steve';\n\n $stdClass = new \\stdClass();\n $stdClass->id = $taskType->id;\n $stdClass->type = $changeType;\n $stdClass->desc = $taskType->getDescription();\n $stdClass->client_id = $taskType->client_id;\n\n $taskType->updateRec($stdClass);\n $result = $taskType::where('id', $taskType->getId())->first();\n\n $this->assertEquals($result->getType(), $changeType);\n }", "abstract function ActualizarDatos();", "public function setType($type) {}", "public function setType($type)\n{\n$this->type = $type;\n\nreturn $this;\n}", "public function set($typeId, $class);", "function save_object()\n {\n if (isset($_POST['scalixTab'])){\n\n /* Save ldap attributes */\n plugin::save_object();\n\n /* Check if given value is not empty */\n if (isset($_POST['email_address']) && !empty($_POST['email_address']) && isset($_POST['add_email'])){\n $valid= FALSE;\n\n /* Valid mail address */\n if( ($this->is_template && !tests::is_email($_POST['email_address'], TRUE)) ||\n (!$this->is_template && !tests::is_email($_POST['email_address']))){\n msg_dialog::display(_(\"Error\"), _(\"Cannot add invalid mail address!\"), ERROR_DIALOG);\n }else{\n $valid = TRUE;\n }\n\n /* Check write access */\n if(!$this->acl_is_writeable(\"scalixEmailAddress\")){\n msg_dialog::display(_(\"Error\"), _(\"You have no permission to modify these addresses.\"), ERROR_DIALOG);\n }else{\n\n /* Mail address already in use ? */\n if ($valid && ($user= $this->addEmail (get_post('email_address'))) != \"\"){\n $ui= get_userinfo();\n if ($user != $ui->username){\n msg_dialog::display(_(\"Error\"), sprintf(_(\"Cannot add mail address: it is already used by user '%s'.\"), $user),\n ERROR_DIALOG);\n }\n }\n }\n }\n\n /* Delete email addresses */\n if (isset($_POST['delete_email']) && isset ($_POST['emails_list']) && $this->acl_is_writeable(\"scalixEmailAddress\")){\n if(!$this->acl_is_writeable(\"scalixEmailAddress\")){\n msg_dialog::display(_(\"Error\"), _(\"You have no permission to modify these addresses.\"), ERROR_DIALOG);\n }else{\n if (count($_POST['emails_list'])){\n $this->delEmail ($_POST['emails_list']);\n }\n }\n }\n\n /* Save fakeBooleanAttributes*/\n foreach ($this->fakeBooleanAttributes as $val){\n if ($this->acl_is_writeable($val)) {\n if( isset ($_POST[\"$val\"])) {\n $data = TRUE;\n } else {\n $data = FALSE;\n }\n if ($this->$val != $data){\n $this->is_modified= TRUE;\n }\n\n $this->$val= $data;\n }\n }\n }\n }", "public function update($data, $type = '')\n {\n }", "public function TipoResiduoReglasNegocios() {\n $this->tipoResiduoAccesoDatos = new TipoResiduoAccesoDatos();\n }", "private function updateExistingData($line, $type, $data) {\n $this -> cleanUpEmptyValues(&$data);\n try {\n switch($type) {\n case \"users\":\n if (isset($data['password']) && $data['password'] != \"\" && $data['password'] != \"ldap\") {\n $data['password'] = EfrontUser::createPassword($data['password']);\n }\n eF_updateTableData(\"users\", $data, \"login='\".$data['login'].\"'\"); $this -> log[\"success\"][] = _LINE . \" $line: \" . _REPLACEDUSER . \" \" . $data['login'];\n break;\n case \"users_to_courses\":\n $where = \"users_login='\".$data['users_login'].\"' AND courses_ID = \" . $data['courses_ID'];\n EfrontCourse::persistCourseUsers($data, $where, $data['courses_ID'], $data['users_login']);\n $this -> log[\"success\"][] = _LINE . \" $line: \" . _REPLACEDEXISTINGASSIGNMENT;\n break;\n case \"users_to_groups\":\n break;\n }\n } catch (Exception $e) {\n $this -> log[\"failure\"][] = _LINE . \" $line: \" . $e -> getMessage();\n }\n }", "public function actualizar() {\n $ord = $this->orden;\n $this->cargarPersonas($ord);\n }", "public function update($type, $id = null);", "public function save(Type $type) {\n $typeData = array(\n 'name_ET' => $type->getName()\n );\n\n if ($type->getNum()) {\n // The type has already been saved : update it\n $this->getDb()->update('eventtype', $typeData, array('num_ET' => $type->getNum()));\n } else {\n // The type has never been saved : insert it\n $this->getDb()->insert('eventtype', $typeData);\n // Get the id of the newly created type and set it on the entity.\n $id = $this->getDb()->lastInsertId();\n $type->setNum($id);\n }\n }", "public function save() {\n if ($this->isNew()) {\n $this->xpdo->log(MODx::LOG_LEVEL_INFO,'Creating default RegType');\n $regtype = $this->xpdo->newObject('RSVPMeRegType');\n $regtype->fromArray(array(\n 'name' => 'default',\n 'description' => 'default registration type',\n 'code' => (isset($this->code)) ? $this->code : '',\n 'fee' => (isset($this->fee)) ? $this->fee : '',\n ));\n\n $this->addMany($regtype);\n }\n\n /**\n * For now, only 1 registration type is allowed, so we will automatically\n * set the end date to the same as the date of the event. It will be set\n * independently in a future release.\n */\n if (!$this->isNew() && $this->isDirty('date')) {\n $regtypes = $this->getMany('RegistrationType');\n $regtype = array_pop($regtypes);\n $regtype->set('end',$this->get('date'));\n }\n\n /**\n * Since Registration Types will only be editable in a later version,\n * we need to make sure the 'secret code' stays synced\n */\n if (!$this->isNew() && (isset($this->code) || isset($this->fee))) {\n $regtypes = $this->getMany('RegistrationType');\n $regtype = array_pop($regtypes);\n\n if (isset($this->code)) {\n $regtype->set('code',$this->code);\n }\n if (isset($this->fee)) {\n $regtype->set('fee',$this->fee);\n }\n }\n\n /* now we can finish saving, this will also save related objects */\n return parent :: save();\n }", "public function setTyp( $type );", "function modificarConceptoCta(){\n\t\t$this->procedimiento='pre.f_concepto_cta_ime';\n\t\t$this->transaccion='PRE_CCTA_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_concepto_cta','id_concepto_cta','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_auxiliar','id_auxiliar','int4');\n\t\t$this->setParametro('id_cuenta','id_cuenta','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('id_partida','id_partida','int4');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','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}", "public function testUpdateTableUnknownType() {\r\n // Drop table\r\n $this->executeQuery('drop table POTEST');\r\n // Manually create table with UUID column only\r\n $this->createTestTable();\r\n // Automatically update table\r\n $this->setExpectedException('Exception', 'Database column type \\'unknowntype\\' is not known to the persistence adapter.');\r\n $this->getPersistenceAdapter()->updateOrCreateTable('test_persistence_AbstractPersistenceAdapterTestPersistentObjectUnknownType');\r\n }", "function alta_tipo_entrada(){\n\t\t$u= new Tipo_entrada();\n\t\t$related = $u->from_array($_POST);\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Tipo de Entrada.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "public function actualizarCita(){\n $sql =\"update cita set id_paciente=$this->id_paciente, id_medico = $this->id_medico,fecha_cita = '$this->fecha_cita', hora_cita='$this->hora_cita', tipo_servicio='$this->tipo_servicio', motivo ='$this->motivo', estado = '$this->estado' where id =$this->id\";\n if($this->conn->executeQuery($sql)){\n $this->conn->close();\n return true;\n }\n }", "function act_tipo_entrada(){\n\t\t$u= new Tipo_entrada();\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos del Tipo de Entrada.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "public function save($p_obj_type_id, $p_verinice_type)\n {\n\n $l_sql = 'UPDATE isys_obj_type SET ' . 'isys_obj_type__isys_verinice_types__id = ' . $this->convert_sql_id(\n $p_verinice_type\n ) . ' ' . 'WHERE isys_obj_type__id = ' . $this->convert_sql_int($p_obj_type_id);\n\n return $this->update($l_sql) && $this->apply_update();\n }", "public function canSetTheContentObjectClassMapAndGetARegisteredContentObject() {}", "function act_tipo_salida(){\n\t\t$u= new Tipo_salida();\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos del Tipo de Salida.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "function timetracking_type_save(timetrackingType $type) {\n $type->save();\n}", "private function get_type() {\n\n\t}", "function store()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $db->begin();\r\n\r\n $ret = false;\r\n $name = $db->escapeString( $this->Name );\r\n $description = $db->escapeString( $this->Description );\r\n if ( !isSet( $this->ID ) )\r\n {\r\n $db->lock( \"eZContact_CompanyType\" );\r\n\t\t\t$this->ID = $db->nextID( \"eZContact_CompanyType\", \"ID\" );\r\n $res[] = $db->query( \"INSERT INTO eZContact_CompanyType\r\n (ID, Name, Description, ImageID, ParentID)\r\n VALUES\r\n ('$this->ID',\r\n '$name',\r\n '$description',\r\n '$this->ImageID',\r\n '$this->ParentID')\" );\r\n $db->unlock();\r\n $ret = true;\r\n }\r\n else\r\n {\r\n $res[] = $db->query( \"UPDATE eZContact_CompanyType set Name='$name', Description='$description', ImageID='$this->ImageID', ParentID='$this->ParentID' WHERE ID='$this->ID'\" );\r\n\r\n $ret = true;\r\n }\r\n eZDB::finish( $res, $db );\r\n return $ret;\r\n }", "public function canAddFieldsToAllTCATypesAfterExistingOnes() {}", "public function set($field, $value, $type = 'HOME')\n {\n $field = strtolower($field);\n $type_uc = strtoupper($type);\n\n switch ($field) {\n case 'name':\n case 'displayname':\n $this->raw['FN'][0][0] = $this->displayname = $value;\n break;\n\n case 'surname':\n $this->raw['N'][0][0] = $this->surname = $value;\n break;\n\n case 'firstname':\n $this->raw['N'][0][1] = $this->firstname = $value;\n break;\n\n case 'middlename':\n $this->raw['N'][0][2] = $this->middlename = $value;\n break;\n\n case 'prefix':\n $this->raw['N'][0][3] = $value;\n break;\n\n case 'suffix':\n $this->raw['N'][0][4] = $value;\n break;\n\n case 'nickname':\n $this->raw['NICKNAME'][0][0] = $this->nickname = $value;\n break;\n\n case 'organization':\n $this->raw['ORG'][0][0] = $this->organization = $value;\n break;\n\n case 'photo':\n if (strpos($value, 'http:') === 0) {\n // TODO: fetch file from URL and save it locally?\n $this->raw['PHOTO'][0] = array(0 => $value, 'url' => true);\n }\n else {\n $this->raw['PHOTO'][0] = array(0 => $value, 'base64' => (bool) preg_match('![^a-z0-9/=+-]!i', $value));\n }\n break;\n\n case 'email':\n $this->raw['EMAIL'][] = array(0 => $value, 'type' => array_filter(array('INTERNET', $type_uc)));\n $this->email[] = $value;\n break;\n\n case 'im':\n // save IM subtypes into extension fields\n $typemap = array_flip($this->immap);\n if ($field = $typemap[strtolower($type)]) {\n $this->raw[$field][] = array(0 => $value);\n }\n break;\n\n case 'birthday':\n case 'anniversary':\n if (($val = rcube_utils::anytodatetime($value)) && ($fn = self::$fieldmap[$field])) {\n $this->raw[$fn][] = array(0 => $val->format('Y-m-d'), 'value' => array('date'));\n }\n break;\n\n case 'address':\n if ($this->addresstypemap[$type_uc]) {\n $type = $this->addresstypemap[$type_uc];\n }\n\n $value = $value[0] ? $value : array('', '', $value['street'], $value['locality'], $value['region'], $value['zipcode'], $value['country']);\n\n // fall through if not empty\n if (!strlen(join('', $value))) {\n break;\n }\n\n default:\n if ($field == 'phone' && $this->phonetypemap[$type_uc]) {\n $type = $this->phonetypemap[$type_uc];\n }\n\n if (($tag = self::$fieldmap[$field]) && (is_array($value) || strlen($value))) {\n $index = count($this->raw[$tag]);\n $this->raw[$tag][$index] = (array)$value;\n if ($type) {\n $typemap = array_flip($this->typemap);\n $this->raw[$tag][$index]['type'] = explode(',', $typemap[$type_uc] ?: $type);\n }\n }\n else {\n unset($this->raw[$tag]);\n }\n\n break;\n }\n }", "function save_post_type_beneficiary($post_id) {\n $post_type = get_post_type($post_id);\n if ($post_type != 'beneficiary') {\n return;\n }\n\n $post_title = get_field('organization_name');\n $post_name = sanitize_title($post_title);\n $post = array(\n 'ID' => $post_id,\n 'post_name' => $post_name,\n 'post_title' => $post_title\n );\n wp_update_post($post);\n}", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "protected function updateTypeCLient($typeClient, $i, $tab, $languesSite, $objetApidae, $update) {\n $typeClient->setTypId($tab->typesClientele[$i]->id);\n if(isset($tab->typesClientele[$i])) {\n $v = $this->traitementReference($tab->typesClientele[$i]->elementReferenceType, $tab->typesClientele[$i]->id);\n $typeClient->setTypLibelle($this->traitementLibelleLangues($languesSite, $v));\n if(isset($v->familleCritere)) {\n $v = $this->traitementReference($v->familleCritere->elementReferenceType, $v->familleCritere->id);\n if($v != null) {\n $typeClient->setFamilleCritere(($this->traitementLibelleLangues($languesSite, $v)));\n } else {\n $typeClient->setFamilleCritere(null);\n }\n }\n }\n if(isset($tab->typesClientele[$i]->tailleGroupeMax)) {\n $typeClient->setMax($tab->typesClientele[$i]->tailleGroupeMax);\n } else {\n $typeClient->setMax(null);\n }\n if(isset($tab->typesClientele[$i]->tailleGroupeMin)) {\n $typeClient->setMin($tab->typesClientele[$i]->tailleGroupeMin);\n } else {\n $typeClient->setMin(null);\n }\n if(!$typeClient->getObjetsApidae()->contains($objetApidae)) {\n //Associe lobjet au type de public\n $typeClient->addObjetApidae($objetApidae);\n }\n if(!$objetApidae->getTypesPublic()->contains($typeClient)) {\n //Ajoute le type de client au dico de la traduction :\n $objetApidae->addTypePublic($typeClient);\n }\n if($update) {\n $this->em->merge($typeClient);\n }\n $this->em->persist($typeClient);\n //$this->em->flush();\n }", "function alta_tipo_salida(){\n\t\t$u= new Tipo_salida();\n\t\t$related = $u->from_array($_POST);\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Tipo de Salida.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "public function actionSetFileType()\n\t{\n\t\t$contentModel=DrcRequest::loadModel();\n\t\tif (isset($_REQUEST['username']) && isset($_REQUEST['term_code']) && isset($_REQUEST['class_num'])){\n\t\t\tif(!$contentModel->save())\n\t\t\t\tthrow new CHttpException(404,'ERROR could not update filetype.'); // temporary error code\n\t\t}\n\t\t//throw new CHttpException(404,'Data saved: username = ' . $contentModel->username . ', term: '\n\t\t// . $contentModel->term_code . ', class: ' . $contentModel->class_num . ', type: ' . $contentModel->type ); // temporary debug code\n\t\t$this->redirect(array('drcUser/courses','username'=>$this->model->username,'term_code'=>$this->model->term_code));\n\t\t//return $this->actionCourses();\n\t}", "public function actualizar_estado() {\n }", "public function atualiza_tipo($ln = array()){\n if(isset($ln['tipoProva'])){\n $this->db->set('tipoProva', $ln['tipoProva']);\n }\n \n $this->db->where('idtipo_prova', $ln['idtipo']);\n return $this->db->update('tipo_prova');\n }", "function actualizar_producto($objeto){\n\t// Anti hack\n\t\tforeach ($objeto as $key => $value) {\n\t\t\t$datos[$key]=$this->escapalog($value);\n\t\t}\n\n\t// Valida el tipo de producto: 5-> Receta, 4-> Insumo preparado\n\t\t$tipo = ($datos['tipo'] == 1) ? 5 : 4 ;\n\n\t// Guarda la receta y regresa el ID\n\t\t$sql = \"UPDATE app_productos SET codigo = '\" . $datos['codigo'] . \"', nombre = '\" . $datos['nombre'] . \"', minimos = \" . $datos['cant_min'] . \", factor= '\".$datos['factor'].\"' WHERE id=\".$datos['id_receta'];\n\t\t// return $sql;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}", "public function testUpdateMetaWithCustomizedValueForExistantInstance(){\n //Change the local configuration for next tests\n Centurion_Config_Manager::set('seo.meta.types', array('description', 'keywords'));\n\n $form = new Seotable_Form_Model_First();\n\n //Simulate editing from user\n $values = array(\n 'title' => 'new title',\n 'body' => 'new body',\n 'chapo' => 'new chapo',\n Seo_Traits_Form_Model::FORM_META_FIELDS_PREFIX.'description' => 'new desc',\n );\n\n $form->setInstance($form->getModel()->get(array('id' => 2)));\n\n //Simulate editing from user\n $values = $form->getValues(true);\n $values[Seo_Traits_Form_Model::FORM_META_FIELDS_PREFIX.'description'] = 'new desc';\n\n $form->isValid($values);\n $form->save();\n\n //Check result\n $metasRowset = $form->getInstance()->getMetaRowset();\n\n $this->assertTrue(\n is_array($metasRowset),\n 'The method getMetaRowset must return an array and not an Centurion_Db_Table_Rowset_Abstract object'\n );\n\n $this->assertEquals(\n 2,\n count($metasRowset),\n 'The trait seo must build automatically two meta rows for this row'\n );\n\n $metaRow1 = $metasRowset[0];\n $metaRow2 = $metasRowset[1];\n\n //The first row must be the row for description (because we have ordered the select on the type)\n $this->assertEquals(\n 'description',\n $metaRow1->type,\n 'Error, the first meta row must be the row to store the description'\n );\n\n $this->assertEquals(\n 'new desc',\n $metaRow1->content,\n 'Error, the meta row for the description has not the good value'\n );\n\n //The second row must be the row for keywords (because we have ordered the select on the type)\n $this->assertEquals(\n 'keywords',\n $metaRow2->type,\n 'Error, the first meta row must be the row to store the keywords'\n );\n\n $this->assertEquals(\n 'ma contri first 2',\n $metaRow2->content,\n 'Error, the meta row for the keywords has not the good value'\n );\n }", "function _mongo_node_update_type($old_entity_type, $entity_type) {\n // Update collection names.\n _mongo_node_rename_collection($old_entity_type, $entity_type);\n\n // Update bundle name in mongo entities.\n $collection = mongodb_collection('fields_current', $entity_type);\n $result = $collection->update(\n array('_type' => $old_entity_type),\n array('$set' => array('_type' => $entity_type, 'type' => $entity_type))\n );\n}", "function sobeEstilo($classe, $estilo)\n {\n if (! $this->layer) {\n return \"erro\";\n }\n $classe = $this->layer->getclass($classe);\n $classe->movestyleup($estilo);\n $this->layer->removeMetaData(\"cache\");\n return true;\n }", "function alumno_registra_entrada($codigo_curso,$codigo_alumno,$entrada){\r\n\t\t$cn = $this->conexion();\r\n \r\n if($cn!=\"no_conexion\"){\r\n \t\r\n \t$sql=\"update $this->nombre_tabla_blog set eliminable=0 where codigo_curso='$codigo_curso' and codigo_alumno='$codigo_alumno'\";\r\n \t\r\n \t$rs = mysql_query($sql,$cn);\r\n \t\r\n\t \t$sql=\"insert into $this->nombre_tabla_blog (codigo_curso,codigo_alumno,entrada,persona_responde,fecha,hora) values ('$codigo_curso','$codigo_alumno','$entrada','A',curdate(),curtime() )\";\r\n\t\t\t\r\n\t $rs = mysql_query($sql,$cn);\r\n \r\n\t\t\tmysql_close($cn);\r\n\r\n\t\t\treturn \"mysql_si\";\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t}", "public function modificacion($param){\n \n $resp = false;\n if ($this->seteadosCamposClaves($param)){\n $elObjtMenu = $this->cargarObjeto($param);\n if($elObjtMenu!=null and $elObjtMenu->modificar()){\n $resp = true;\n }\n }\n return $resp;\n }", "public function setType( $type )\n {\n }", "function main_save($type='edit')\n\t{\n\t\t$id = intval($this->ipsclass->input['id']);\n\t\t\n\t\tif ($this->ipsclass->input['cf_title'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"You must enter a field title.\");\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// check-da-motcha\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\tif( !$id )\n\t\t\t{\n\t\t\t\t$this->ipsclass->admin->error(\"Could not resolve the field id\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$content = \"\";\n\t\t\n\t\tif ( $_POST['cf_content'] != \"\")\n\t\t{\n\t\t\t$content = $this->func->method_format_content_for_save( $_POST['cf_content'] );\n\t\t}\n\t\t\n\t\t$db_string = array( 'cf_title' => $this->ipsclass->input['cf_title'],\n\t\t\t\t\t\t 'cf_desc' => $this->ipsclass->input['cf_desc'],\n\t\t\t\t\t\t 'cf_content' => $this->ipsclass->txt_stripslashes($content),\n\t\t\t\t\t\t 'cf_type' => $this->ipsclass->input['cf_type'],\n\t\t\t\t\t\t 'cf_not_null' => $this->ipsclass->input['cf_not_null'],\n\t\t\t\t\t\t 'cf_max_input' => $this->ipsclass->input['cf_max_input'],\n\t\t\t\t\t\t 'cf_input_format' => $this->ipsclass->input['cf_input_format'],\n\t\t\t\t\t\t 'cf_topic'\t\t => $this->ipsclass->input['cf_topic'],\n\t\t\t\t\t\t 'cf_search'\t\t => $this->ipsclass->input['cf_search'],\n\t\t\t\t\t\t );\n\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\t$this->ipsclass->DB->do_update( 'downloads_cfields', $db_string, 'cf_id=' . $id );\n\t\t\t\n\t\t\t$this->rebuild_cache();\n\t\t\t\n\t\t\t$this->ipsclass->main_msg = \"Custom Field Edited\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'MAX(cf_position) as newpos',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from' => 'downloads_cfields' ) );\n\t\t\t$this->ipsclass->DB->simple_exec();\t\t\t\n\t\t\t$max = $this->ipsclass->DB->fetch_row();\n\t\t\t\n\t\t\t$db_string['cf_position'] = $max['newpos']+1;\n\t\t\t\n\t\t\t$this->ipsclass->DB->do_insert( 'downloads_cfields', $db_string );\n\t\t\t\n\t\t\t$id = $this->ipsclass->DB->get_insert_id();\n\t\t\t\n\t\t\t$this->ipsclass->DB->sql_add_field( 'downloads_ccontent', \"field_{$id}\", 'text' );\n\t\t\t\n\t\t\t$this->ipsclass->DB->sql_optimize_table( 'downloads_ccontent' );\n\t\t\t\n\t\t\t$this->rebuild_cache();\n\t\t\t\n\t\t\t$this->ipsclass->main_msg = \"Custom Field Added\";\n\t\t}\n\t\t\n\t\tif( is_array($this->ipsclass->input['cats_apply']) AND count($this->ipsclass->input['cats_apply']) )\n\t\t{\n\t\t\t$did_at_least_one = 0;\n\t\t\t\n\t\t\tforeach( $this->lib->cat_lookup as $cid => $cdata )\n\t\t\t{\n\t\t\t\t$cfields = explode( ',', $cdata['ccfields'] );\n\t\t\t\t\n\t\t\t\tif( !in_array( $id, $cfields ) )\n\t\t\t\t{\n\t\t\t\t\tif( in_array( $cid, $this->ipsclass->input['cats_apply'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push( $cfields, $id );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->ipsclass->DB->do_update( 'downloads_categories', array( 'ccfields' => implode( ',', $cfields ) ), 'cid=' . $cid );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$did_at_least_one = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif( !in_array( $cid, $this->ipsclass->input['cats_apply'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$new_cfields = array();\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach( $cfields as $fid )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $fid != $id )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$new_cfields[] = $fid;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->ipsclass->DB->do_update( 'downloads_categories', array( 'ccfields' => implode( ',', $new_cfields ) ), 'cid=' . $cid );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$did_at_least_one = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( $did_at_least_one )\n\t\t\t{\n\t\t\t\t$this->lib->rebuild_cat_cache();\n\t\t\t}\n\t\t}\n\n\t\t$this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code.'&req=customfields' );\n\t}", "public function testSetTypeContrat() {\n\n $obj = new Employes();\n\n $obj->setTypeContrat(\"typeContrat\");\n $this->assertEquals(\"typeContrat\", $obj->getTypeContrat());\n }", "function realizarHomologacionTransferenciaInterna($tipo){\n if (isset($_REQUEST['cod_proyecto'])?$_REQUEST['cod_proyecto']:''){ \n $this->mostrarFormulario($tipo);\n }else{\n $this->formSeleccionarProyecto($tipo);\n }\n }", "abstract protected function getType();", "function modificar($Id_Pedido = 0, $tipo = '')\r\n\t{\r\n\t\t$Permitido = array('Gerencia' => '', 'Plani' => '', 'Sistemas' => '', 'Ventas' => '');\r\n\t\t$this->ver_sesion_m->acceso($Permitido);\r\n\t\t\r\n\t\t$Id_Pedido += 0;\r\n\t\tif(0 == $Id_Pedido)\r\n\t\t{\r\n\t\t\tshow_404();\r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t//Extraemos toda la informacion del proceso\r\n\t\t$this->load->model('procesos/buscar_proceso_m', 'buscar_proc');\r\n\t\t$Info_Proceso = $this->buscar_proc->busqueda_pedido($Id_Pedido);\r\n\t\t\r\n\t\tif(0 == $Info_Proceso)\r\n\t\t{\r\n\t\t\tshow_404();\r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Si es un cliente, no debe ver cosas prohibidas\r\n\t\t$this->ver_sesion_m->solo_un_cliente(\r\n\t\t\t$Info_Proceso['id_cliente']\r\n\t\t);\r\n\t\t\r\n\t\t//Validacion: Solo los pedidos que estan en proceso pueden ser modificados\r\n\t\t//en sus especificaciones\r\n\t\t//Modelo que verifica si tiene ruta sin finalizar este proceso\r\n\t\t$this->load->model('pedidos/procesando_m', 'procesando');\r\n\t\t//Se realiza la verificacion\r\n\t\t$Estado = $this->procesando->pedido($Id_Pedido);\r\n\t\t\r\n\t\t\r\n\t\t//Especificaciones del pedido a modificar\r\n\t\t$this->load->model('pedidos/especificacion_informacion_m', 'esp_inf');\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Listado de los materiales recibidos y solicitados\r\n\t\t$this->load->model('pedidos/materiales_m', 'materiales');\r\n\t\t$Materiales['recibido'] = $this->materiales->recibidos_id('s');\r\n\t\t$Materiales['solicitado'] = $this->materiales->solicitados_id('s');\r\n\t\t\r\n\t\t/*\r\n\t\t$this->load->model('pedidos/enlaces_m', 'enlace');\r\n\t\t$Es_Hijo = $this->enlace->es_hijo($Id_Pedido);\r\n\t\t\r\n\t\t\r\n\t\t//Es este pedido hijo de otro?\r\n\t\t\r\n\t\tif(0 == $Es_Hijo)\r\n\t\t{\r\n\t\t\t*/\r\n\t\t\t$Especs = $this->esp_inf->pedido($Id_Pedido);\r\n\t\t\t/*\r\n\t\t\t//Listado de los tipos de acabados\r\n\t\t\t$this->load->model('pedidos/impresion_digital_m', 'matdigi');\r\n\t\t\t$Tipo_Acabado = $this->matdigi->tipo_impd_acabado();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$Especs = $this->esp_inf->pedido(\r\n\t\t\t\t$Id_Pedido,\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'matrecgru' => array(),\r\n\t\t\t\t\t'matsolgru' => array()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t//print_r($Especs);\r\n\t\t\t$Tipo_Acabado = array();\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif(isset($Es_Hijo['id_pedido_pedido']))\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$Especs = $this->esp_inf->pedido(\r\n\t\t\t\t$Es_Hijo['id_ped_primario'],\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'general' => array(),\r\n\t\t\t\t\t'colores' => array(),\r\n\t\t\t\t\t'distorsion' => array()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t//Modificacion de las especificaciones\r\n\t\t\t$this->load->model('pedidos/especificacion_modificar_m', 'esp_modi');\r\n\t\t\t$this->esp_modi->modificar(\r\n\t\t\t\t$Es_Hijo['id_ped_primario'],\r\n\t\t\t\t$Especs,\r\n\t\t\t\tarray('recibido' => array(), 'solicitado' => array()),\r\n\t\t\t\tarray()\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$Especs = $this->esp_inf->pedido(\r\n\t\t\t\t$Id_Pedido,\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'matrecgru' => array(),\r\n\t\t\t\t\t'matsolgru' => array()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\t//Modificacion de las especificaciones\r\n\t\t$this->load->model('pedidos/especificacion_modificar_m', 'esp_modi');\r\n\t\t$this->esp_modi->modificar(\r\n\t\t\t$Id_Pedido,\r\n\t\t\t$Especs,\r\n\t\t\t$Materiales\r\n\t\t);\r\n\r\n\r\n\r\n\t\t\r\n\r\n\t\t\r\n\t\tif('Ventas' != $this->session->userdata('codigo'))\r\n\t\t{\r\n\t\t\tif($tipo == 'm')\r\n\t\t\t{\r\n\t\t\t\theader('location: /pedidos/administrar/info/'.$Info_Proceso['id_proceso']);\r\n\t\t\t}\r\n\t\t\telseif($tipo == 'l')\r\n\t\t\t{\r\n\t\t\t\theader('location: /pedidos/preingreso/estado/Pendientes');\r\n\t\t\t}\r\n\t\t\telseif($tipo == 'i')\r\n\t\t\t{\r\n\t\t\t\theader('location: /pedidos/modificar/index/'.$Id_Pedido.'/i');\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\theader('location: /pedidos/modificar/index/'.$Id_Pedido);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif('' != $this->session->userdata('id_cliente'))\r\n\t\t\t{\r\n\t\t\t\theader('location: /ventas/v_preingreso/pendientes');\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\theader('location: /pedidos/preingreso/estado/Pendientes');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public function save()\n {\n\n if (!$this->dirty()) {\n return true;\n }\n $validTypes = array(1, 2, 3, 10, 11, 12, 13, 14, 21, 22);\n if (!in_array($this->Type, $validTypes)) {\n throw new Exception('Invalid file type!');\n }\n parent::save();\n }", "public function setType(?string $type): void;", "public function testSystemMembersTypesIdPut()\n {\n\n }", "public function canAddFieldsToTCATypeBeforeExistingOnes() {}", "public function update(TypeRequest $request, Type $type)\n {\n $type->name = $request->name;\n\n if(!$type->isDirty())\n {\n return response()->json([\"error\" => 'se debe especificar al menos un valor diferente para actualizar', \"code\" => 422],422);\n }\n\n $type->save();\n\n return $this->showOne($type, 'type actulizado correctamente');\n }", "private function modificarCita(){\n $query = \"UPDATE \" . $this->table . \" SET PacienteId ='\" . $this->idpaciente . \"',Fecha = '\" . $this->fecha . \"', HoraInicio = '\" . $this->horarioIn . \"', HoraFin = '\" .\n $this->horarioFn . \"', Motivo = '\" . $this->motivo . \"' WHERE CitaId = '\" . $this->idcita . \"'\"; \n $resp = parent::nonQuery($query);\n if($resp >= 1){\n return $resp;\n }else{\n return 0;\n }\n }", "function objDeleteType($dbh, $otid)\r\n{\r\n $dbh->Query(\"delete from app_object_types where id = '$otid' and f_system='f';\");\r\n return true;\r\n}", "function update_post_type(){\n $rules = array(\n array('field'=>'name', 'label'=>'lang:post_type_name', 'rules'=>'trim|required|htmlspecialchars'),\n array('field'=>'description', 'label'=>'lang:post_type_description', 'rules'=>'trim|required|htmlspecialchars'),\n array('field'=>'avatar', 'label'=>'lang:avatar', 'rules'=>'trim|required')\n );\n $this->form_validation->set_rules($rules);\n\n /*Check if the form passed its validation */\n if ($this->form_validation->run() == FALSE) {\n $id = $this->input->post('id');\n $this->edit_post_type($id);\n }\n else{\n $id = $this->input->post('id');\n $isUpdate = $this->ad_config_model->updatePostType();\n if($isUpdate){\n redirect(base_url('admin/config/post_types'));\n }else{\n $this->edit_post_type($id);\n }\n }\n }", "public function get_type(){ return $this->_type;}", "function forceType($fieldName,$inputType){\n\n\t\tif($inputType == \"file\") $this->hasFiles = true;\n\t\t$this->forced[$fieldName] = $inputType;\n\n\t}", "public function edit(Type $type)\n {\n //\n }", "public function edit(Type $type)\n {\n //\n }", "public function edit(Type $type)\n {\n //\n }", "protected function _afterSave(Mage_Core_Model_Abstract $type)\n {\n $attributeSet = $type->getAttributeSet();\n $attributeSetName = $type->getName() . ' {' . $type->getIdentifier() .'}';\n\n if($attributeSet->getAttributeSetName() != $attributeSetName){\n $attributeSet->setAttributeSetName($attributeSetName);\n $attributeSet->save();\n }\n\n return parent::_afterSave($type);\n }", "public function create($type)\n {\n //\n }", "function tipoedital($cod,$desc){\r\n\t\t$fTpEdital = new fachada_tipoedital();\r\n\t\t$oTipoEdital = $fTpEdital->tipoedital($cod,$desc);\r\n\t\treturn $oTipoEdital;\r\n\t}" ]
[ "0.60322297", "0.60233635", "0.6004221", "0.5997717", "0.59477013", "0.5923751", "0.586839", "0.58570904", "0.57125837", "0.57125837", "0.5710669", "0.5692167", "0.56222475", "0.5577622", "0.54869014", "0.5479676", "0.5421639", "0.5415735", "0.53749734", "0.5364547", "0.53334063", "0.53263736", "0.5322469", "0.5314379", "0.5299944", "0.5299944", "0.529364", "0.5291097", "0.52896196", "0.52682084", "0.523939", "0.52309966", "0.5229481", "0.5204847", "0.51973325", "0.51967806", "0.5185724", "0.5177192", "0.517691", "0.51580644", "0.51478386", "0.51391447", "0.51390046", "0.513794", "0.513107", "0.5127473", "0.5126108", "0.5119167", "0.5085924", "0.50809765", "0.50733286", "0.5070251", "0.5069077", "0.5065797", "0.50656486", "0.5065221", "0.5054302", "0.50464505", "0.5043882", "0.50387216", "0.503548", "0.503548", "0.503548", "0.503548", "0.503548", "0.503548", "0.503548", "0.503548", "0.50342846", "0.5030776", "0.5027726", "0.50274473", "0.50272334", "0.50262636", "0.50245315", "0.5023445", "0.50188875", "0.50078124", "0.50059545", "0.50050133", "0.49996692", "0.49979857", "0.49879986", "0.49794105", "0.49724653", "0.4968004", "0.4963419", "0.49614337", "0.4960576", "0.49583986", "0.49577993", "0.4950715", "0.49471572", "0.4946513", "0.49457163", "0.4945596", "0.4945596", "0.4945596", "0.49428168", "0.4941271", "0.49324438" ]
0.0
-1
Metodo para eliminar una cerca
public function eliminarExamenSocio($idSocio) { $conn = new mysqli($this->data->getServidor(), $this->data->getUsuario(), $this->data->getContrasena(), $this->data->getDbNombre()); $conn->set_charset("utf8"); if (!$conn) { die("Connection failed: ".mysqli_connect_error()); } $sql = "DELETE FROM tbexamentuberculosis WHERE idsocio = '$idsocio'"; $result = $conn->query($sql); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "abstract public function mass_remove();", "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 }", "public function EliminarCaja()\n\t\t{\n\n\t\t\t$sql = \" select codcaja from ventas where codcaja = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcaja\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from cajas where codcaja = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcaja);\n\t\t\t\t$codcaja = base64_decode($_GET[\"codcaja\"]);\n\t\t\t\t$stmt->execute();\n\n\t\t\t\theader(\"Location: cajas?mesage=1\");\n\t\t\t\texit;\n\n\t\t\t}else {\n\n\t\t\t\theader(\"Location: cajas?mesage=2\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}", "public function eliminar($objeto){\r\n\t}", "function eliminarConceptoCta(){\n\t\t$this->procedimiento='pre.f_concepto_cta_ime';\n\t\t$this->transaccion='PRE_CCTA_ELI';\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_concepto_cta','id_concepto_cta','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}", "public function remove() {}", "public function remove() {}", "function eliminarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_ime';\n\t\t$this->transaccion='ADQ_COT_ELI';\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_cotizacion','id_cotizacion','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}", "function EliminarMascotas($nombres, $primer_apellido, $segundo_apellido, $fehca_nacimiento, $lugar_nacimiento, $iddepartamento, $idmunicipio, $telefono_casa, $celular, $direccion, $foto){\n $conexion = Conectar();\n $sql = \"DELETE FROM padrinos WHERE id=:id\";\n $statement = $conexion->prepare($sql);\n $statement->bindParam(':idpadrinos', $idpadrinos);\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $res=$statement->fetchAll();\n return $res;\n}", "function Eliminar()\n{\n /**\n * Se crea una instanica a Concesion\n */\n $Concesion = new Titulo();\n /**\n * Se coloca el Id del acuifero a eliminar por medio del metodo SET\n */\n $Concesion->setId_titulo(filter_input(INPUT_GET, \"ID\"));\n /**\n * Se manda a llamar a la funcion de eliminar.\n */\n echo $Concesion->delete();\n}", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "function removerCarrinho($id_carrinho)\n {\n $conn = new db_conect();\n $result = $conn->removerCarrinho($id_carrinho);\n return $result;\n }", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_ELI';\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\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 EliminarDetallesCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" select * from detallecompras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t$sql4 = \"select * from compras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t$subtotalivasic = $paea[0][\"subtotalivasic\"];\n\t\t$subtotalivanoc = $paea[0][\"subtotalivanoc\"];\n\t\t$iva = $paea[0][\"ivac\"]/100;\n\t\t$descuento = $paea[0][\"descuentoc\"]/100;\n\t\t$totalivac = $paea[0][\"totalivac\"];\n\t\t$totaldescuentoc = $paea[0][\"totaldescuentoc\"];\n\n\t$sql3 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'SI'\";\n $stmt = $this->dbh->prepare($sql3);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($rowp = $stmt->fetch())\n {\n $p[] = $rowp;\n }\n $importeivasi = ($rowp[\"importe\"]== \"\" ? \"0\" : $rowp[\"importe\"]);\n\n$sql5 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'NO'\";\n $stmt = $this->dbh->prepare($sql5);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($roww = $stmt->fetch())\n {\n $pw[] = $roww;\n }\n $importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\n if(base64_decode($_GET[\"ivaproductoc\"])==\"SI\"){\t\n\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivasic = ?, \"\n\t\t\t .\" totalivac = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentoc);\n\t\t$stmt->bindParam(4, $total);\n\t\t$stmt->bindParam(5, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanoc+$totaliva,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\n\t\t\n\t\t } else {\n\t\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivanoc = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentoc);\n\t\t$stmt->bindParam(3, $total);\n\t\t$stmt->bindParam(4, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasic+$totalivac,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\t\t\n\t\t }\t\t\t\t\t\n\n\t\theader(\"Location: detallescompras?mesage=2\");\n\t\texit;\n\n\t\t}\n\t\telse\n\t\t{\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from compras where codcompra = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$codcompra = base64_decode($_GET[\"codcompra\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t\theader(\"Location: detallescompras?mesage=2\");\n\t\t\texit;\n\t\t}\n\t}\n\telse\n\t{\n\t\theader(\"Location: detallescompras?mesage=3\");\n\t\texit;\n\t}\n}", "public function eliminar()\n {\n // Comprobar si esta logeado como admin\n if( isset($_SESSION['admin']) ){\n\n // Capturar el id enviado por GET\n $id = $_GET['id'];\n\n // Comprobar si no esta siendo utilizado en un reporte\n $comprobarForanea = Reporte::donde('tipo_reporte_id', $id)\n ->resultado();\n\n // Encontra el tipo de reporte por el id y capturarlo\n $tipoReporte = TipoReporte::encontrarPorID($id);\n\n\n if ( empty($comprobarForanea) ) {\n\n // Eliminar el tipo de reporte\n $tipoReporte->eliminar();\n\n\n // Guardar un mensaje de que se elimino correctamente en una cookie\n setcookie('mensaje', \"Se elimino correctamente el tipo de reporte ($tipoReporte->reporte)\", time() + 10, '/' );\n\n } else {\n\n // Guardar un mensaje de que se no se pudo eliminar\n setcookie('mensaje_error', \"El tipo de reporte ($tipoReporte->reporte) esta siendo utilizado en un reporte\", time() + 10, '/' );\n }\n\n\n // Redirigir a la tabla con todos los tipos de reporte\n header('Location: ../reportes/tipos_reporte');\n\n } else {\n\n // Redirigir al perfil\n header('Location: ../perfil');\n }\n }", "function eliminarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_ELI';\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_herrajeaccesorio','id_herrajeaccesorio','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}", "public function Eliminar()\n {\n $sentenciaSql = \"DELETE FROM \n detalle_orden \n WHERE \n id_detalle_orden = $this->idDetalleOrden\";\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n }", "function eliminar()\n{\n\t$sql=\"delete FROM slc_unid_medida WHERE id_unid_medida ='$this->cod'\";\n\t\t$result=mysql_query($sql,$this->conexion);\n\t\tif ($result) \n\t\t\t return true;\n\t\telse\n\t\t\t return false;\n\t\n}", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_ELI';\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_boa','id_cuenta_bancaria_boa','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}", "public function Eliminar(){\n\t\t\t$enlace = AccesoBD::Conexion();\n\n\t\t\t$sql = \"DELETE FROM denuncia WHERE ID_DENUNCIA = '$this->idDenuncia'\";\n\n\t\t\tif ($enlace->query($sql) !== TRUE) {\n \t\t\techo \"Error al eliminar la denuncia\";\n \t\t\texit();\n\t\t\t}\n\t\t\techo \"Denuncia eliminada\";\n\t\t}", "function eliminar_autonomo()\n\t{\n\t\ttry {\n\t\t\t$this->db->abrir_transaccion();\n\t\t\t$this->db->retrasar_constraints();\n\t\t\t$this->eliminar();\n\t\t\t$this->db->cerrar_transaccion();\n\t\t\t$this->manejador_interface->mensaje(\"El proyecto '{$this->identificador}' ha sido eliminado\");\n\t\t} catch ( toba_error $e ) {\n\t\t\t$this->db->abortar_transaccion();\n\t\t\t$this->manejador_interface->error( \"Ha ocurrido un error durante la eliminacion de TABLAS de la instancia:\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t$e->getMessage() );\n\t\t}\n\t}", "function eliminarChequera(){\n\t\t$this->procedimiento='tes.f_chequera_ime';\n\t\t$this->transaccion='TES_CHQ_ELI';\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_chequera','id_chequera','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}", "public function clean(){\n\t\t$sql = 'DELETE FROM compra_coletiva';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function eliminarCorreo(){\n\t\t$session = $this->session->userdata['logged_in'];\n\n\t\tif($session[\"is_loged\"] == true){\n\t\t$id = $session['user_id'];\n\t\t$cid = $_REQUEST['cid'];\n\n\t\t$this->load->model('model_correo','correo');\n\t\t$v = $this->correo->deleteEmail($cid,$id);\n\t\tif ($v == 1) {\n\t\t\t$urln = base_url().\"correo/vistaCorreo/\";\n\t\tredirect($urln);\n\t\t}else{\n\t\t\t$urln = base_url().\"correo/vistaCorreo/\";\n\t\tredirect($urln);\n\t\t}\n\t\t}else{\n\t\t\t$urln = base_url().\"user/loginUsuario\";\n\t\t\tredirect($urln);\n\t\t}\n\t}", "function eliminaRuta()\r\n\t{\r\n\t\t$query = \"DELETE FROM \" . self::TABLA . \" WHERE IdRuta = \".$this->IdRuta.\";\";\r\n\t\treturn parent::eliminaRegistro( $query);\r\n\t}", "public function excluir(){\n\t\tglobal $tabela_links;\n\t\t$consulta = new conexao();\n\t\t$endereco = $consulta->sanitizaString($this->end_link);\n\t\t$funcionalidade_tipo = (int) $this->funcionalidade_tipo;\n\t\t$funcionalidade_id = (int) $this->funcionalidade_id;\n\t\t//echo(\"$endereco\t $funcionalidade_tipo\t$funcionalidade_id\");\n\t\t$consulta->connect();\n\t\t$consulta->solicitar(\"DELETE FROM $tabela_links \n\t\t\t\t\t\t\t\tWHERE endereco = '$endereco'\n\t\t\t\t\t\t\t\tAND funcionalidade_tipo\t= '$funcionalidade_tipo'\n\t\t\t\t\t\t\t\tAND funcionalidade_id\t= '$funcionalidade_id'\");\n\t\t\n\t\n\t}", "public static function eliminar(){\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n $cita = Cita::find($_POST['id']);\n $cita->eliminar();\n header('Location:' . $_SERVER['HTTP_REFERER']);\n }\n }", "function del_compte()\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $repertoire;\r\n\r\n\t\tif($user[1] >= \"1\")\r\n\t\t{\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_GALERY_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\r\n\t\t\tif ($rep = @opendir($repertoire.$user[0]))\r\n\t\t\t{\r\n\t\t\t\twhile ($file = readdir($rep)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif($file != \"..\") \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($file != \".\") \r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t@unlink($repertoire.$user[0].\"/\".$file);\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@rmdir($repertoire.$user[0]);\r\n\t\t\techo\"<div style=\\\"text-align: center;\\\"><br /><br /><b>\"._COMTPEDELETE.\"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\",3);\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 EliminarMesas()\n\t{\n\n\t\t$sql = \" select codmesa from ventas where codmesa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codmesa\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\n\t\t\t$sql = \" delete from mesas where codmesa = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codmesa);\n\t\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t\t$stmt->execute();\n\n\t\t\theader(\"Location: mesas?mesage=1\");\n\t\t\texit;\n\n\t\t}else {\n\n\t\t\theader(\"Location: mesas?mesage=2\");\n\t\t\texit;\n\t\t}\n\n\t}", "public function remove($id)\n {\n\n $removedCC = ContactCenter::where('id', '=', $id)->first();\n $emirates = [1 => 'Abu Dhabi', 2 => 'Ajman', 3 => 'Dubai', 4 => 'Fujairah', 5 => 'Ras Al Kahimah', 6 => 'Sharjah', 7 => 'Umm Al Quwain',];\n\n if (!$removedCC) {\n $ccs = ContactCenter::orderBy('name')->get();\n\n return redirect('/manageCCs')->with([\n 'ccs' => $ccs,\n 'emirates' => $emirates,\n 'alert' => 'The contact center was not found!',\n ]);\n } else {\n # Before we delete the cc we have to delete any employee associations\n $removedCC->employees()->delete();\n\n # Before we delete the cc we have to delete any employee associations\n $removedCC->services()->detach();\n $removedCC->touchpoints()->detach();\n\n $removedCC->delete();\n\n $ccs = ContactCenter::orderBy('name')->get();\n\n return redirect('/manageCCs')->with([\n 'ccs' => $ccs,\n 'emirates' => $emirates,\n 'alert' => 'The contact center ' . $removedCC->name . ' was removed',\n ]);\n }\n }", "public function clean(){\n\t\t$sql = 'DELETE FROM negociacao_contas';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function eliminar()\n\t{\n\t\textract($_REQUEST);\n\t\t$db=new clasedb;\n\t\t$conex=$db->conectar();\n\t\t$sql=\"DELETE FROM asistencias WHERE id=\".$id_asistencias;\n\t\t\n\t$res=mysqli_query($conex,$sql);\n\t\tif ($res) {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\talert(\"Registro eliminado\");\n\t\t\t\t\twindow.location=\"ControlA.php?operacion=index\";\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\talert(\"Registro no pudo ser eliminado, Vuelva a intentarlo!\");\n\t\t\t\t\twindow.location=\"ControlA.php?operacion=index\";\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\t}", "protected\n function eliminar($id)\n {\n }", "public function eliminar_empresa_controlador(){\n\n\t\t$codigo=mainModel::decryption($_POST['codigo-del']);\n\t\t$Privilegio=mainModel::decryption($_POST['privilegio-admin']);\n\n\t\t$codigo=mainModel::limpiar_cadena($codigo);\n\t\t$Privilegio=mainModel::limpiar_cadena($Privilegio);\n\n\t\tif($Privilegio==1){\n\n\t\t\t$consulta1=mainModel::ejecutar_consulta_simple(\"SELECT EmpresaCodigo FROM libro WHERE EmpresaCodigo='$codigo'\");\n\n\t\t\t\n\t\t\tif($consulta1->rowCount()<=0){\n\t\t\t\t$ElimEmp=empresaModelo::eliminar_empresa_modelo($codigo);\n\t\t\t\t\n\t\t\t\tif($ElimEmp->rowCount()==1){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\"Alertas\"=>\"recargar\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Empresa Eliminada\",\n\t\t\t\t\t\t\t\"Texto\"=>\"Se elimino la empresa de manera satisfactoria\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t];\t\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Lo sentimos no se puede eliminar la empresa, \",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa, teniendo en cuenta que hay libros asociados a esta empresa\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t\t}\n\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa.\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t}\n\t\treturn mainModel::sweet_alert($alerta);\n\t\t\n\t}", "public function eliminarCargosArbol($atr){\n try {\n $respuesta = $this->dbl->delete(\"mos_requisitos_organizacion\", \"id_requisito = $atr[id]\");\n return \"ha sido eliminada la asociacion con exito\";\n } catch(Exception $e) {\n $error = $e->getMessage(); \n if (preg_match(\"/mos_requisitos_organizacion_fk_id_matriz_fkey/\",$error ) == true) \n return \"No se puede eliminar la asociacion de areas con requisito.\"; \n return $error; \n }\n }", "function setDelete(){\n\t\t$msg\t= \"===========\\tELIMINADO LA CUENTA \" . $this->mNumeroCuenta . \"\\r\\n\";\n\t\t$cuenta\t= $this->mNumeroCuenta;\n\t\t$socio\t= $this->mSocioTitular;\n\t\t$xQL\t= new MQL();\n\t\t\t//Cuenta\n\t\t\t$SQLDCuenta \t= \"DELETE FROM captacion_cuentas WHERE numero_cuenta = $cuenta AND numero_socio = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDCuenta);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t Eliminando la Cuenta (\" . $x[\"info\"] . \")\\r\\n\";\n\t\t\t}\n\t\t\t//Firma\n\t\t\t/*$SQLDFirma \t= \"DELETE FROM socios_firmas WHERE numero_de_cuenta = $cuenta \";\n\t\t\t$x = my_query($SQLDFirma);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\tEliminando las Firmas (\" . $x[\"info\"] . \")\\r\\n\";\n\t\t\t}*/\n\t\t\t//sdpm\n\t\t\t$SQLD_SDPM \t= \"DELETE FROM captacion_sdpm_historico WHERE cuenta = $cuenta \";\n\t\t\t$x = $xQL->setRawQuery($SQLD_SDPM);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t//Movimientos\n\t\t\t$SQLDOpes\t= \"DELETE FROM operaciones_mvtos WHERE docto_afectado = $cuenta AND socio_afectado = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDOpes);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t$SQLDRecs\t= \"DELETE FROM operaciones_recibos WHERE docto_afectado = $cuenta AND numero_socio = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDRecs);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t//Actualizar el Credito Relacionado\n\t\t\t$SQLDCC\t= \"UPDATE creditos_solicitud\n\t\t\t\t\t\tSET contrato_corriente_relacionado = \" . CTA_GLOBAL_CORRIENTE . \"\n\t\t\t\t\t\tWHERE contrato_corriente_relacionado = $cuenta \";\n\t\t\t$x = $xQL->setRawQuery($SQLDCC);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\tActualizando Creditos Relacionados (\" . $x[\"info\"] . \") \\r\\n\";\n\t\t\t}\n\t\treturn $msg;\n\t}", "public function supprimer() {\n // delete query\n $query = \"DELETE FROM \" . $this->sNomTable . \" WHERE idContenuCommande = :idContenuCommande\";\n\n // prepare query\n $stmt = $this->oConnexion->prepare($query);\n\n // bind id of record to delete\n $stmt->bindParam(\":idContenuCommande\", $this->idContenuCommande);\n\n // execute query\n if ($stmt->execute()) {\n return true;\n }\n\n return false;\n }", "function eliminarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_ime';\n\t\t$this->transaccion='ADQ_PROC_ELI';\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_proceso_compra','id_proceso_compra','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}", "static public function ctrEliminarGaleria(){\n\t\tif(isset($_POST[\"accionGaleria\"]) && $_POST[\"accionGaleria\"] == \"eliminar\"){\t\t\t\n\t\t\t$tabla1 = \"vtaca_galeria\";\n\t\t\t$tabla2 = \"vtade_galeria\";\n\t\t\t$codigo = $_POST[\"codigoGaleria\"];\t\t\t\n\t\t\t//OBTENER IMAGENES\n\t\t\t$item = \"cod_galeria\";\n\t\t\t$entrada = \"imagenTipoGaleria\";\n\t\t\t$imagenes = ModeloGaleria::mdlMostrarGaleriaDetalle($tabla2,$item,$codigo,$entrada);\n\t\t\t//ELIMINAR GALERIA\n\t\t\t$respuesta = ModeloGaleria::mdlEliminarGaleria($tabla1,$tabla2,$codigo);\t\t\t\n\t\t\tif($respuesta == \"ok\"){\n\t\t\t\t$rutaGlobal = realpath(dirname(__FILE__));\n\t\t\t\t$rutaGlobal = rutaGlobal($rutaGlobal);\n\t\t\t\tforeach ($imagenes as $key => $value) {\n\t\t\t\t\t$rutaEliminarImagen = $rutaGlobal.\"/archivos/galeria/\".utf8_decode($value[\"imagen\"]);\n\t\t\t\t\tunlink($rutaEliminarImagen);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $respuesta;\n\t\t}//if\n\t}", "function EliminaCarrito($CardCode){\n\t\tif($this->con->conectar()==true){\n\t\treturn mysql_query(\"DELETE FROM `Carrito` WHERE `CardCode` = '\" .$CardCode. \"'\");\n\t\t}\n\t}", "public function eliminar(){\n $dimensiones = $this->descripciones()->distinct()->get()->pluck('id')->all();\n $this->descripciones()->detach($dimensiones);\n DescripcionProducto::destroy($dimensiones);\n $this->categorias()->detach();\n $this->imagenes()->delete();\n $this->delete();\n }", "function eliminarImagenCarpeta($campo, $tabla, $idAsignacion, $carpeta)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/$carpeta/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "function elimina_vetrina()\n {\n $peer = new VetrinaPeer();\n $do = $peer->find_by_id(Params::get(\"id_vetrina\"));\n $peer->delete($do);\n\n $peer2 = new ProdottoServizioVetrinaPeer();\n $peer2->id_vetrina__EQUAL(Params::get(\"id_vetrina\"));\n $elenco_prodotti_servizi = $peer2->find();\n foreach ($elenco_prodotti_servizi as $ps)\n $peer2->delete($ps);\n\n if (is_html())\n return Redirect::success();\n else\n return Result::ok();\n }", "public function remover()\n\t{\n\t\t$sql = \"DELETE FROM $this->tabela WHERE $this->chave_primaria = :id\";\n\n\t\t$this->resultado = $this->conn->prepare($sql);\n\t\t$this->resultado->bindValue(':id', $this->id);\n\n\t\treturn $this->resultado->execute();\n\t}", "public function EliminarArqueoCaja()\n{\n\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t$sql = \" delete from arqueocaja where codarqueo = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codarqueo);\n\t\t$codarqueo = base64_decode($_GET[\"codarqueo\"]);\n\t\t$stmt->execute();\n\n\t\theader(\"Location: arqueoscajas?mesage=1\");\n\t\texit;\n\n\t} else {\n\n\t\theader(\"Location: arqueoscajas?mesage=2\");\n\t\texit;\n\t}\n\n}", "function remove() {\n\t\t$option = JRequest::getCmd('option');\n\t\t// Se obtienen los ids de los registros a borrar\n\t\t$cids = JRequest::getVar('cid', array(0), 'post', 'array');\n $product_type_code = JRequest::getVar('product_type_code');\n\n\t\t// Lanzar error si no se ha seleccionado al menos un registro a borrar\n if (count($cids) < 1 || !$product_type_code) {\n\t\t\tJError::raiseError(500, JText::_('CP.SELECT_AN_ITEM_TO_DELETE'));\n\t\t}\n\n\t\t// Se obtiene el modelo\n\t\t$model = $this->getModel('comments');\n\t\t// Se intenta el borrado\n\t\tif ($model->delete($cids, $product_type_code)) {\n\t\t\t$msg = JText::_('CP.DATA_DELETED');\n\t\t\t$type = 'message';\n\t\t} else {\n\t\t\t// Si hay algún error se ajusta el mensaje\n\t\t\t$msg = $model->getError();\n\t\t\tif (!$msg) {\n\t\t\t\t$msg = JText::_('CP.ERROR_ONE_OR_MORE_DATA_COULD_NOT_BE_DELETED');\n\t\t\t}\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=' . $option . '&view=comments', $msg, $type);\n\t}", "public function eliminarCapacidad($condiciones ) {\r\n \r\n \t$this->pdo->beginTransaction();\t\r\n\r\n\r\n\t$r1 = $this->pdo->_delete('tr012_capacidad', $condiciones);\r\n\t\r\n\tif($r1)\r\n\t\t\t{$this->pdo->commit(); return true;}\r\n\telse\t\t\r\n\t\t\t{$this->pdo->rollback(); return \"Error : 1= \".$r1;\t }\r\n }", "public function remove() {\n }", "function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}", "protected function eliminar($id)\n {\n }", "function eliminarUcedifobracivil(){\n\t\t$this->procedimiento='snx.ft_ucedifobracivil_ime';\n\t\t$this->transaccion='SNX_UDOC_ELI';\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_ucedifobracivil','id_ucedifobracivil','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}", "public static function supprimer() {\n if(!UserModel::isConnected())\n Controller::goTo(\"\", \"\", \"Vous devez être connecté pour accéder à cette section.\");\n \n if(!UserModel::estAdmin())\n Controller::goTo(\"\", \"\", \"Vous n'avez pas les droits suffisants.\");\n \n // L'utilisateur a annulé\n if(isset($_POST['btnAnnuler']))\n Controller::goTo(\"ecs/index.php\", \"L'EC n'a pas été supprimé.\");\n \n // Le formulaire a été validé\n $data = [];\n if(isset($_POST['btnSupprimer'])) {\n if(!isset($_SESSION['current']['EC']))\n Controller::goTo(\"ecs/index.php\", \"L'EC n'a pas été supprimé.\");\n \n if(ECModel::delete($_SESSION['current']['EC']))\n Controller::goTo(\"ecs/index.php\", \"L'EC a été supprimé.\");\n else {\n WebPage::setCurrentErrorMsg(\"L'EC n'a pas été supprimé de la base de données.\");\n if(($data['EC'] = ECModel::read($_SESSION['current']['EC'])) === null)\n Controller::goTo(\"ecs/index.php\", \"\", \"Erreur lors de la récupération de l'EC.\");\n }\n }\n else {\n if(($data['EC'] = ECModel::read(intval($_POST['idSupp']))) == null)\n return Controller::goTo(\"ecs/index.php\", \"\", \"Erreur lors de la récupération de l'EC.\");\n $_SESSION['current']['EC'] = intval($_POST['idSupp']);\n }\n\n return Controller::push(\"Supprimer un EC\", \"./view/ecs/supprimer.php\", $data);\n }", "function eliminarViajeroInterno(){\n\t\t$this->procedimiento='obingresos.ft_viajero_interno_ime';\n\t\t$this->transaccion='OBING_CVI_ELI';\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_viajero_interno','id_viajero_interno','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}", "public function supprimer() {\n // delete query\n $query = \"DELETE FROM \" . $this->sNomTable . \" WHERE idContenuPanier = :idContenuPanier\";\n\n // prepare query\n $stmt = $this->oConnexion->prepare($query);\n\n // bind id of record to delete\n $stmt->bindParam(\":idContenuPanier\", $this->idContenuPanier);\n\n // execute query\n if ($stmt->execute()) {\n return true;\n }\n\n return false;\n }", "public function eliminar()\n {\n $resp = false;\n $base = new BaseDatos();\n $sql = \"DELETE FROM archivocargado WHERE idarchivocargado=\" . $this->getidArchivoCargado();\n if ($base->Iniciar()) {\n if ($base->Ejecutar($sql)) {\n return true;\n } else {\n $this->setmensajeoperacion(\"ArchivoCargado->eliminar: \" . $base->getError());\n }\n } else {\n $this->setmensajeoperacion(\"ArchivoCargado->eliminar: \" . $base->getError());\n }\n return $resp;\n }", "function eliminar($bd);", "public function eliminar(){\n //si el archivo existe\n if(is_file($this->ruta)){\n //doy permisos para eliminar archivos\n chmod($this->ruta, 0777);\n //elimino el archivo y devuelvo el resultado\n return unlink($this->ruta);\n }\n }", "public function remover() {\n \n $queryVerificaInscricao = '\n select * from tb_inscricao_atividade where id_atividade = :id_atividade \n ';\n \n $stmtInscAtt = $this->conexao->prepare($queryVerificaInscricao);\n $stmtInscAtt->bindValue(':id_atividade', $_GET['id_att']);\n $stmtInscAtt->execute();\n \n $inscAtt = $stmtInscAtt->fetchAll(PDO::FETCH_OBJ);\n \n // echo '<pre>';\n // print_r($inscAtt);\n // echo '</pre>';\n \n if (!empty($inscAtt)) {\n foreach ($inscAtt as $inscAttInd) {\n $queryDeleteInscAtt = 'delete from tb_inscricao_atividade where \n id_atividade = :id_atividadeDel and \n id_evento = :id_eventoDel and \n id_usuario = :id_usuarioDel';\n \n $stmtInscAttDel = $this->conexao->prepare($queryDeleteInscAtt);\n $stmtInscAttDel->bindValue(':id_atividadeDel', $inscAttInd->id_atividade);\n $stmtInscAttDel->bindValue(':id_eventoDel', $inscAttInd->id_evento);\n $stmtInscAttDel->bindValue(':id_usuarioDel', $inscAttInd->id_usuario);\n $stmtInscAttDel->execute();\n }\n }\n\n $queryInscCupomAtt = '\n select * from tb_cupom where id_atividade = :id_atividadeCupDel\n ';\n\n $stmtInscCupomAtt = $this->conexao->prepare($queryInscCupomAtt);\n $stmtInscCupomAtt->bindValue(':id_atividadeCupDel', $_GET['id_att']);\n $stmtInscCupomAtt->execute();\n\n $cupomAtt = $stmtInscCupomAtt->fetchAll(PDO::FETCH_OBJ);\n\n // echo '<pre>';\n // print_r($cupomAtt);\n // echo '</pre>';\n\n if (!empty($cupomAtt)) {\n foreach ($cupomAtt as $cupomAttInd) {\n $queryDeleteCupomAtt = '\n delete from tb_cupom where id = :id_cupomDel\n ';\n\n echo $cupomAttInd->id;\n\n $stmtInscCupomAttDel = $this->conexao->prepare($queryDeleteCupomAtt);\n $stmtInscCupomAttDel->bindValue(':id_cupomDel', $cupomAttInd->id);\n $stmtInscCupomAttDel->execute();\n }\n }\n \n $query = '\n delete from tb_atividade \n where id = :id';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n\n return $stmt->execute();\n }", "final public function delete() {\n global $config; \n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM guarderia_2 WHERE id_guarderia = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'sedes/&success=true');\n }", "function eliminarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_ELI';\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_cliente','id_cliente','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}", "function eliminarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_ELI';\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_maquinaria','id_maquinaria','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}", "public function excluir(){\n\t\n\t\t$idcomentario = $this->uri->segment(3);\n\t\tif ($idcomentario != NULL):\n\t\t\t$query = $this->Comentarios->get_byid($idcomentario);\n\t\t\tif ($query->num_rows()==1):\n\t\t\t\t$query = $query->row();\n\t\t\t\t$this->Comentarios->do_delete(array('id_comentario'=>$query->id_comentario), FALSE);\n\t\t\tendif;\n\t\telse:\n\t\t\tset_msg('msgerro', 'Escolha um comentario para excluir', 'erro');\n\t\tendif;\n\t\t\tredirect('comentarios/gerenciar');\n\t}", "public function excluir(){\r\n return (new Database('cartao'))->delete('id = '.$this->id);\r\n }", "function delete() ;", "function delete() ;", "public function eliminar(){\n if(!isLoggedIn()){\n redirect('usuarios/login');\n }\n //check User Role -- Only ADMINISTRADOR allowed\n if(!checkLoggedUserRol(\"ADMINISTRADOR\")){\n redirect('dashboard');\n }\n\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n $data = [\n 'especialidadToDelete' => trim($_POST['especialidadToDelete'])\n ];\n \n // Validar carga de especialidadToDelete\n if(empty($data['especialidadToDelete'])){\n $data['especialidadToDelete_error'] = 'No se ha seleccionado la especialidad a eliminar';\n }\n\n // Asegurarse que no haya errores\n if(empty($data['especialidadToDelete_error'])){\n // Crear especialidad\n if($this->especialidadModel->eliminarEspecialidad($data['especialidadToDelete'])){\n flash('especialidad_success', 'Especialidad eliminada exitosamente');\n redirect('especialidades');\n }\n else{\n die('Ocurrió un error inesperado');\n }\n }\n else{\n flash('especialidad_error', $data['especialidadToDelete_error'], 'alert alert-danger');\n redirect('especialidades');\n }\n }\n }", "public function eliminar() {\n\t\t\n\t\t\n\t\t$juradodni = $_GET[\"dniJurado\"];\n\t\t\n\t\t$this -> JuradoMapper -> delete($juradodni);\n\n\t\t\n\t\t$this -> view -> redirect(\"jurado\", \"listar\");\n\t\t//falta cambiar\n\t}", "function elimina(&$valores)\n {\n $this->iniVar();\n if (isset($this->bvictimacolectiva->_do->id_grupoper)) {\n $this->eliminaVic($this->bvictimacolectiva->_do, true);\n $_SESSION['fvc_total']--;\n }\n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "function removeRegistro($id) {\n GLOBAL $con;\n\n //busca info\n $querybusca = \"select * from kardexs where id='\" . $id . \"'\";\n $qry = mysql_query($querybusca);\n $linha = mysql_fetch_assoc($qry);\n\n //Apagua\n $query = \"delete from kardexs where id='\" . $id . \"'\";\n mysql_query($query, $con) or die(mysql_error());\n\n if (saldoExiste($linha['produto_id'], $linha['estoque_id'])) {\n //atualiza retirando saldo\n $saldoAtual = saldoByEstoque($linha['produto_id'], $linha['estoque_id']);\n if ($linha['sinal'] == '+') {\n $saldoAtual_acerto = $saldoAtual - $linha['qtd'];\n } else {\n $saldoAtual_acerto = $saldoAtual + $linha['qtd'];\n }\n\n\n saldo_atualiza($linha['produto_id'], $linha['estoque_id'], $saldoAtual_acerto);\n }\n}", "function do_delete(){\n\t\t// remove from fieldset:\n\t\t$fieldset = jcf_fieldsets_get( $this->fieldset_id );\n\t\tif( isset($fieldset['fields'][$this->id]) )\n\t\t\tunset($fieldset['fields'][$this->id]);\n\t\tjcf_fieldsets_update( $this->fieldset_id, $fieldset );\n\t\t\n\t\t// remove from fields array\n\t\tjcf_field_settings_update($this->id, NULL);\n\t}", "public function onRemove();", "public function eliminar() {\n $fecha = $this->fecha;\n return ($fecha) ? Funciones::gEjecutarSQL(\"DELETE FROM ASISTENTES WHERE FECHA='$fecha'\") : FALSE;\n }", "public function Eliminar(){\n \n \n if (!$this->model->igualar($_REQUEST['id'])) {//si una categoria no esta asignada la puede eliminar\n \n $this->model->Eliminar($_REQUEST['id']);\n header('Location: ?c=Categoria'); \n }\n else{\n \n header('Location: ?c=Categoria&error'); //de lo contrario no se podra eliminar asta que se elimine el cliente que la tiene\n }\n\n\n\n \n \n \n\n\n\n\n \n \n \n }", "public function eliminarPreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->idCliente);\n return Database::executeRow($sql, $params);\n }", "function runEliminar(){\n \n $sql = \"DELETE FROM mec_met WHERE id_mecanismos IN (SELECT id_mecanismos FROM mecanismos WHERE id_componente=\".$this->_datos.\")\";\n $this->QuerySql($sql);\n $sql = \"DELETE FROM mecanismos WHERE id_componente=\".$this->_datos;\n $this->QuerySql($sql);\n $sql = \"DELETE FROM componentes WHERE id_componentes=\".$this->_datos;\n $_respuesta = array('Codigo' => 0, \"Mensaje\" => '<strong> OK: </strong> El registro se ha eliminado.');\n try { \n $this->QuerySql($sql);\n }\n catch (exception $e) {\n $_respuesta = array('Codigo' => 99, \"Mensaje\" => $e->getMessage());\n }\n \n print_r(json_encode($_respuesta));\n }", "public function removeAction()\n {\n if ( $this->_hasParam('razaoSocialTomador') == false )\n {\n $this->_redirect('clientes/list');\n }\n \t\t$modelo = new Application_Model_Clientes();\n $razaoSocialTomador = $this->_getParam('razaoSocialTomador');\n $modelo->removeByRazaoSocial($razaoSocialTomador);\n\n// $cnte = $modelo->removeByRazaoSocial($razaoSocialTomador);\n\t\t$this->_redirect('clientes/list');\n // action body\n }", "function eliminarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_ELI';\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_metodologia','id_metodologia','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}", "public function remove()\n {\n }", "function eliminarpermiso()\n {\n $oconexion = new conectar();\n //se establece conexión con la base de datos\n $conexion = $oconexion->conexion();\n //consulta para eliminar el registro\n $sql = \"UPDATE permiso SET eliminado=1 WHERE id_permiso=$this->id_permiso\";\n // $sql=\"DELETE FROM estudiante WHERE id=$this->id\";\n //se ejecuta la consulta\n $result = mysqli_query($conexion, $sql);\n return $result;\n }", "public function del()\n {\n }", "function remove($cID) {\n $input = array(\n '_OptinEmailYN'=> 0,\n '_OptinSmsYN'=> 0,\n '_OptinSurfaceMailYN'=> 0,\n '_OptinMerchandiseYN'=> 0,\n '__ClubEventsYN'=> 0,\n '__AwayMatchYN'=> 0,\n //'Email'=> '',\n \n );\n $encrypted = $cID;\n $cID = $this->encryption->decode($cID);\n \n if( ! defined('DATAOWNER_ID')) $this->_lookup_dID($cID);\n //define('DATAOWNER_ID', $dID);\n \n $this->load->model('contact_model', 'contact');\n $r = $this->contact->save($input, $cID);\n \n $this->message = '<span class=\"notification done\">Your preferences have been updated!</span>';\n redirect(site_url('unsubscribe/show/' . $encrypted));\n \n }", "function eliminarTipoDeMatricula($id){\n \t$pdo = DatabaseCao::connect();\n mysql_query(\"DELETE FROM ca_tipo_matricula WHERE id = ? ;\");\n $sql = \"DELETE FROM ca_tipo_matricula WHERE id = ?\";\n $q = $pdo->prepare($sql);\n $q->execute(array($id));\n DatabaseCao::disconnect();\n }", "function DELETE()\n{\n\t//comprobamos si existe \n\t$sql = \"SELECT * FROM EDIFICIO WHERE CODEDIFICIO= '$this->codedificio';\";\n //si se cumple la condicion\n if($result = $this->mysqli->query($sql)){\n\t //si se cumple la condicion\n\t if ($result->num_rows == 1) //Comprobamos si ya existe el edificio\n\t {\n\t\t\t$sql = \"SELECT * FROM ESPACIO WHERE CODEDIFICIO= '$this->codedificio';\";\n\t\t\t$result = $this->mysqli->query($sql);\n\t\t\t\n\t\t\t//si se cumple la condicion\n\t\t\tif ($result->num_rows >= 1) //Comprobamos si existen espacios asignados a ese edificio\n\t\t\t{\n\t\t\t\t$resultado = 'Error de gestor de base de datos';\n\t\t\t}//si no\n\t\t\telse{\t\t//\n\t\t\t \t$sql = \"SELECT * FROM CENTRO WHERE CODEDIFICIO= '$this->codedificio';\"; //Buscamos los centros que pertenece a un edificio\n\t\t\t\t$result = $this->mysqli->query($sql);\n\t\t\t\t\n\t\n\t\t\t\t//si se cumple la condicion\n\t\t\t\tif ($result->num_rows >= 1) //Si existe, mostramos mensaje de error\n\t\t\t\t{\n\t\t\t\t\t$resultado = 'Error de gestor de base de datos';\n\t\t\t\t\t\n\t\t\t\t}//si no\n\t\t\t\telse{ //Si existe, eliminamos el edificio\n\t\t\t\t\t$sql = \"\tDELETE FROM \n\t\t\t\t\t\t\t\tEDIFICIO\n\t\t\t\t\t\t\t\tWHERE(\n\t\t\t\t\t\t\t\tCODEDIFICIO = '$this->codedificio'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t//si se cumple la condicion\n\t\t\t\t\tif ($this->mysqli->query($sql)){ //Si la consulta se ha realizado correctamente, mostramos mensaje \n\n\t\t\t\t\t\t$resultado = 'Borrado realizado con éxito';\n\t\t\t\t\t}\n\t\t\t\t\telse //Si la consulta no se ha realizado correctamente, mostramos mensaje de error\n\t\t\t\t\t{\n\t\t\t\t\t\t$resultado = 'Error de gestor de base de datos';//devolvemos el mensaje\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\n\t\t\t\t\n\t\t}//si no\n\t\telse{\n\t\t\t $resultado = 'Edificio no existe';\n\t\t }\n}//si no\nelse{\n\t$resultado = 'Error de gestor de base de datos';\n\t\n\t\t}\n\t\treturn $resultado;//devolvemos el mensaje\t\n}", "function delete_costumer($id_costumer)\n {\n return $this->db->delete('costumer',array('id_costumer'=>$id_costumer));\n }", "function procesar_delete ($datos){\n \n $this->dep('datos')->tabla('asignacion')->cargar(array('id_asignacion'=>$this->s__id_asignacion));\n $asignacion=$this->dep('datos')->tabla('asignacion')->get();\n $this->dep('datos')->tabla('asignacion')->eliminar_fila($asignacion['x_dbr_clave']);\n $this->dep('datos')->tabla('asignacion')->sincronizar();\n }", "function eliminar_chapa($id)\n {\n $con = new DBmanejador;\n \tif($con->conectar()==true)\n \t{\n\t\t \t $consulta= \"delete from tchapas where chapa_id=('\".$id.\"')\";\n\t\t\t\t $resultado=mysql_query($consulta) or die('La consulta fall&oacute;: ' . mysql_error());\n\n\t\t\t\t if (!$resultado) return false;\n\t\t\t\t else return true;\n \t}\n }", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }", "public function eliminarGestCoor($id){\n\t\t\ttry {\n\n\t\t\t\t$handler = new ObjetivosGC;\n\t\t\t\t$handler->setId($id);\n\n\t\t\t\t$handler->delete(null);\n\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new Exception($e->getMessage());\t\n\t\t\t}\n\t\t}", "public function delete(){\n $db = Database::getInstance() ;\n $db->query(\"DELETE FROM canciones WHERE idcancion=:idcan ;\",\n [\":idcan\"=>$this->idcancion]) ;\t\t\t\t \n }" ]
[ "0.68179184", "0.6734023", "0.6734023", "0.6734023", "0.6734023", "0.6697119", "0.66154534", "0.6610955", "0.6588504", "0.6569565", "0.6562366", "0.6561241", "0.65327585", "0.65010154", "0.6490085", "0.64750946", "0.6467054", "0.6466945", "0.6466945", "0.6466945", "0.64425683", "0.64422154", "0.64383215", "0.63857055", "0.6372021", "0.635067", "0.6344582", "0.6341184", "0.6310505", "0.62724984", "0.6257528", "0.62472844", "0.62246126", "0.6204954", "0.6204841", "0.6203333", "0.61984676", "0.61940014", "0.6190264", "0.6183684", "0.6183455", "0.61786443", "0.6177513", "0.61710685", "0.61696273", "0.6163871", "0.6158043", "0.6153726", "0.615152", "0.6149343", "0.6148288", "0.61422485", "0.61344707", "0.61320275", "0.6130528", "0.6130453", "0.6130368", "0.6130344", "0.61028534", "0.6095889", "0.6094628", "0.60929847", "0.6090514", "0.6090252", "0.60895044", "0.60852545", "0.6084052", "0.608202", "0.6081657", "0.60803175", "0.6079215", "0.6078907", "0.60741884", "0.60741884", "0.6070095", "0.60665065", "0.60601735", "0.6057611", "0.6053976", "0.60539395", "0.60445225", "0.60444504", "0.60372365", "0.60353136", "0.6035013", "0.6034909", "0.6034541", "0.60312116", "0.6020789", "0.60195214", "0.6019071", "0.6015176", "0.60140353", "0.6013378", "0.6009755", "0.6004862", "0.60032785", "0.60032785", "0.60032785", "0.59965885", "0.59884006" ]
0.0
-1
Returns a human readable String that describes the equipment type
public static function get($id) { // Set the predefined list that can be mapped self::$types = [ 0 => 'Légkondícionáló', 1 => 'WC', 2 => 'Napelem', 3 => 'Kert', ]; return (isset(self::$types[$id])) ? self::$types[$id] : ' - '; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_equipment_type();", "private function getTypeDescription()\n {\n switch($this->_type)\n {\n case 'Mountain':\n return \"Mountains are peaceful places. Your ships don't do any damage here, while your tanks will do 10% less damage. Flying weapons (airplanes and helicopters) do normal damage.\" . PHP_EOL;\n case 'Water':\n return \"Water is what you drink. It's also the place where your tanks will be completely useless, but your ships will do 1000% more damage. o7\" . PHP_EOL;\n case 'Open land':\n return \"Who doesn't like the smell of grass in the morning, with a hint of blood from your enemy? Your tanks will do 1000% more damage here, while ships will do none. Good luck!\" . PHP_EOL;\n case 'Woods':\n return \"All you can do is hide, and sometimes it's the best option. Your tanks will do 40% less damage, your ships wont do any damage at all, your air vehicles will do 10% more, and your foot soldiers will do 30% more, so use them wisely. This is your chance, fella!\" . PHP_EOL;\n }\n }", "public function getTypeAsStr() {\n\t\t$cardtypes = array(\n\t\t\t\"race\" => 1,\n\t\t\t\"aspect\" => 2,\n\t\t\t\"power\" => 3,\n\t\t\t\"minion\" => 10,\n\t\t\t\"bane\" => 20\n\t\t);\n\t\tforeach($cardtypes as $typestr => $typeval) {\n\t\t\tif($this->cardType == $typeval) {\n\t\t\t\treturn $typestr;\n\t\t\t}\n\t\t}\n\t}", "public function getTypeStr() {\n return self::getTypes()[$this->type];\n }", "public function getTypeString(){\n\t\t$typeStr=\"\";\n\t\tswitch($this->type){\n\t\t\tcase \"fixed\": $typeStr=_(\"Montant fixe\");break;\n\t\t\tcase \"percentage\": $typeStr=_(\"Pourcentage\");break;\n\t\t\tcase \"percentage_no_transport\": $typeStr=_(\"Pourcentage sans transport\");break;\n\t\t\tcase \"transport\": $typeStr=_(\"Frais de port\");break;\n\t\t\tcase \"grid\": $typeStr=_(\"Variable\");break;\n\t\t}\n\t\treturn $typeStr;\n\t}", "public function getTypeDesc(){\n $type = $this->type;\n $arr = self::getTypeDescArr();\n return $arr[$type] ?? \"\";\n }", "abstract function typeAsString();", "public function typeAsString()\n {\n switch ($this->_type) {\n case self::TYPE_INTEGER:\n $str = 'INTEGER';\n break;\n\n case self::TYPE_FLOAT:\n $str = 'FLOAT';\n break;\n\n case self::TYPE_VARCHAR:\n $str = 'VARCHAR';\n break;\n\n case self::TYPE_BLOB:\n $str = 'BLOB';\n break;\n\n case self::TYPE_BOOLEAN:\n $str = 'BOOLEAN';\n break;\n\n case self::TYPE_DATETIME:\n $str = 'DATETIME';\n break;\n\n case self::TYPE_TEXT:\n default:\n $str = 'TEXT';\n }\n return $str;\n }", "public function getType()\n {\n \n $tipos = \n\n $TypeOfProduct = TypeOfProduct::find($this->type_id); \n\n return $TypeOfProduct->description;\n }", "public function type(): string\n {\n return $this->item['type'];\n }", "public function GetTypeDesc(): string {\n\t\tswitch($this->debugType) {\n\t\t\tcase self::NONE: \treturn \"NONE\";\n\t\t\tcase self::LOG: \treturn \"LOG\";\n\t\t\tcase self::DEBUG:\treturn \"DEBUG\";\n\t\t\tcase self::DEV:\t\treturn \"DEV\";\n\t\t\tdefault: \t\t\t\t\treturn \"unknown\";\n\t\t}\n\t}", "public function getType() : string\n {\n $rtn = $this->data['type'];\n\n return $rtn;\n }", "abstract protected function get_typestring();", "protected function getType(): string\n {\n return join('|', $this->types);\n }", "public function getType() :string\n {\n return $this->types[$this->type];\n }", "public function type(): string\n {\n return $this->type;\n }", "public function type(): string\n {\n return $this->type;\n }", "public function get_type_name() { \n\n\t\tswitch ($this->type) { \n\t\t\tcase 'xml-rpc': \n\t\t\tcase 'rpc':\n\t\t\t\treturn _('API/RPC');\n\t\t\tbreak;\n\t\t\tcase 'network':\n\t\t\t\treturn _('Local Network Definition');\n\t\t\tbreak;\n\t\t\tcase 'interface':\n\t\t\t\treturn _('Web Interface');\n\t\t\tbreak;\n\t\t\tcase 'stream':\n\t\t\tdefault: \n\t\t\t\treturn _('Stream Access');\n\t\t\tbreak;\n\t\t} // end switch\n\n\t}", "public function getType(): string\n {\n return ucfirst($this->type);\n }", "public function getTypeLabel(){\r\n\t\t$ret = \" \";\r\n\t\tswitch ($this->type){\r\n\t\t\tcase 0 : $ret = $_LANG->get('Artikel'); break;\r\n\t\t\tcase 1 : $ret = $_LANG->get('Produkt'); break;\r\n\t\t\tcase 2 : $ret = $_LANG->get('Personalisierung'); break;\r\n\t\t\tdefault: $ret = \"n.A.\";\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "public function getProductType()\n {\n return Zend_Json::encode($this->escapeHtml($this->getProduct()->getTypeId()));\n }", "public function getChipType()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_CHIP_TYPE, $payload);\n\n $payload = unpack('v1chip', $data);\n\n return $payload['chip'];\n }", "public static function get_name() {\n $type = static::get_type();\n return util::string(\"product:{$type}\");\n }", "public function getTypeHuman()\n {\n return ucwords(str_replace(\"_\", \" \", $this->type));\n }", "public function getType() : string{\n return $this->type;\n }", "public function typeText() {\n $params = $this->types();\n return isset($params[$this->type]) ? $params[$this->type] : '';\n }", "public function resource_type() {\n switch($this->statusable_type_plain()) {\n case \"shorthaulhelicopter\":\n return \"Short Haul\";\n break;\n case \"crew\":\n return \"Hotshots\";\n break;\n case \"rappelhelicopter\":\n return \"Rappel\";\n break;\n case \"smokejumperairplane\":\n return \"Smokejumpers\";\n break;\n default:\n return \"Unknown\";\n break;\n }\n }", "public function getTypeDesc () {\n return self::$typeMap[$this->type];\n }", "public function getType() : string\n {\n return $this->type;\n }", "public function getType() : string\n {\n return $this->type;\n }", "public function getType() : string\n {\n return $this->type;\n }", "public function getEventType() {\n $ret = '';\n switch($this->type) {\n case Event::TYPE_EVENT:\n $ret = 'Event';\n break;\n case Event::TYPE_FLAGSHIP:\n $ret = 'Flagship';\n break;\n case Event::TYPE_WORKSHOP:\n $ret = 'Workshop';\n break;\n case Event::TYPE_CELEBRITY_APPEARANCE:\n $ret = 'Celebrity Appearance';\n break;\n case Event::TYPE_GUEST_LECTURE:\n $ret = 'Guest Lecture';\n break;\n }\n\n return $ret;\n }", "public function getEquipmentDamageType()\n {\n return $this->equipmentDamageType;\n }", "public function getType() : string {\n return $this->type;\n }", "public function getTypeString()\n {\n switch ( $this->fileStructure->type )\n {\n case self::IS_DIRECTORY:\n return \"d\";\n\n case self::IS_FILE:\n return \"-\";\n\n case self::IS_SYMBOLIC_LINK:\n return \"l\";\n\n case self::IS_LINK:\n return \"h\";\n\n default:\n return \"Z\";\n }\n }", "public function get_type(): string {\n\t\treturn $this->type;\n\t}", "public function getRoomWithTypeAttribute()\n {\n return \"{$this->room->room_with_type}\";\n }", "public function __toString(): string\n {\n return $this->fullTypeString;\n }", "public function getEquipmentInfo(){\n \treturn array(\n \t\t'code' => 'CF8222', \n \t\t'name' => 'Celltac F Mek 8222', \n \t\t'description' => 'Automatic analyzer with 22 parameters and WBC 5 part diff Hematology Analyzer',\n \t\t'testTypes' => array(\"Full Haemogram\", \"WBC\")\n \t\t);\n }", "public function displaytype()\n\t{\n\t\treturn $this->Players->displaytype($this->SqueezePlyrID);\n\t}", "public function get_type(): string;", "public function getTypeDescription(){\n\t\tif ( $this->test_service ) {\n\t\t\treturn $this->test_service->getTypeDescription();\n\t\t}\n\t}", "public function type(): string;", "public function getEdiType(): string\n {\n return $this->identifierCode;\n }", "public function getTypeOfBattle()\n {\n return \"Type of this battle is: \" . $this->_type . \".<br />\";\n }", "public function display_eligibility_type($type){\n\t\tif($type == 'PI'){\n\t\t\t$st = 'Profile Shortlisting';\n\t\t}else if($type == 'PS'){\t\n\t \t\t$st = 'Profile Sending';\n\t\t}else if($type == 'PC'){\n\t\t\t$st = 'Position Closing';\n\t\t}\n\t\treturn $st;\n\t}", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public static function getTypeDescription(): string\n {\n $class = get_called_class()::SHAPE_TYPE;\n return <<<EOF\nType: $class\nEOF;\n }", "public function getType():string { return $this->type; }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getEquipmentName()\n {\n return isset($this->EquipmentName) ? $this->EquipmentName : null;\n }", "public function getEquipmentName()\n {\n return isset($this->EquipmentName) ? $this->EquipmentName : null;\n }", "protected function get_formatted_type()\n\t{\n\t\t$rc = '';\n\n\t\t$type = $this->type;\n\t\t$size = $this->size;\n\n\t\tif (!$size && $type == self::TYPE_VARCHAR)\n\t\t{\n\t\t\t$size = 255;\n\t\t}\n\n\t\tswitch ($type)\n\t\t{\n\t\t\tcase self::TYPE_INTEGER:\n\t\t\tcase self::TYPE_TEXT:\n\t\t\tcase self::TYPE_BLOB:\n\n\t\t\t\t$t = [\n\n\t\t\t\t\tself::TYPE_BLOB => 'BLOB',\n\t\t\t\t\tself::TYPE_INTEGER => 'INT',\n\t\t\t\t\tself::TYPE_TEXT => 'TEXT',\n\n\t\t\t\t][ $type ];\n\n\t\t\t\tif (\\is_numeric($size))\n\t\t\t\t{\n\t\t\t\t\t$rc .= \"$t( $size )\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$rc .= \\strtoupper($size) . $t;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tif ($size)\n\t\t\t\t{\n\t\t\t\t\t$rc .= \\strtoupper($type) . \"( $size )\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$rc .= \\strtoupper($type);\n\t\t\t\t}\n\t\t}\n\n\t\treturn $rc;\n\t}", "public function __toString() {\n\t\treturn __CLASS__ . '(' . $this->type . ')';\n\t}", "public function type()\n\t{\n\t\treturn Ar::type($this->attributes);\n\t}", "public function getType(): string\n {\n return self::TYPE_STRING;\n }", "public function getType(): string\n {\n return self::TYPE_STRING;\n }", "protected function getType(): string {\n return '';\n }", "public function name() {\n\t\t\treturn $this->_name . ' ('.self::$type_name[$this->_type].')';\n\t\t}", "public function showSpecs()\n {\n return $this->name . \" includes a \" . $this->chipset . \" chipset and \" . $this->internalMemory . \"GB of internal memory\";\n }", "public function getDisplayTypeName()\n {\n $type = static::TYPE;\n\n if ($this instanceof StructureItem) {\n $type = $this->structure->getStructureName();\n }\n\n if ($this->isArray) {\n return $type . '[]';\n }\n\n if ($this->isFixedValues) {\n return '{' . implode(', ', $this->validValues) . '}';\n }\n\n return $type;\n }", "public function describe() : string\n {\n $type = (string)$this->getEventType();\n $datetime = $this->getDate()->format('d-M-Y');\n if ($this->getTime()) {\n $datetime .= ' at '.$this->getTime()->format('g:i a');\n }\n $return = sprintf('%s %s, %s', $this->getLanguage(), $type, $datetime);\n $more = [];\n if ($this->getJudge()) {\n $more[] = $this->getJudge()->getLastName();\n }\n $docket = $this->getDocket();\n if ($docket) {\n $more[] = $docket;\n }\n if ($more) {\n $return .= sprintf(' (%s)', implode(', ', $more));\n }\n\n return $return;\n }", "public function getDescription() {\n return self::getDescriptionType($this->_type);\n }", "function get_type() {\n\t\treturn $this->get_data( 'type' );\n\t}", "public function getType(): string {\n return $this->type;\n }", "function getType(): string;", "function getType(): string;", "public function getType(): string {\n return $this->type;\n }", "public function getProductType();", "public function getRawType()\n {\n if ( $this->isCotis() ) {\n return 'membership';\n } else {\n return 'donation';\n }\n }", "function strGetDriverType() {\n return $this->strDriverType;\n }", "public function getType() : string;", "public function type() : string;", "public function getTypeCode () {\n if (2 == $this->status) {\n return \"meanless\";\n }\n\n return $this->objtype;\n }", "public function getProduct_type () {\n\t$preValue = $this->preGetValue(\"product_type\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_type;\n\treturn $data;\n}", "public function getType(): string\n {\n }", "public function getType()\n\t{\n\t\treturn \"rujukan\";\n\t}", "public function getType():string {\n\t\t\treturn $this->type;\n\t\t}", "public static function getType(): string\n {\n return self::TYPE;\n }", "public function getDescription() {\n return $this->__getTypes();\n }" ]
[ "0.7937649", "0.74292845", "0.6973579", "0.69684464", "0.69566965", "0.6866603", "0.6836304", "0.6683927", "0.66822743", "0.6661374", "0.6656128", "0.66085863", "0.65160596", "0.6470887", "0.6439697", "0.6425038", "0.6425038", "0.6361141", "0.63461214", "0.6324345", "0.63189614", "0.6293268", "0.62771666", "0.6267665", "0.6253705", "0.62483656", "0.6244662", "0.62114966", "0.62108356", "0.62108356", "0.62108356", "0.6198167", "0.61782575", "0.61675096", "0.6151834", "0.6141267", "0.61364704", "0.61263454", "0.61210394", "0.6115153", "0.6110157", "0.60939753", "0.60834354", "0.60764086", "0.6064487", "0.60558265", "0.60548335", "0.60548335", "0.60548335", "0.60548335", "0.60548335", "0.60548335", "0.60548335", "0.60548335", "0.60548335", "0.60548335", "0.60548335", "0.60548335", "0.6050161", "0.60312", "0.60311556", "0.60311556", "0.60311556", "0.60311556", "0.60311556", "0.60311556", "0.60311556", "0.60311556", "0.60311556", "0.60311556", "0.60311556", "0.60252726", "0.60252726", "0.60157216", "0.6005441", "0.5993732", "0.5989208", "0.5989208", "0.5986259", "0.5980628", "0.5976126", "0.5961858", "0.5961178", "0.5960625", "0.5958499", "0.59552133", "0.59458345", "0.59458345", "0.5921646", "0.5919186", "0.5914937", "0.5899395", "0.58942795", "0.5876471", "0.5873778", "0.58721375", "0.586652", "0.5857915", "0.58575904", "0.58451223", "0.5834202" ]
0.0
-1
Gets all the sharer occupations. Retrieves all the sharer occupations, encapsulates them in individual Model_Insurance_TenantsContentsPlus_SharerOccupation objects, and returns them in an array.
public function getOccupations() { $select = $this->select(); $occupationTypesArray = $this->fetchAll($select); if (count($occupationTypesArray) > 0) { $returnArray = array(); foreach($occupationTypesArray as $currentOccupationType) { $sharerOccupation = new Model_Insurance_TenantsContentsPlus_SharerOccupation(); $sharerOccupation->setId($currentOccupationType->id); $sharerOccupation->setType($currentOccupationType->type); $sharerOccupation->setLabel($currentOccupationType->label); $returnArray[] = $sharerOccupation; } return $returnArray; } else { // Can't get sharer occupations - log a warning Application_Core_Logger::log("Can't get sharer occupations from table {$this->_name}", 'warning'); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sharings() {\n return $this->hasMany('Rockit\\Models\\Sharing');\n }", "public function GetOwedShirts()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetOwedShirts();\n }", "public function getScorers()\n\t{\n\t\t$data = array();\n\t\t// get the match scorers\n\t\t$scorer_query = 'SELECT u.username, u.user_id FROM users AS u, scorers AS s '.\n\t\t\t\t\t\t'WHERE s.report_id = '.$this->id.' '.\n\t\t\t\t\t\t'AND s.user_id = u.user_id';\n\t\t$scorer_result = mysql_query($scorer_query)\n\t\t\tor die(mysql_error());\n\t\twhile ($scorer_row = mysql_fetch_array($scorer_result))\n\t\t{\n\t\t\t$data[] = array('id'=>$scorer_row['user_id'],\n\t\t\t\t\t\t\t'name'=>$scorer_row['username']);\n\t\t}\n\t\treturn $data;\n\t}", "public function agents()\n\t{\n\t\t// Get all agents\n\t\t$agents = [];\n\t\tforeach (model(AgentModel::class)->findAll() as $agent)\n\t\t{\n\t\t\t$agents[] = [\n\t\t\t\t'name' => $agent->name,\n\t\t\t\t'uid' => $agent->uid,\n\t\t\t\t'class' => $agent->class,\n\t\t\t\t'icon' => $agent->icon,\n\t\t\t\t'summary' => $agent->summary,\n\t\t\t];\n\t\t}\n\n\t\treturn $this->dataHandler($agents);\n\t}", "function getSharings()\n {\n $sharing = new Sharing();\n\n //$sharing->whereAdd(sprintf('profile_id != %d', common_current_user()->getProfile()->id));\n\n $sharing->orderBy('created DESC');\n\n if(!empty($this->pc)) {\n $sharing->whereAdd(sprintf('(lower(displayName) LIKE \"%%%s%%\" OR lower(summary) LIKE \"%%%s%%\")', strtolower($this->pc), strtolower($this->pc)));\n }\n\n if($this->sharing_category_id != 0) {\n $sharing->whereAdd(sprintf('sharing_category_id = %d', $this->sharing_category_id));\n }\n\n if($this->sharing_city_id != 0) {\n $sharing->whereAdd(sprintf('sharing_city_id = %d', $this->sharing_city_id));\n }\n\n if($this->sharing_type_id != 0) {\n $sharing->whereAdd(sprintf('sharing_type_id = %d', $this->sharing_type_id));\n }\n\n if($this->gratuito == true) {\n $sharing->whereAdd('price = 0');\n }\n\n $offset = ($this->page - 1) * PROFILES_PER_PAGE;\n $limit = PROFILES_PER_PAGE + 1;\n \n $sharing->find();\n\n return $sharing;\n }", "public function index()\n {\n $occupations = Occupation::getAllOccupations();\n return OccupationResource::collection($occupations);\n }", "public function index()\n {\n $agents = AgentProfile::all()->transform(function ($agent) {\n return [\n 'name' => $agent->user->name,\n 'id' => $agent->id\n ];\n });\n\n return response()->json(['success' => true, 'data' => $agents]);\n }", "public static function get_agents( $limit = -1, $offset = 0, $only_agents = false, $objects = true ) {\r\n $limit = intval( $limit );\r\n $offset = intval( $offset );\r\n $cache_key = 'myhome_agents_' . $limit . '_' . $offset . '_';\r\n $cache_key .= $only_agents ? 'agents' : 'all';\r\n if ( $objects ) {\r\n $cache_key .= $cache_key . '_objects';\r\n }\r\n\r\n if ( ! empty( My_Home_Core()->lang ) ) {\r\n $cache_key .= '_' . My_Home_Core()->lang;\r\n }\r\n\r\n if ( false !== ( $agents = get_transient( $cache_key ) ) ) {\r\n return $agents;\r\n }\r\n\r\n $agents = array();\r\n $args = array(\r\n 'fields' => 'all',\r\n 'role__in' => $only_agents ? array( 'agent' ) : array( 'administrator', 'agent' )\r\n );\r\n\r\n if ( $limit ) {\r\n $args['number'] = $limit;\r\n }\r\n\r\n if ( $offset ) {\r\n $args['offset'] = $offset;\r\n }\r\n\r\n $users = get_users( $args );\r\n if ( ! $objects ) {\r\n set_transient( $cache_key, $users, 4 * HOUR_IN_SECONDS );\r\n return $users;\r\n }\r\n\r\n foreach ( $users as $user ) {\r\n array_push( $agents, new My_Home_Agent( $user ) );\r\n }\r\n set_transient( $cache_key, $agents, 4 * HOUR_IN_SECONDS );\r\n\r\n return $agents;\r\n }", "public function getAllStudentHasScholarships(){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_StudentHasScholarshipDAO->getAllStudentHasScholarships();\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in StudentHasScholarshipDAO.getAllStudentHasScholarships()\");\t\t\n\n\t\treturn $Result;\n\t}", "public function getOccupationDetails() {\n $sql = \"SELECT * FROM occupation_tab\";\n $result = $this->db->query($sql);\n if ($result->num_rows() <= 0) {\n return false;\n } else {\n return $result->result_array();\n }\n }", "public function getOccupiedSeats()\n {\n return $this->occupiedSeats;\n }", "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function getAllScholarships(){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_ScholarshipDAO->getAllScholarships();\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in ScholarshipDAO.getAllScholarships()\");\t\t\n\n\t\treturn $Result;\n\t}", "public function showAllAgent(Request $request)\n {\n $agent_specialists = AgentActivation::get();\n foreach($agent_specialists as $key => $agent){\n $agent_specialists[$key]->fullname = $agent->first_name.' '.$agent->last_name;\n }\n if($request->is('api/*')){\n return Response()->json($agent_specialists);\n }\n return view('home.agent_list');\n }", "public function getSplitableHeroes()\n {\n return $this->get(self::_SPLITABLE_HEROES);\n }", "public function index(Request $request)\n {\n if (!$this->isAuthorized) {\n return prepareResult(false, [], [], \"User not authenticate\", $this->unauthorized);\n }\n\n $share_of_assortment_query = ShareOfAssortment::select('id', 'salesman_id', 'customer_id', 'date', 'no_of_sku', 'added_on')\n ->with(\n 'salesman:id,firstname,lastname',\n 'salesman.salesmanInfo:id,user_id,salesman_code',\n 'customer:id,firstname,lastname',\n 'customer.customerInfo:id,user_id,customer_code',\n 'shareOurBrand:id,share_of_assortment_id,brand_id,captured_sku,brand_share',\n 'shareOurBrand.brand:id,brand_name',\n 'shareCompetitor:id,share_of_assortment_id,competitor_info_id,competitor_sku,brand_share',\n 'shareCompetitor.competitorInfo:id,company,item,price,brand,note'\n );\n\n if ($request->date) {\n $share_of_assortment_query->where('created_at', date('Y-m-d', strtotime($request->date)));\n }\n\n if ($request->salesman_name) {\n $name = $request->salesman_name;\n $exploded_name = explode(\" \", $name);\n if (count($exploded_name) < 2) {\n $share_of_assortment_query->whereHas('salesman', function ($q) use ($name) {\n $q->where('firstname', 'like', '%' . $name . '%')\n ->orWhere('lastname', 'like', '%' . $name . '%');\n });\n } else {\n foreach ($exploded_name as $n) {\n $share_of_assortment_query->whereHas('salesman', function ($q) use ($n) {\n $q->where('firstname', 'like', '%' . $n . '%')\n ->orWhere('lastname', 'like', '%' . $n . '%');\n });\n }\n }\n }\n\n if ($request->customer_name) {\n $name = $request->customer_name;\n $exploded_name = explode(\" \", $name);\n if (count($exploded_name) < 2) {\n $share_of_assortment_query->whereHas('customer', function ($q) use ($name) {\n $q->where('firstname', 'like', '%' . $name . '%')\n ->orWhere('lastname', 'like', '%' . $name . '%');\n });\n } else {\n foreach ($exploded_name as $n) {\n $share_of_assortment_query->whereHas('customer', function ($q) use ($n) {\n $q->where('firstname', 'like', '%' . $n . '%')\n ->orWhere('lastname', 'like', '%' . $n . '%');\n });\n }\n }\n }\n\n if ($request->customer_code) {\n $customerCode = $request->customer_code;\n $share_of_assortment_query->whereHas('customer.customerInfo', function ($q) use ($customerCode) {\n $q->where('customer_code', $customerCode);\n });\n }\n\n $share_of_assortment = $share_of_assortment_query->orderBy('id', 'desc')\n ->get();\n\n $share_of_assortment_array = array();\n if (is_object($share_of_assortment)) {\n foreach ($share_of_assortment as $key => $share_of_assortment1) {\n $share_of_assortment_array[] = $share_of_assortment[$key];\n }\n }\n\n $data_array = array();\n $page = (isset($request->page)) ? $request->page : '';\n $limit = (isset($request->page_size)) ? $request->page_size : '';\n $pagination = array();\n if ($page != '' && $limit != '') {\n $offset = ($page - 1) * $limit;\n for ($i = 0; $i < $limit; $i++) {\n if (isset($share_of_assortment_array[$offset])) {\n $data_array[] = $share_of_assortment_array[$offset];\n }\n $offset++;\n }\n\n $pagination['total_pages'] = ceil(count($share_of_assortment_array) / $limit);\n $pagination['current_page'] = (int)$page;\n $pagination['total_records'] = count($share_of_assortment_array);\n } else {\n $data_array = $share_of_assortment_array;\n }\n\n return prepareResult(true, $data_array, [], \"Share assortment listing\", $this->success, $pagination);\n }", "public function endorsements(){\n $friendsList =\n $this->myEndorsed()->get()\n ->merge( $this->endorsedBy()->get() );\n //dd($friendsList);\n return $endorserList;\n }", "public function getAllMentorshipSessions() {\n return $this->mentorshipSessionStorage->getAllMentorshipSessions();\n }", "public function getAllMentorshipSessions() {\n return $this->mentorshipSessionStorage->getAllMentorshipSessions();\n }", "public function getAllAssists(){\n return $this->stats[\"generic\"][\"stats\"][\"general\"][\"assists\"];\n }", "public function getStudents(): array\n {\n \n return $this->students;\n }", "public function getShips(): array {\n\t\tif (is_null($this->ships)) {\n\t\t\t$this->loadShips();\n\t\t}\n\t\treturn $this->ships;\n\t}", "public function all()\n {\n return Guests::all();\n }", "public function sharredUsers( $sensorID)\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/\".$sensorID.\"/users.json\");\n\t\t$data = $data->{'users'};\n\t\t$userArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$userArray->append(new User($data[$i], $this));\n\t\t}\n\t\treturn $userArray;\n }", "public function getStudySummariesList() {\n return $this->_get(18);\n }", "public function index()\n {\n $streamId = request()->query('stream_id', NULL);\n $result = $streamId\n ? SelfAssessmentAreaGroupResource::collection($this->selfAssessmentAreaGroup->findAllByStreamId($streamId))\n : [];\n\n return $this->respondWithSuccess($result);\n }", "public function getSquads()\n {\n $response = $this->callApi(self::REQUEST_GET, '/squads');\n\n if( !$response )\n return array();\n\n $squads = array_map(function($data){\n $squad = new Squad();\n return $squad->exchangeArray($data);\n }, $response);\n\n return $squads;\n }", "public function getStudySummariesList() {\n return $this->_get(13);\n }", "public function getContractorOccupations()\n {\n return $this->hasMany(ContractorOccupation::className(), ['contractor_id' => 'id']);\n }", "public function getAll() {\n\t\t$search = $this->Supplier()->search()\n\t\t\t->setTable($this->_table)\n\t\t\t->setColumns(array(Supplier::SUPPLIER_ID, Supplier::SUPPLIER_NAME, Supplier::SUPPLIER_ADDRESS, Supplier::SUPPLIER_TEL_NO))\n\t\t\t->sortBySupplierCreated('ASC');\n\t\treturn $search->getRows();\n\t}", "public function getStudentRegistrations()\n {\n return $this->hasMany(StudentRegistration::className(), ['courseId' => 'courseId']);\n }", "public function getUserStories()\n {\n $token = \\JWTAuth::getToken();\n $user = \\JWTAuth::toUser($token);\n\n return $this->story->getUserStories($user->id);\n }", "public function index()\n {\n //return Shoe_specific::all();\n $data = Shoe_specific::with(['shoe', 'color', 'size'])->paginate(6);\n return response()->json($data);\n }", "public function getRigs() \n {\n $m = MinerStatistics::where('user_id', auth()->user()->id)\n ->where('created_at','>=', Carbon::now()->subSeconds(90))\n ->get()\n ->groupBy('rigname');\n \n $rigs = (object) [];\n foreach($m as $key => $value) {\n $rigs->$key = $key;\n }\n \n return $rigs;\n }", "public function index(Request $request) {\n\n $agents = Agent::query();\n $name = $request->input('name');\n\n if ($name) {\n $agents->where('first_name', 'like', $name . '%')->orWhere('last_name', 'like', $name . '%');\n }\n\n $user = Auth::user();\n\n if($user->email !== '[email protected]' AND $user->email !== '[email protected]') {\n $agents->whereIn('email', ['[email protected]', '[email protected]', $user->email]);\n }\n\n return [\n 'data' => $agents->get()\n ];\n }", "public function getUserSpreadsheets() {\n\t\treturn $this->findSpreadsheetsByUserId($this->user_id);\n\t}", "public function allupgraders(){\n // SQL statement\n $sql = \"SELECT * FROM user WHERE special = 1 AND (role = 'account' OR role = 'administrator') \";\n $result = $this->con->query($sql);\n\n // check if there is a user\n $count = $result->num_rows;\n if ($count != 0) {\n while ($row = $result->fetch_assoc()){\n $array[] = $row;\n }\n return $array;\n }\n }", "public function getAllStandsOfAllEvents()\n {\n try {\n $allStands = Stand::with('event', 'company')\n ->get()\n ->toArray();\n return $allStands;\n\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n }", "public function get_roster()\n\t\t{\n\t\t\t$retArr = null;\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->find_all();\n\t\t\t \n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t\t\t$basics = $obj->getBasics();\n\t\t\t\t$user = ORM::factory('User_Base',$basics['user']['id']);\n\n\n\t\t\t\t$extra = array(\n\t\t\t\t\t'position_name' => $this->obj->getPositionByUserteamslinkid($obj->id),\n\t\t\t\t\t'sport_name' => $basics['team']['org_sport_link']['sport']['sport_name']\n\t\t\t\t);\n\n\t\t\t\t$retArr[] = array_merge($user->getBasics(),$extra);\n\t\t\t}\n\n\t\t\treturn $retArr;\n\t\t}", "public function getOccupations()\n {\n return $this->hasMany(TaskCategory::className(), ['id' => 'occupation_id'])->viaTable('contractor_occupation', ['contractor_id' => 'id']);\n }", "public function getStudySummariesList() {\n return $this->_get(4);\n }", "public function getFamilyCards()\n {\n $familyCards = FamilyCard::with('village', 'members');\n\n if (auth()->user()->isAn('Administrator')) {\n $familyCards = $familyCards->get();\n } else {\n $familyCards = $familyCards->RW(explode(' ', auth()->user()->position)[2])->get();\n }\n\n return Datatables::of($familyCards)\n ->addColumn('action', function ($family_card) {\n $action = '<a href=\"'. route('family_cards.show', $family_card) .'\" class=\"btn btn-xs btn-success show-this\"><i class=\"fa fa-search-plus\"></i></a>';\n $action .= '<a href=\"'. route('family_cards.edit', $family_card) .'\" class=\"btn btn-xs btn-primary m-l-10\"><i class=\"fa fa-edit\"></i></a>';\n $action .= '<a href=\"'. route('family_cards.destroy', $family_card) .'\" class=\"btn btn-xs btn-primary delete-this m-l-10\"><i class=\"fa fa-remove\"></i></a>';\n return $action;\n })\n ->make(true);\n }", "public function getSupplier()\n {\n $getsupplier = Supplier::all();\n return response()->json($getsupplier);\n }", "public function getAllAmbulancesHome() {\n $sql = \"SELECT * FROM ambulance_tab as o JOIN hospital_tab as t on (o.hosp_id = t.hosp_id)\";\n $result = $this->db->query($sql);\n if ($result->num_rows() <= 0) {\n $response = array(\n 'status' => 500,\n 'status_message' => 'No data found.');\n } else {\n $response = array(\n 'status' => 200,\n 'status_message' => $result->result_array());\n }\n return $response;\n }", "public function loadStudents(){\n $data=$this->studentsInRiskForThis();\n $cantidad=count($data);\n $contador=0;\n foreach($data as $fila){\n IF(Talleresdet::firstOrCreateStatic([\n 'talleres_id'=>$this->id,\n 'codalu'=>$fila['codalu'],\n ], Talleresdet::SCENARIO_BATCH ))\n $contador++; \n }\n return ['total'=>$cantidad,'contador'=>$contador];\n }", "public function findShards()\r\n\t{\r\n\t\t$result = $this -> connection -> setTable($this -> entity)\r\n\t\t\t\t\t\t\t\t\t -> fetch();\r\n\t\treturn $result;\r\n\t}", "public function index()\n {\n $skaters = Skater::all();\n return $skaters;\n }", "public function listsAllergiesGet()\r\n {\r\n $response = Allergies::all(); \r\n return response()->json($response, 200); \r\n }", "public function index()\n {\n $agents = User::where('role_id', 2)->get();\n\n return response()->json(compact('agents'));\n }", "public function getAllStudent(){\n\n\t\treturn array(\n\t\t\t\"1\"=> new Entity_Student(1,\"pham van thao\",23,\"tlu\"),\n\t\t\t\"2\"=> new Entity_Student(2,\"pham van phen\",24,\"tlu\"),\n\t\t\t\"3\"=> new Entity_Student(3,\"pham van to\",25\"tlu\"),\n\t\t\t\"4\"=> new Entity_Student(4,\"pham van\",26,\"tlu\"),\n\n\t\t);\n\t}", "function getUsers() {\r\n\t\t$users = new \\Nette\\Utils\\ArrayHash;\r\n\t\tforeach ($this->races as $race) {\r\n\t\t\tforeach ($race->getUsers() as $user) {\r\n\t\t\t\tif (!$users->offsetExists($user->getId()))\r\n\t\t\t\t\t$users->offsetSet($user->getId(), $user);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $users;\r\n\t}", "public function index(Request $request)\n {\n $raids = Auth::user()\n ->raids()\n ->withLocations();\n\n if ($request->has('show_date'))\n {\n $date = Carbon::parse($request->input('show_date'));\n $raids->where('start_date', '<=', $date->format('Y-m-d'))\n ->where('end_date', '>=', $date->format('Y-m-d'));\n }\n\n $raids = $raids->latest()->get();\n\n return $raids ? $raids : [];\n }", "protected function getAllUsers() {\n\t\t\t$query = \"SELECT username, f_name, l_name, phone, email FROM Stomper\";\n\t\t\treturn $this->EndpointResponse($query, true);\n\t\t}", "public function scan()\r\n {\r\n $result = array(\"wormholes\" => array(), \"asteroids\" => array());\r\n // asteroids first.\r\n foreach ($this->asteroids as $asteroid) {\r\n // if the asteroid is within scanning range of the ship....\r\n if (abs($asteroid->getX() - $this->spaceShip->getX()) < $this->asteroidScanningRange &&\r\n abs($asteroid->getY() - $this->spaceShip->getY()) < $this->asteroidScanningRange &&\r\n abs($asteroid->getZ() - $this->spaceShip->getZ()) < $this->asteroidScanningRange) {\r\n // then add it's details to the result\r\n $result['asteroids'][] = array(\r\n // we don't give absolute positions of asteroids, only their location relative to the ship\r\n 'x' => $asteroid->getX() - $this->spaceShip->getX(),\r\n 'y' => $asteroid->getY() - $this->spaceShip->getY(),\r\n 'z' => $asteroid->getZ() - $this->spaceShip->getZ(),\r\n 'dx' => $asteroid->getDx(),\r\n 'dy' => $asteroid->getDY(),\r\n 'dz' => $asteroid->getDz()\r\n );\r\n }\r\n }\r\n // now do the same for the wormholes...\r\n // for wormholes we only return the nearest end, and then the SHA1 of the furthest end\r\n // the navigator will have to figure out what the input of the SHA1 was. If you've actually\r\n // bothered to read these comments, please be assured that there is a better way to do it\r\n // then to brute force them.\r\n foreach ($this->wormholes as $wormhole) {\r\n // we'll do pythagorean distance\r\n // first for end1\r\n $diffX = abs($wormhole->getX1() - $this->spaceShip->getX());\r\n $diffY = abs($wormhole->getY1() - $this->spaceShip->getY());\r\n $diffZ = abs($wormhole->getZ1() - $this->spaceShip->getZ());\r\n $diffXY = sqrt(($diffX * $diffX) + ($diffY * $diffY));\r\n $diffXYZ1 = sqrt(($diffZ * $diffZ) + ($diffXY * $diffXY));\r\n // then for end2\r\n $diffX = abs($wormhole->getX2() - $this->spaceShip->getX());\r\n $diffY = abs($wormhole->getY2() - $this->spaceShip->getY());\r\n $diffZ = abs($wormhole->getZ2() - $this->spaceShip->getZ());\r\n $diffXY = sqrt(($diffX * $diffX) + ($diffY * $diffY));\r\n $diffXYZ2 = sqrt(($diffZ * $diffZ) + ($diffXY * $diffXY));\r\n // now show them the details for the nearest end, and let them figure out the further one...\r\n if ($diffXYZ1 < $diffXYZ2) {\r\n $result['wormholes'][] = array(\r\n 'x' => $wormhole->getX1(),\r\n 'y' => $wormhole->getY1(),\r\n 'z' => $wormhole->getZ1(),\r\n 'destination' => sha1($wormhole->getX2() . ',' . $wormhole->getY2() . ',' . $wormhole->getZ2())\r\n );\r\n } else {\r\n $result['wormholes'][] = array(\r\n 'x' => $wormhole->getX2(),\r\n 'y' => $wormhole->getY2(),\r\n 'z' => $wormhole->getZ2(),\r\n 'destination' => sha1($wormhole->getX1() . ',' . $wormhole->getY1() . ',' . $wormhole->getZ1())\r\n );\r\n }\r\n }\r\n return $result;\r\n }", "public function index()\n {\n $sch = SchoolPolicy::all();\n\n return response()->json($sch->toArray());\n }", "public function index()\n {\n $user = SiwesCordinator::Where('institution_id',auth()->user()->institution[0]->id)->latest()->get();\n return $this->showAll(SiwesCordinatorResource::collection($user));\n }", "public function getStudentsByClass() {\n\t\t$students_by_class = Student::GetInstance()->getStudentsByClass( $_POST['class_id'] );\n\n\t\treturn jsonResult( $students_by_class );\n\n\t}", "public function getAllActiveMentorshipSessions() {\n return $this->mentorshipSessionStorage->getAllActiveMentorshipSessions();\n }", "public function getAllActiveMentorshipSessions() {\n return $this->mentorshipSessionStorage->getAllActiveMentorshipSessions();\n }", "public function getSquad()\n\t{\n\t\t$data = array();\n\t\tif(empty($this->match_id))\n\t\t\treturn $data;\n\t\t//Get the names of the squad\n\t\t$squad_query = 'SELECT u.username, u.user_id FROM playedmatch_user AS p, users AS u '.\n\t\t\t\t\t\t'WHERE p.match_id = '.$this->match_id.' '.\n\t\t\t\t\t\t'AND p.user_id = u.user_id '.\n\t\t\t\t\t\t'ORDER BY u.username';\n\t\t$squad_result = mysql_query($squad_query)\n\t\t\tor die(mysql_error());\n\t\twhile ($squad_row = mysql_fetch_array($squad_result))\n\t\t{\n\t\t\t$data[] = array('link'=>'viewprofile.php?action=view&amp;uid='.$squad_row['user_id'],\n\t\t\t\t\t\t\t'name'=>$squad_row['username'],\n\t\t\t\t\t\t\t'id'=>$squad_row['user_id']);\n\t\t}\n\t\treturn $data;\n\t}", "public function index(Request $request): AnonymousResourceCollection\n {\n $result = $this->service->index($request->all());\n\n return SuperheroesResource::collection($result);\n }", "public function index()\n {\n $supermasters = SuperMaster::paginate(10);\n return $this->response->paginator($supermasters,new SuperMasterTransformer());\n }", "public function fetchGarden()\n {\n $garden = Garden::where('idOwner', 10)->get();\n\n return response(['jardins' => $garden], 200);\n }", "public function getCoordinatorAccounts() {\n $this->select->reset();\n $select = $this->select\n ->setIntegrityCheck(false)\n ->from(array('s' => 'staff'), array('id', 'first_name', 'last_name'))\n ->join(array('u' => 'user'), 's.id = u.staff_id', array('permission_level'))\n ->where('permission_level = ' . Application_Model_User::USER_COORDINATOR);\n return $this->fetchAll($select);\n }", "public function index()\n {\n $agents = Agent::with('supplier')->get();\n\n return view('agent.index')->with([\n 'agents' => $agents,\n ]);\n }", "public function freeStudents(){\n return Talleresdet::find()->where(['talleres_id'=>$this->id])->\n andWhere(['codtra' => null]) \n ->all();\n \n }", "public function byUser()\n {\n # code...\n $garages = Garage::with('state', 'images', 'tags')->where('user_id', auth()->user()->id)->orderBy('id', 'desc')->get();\n return response()->json($garages, 200);\n }", "function getFormattedScorers()\n\t{\n\t\t$data = array();\n\t\t// get the match scorers\n\t\t$scorer_query = 'SELECT u.username, u.user_id FROM users AS u, scorers AS s '.\n\t\t\t\t\t\t'WHERE s.report_id = '.$this->id.' '.\n\t\t\t\t\t\t'AND s.user_id = u.user_id';\n\t\t$scorer_result = mysql_query($scorer_query)\n\t\t\tor die(mysql_error());\n\t\tif (mysql_num_rows($scorer_result) != 0)\n\t\t{\n\t\t\twhile ($scorer_row = mysql_fetch_array($scorer_result))\n\t\t\t{\n\t\t\t\t$scorer[] = $scorer_row['username'];\n\t\t\t\t$scorerid[] = $scorer_row['user_id'];\n\t\t\t}\n\t\t\t\n\t\t\t$scorername = array_unique($scorer);\n\t\t\t$scorername = array_values($scorername);\n\t\t\t$scorernameid = array_unique($scorerid);\n\t\t\t$scorernameid = array_values($scorernameid);\n\t\t\t\n\t\t\t// Works out how many goals each person scored.\n\t\t\t// This could be done by SQL, but it's fine in PHP\n\t\t\t$goals = array();\n\t\t\tfor ($r=0; $r<sizeof($scorername);$r++)\n\t\t\t{\n\t\t\t\tfor ($s=0; $s<sizeof($scorer); $s++)\n\t\t\t\t{\n\t\t\t\t\tif ($scorer[$s] == $scorername[$r])\n\t\t\t\t\t{\n\t\t\t\t\t\t$goals[$r]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// print out nicely.\n\t\t\tfor ($t=0;$t<sizeof($scorername);$t++)\n\t\t\t{\n\t\t\t\t$g = '';\n\t\t\t\tif ($goals[$t] >1)\n\t\t\t\t{\n\t\t\t\t\t$g = ' ('.$goals[$t].')';\n\t\t\t\t}\n\t\t\t\t$data[] = array('link'=>'viewprofile.php?action=view&amp;uid='.$scorernameid[$t],\n\t\t\t\t\t\t\t\t'name'=>$scorername[$t].$g);\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "function get_all_genders()\n\t\t{\n\t\t\t$query=\"SELECT * from tbl_gender\";\n\t\t\t$result = execute_query($query);\n\t\t\treturn new readonlyresultset($result);\n\t\t}", "public function users()\n {\n $users = User::with([\n 'socialAccounts', 'contacts', 'academic', 'companies', 'graduates.academic',\n 'responses', 'achievement.rank', 'rewards', 'preference'\n ])->get();\n\n return response()->json(compact('users'));\n }", "public function getStudents()\n {\n return $this->hasMany(Student::className(), ['student_previous_qualification_id' => 'previousqualification_id']);\n }", "public function get_students_list(){\n return $this->n->get_list_from_db();\n }", "function getAwards()\n {\n $awards = $this->all('schema:awards');\n return $awards;\n }", "public function all_supplier()\n {\n $suppliers = Supplier::all();\n return view('adminpages.supplier.all-supplier', compact('suppliers'));\n }", "public function index()\n {\n $organizations = $this->organization->get();\n $nationalOffices = $this->nationalOffice->get();\n $districtOffices = $this->districtOffice->get();\n $churches = $this->church->get();\n\n return response()->json([\n 'organizations' => $organizations,\n 'district_offices' => $districtOffices,\n 'national_offices' => $nationalOffices,\n 'churches' => $churches\n ]);\n }", "public function getIndex()\n {\n $vacancies = Scholarship::all();\n return response()->success($vacancies);\n }", "public function getAllSbus()\n {\n $sbus = sbu::get(['id']);\n\n return $sbus;\n }", "public function getElevatedStorys(){\n\t\t$currentDate = Carbon::now();\n\t\tif(\\Auth::check()){\n\n\t\t\t$user = \\Auth::user();\n\t\t\tif($user->hasRole('contributor_1')){\n\t\t\t\treturn $this->setStatusCode(401)->respondWithError('You do not have sufficient privileges to see elevated stories.');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$stories = Story::where([['priority', '>', 0]])->orderBy('priority', 'desc')->get();\n\t\t\t}\n\n\t\t\t$fractal = new Manager();\n\t\t\t$resource = new Fractal\\Resource\\Collection($stories->all(), new FractalStoryTransformerModel);\n\t\t\t// Turn all of that into a Array string\n\t\t\treturn $fractal->createData($resource)->toArray();\n\n\t\t}\n\t\telse{\n\t\t\treturn $this->setStatusCode(501)->respondWithError('Error');\n\t\t}\n\t}", "public static function getSeniorStaff(){\n $senior = YumUser::model()->findAll('id IN (1,8,11)');\n return CHtml::listData($senior, 'id', 'username');\n }", "public function indexAction()\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $specialists = $em->getRepository('AppBundle:Specialist')->findByUser($this->getUser()->getId());\n\n\n $specialists = $this->get('jms_serializer')->serialize($specialists, 'json', SerializationContext::create()->setGroups(array('specialist_index')));\n\n return new Response($specialists);\n\n }", "public function index()\n {\n $speciality = Speciality::All();\n return SpecialityResource::collection($speciality);\n }", "public function userIndex()\n {\n return Serie::with([\n 'genre1',\n 'genre2'\n ])->ownedBy(auth()->user()->id)\n ->get();\n }", "public function getAllStations(){\n return $this->stationRequest->getAllStations();\n }", "public function getFamilyObjects()\n {\n $familyObjects = [];\n\n foreach ($this->families as $code => $family) {\n $familyObject = new Family();\n\n $familyObject->setCode($code);\n\n $familyObjects[] = $familyObject;\n }\n\n return $familyObjects;\n }", "private function getGriidcStaff(): array\n {\n $entityManager = $this->getDoctrine()->getManager();\n //get user Ids of Griidc Staff to exclude from the report with personDataRepository roles of:\n //Manager (1), Developer (2), Support (3), Subject Matter Expert (4)\n $griidcUserQueryString = 'SELECT account.userId FROM ' . PersonDataRepository::class .\n ' personDataRepository JOIN ' . Person::class .\n ' person WITH person.id = personDataRepository.person JOIN ' . Account::class .\n ' account WITH account.person = person.id WHERE personDataRepository.role in (1, 2, 3, 4) ';\n $griidcUserResult = $entityManager->createQuery($griidcUserQueryString)->getScalarResult();\n return array_column($griidcUserResult, 'userId');\n }", "public function get_guardians_by_name() {\n $users = array();\n\n $role_id = gr_get_role_id('guardian');\n\n if( isset($this->request->name) && !empty($this->request->name) ) {\n $users = User::select(DB::raw('user_id AS id, CONCAT(display_name, \" - \", email) AS title'))\n ->where('franchise_id', $this->franchise_id)\n ->where('user_role', $role_id)\n ->where(function($q){\n $q->where('first_name', 'like', '%' . $this->request->name . '%')\n ->orWhere('last_name', 'like', '%' . $this->request->name . '%');\n })\n ->get();\n }\n\n return response()->json($users, 200);\n }", "public function getSupplierData(){\n\n\t\t$supperDataSQL = \"select * FROM\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tSELECT *,\n\t\t\t\t\t\t\t(SELECT COUNT(inward_id) FROM inward AS inw WHERE inw.legal_entity_id=l.legal_entity_id) AS 'TotalGRN'\n\t\t\t\t\t\t\tFROM legal_entities AS l\n\t\t\t\t\t\t\tWHERE legal_entity_type_id='1002' AND is_posted=0\n\t\t\t\t\t\t) AS innertbl WHERE TotalGRN>0\";\n\n\t\t$supperData = DB::select(DB::raw($supperDataSQL));\n\n\t\t/*$supperData = DB::table('legal_entities_live')\n\t\t\t\t\t->where(\"legal_entity_type_id\",\"=\",\"1002\")\n\t\t\t\t\t->where('is_posted', '=', '0')\n\t\t\t\t\t->get();*/\n\n\t\treturn $supperData;\n\n\t}", "public function getSubawards(){\n\t\t$connection = Database::getConnection();\n\t\t$query = \"SELECT * FROM watson WHERE status!='Award -- Terminated' and shortAwardNumber!='' ORDER BY shortAwardNumber\";\n\t\t$items=\"\";\n\t\t$result_obj=$connection->query($query);\n\t\ttry{\n\t\t\twhile($result = $result_obj->fetch_array(MYSQLI_ASSOC)){\n\t\t\t\t$items[]=$result;\n\t\t\t}\n\t\t\treturn($items);\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\treturn false;\n\t\t}\n\t}", "public function getSmiles() {\n\t\treturn $this->smiles;\n\t}", "public function studentsListing() {\n \t$students = Student::all();\n \tif(count($students) > 0) {\n \t\treturn response() -> json([\"status\" => $this->status, \"success\" => true, \"count\" => count($students), \"data\" => $students]);\n \t}\n \telse {\n \t\treturn response()->json([\"status\" => \"failed\", \"success\" => false, \"message\" => \"Whoops! no record found\"]);\n \t}\n }", "public function index()\n {\n // Get suppliers\n $suppliers = Supplier::latest()->paginate(5);\n\n // Return suppliers\n return SupplierResource::collection($suppliers);\n }", "public function actionGetAll()\n {\n return $this->sortByParams($this->starships, $this->params);\n }", "public function getHomes($player) {\n return $this->homes->get($player);\n }", "public function getSummariesList() {\n return $this->_get(1);\n }", "public function getSummariesList() {\n return $this->_get(1);\n }", "public function getSummariesList() {\n return $this->_get(1);\n }", "public function index()\n {\n $suppliers = Supplier::all();\n\n return $this->success(null, $suppliers);\n }", "public function index() {\n $datas = GuestSchool::all();\n return view('backend.register.school.list', ['datas' => $datas]);\n }", "public function indexAction(){\n $em = $this->getDoctrine()->getManager();\n\n $sessions = $em->getRepository('AssignmentBundle:Session')->findAll();\n\n if(!empty($sessions)) {\n\n //Format the result\n $output = array();\n foreach ($sessions as $session) {\n $output[$session->getid()]['start_at'] = $session->getStartAt();\n $output[$session->getid()]['end_at'] = $session->getEndAt();\n $output[$session->getid()]['operating_room'] = $session->getOperationTheater()->getName();\n\n if (null !== $session->getUsers()) {\n $i = 0;\n foreach ($session->getUsers() as $user) {\n $userGroups = $user->getGroups();\n foreach ($userGroups as $userGroup) {\n if ($userGroup->getGroup() == \"Specialist\") {\n $i++;\n $output[$session->getid()]['specialist'][$i] = $user->getName();\n } else {\n $output[$session->getid()]['anesthetists'] = $user->getName();\n }\n }\n }\n }\n }\n return new JsonResponse(array(\n 'success' => true,\n 'sessions' => $output,\n ));\n\n }else{\n return new JsonResponse(array(\n 'success' => false,\n 'message' => 'No records found',\n ));\n }\n }", "public function ajax_index()\n {\n $guardians = Guardian::oldest()->get();\n $response = array(\n 'status' => 'success',\n 'guardians' => $guardians\n ) ;\n return response()->json($response, 200);\n }" ]
[ "0.48722792", "0.46658", "0.46150953", "0.45550534", "0.45131707", "0.44591275", "0.44442242", "0.44346818", "0.44301885", "0.43728068", "0.4333932", "0.4326525", "0.43250144", "0.43225452", "0.4315065", "0.4313812", "0.43009678", "0.42977285", "0.42977285", "0.42892334", "0.42838475", "0.42832598", "0.42756048", "0.42733768", "0.4265035", "0.42623547", "0.4260171", "0.42300814", "0.42300308", "0.42133766", "0.4193425", "0.41918522", "0.4187348", "0.41770452", "0.41702804", "0.41629368", "0.41399285", "0.41341567", "0.41336122", "0.4124261", "0.41134977", "0.41121727", "0.41018194", "0.4100969", "0.41004512", "0.40994442", "0.40946913", "0.4081623", "0.4079558", "0.407063", "0.40551537", "0.40538967", "0.40377682", "0.40289468", "0.4025269", "0.4017121", "0.40055937", "0.39947894", "0.39947894", "0.39874145", "0.39792037", "0.39726722", "0.39634776", "0.39632672", "0.39632502", "0.39535716", "0.39512265", "0.39510006", "0.39496848", "0.39446324", "0.39399853", "0.39368722", "0.39314616", "0.39307603", "0.3927269", "0.3919487", "0.39186922", "0.39180115", "0.3912153", "0.3901822", "0.390135", "0.38937196", "0.38934067", "0.3890384", "0.38871133", "0.38844258", "0.38815564", "0.38773742", "0.38762674", "0.38744497", "0.38689533", "0.38686973", "0.38670555", "0.38660562", "0.38660562", "0.38660562", "0.3864416", "0.38643447", "0.38622835", "0.38605407" ]
0.79673994
0
Method tests insertBasicFields method
public function testInsertBasicFields(): void { // setup $connection = new PdoCrudMock(); $model = new CrudServiceModel(); $model->setConnection($connection); // test body $result = $model->insertBasicFields([ 'title' => 'title' ]); // assertions $this->assertTrue(isset($result['id']), 'Invalid record was returned'); $this->assertTrue(isset($result['title']), 'Invalid record was returned'); $this->assertEquals(1, $connection->executeWasCalledCounter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAddFields()\n\t{\n\t\t$entity = new Entity;\n\n\t\t$entity->addFields($this->getTestFields());\n\n\t\t$entity->bind($this->getTestData());\n\n\t\t$this->assertNull($entity->params);\n\t\t$this->assertEquals('Sakura', $entity->title);\n\t}", "public function insertTest()\n {\n $this->assertEquals(true, $this->object->insert('Ali','Khan',22,'A'));\n }", "public function testEInsert()\n {\n $this->db->extendedInsert(\"test\", [\n 'id',\n 'name'\n ], [\n [\n 1,\n 'Ed'\n ],\n [\n 2,\n 'Frank'\n ]\n ]);\n $this->assertEquals(\"INSERT INTO test (`id`,`name`) VALUES ('1','Ed'),('2','Frank')\", (string) $this->db);\n }", "public function insert(...$field_values);", "public function testInsert()\n {\n // todo create this in other database or maybe create mockup\n \n /*\n $arr = array (\n 'head' => 'Hello World!!',\n 'body' => 'Hello this is my world..',\n 'created' => date('Y-m-d H:i:s')\n );\n\n $this->noteTable->insert($arr);\n */\n }", "public function testInsertField()\n {\n $remoteDataFolder = self::$baseRemoteFolderPath . \"/DocumentElements/Fields\";\n $textFolder = \"DocumentElements/Text\";\n $localFileName = \"SampleWordDocument.docx\";\n $remoteFileName = \"TestInsertField.docx\";\n\n $this->uploadFile(\n realpath(__DIR__ . '/../../..') . \"/TestData/\" . $textFolder . \"/\" . $localFileName,\n $remoteDataFolder . \"/\" . $remoteFileName\n );\n\n $requestField = new FieldInsert(array(\n \"field_code\" => \"{ NUMPAGES }\",\n ));\n $request = new InsertFieldRequest(\n $remoteFileName,\n $requestField,\n \"sections/0/paragraphs/0\",\n $remoteDataFolder,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL\n );\n\n $result = $this->words->insertField($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.1\", $result->getField()->getNodeId());\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n Model::insert([\n ['id' => 1, 'name' => 'foo', 'value' => 's:6:\"foobar\";'],\n ['id' => 2, 'name' => 'hello', 'value' => 's:5:\"world\";'],\n ]);\n }", "abstract protected function createFields();", "public function testCreateWithAllFields(): void\n {\n $this->doTestCreate('createWithAllFields.json');\n }", "public function testRegistrationExtraFields(): void { }", "public abstract function createFields();", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function testAddField()\n\t{\n\t\t$this->instance->addField('user');\n\n\t\t$this->instance->bind($this->getTestData());\n\n\t\t$this->assertEquals(255, $this->instance->user);\n\t}", "function insertNewField($inserttable, $name, $optional, $type, $tablename, $minimum, $maximum, $ordering){\r\n\r\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n try{\r\n $sql = $this->db->prepare(\"INSERT INTO $inserttable (displayname, inputtype, mandatory, tablename, minimum, maximum, ordering)\r\n VALUES(:name, :type, :optional, :tablename, :minimum, :maximum, :ordering)\");\r\n\r\n $sql->bindParam(':name', $name, PDO::PARAM_STR);\r\n $sql->bindParam(':type', $type, PDO::PARAM_STR);\r\n $sql->bindParam(':optional', $optional, PDO::PARAM_INT);\r\n $sql->bindParam(':tablename', $tablename, PDO::PARAM_STR);\r\n $sql->bindParam(':minimum', $minimum, PDO::PARAM_INT);\r\n $sql->bindParam(':maximum', $maximum, PDO::PARAM_INT);\r\n $sql->bindParam(':ordering', $ordering, PDO::PARAM_INT);\r\n if($sql->execute()){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n\r\n\r\n } catch(PDOExecption $e) {\r\n echo $e->getMessage();\r\n }\r\n\r\n }", "public function setUp()\n {\n foreach ($this->data as $row) {\n $this->table->insert($row);\n }\n\n parent::setUp();\n\n }", "protected function _insert()\n\t{\n\t}", "function test_insert_bulk($urabe, $body)\n{\n $bulk = $body->insert_bulk;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->insert_bulk($table_name, $bulk->columns, $bulk->values);\n}", "public function testInsert(): void\n {\n $this->_insert();\n $query = $this->connection->selectQuery('id', 'ordered_uuid_items')\n ->orderBy('id')\n ->setDefaultTypes(['id' => 'ordered_uuid']);\n\n $query->setSelectTypeMap($query->getTypeMap());\n $results = $query->execute()->fetchAll('assoc');\n\n $this->assertEquals(new UuidValue('419a8da0482b7756b21f27da40cf8569'), $results[0]['id']);\n $this->assertEquals(new UuidValue('43e0b920481fc6d0a40d6d1740cf8569'), $results[1]['id']);\n $this->assertEquals(new UuidValue('4c2681c048298a29a7fb413140cf8569'), $results[2]['id']);\n }", "public function insert_13fields($tablename, $fieldname, $fieldvalue, $fieldname1, $fieldvalue1, $fieldname2, $fieldvalue2, $fieldname3, $fieldvalue3, $fieldname4, $fieldvalue4, $fieldname5, $fieldvalue5, $fieldname6, $fieldvalue6, $fieldname7, $fieldvalue7, $fieldname8, $fieldvalue8, $fieldname9, $fieldvalue9, $fieldname10, $fieldvalue10, $fieldname11, $fieldvalue11, $fieldname12, $fieldvalue12){\n\n $mysqli = $this->connect();\n\n $sql = \"INSERT INTO {$tablename} SET {$fieldname}=:fieldvalue, {$fieldname1}=:fieldvalue1, {$fieldname2}=:fieldvalue2, {$fieldname3}=:fieldvalue3, {$fieldname4}=:fieldvalue4, {$fieldname5}=:fieldvalue5, {$fieldname6}=:fieldvalue6, {$fieldname7}=:fieldvalue7, {$fieldname8}=:fieldvalue8, {$fieldname9}=:fieldvalue9, {$fieldname10}=:fieldvalue10, {$fieldname11}=:fieldvalue11, {$fieldname12}=:fieldvalue12\";\n\n $stmt = $mysqli->prepare($sql);\n\n if($stmt->execute([':fieldvalue'=>$fieldvalue, ':fieldvalue1'=>$fieldvalue1, ':fieldvalue2'=>$fieldvalue2, ':fieldvalue3'=>$fieldvalue3, ':fieldvalue4'=>$fieldvalue4, ':fieldvalue5'=>$fieldvalue5, ':fieldvalue6'=>$fieldvalue6, ':fieldvalue7'=>$fieldvalue7, ':fieldvalue8'=>$fieldvalue8, ':fieldvalue9'=>$fieldvalue9, ':fieldvalue10'=>$fieldvalue10, ':fieldvalue11'=>$fieldvalue11, ':fieldvalue12'=>$fieldvalue12])){\n \n return \"Insertion Made\";\n //array('action'=>'Success', 'counting'=>1);\n } else {\n return $failed=\"failed: \" . $mysqli->error;\n \n //array('action'=>'Success', 'counting'=>0);\n }\n\n}", "public function testInserting() {\n $this->getConnection()->getConnection()->exec(\"INSERT INTO `owners` (`name`, `email`) VALUES ('Donald Trump', '[email protected]');\");\n }", "public function insert($table, array $fields);", "public function testMergeMassViaInsertBefore()\n {\n $this->generateAndCompareTest('MergeMassViaInsertBefore');\n }", "public function testInsert()\n {\n $this->assertDatabaseCount(\"animals\", 100000);\n }", "function test_insert($urabe, $body)\n{\n $insert_params = $body->insert_params;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->insert($table_name, $insert_params);\n}", "public function testInsertToDb() {\n $dbhelper = new DbHelper();\n\n $username = \"Matt\";\n $password = \"MattPassword\";\n $email = \"matt@matt\";\n\n $user = new User($username, $password, $email);\n\n $dbhelper->insertToDb($user);\n }", "public function testInsertStmt()\n {\n $insert = $this->getConnection()\n ->insert()\n ('dummy_posts')\n (['blog_id', 'blog_title'])\n ([':id', ':title']);\n return $this->assertEquals($insert, \"INSERT INTO dummy_posts(blog_id, blog_title) VALUES (:id, :title)\");\n }", "function insertTest()\n {\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n }", "public function testInsert()\n {\n $statement = $this->getQueryBuilderConnection()\n ->insert()\n ->into('querybuilder_tests')\n ->values(\n [\n 'id' => 10,\n 'languageId' => 1,\n 'field' => 'zzzz',\n ]\n )->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(1, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(11, $result);\n\n $statement = $this->getQueryBuilderConnection()\n ->insert(\n [\n 'id' => 11,\n 'languageId' => 1,\n 'field' => 'yyyy',\n ]\n )\n ->into('querybuilder_tests')\n ->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(1, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(12, $result);\n }", "public function setUp() {\n\t\t$this->getConnection();\n\t\tforeach($this->fixtureData() as $row) {\n\t\t\t$record = new ExampleSolrActiveRecord();\n\t\t\tforeach($row as $attribute => $value) {\n\t\t\t\t$record->{$attribute} = $value;\n\t\t\t}\n\t\t\t$this->assertTrue($record->save());\n\t\t}\n\t}", "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}", "public function testInsertMulti()\n {\n $data = static::articleData();\n\n $result = Hash::insert($data, '{n}.Article.insert', 'value');\n $this->assertEquals('value', $result[0]['Article']['insert']);\n $this->assertEquals('value', $result[1]['Article']['insert']);\n\n $result = Hash::insert($data, '{n}.Comment.{n}.insert', 'value');\n $this->assertEquals('value', $result[0]['Comment'][0]['insert']);\n $this->assertEquals('value', $result[0]['Comment'][1]['insert']);\n\n $data = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 1 => ['Item' => ['id' => 2, 'title' => 'second']],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 3 => ['Item' => ['id' => 4, 'title' => 'fourth']],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n $result = Hash::insert($data, '{n}.Item[id=/\\b2|\\b4/]', ['test' => 2]);\n $expected = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 1 => ['Item' => ['id' => 2, 'title' => 'second', 'test' => 2]],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 3 => ['Item' => ['id' => 4, 'title' => 'fourth', 'test' => 2]],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n $this->assertEquals($expected, $result);\n\n $data[3]['testable'] = true;\n $result = Hash::insert($data, '{n}[testable].Item[id=/\\b2|\\b4/].test', 2);\n $expected = [\n 0 => ['Item' => ['id' => 1, 'title' => 'first']],\n 1 => ['Item' => ['id' => 2, 'title' => 'second']],\n 2 => ['Item' => ['id' => 3, 'title' => 'third']],\n 3 => ['Item' => ['id' => 4, 'title' => 'fourth', 'test' => 2], 'testable' => true],\n 4 => ['Item' => ['id' => 5, 'title' => 'fifth']],\n ];\n $this->assertEquals($expected, $result);\n }", "public function Do_insert_Example1(){\n\n\t}", "public function testInsertAndUpdateNothing()\n {\n // return empty api result (loadByNationality)\n $apiProvider = $this->tester->getApiProvider(true);\n\n $importer = new \\App\\Service\\CustomersImporter(\n $apiProvider,\n $this->denormalizer,\n $this->repository\n );\n\n $this->assertEquals(\n [\n 'inserted' => 0,\n 'updated' => 0,\n ],\n $importer->import()\n );\n }", "public function setUp() {\n global $CFG, $DB;\n\n $this->resetAfterTest(true);\n $CFG->registerauth = 'email';\n\n $categoryid = $DB->insert_record('user_info_category', array('name' => 'Cat 1', 'sortorder' => 1));\n $this->field1 = $DB->insert_record('user_info_field', array(\n 'shortname' => 'frogname', 'name' => 'Name of frog', 'categoryid' => $categoryid,\n 'datatype' => 'text', 'signup' => 1, 'visible' => 1, 'required' => 1, 'sortorder' => 1));\n $this->field2 = $DB->insert_record('user_info_field', array(\n 'shortname' => 'sometext', 'name' => 'Some text in textarea', 'categoryid' => $categoryid,\n 'datatype' => 'textarea', 'signup' => 1, 'visible' => 1, 'required' => 1, 'sortorder' => 2));\n }", "function testAllowSimulatedFields() {\n\t\t$TestModel =& new ValidationTest();\n\n\t\t$TestModel->create(array('title' => 'foo', 'bar' => 'baz'));\n\t\t$expected = array('ValidationTest' => array('title' => 'foo', 'bar' => 'baz'));\n\t\t$this->assertEqual($TestModel->data, $expected);\n\t}", "public function testInsertExisting()\r\n\t{\r\n\t\t$index = Index::model()->findByAttributes(array(\r\n\t\t\t'INDEX_NAME' => 'index',\r\n\t\t\t'TABLE_NAME' => 'table2',\r\n\t\t\t'TABLE_SCHEMA' => 'indextest',\r\n\t\t));\r\n\t\t$index->insert();\r\n\t}", "public function testInsertValidAdult() : void {\n// count the number of rows and save it for later\n$numRows = $this->getConnection()->getRowCount(\"adult\");\n\n$adultId = generateUuidV4();\n\n$adult = new Adult($adultId, $this->VALID_ACTIVATION, $this->VALID_AVATAR_URL, $this->VALID_CLOUDINARY_TOKEN, $this->VALID_EMAIL, $this->VALID_HASH, $this->VALID_NAME, $this->VALID_USERNAME);\n$adult->insert($this->getPDO());\n\n// grab the data from mySQL and enforce the fields match our expectations\n$pdoAdult = Adult::getAdultByAdultId($this->getPDO(), $adult->getAdultId());\n$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"adult\"));\n$this->assertEquals($pdoAdult->getAdultId(), $adultId);\n$this->assertEquals($pdoAdult->getAdultActivationToken(), $this->VALID_ACTIVATION);\n$this->assertEquals($pdoAdult->getAdultAvatarUrl(), $this->VALID_AVATAR_URL);\n$this->assertEquals($pdoAdult->getAdultCloudinaryToken(), $this->VALID_CLOUDINARY_TOKEN);\n$this->assertEquals($pdoAdult->getAdultEmail(), $this->VALID_EMAIL);\n$this->assertEquals($pdoAdult->getAdultHash(), $this->VALID_HASH);\n$this->assertEquals($pdoAdult->getAdultName(), $this->VALID_NAME);\n$this->assertEquals($pdoAdult->getAdultUsername(), $this->VALID_USERNAME);\n}", "public function testInsertFieldOnline()\n {\n $fieldFolder = \"DocumentElements/Fields\";\n\n $requestDocument = realpath(__DIR__ . '/../../..') . '/TestData/' . $fieldFolder . \"/GetField.docx\";\n $requestField = new FieldInsert(array(\n \"field_code\" => \"{ NUMPAGES }\",\n ));\n $request = new InsertFieldOnlineRequest(\n $requestDocument,\n $requestField,\n \"sections/0/paragraphs/0\",\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL\n );\n\n $result = $this->words->insertFieldOnline($request);\n Assert::assertTrue($result !== NULL);\n }", "public static function insert()\n {\n }", "abstract public function insert();", "function addFields($entity, $name, $not_for_field_list = \"\")\n{\n $fields = array();\n $page_info = getPageInfo($entity['pagename']);\n global $db;\n \n $link = getDBLink();\n \n //do we know where to look at all?\n if ($name == \"\") {\n $entity['fields'] = array();\n return $entity;\n }\n \n // -- first, we see what we find in the database's metadata\n \n //test for Information_schema.columns (SQL-92 standard)\n $client_api = explode('.', mysqli_get_server_info(getDBLink()));\n if ($client_api[0] >= 5) {\n //test for existence of/access to INFORMATION_SCHEMA database\n $info_schema_accessible = false;\n $db_list = pp_run_query('Show databases;');\n foreach($db_list as $row){\n if ($row[\"Database\"] == \"information_schema\") {\n $info_schema_accessible = true;\n }\n }\n if ($info_schema_accessible) {\n // information_schema exists\n //we align the columns that we'd also find in the \"SHOW COLUMNS\"-\n //Query (see below) to the standard query with \" AS \"\n $query = \" SELECT\nCOLUMN_NAME AS `Field`,\nCOLUMN_KEY AS `Key`,\nCOLUMN_TYPE AS `Type`,\nCHARACTER_MAXIMUM_LENGTH,\nNUMERIC_PRECISION,\nCOLUMN_DEFAULT AS `Default`,\nEXTRA AS `Extra`,\nCOLUMN_COMMENT\nFROM information_schema.COLUMNS WHERE TABLE_NAME = '\".$entity[\"tablename\"].\"' AND TABLE_SCHEMA = '\".$db.\"'\";\n }\n }\n //if we can't use it, do it the old way, with less information, sadly\n if ($query == \"\") {\n $query = \"SHOW COLUMNS FROM `\".$entity[\"tablename\"].\"`\";\n }\n \n $res = pp_run_query($query);\n $i = 0;\n foreach($res as $row){\n \n //primary key\n if ($row['Key']=='PRI') {\n if ($entity['pk']!=\"\") {\n // seems to be a 2-field PK - not supported!\n $entity['pk_multiple'] = true;\n }\n $entity[\"pk\"] = $row['Field'];\n //overwriting the first!\n $entity[\"pk_type\"] = preg_replace('@\\([0-9]+\\,?[0-9]*\\)$@', '', $row['Type']);\n }\n \n \n if (!eregi($row['Field'], $not_for_field_list)) {\n //determine length - use only \"Type\" due to http://polypager.nicolashoening.de/?bugs&nr=318\n //$len = $row['CHARACTER_MAXIMUM_LENGTH'];\n //if ($len == \"\" or $len == \"NULL\") {\n // $len = $row['NUMERIC_PRECISION'];\n //}\n //those fields are not there when we said SHOW COLUMNS, so...\n //if ($len == \"\" or $len == \"NULL\") {\n $hits = array();\n eregi('[0-9]+',$row['Type'],$hits);\n $len = $hits[0];\n //}\n //support sets or enums,\n //but we save the valuelist - PolyPager can handle those\n if (eregi('^set\\(', $row['Type']) or eregi('^enum\\(', $row['Type'])) {\n $type = preg_replace('@\\((\\'.+\\'\\,?)+(\\'.+\\')\\)$@', '', $row['Type']);\n eregi('\\((\\'.*\\')\\)', $row['Type'], $hits);\n $hlist = explode(',', $hits[1]);\n $valuelist = array();\n //remove '' on outsets\n foreach($hlist as $l) $valuelist[] = trim($l,\"'\");\n $valuelist = implode(',', $valuelist);\n $valuelist = str_replace(\",,\", \",\", $valuelist);\n } else {\n $type = preg_replace('@\\([0-9]+\\,?[0-9]*\\)$@', '', $row['Type']);\n $valuelist = \"\";\n }\n $field = array(\"name\"=>$row['Field'],\n \"data_type\"=>$type,\n \"size\"=>$len,\n \"order_index\"=>''.$i,\n \"help\"=>$row['COLUMN_COMMENT'],\n \"default\"=>$row['Default'],\n \"valuelist\"=>$valuelist);\n \n //if default is CURRENT_TIMESTAMP, then retrieve it\n if ($type=\"timestamp\" and $row['Default']==\"CURRENT_TIMESTAMP\") {\n $field['default'] = date(\"Y-m-d H:i:s\");\n }\n \n if ($row['Extra'] == 'auto_increment') {\n $entity['hidden_form_fields'].=','.$row['Field'];\n $field['auto'] = 1;\n } else {\n $field['auto'] = 0;\n }\n \n //IMPORTANT: In MySQL we code a boolean as int(1) !!!\n if (($row['Type'] == \"int(1)\" or $row['Type'] == \"tinyint(1)\")) {\n $field[\"data_type\"] = \"bool\";\n }\n \n //set some defaults\n $field['formgroup'] = \"\";\n \n $fields[count($fields)] = $field;\n \n $i++;\n }\n \n }\n \n // -- now we enrich with data from the _sys_fields table\n if ($page_info != \"\") {\n $query = \"SELECT * FROM _sys_fields WHERE pagename = '\".$page_info[\"name\"].\"'\";\n $res = pp_run_query($query);\n foreach($res as $row){\n for ($i=0; $i<count($fields); $i++) {\n \n if ($fields[$i][\"name\"] == $row[\"name\"]) {\n $fields[$i][\"label\"] = $row[\"label\"];\n $fields[$i][\"validation\"] = $row[\"validation\"];\n if ($fields[$i][\"valuelist\"] == \"\") {\n //if from db (set/enum-type), it shouldn't be overwritten\n $fields[$i][\"valuelist\"] = stripCSVList($row[\"valuelist\"]);\n }\n $fields[$i][\"not_brief\"] = $row[\"not_brief\"];\n $fields[$i][\"order_index\"] = $row[\"order_index\"];\n $fields[$i][\"embed_in\"] = $row[\"embed_in\"];\n }\n if (eregi('int',$fields[$i][\"data_type\"]) and $fields[$i][\"size\"] != 1) {\n $fields[$i][\"validation\"] = 'number';\n }\n }\n }\n }\n \n // group field : valuelist stuff\n for ($i=0; $i<count($fields); $i++) {\n // remember from where the values come\n if ($fields[$i][\"valuelist\"] != \"\") {\n $fields[$i]['valuelist_from_db'] = true;\n } else {\n $fields[$i]['valuelist_from_db'] = false;\n }\n }\n \n uasort($fields,\"cmpByOrderIndexAsc\");\n $entity[\"fields\"] = $fields;\n \n return $entity;\n}", "public function testInsert(){\n $goodsData = array(\n 'type'=>array(\n 'type_id'=>'2'\n ),\n 'products'=>'1',\n // 'goods_id'=>'',\n 'title'=>'just a goods',\n 'url'=>'http://234',\n 'status'=>'true',\n 'goods_type'=>'normal',\n 'unit' => 'lit',\n // 'link'=>array(\n // 'url'=>'http://afeggg',\n // 'type'=>'',\n // 'option'=>''\n // ),\n 'last_modified'=>time(),\n 'keywords' => array(\n array(\n 'keyword'=>'aabbcc1',\n 'res_type'=>'goods'\n ),\n array(\n 'keyword'=>'aabbcc21',\n 'res_type'=>'goods'\n ),\n ),\n 'brief'=>'goods brief',\n 'props'=>array(\n 'p_1'=>array(\n 'key'=>'jkljlkj',\n 'value'=>2,\n 'desc'=>'redww'\n ),\n 'p_2'=>array(\n 'key'=>'fefe',\n 'value'=>3,\n 'desc'=>'gegeg'\n ),\n 'p_21'=>array(\n 'key'=>'gge',\n 'value'=>'alialialialialialia'\n )\n ),\n /*\n 'orderinfo'=>array(\n \n ),\n */\n 'adjunct'=>array(\n array(\n 'title'=>'adj title',\n 'min'=>'',\n 'max'=>'',\n 'adj_filter'=>'',\n 'adj_include'=>'',\n 'ajd_exclude'=>''\n ),\n array(\n 'title'=>'adj title',\n 'min'=>'',\n 'max'=>'',\n 'adj_filter'=>'',\n 'adj_include'=>'',\n 'ajd_exclude'=>''\n ),\n ),\n 'description'=>'goods des',\n 'category'=>array(\n 'cat_id'=>'3',\n ),\n 'brand'=>array(\n //brand 外键\n 'brand_id'=>3,\n 'brand_name'=> 'fred perry'\n ),\n 'defalut_image'=>array(\n 'gimage_id'=>1,\n 'is_remote'=>'true',\n 'default'=>1,\n 'width'=>'320',\n 'height'=>'480',\n 'source'=>array(\n 'storager'=>'',\n 'url'=>'http://wfewf'\n ),\n 'thumbnail'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'small'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'big'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n ),\n 'adjunct' => array(\n 'gwag'=>array(\n 'gewgew'\n ),\n ),\n 'spec'=>array(\n array(\n 'spec_name'=>'color',\n 'spec_id'=>'1',\n 'option'=>array(\n array(\n 'private_spec_value_id'=>'12345678901',\n 'spec_value_id'=>'2',\n 'spec_value'=>'aaaa',\n 'spec_image'=>'http://fefe',\n 'spec_goods_images'=>'23,124'\n ),\n array(\n 'private_spec_value_id'=>'12345678902',\n 'spec_value_id'=>'4',\n 'spec_value'=>'',\n 'spec_image'=>'',\n 'spec_goods_images'=>''\n ),\n ),\n ),\n array(\n 'spec_name'=>'size',\n 'spec_id'=>'2',\n 'option'=>array(\n array(\n 'private_spec_value_id'=>'12345678912',\n 'spec_value_id'=>'12',\n 'spec_value'=>'aaaaccc',\n 'spec_image'=>'',\n 'spec_goods_images'=>'23,124'\n ),\n array(\n 'private_spec_value_id'=>'12345678934',\n 'spec_value_id'=>'42',\n 'spec_value'=>'',\n 'spec_image'=>'',\n 'spec_goods_images'=>''\n ),\n ),\n )\n ),\n /*\n 'image'=>array(\n array(\n 'gimage_id'=>1,\n 'is_remote'=>'true',\n 'default'=>1,\n 'width'=>'320',\n 'height'=>'480',\n 'source'=>array(\n 'storager'=>'',\n 'url'=>'http://wfewf'\n ),\n 'thumbnail'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'small'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'big'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n ),\n array(\n 'gimage_id'=>2,\n 'is_remote'=>'true',\n 'width'=>'320',\n 'height'=>'480',\n 'source'=>array(\n 'storager'=>'',\n 'url'=>'http://wfewf'\n ),\n 'thumbnail'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'small'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n 'big'=>array(\n 'storager'=>'',\n 'url'=>'http://ffff',\n ),\n ),\n ),\n */\n 'product'=>array(\n array(\n 'title'=>'asfee',\n 'default'=>1,\n 'bn'=>'abacc'.time(),\n 'barcode'=>'fe',\n 'unit'=>'lit',\n 'freez'=>'0',\n 'status'=>'true',\n 'price'=>array(\n 'mktprice'=>array(\n 'title'=>'市场价',\n 'price'=>100.00\n ),\n 'cost'=>array(\n 'title'=>'成本价',\n 'price'=>'50.00'\n ),\n 'price'=>array(\n 'title'=>'销售价',\n 'price'=>'180.00'\n ),\n\n ),\n 'spec_info'=>'fefe,fefe',\n 'spec_desc'=>'',\n 'store'=>10,\n 'weight'=>100,\n 'last_modifie'=>1234567890\n ),\n\n ),\n );\n// $subsdf = array(\n// 'product'=>array(\n// '*',\n// ),\n// );\n// print_r( $this->model->dump(20,'*',$subsdf) );\n $this->model->save($goodsData);\n// $row = $this->model->db->selectrow('select * from sdb_members');\n// $this->assertEquals($row['member_lv_id'],$memberArr['member_group_id']);\n// $this->assertEquals($row['lang'],$memberArr['lang']);\n// $this->assertEquals($row['cur'],$memberArr['currency']);\n }", "protected function beforeInserting()\n {\n }", "public function testInsertOne()\n {\n $apiProvider = $this->tester->getApiProvider();\n\n $importer = new \\App\\Service\\CustomersImporter(\n $apiProvider,\n $this->denormalizer,\n $this->repository\n );\n\n $this->assertEquals(\n [\n 'inserted' => 1,\n 'updated' => 0,\n ],\n $importer->import()\n );\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 abstract function insert();", "private function exampleFields()\n {\n }", "function testFields() {\n $field_name = $this->field->getName();\n // Keys are field names from the field instance.\n // Values are corresponding field names from add article form.\n $allFields = [\n 'administrativeArea' => $field_name . '[0][administrative_area]',\n 'locality' => $field_name . '[0][locality]',\n 'dependentLocality' => $field_name . '[0][dependent_locality]',\n 'postalCode' => $field_name . '[0][postal_code]',\n 'sortingCode' => $field_name . '[0][sorting_code]',\n 'addressLine1' => $field_name . '[0][address_line1]',\n 'addressLine2' => $field_name . '[0][address_line2]',\n 'organization' => $field_name . '[0][organization]',\n 'recipient' => $field_name . '[0][recipient]',\n ];\n $allFieldsKeys = array_keys($allFields);\n\n // US has all fields except sorting code and dependent locality.\n // France has sorting code, and China has dependent locality, so these\n // countries cover all fields.\n foreach (['US', 'FR', 'CN'] as $country) {\n $addressFormat = $this->addressFormatRepository->get($country);\n $usedFields = $addressFormat->getUsedFields();\n\n $edit[$field_name . '[0][country_code]'] = $country;\n $this->drupalPostAjaxForm($this->nodeAddUrl, $edit, $field_name . '[0][country_code]');\n // Compare the found fields to the address format.\n // Make one assert instead of many asserts for each field's existence.\n $elements = $this->xpath('//input[starts-with(@name,\"' . $field_name . '\")]/@name | //select[starts-with(@name,\"' . $field_name . '\")]/@name');\n $formFields = [];\n foreach ($elements as $key => $element) {\n if ($field = array_search($element->__toString(), $allFields)) {\n $formFields[] = $field;\n }\n }\n $this->assertFieldValues($usedFields, $formFields, 'Expected fields ' . implode(', ', $usedFields) . ' exists for country ' . $country . \", only found \" . implode(', ', $formFields));\n }\n\n // Disable the recipient and postal code fields.\n $disabledFields = ['recipient', 'postalCode'];\n $edit = [];\n foreach ($allFieldsKeys as $field) {\n $edit['settings[fields][' . $field . ']'] = !in_array($field, $disabledFields);\n }\n $this->drupalPostForm($this->fieldConfigUrl, $edit, t('Save settings'));\n $this->assertResponse(200);\n\n // Confirm the absence of disabled fields.\n $this->drupalGet($this->nodeAddUrl);\n $this->assertFalse((bool) $this->xpath('//input[@name=\"' . implode('\" or @name=\"', $disabledFields) . '\"]'), 'Disabled fields ' . implode(', ', $disabledFields) . ' are absent.');\n\n // Confirm that creating an address without the disabled fields works.\n $edit = [];\n $edit['title[0][value]'] = $this->randomMachineName(8);\n $edit[$field_name . '[0][country_code]'] = 'US';\n $edit[$field_name . '[0][organization]'] = 'Some Organization';\n $edit[$field_name . '[0][address_line1]'] = '1098 Alta Ave';\n $edit[$field_name . '[0][address_line2]'] = 'Street 2';\n $edit[$field_name . '[0][locality]'] = 'Mountain View';\n $edit[$field_name . '[0][administrative_area]'] = 'US-CA';\n $this->drupalPostForm(NULL, $edit, t('Save'));\n $this->assertResponse(200);\n $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);\n $this->assertTrue($node, 'Created article ' . $edit['title[0][value]']);\n }", "public function testSavePartialFields() {\n\t\t$this->loadFixtures('Audit', 'AuditDelta', 'AuditableTranslate', 'AuditableTranslatedItem');\n\n\t\t$TestModel = new AuditableTranslatedItem();\n\t\t$TestModel->locale = 'spa';\n\t\t$data = array(\n\t\t\t'slug' => 'fourth_translated',\n\t\t\t'title' => 'Leyenda #4',\n\t\t);\n\t\t$TestModel->create($data);\n\t\t$TestModel->save();\n\t\t$result = $TestModel->read();\n\t\t$expected = array(\n\t\t\t'AuditableTranslatedItem' => array(\n\t\t\t\t'id' => $TestModel->id,\n\t\t\t\t'auditable_translated_article_id' => null,\n\t\t\t\t'locale' => 'spa',\n\t\t\t\t'content' => '',\n\t\t\t) + $data\n\t\t);\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function testSaveDataTableInsertNewRows() {\r\n\t\t// Prepare some database contents via SQL\r\n $records = [\r\n ['UUID' => 'uuid1tRMR1', 'bool' => false, 'int' => 10, 'string' => 'testReadMultipleRecords 1'],\r\n ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'],\r\n ['UUID' => 'uuid1tRMR3', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3']\r\n ];\r\n\t\t$nonullvaluerecord = ['UUID' => 'uuid2nvr1', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3'];\r\n\t\t$nullvaluerecord = ['UUID' => 'uuid2nvr2', 'bool' => null, 'int' => null, 'string' => null];\r\n foreach ($records as $record) {\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n }\r\n\t\t// Prepare datatable\r\n\t\t$datatable = new avorium_core_data_DataTable(1, 4);\r\n\t\t$datatable->setHeader(0, 'UUID');\r\n\t\t$datatable->setHeader(1, 'BOOLEAN_VALUE');\r\n\t\t$datatable->setHeader(2, 'INT_VALUE');\r\n\t\t$datatable->setHeader(3, 'STRING_VALUE');\r\n\t\t// Store a new record without any null values\r\n\t\t$datatable->setCellValue(0, 0, $nonullvaluerecord['UUID']);\r\n\t\t$datatable->setCellValue(0, 1, $nonullvaluerecord['bool']);\r\n\t\t$datatable->setCellValue(0, 2, $nonullvaluerecord['int']);\r\n\t\t$datatable->setCellValue(0, 3, $nonullvaluerecord['string']);\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', $datatable);\r\n\t\t// Check for the new record\r\n\t\t$resultwithoutnullvalues = $this->executeQuery('select UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE from POTEST order by UUID');\r\n\t\t$this->assertEquals(4, count($resultwithoutnullvalues), 'Wrong row count');\r\n\t\t$this->assertEquals($nonullvaluerecord['UUID'], $resultwithoutnullvalues[3]['UUID'], 'UUID from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['bool']?1:0, $resultwithoutnullvalues[3]['BOOLEAN_VALUE'], 'Boolean value from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['int'], $resultwithoutnullvalues[3]['INT_VALUE'], 'Integer value from database is not as expected.');\r\n\t\t$this->assertEquals($nonullvaluerecord['string'], $resultwithoutnullvalues[3]['STRING_VALUE'], 'String value from database is not as expected.');\r\n\t\t// Store a new record with null values\r\n\t\t$datatable->setCellValue(0, 0, $nullvaluerecord['UUID']);\r\n\t\t$datatable->setCellValue(0, 1, $nullvaluerecord['bool']);\r\n\t\t$datatable->setCellValue(0, 2, $nullvaluerecord['int']);\r\n\t\t$datatable->setCellValue(0, 3, $nullvaluerecord['string']);\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', $datatable);\r\n\t\t// Check for the new record, must contain null values, because when inserting the parameter is irrelevant\r\n\t\t$resultwithnullvaluesignoring = $this->executeQuery('select UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE from POTEST order by UUID');\r\n\t\t$this->assertEquals(5, count($resultwithnullvaluesignoring), 'Wrong row count');\r\n\t\t$this->assertEquals($nullvaluerecord['UUID'], $resultwithnullvaluesignoring[4]['UUID'], 'UUID from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['bool'], $resultwithnullvaluesignoring[4]['BOOLEAN_VALUE'], 'Boolean value from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['int'], $resultwithnullvaluesignoring[4]['INT_VALUE'], 'Integer value from database is not as expected.');\r\n\t\t$this->assertEquals($nullvaluerecord['string'], $resultwithnullvaluesignoring[4]['STRING_VALUE'], 'String value from database is not as expected.');\r\n\t}", "public function testInsertSqlIsProperlyPrepared()\n {\n $batch_insert = $this->connection->batchInsert('writers', ['name', 'birthday']);\n\n $property = (new \\ReflectionClass(BatchInsert::class))->getProperty('sql_foundation');\n $property->setAccessible(true);\n\n $sql_foundation = $property->getValue($batch_insert);\n\n $this->assertEquals('INSERT INTO `writers` (`name`, `birthday`) VALUES ', $sql_foundation);\n }", "public function testSave_Insert()\n\t{\n\t\t$this->object->Save();\n\n\t\t$someObject = new object();\n\t\t$objectList = $someObject->GetList(array(array(\"objectId\", \">\", 0)));\n\t\t$this->assertEquals(1, sizeof($objectList));\n\t}", "public function testBasic() {\n\t\t$driver = $this->db->driver();\n\t\t$this->skipIf(!($driver instanceof Mysql), 'The virtualFields test is only compatible with Mysql.');\n\n\t\t$data = [\n\t\t\t'street' => 'Krebenweg 22',\n\t\t\t'zip' => '74523',\n\t\t\t'city' => 'Bibersfeld'\n\t\t];\n\t\t$entity = $this->_getEntity($data);\n\t\t$res = $this->Addresses->save($entity);\n\n\t\t$this->assertTrue(!empty($res['lat']) && !empty($res['lng']) && round($res['lat']) === 49.0 && round($res['lng']) === 10.0);\n\n\t\t// inconclusive\n\t\t$data = [\n\t\t\t//'street' => 'Leopoldstraße',\n\t\t\t'city' => 'München'\n\t\t];\n\t\t$entity = $this->_getEntity($data);\n\t\t$res = $this->Addresses->save($entity);\n\t\t$this->assertEquals('', $this->Addresses->behaviors()->Geocoder->Geocode->error());\n\n\t\t$this->assertTrue(!empty($res['lat']) && !empty($res['lng']));\n\t\t$this->assertEquals('München, Deutschland', $res['geocoder_result']['formatted_address']);\n\n\t\t$data = [\n\t\t\t'city' => 'Bibersfeld'\n\t\t];\n\t\t$entity = $this->_getEntity($data);\n\t\t$res = $this->Addresses->save($entity);\n\n\t\t$this->assertTrue(!empty($res));\n\t\t$this->assertEquals('', $this->Addresses->behaviors()->Geocoder->Geocode->error());\n\t}", "protected function setupFields()\n {\n }", "private function populateDummyTable() {}", "public function insert(stubObject $entity);", "public function testInsertSupplierUsingPOST()\n {\n }", "function insertMandatory($table, $insertData)\n{\n\t$testDB = gettestConnection();\n\n\t//insert the data here\n\tforeach ($insertData as $insertRow) {\n\t\t$bind = ':'.implode(',:', array_keys($insertRow));\n\t\t$sql = 'insert into `'.$table.'`(`'.implode('`,`', array_keys($insertRow)).'`) '.\n\t\t\t\t'values ('.$bind.')';\n\t\t$stmt = $testDB->prepare($sql);\n\t\t$stmt->execute(array_combine(explode(',',$bind), array_values($insertRow)));\n\t}\n\n\treturn true;\n}", "public function inserir()\n {\n }", "protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }", "#[@test]\n public function insertViaQuery() {\n $this->createTable();\n $this->assertTrue($this->db()->query('insert into unittest values (1, \"kiesel\")'));\n }", "public function test_updateReplenishmentProcessCustomFields() {\n\n }", "public function testInsert()\n {\n $data = [\n 'name' => 'Sergio',\n 'email' => '[email protected]'\n ];\n\n $user = User::factory()->create($data);\n\n $this->assertDatabaseHas('users', [\n 'email' => '[email protected]'\n ]);\n\n $this->assertEquals($data['name'], $user->name);\n $this->assertEquals($data['email'], $user->email);\n }", "public abstract function Insert();", "public function testInsertAndUpdateSimpleRecord()\n {\n $this->expectQueries(\n [\n [\n 'INSERT INTO test (fieldWithSetter, field2) VALUES (?, ?)',\n ['foo via setter and getter', ' and getter']\n ],\n ['UPDATE test SET field2=? WHERE key=?', ['bar via setter and getter', null]]\n ]\n );\n\n $entity = $this->entityManager->get('TestEntity');\n /** @var TestEntity $object */\n $object = $entity->create(\n [\n 'fieldWithSetter' => 'foo'\n ]\n );\n $entity->save($object);\n\n $object->setField2('bar');\n\n $entity->save($object);\n\n $this->entityManager->commit();\n }", "public function testInsertMetadata1UsingPOST()\n {\n }", "function GenerateSqlInsert($data, $fields)\n{\n $loc = \"database.php->GenerateSqlInsert\";\n // First make an array that is an intersection of the two inputs.\n $final = array();\n foreach($fields as $f)\n {\n $fn = $f[0]; // Field name\n $ft = $f[1]; // Field type\n if(!isset($data[$fn])) continue;\n if(is_null($data[$fn])) continue;\n $v = $data[$fn];\n $final[] = array(\"FieldName\"=>$fn, \"FieldType\"=>$ft, \"Value\"=>$v);\n }\n if(count($final) <= 0) return false;\n\n // First, list the columns...\n $sql = ' (';\n $c = 0;\n foreach($final as $f)\n {\n if($c != 0) $sql .= ', ';\n $sql .= $f[\"FieldName\"];\n $c++;\n }\n $sql .= ') VALUES (';\n $c = 0;\n foreach($final as $f)\n {\n if($c != 0) $sql .= ', ';\n if($f[\"FieldType\"] == 'int') $sql .= intval($f[\"Value\"]);\n else if($f[\"FieldType\"] == 'str') $sql .= '\"' . SqlClean($f[\"Value\"]) . '\"';\n else if($f[\"FieldType\"] == 'bool') $sql .= TFstr($f[\"Value\"]);\n else \n {\n DieWithMsg($loc, \"Bad Sql type: \" . $f[\"FieldType\"] . \n \" for field \" . $f[\"FieldName\"] . '.'); \n }\n $c++;\n }\n $sql .= ') ';\n return $sql;\n}", "public function setUp() {\n $this->databaseContents['profile_fields'] = $this->expectedResults;\n parent::setUp();\n }", "public static function Insert(){\r\n }", "public function testInsertMetadata2UsingPOST()\n {\n }", "public function testInsert()\n {\n\n $data['url'] = 'unittest.com';\n $data['hosted_server'] = 'unittest';\n $data['state'] = 'unit';\n $data['created_date'] = '2017-01-01';\n $data['last_updated_date'] = '2017-01-01';\n $data['active_from'] = '2017-01-01';\n $data['active_to'] = '2017-01-01';\n\n $new_site = new Site();\n $new_site->createSite($data);\n\n $this->assertTrue(true);\n }", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "public function testInsert() {\n $data = array();\n\n foreach ($this->collapsed as $key => $value) {\n $data = Hash::insert($data, $key, $value);\n }\n\n $this->assertEquals($this->expanded, $data);\n $this->assertEquals(array(), Hash::insert(array(), '', 'value'));\n }", "public function testInsert()\n\t{\n\n\t\t$pessoaA = $this->buildPessoa();\n\t\t$this->em->persist($pessoaA);\n\n\t\t$savedPessoaA = $this->em->find('Usuario\\Entity\\Pessoa', $pessoaA->getId());\n\n\t\t/**\n\t\t * Verificando se salvou o registro no banco para a pessoaA\n\t\t */\n\t\t$this->assertEquals('Steve Jobs', $savedPessoaA->getNome());\n\t\t$this->assertEquals(1, $savedPessoaA->getId());\n\n\t}", "function db_add_field(&$ret, $table, $field, $spec, $keys_new = array()) {\n $fixnull = FALSE;\n if (!empty($spec['not null']) && !isset($spec['default'])) {\n $fixnull = TRUE;\n $spec['not null'] = FALSE;\n }\n $query = 'ALTER TABLE {'. $table .'} ADD ';\n $query .= _db_create_field_sql($field, _db_process_field($spec));\n if (count($keys_new)) {\n $query .= ', ADD '. implode(', ADD ', _db_create_keys_sql($keys_new));\n }\n $ret[] = update_sql($query);\n if (isset($spec['initial'])) {\n // All this because update_sql does not support %-placeholders.\n $sql = 'UPDATE {'. $table .'} SET '. $field .' = '. db_type_placeholder($spec['type']);\n $result = db_query($sql, $spec['initial']);\n $ret[] = array('success' => $result !== FALSE, 'query' => check_plain($sql .' ('. $spec['initial'] .')'));\n }\n if ($fixnull) {\n $spec['not null'] = TRUE;\n db_change_field($ret, $table, $field, $field, $spec);\n }\n}", "protected function beforeInsert()\n {\n }", "protected function prepare_fields()\n {\n }", "public function testBasicTest()\n {\n $dataImport = new Controllers\\DataImportController();\n $dataImport->setSource(app_path('/tests/test.csv'));\n $dataImport->configureFields([\n 'Title'=>['field'=>'title','validators'=>'required|max:64'],\n 'Lat'=>['field'=>'lat','validators'=>'required|max:16'],\n 'Lon'=>['field'=>'lon','validators'=>'required|max:16'],\n 'Residents'=>['field'=>'residents','validators'=>'integer']\n ]);\n\n $result = $dataImport->import();\n $this->assertTrue($result);\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 to into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAGCONTENT);\n\t\t$tag->insert($this->getPDO());\n\t\t// grab the data from mySQL and enforce the fields match 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->getTagName($this->VALID_TAGCONTENT), $this->VALID_TAGCONTENT);\n\t}", "public function insert() {\n \n }", "function testUserDBInsert() {\n\t\t\t$u = new User(['user_id' => 50, 'username' => 'fjones', 'screen_name' => 'jones, fred', 'DB' => $this->DB]);\n\n\t\t\t$u->updateDb();\n\n\t\t\t$u2 = User::getOneFromDb(['user_id' => 50], $this->DB);\n\n\t\t\t$this->assertTrue($u2->matchesDb);\n\t\t\t$this->assertEqual($u2->username, 'fjones');\n\t\t}", "function insertData($table, $fields)\n {\n $setval = \"\";\n foreach ($fields as $key => $value) {\n $setval .= \"?,\";\n }\n $setval = substr($setval, 0, -1);\n $sql = \"insert into $table (\" . implode(\",\", array_keys($fields)) . \") values ($setval)\";\n $result = $this->conn->prepare($sql);\n $result->execute(array_values($fields));\n if ($result) {\n return true;\n } else {\n return false;\n }\n $this->conn = null;\n }", "protected function insertTableFields( $p_fields = null ) {\n\t\t$fields = (object) $p_fields;\n\t\t// -----------------------------------------------------------------------------------------\n\t\t// Translate the field object into a column array for the table.\n\t\t// -----------------------------------------------------------------------------------------\n\t\t$return = $this->fields_to_columns($fields);\n\t\tif ( $return['status'] > 200 ) {\n\t\t\treturn $return;\n\t\t}\n\t\t$columns = $return['response'];\n\t\t// -----------------------------------------------------------------------------------------\n\t\t// Format column data with special needs ( gender, phone, email, . . .)\n\t\t// -----------------------------------------------------------------------------------------\n\t\t$return = $this->format_validate($columns);\n\t\tif ( $return['status'] > 200 ) {\n\t\t\treturn $return;\n\t\t}\n\t\t$columns = $return['response'];\n\n\t\treturn $this->insertTable($columns);\n\t}", "public function setUp()\n {\n parent::setUp(); // TODO: Change the autogenerated stub\n \\DB::table('users')->insert([\n 'employee_code' => 'AT0123',\n 'name' => 'SA Nguyen',\n 'email' => '[email protected]',\n 'team' => 'SA',\n 'role' => '1'\n ]);\n }", "public function insert()\n {\n }", "public function insert()\n {\n }", "public function testGetFields()\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 testDataInsertedA()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests');\n $fixture->load();\n\n $this->assertTrue($this->_recordExists(3));\n }", "public function testCanInsertAndRetrieveData(){\n $cleanPDO = new cleanPDO($this->goodConfig);\n $cleanPDO->beginTransaction();\n $cleanPDO->query(\"INSERT INTO test_table VALUES(null, 1)\");\n\n $id = $cleanPDO->lastInsertId();\n $this->assertTrue($id != 0);\n $stmt = $cleanPDO->query(\"SELECT * FROM `test_table` WHERE `key` = $id\");\n\n $this->assertTrue($cleanPDO->commit());\n $stmt->execute();\n $res = $stmt->fetch();\n $this->assertTrue($res['value'] == 1);\n\n }", "function fn_giftreg_add_fields($fields)\n{\n if (empty($fields)) {\n return false;\n }\n\n foreach ($fields as $v) {\n\n if (empty($v['description'])) {\n continue;\n }\n\n // Insert main data\n $field_id = db_query(\"INSERT INTO ?:giftreg_fields ?e\", $v);\n // Insert descriptions\n $_data = array(\n 'object_id' => $field_id,\n 'object_type' => 'F',\n 'description' => $v['description'],\n );\n\n foreach (fn_get_translation_languages() as $_data['lang_code'] => $_v) {\n db_query(\"INSERT INTO ?:giftreg_descriptions ?e\", $_data);\n }\n\n if (substr_count('SR', $v['field_type']) && is_array($v['variants'])) {\n fn_giftreg_add_field_variants($v['variants'], $field_id);\n }\n }\n\n return true;\n}", "public function testInsertValidAccess() {\n\t\t//count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"access\");\n\n\t\t//create a new Access and insert into mySQL\n\t\t$access = new Access(null, $this->VALID_ACCESSNAME);\n\t\t$access->insert($this->getPDO());\n\n\t\t//grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoAccess = Access::getAccessByAccessId($this->getPDO(), $access->getAccessId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"access\"));\n\t\t$this->assertEquals($pdoAccess->getAccessName(), $this->VALID_ACCESSNAME);\n\t}", "public function test_it_creates_new_field_from_input_data()\n\t{\n\t\t$previous = \\DvsField::count();\n\n\t\t$this->LanguagesRepository->shouldReceive('findLanguageForPageVersion')\n\t\t\t->times(1)\n\t\t\t->andReturn(\\DvsLanguage::find(45));\n\n\n\t\t// when we call this method with input data\n\t\t$output = $this->FieldManager->findOrCreateField([\n\t\t\t'human_name' => 'Human Name',\n\t\t\t'key' => 'key42',\n\t\t\t'type' => 'text',\n\t\t\t'settings' => '{}',\n\t\t\t'page_version_id' => '1',\n\t\t\t'value' => '{}',\n\t\t]);\n\n\t\t// then it should create a new field from input data\n\t\tassertEquals('key42', $output->key);\n\t\tassertEquals($previous + 1, \\DvsField::count());\n\t}", "protected function setUp(): void\n {\n $this->withClause = (new StatementFactory())->insert(new QualifiedName('foo'))->with;\n }", "public function insert($table_name, $fields_values = array())\r\n {\r\n }", "protected function saveInsert()\n {\n }", "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 }", "public function testStore_Insert()\n {\n \t$id1 = $this->conn->store('test', array(null, 'new1', 'new row ONE', 'NEW'));\n \t$id2 = $this->conn->store('test', array('key'=>'new2', 'title'=>'new row TWO'));\n \t\n \t$result = $this->conn->query('SELECT * FROM test where status=\"NEW\"');\n \t$this->assertEquals(array($id1, 'new1', 'new row ONE', 'NEW'), $result->fetchOrdered());\n \t$this->assertEquals(array($id2, 'new2', 'new row TWO', 'NEW'), $result->fetchOrdered());\n\t}", "public function addField();", "public function insert()\n {\n \n }" ]
[ "0.7188045", "0.67224455", "0.6683838", "0.66360605", "0.6591263", "0.6531837", "0.6491127", "0.64433825", "0.63571703", "0.6332511", "0.63292843", "0.6325749", "0.6325749", "0.6294873", "0.62896013", "0.6263086", "0.6215676", "0.6193762", "0.61888945", "0.6188588", "0.61793035", "0.6160432", "0.6141123", "0.61325324", "0.61300284", "0.6124946", "0.60997266", "0.60960066", "0.6081582", "0.6078334", "0.60682863", "0.6066585", "0.60579306", "0.6049815", "0.6037136", "0.60239595", "0.60112965", "0.59993744", "0.5996079", "0.59857434", "0.59833163", "0.5958692", "0.59519005", "0.59486175", "0.59400046", "0.5927692", "0.591785", "0.590988", "0.58914024", "0.58909404", "0.5881424", "0.5871451", "0.586908", "0.5868051", "0.58633715", "0.5855652", "0.5853553", "0.5842977", "0.58414775", "0.58373666", "0.5837101", "0.5832366", "0.5831661", "0.58309436", "0.58248717", "0.58247817", "0.58199", "0.5808134", "0.5806089", "0.5800339", "0.5798658", "0.5798186", "0.5782735", "0.578071", "0.5775202", "0.577399", "0.5767987", "0.57630026", "0.5755619", "0.57381314", "0.57380885", "0.5737727", "0.573609", "0.57278365", "0.572279", "0.5720507", "0.5720507", "0.57124454", "0.57046306", "0.57007766", "0.5696279", "0.5695297", "0.5687828", "0.568166", "0.56716716", "0.5668821", "0.56636417", "0.565876", "0.5656572", "0.565389" ]
0.7977314
0
function to connect to database
function connection() { $dbhost= "localhost"; $dbuser= "root"; $dbpass= ""; $dbname= "db_fellowme"; $dbh = new PDO("mysql:host=$dbhost;dbname=$dbname;charset=utf8", $dbuser, $dbpass); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $dbh; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function connectToDB() {}", "function connectDB();", "public function connectDB() {}", "private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$this->dbHandle->setDatabasePassword($this->dbPassword);\r\r\n\t\t$this->dbHandle->setDatabaseName($this->db);\r\r\n\t\t$this->dbHandle->sql_pconnect();\r\r\n\t\t$this->dbHandle->sql_select_db();\r\r\n\t}", "public function connect_db() {\n }", "function connectToDatabase() {\n\n $host = self::servername;\n $databaseName = self::dbname;\n $password = self::password;\n $username = self::username;\n //To create the connection\n $conn = new mysqli($host, $username, $password, $databaseName);\n self::$conn = $conn;\n //Connection Checking, if there is a connection error, print the error\n if ($conn->connect_error) {\n exit(\"Failure\" . $conn->connect_error);\n }\n }", "function connect_to_db(){\n\t\t//Fun Fact: @ suppresses errors of the expression it prepends\n\t\t\n\t\t//Connect to the database and select the database\t\t\t\n\t\ttry{\n\t\t\t$this->connection = new PDO(\"mysql:host=$DATABASE_HOST;dbname=DATABASE_NAME\", DATABASE_USER, DATABASE_PASS);\n\t\t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}catch(PDOException $err){\n\t\t\tdie('Could not connect to database' . $err->getMessage());\n\t\t}\t\t\n\t}", "private function dbConnect(){\n $database=new \\Database();\n return $database->getConnection();\n }", "function dbConnect () {\n\t$con = mysql_connect($this -> host, $this -> user, $this -> pass);\n mysql_select_db($this->dbname,$con);\n\t}", "public function connectToDatabase(){\n\t\t$dbinfo=$this->getDBinfo();\n\n\t\t$host=$dbinfo[\"host\"];\n\t\t$dbname=$dbinfo[\"dbname\"];\n\t\t$user=$dbinfo[\"user\"];\n\t\t\n $pass=$this->getPassword();//don't share!!\n\n try{\n $DBH = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $pass);\n $DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n }catch(PDOException $e){\n $this->processException($e);\n }\n \n $this->setDBH($DBH);\n }", "private function connectDB()\n\t{\n\t\t$this->db = ECash::getMasterDb();\n\t\t\n\t//\t$this->dbconn = $this->db->getConnection();\n\t}", "function connectDatabase() {\n mysql_pconnect(SERVER, USERNAME, PASSWORD)\n or die('Could not connect: ' . mysql_error());\n\n mysql_select_db(DATABASE_NAME)\n or die('Could not select: ' . mysql_error());\n}", "function connect(){\r\n\r\n\r\n $db = mysqli_connect('[Server]','[User]','[Password]','[Database]');\r\n\r\n\r\n return $db;\r\n }", "function connect()\n {\n\trequire_once dirname(__FILE__) . '/db_config.php';\n\t$connstring = \"host={$DB_SERVER} port={$DB_PORT} dbname={$DB_DATABASE} \".\n\t\t \"user={$DB_USER} password={$DB_PASSWORD}\";\n\t$db = pg_connect($connstring);\n\n\treturn $db;\n }", "public function connectDB ($param);", "private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }", "public function connectdb()\n {\n $this->db = mysql_connect($this->host,$this->port, $this->user, $this->pass)\n if (!$db)\n {\n die('Could not connect: ' . mysql_error());\n }\n\n mysql_select_db($this->database, $this->db);\n }", "function db_connect(){\n\t\tif(SQ_DEBUG){\n\t\t\t$this->dbh = mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}else{\n\t\t\t$this->dbh = @mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}\n\t\t\n\t\tif (!$this->dbh){\n\t\t\t$error_message = sprintf(SQ_DB_CONN_ERROR_MESSAGE, $this->dbhost, $this->dbuser);\n\t\t\tthrow new SQ_Exception($error_message, SQ_DB_CONN_ERROR_CODE);\n\t\t}\n\t\t$this->ready = true;\n\t\t\n\t\ttry{\n\t\t\t$this->select($this->dbname, $this->dbh);\n\t\t}catch(SQ_Exception $e){\n\t\t\tthrow $e;\n\t\t}\n\t}", "private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function connectToDatabase() {\n $servername = '127.0.0.1';\n $username = 'runlog_user';\n $password = 'run4FUN';\n $db = 'runlog';\n\n try {\n $conn = new PDO(\"mysql:host=$servername;dbname=$db\", $username, $password);\n // set the PDO error mode to exception\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch(PDOException $e) {\n echo \"Database connection failed: \" . $e->getMessage();\n }\n return $conn;\n }", "function setDatabaseConnection($host,$database,$user,$pass);", "function OpenCon() {\n $dbhost = \"\";\n $dbuser = \"\";\n $dbpass = \"\";\n if($_SERVER['SERVER_NAME'] == \"localhost\"){\n $dbhost = \"localhost\";\n $dbuser = \"root\";\n $dbpass = \"root\";\n }\n else{\n $dbhost = \"db.cs.dal.ca\";\n $dbuser = \"aio\";\n $dbpass = \"ge7ochooCae7\";\n }\n $db = \"aio\";\n $conn = new mysqli($dbhost, $dbuser, $dbpass, $db) or die(\"Connect failed: %s\\n\". $conn -> error);\n return $conn;\n }", "function connectDB(){\n\t\tif(!$this->conId=mysql_connect($this->host,$this->user,$this->password)){\n trigger_error('Error connecting to the server '.mysql_error());\n exit();\n\t\t}\n\t\tif(!mysql_select_db($this->database,$this->conId)){\n\t\t\t trigger_error('Error selecting database '.mysql_error());\n\t\t\t exit();\n\t\t}\n\t}", "function connect(){\n\n\t\t$conn = mysql_connect(DB_HOST , DB_USER , DB_PASS) ;\n\t\tif(!$conn){\n\t\t\tdie('could not connect to :'.mysql_error()) ;\n\t\t}\n\n\t\terror_log('conn- databsae: $conn') ;\n\n\t\t// select a database\n\t\t$database = mysql_select_db(DB_NAME, $conn );\n\n\t\tif (!$database) {\n\t\t\t\tdie('Could not use database '.DB_NAME .mysql_error() );\n\t\t}\n\t\telse {\n\t\t\treturn $conn ;\n\t\t}\n\n\t}", "function db_connect() {\n\t$database = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME); //create the object $connection\n\tconfirm_db_connect($database);\n\n\t// this function returns the object $connection with the database\n\treturn $database; \n\t}", "function connect()\n\t{\n\t\tglobal $connection;\n\n\t\t$connection = mysql_connect(HOST, USER, PASS)\n\t\t\tor die(\"Cannot connect to $host as $user:\" . mysql_error());\n \n\t\tmysql_select_db(DBNAME)\n\t\t\tor die (\"Cannot open $dbName:\" . mysql_error());\n\n\t}", "function connectSql()\n{\n $host = '';\n $username = '';\n $password = '';\n $database = '';\n $link = connect($host, $username, $password, $database);\n return $link;\n}", "private function func_connect() {\n $this -> lnk = mysql_connect($this -> host, $this -> user, $this -> password, true) OR die('Could not connect to the database - Why: '.mysql_error());\n mysql_select_db($this -> database) OR die('Could not find database: '.mysql_error());\n }", "function db_connect($db_hostname, $db_username, $db_password, $db_name)\n\t{ global $db_port;\n\t\t$this->db_connection = pg_connect(\"host=\".$db_hostname.\" port=\".$db_port.\" dbname=\".$db_name.\" user=\".$db_username.\" password=\".$db_password) \n\t\t\tOR die (\"Connection Error to PostgreSQL Server\");\n\t\treturn $this->db_connection;\n\t}", "public function db_connect(){\n $db_username = $this->db['username'];\n $db_password = $this->db['password'];\n $db_host = $this->db['host'];\n\n // Start Connection\n $mysql = mysqli_connect($db_host,$db_username,$db_password);\n (!$mysql ? die(\"ERROR: \" . mysqli_error($this->mysql)) : TRUE);\n // Return MySQL Resource\n return $mysql;\n }", "public function connect($db_properties);", "function db()\n\t{\n\t\tglobal $dbhost, $dbuser, $dbpass, $dbname;\n\t\t$this->db_server_link = @mysql_connect($dbhost, $dbuser, $dbpass);\n\t\tmysql_select_db($dbname, $this->db_server_link) ;\n\t}", "function connectdb() {\n include('dbinfo.php');\n $con=mysql_connect($host,$user,$password);\n if (!$con) {\n\t\tdie('Could not connect to mysql: ' . mysql_error());\n\t}\n mysql_select_db($database) or die('Error connecting to database. '. mysql_error());\n}", "function connectDb($p1, $p2, $p3, $p4)\n\t{\n\t\t//$con = mysqli_connect(\"localhost\", \"root\", \"abcde\", \"qpkg\"); \n\t\t$con = mysqli_connect($p1, $p2, $p3, $p4);\n\t\tmysqli_query($con, \"SET NAMES 'UTF8'\");\n\n\t\tif (mysqli_connect_error()) {\n\t\t\techo \"Failed to connect to MySQL: \" . mysqli_connect_error();\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn $con;\n\t\t}\n\t}", "private function connectToDb()\n {\n //home connect\n $link =pg_connect(\"host=localhost dbname=user1 user=postgres\");\n if(!$link)\n {\n die('Connect Error');\n }\n $this->dbConnect = $link;\n }", "function connect_db()\n\n\t{\n\n\t\t\n\n\t\t$param_array = func_get_args();\n\n\t\t//$GLOBALS['logger_obj']->debug('<br>METHOD database_manipulation::connect_db() - PARAMETER LIST : ', $param_array, true);\n\n\t\t\n\n\t\t$error_title = 'Error In Method : database_manipulation::connect_db()';\n\n\t\t$error_str = '';\n\n\t\t\n\n\t\t$con = mysql_connect(\"serevername\",$this->dbusername,$this->dbpassword);\n\n\t\t\n\n\t\t$error_str .= mysql_error();\n\n\t\t\n\n\t\t$res = mysql_select_db($this->dbname, $con);\n\n\n\n\t\t$error_str .= mysql_error();\n\n\t\t\n\n\t\t//log errors...\n\n\t\t$GLOBALS['logger_obj']->error($error_title, $error_str, 'mysql');\n\n\t\t\n\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD database_manipulation::connect_db() - Return Value : ', $con, true);\n\n\n\n\t\treturn $con;\n\n\n\n\t}", "function db_connect() {\n\t$link = mysql_connect('localhost', 'ceng499', 'ceng499');\n\tif(!$link) {\n\t\tdie('Could not connect: 50000' . mysql_error());\n\t}\n\t\n\t$db_selected = mysql_select_db('pihome', $link);\n\tif(!$db_selected) {\n\t\tdie ('Can\\'t use pihome: ' . mysql_error());\n\t}\n}", "function accedi_db() {\n include(\"db.conf.php\");\n $db = mysql_connect($db_host, $db_user, $db_pass);\n mysql_select_db($db_name, $db);\n }", "function db_connect()\n\t{\t\n\t\tini_set('display_errors', 'On');\n\t\t$hostname = 'oniddb.cws.oregonstate.edu'; \n\t\t$dbname = 'gonsalvj-db';\n\t\t$username = 'gonsalvj-db';\n\t\t$password = 'PAKum3uAIPOc0WJY';\n\t\n\t\t$mysqli = new mysqli($hostname,$dbname ,$password,$username);\n\t\tif($mysqli->connect_errno){\n\t\t\techo \"Connection error \" . $mysqli->connect_errno . \" \" . $mysqli->connect_error;\n\t\t}\t\n\t\treturn $mysqli;\n\t}", "function dbConnect(){\r\n\t$host = \"localhost\"; // this is typically just \"localhost\"\r\n\t$user = \"id1360972_elliott\"; // user name\r\n\t$pwd = \"170592\"; // database password\r\n\t$database = \"id1360972_mysqldemo\"; // database name\r\n\r\n\t// initiate a new mysqli object to connect to the Database. Store the mysqli object in a variable $conn.\r\n\t$conn = new mysqli($host, $user, $pwd, $database) or die(\"could not connect to server\");\r\n\r\n\t// return $conn to the fucntion call\r\n\treturn $conn;}", "function dbconnect()\n {\n $link = mysql_pconnect(\"localhost\", \"root\", \"s3ns89ui\") or die(mysql_error());\n $db_selected = mysql_select_db(\"analytics\", $link) or die(mysql_error());\n }", "private function connect()\n {\n if ($this->configuration->get('db.connector') == 'PDO') {\n $dsn = \"mysql:host=\" . $this->configuration->get('db.host') . \";dbname=\" . $this->configuration->get('db.name');\n $options = array();\n $this->db = new PDO(\n $dsn, $this->configuration->get('db.username'), $this->configuration->get('db.password'), $options\n );\n } elseif ($this->configuration->get('db.connector') == 'mysqli') {\n $this->db = mysqli_connect(\n $this->configuration->get('db.host'), $this->configuration->get('db.username'), $this->configuration->get('db.password'), $this->configuration->get('db.name')\n );\n }\n }", "function db_connect(){\r\n global $database;\r\n\r\n return mysqli_connect(\r\n $database['server'],\r\n $database['username'],\r\n $database['password'],\r\n $database['db_name']\r\n );\r\n }", "function createConection(){\n\n\t\tglobal $db_host;\n\t\tglobal $db_usr;\n\t\tglobal $db_pwd;\n\t\tglobal $db_name;\n\t\tglobal $db_port;\n\n\t\treturn pg_connect('user='.$db_usr.' password='.$db_pwd.' host= '.$db_host.' dbname = '.$db_name.' port = '.$db_port);\n\t}", "function connect_to_db () {\n\tglobal $conn;\n\tglobal $pdo_connection_string;\n\n\tif (!is_null($conn))\n\t\treturn $conn;\n\n\ttry {\n\t // connect to the database\n\t\t$conn = new PDO($pdo_connection_string, DB_USER, DB_PASS);\n\n\t\t// throw exceptions when errors occur\n\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\t// fetch rows as associative arrays (dictionaries)\n\t\t$conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n\t} catch (PDOException $e) {\n\t echo \"Database exception: \" . $e->getMessage() . \"\\n\";\n\t die;\n\t}\n\n\treturn $conn;\t\n}", "protected function connectDB () {\n $host=$this->Parameters['db_host'];\n $username=$this->Parameters['db_username'];\n\t\t$password=$this->Parameters['db_userpassword'];\n\t\t$dbname=$this->Parameters['db_name'];\n\t\t\n $this->Conn = new mysqli ($host,$username,$password,$dbname);\n if($this->Conn->connect_errno > 0){\n throw new Exception('Unable to connect to database [' . $this->Conn->connect_error . ']');\n }\n }", "function conectiondb()\n\t{\n\t\tif (!($link=@mysql_pconnect($this->home,$this->user,$this->pass)))\n\t\t//if(!($link=@mysql_connect(\"67.227.188.182\",\"forttec_usr433d\",\"Er56-df3G?1\")))\n\t\t{\n\t\t echo \"*-*-*-Error when connecting itself to the database\".mysql_error();\n\t exit();\n\t \t}\n \t\tif (!mysql_select_db($this->database,$link))\n\t \t{\n \t echo \"Error the database not exists\";\n\t exit();\n \t\t}\n\t\tset_time_limit(20000);\n \t\treturn $link;\n\t}", "function conn()\n {\n require_once(\"../hidden/db_login_info.php\");\n \tif(!isset($GLOBALS['dbc']))\n \t{\n \t\t$GLOBALS['dbc'] = @mysqli_connect($dbhost, $dbuser, $dbpass)\n \t\t\tOR die (\"<p>1:Could not connect to database</p>\");\n\t\t\n \t\t@mysqli_select_db($GLOBALS['dbc'], $dbname)\n \t\t\tOR die (\"<p>2:Could not select the database</p>\");\n \t}\n }", "function _dbconnect() \n {\n global $database;\n $link = mysql_connect($database['dbhost'], $database['user'], $database['pass']);\n if (!$link) { die('Not connected : ' . mysql_error()); }\n $db_selected = mysql_select_db($database['dbname'], $link);\n if (!$db_selected) { die ('Can\\'t use '.$database['dbname'].' : ' . mysql_error()); } \n }", "function connect() // this function connects to mysql database\n\t{\n \t\t// this step can verify host, users, and password are correct before the connection; otherwise, \n \t\t//connection will be failed if one of them is incorrect \n\t\tmysql_connect(DB_HOST,DB_USER,DB_PASS) or die('could not connect to database'. mysql_error());\n\n\t\tmysql_select_db(DB_NAME);\n\t}", "function db_connect()\n\t{\n\t\t// Requiring the configuration file that holds the config data for connection\n\t\trequire 'config.php';\n\t\ttry \n\t\t{\n\t\t\t$conn = new PDO(\"mysql:host=localhost;dbname=packsave\", $config['DB_USER'], $config['DB_PASS']);\n\t\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\t\n\t\t}\n\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\techo 'ERROR: '. $e->getMessage();\n\t\t}\n\t\t\n\t}", "function db_connect() {\n // $connection = mysqli_connect('localhost', 'ics325fa2005', '','root');\n $conn = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME);\n\n confirm_db_connect();\n return $connection;\n }", "function dbConnect(){\n\t\tglobal $config;\n\t\t$conn = mysql_connect($config[\"db_server\"], $config[\"db_utente\"], $config[\"db_password\"]) or die (\"Errore nella connessione al db: \" . mysql_error());\n\t\tmysql_select_db($config[\"db_database\"]) or die (\"Errore nella selezione del db: \" . mysql_error());\n\t\treturn $conn;\t\n\t}", "function connectDB() {\n $dbh = mysqli_connect(\"127.0.0.1:3306\", \"admin\", \"P@ssw0rd\", \"travelexperts\");\n return $dbh;\n }", "private static function get_connect(){\n static::$db = pg_connect(static::$host . \" \" . static::$port . \" \" . static::$database . \" \" . static::$user . \" \" . static::$pass);\n }", "private function connectToDatabase()\n {\n return DbConnection::connectToDatabase($this->link);\n }", "private function connect() {\r\n\t\tunset($this->dbLink);\r\n\t\t/* create connection to database host */\r\n\t\t// $dbLink = mysql_connect(\"mysql.localhost\", \"de88623\", \"proberaum1\");\r\n\t\t$dbLink = mysql_connect(\"localhost\", \"robert\", \"YMbHFY+On2\");\r\n\t\t/* select database */\r\n\t\tmysql_select_db(\"robert_www_parkdrei_de\");\r\n\t\t/* set link to database as a object attribute */\r\n\t\t$this->dbLink = $dbLink;\r\n\t}", "function dbConnect(){\n\t$host = \"localhost\"; // for uta.cloud server, \"localhost\" is the host name. Do not edit.\n\t$user = \"egsutacl_egs3925\"; // put your own user name here.\n\t$pwd = \"Es*2802*\"; // put your own database password here\n\t$database = \"egsutacl_4350\"; // put your database name here\n\t$port = \"3306\"; // server-specific. For uta.cloud, the port number is 3306 (the default port)\n\n\t/* Initiate a new mysqli object to connect to the Database. Store the mysqli object in a variable $conn. */\n\t$conn = new mysqli($host, $user, $pwd, $database, $port) or die(\"could not connect to server\");\n\n\t// return $conn to the fucntion call\n\treturn $conn;}", "function connectDB(){\n $servername = \"localhost\";\n $username \t= \"tdiw-r4\";\n $password \t= \"CENSORED\";\n $dbname \t= \"tdiw-r4\";\n\n\t\ttry {\n\t\t\t// Create connection\n\t\t\t$conn \t= new PDO('mysql:host='.$servername.';dbname='.$dbname.';charset=utf8mb4', $username, $password);\n\t\t} catch (PDOException $e) {\n\t\t\t//If connection failed\n\t\t\techo 'Connection failed: '.$e->getMessage();\n\t\t}\n\n return $conn;\n }", "public function connect() {\n if ($this->link = mysql_connect($this->host, $this->user, $this->pass)) {\n if (!empty($this->name)) {\n if (!mysql_select_db($this->name)) {\n $this->exception(\"Could not connect to the database!\");\n }\n }\n } else {\n $this->exception(\"Could not create database connection!\");\n }\n }", "function connect() \n\t{\n include(\"salon_connect.php\");\n\t\t\n \n\t\t$connection = mysqli_connect(DB_server,DB_user,DB_pass,DB_data);\n\n return $connection;\n }", "function connect() \n\t{\n include(\"salon_connect.php\");\n\t\t\n \n\t\t$connection = mysqli_connect(DB_server,DB_user,DB_pass,DB_data);\n\n return $connection;\n }", "private function connect()\n {\n if (! is_null(self::$db)) {\n return;\n }\n\n // $this->host \t= $Database->host;\n // $this->user \t= $Database->user;\n // $this->pass \t= $Database->pass;\n // $this->database\t= $Database->database;\n\n $conn = 'mysql:dbname=' . $this->dbInfo->database . ';host=' . $this->dbInfo->host.';charset=utf8';\n try {\n self::$db = new PDO($conn, $this->dbInfo->user, $this->dbInfo->pass);\n } catch (PDOException $e) {\n die('Could not connect to database (' . $conn . ')');\n }\n }", "public function connect()\n {\n $data = $this->app->file->requireFile('config.php');\n extract($data);\n try {\n static::$DB = new PDO('mysql:host=' . $server . ';dbname=' . $dbname , $dbuser , $dbpass);\n\n static::$DB->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE , PDO::FETCH_OBJ);\n static::$DB->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION);\n static::$DB->exec('SET NAMES utf8');\n\n }\n catch (PDOException $e){\n die($e->getMessage());\n }\n }", "function dbconnect() {\n $link = mysql_connect(\"localhost\", \"cadmin\", \"cadmin\")\n or die(\"Could not connect : \" . mysql_error());\n mysql_select_db(\"cevents\") or die(\"Could not select database\"); \n}", "private function connect()\n\t{\n\t\t$connectionData = $this->app->file->requireFile('config.php');\n\t\t\n\t\textract($connectionData);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tstatic::$connection = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\n\t\t\tstatic::$connection->exec('SET NAMES utf8');\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\t\t\t\t\n\t}", "function wb_connect_database()\n{\n\trequire 'db-config.php';\n\tif( !defined('USERNAME') || !defined('PASSWORD') || !defined('DB_NAME') )\n\t\tdie('Database config constants are not properly defined.');\n\t\n\t$con = mysql_connect('localhost', USERNAME, PASSWORD);\n\tif($con)\n\t{\n\t\tif( !mysql_select_db(DB_NAME, $con) )\n\t\t wb_create_database(DB_NAME, $con);\n \n //for websec purposes\n wb_create_database(DB_NAME, $con);\n\t}\n\telse\n\t{\n\t\techo 'Could not connect: ' . mysql_error();\n\t\treturn FALSE;\n\t}\n\t\n\tif( !mysql_set_charset('utf8', $con) )\n\t\techo 'Failed to set character set, current set is:' . mysql_client_encoding($con);\n\t\t\n\treturn $con;\n}", "function dbconnect(){\n//vars for the connection string\n$host = \"localhost\";\n$user = \"lilmamas_alain\";\n$db = \"lilmamas_demo\";\n$pw = \"!Lavoie36!\";\n//db connection string\n$db_conn = mysqli_connect($host, $user, $pw, $db);\n\tif ($conn ->connect_errno) {\n\t\techo \"Failed to connect to MySQL: (\" . $mysqli->connect_errno . \") \" . $mysqli->connect_error;\n\t}\n\t//return the connection\n\treturn $db_conn;\n}", "function getConnection($db,$custom);", "function dbconnect ()\n{\n\tglobal $morpheus, $mylink;\n\n\t$dbname\t\t= $morpheus[\"dbname\"];\n\t$user\t\t= $morpheus[\"user\"];\n\t$password\t= $morpheus[\"password\"];\n\t$server\t\t= $morpheus[\"server\"];\n\n\n\t$mylink = mysqli_connect($server,$user,$password,$dbname);\n\t$mylink->set_charset(\"utf8\");\n\t// print_r($mylink);\n\t/* check connection */\n\tif (mysqli_connect_errno()) {\n\t printf(\"Connect failed: %s\\n\", mysqli_connect_error());\n\t exit();\n\t}\n}", "private function connect() {\n $this->load->database();\n }", "public function connect() {\r\n\t\t$this->connection = mysql_connect($this->host, $this->username, $this->password);\r\n\t\t$this->selectDB($this->squema);\r\n\t}", "function connect(\n\t\t$dbname)\n\t{\n\t\trequire 'config.php';\n\n\t\t$servername = $configs['db_servername'];\n\t\t$username = $configs['db_username'];\n\t\t$password = $configs['db_password'];\n\n\t\t// Create connection\n\t\t$this->connection = new mysqli($servername, $username, $password, $dbname);\n\n\t\t// Check connection\n\t\tif ($this->connection->connect_error) {\n\t\t\tdie(\"Connection failed: \" . $this->connection->connect_error);\n\t\t}\n\t}", "function db_connect(){\n // user creds, db, host, and port\n $user = DB_USER;\n $password = DB_PASS;\n $host = DB_SERVER;\n $port = 8889;\n $db = 'severe_weather_admin'; // name of mysql database\n\n // connect to the database\n $link = mysqli_init(); // use this var to connect to mysql\n $success = mysqli_real_connect(\n $link,\n $host,\n $user,\n $password,\n $db,\n $port\n );\n confirm_db_connect();\n return $link;\n}", "function connect_to_db()\n{\n\tglobal $db_host;\n\tglobal $db_name;\n\tglobal $db_username;\n\tglobal $db_password;\n\n\t$conn = false;\n\n\t\t/* Connect to the database */\n\t\t$conn = new PDO('mysql:host='.$db_host.';dbname='.$db_name, $db_username, $db_password);\n\n\t\t/* Disable the emulatrion of prepared statements */\n\t\t$conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\t/* Return the connection object*/\n\t\treturn $conn;\n\n\treturn $conn;\n}", "function db_connect()\n {\n require \"config.php\";\n $connection = new mysqli($host, $db_username, $db_pw, $dbname);\n return $connection;\n }", "function connectDatabase($db)\n {\n $dbhost = $db[\"host\"];\n $dbuser = $db[\"username\"];\n $dbpass = $db[\"password\"];\n $dbname = $db[\"dbname\"];\n $port = $db[\"port\"];\n\n // Create connection\n $conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname, $port);\n\n // Check connection\n if (mysqli_connect_errno()) \n {\n die(\"Failed to connect to MySQL: \" . mysqli_connect_error());\n }\n \n return $conn;\n }", "function connect()\n\t{\n\t\t$this->db=new MySQLi($this->localhos,$this->username,$this->passw,$this->data_name)or die(\"could not connect\");\n\t\t\n\t\treturn $this->db;\n\t}", "function databaseConn() {\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"mysql\";\n $dbname = \"dynamische_applicatie\";\n $conn = null;\n\n try {\n $conn = new PDO(\"mysql:host=$servername;dbname=$dbname\", $username, $password);\n // set the PDO error mode to exception\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n // echo \"Connected successfully\";\n return $conn;\n }\n\n catch(PDOExeption $e) {\n echo \"Connection failed: \" . $e->getMessage();\n }\n }", "function connect() {\n include(\"salon_connect.php\");\n\t\t\n \n\t\t$connection = mysqli_connect(DB_server,DB_user,DB_pass,DB_data);\n\n return $connection;\n }", "public function connect($host, $database, $user, $password);", "function connexionDb()\n{\n $confDb = getConfigFile()['DATABASE'];\n\n\n $type = $confDb['type'];\n $host = $confDb['host'];\n $servername = \"$type:host=$host\";\n $username = $confDb['username'];\n $password = $confDb['password'];\n $dbname = $confDb['dbname'];\n\n $db = new PDO(\"$servername;dbname=$dbname\", $username, $password);\n return $db;\n}", "function getConnection($dbname,$dbpass){\r\t\tmysql_connect(\"localhost\",$dbname,$dbpass) or\r die(\"Could not connect: \" . mysql_error());\r //change to your database name\r\t\tmysql_select_db($dbname) or \r\t\t die(\"Could not select database: \" . mysql_error());\r\t}", "function connect_to_database () {\n $conn = mysqli_connect (\"localhost\", \"root\", \"\", \"db_enrico_manicaro\")\n or die (\"Unable to connect to the database.\");\n \n return $conn;\n }", "function dbconnect()\n\t{\n\t\t$dbConnString = \"host=173.254.28.90 options='--client_encoding=UTF8' user=feedmati_user dbname=feedmati_system password=PZi0wuz9n+XX\";\n\t\t$dbConn = pg_connect($dbConnString ) or die(\"Problem with connection to PostgreSQL:\".pg_last_error());\n\t\treturn $dbConn;\n\t}", "function connect_database() {\n // Basic settings\n $sql_engine = \"MySQL\";\n $sql_server = \"localhost\";\n $sql_user = \"temploggning\";\n $sql_passw = \"temploggning\";\n $sql_database = \"temploggning\";\n\n // Setup connection\n $connection = new mysqli($sql_server, $sql_user, $sql_passw, $sql_database);\n\n if ($connection->connect_errno > 0) {\n die('Unable to connect to database [' . $connection->connect_error . ']');\n }\n\n return $connection;\n}", "function db_connect ()\n{\n global $CONF;\n $link = @mysql_connect ($CONF['database_host'], $CONF['database_user'], $CONF['database_password']) or die (\"<p />DEBUG INFORMATION:<br />Connect: \" . mysql_error ());\n $succes = @mysql_select_db ($CONF['database_name'], $link) or die (\"<p />DEBUG INFORMATION:<br />MySQL Select Database: \" . mysql_error ());\n return $link;\n}", "function dbConnect(){\n\t\t$servername = 'localhost';\n\t\t$username = 'root';\n\t\t$password = 'root';\n\t\t$database = 'ict2101';\n\n\t\t$conn = mysqli_connect($servername, $username, $password,$database);\n\n\t\tif (!$conn) {\n\t\t echo \"Error: Unable to connect to MySQL.\" . PHP_EOL;\n\t\t echo \"Debugging errno: \" . mysqli_connect_errno() . PHP_EOL;\n\t\t echo \"Debugging error: \" . mysqli_connect_error() . PHP_EOL;\n\t\t exit;\n\t\t}\n\n\t\treturn $conn;\n\t\t\n\t}", "public function connect() {\n $this->database = new mysqli(\n $this->dbinfo['host'],\n $this->dbinfo['user'],\n $this->dbinfo['pass'],\n $this->dbinfo['name']\n );\n if ($this->database->connect_errno > 0)\n return $this->fail(\"Could not connect to database: [{$this->database->connect_error}]\");\n }", "function connect() {\n // import database connection variables\n require_once __DIR__ . '/db_config.php';\n\n // Connecting to mysql database\n $con = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD) or die(mysqli_error());\n\n // Selecing database\n $db = mysqli_select_db($con, DB_DATABASE) or die(mysqli_error()) or die(mysqli_error());\n\n // returing connection cursor\n\n return $con;\n }", "protected function db_connect() {\n \n // Data source name\n $this->dsn = 'mysql:host=' . $this->db_host . ';dbname=' . $this->db_name . ';charset=' . $this->db_charset;\n\n // Makes a connection to the database\n $this->db_conn = new PDO( $this->dsn, $this->db_user, $this->db_password );\n\n // When fetching an SQL row it turn into an object\n $this->db_conn->setAttribute( PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ );\n // Gives the Error reporting atribute and throws exeptions\n $this->db_conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n \n // Returns the connection\n return $this->db_conn;\n\n }", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();" ]
[ "0.85834914", "0.85123163", "0.84394974", "0.8315615", "0.8304146", "0.8145481", "0.81304723", "0.8003419", "0.7973031", "0.7962493", "0.7948191", "0.79332757", "0.7919065", "0.7893934", "0.78896993", "0.7868149", "0.78675675", "0.78307843", "0.7822361", "0.7803563", "0.7780782", "0.7778589", "0.7774552", "0.77725685", "0.7769937", "0.7762693", "0.77578187", "0.77504873", "0.7749736", "0.7730821", "0.7721842", "0.7718995", "0.77188957", "0.7713851", "0.7712367", "0.7707734", "0.7696157", "0.7674362", "0.7668853", "0.7666367", "0.7660978", "0.7658153", "0.7654272", "0.7654021", "0.76535374", "0.76393294", "0.76363", "0.7622728", "0.761202", "0.76099974", "0.76088804", "0.76069456", "0.76022094", "0.75897545", "0.75891143", "0.75889677", "0.75824547", "0.75709397", "0.75688833", "0.75675654", "0.75645393", "0.75645393", "0.756246", "0.75566554", "0.7554163", "0.75528264", "0.75452805", "0.7543518", "0.7540721", "0.7539448", "0.7536481", "0.75354767", "0.7533074", "0.75287867", "0.75277674", "0.7524179", "0.75229037", "0.7522001", "0.7517379", "0.751578", "0.7513959", "0.75135124", "0.7509011", "0.7506131", "0.750017", "0.7494614", "0.7487735", "0.7486273", "0.74845505", "0.7477975", "0.74755377", "0.74746686", "0.74746686", "0.74746686", "0.74746686", "0.74746686", "0.74746686", "0.74746686", "0.74746686", "0.74746686", "0.74746686" ]
0.0
-1
creates an array to encode the this array into json(string) format in order to show the response
function response($status,$message,$data){ $result = array(); $result['status'] = $status; $result['message'] = $message; $result['data'] = $data; $result = json_encode($result); echo $result; exit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function jsonSerialize()\n {\n return [['id' => $this->id,\n 'users_id' => $this->users,\n 'result' => $this->result,\n 'time' => $this->time]\n\n ];\n }", "public function jsonString(){\n return json_encode($this->createRequestsArray());\n }", "public function toArray() {\r\n \treturn array(\"response\"=>$this->_response);\r\n }", "public function toJson(){\n\t\t$array = $this->toArray();\n\t\treturn json_encode($array);\n\t}", "public function jsonSerialize() :Array\n {\n return [\n 'questionId' => $this->questionId(),\n 'user' => $this->user,\n 'title' => $this->title,\n 'body' =>$this->body,\n 'tag' => $this->tags,\n 'datePublished'=>$this->datePublished\n ];\n }", "function asJSON(){\n\t\t\treturn json_encode($this->asArray());\n\t\t}", "public function toJSONString(){\n $this->buildArray();\n return json_encode($this->array);\n }", "public function toJSON () {\r\n \treturn json_encode($this->_response);\r\n }", "public function jsonSerialize()\n {\n return [\n 'respuestaSolucion' => [\n 'idRespuestaSolucion' => $this->getIdRespuestaSolucion(),\n 'respuesta' => $this->getRespuesta(),\n 'solucionesIdsoluciones' => $this->getIdSolucion(),\n 'usuariosId' => $this->getIdUsuario()\n ]\n ];\n }", "function jsonSerialize()\n {\n return [\n 'id' => $this->id,\n 'title' => $this->title,\n 'quantity' => $this->quantity,\n 'clientName' => $this->clientName,\n 'address' => $this->address,\n 'email' => $this->email,\n 'state' => $this->state,\n 'dispatchingTime'=> $this->dispatchingTime\n ];\n }", "public function jsonSerialize() {\r\r\n $array = [\r\r\n 'idLunch' => $this->getIdLunch(),\r\r\n 'oneEnterprise' => $this->getOneEnterprise()->getIdEnterprise(), \r\r\n 'onePurchasingFair' => $this->getOnePurchasingFair()->getIdPurchasingFair(), \r\r\n 'lunchesPlanned' => $this->getLunchesPlanned(), \r\r\n 'lunchesCanceled' => $this->getLunchesCanceled(), \r\r\n 'lunchesDetails' => $this->getLunchesDetails(),\r\r\n 'idParticipant' => $this->getIdParticipant()\r\r\n ];\r\r\n return $array;\r\r\n }", "function jsonSerialize() {\n return $this->asArray();\n }", "public function jsonSerialize()\n\t{\n\t\treturn array(\n\t\t\t'count' => $this->count, \n\t\t\t'objects' => $this->tableObjects\n\t\t\t);\n }", "public function jsonSerialize()\n {\n return array_merge(parent::jsonSerialize(),[]);\n }", "public function jsonSerialize()\n {\n return [\n 'name' => $this->name,\n 'number' => $this->number,\n 'title' => $this->title,\n 'nextcall' => $this->nextcall,\n 'action' => $this->action,\n 'call_id' => $this->call_id,\n 'activity' => $this->activity,\n 'edited' => $this->edited,\n 'created' => $this->created\n ];\n }", "private function getJSON(){\n return json_encode($this->getResponseStructure());\n }", "public function resultsToJson ()\n {\n// $res = array();\n// foreach ($this->results() as $result)\n// {\n// array_push($res, array($result));\n// }\n return json_encode($this->results());\n }", "function jsonSerialize()\n {\n return [\n 'meta' => [\n 'offset' => $this->page->getOffset(),\n 'limit' => $this->page->getLimit(),\n 'total' => $this->total,\n ],\n 'data' => $this->results,\n ];\n }", "public function jsonSerialize()\n {\n return\n [\n 'cd_competencia_tecnica'=>$this->cd_competencia_tecnica,\n 'ds_competencia_tecnica'=>$this->ds_competencia_tecnica,\n 'nr_nivel'=>$this->nr_nivel\n ];\n }", "public function jsonize()\n {\n return json_encode($this->toArray());\n }", "public function jsonSerialize()\n {\n return array('title' => $this->title,\n 'size' => $this->size,\n 'unit_price' => $this->unitPrice,\n 'description' => $this->description);\n }", "public function jsonSerialize()\n {\n return [\n 'emp_no' => $this->emp_no,\n 'birth_date' => $this->getCustomData('birth_date'),\n 'first_name' => $this->first_name,\n 'last_name' => $this->last_name,\n 'complet_name' => $this->first_name . ' ' . $this->last_name,\n 'gender' => $this->getGender(),\n 'hire_date' => $this->getCustomData('hire_date'),\n 'salary' => ($this->salary->salary) ?? 0,\n 'titles' => ($this->title->title) ?? '',\n 'departments' => (new DepartmentRepo())->getNames($this->departments)\n ];\n }", "public function jsonSerialize()\n {\n return ['environment' => $this->environment,'stepResults' => $this->stepResults, 'duration' => number_format($this->duration,2),'message' => $this->message];\n }", "public function toJson(){\n return [\n 'id' => $this->id,\n 'title' => $this->title,\n 'sub_name' => $this->sub_name,\n 'bar_code' => $this->bar_code,\n 'flash_code' => $this->flash_code\n ];\n }", "public function jsonSerialize( )\n {\n return array( \n 'tutor' => $this->tutor,\n 'submissionIds' => $submissionIds\n );\n }", "public function jsonSerialize() : array {\n\t\t\t\treturn [\n\t\t\t\t\t'id' => $this->getId(),\n\t\t\t\t\t'cep' => $this->getCep(),\n\t\t\t\t\t'bairro' => $this->getBairro(),\n\t\t\t\t\t'cidade' => $this->getCidade(),\n\t\t\t\t\t'rua' => $this->getRua(),\n\t\t\t\t\t'estado' => $this->getEstado(),\n\t\t\t\t];\n\t\t\t}", "public function jsonSerialize()\n {\n return [\n 'name' => $this->name,\n 'title' => $this->title,\n 'description' => $this->description,\n 'blacklist_expiration_time' => $this->blacklist_expiration_time,\n 'validation' => $this->validation,\n 'nextcall' => $this->nextcall,\n 'color' => $this->color\n ];\n }", "public function jsonSerialize():array\n {\n $rv = [\n 'name' => $this->name,\n 'price' => $this->price,\n 'sidelength' => $this->sidelength,\n 'area' => $this->getArea(),\n 'specials' => $this->specials\n\n ];\n return $rv;\n }", "public function jsonSerialize()\n {\n return [\n \"url\" => $this->url,\n \"method\" => $this->method,\n \"payload\" => $this->render(),\n \"headers\" => $this->headers\n ];\n }", "public function jsonSerialize() {\n return [\n 'id' => $this->id,\n 'user' => $this->user,\n 'title' => $this->title,\n 'is_shared' => $this->is_shared,\n 'price' => $this->price,\n 'tags' => $this->tags,\n 'updated_at' => $this->updated_at->format('Y-m-d H:i:s'),\n 'created_at' => $this->created_at->format('Y-m-d H:i:s')\n ];\n }", "function jsonSerialize()\r\n {\r\n return $this->to_array();\r\n }", "public function jsonSerialize()\n {\n return [\n 'ID'=> $this->getDobavljacID(),\n 'ime'=> $this->getNaziv(),\n 'granica' => $this->getGranicaPovratka()\n ];\n }", "public function jsonSerialize()\n {\n return [\n 'status' => $this->status,\n 'time' => $this->time,\n 'payment' => $this->payment\n ];\n }", "public function jsonSerialize() {\n\n return ['id' => $this->id,\n 'name' => $this->name,\n 'author' => $this->author,\n 'description' => $this->description];\n \n \n }", "public function jsonSerialize()\n {\n return [\n 'name' => $this->name,\n 'title' => $this->title,\n 'address' => $this->address,\n 'direction' => $this->direction,\n 'wait_time' => $this->wait_time,\n 'duration' => $this->duration,\n 'answered' => $this->answered,\n 'text' => $this->text,\n 'time' => $this->time,\n 'result' => $this->result\n ];\n }", "public function jsonSerialize()\n {\n return array('headers' => $this->headers, 'body' => $this->body);\n }", "public function jsonSerialize()\n {\n return [\n 'id' => $this->id,\n 'title' => $this->title,\n 'content' => $this->content,\n 'image' => $this->image,\n 'legend' => $this->legend,\n 'creationDate' => $this->creationDate\n ];\n }", "function jsonSerialize()\n {\n return $this->to_array();\n }", "public function buildJson();", "public function jsonSerialize(){\n return array(\n 'ID' => $this->getID(),\n 'IDSender' => $this->getIDsender(),\n 'photoSender' => $this->getPhotoSender(),\n 'sender'=>$this->getSender(),\n 'receiver'=>$this->getReceiver(),\n 'title' => $this->getTitle(),\n 'body' => $this->getBody(),\n 'sendingTime'=>$this->getSendingTime(),\n 'seen' =>$this->getSeen()\n );\n }", "public function jsonSerialize()\n {\n return [\n \"str\"=>$this->getStr(),\n 'total' => $this->getTotal()\n ];\n }", "private function json()\n {\n return json_encode($this->data);\n }", "function jsonSerialize()\n {\n return array(\n 'pid' => $this->pid,\n 'board' => $this->board,\n 'size' => $this->size,\n 'strategy' => $this->strategy\n );\n }", "public function jsonSerialize()\n {\n $json = array();\n foreach ($this as $key => $value) {\n $json[$key] = $value;\n }\n \n $json['created_at'] = $this->getCreatedAt()->format(\"F j, Y\");\n \n return $json;\n }", "public function __toString()\n {\n return json_encode($this->array);\n }", "public function toResponse()\n\t{\n\t\treturn $this->toArray();\n\t}", "public function jsonSerialize(): array\n {\n Response::jsonField('name', $this->getName());\n Response::jsonField('in', $this->getIn());\n Response::jsonField('description', $this->getDescription());\n Response::jsonField('required', $this->isRequired());\n Response::jsonField('type', $this->getType());\n Response::jsonField('format', $this->getFormat());\n Response::jsonField('allowEmptyValue', $this->isAllowEmptyValue());\n Response::jsonField('collectionFormat', $this->getCollectionFormat());\n Response::jsonField('items', $this->getItems());\n Response::jsonField('schema', $this->getSchema());\n\n return Response::jsonSerialize($this);\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['liable'] = $this->liable;\n $json['charge_processing_fee'] = $this->chargeProcessingFee;\n\n return $json;\n }", "public function jsonSerialize()\r\n {\r\n return array_merge(parent::jsonSerialize(), []);\r\n }", "public function jsonSerialize() {\n return [\n \"nom\"=> $this->name,\n \"age\"=> $this->age,\n \"film\"=> $this->films\n ];\n }", "public function jsonSerialize()\n {\n $cod_cuestiones = (null === $this->getCuestiones())\n ? null\n : $this->getCuestiones()->map(\n function (Cuestion $cuestion) {\n return $cuestion->getIdCuestion();\n }\n );\n\n return [\n 'categoria' => [\n 'idCategoria' => $this->getIdCategoria(),\n 'prop_descripcion' => $this->getPropuestaDescripcion(),\n 'enum_disponible' => $this->isCorrecta()\n ]\n ];\n /**\n * 'categorias' => (null === $cod_cuestiones) ? null : $cod_cuestiones->toArray(),\n */\n }", "public function toJson() {\n return json_encode($this->toArray());\n }", "public function jsonSerialize()\r\n {\r\n $json = array();\r\n $json['destination'] = $this->destination;\r\n $json['hsCode'] = $this->hsCode;\r\n $json['source'] = $this->source;\r\n\r\n return $json;\r\n }", "public function jsonSerialize()\n {\n return [\n 'cards' => $this->cards,\n 'size' => $this->size,\n 'isClickable' => $this->isClickable\n ];\n }", "public function toJson(): array\n {\n return [\n 'title' => $this->getTitle(),\n 'description' => $this->getDescription(),\n 'price' => $this->formatPrice(),\n 'discount' => $this->formatDiscount(),\n ];\n }", "public function json() {\n\t\t$array = wp_array_slice_assoc(\n\t\t\t(array) $this,\n\t\t\tarray(\n\t\t\t\t'id',\n\t\t\t\t'description',\n\t\t\t\t'priority',\n\t\t\t\t'panel',\n\t\t\t\t'type',\n\t\t\t\t'description_hidden',\n\t\t\t\t'section',\n\t\t\t)\n\t\t);\n\n\t\t$array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );\n\t\t$array['content'] = $this->get_content();\n\t\t$array['active'] = $this->active();\n\t\t$array['instanceNumber'] = $this->instance_number;\n\n\t\t$array['customizeAction'] = esc_html__( 'Customizing', 'kirki' );\n\t\tif ( $this->panel ) {\n\t\t\t/* translators: The title. */\n\t\t\t$array['customizeAction'] = sprintf( esc_html__( 'Customizing &#9656; %s', 'kirki' ), esc_html( $this->manager->get_panel( $this->panel )->title ) );\n\t\t}\n\t\treturn $array;\n\t}", "function jsonSerialize()\n {\n return array(\n 'id' => $this->id,\n 'facultyId' => $this->facultyId,\n 'areaCode' => $this->areaCode,\n 'name' => $this->name\n );\n }", "public function toJSON(){\n $jsondata = array();\n $jsondata[\"idCliente\"]=$this->getIdCliente();\n $jsondata[\"idPedido\"]=$this->getIdPedido();\n \n return $jsondata;\n }", "public function jsonSerialize() {\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'name' => $this->getName(),\n\t\t\t'url' => $this->getUrl(),\n\t\t\t'description' => $this->getDescription(),\n\t\t];\n\t}", "public function jsonSerialize()\n {\n return array(\n \"id\" => $this->id,\n \"manufacturer\" => $this->manufacturer,\n \"model\" => $this->model,\n \"plateNumber\" => $this->plateNumber,\n );\n }", "public function asJson()\n {\n return array();\n }", "public function jsonSerialize()\n {\n return [\n 'id'=> $this->getId(),\n 'title'=> $this->getTitle(),\n 'image'=> $this->getImage(),\n 'content'=> $this->getContent(),\n 'date_added'=> $this->getDateAdded(),\n 'id_user'=> $this->getIdUser(),\n 'user'=> $this->user->getName(),\n ];\n }", "public function jsonSerialize(): array\n {\n return array_merge([\n 'sendTrytesResult' => $this->sendTrytesResult->serialize(),\n 'bundle' => $this->bundle->serialize(),\n ], parent::serialize());\n }", "function jsonSerialize()\n {\n return [\n 'start' => $this->start->format('d/m/Y h:i:s'),\n 'end' => $this->end->format('d/m/Y h:i:s'),\n 'description' => $this->description,\n 'questions' => $this->questions,\n ];\n }", "public static function serializeProvider() {\n\t\t$data = array();\n\t\t$data[] = array(array('message' => 'just json test', 'post_id' => 1), array('title' => 'json test', 'message' => '', 'writer_id' => 1), 'message', 'title');\n\t\treturn $data;\n\t}", "public function toJson() {\n\t\t$data = array();\n\t\tforeach ($this->fields as $name => $field) {\n\t\t\t$data += [$name => $field->toJson()];\n\t\t}\n\t\t$top = array(\"success\"=>$this->getSuccess(),\"data\"=>$data,\"text\"=>$this->text);\n\t\treturn $top;\n\t}", "public function jsonSerialize()\n {\n return [\n 'fields' => $this->fields,\n 'entries' => $this->entries\n ];\n }", "public function toArray()\n {\n return [\n 'code' => $this->code,\n 'result' => $this->result ? 0 : -1,\n 'data' => $this->data,\n ];\n }", "public function toJson() {\n\t\treturn json_encode($this->toArray());\n\t}", "public function __toString() {\n\t\t$data = array();\n\t\tforeach ($this->fields as $name => $field) {\n\t\t\t$data += [$name => $field->toJson()];\n\t\t}\n\t\t$top = array(\"success\"=>$this->success,\"data\"=>$data,\"text\"=>$this->text);\n\t\treturn json_encode($top);\n\t}", "function jsonSerialize()\n {\n return $this->toArray();\n }", "function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize():array\n {\n return array(\n 'id' => $this->id,\n 'username' => $this->username,\n 'email' => $this->email,\n 'orcid' => $this->orcid,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'phone' => $this->phone,\n 'address' => $this->address\n );\n\n }", "function jsonSerialize()\n {\n return [\n 'name' => $this->name,\n 'author' => $this->authorModel->fullName,\n 'cover_path' => $this->getCoverWebPath(),\n 'cover_image_name' => $this->preview_path,\n 'release_date' => date('M d, Y', $this->release_date),\n 'created_at' => Yii::$app->getFormatter()->asDatetime($this->created_at),\n 'updated_at' => Yii::$app->getFormatter()->asDatetime($this->updated_at),\n ];\n }", "public function toJsonArray()\n {\n return array(\n 'id' => $this->getId(),\n 'date_created' => $this->getDateCreated()->getTimestamp(),\n 'content' => $this->getContent(),\n );\n }", "public function toJson() : string\n {\n return json_encode($this->toArray(), http_response_code(200));\n }", "function jsonSerialize() {\n return [ \"licenseType\" => $this->licenseType,\n \"supportUntil\" => $this->supportUntil,\n \"buyer\" => $this->buyer,\n \"itemId\" => $this->itemId,\n \"itemName\" => $this->itemName,\n \"hash\" => $this->hash,\n \"lastValidation\" => $this->lastValidation,\n \"purchaseCode\" => $this->purchaseCode ];\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['generation'] = $this->generation;\n $json['status'] = $this->status;\n $json['type'] = $this->type;\n $json['lastTransitionTime'] = $this->lastTransitionTime;\n $json['message'] = $this->message;\n $json['reason'] = $this->reason;\n\n return $json;\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['catalogName'] = $this->catalogName;\n $json['brands'] = $this->brands;\n\n return $json;\n }", "public function toArray()\n {\n return [\n 'title' => $this->title,\n 'body' => $this->body,\n 'sound' => $this->sound,\n 'badge' => $this->badge,\n 'ttl' => $this->ttl,\n 'channelId' => $this->channelId,\n 'data' => empty($this->jsonData) ? '{}' : json_encode($this->jsonData),\n ];\n }", "public function toJson()\r\n {\r\n return json_encode($this->toArray());\r\n }", "public function jsonSerialize() {\n\t\treturn $this->toArray();\n\t}", "public function jsonSerialize()\n {\n $json = array();\n $json['list_id'] = $this->listId;\n $json['sender'] = $this->sender;\n $json['subject'] = $this->subject;\n $json['body'] = $this->body;\n $json['resource_urls'] = $this->resourceUrls;\n $json['send_date'] = $this->sendDate;\n\n return $json;\n }", "public function toJson()\n {\n return json_encode( $this->toArray() );\n }", "public function jsonSerialize()\n {\n return [\n 'productId' => $this->productId,\n 'cycles' => $this->cycles,\n 'cycleType' => $this->cycleType,\n 'quantity' => $this->quantity\n ];\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function toJson()\n {\n return json_encode($this->toArray());\n }", "public function serialize()\n\t{\n\t\treturn json_encode(array(\n\t\t\t'data' => $this->data,\n\t\t\t'this' => $this->getArrayCopy(),\n\t\t\t'name' => $this->name,\n\t\t\t'merged' => $this->merged,\n\t\t));\n\t}", "public function jsonSerialize()\n {\n $json = array();\n $json['id'] = $this->id;\n $json['owner'] = $this->owner;\n $json['applicationId'] = $this->applicationId;\n $json['time'] = $this->time;\n $json['segmentCount'] = $this->segmentCount;\n $json['direction'] = $this->direction;\n $json['to'] = $this->to;\n $json['from'] = $this->from;\n $json['media'] = $this->media;\n $json['text'] = $this->text;\n $json['tag'] = $this->tag;\n\n return $json;\n }", "public function json_encode() {\n try{\n return json_encode((array)array_values(self::get_items()));\n }catch(Exception $e){\n throw $e;\n }\n }", "public function jsonSerialize(): array\n {\n return [\n 'name' => $this->name,\n 'groups' => $this->preparedGroups(),\n ];\n }", "public function jsonSerialize()\r\n {\r\n $json = array();\r\n $json['compositeFault'] = $this->compositeFault;\r\n $json['customerSupport'] = $this->customerSupport;\r\n $json['servicePoints'] = $this->servicePoints;\r\n\r\n return $json;\r\n }" ]
[ "0.76298577", "0.75087965", "0.7481282", "0.7480564", "0.72939545", "0.7226239", "0.7224063", "0.72040206", "0.71653235", "0.71484435", "0.7131901", "0.7105395", "0.7093896", "0.70742196", "0.7069603", "0.70495", "0.70408046", "0.7038674", "0.7035656", "0.70282227", "0.70182395", "0.7008471", "0.69715446", "0.6961022", "0.6955368", "0.6947671", "0.69449764", "0.69437265", "0.6941201", "0.6938331", "0.6935328", "0.69343734", "0.69343185", "0.6928811", "0.69286406", "0.6923805", "0.6908406", "0.69067436", "0.69024456", "0.6899846", "0.6899571", "0.6891774", "0.6857137", "0.6854937", "0.68478525", "0.6846755", "0.68343675", "0.6826424", "0.6824626", "0.68218553", "0.68174154", "0.6816242", "0.68139493", "0.68124026", "0.6811123", "0.68104225", "0.6810215", "0.6809916", "0.68022597", "0.680062", "0.6790999", "0.6785743", "0.6784052", "0.6779336", "0.6777021", "0.67751706", "0.6773978", "0.6768976", "0.6767811", "0.6763469", "0.6758676", "0.6758676", "0.67566407", "0.6750893", "0.67490196", "0.6746032", "0.6745763", "0.67425895", "0.6741797", "0.6741456", "0.67412275", "0.6739356", "0.6739352", "0.673624", "0.6731081", "0.672778", "0.672778", "0.672778", "0.672778", "0.672778", "0.672778", "0.672778", "0.672778", "0.672778", "0.672778", "0.672778", "0.6722187", "0.6721218", "0.6717631", "0.67149824", "0.67139107" ]
0.0
-1
Make sure Orchestra is started.
public function __construct() { Bundle::start('orchestra'); if (false === Orchestra\Installer::installed()) { throw new RuntimeException("Orchestra need to be install first."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function start() {\n\n // TODO: Maybe sometimes\n\n }", "public function start()\n {\n // Este módulo requiere a un usuario logueado\n $this -> setRequireUser( true );\n }", "public function start()\n {\n // For example you can check Auth\n }", "public function run()\n {\n //\n factory(OperacionAccesorio::class,250)->create();\n }", "public function run()\n {\n factory(ClienteCuenta::class,1)->create();\n }", "public function start()\n {\n Session::start();\n\n Environment::start();\n \n Database::start($withDatabase = true);\n \n Router::start();\n }", "public function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$this->user = Orchestra\\Model\\User::find(1);\n\t}", "public function startup();", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start()\n {\n // nop\n }", "public function run()\n {\n factory(Hosting::class, 3)->create();\n }", "public function setUp()\n {\n $this->actAs('Timestampable');\n $this->actAs('SoftDelete');\n }", "public function testStartException()\n\t{\n\t\t// No Petri net set.\n\t\t$this->object->start();\n\t}", "public function run()\n {\n factory(OauthClient::class,1)->create();\n }", "public function run()\n {\n try {\n $this->initial();\n $this->startBackup();\n } catch (NoInicializationException $error) {\n die('[NoInicializationException] '.$error->getMessage());\n } catch (NoDistinationException $error) {\n die('[NoDistinationException] '.$error->getMessage());\n }\n }", "protected function checkStartConditions(): void\n {\n if (!$this->exists) {\n throw new WorkerException('Worker must be properly created before start.');\n }\n\n if ($this->getAttribute('pid') !== null) {\n throw new WorkerException('Worker is running already.');\n }\n }", "public function run()\n {\n factory(App\\TripCoordinator::class, 5)->create();\n }", "public function run()\n {\n// if (config('app.env') == 'production') {\n// dd('生产环境, 不能执行');\n// return;\n//\n// }\n factory(OrgGood::class)->create();\n\n }", "protected function start()\n {\n $status = $this->autoTestController->start();\n\n PacklinkPrestaShopUtility::dieJson($status);\n }", "public function run()\n {\n factory(OauthClients::class,10)->create();\n }", "public function start(): void\n {\n $this->entityManager->getEventManager()->addEventListener($this->initializeEvents, $this);\n }", "public function startup(): void\n {\n $this->handleOnBootListeners();\n $this->initialize();\n $this->handleOnRunListeners();\n }", "public function startup(): void\n {\n $this->handleOnBootListeners();\n $this->initialize();\n $this->handleOnRunListeners();\n }", "public function beforeStart () {\n }", "function start()\n {\n $this->startService();\n $this->startSession();\n }", "protected function _before(){\n $this->startApplication();\n }", "public function run()\n {\n $role = Role::firstOrCreate(['name' => 'admin']);\n\n $permission = Permission::firstOrCreate(['name' => 'delete authority']);\n $role->givePermissionTo($permission);\n\n $permission = Permission::firstOrCreate(['name' => 'delete establishment']);\n $role->givePermissionTo($permission);\n\n $role = Role::firstOrCreate(['name' => 'developer']);\n }", "public function start()\n {\n }", "public function start()\n {\n }", "public function start()\n {\n }", "public function start() {\n $this->setup();\n $this->fight();\n }", "public function setUp() {\n $app = require __DIR__.'/../../bootstrap/app.php';\n $app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap();\n\n $this->consumables=new Consumables();\n }", "public function setUp(): void\n {\n $container = Robo::createDefaultContainer(null, new NullOutput());\n $this->setContainer($container);\n $this->setConfig(Robo::config());\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 function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$base_path = \\Bundle::path('orchestra').'tests'.DS.'fixtures'.DS;\n\t\t\n\t\tset_path('app', $base_path.'application'.DS);\n\t\tset_path('orchestra.extension', $base_path.'bundles'.DS);\n\n\t\t$this->user = \\Orchestra\\Model\\User::find(1);\n\t}", "public function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$this->user = \\Orchestra\\Model\\User::find(1);\n\t}", "public function setUp()\n {\n parent::setUp();\n\n $command = $this->getCommand();\n $this->application->add($command);\n $command->setContainer($this->container);\n }", "public function setUp()\n {\n parent::setUp();\n Artisan::call('migrate');\n Artisan::call('passport:install');\n\n $this->accountService = $this->app->make(AccountService::class);\n }", "public function run()\n {\n //php artisan db:seed --class=TestSeeder\n\t $start = microtime(true);\n\t /**/\n Client::flushEventListeners();\n Client::getEventDispatcher();\n SubClient::flushEventListeners();\n SubClient::getEventDispatcher();\n\t Device::flushEventListeners();\n\t Device::getEventDispatcher();\n\t Sensor::flushEventListeners();\n\t Sensor::getEventDispatcher();\n\t Alert::flushEventListeners();\n\t Alert::getEventDispatcher();\n\t Dashboard::flushEventListeners();\n\t Dashboard::getEventDispatcher();\n\t Report::flushEventListeners();\n\t Report::getEventDispatcher();\n\n factory(Client::class, 'legal', 2)->create();\n\t $Client = Client::find(1);\n\t $Client->user->update(['email'=>'[email protected]']);\n $this->command->info('Client-legal complete ...');\n\n\n// return;\n/*\n\n\t factory(Client::class, 'natural', 1)->create();\n $this->command->info('Client-natural complete ...');\n\n factory(Client::class, 'legal', 4)->create();\n $this->command->info('Client-legal complete ...');\n*/\n factory(SubClient::class, 10)->create();\n\t $Client->sub_clients->first()->user->update(['email'=>'[email protected]']);\n $this->command->info('SubClient complete ...');\n\n\t factory(Device::class, 1)->create();\n\t $this->command->info('Device complete ...');\n\n\t factory(Sensor::class, 1)->create();\n\t $this->command->info('Sensor complete ...');\n\n\t factory(Alert::class, 2)->create();\n\t $this->command->info('Alert complete ...');\n\n\t factory(Report::class, 2)->create();\n\t $this->command->info('Report complete ...');\n\n\t factory(Dashboard::class, 1)->create();\n\t $this->command->info('Dashboard complete ...');\n\n $this->command->info(\"*** Importacao IMPORTSEEDER realizada com sucesso em \" . round((microtime(true) - $start), 3) . \"s ***\");\n\n }", "public function preExecute() {\n }", "public function beforeStartingDeploy()\n {\n // $this->runLocal('./vendor/bin/simple-phpunit');\n }", "public function start() {\n\t\t$this->invoke(\"start\");\n\t}", "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 }", "public function setUp()\n {\n parent::setUp();\n $this->container = $this->app->getContainer();\n\n // Check if phinxlog table exists in database.\n $tableSchema = $this->container->get('settings')->get('db')['database'];\n $pdo = $this->getPdo();\n $stmt = $pdo->prepare('SELECT 1 FROM information_schema.TABLES WHERE TABLE_SCHEMA = :tableschema AND TABLE_NAME = :phinxlog');\n $stmt->execute(['tableschema' => $tableSchema, 'phinxlog' => 'phinxlog']);\n\n $shouldMigrate = true;\n\n if ($stmt->fetch()) {\n $shouldMigrate = $this->hasPendingMigrations($pdo);\n }\n\n if ($shouldMigrate) {\n chdir(__DIR__ . '/../config');\n $wrap = new TextWrapper(new PhinxApplication());\n // Execute the command and determine if it was successful.\n $target = null;\n call_user_func([$wrap, 'getMigrate'], 'local', $target);\n $error = $wrap->getExitCode() > 0;\n if ($error) {\n throw new Exception('Error: Setup database failed with exit code: %s', $wrap->getExitCode());\n }\n }\n\n $this->truncateTables();\n Factory::INSERT()->execute($this->getConnection(), $this->getDataSet());\n }", "public function beforeStart()\n {\n }", "public function run()\n { // Ressalto que a ordem aqui importa muito, para não criar problema com as dependencias existentes.\n\n $this->call([\n // Inserts das configurações do Sistema\n ConfiguracaoTableSeeder::class,\n\n // Insert das informações do usuário\n CategoriaTableSeeder::class,\n\n // Insert das informações do material cientifico\n ColecaoTableSeeder::class,\n PapelTableSeeder::class,\n ArquivoExtensaoTableSeeder::class,\n SituacaoTableSeeder::class,\n ]);\n if(!app()->environment('production')): // Caso esteja no ambiente de teste ou desenvolvimento..\n $this->call([\n // Insert das informações do usuário\n InformacaoPessoalTableSeeder::class,\n UsuarioTableSeeder::class,\n\n // Insert das informações do material cientifico\n CursoTableSeeder::class,\n DisciplinaTableSeeder::class,\n\n // Insert de palavras chaves\n TagsTableSeeder::class,\n ]);\n endif;\n }", "public function run()\n {\n factory(Ospiti::class, 10) -> create();// create server per INSERIRE I DATI NEL DATABASE\n }", "public function setUp()\n {\n $this->command = new InitCommand();\n }", "public function run()\n {\n if(env('APP_ENV') != 'production') {\n DB::table('aulas')->truncate();\n $aulas = factory(\\App\\Aula::class, 20)->create();\n }\n }", "public function setUp():void\n {\n parent::setUp();\n\n $this->actingAs(User::factory()->create());\n }", "private function setup() {\n sfContext::createInstance($this->configuration);\n\n $this->status = TaskStatus::getTaskStatus($this);\n\n $this->logger = new sfFileLogger(\n sfContext::getInstance()->getEventDispatcher(),\n array('file' => './log/tasks/'.get_class($this).'.log'));\n\n if(false === $this->status) {\n $this->log(\"Status row in Database does not exist\");\n $this->status = new TaskStatus();\n $this->status->task_name = get_class($this);\n $this->status->save();\n }\n\n $this->status->description = substr($this->briefDescription, 0, 120);\n\n $this->log(\"Task was executed via cronjob.\");\n }", "public function run() {\n factory(App\\Client::class, 10)->create();\n }", "public function setUp()\n\t{\n\t\t\\Orchestra\\Support\\Acl::register('mock-one', function ($acl)\n\t\t{\n\t\t\t$acl->add_actions(array('view blog', 'view forum', 'view news'));\n\t\t\t$acl->allow('guest', array('view blog'));\n\t\t\t$acl->deny('guest', 'view forum');\n\t\t});\n\t}", "public function start () {\n if (!$this->started) {\n $this->restart();\n }\n }", "public function run()\n {\n $this->environmentPath = env('APP_ENV') === 'production' ||\n env('APP_ENV') === 'qa' ||\n env('APP_ENV') === 'integration' ?\n 'Production':\n 'local';\n //disable FK\n Model::unguard();\n DB::statement(\"SET session_replication_role = 'replica';\");\n\n // $this->call(HrEmployeeTableSeeder::class);\n $this->call(\"Modules\\HR\\Database\\Seeders\\\\$this->environmentPath\\HrEmployeePosTableSeeder\");\n // $this->call(HrEmployeePresetsDiscountTableSeeder::class);\n\n // Enable FK\n DB::statement(\"SET session_replication_role = 'origin';\");\n Model::reguard();\n }", "public function run()\n {\n factory(Sistema::class, 5)->create();\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->filter('before', 'orchestra::auth');\n\t\t\n\t\tEvent::fire('orchestra.started: backend');\n\t}", "public function acquire() {}", "public function setUp(): void\n {\n if (session_id()) {\n session_unset();\n }\n\n $container = $this->container();\n\n $this->obj = new LoginAction([\n 'logger' => $container['logger'],\n 'container' => $container\n ]);\n }", "public function requireStarted() {\n $status = $this->getStatus(TRUE);\n if ($this->isEnabled() && (is_null($status) || !$status->running)) {\n $this->run('start');\n $this->updateStatus();\n }\n }", "public function run()\n {\n factory(societe_has_stage::class, 50)->create();\n }", "public function startup() {\n\t\t$this->canbesignedout = true;\n\t\tparent::startup();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->filter('before', 'orchestra::auth');\n\n\t\tEvent::fire('orchestra.started: backend');\n\t}", "public function setUp(): void\n {\n parent::setUp();\n $user = User::first();\n $this->actingAs($user);\n }", "public function setUp()\n {\n $this->app = $this->createApplication();\n }", "public function run()\n {\n try {\n // Criando usuário para aluno, escola e admin\n $userAluno = factory(App\\Models\\User::class)->create([\n 'name' => 'Evandro Carreira',\n 'email' => '[email protected]',\n 'password' => bcrypt(env('ADMIN_PWD', '123321')),\n ]);\n\n $userEscola = factory(App\\Models\\User::class)->create([\n 'name' => 'Escola Teste',\n 'email' => '[email protected]',\n 'password' => bcrypt(env('ADMIN_PWD', '123321')),\n ]);\n\n $userAdmin = factory(App\\Models\\User::class)->create([\n 'name' => 'Edilson Alexandre',\n 'email' => '[email protected]',\n 'password' => bcrypt(env('ADMIN_PWD', '123321')),\n ]);\n\n // Criando entidades de aluno e escola e associando o user\n $c = new App\\Models\\Cliente();\n $c->nome = 'Evandro Barbosa Carreira';\n $c->ra = '46.755.061-2';\n $c->user()->associate($userAluno);\n $c->save();\n\n $e = new App\\Models\\Empresa();\n $e->nome = 'EscolaTeste';\n $e->cidade = 'Bauru';\n $e->estado = 'SP';\n $e->user()->associate($userEscola);\n $e->save();\n } catch (\\Illuminate\\Database\\QueryException $exception) {\n dd($exception->getMessage());\n echo 'erro';\n }\n }", "protected function _onStart()\n {\n $this->_raise(self::E_LOAD);\n }", "public function execute()\n {\n\n try {\n // log a message that provisioning starts\n $this->getApplication()->getInitialContext()->getSystemLogger()->info(\n 'Now start to create database!'\n );\n\n // load the datasource node\n /** @var \\AppserverIo\\Appserver\\Core\\Api\\Node\\DatabaseNode $databaseNode */\n $databaseNode = $this->getDatasourceNode()->getDatabase();\n\n // load the connection data\n $user = $databaseNode->getUser();\n $db = $databaseNode->getDatabaseName();\n $host = $databaseNode->getDatabaseHost();\n $password = $databaseNode->getPassword();\n\n // create the connection\n $dbh = new \\PDO(sprintf('mysql:host=%s', $host), 'root');\n\n // execute the statement\n $dbh->exec(\"CREATE DATABASE `$db`;\n CREATE USER '$user'@'localhost' IDENTIFIED BY '$password';\n GRANT ALL ON `$db`.* TO '$user'@'localhost';\n FLUSH PRIVILEGES;\");\n\n // log a message that provisioning has been successfull\n $this->getApplication()->getInitialContext()->getSystemLogger()->info(\n 'Successfully created database!'\n );\n\n } catch (\\Exception $e) {\n $this->getApplication()->getInitialContext()->getSystemLogger()->error($e->__toString());\n }\n }", "public function setUp()\n {\n if ( ! $this->app)\n {\n $this->refreshApplication();\n }\n }", "public function run() {\n\t\tfactory ( Role::class, 10 )->create();\n\t}", "public function run()\n {\n $role = Sentinel::getRoleRepository()->createModel()->create([\n 'name' => 'Admiral',\n 'slug' => 'admiral',\n ]);\n }", "public function preExecute() {\n // initialise the facebook api variables\n $app_id = sfConfig::get('app_facebook_app_id');\n $secret = sfConfig::get('app_facebook_secret');\n\n // initialise the facebook SDK object and make it available for all\n // other actions\n $this->facebook = new Facebook(array('appId' => $app_id,\n 'secret' => $secret,\n 'cookie' => true));\n\n // define the current action\n $this->action_name = $this->getActionName();\n }", "public function setUp()\n {\n $command = 'production';\n\n $this->container = Phake::mock('Symfony\\Component\\DependencyInjection\\ContainerInterface');\n Phake::when($this->container)\n ->getParameter('open_orchestra_model.fixtures_interface.' . $command)\n ->thenReturn(array(\n 'OpenOrchestra\\ModelInterface\\DataFixtures\\OrchestraProductionFixturesInterface',\n 'OpenOrchestra\\ModelBundle\\Tests\\DataFixtures\\Loader\\FakeProductionInterface',\n ));\n Phake::when($this->container)\n ->hasParameter('open_orchestra_model.fixtures_interface.' . $command)\n ->thenReturn(true);\n\n $this->loader = new OrchestraContainerAwareLoader($this->container, $command);\n }", "public function start()\n {\n die(\"Must override this function in a driver\");\n }", "public function setUp()\n {\n $this->app = RenaApp::getInstance();\n }", "public function run()\n {\n factory(Servicios::class, 10)->create();\n }", "public function start() {\r\n AuthController::checkAuth();\r\n }", "public function run()\n {\n $customer = factory(Customer::class)->create([\n 'name' => 'Cash Customer',\n 'dni' => '',\n 'phone' => '',\n 'email' => '',\n 'comments' => ''\n ]);\n\n $payment = factory(Payment::class)->create([\"name\" => 'Cash']);\n\n factory(Options::class)->create([\n 'cash_customer' => $customer->id,\n 'payment_id' => $payment->id\n ]);\n\n $role = factory(Role::class)->create([\n 'name' => 'admin',\n 'label' => 'Administrator'\n ]);\n\n factory(Role::class)->create([\n 'name' => 'waiter',\n 'label' => 'Camarero'\n ]);\n\n $createUsers = factory(Permission::class)->create([\n 'name' => 'create_users',\n 'label' => 'Create users in the system'\n ]);\n\n $changeSettings = factory(Permission::class)->create([\n 'name' => 'update_settings',\n 'label' => 'Update settings in the system'\n ]);\n\n $role->givePermissionTo($createUsers);\n $role->givePermissionTo($changeSettings);\n\n $user = factory(User::class)->create([\n 'name' => 'Administrator',\n 'username' => 'admin',\n 'password' => bcrypt('admin')\n ]);\n\n $user->assignRole('admin');\n }", "public function run()\n {\n \t//DB::statement('TRUNCATE TABLE {clima_ambiente} RESTART IDENTITY CASCADE');\n factory(Clima_Ambiente::class,50)->create();\n }", "public function run()\n {\n factory(Seguradora::class, 20)->create();\n }", "private function startup()\n\t{\n\t\t$this->registerSigHandlers();\n\t\t$this->pruneDeadWorkers();\n\t\tEvent::trigger('beforeFirstFork', $this);\n\t\t$this->registerWorker();\n\t}", "public function transactionStart()\n\t{\n\t\treturn;\n\t}", "public function run()\n {\n $orchestrator = App\\UiPathOrchestrator::where('code', 'DEV17')->first();\n $client = new App\\Client([\n 'name' => 'Robotics Team',\n 'code' => '89C3R-R',\n 'ui_path_orchestrator_tenant' => 'Default',\n 'ui_path_orchestrator_api_user_username' => 'api_user',\n 'ui_path_orchestrator_api_user_password' => 'apiuser2019!',\n 'elastic_search_url' => 'http://swdcfregb705.cib.net:9200/',\n 'elastic_search_index' => 'kibana_sample_data_ecommerce'\n ]);\n $client->orchestrator()->associate($orchestrator);\n $client->save();\n\n $orchestrator = App\\UiPathOrchestrator::where('code', 'DEV19')->first();\n $client = new App\\Client([\n 'name' => 'Migration Team',\n 'code' => 'MIG',\n 'ui_path_orchestrator_tenant' => 'Default',\n 'ui_path_orchestrator_api_user_username' => 'api_user',\n 'ui_path_orchestrator_api_user_password' => 'apiuser2019!',\n 'elastic_search_url' => 'http://swdcfregb705.cib.net:9200/',\n 'elastic_search_url' => 'http://swdcfregb705.cib.net:9200/',\n 'elastic_search_index' => 'kibana_sample_data_flights'\n ]);\n $client->orchestrator()->associate($orchestrator);\n $client->save();\n }", "public function start(): void {}", "public function setUp()\n {\n // leading to an errant invalid class alias being reported.\n $this->container = $this->prophesize(ServiceManager::class);\n $this->container->willImplement(ContainerInterface::class);\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}", "public function start()\n {\n // TODO: Implement start() method.\n }", "public function setup() {}", "public function setUp(): void\n {\n parent::setUp();\n $user = factory(User::class)->create();\n $role = factory(Role::class)->create(['name' => 'admin']);\n $user->roles()->attach($role);\n $this->actingAs($user);\n }", "public function setUp()\n {\n $this->client = static::createClient();\n $this->container = $this->client->getContainer();\n }", "protected function setUp()\n\t{\n\t\t$this->object = new RedisTools;\n\t}" ]
[ "0.5725793", "0.5621714", "0.5621693", "0.54500204", "0.5418137", "0.5398228", "0.5357811", "0.5356517", "0.53394306", "0.53394306", "0.53387874", "0.53379965", "0.53379965", "0.53379965", "0.53379965", "0.53379965", "0.53379965", "0.53373814", "0.5330977", "0.53188014", "0.5316863", "0.5300687", "0.52757996", "0.5252453", "0.52516395", "0.5246468", "0.5245337", "0.5244496", "0.5237971", "0.5236167", "0.5225852", "0.5225852", "0.52140033", "0.5200945", "0.51966053", "0.5195599", "0.51834244", "0.51834244", "0.51834244", "0.51757276", "0.51716053", "0.51687884", "0.51670355", "0.5165436", "0.5158639", "0.5152896", "0.5143485", "0.5138327", "0.5131266", "0.51272947", "0.5127284", "0.5122273", "0.51058555", "0.51032853", "0.50987315", "0.5097914", "0.50936127", "0.50927097", "0.50910175", "0.50879073", "0.5075636", "0.5075267", "0.5061392", "0.5053777", "0.50519043", "0.50453335", "0.5044735", "0.50395435", "0.5031183", "0.5027818", "0.502452", "0.5024418", "0.50241303", "0.50113004", "0.5008316", "0.5004663", "0.50018257", "0.5000155", "0.49919257", "0.49838594", "0.49816468", "0.498058", "0.49783528", "0.49737442", "0.49711907", "0.49525207", "0.49511513", "0.4940991", "0.49378005", "0.4935842", "0.49300504", "0.49293283", "0.49261335", "0.49237165", "0.49206066", "0.49186662", "0.49183375", "0.4909832", "0.49056846", "0.49049258" ]
0.70848686
0
Make changes to the database.
public function up() { $admin = Orchestra\Model\Role::admin(); $member = Orchestra\Model\Role::member(); $acl = Orchestra\Acl::make('diskus', Orchestra::memory()); $guest_actions = array('View Topic'); $member_actions = array_merge($guest_actions, array('Create Topic')); $actions = array_merge($member_actions, array('Manage Diskus')); $acl->add_actions($actions); $acl->add_roles(array($admin->name, $member->name)); $acl->allow($admin->name, $actions); $acl->allow($member->name, $member_actions); $acl->allow('guest', $guest_actions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateDB()\n {\n\n }", "public function run()\n {\n $date = new DateTime();\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n DB::table('objectives')->insert([\n 'label' => 'root',\n 'goal' => 0,\n 'deadline' => 0,\n 'parent_objective_id' => 1,\n 'created_at' => $date->getTimestamp(),\n 'updated_at' => $date->getTimestamp()\n ]);\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "public function migrate()\n {\n $db = new \\SQLite3(\"ATM.db\");\n\n $query = \"CREATE TABLE IF NOT EXISTS \" . $this->table_name . \" \";\n $fields = array();\n\n foreach($this->fields as $name=>$type) {\n $fields[] = \"$name $type\";\n }\n\n $query .= \"(\" . implode(\", \", $fields) . \")\";\n\n $db->exec($query);\n }", "public function migrateDb();", "public function change()\n {\n $this->table('news', ['id' => false, 'primary_key' => ['id']])\n ->addColumn('id', 'biginteger', ['identity' => true])\n ->addColumn('title', 'string', ['limit' => 255])\n ->create();\n\n $this->table('news1', ['id' => false, 'primary_key' => ['id']])\n ->addColumn('id', 'biginteger', ['identity' => true])\n ->addColumn('title', 'string', ['limit' => 255])\n ->create();\n }", "public function change()\n {\n $statistics = $this->table('vrchat');\n $statistics->addColumn('auth', 'string', ['limit' => 100])\n ->addColumn('apiKey', 'string', ['limit' => 100])\n ->addColumn('login', 'string', ['limit' => 100])\n ->addColumn('password', 'string', ['limit' => 100])\n ->create();\n\n // inserting only one row\n $singleRow = [\n 'id' => 1,\n 'auth' => '',\n 'apiKey' => 'JlE5Jldo5Jibnk5O5hTx6XVqsJu4WJ26',\n 'login' => 'Loli E1ON',\n 'password' => ''\n ];\n\n $table = $this->table('vrchat');\n $table->insert($singleRow);\n $table->saveData();\n\n }", "public function change()\n {\n $table = $this->table('backupDish', ['id'=>false, 'primary_key'=>['sequenceNumber']]);\n $table\n ->addColumn('sequenceNumber', 'integer', ['limit'=>8])\n ->addColumn('dishNumber', 'integer', ['limit' => 8])\n ->addColumn('dishName', 'string', ['limit' => 32])\n ->addColumn('createDate', 'date')\n ->addColumn('price', 'integer', ['limit' => 12])\n ->addColumn('description', 'string', ['limit' => 1000])\n ->addColumn('userName', 'string', ['limit' => 32])\n ->addColumn('deleteOn', 'date')\n ->addColumn('imageName', 'string', ['limit' => 32])\n ->create();\n $sql = 'ALTER TABLE backupDish MODIFY COLUMN sequenceNumber int auto_increment';\n $this->execute($sql);\n }", "public function run()\n {\n \\DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n \t\\DB::table('roles')->truncate();\n \t\\DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n\t\tDB::statement(\"INSERT INTO roles (id, role, description) VALUES\n\t\t\t(1, 'ADMINISTRATOR','ADMINISTRATOR'),\n\t\t\t(2, 'BRANCH MANAGER','BRANCH MANAGER');\");\n }", "public function db_update() {}", "public function refreshDatabase()\n {\n $this->validateDatabase();\n $this->copySqliteCreate();\n $this->runMigrations();\n\n copy($this->baseSqlite(), $this->copySqlite());\n }", "public function saveToDb()\n\t{\n\t\t$db = \\App\\Db::getInstance('admin');\n\t\t$tablesData = array_intersect_key($this->getData(), $this->changes);\n\t\tforeach ($tablesData as $key => $value) {\n\t\t\t$db->createCommand()->update($this->baseTable, ['value' => $value], ['type' => $this->type, 'name' => $key])->execute();\n\t\t}\n\t}", "function migrate_db() {\r\n \r\n // $migrater->create_migrations_table();\r\n // $migrater->build_schema();\r\n }", "public function change(): void\n {\n $leads = $this->table('leads');\n $leads->addColumn('id_proyecto', 'integer')\n ->addColumn('status', 'integer')\n ->addColumn('comentarios', 'text')\n ->addColumn('created_at', 'timestamp')\n ->addColumn('updated_at', 'timestamp')\n ->addForeignKey('id_proyecto', 'proyectos', 'id', ['delete' => 'NO_ACTION', 'update' => 'NO_ACTION'])\n ->create();\n\n $datos = $this->table('datos');\n $datos->addColumn('id_lead', 'integer')\n ->addColumn('campo', 'string', ['limit' => 250])\n ->addColumn('valor', 'string', ['limit' => 250])\n ->addColumn('created_at', 'timestamp')\n ->addColumn('updated_at', 'timestamp')\n ->addForeignKey('id_lead', 'leads', 'id', ['delete' => 'CASCADE', 'update' => 'CASCADE'])\n ->create();\n }", "public function migrateDatabase();", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n $this->usersRepository->truncate();\n $this->usersRepository->create([\n 'name' => 'Omar Furrer',\n 'email' => '[email protected]',\n 'password' => '12345678'\n ], 'super admin');\n $this->usersRepository->create([\n 'name' => 'Ahmed EL Gallad',\n 'email' => '[email protected]',\n 'password' => '12345678'\n ], 'super admin');\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "function migrate(){\n\n create_table();\n save_migration_tables();\n\n}", "public function change(): void\n {\n $foreign_keys = [\n 'session_expiration' => ['column' => 'session_id', 'table' => 'session'],\n ];\n foreach ($foreign_keys as $table => $key) {\n $this->table($table)\n ->dropForeignKey($key['column'])\n ->save();\n }\n // update all the primary key id columns\n $primary_keys = [\n 'cron', 'datastore', 'defex', 'email', 'email_unsubscribe',\n 'filestore', 'locking', 'page', 'page_link', 'page_slug',\n 'rich_media', 'search_index', 'session', 'session_expiration',\n 'user', 'user_group', 'user_group_membership', 'user_source'\n ];\n foreach ($primary_keys as $table) {\n $this->table($table)\n ->changeColumn('id', 'integer', ['signed' => false, 'null' => false, 'identity' => true])\n ->changePrimaryKey('id')\n ->save();\n }\n // re-add all the foreign keys that reference primary key id columns\n foreach ($foreign_keys as $table => $key) {\n $this->table($table)\n ->changeColumn($key['column'], 'integer', ['null' => false, 'signed' => false])\n ->addForeignKey($key['column'], $key['table'])\n ->save();\n }\n }", "public function updateDatabase(){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Get all of the columns in the database table\n\t\t$columns = static::$columns;\n\t\t//Because we dont want the ID to change, remove the ID from the database\n\t\tunset($columns[array_search('id', $columns)]);\n\t\t//If we had a timecreated and timeupdated column, we would unset the timecreated column here\n\n\t\t//Write an Update Query\n\t\t$query = \"UPDATE \" . static::$tableName . \" SET \";\n\t\t$updatecols = [];\n\t\tforeach ($columns as $column){\n\t\t\tarray_push($updatecols, $column . \"=:\" . $column);\n\t\t}\n\t\t$query .= implode(\",\", $updatecols);\n\t\t$query .= \" WHERE id =:id\";\n\t\t$statement = $db->prepare($query);\n\n\t\tforeach(static::$columns as $column){\n\t\t\t//Hash the password\n\t\t\tif($column === 'password'){\n\t\t\t\t$this->$column = password_hash($this->$column, PASSWORD_DEFAULT);\n\t\t\t}\n\t\t\t$statement->bindValue(\":\".$column, $this->$column);\n\t\t}\n\t\t$statement->execute();\n\t}", "public function run()\n {\n $data = array(\n array(\n 'projectid' => 1,\n 'project' => 'Project Nova',\n 'desc' => 'sample project',\n 'visibility' => 'public',\n 'created' => time()\n ),\n array(\n 'projectid' => 2,\n 'project' => 'Project X',\n 'desc' => 'sample project',\n 'visibility' => 'public',\n 'created' => time()\n )\n );\n $table = $this->table('projects');\n $table->insert($data)\n ->save();\n }", "public function migrate()\n\t{ \n\t\t(new MigratorInterface)->migrate();\n\t}", "public function setupDatabase()\n {\n exec('rm ' . storage_path() . '/testdb.sqlite');\n exec('cp ' . 'database/database.sqlite ' . storage_path() . '/testdb.sqlite');\n }", "private function make()\n {\n \n $file = database_path().'/migrations/'.$this->fileName.'.php';\n \n $content = $this->blueprint();\n \n $this->file_write( $file, $content );\n \n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::table('users')->insert([\n [\n 'id' => 1,\n 'name' => 'admin',\n 'email' => '[email protected]', \n 'password' => Hash::make('filebankadmin'), \n 'admin' => config('env.user.admin'), \n 'created_at' => Carbon::now()->toDateTimeString(), \n 'updated_at' => Carbon::now()->toDateTimeString(), \n ],\n ]);\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n DB::table('AuditModels')->insert([\n 'codice' => \"001\",\n 'descrizione' => \"Audit Fornitore\",\n 'versione' => \"Rev. 03 del 06-04-2012\",\n ]);\n\n DB::table('AuditModels')->insert([\n 'codice' => \"002\",\n 'descrizione' => \"Audit Preliminare\",\n 'versione' => \"1.5.3\",\n ]);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n DB::beginTransaction();\n// $this->seed();\n DB::commit();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n \\DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n \t\\DB::table('companies')->truncate();\n \t\\DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n\t\tDB::statement(\"INSERT INTO companies (id, code, company) VALUES\n\t\t\t(1, '001','OWNDAYS'),\n\t\t\t(2, '002','PANDORA'),\n\t\t\t(3, '003','ANELLO');\");\n }", "public function run()\n {\n DB::table('biblios')->insert([\n \"name\" => \"livre\",\n \"description\" => \"Ceci est une description\",\n\n ]);\n DB::table('biblios')->insert([\n \"name\" => \"livres\",\n \"description\" => \"Ceci est une description\",\n\n ]);\n DB::table('biblios')->insert([\n \"name\" => \"livrette\",\n \"description\" => \"Ceci est une description\",\n\n ]);\n }", "public function run()\r\n {\r\n //\r\n DB::table('category_services')->updateOrInsert([\r\n\r\n 'name'=>'Site',\r\n ]);\r\n DB::table('category_services')->updateOrInsert([\r\n\r\n 'name'=>'Envio automático de e-mails',\r\n ]);\r\n DB::table('category_services')->updateOrInsert([\r\n\r\n 'name'=>'Painel de controle do site',\r\n ]);\r\n DB::table('category_services')->updateOrInsert([\r\n\r\n 'name'=>'Formulário de cadastro',\r\n ]);\r\n DB::table('category_services')->updateOrInsert([\r\n\r\n 'name'=>'Controle administrativo de clientes',\r\n ]);\r\n DB::table('category_services')->updateOrInsert([\r\n\r\n 'name'=>'Controle financeiro',\r\n ]);\r\n DB::table('category_services')->updateOrInsert([\r\n\r\n 'name'=>'Controle de produtos',\r\n ]);\r\n }", "public function run()\n {\n \n \\DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n \\DB::table('states')->delete();\n \n \\DB::table('states')->insert(array (\n 0 => \n array (\n 'id' => 2,\n 'state_name' => 'Delaware',\n 'state_code' => '',\n 'co_no' => 1,\n 'is_deleted' => 0,\n 'is_active' => 1,\n 'userc_id' => 0,\n 'useru_id' => NULL,\n 'userd_id' => NULL,\n 'deleted_at' => NULL,\n 'created_at' => '2019-05-16 15:46:16',\n 'updated_at' => '2019-05-16 15:46:16',\n ),\n ));\n\n \\DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n \n \n }", "public function change(): void\n {\n $this->table('filestore')\n ->addColumn('uuid', 'uuid', ['null' => false])\n ->addColumn('hash', 'string', ['length' => 32, 'null' => false])\n ->addColumn('filename', 'string', ['length' => 100, 'null' => false])\n ->addColumn('bytes', 'integer', ['signed' => false, 'null' => false])\n ->addColumn('parent', 'uuid', ['null' => true])\n ->addColumn('meta', 'json', ['null' => false])\n ->addColumn('created', 'biginteger', ['signed' => false, 'null' => false])\n ->addColumn('created_by', 'uuid', ['null' => false])\n ->addIndex(['uuid'], ['unique' => true])\n ->addIndex(['hash'])\n ->addIndex(['filename'])\n ->addIndex(['parent'])\n ->addForeignKey(['created_by'], 'user', ['uuid'])\n ->create();\n }", "public function change()\n {\n $table = $this->table('pokemons');\n $table->addColumn('name', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ]);\n $table->addColumn('height', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->addColumn('weight', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->addColumn('default_front_sprite_url', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ]);\n $table->addColumn('created', 'datetime', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('modified', 'datetime', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->create();\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('licenses')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n\n License::create([\n 'license_name' => 'IFR'\n ]);\n License::create([\n 'license_name' => 'VFR'\n ]);\n }", "public function migrate()\n\t{\n\t}", "public function change()\n {\n $table = $this->table('entrant_to_ticket');\n\n if (!$table->exists()) {\n $table\n ->addColumn('id_entrant', 'integer')\n ->addColumn('id_ticket', 'integer')\n ->addColumn('is_done', 'boolean', [\n 'default' => 0\n ])\n ->addColumn('rating', 'integer')\n ->addForeignKey('id_entrant', 'entrants')\n ->addForeignKey('id_ticket', 'tickets')\n\n ->addTimestamps('created', 'modified')\n ->save();\n }\n }", "public function execute() {\n $oldMigrations = new Filesystem(\"App/system/databases/migrations\");\n $oldMigrations->addFilter(new MigrationFilter($this->model->getShortModelName()));\n\n\n //todo: write custom iterator\n $oldMigrations->customCallback([$this, \"applyOldMigrations\"]);\n //todo: get the current model and get the diffrences between that and the migration\n //todo: write a new migration.\n //\n // $this->buildChangeSet();\n //do stuff execute all the things\n $this->createNewMigration();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('religions')->truncate();\n DB::table('religions')->insert([\n 'name' => 'Hindu', \n ]);\n DB::table('religions')->insert([\n 'name' => 'Muslim', \n ]);\n DB::table('religions')->insert([\n 'name' => 'Christian', \n ]);\n DB::table('religions')->insert([\n 'name' => 'Jain', \n ]);\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n \t\n \tUser::truncate();\n \n Schema::enableForeignKeyConstraints();\n\n $usersToMigrate = Migrate::all();\n\n collect($usersToMigrate)->each(function($user) {\n \t$this->create($user);\n });\n\n $this->admin();\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n MainSlider::truncate();\n $this->command->info('[main_slider] table truncated...');\n \n DB::beginTransaction();\n $this->seed();\n DB::commit();\n\n $this->command->info('[main_slider] table seeded...');\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function change()\n {\n\t\t\t// Create challange table (PrimaryKey is auto created)\n\t\t\t$this->table('shopify_app_reviews')\n\t\t\t\t->addColumn('shopify_domain', 'string', ['limit' => 255])\n\t\t\t\t->addColumn('app_slug', 'string', ['limit' => 255])\n\t\t\t\t->addColumn('star_rating', 'integer', ['null' => true])\n\t\t\t\t->addColumn('previous_star_rating', 'integer', ['null' => true])\n\t\t\t\t->addColumn('updated_at', 'datetime', ['null' => true])\n\t\t\t\t->addColumn('created_at', 'datetime', ['null' => true])\n\t\t\t\t->addIndex('shopify_domain', ['unique' => true])\n\t\t\t\t->addIndex('app_slug', ['unique' => true])\n\t\t\t\t->create();\n }", "public function change(): void\n {\n //$users = $this->table('users', array('id' => false, 'primary_key' => ['uuid']));\n $users = $this->table('users');\n $users->addColumn('uuid', 'binary', ['limit' => 16])\n ->addColumn('username', 'string', ['limit' => 20])\n ->addColumn('password', 'string', ['limit' => 255])\n ->addColumn('email', 'string', ['limit' => 100])\n ->addColumn('first_name', 'string', ['limit' => 30])\n ->addColumn('last_name', 'string', ['limit' => 30])\n ->addTimestamps()\n ->addIndex(['uuid', 'username', 'email'], ['unique' => true])\n ->create();\n }", "public function run()\n\t{\n\t\tDB::table('responsibility')->delete();\n \n DB::table('responsibility')->insert(array(\n array('id'=>'1000','name'=>'Manage Project','description'=>'One who manages project'),\n array('id'=>'1001','name'=>'Manage User','description'=>'One who manages user')\n ));\n\t}", "public function run()\n {\n DB::table('cars')->insert([\n 'make' => 'saab',\n 'model' => '9-3',\n 'year' => '1999',\n 'rating' => 3\n ])\n }", "public function migrate() {}", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n DB::table('loaitaikhoan')->truncate();\n\n $data = [\n \t['ten' => 'Người tìm việc'],\n \t['ten' => 'Nhà tuyển dụng']\n ];\n\n foreach ($data as $v) {\n \tDB::table('loaitaikhoan')->insert(\n \t\t[\n \t\t\t'ten' => $v['ten'],\n \t\t\t'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n \t\t\t'updated_at' => Carbon\\Carbon::now()->toDateTimeString()\n \t\t]\n \t);\n } \n\n Schema::enableForeignKeyConstraints();\n }", "public function run()\n {\n \t\tDB::table('models')->insert($models);\n }", "public function run()\n {\n DB::table('product')->delete();\n DB::statement(\"ALTER TABLE `product` AUTO_INCREMENT = 1;\");\n\n App\\Product::create([\n 'type' => 'ticket'\n\n ]);\n\n App\\Product::create([\n 'type' => 'service'\n ]);\n }", "public function change()\n {\n\t$fossil = $this->execute\n\t(\"CREATE TABLE fossil \n\t\t( id BIGINT NOT NULL AUTO_INCREMENT\n\t\t, submission_date DATETIME NOT NULL\n\t\t, paleo_decision TINYINT NOT NULL\n\t\t, latitude DOUBLE NOT NULL\n\t\t, longitude DOUBLE NOT NULL\n\t\t, title VARCHAR(255) NOT NULL\n\t\t, description VARCHAR(4096) NOT NULL\n\t\t, visitor_id\tBIGINT NOT NULL\n\t\t, rational\tVARCHAR(4096)\n\t\t, PRIMARY KEY (ID)\n\t\t-- , FOREIGN KEY (paleo_decision) REFERENCES decision(id)\n\t\t-- , FOREIGN KEY (vistor_id) REFERENCES visitor(id)\n\t\t); \"\n\t);\n\n\t$decision = $this->execute\n\t(\"CREATE TABLE decision \n\t\t( id TINYINT NOT NULL\n\t\t, decision CHAR NOT NULL\n\t\t, PRIMARY KEY (id)\n\t\t);\"\n\t);\n\n\t$vote = $this->execute\n\t(\"CREATE TABLE vote\n\t\t(ID BIGINT NOT NULL AUTO_INCREMENT\n\t\t, fossil_id BIGINT NOT NULL\n\t\t, vote Bool NOT NULL\n\t\t, visitor_id BIGINT \n\t\t, PRIMARY KEY (id)\n\t\t-- , FOREIGN KEY (fossil_id) REFERENCES fossil(id)\n\t\t-- , FOREIGN KEY (visitor_id) REFERENCES visitor(id)\n\t\t);\"\n\t);\n\n\t$visitor = $this->execute\n\t(\"CREATE TABLE visitor\n\t\t( id BIGINT NOT NULL AUTO_INCREMENT\n\t\t, name VARCHAR(1024) NOT NULL\n\t\t, email VARCHAR(1024) \n\t\t-- , TwitterThing\n\t\t, PRIMARY KEY (id)\n\t\t-- Add OAuth Stuff too\n\t\t);\"\n\t);\n\n\t$auto_int_100 = $this->execute\n\t(\"ALTER TABLE visitor AUTO_INCREMENT=101\"\n\t);\n\n\t$picture = $this->execute\n\t(\"CREATE TABLE picture\n\t\t( id BIGINT NOT NULL AUTO_INCREMENT\n\t\t, primary_picture BOOL NOT NULL\n\t\t, fossil_id BIGINT NOT NULL\n\t\t, filepath VARCHAR\n\t\t, picture_data BLOB(65535)\t\n\t\t-- add foreign key to fossil(id)\n\t\t);\"\t\n\t);\n\n\t$auto_int_1000 = $this->execute\n\t(\"ALTER TABLE picture AUTO_INCREMENT=1001\"\n\t);\n\t(\"ALTER TABLE picture AUTO_INCREMENT=1000\");\n\n\t$archived_emails = $this->execute\n\t(\"CREATE TABLE archived_emails\n\t\t( id\tBIGINT NOT NULL AUTO_INCREMENT\n\t\t, fossil_id BIGINT NOT NULL\n\t\t, inquiry_email VARCHAR(4096)\n\t\t, amnh_response_email VARCHAR(4096)\n\t\t-- add foreign key to fossil(id)\n\t\t);\"\n\t);\n }", "protected function setupDatabase()\n {\n $this->call('migrate');\n $this->call('db:seed');\n\n $this->info('Database migrated and seeded.');\n }", "public function operation(): void\n {\n echo \"Save to database ...\\n\\r\";\n }", "public function saveToDb()\n\t{\n\t\t$this->addDocument();\n\t\tparent::saveToDb();\n\t}", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('leads')->truncate();\n factory(Lead::class, 2)->create(['user_id' => factory(User::class)->create()->id]);\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n ModelHasRole::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $model=new ModelHasRole;\n $model->role_id ='1';\n $model->model_type ='App\\User';\n $model->model_id ='1';\n $model->save();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Sources::truncate();\n\n // Create few columns\n Sources::create(['name' => 'CoinMarketCap', 'url' => 'https://coinmarketcap.com/']);\n Sources::create(['name' => 'CoinCap', 'url' => 'https://coincap.io/']);\n }", "public function run()\n {\n DB::table('colegios')->insert([\n 'name' => 'SAFA',\n 'codigo' => '123',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ]);\n\n DB::table('colegios')->insert([\n 'name' => 'Mendoza',\n 'codigo' => '000',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ]);\n }", "public function run()\n {\n \tSchema::disableForeignKeyConstraints();\n Role::truncate();\n\n Role::insert([\n \t[\n \t\t'name' => 'admin',\n \t\t'description' => 'managment full system'\n \t],\n \t[\n \t\t'name' => 'garage',\n \t\t'description' => 'garage use system'\n \t],\n [\n 'name' => 'user',\n 'description' => 'people use system'\n ],\n ]);\n }", "public function run()\n {\n \\Illuminate\\Support\\Facades\\DB::table('fees')->insert(\n [\n ['feeName'=>'Uniform','description'=>'4 PCS','amount'=>60],\n ['feeName'=>'Meals','description'=>'','amount'=>50000],\n ['feeName'=>'Fine','description'=>'','amount'=>300],\n\n ]);\n }", "public function run()\n {\n $path = 'database/seeds/SQLFiles/Products.sql';\n DB::unprepared(file_get_contents($path));\n $this->command->info('Products table seeded!');\n }", "public function change()\n {\n $this->table('change_history')\n ->setComment('数据修改记录')\n ->setEngine('InnoDB')\n ->addColumn('model_type','string', ['comment' => '数据模型类名'])\n ->addColumn('model_id', 'integer', ['comment' => '数据ID'])\n ->addColumn('before', 'text', ['comment' => '修改前内容'])\n ->addColumn('after', 'text', ['comment' => '修改后内容'])\n ->addColumn('method', 'string', ['comment' => '请求方式'])\n ->addColumn('url', 'text', ['comment' => '请求url'])\n ->addColumn('param', 'text', ['comment' => '请求参数'])\n ->addFingerPrint()\n ->create();\n }", "public function run()\n {\n \\Illuminate\\Support\\Facades\\Schema::disableForeignKeyConstraints();\n \\Illuminate\\Support\\Facades\\DB::table('classes')->truncate();\n \\Illuminate\\Support\\Facades\\Schema::enableForeignKeyConstraints();\n\n Grade::insert([\n ['name' => 10, 'sub' => 1],\n ['name' => 10, 'sub' => 2],\n ['name' => 11, 'sub' => 1],\n ['name' => 11, 'sub' => 2],\n ['name' => 12, 'sub' => 1],\n ['name' => 12, 'sub' => 2],\n ]);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n DB::table('branches')->truncate();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n // create user\n \\App\\Model\\Branch::create([\n 'location' => 'Chaya Center',\n 'phone_number' => '123456789',\n 'open_time' => '9 AM',\n 'close_time' => '8 PM'\n ]);\n }", "public function run()\n {\n $this->disableForeignKeys();\n\n // Add the master administrator, user id of 1\n Year::create([\n 'year' => '2020',\n ]);\n\n Year::create([\n 'year' => '2021',\n ]);\n\n Year::create([\n 'year' => '2022',\n ]);\n\n Year::create([\n 'year' => '2023',\n ]);\n\n Year::create([\n 'year' => '2024',\n ]);\n\n $this->enableForeignKeys();\n }", "public function run()\n {\n db::truncate();\n foreach ([\n 'NP'=>'Draft','NJ'=>'Pending',\n 'CN'=>'Cancle','AJ'=>'Assigned',\n 'JC'=>'Evaluate','SC'=>'Success',\n ] as $key=>$value) {\n db::create([\n 'id'=>$key,\n 'name'=>$value\n ]);\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \\App\\User::truncate();\n\n $user = new \\App\\User();\n $user->name = \"admin\";\n $user->email = \"[email protected]\";\n $user->mobile = \"0555018490\";\n $user->role = \"admin\";\n $user->image = \"users/1.png\";\n $user->email_verified_at = \\Carbon\\Carbon::now();\n $user->password = bcrypt('123456');\n $user->save();\n\n\n\n\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "public function run()\n {\n DB::table('education')->insert([\n ['name' => 'Среднее'],\n ['name' => 'Среднее профессиональное'],\n ['name' => 'Бакалавриат'],\n ['name' => 'Магистратура'],\n ]);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n DB::table('users')->truncate();\n DB::table('users')->insert([\n 'full_name'=>'admin',\n 'email'=>'[email protected]',\n 'phone'=>'0987987987',\n 'password'=>Hash::make('123456'),\n 'created_at'=>'2021-01-01'\n ]);\n }", "public function run()\n {\n $states = require __DIR__.'/../files/states.php';\n \n State::truncate('states');\n\n State::insert($states);\n }", "public function run()\n {\n app('db')->table('items')->insert([\n 'icon' => 1,\n 'points' => 0,\n 'money' => 500,\n 'currency' => 1,\n 'cost' => 0\n ]);\n }", "public function run()\n {\n DB::table('users')->updateOrInsert(\n [\n \t'email' => '[email protected]',\n 'name' => 'admin',\n 'password' => bcrypt('12345678'),\n ]);\n \tDB::table('users')->updateOrInsert(\n [\n \t'email' => '[email protected]',\n 'name' => 'Linh',\n 'password' => bcrypt('12345678'),\n ]);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;'); \n \tApp\\Role::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;'); \n App\\Role::create(\n \t[\n \t'slug' => 'admin',\n \t'name' => 'Administrator',\n \t]\n );\n\n App\\Role::create(\n \t[\n \t'slug' => 'user',\n \t'name' => 'Użytkownik',\n \t]\n );\n }", "public function run()\n {\n\n DB::beginTransaction();\n try {\n DB::table('users')->insert([\n [\n 'name' => 'test',\n 'email' => '[email protected]',\n 'password' => bcrypt('test')\n ],\n ]);\n } catch (\\Exception $ex) {\n DB::rollBack();\n throw $ex;\n }\n\n DB::commit();\n }", "public function migrate()\n {\n $this->syncRepository();\n $this->copyVariables();\n $this->copyDeployKeys();\n $this->reEnableBuilds();\n }", "public function change()\n {\n $table = $this->table('names');\n $table->addColumn('username', 'string', [\n 'limit' => 16,\n 'null' => false,\n ]);\n $table->addColumn('order_key', 'integer', [\n 'null' => false,\n ]);\n $table->addColumn('name', 'string', [\n 'limit' => 255,\n 'null' => false,\n ]);\n $table->addColumn('type', 'string', [\n 'limit' => 16,\n 'null' => false,\n ]);\n $table->addColumn('display', 'integer', [\n 'null' => false,\n ]);\n $table->addColumn('clipped', 'string', [\n 'limit' => 16,\n 'null' => true,\n ]);\n $table->create();\n\n $table->addForeignKey(\n 'username',\n 'users', 'username',\n [ 'update' => 'CASCADE', 'delete' => 'CASCADE' ]\n );\n $table->update();\n }", "public function change()\n {\n $table = $this->table('languages');\n $table->addColumn('is_rtl', 'boolean', [\n 'default' => false,\n 'null' => false,\n ]);\n $table->addColumn('trashed', 'datetime', [\n 'default' => null,\n 'null' => true,\n ]);\n $table->changeColumn('is_active', 'boolean', [\n 'default' => true,\n 'null' => false,\n ]);\n $table->renameColumn('short_code', 'code');\n $table->removeColumn('description');\n $table->update();\n }", "public function run()\n {\n DB::table('courses')->insert([\n 'author'=> 'Marcos',\n 'name'=> 'Laravel',\n 'description'=>('Curso muy entretenido'),\n 'price'=> 5000,\n ]);\n }", "public function run()\n {\n DB::table('tbluspl')->insert([\n 'tblplancdgo' => 3,\n 'tblusrocdgo' => 2,\n 'tblusplflag' => 'A',\n 'tblusplfech' => '2021-09-07'\n ]);\n }", "public function run()\n\t{\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0'); \n\t\t\\DB::table('roles')->truncate();\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n \n\t\t\\DB::table('roles')->insert(array (\n\t\t\t0 => \n\t\t\tarray (\n\t\t\t\t'id' => '1',\n\t\t\t\t'name' => 'Administrator',\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t\t1 => \n\t\t\tarray (\n\t\t\t\t'id' => '3',\n\t\t\t\t'name' => 'Member',\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '0000-00-00 00:00:00',\n\t\t\t),\n\t\t));\n\t}", "public static function migrate()\n {\n\n // If there is not a declaration that migrations have been run'd\n if( ! isset($GLOBALS['migrated_test_database']))\n {\n // Run migrations\n require path('sys').'cli/dependencies'.EXT;\n\n $which_db = \\Config::get('database.default');\n $database = \\Config::get('database.connections.'.$which_db);\n\n $migration_table = null;\n if($which_db == 'mysql')\n {\n $query = \"SELECT COUNT(*) AS count FROM information_schema.tables WHERE table_schema = ? AND table_name = ?\";\n $migration_table = \\DB::query($query, array($database['database'], $database['prefix'].'laravel_migrations'));\n }\n\n // if($which_db == 'sqlite')\n // {\n // //$migration = \"SELECT * FROM {$database['database']}.sqlite_master WHERE type='table'\";\n // //sqlite3_exec(budb, \"SELECT sql FROM sqlite_master WHERE sql NOT NULL\"\n // \\sqlite_open(\":memory:\", $database['database']);\n // $migration = \\sqlite_exec($database['database'], \"SELECT sql FROM sqlite_master WHERE sql NOT NULL\");\n // }\n\n if(isset($migration_table['0']->count) and $migration_table['0']->count == '0')\n {\n Command::run(array('migrate:install'));\n echo \"\\n\";\n Command::run(array('migrate'));\n }\n else\n {\n Command::run(array('migrate:reset'));\n echo \"\\n\";\n Command::run(array('migrate'));\n }\n\n\n //Insert basic data\n\n // Declare that migrations have been run'd\n $GLOBALS['migrated_test_database'] = true;\n }\n }", "public function change(): void\n {\n if(!$this->hasTable(\"playlist\")){\n\n $this->table(\"playlist\", [\"id\"=>\"id_playlist\"])\n ->addColumn(\"code_playlist\", \"string\", [\"limit\"=>30, \"null\"=>true, \"comment\"=>\"Code de la playlist\"])\n ->addColumn(\"lien_playlist\", \"string\", [\"limit\"=>225, \"null\"=>true, \"comment\"=>\"Lien de la playlist\"])\n ->addColumn(\"titre_playlist\", \"string\", [\"limit\"=>225, \"null\"=>true, \"comment\"=>\"titre de la playlist\"])\n ->addColumn(\"soustitre_playlist\", \"string\", [\"limit\"=>225, \"null\"=>true, \"comment\"=>\"Sous-titre de la playlist\"])\n ->addColumn(\"details_playlist\", \"text\", [\"limit\"=>MysqlAdapter::TEXT_MEDIUM, \"comment\"=>\"Détails de la playlist\"])\n ->addColumn(\"slug_playlist\", \"string\", [\"limit\"=>30, \"comment\"=>\"Slug de la playlist\"])\n\n ->addIndex(\"code_playlist\", [\"unique\"=>true, \"name\"=>\"indexPlaylist\"])\n\n ->create();\n }\n }", "public function __invoke()\n {\n $this->migrate();\n }", "public function change()\n {\n $table = $this->table('orders');\n $table->addColumn('user_id', 'integer', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('order_address', 'string', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('order_tel', 'string', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('order_name', 'string', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('order_email', 'string', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('credit_code', 'string', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('created_datetime', 'datetime', [\n 'default' => null,\n 'null' => false,\n\n ]);\n $table->addColumn('updated_datetime', 'datetime', [\n 'default' => CURRENT_TIMESTAMP,\n 'null' => false,\n\n ]);\n $table->addColumn('del_flg', 'string', [\n 'default' => 0,\n 'null' => false,\n\n ]);\n $table->addColumn('buy_status', 'string', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->create();\n }", "public function run()\n {\n DB::statement(\"ALTER TABLE pedidos AUTO_INCREMENT = 0;\");\n $pedido = \\App\\Pedido::create (['estado' => 'En preparación', 'fecha'=> new \\DateTime(),'usuario_id'=>'1','direccion'=>'calle siempre viva']);\n \n \\App\\Pedido::create (['estado' => 'En preparación', 'fecha'=>new \\DateTime(),'usuario_id'=>'1','direccion'=>'calle 2a']);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('books')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n DB::table('books')->insert([\n [\n 'user_id' => 1,\n 'title' => '週4時間だけ働く',\n 'author' => 'ティム・フェリス',\n 'company' => '幻冬社',\n 'image_url' => 'test_url',\n 'publication_year' => 2017,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Golfito',\n 'email' => '[email protected]',\n 'password' => bcrypt('Qaz11qaz'),\n ]);\n \n\t\t$this->command->info(\"Users table seeded :)\");\n }", "public function run()\n {\n DB::table('paralelo')->insert([\n 'nombre' => 'A',\n 'activo' => true,\n 'created_by' => 'admin',\n 'updated_by' => 'admin',\n ]);\n }", "public function run()\n {\n DB::table('authors')->insert([\n 'firstname'=> 'Herbert',\n 'lastname'=> 'Schildt'\n ]);\n DB::table('authors')->insert([\n 'firstname'=> 'Greg',\n 'lastname'=> 'Lim'\n ]);\n DB::table('authors')->insert([\n 'firstname'=> 'Luke',\n 'lastname'=> 'Welling'\n ]);\n DB::table('authors')->insert([\n 'firstname'=> 'Laura',\n 'lastname'=> 'Thomson'\n ]);\n }", "public function run()\n {\n $table = 'products';\n $data = [\n \t[\n \t\t'id' => 1,\n \t\t'name' => 'Garmin Edge 520',\n \t\t'targetprice' => '250',\n \t]\n ];\n DB::table($table)->insert($data);\n }", "public function run() {\n DB::table($this->tableName)->delete();\n $jo_parents = array(\n array('name' => 'Cemara Kreatif'),\n array('name' => 'MIM')\n ); \n DB::table($this->tableName)->insert($jo_parents);\n }", "public function run()\n {\n DB::table('courses')->insert([\n 'name' => 'Provisoire',\n 'price'=>100\n ]);\n\n DB::table('courses')->insert([\n 'name' => 'Driving license',\n 'price'=>140\n ]);\n }", "public function change()\n {\n //角色信息\n $table = $this->table('admin_role');\n $table->addColumn('rolename','string',['limit'=>20,'comment'=>'角色名'])\n ->addColumn('status','integer',['default'=>0,'comment'=>'状态'])\n ->addColumn('remark','string',['limit'=>30,'comment'=>'备注'])\n ->addColumn('create_by','integer',['comment'=>'创建者'])\n ->addTimestamps()\n ->addIndex('rolename',['unique'=>true])\n ->create();\n \n //管理员用户和角色对应表\n $table = $this->table('admin_user_role')\n ->addColumn('adminuser_id','integer',['comment'=>'管理员用户ID'])\n ->addColumn('role_id','integer',['comment'=>'角色id'])\n ->addTimestamps()\n ->create();\n }", "public function run()\n {\n DB::table('admin_user')->insert(array(\n \t'username' => 'admin',\n \t'password' => '123'\n ));\n\n DB::table('terms')->insert(array(\n 'terms' => null,\n ));\n }", "public function run()\n {\n DB::table('students')->insert([\n \t'first_name'=> 'Sarah'\n \t'last_name'=> 'Pangan'\n \t'program'=> 'BSIS'\n \t'Age'=> '19'\n \t]);\n }", "public function run()\n {\n DB::table('table')->insert([\n ['title' => 'MYSQL', 'sort'=>0],\n ['title'=>'Laravel', 'sort'=>0],\n ['title' => 'Yii', 'sort'=>0],\n ['title' => 'ThinkPHP', 'sort'=>0],\n ['title' => 'PHP7', 'sort'=>0],\n ['title' => 'nginx', 'sort'=>0],\n ['title' => 'redis', 'sort'=>0],\n ]);\n //\n }", "public function run()\n {\n DB::table('admins')->insert([\n<<<<<<< HEAD\n 'AdId'=>'A001',\n 'Fullname'=>'Lammia',\n 'Email'=>'[email protected]',\n 'Password'=>bcrypt('12345678')\n=======\n 'adid'=>'A001',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('12345678'),\n 'fullname'=>'Dat'\n>>>>>>> aaf2788ab06e36d4b1fbae2f150c9faa2cbe7b50\n ]);\n }", "public function run()\n {\n DB::table('artecles')->insert([\n 'title' => 'some title',\n 'content' => 'some content',\n ]);\n }", "public function run()\n {\n DB:: table('category')-> insert([\n 'name_category' => 'Tự sự',\n 'description' => 'viết theo cảm xúc',\n ]);\n }", "protected function seedDB()\n {\n $ans = $this->ask('Seed your database?: ', 'y');\n\n // Check if the answer is true\n if (preg_match('/^y/', $ans))\n {\n $this->call('db:seed');\n $this->comment('');\n $this->comment('Database successfully seeded.');\n $this->comment('=====================================');\n echo \"Your app is now ready!\";\n }\n }", "public function run()\n {\n DB::table('SET FOREIGN_KEY_CHECKS=0');\n //DB::table('users')->truncate();\n\n DB::table('users')->insert([\n [\n 'name'=>'john doe',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('secret')\n ],\n [\n 'name'=>'janedoe',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('secret')\n ],\n [\n 'name'=>'andihoerudin',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('secret')\n ]\n ]);\n\n }", "public function run()\n {\n \\DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n MasterDocument::truncate();\n \\DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n MasterDocument::create([ 'name' => 'MASTER B/L', 'display_name' => 'MB/L']);\n MasterDocument::create([ 'name' => 'HOUSE B/L', 'display_name' => 'HB/L']);\n MasterDocument::create([ 'name' => 'PART OF B/L', 'display_name' => 'PART OFF']);\n MasterDocument::create([ 'name' => 'PEB', 'display_name' => 'PEB']);\n MasterDocument::create([ 'name' => 'SPLIT B/L', 'display_name' => 'SPLIT']);\n MasterDocument::create([ 'name' => 'DELIVERY ORDER', 'display_name' => 'DO']);\n MasterDocument::create([ 'name' => 'CONTAINER AND SEAL', 'display_name' => 'CONTAINER']);\n }", "public function run()\n {\n DB::transaction(function () {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('admin_role')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n DB::table('admin_role')->insert([\n 'admin_id' => 1,\n 'role_id' => 1,\n ]);\n DB::table('admin_role')->insert([\n 'admin_id' => 2,\n 'role_id' => 2,\n ]);\n });\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0;');\n DB::table('personas')->truncate();\n DB::table('personas')->insert([\n 'id'=> 1,\n 'nombre' => 'Angel Serrano',\n 'fechanac' => '1995-12-10',\n 'genero' => 'Masculino',\n 'direccion' => 'Chalatenango',\n 'telefono'=> '78963652',\n 'email'=> '[email protected]',\n ]);\n }", "public function run()\n {\n\n DB::table('languages')->insert([\n 'languages' => 'French',\n\n ]);\n DB::table('languages')->insert([\n 'languages' => 'German',\n\n ]);\n DB::table('languages')->insert([\n\n 'languages' => 'Luxembourgish',\n ]);\n DB::table('languages')->insert([\n\n 'languages' => 'English',\n ]);\n }" ]
[ "0.6804121", "0.6752532", "0.67253137", "0.6673578", "0.66534156", "0.66308665", "0.6619019", "0.6599233", "0.6596829", "0.6577637", "0.6575207", "0.654772", "0.65433913", "0.65149957", "0.65132374", "0.6464267", "0.6440528", "0.6428927", "0.6424582", "0.64132035", "0.63951427", "0.6393769", "0.63836604", "0.6383486", "0.63744754", "0.63696724", "0.6359282", "0.6350401", "0.6345894", "0.633004", "0.63188523", "0.6305504", "0.6302657", "0.63015497", "0.62989277", "0.629634", "0.6291716", "0.6267485", "0.6254257", "0.62491", "0.6243269", "0.62382466", "0.62337273", "0.623302", "0.6232721", "0.623189", "0.62289906", "0.62268585", "0.62222016", "0.6221794", "0.6219882", "0.6219475", "0.62167287", "0.62156546", "0.6215556", "0.62154883", "0.62105393", "0.62062407", "0.62061584", "0.6203479", "0.6201328", "0.61969995", "0.6194099", "0.61902744", "0.61826754", "0.61809695", "0.61809224", "0.6176542", "0.6171657", "0.6169549", "0.6169434", "0.61680764", "0.6167638", "0.61673886", "0.61629933", "0.61612713", "0.6161135", "0.61602366", "0.6151862", "0.61506027", "0.61468405", "0.6144947", "0.6143317", "0.614171", "0.6141509", "0.6141127", "0.6135715", "0.61354035", "0.6134937", "0.6131938", "0.6131894", "0.6130798", "0.6130622", "0.6125284", "0.6125029", "0.6124405", "0.6121233", "0.6119672", "0.6118543", "0.6117348", "0.61170214" ]
0.0
-1
Revert the changes to the database.
public function down() { // nothing to do here. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function revert();", "function revert_table() {\r\n $this->_table = $this->_table_org;\r\n $this->_table_org = NULL;\r\n }", "function rollback() {\n\t\t\tself::$db->rollback();\n\t\t}", "protected function rollback()\n\t{\n\t\t$this->db->rollback();\n\t}", "public function rollback() {\n if (!$this->changed())\n return;\n\n $this->tags = array('new' => array(), 'del' => array());\n $this->inited = false;\n }", "abstract public function revert();", "public function revert(){\n\t}", "public function revert()\n {\n $model = $this->getModel();\n unset( $model->{$model->getCreatedAtColumn()} );\n unset( $model->{$model->getUpdatedAtColumn()} );\n if (method_exists($model, 'getDeletedAtColumn')) {\n unset( $model->{$model->getDeletedAtColumn()} );\n }\n $model->save();\n return $model;\n }", "public function revert()\n {\n $model = $this->getModel();\n unset( $model->{$model->getCreatedAtColumn()} );\n unset( $model->{$model->getUpdatedAtColumn()} );\n if (method_exists($model, 'getDeletedAtColumn')) {\n unset( $model->{$model->getDeletedAtColumn()} );\n }\n $model->save();\n return $model;\n }", "protected function rollback() {\n $this->objDbConn->rollBack();\n }", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function revert()\n {\n return tap($this->apply(), function ($versionedModel) {\n $versionedModel->versions()->after($this)->each->delete();\n\n $this->update(['reverted_at' => $this->freshTimestamp()]);\n });\n }", "public function restore()\n {\n //Query Builder\n DB::table('users')->delete();\n DB::table('respuestas')->delete();\n \n echo \"Realizado\";\n }", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function rollback()\n\t{\n\t\tforeach($this->subformArr as $key => $sf) $sf->rollback();\n\t}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function testRevert(): void\n {\n $this->model->apply();\n $this->model->revert(new DataObject());\n $this->assertEquals('', getenv('sample_fixture_three'));\n }", "public function rollback()\n{\n\t$this->query('ROLLBACK');\n}", "public function reset()\n {\n delete_option($this->dbVersionKey);\n }", "protected function rollbackToSavePoint(): void\n {\n foreach ($this->getActiveConnections() as $connection) {\n try {\n while ($connection->isTransactionActive()) {\n $connection->rollBack();\n }\n } catch (\\Exception $e) {\n }\n }\n }", "public function rollbackTransaction() {\r\n\t\t// TODO: Implement transaction stuff.\r\n\t\t//$this->query('ROLLBACK TRANSACTION');\r\n\t}", "public function rollback();", "public function rollback();", "public function rollback();", "public function rollback();", "public function rollbackTransaction()\n {\n mysqli_query($this->databaseLink,\"ROLLBACK;\");\n }", "public function rollback()\n {\n // my code\n $by = 'id';\n $order = 'desc';\n $eventMessages = CEventMessage::GetList($by, $order, ['TYPE' => self::EVENT_TYPE]);\n $eventMessage = new CEventMessage;\n while ($template = $eventMessages->Fetch()) {\n $eventMessage->Delete((int)$template['ID']);\n }\n CEventType::Delete(self::EVENT_TYPE);\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function rollback(){\n return $this->forge->table('users')->ifExists()->drop();\n }", "public function rollback(){\n $this->db->exec('ROLLBACK TO xyz;');\n }", "protected function _rollback() {\n $this->dataSource->rollback($this);\n }", "public function rollback()\n {\n if (self::$_transactionLevel == 1) {\n $this->getConnection()->rollBack();\n }\n \n if (self::$_transactionLevel > 0) {\n self::$_transactionLevel--;\n }\n }", "public function rollback()\n\t{\n\t}", "public function rollback()\n\t{\n\t}", "public function revertTable(Source $source, AbstractTable $table);", "function rollback(){\n\t\ttry {\n\t\t\t$this->dbconn->rollBack();\n\t\t}catch(Exception $e){\n\t\t\t$this->logger->error($e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function safeDown()\n {\n //return false;\n $this->dropTable($this->tablePost);\n $this->dropTable($this->tableUser);\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"{{rights}}\");\n\t\t}\n\t}", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function rollback()\n {\n }", "public function rollback()\n {\n }", "public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "public function rollBack(){\r\n $this->db->rollBack();\r\n }", "protected function rollBackTransaction()\n {\n $this->container->make('db')->rollBack();\n }", "function undo()\n {\n $this->document->eraseLast();\n }", "public function resetDatabase(): void\n {\n $this->exec('DELETE FROM fo_forms');\n $this->exec('ALTER TABLE fo_forms AUTO_INCREMENT=1000');\n }", "public function rollback() {\n\t\t$this->execute(\"ROLLBACK; SET autocommit = 1;\");\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function rollback() {\n parent::rollback();\n $this->activeTransaction = false;\n }", "public function rollbackTransaction() {\n\t\t//noop\n\t}", "public function safeDown()\n {\n $this->dropTable($this->tableName);\n }", "protected function resetDb()\n {\n if (is_readable(PHPUNIT_WEBROOT . '/app/database/bolt.db')) {\n unlink(PHPUNIT_WEBROOT . '/app/database/bolt.db');\n copy(PHPUNIT_ROOT . '/resources/db/bolt.db', PHPUNIT_WEBROOT . '/app/database/bolt.db');\n }\n }", "public function restored(Project $project)\n {\n //\n }", "public function rollBack()\n {\n $this->getActivePdo()->rollBack();\n }", "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "public function undoRestore ()\n {\n if (file_exists ( $this->_previewFilename ))\n {\n unlink($this->_previewFilename);\n }\n }", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "public function rollBack()\n {\n if ($this->transactions == 1) {\n $this->transactions = 0;\n\n $this->getPdo()->rollBack();\n } else {\n $this->transactions--;\n }\n }", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "public function down()\n {\n Schema::dropIfExists('records');\n }", "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "public function rollbackTransaction();", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function reset()\n {\n $this->getDb()->exec('delete from media');\n //pictures and vignettes deletion\n $this->deleteMedias();\n //backup deletion\n $this->deleteBackup();\n }", "private function resetDatabase()\n {\n $dumpFolder = APPLICATION_PATH . '/../data/dumps/';\n\n $directoryIterator = new DirectoryIterator($dumpFolder);\n /**\n * @var Zend_Db_Adapter_Abstract $db\n */\n $db = Zend_Registry::get('db');\n\n foreach ($directoryIterator as $file) {\n if (!$file->isDot()\n && $file->isFile()\n && $file->isReadable()\n ) {\n $sql = file_get_contents($file->getPathname());\n $db->query($sql);\n }\n }\n }", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}", "public function transactionRollback()\n\t{\n\t\treturn;\n\t}", "function rollback(): void;", "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "public function down()\n\t{\n\t\t$transaction=$this->getDbConnection()->beginTransaction();\n\t\ttry\n\t\t{\n\t\t\t$this->dropTable('products');\n\t\t\t$transaction->commit();\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\techo \"Exception: \".$e->getMessage().\"\\n\";\n\t\t\t$transaction->rollBack();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function restore(){\n $this->update(['deleted_by', NULL]);\n return $this->baseRestore();\n }", "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "protected function tearDown(): void\n {\n $this->dbClear();\n }", "public function safeDown()\n {\n $this->dropForeignKey(\n 'fk-production_prepare_order-order',\n 'production_prepare_order'\n );\n\n // drops index for column `order`\n $this->dropIndex(\n 'idx-production_prepare_order-order',\n 'production_prepare_order'\n );\n\n // drops foreign key for table `production_stage_prepare`\n $this->dropForeignKey(\n 'fk-production_prepare_order-stage',\n 'production_prepare_order'\n );\n\n // drops index for column `stage`\n $this->dropIndex(\n 'idx-production_prepare_order-stage',\n 'production_prepare_order'\n );\n\n $this->dropTable('production_prepare_order');\n }", "public function restored(Edit $edit)\n {\n //\n }", "public function cleanupDatabase() {\n\t\t\tif ( !$this->getTableExists() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$sQuery = \"\n\t\t\t\tDELETE from `%s`\n\t\t\t\tWHERE\n\t\t\t\t\t`day_id`\t\t\t!= '0'\n\t\t\t\t\tAND `created_at`\t< '%s'\n\t\t\t\";\n\t\t\t$sQuery = sprintf( $sQuery,\n\t\t\t\t$this->getTableName(),\n\t\t\t\t( $this->loadDP()->time() - 31*DAY_IN_SECONDS )\n\t\t\t);\n\t\t\t$this->loadDbProcessor()->doSql( $sQuery );\n\t\t}", "public function down()\n\t{\n\t\tSchema::dropIfExists('ProjectInspection');\n\t}", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function undo(Diff $diff);", "public function wipeAll() {\n\t\tforeach($this->getTables() as $t) {\n\t\t\tforeach($this->getKeys($t) as $k) {\n\t\t\t\t$this->adapter->exec(\"ALTER TABLE \\\"{$k['FKTABLE_NAME']}\\\" DROP FOREIGN KEY \\\"{$k['FK_NAME']}\\\"\");\n\t\t\t}\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t\tforeach($this->getTables() as $t) {\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t}", "abstract public function unloadDatabase();", "private function cleanDatabase()\n {\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach($this->tables as $table)\n {\n\n DB::table($table)->truncate();\n\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n\n }", "public function afterTearDown()\n {\n $this->schema()->dropIfExists('users');\n $this->schema()->dropIfExists('friends');\n $this->schema()->dropIfExists('posts');\n $this->schema()->dropIfExists('comments');\n $this->schema()->dropIfExists('photos');\n $this->schema()->dropIfExists('invalid_kids');\n $this->schema()->dropIfExists('profiles');\n }", "public function rollbackTransaction(): void;", "public function reverse(): void\n {\n $ranks = $this->ranks;\n\n $this->commit(array_values(collect($ranks)->reverse()->all()));\n }", "public function rollback()\n {\n $this->current = [];\n $this->remove = [];\n return $this;\n }", "public function down() {\n\n\t\t$query = 'DROP TABLE sites;';\n\n\t\ttry {\n\t\t\tself::$pdo->exec( $query );\n\t\t} catch ( PDOException $exception ) {\n\t\t\tEE::error( 'Encountered Error while dropping table: ' . $exception->getMessage(), false );\n\t\t}\n\t}", "public function clearDb ()\n {\n // Empty tables and reset auto-increment values\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 0');\n foreach (self::$dbTables as $table) {\n $stmt = $this->_dbh->prepare('TRUNCATE `' . $table . '`');\n $stmt->execute();\n $stmt = $this->_dbh->prepare('ALTER TABLE `' . $table . '` AUTO_INCREMENT = 1');\n $stmt->execute();\n }\n // Re-enable checks only if set as such in config\n $config = parse_ini_file('config/AcToBs.ini', true);\n if (isset($config['checks']['fk_constraints']) && $config['checks']['fk_constraints'] == 1) {\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 1');\n }\n // Delete denormalized tables\n foreach (self::$dbDenormalizedTables as $table) {\n $stmt = $this->_dbh->prepare('DROP TABLE IF EXISTS `' . $table . '`');\n $stmt->execute();\n }\n // Delete non-standard taxonomic ranks\n $stmt = $this->_dbh->prepare(\n 'DELETE FROM `taxonomic_rank` WHERE `standard` = ?');\n $stmt->execute(array(\n 0\n ));\n unset($stmt);\n }", "public function down()\n\t{\n\t\tDB::table('dispositions')->delete();\n\t}", "public function backUp()\n {\n $inventory = $this->inventory;\n $this->oldInventory = $inventory;\n return;\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public function down()\n {\n //add your migration here \n }", "public function rollback(): void\n {\n $ret = $this->mysqli->rollback();\n if (!$ret) $this->mySqlError('mysqli::rollback');\n }", "protected function tearDown() {\r\n\t\t$this->dropDatabase();\r\n\t\tunset ( $this->cacheDatabaseEntryRepository );\r\n\t\t\r\n\t}", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }" ]
[ "0.7292081", "0.71497995", "0.7059885", "0.6909689", "0.6856882", "0.6805857", "0.67922175", "0.67557395", "0.67557395", "0.65832794", "0.65734553", "0.6336209", "0.62988555", "0.6282911", "0.62360376", "0.6209886", "0.619224", "0.6180292", "0.6160064", "0.6139101", "0.6118888", "0.6117792", "0.6117792", "0.6117792", "0.6117792", "0.61160964", "0.60941815", "0.60928744", "0.60890484", "0.6071932", "0.6071104", "0.6066129", "0.6063862", "0.6063862", "0.6054491", "0.6049777", "0.60294557", "0.6021788", "0.6019176", "0.60183495", "0.60183495", "0.6015872", "0.6013526", "0.6006622", "0.60054153", "0.6005161", "0.6004645", "0.6004373", "0.6004373", "0.6004373", "0.5984222", "0.5943398", "0.5925681", "0.5919163", "0.5918611", "0.5901923", "0.5893965", "0.5889705", "0.5887693", "0.58827955", "0.58764946", "0.5855949", "0.585282", "0.5851152", "0.58445597", "0.584357", "0.58400315", "0.58383965", "0.5829649", "0.5825304", "0.5806368", "0.5801185", "0.579873", "0.57958454", "0.5792813", "0.5779404", "0.5772285", "0.57671595", "0.5765607", "0.57589066", "0.5757892", "0.5752394", "0.57495576", "0.5730796", "0.5728246", "0.5727236", "0.57261324", "0.57223666", "0.5712839", "0.5710401", "0.5710063", "0.5708738", "0.56999886", "0.56975424", "0.5692332", "0.56872416", "0.56864744", "0.5683316", "0.56705296", "0.5669872", "0.56599957" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82678324", "0.8173564", "0.78118384", "0.7706353", "0.76816905", "0.7659159", "0.74858105", "0.7406485", "0.7298472", "0.7253435", "0.7196091", "0.7174443", "0.7016074", "0.6989523", "0.69837826", "0.69728553", "0.69640046", "0.69357765", "0.6897687", "0.689282", "0.68775725", "0.6868809", "0.68633306", "0.6839021", "0.6779905", "0.6705274", "0.6670987", "0.66623807", "0.6652613", "0.6643801", "0.6616729", "0.66143125", "0.65891534", "0.6449129", "0.64461046", "0.6429425", "0.6426337", "0.63015336", "0.6298573", "0.6294075", "0.62801653", "0.6259914", "0.62554234", "0.6167662", "0.61630553", "0.61601174", "0.6141946", "0.6137726", "0.6134302", "0.6133732", "0.61287725", "0.6110795", "0.60950965", "0.6089703", "0.60768735", "0.6066286", "0.60595477", "0.6055387", "0.60451794", "0.6028352", "0.60246956", "0.60228956", "0.6019088", "0.6012698", "0.6011448", "0.60113615", "0.60076576", "0.6004189", "0.5998927", "0.5997798", "0.5993557", "0.59863526", "0.59863526", "0.59863526", "0.59706056", "0.59546155", "0.59493065", "0.5940633", "0.59251904", "0.59143347", "0.5913916", "0.59121555", "0.59111917", "0.5909761", "0.59026676", "0.59009403", "0.5899209", "0.58973104", "0.58964044", "0.58933777", "0.5888429", "0.58760023", "0.5869122", "0.5863149", "0.58622074", "0.5849116", "0.5838678", "0.5831741", "0.5824525", "0.58167094", "0.58122987" ]
0.0
-1
Show the application dashboard.
protected function store() { $request = Input::all(); Proyect::create([ 'nombre' => Input::get('nombre_proyecto'), 'fecha_inicio' => Input::get('fecha_inicio'), 'fecha_fin' => Input::get('fecha_fin'), 'id_responsable' => Input::get('idCreator'), ]); $proyect = Proyect::where('nombre', Input::get('nombre_proyecto'))->first(); //Busco el id del proceso $idProceso = RequestController::getProcessId(); //Aca se instanciaria el proceso $idCase = RequestController::instantiateProcess($idProceso); //Aca buscamos el user $idUser = RequestController::getUserId(); //Buscamos la primer tarea $idTask = RequestController::getTask($idCase); RequestController::assignTask($idTask, $idUser); //Guardo en el proyecto el caseId y el tasdkId actual $proyect->update(array('id_case'=>$idCase, 'id_task' => $idTask)); return Redirect::to('addProtocols/'.$proyect->id) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
public function __construct(){ parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }", "public function index()\n\t{\n\t\t//Default view\n\t\t$this->load->view('index.html');\n\t}", "function index() {\n\n // This page cannot be accessed without providing a page\n // the routes.php file will not allow the page to be accessed\n // $route['pages/(:any)'] = 'pages/view/$';\n redirect('/', 'refresh');\n\n }", "public function Index()\n\t{\n\t\t$this->views->SetTitle('Index Controller');\n\t\t$this->views->AddView('index/index.tpl.php', array(),'primary');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('default/index');\n\t}", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n\t{\t\n\n\t\t$this->load->view('welcome_message');\n\t}", "public function indexAction()\n {\n $arr = [\n 'title' => 'Welcome',\n 'data' => [\n 'name' => 'PHP FRAMEWORK',\n ]\n ];\n View::renderTemplate('Welcome/index.html', $arr);\n }", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n }", "public function show_index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function Index()\n {\n $this->standardView('Index');\n }", "public function index()\n {\n return view('main.welcome');\n }", "public function index()\n {\n // return view('welcome');\n }", "public function index()\n {\n $this->load->view('index');\n }", "public function index()\n {\n // return view('welcome');\n \n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}", "public function index() {\n \n return view('welcome');\n }", "public function index()\n {\n return view('pages.welcome');\n }", "public function Index()\n {\n \treturn view(\"index\");\n\t}", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n\t\t/*$this->layout->setTitle('Welcome to our Blog');\n\t\t$this->layout->showView('welcome/about.php');*/\n\t\techo 'hello I\\'m using codeigniter';\n }", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function index()\n {\n return \"INDEX PAGE\";\n }", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n {\n SEOMeta::setTitle('Trusted Mortgage & Remortgage Solutions In UK - SmartMortgages UK');\n SEOMeta::setDescription('Home Page Description: For competitive mortgage and remortgage quotes around the UK at affordable rates, speak to one of our expert credit consultants and get a mortgage. For more visit us today.');\n\n return view('welcome');\n }", "function index() {\n \n parent::index();\n\n\t\t$data['user_id'] = $this->tank_auth->get_user_id();\n\t\t$data['username'] = $this->tank_auth->get_username();\n\t\t$data['main_content_view'] = $this->load->view('welcome', $data, true);\n $this->render_template($data);\n\t}", "public function index()\n\t{\n\t\t$this->title = 'My Index Action';\n\n\t\treturn new View('basic/index');\n\t}", "public function index()\n\t{\n\t\t$data['title'] = 'Home | Welcome to AEY';\n\t\t$data ['view_page'] = 'homepage';\n\n\t\t$this->load->view('site', $data);\n\t}", "public function index()\n {\n\n return view('welcome');\n\n }", "public function actionIndex(){ \n $this->view(\"index.php\");\n }", "public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }", "public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "public function index()\n {\n return view('front.welcome');\n }", "public function index()\n\t{\n\t\treturn $this->traces();\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}", "public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}", "public function Index() {\n $this->Display();\n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n {\n $title = 'Welcome Page';\n return view($this->view . '.home', compact('title'));\n }", "public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}", "public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }", "public function index()\n {\n return view(\"home\");\n }", "public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}", "function index() {\n $this->renderView(\"index\");\n }", "public function index()\n\t{\n\t\treturn view('index');\n\t}", "function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n\n\n\n return view('welcome');\n }", "public function index() {\n\t\t$page = Page::getInstance();\n\t\t$session = Session::getInstance();\n\t\t$page->setPageTitle('Method index notfound');\n\t\t$session->setFlash('Chaque controller doit avoir une m&eacute;thode index', 'error');\n\t}", "public function index()\r\n\t{\r\n\t\t//\r\n\t}", "public function index() {\n\t\t// render the view (/view/main/index.php)\n\t\t$this->view->render(\"main\", \"index\");\n\t}", "public function index()\n {\n return View(\"pages.home\");\n }", "public function index()\n {\n // Nothing to do\n }", "public function index(){\n return view('welcome');\n }", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}" ]
[ "0.76543593", "0.7412489", "0.7393922", "0.7316217", "0.7226221", "0.7226221", "0.7189358", "0.71651", "0.71512204", "0.7145325", "0.7106802", "0.7077021", "0.7072975", "0.703941", "0.7028629", "0.7028629", "0.7028629", "0.7028629", "0.7028629", "0.69722307", "0.6966803", "0.69452494", "0.69452494", "0.69452494", "0.69452494", "0.69452494", "0.69452494", "0.69452494", "0.69452494", "0.69452494", "0.69452494", "0.69452494", "0.69452494", "0.69452494", "0.693107", "0.69245565", "0.6909901", "0.68998027", "0.6892576", "0.68740803", "0.68565416", "0.6855145", "0.683773", "0.68022716", "0.6800359", "0.6800359", "0.6794209", "0.67897797", "0.67659456", "0.67659456", "0.67659456", "0.67659456", "0.67659456", "0.67659456", "0.67659456", "0.67659456", "0.67659456", "0.67659456", "0.67659456", "0.6765027", "0.67634773", "0.6760288", "0.6760288", "0.6750254", "0.67495555", "0.6747185", "0.67420214", "0.67368466", "0.6728712", "0.67160106", "0.67131877", "0.6710025", "0.6702819", "0.6699272", "0.669198", "0.66738397", "0.6661707", "0.66598487", "0.6649814", "0.66293937", "0.6620512", "0.6612323", "0.66034615", "0.65971315", "0.6593515", "0.65926033", "0.65847445", "0.65752965", "0.6574937", "0.65720546", "0.6552447", "0.6545939", "0.65440756", "0.654389", "0.65420467", "0.65403897", "0.65157557", "0.6514529", "0.6514529", "0.6514529", "0.6514529" ]
0.0
-1
$method contains the second segment of your URI
function _remap( $method ) { switch( $method ) { case 'index': $this->index(); break; case 'price': $this->price(); break; case 'why-sms': $this->why_sms(); break; case 'long-code': $this->long_code(); break; case 'other-services': $this->other_services(); break; case 'about': $this->about(); break; case 'successful': $this->display_successful_message(); break; default: $this->page_not_found(); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_method() {\n $parts = explode('/', $this->request_uri);\n if (count($parts) > 3) {\n return $parts[3];\n }\n return 'index';\n }", "abstract protected function getMethodUrl(): string;", "static function method(): string\n\t{\n\t\treturn $_SERVER['REQUEST_METHOD'];\n\t}", "private function veriFyMethodOnUrl()\n {\n if ($this->urlParameters && array_key_exists(1, $this->urlParameters)) {\n $this->method = $this->urlParameters[1];\n $nameAndAliases = $this->urlParameters;\n array_shift($nameAndAliases);\n $nameAndAliases = implode('/', $nameAndAliases);\n $this->methodNameAliases = $nameAndAliases;\n }\n }", "private static function get_method(){\n\t\t\tif(!self::$method)\n\t\t\t\tself::$method = $_SERVER['REQUEST_METHOD'];\n\t\t\t\t\n\t\t\treturn strtolower(self::$method);\n\t\t}", "public function getRequestMethod(): string;", "public static function method(){\n \n return self::$request->getMethod(); \n }", "public static function method()\n\t{\n\t\treturn $_SERVER['REQUEST_METHOD'];\n\t}", "public function method(){\n return $this->getServerVar('REQUEST_METHOD');\n }", "function _getRequestMethod(){\n return $_SERVER['REQUEST_METHOD'];\n }", "public static function method()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "public static function method()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "public function findMatch(\\string $uri, \\string $method);", "protected function getMethod(): string\n {\n return $this->getTwoStep() ? 'rest/registerPreAuth.do' : 'rest/register.do';\n }", "private static function getMethodRequest(){\n return $_SERVER[\"REQUEST_METHOD\"];\n }", "public static function method(): string\n\t{\n\t\treturn strtoupper(Server::get('REQUEST_METHOD'));\n\t}", "public function getMethod();", "public function getMethod();", "public function getMethod();", "public function getMethod();", "public function getMethod();", "public function getMethod();", "public function getMethod();", "function getMethod()\r\n {\r\n }", "public function getMethod()\n {\n return Http::GET;\n }", "public function getMethod(): string;", "public function getMethod(): string;", "public function getMethod(): string;", "public function getMethod(): string;", "public function getMethod(): string;", "public function getMethod(): string;", "public function getMethod(): string {}", "public function getMethod()\t{\n\t\tif ($this->class != \"NoRoute\")\t{\n\t\t\treturn $this->method;\n\t\t}\n\t\treturn \"invoke\";\n\t}", "public function getMethod() {\n\t\tif (isset($_GET[$this->config->get('methodParam')]))\n\t\t\t$method = urldecode($_GET[$this->config->get('methodParam')]);\n\t\telse\n\t\t\t$method = $this->config->get('defaultMethod');\n\t\t\n\t\treturn strtolower($method);\n\t}", "public function getMethod(){\n return $this->method;\n }", "public function fetch_method()\n\t{\n\t\t$method = $this->route_stack[self::SEG_METHOD];\n\t\treturn ($method === $this->fetch_class()) ? 'index' : $method;\n\t}", "#[Pure]\nfunction http_request_method_name($method) {}", "public function getMethod()\n {\n return 'GET';\n }", "public function getMethod() : string;", "public function getMethod() :string;", "public function getMethod() { return $this->_method; }", "public static function getMethod()\n {\n return ! empty(self::getInstance()->urlParams[self::PARAM_METHOD]) ? self::getInstance()->urlParams[self::PARAM_METHOD] : self::DEFAULT_CONTROLLER_ACTION;\n }", "public function getMethod()\r\n {\r\n if (isset($this->server['REQUEST_METHOD'])) {\r\n return strtoupper($this->server['REQUEST_METHOD']);\r\n }\r\n\r\n return 'GET';\r\n }", "public function resolveMethod()\n {\n $value = $this->_value( @$_SERVER['REQUEST_METHOD'], '' );\n $value = $this->_value( @$_SERVER['HTTP_X_HTTP_METHOD'], $value );\n $this->method = strtolower( trim( $value ) );\n }", "public function requestMethod(){\n return strtolower($_SERVER['REQUEST_METHOD']);\n }", "public function getHttpMethod();", "public function getMethod()\n {\n return $this->method ?: 'GET';\n }", "public function route(string $requestUri, string $requestMethod);", "public function getMethod() {}", "public function getMethod() {}", "public function getMethod() {}", "public function getMethod() {}", "public function method(): string{\n return $this->_method;\n }", "public function getMethod ()\n {\n return $this->method;\n }", "public function getMethod()\n {\n return $this->getParam('server/REQUEST_METHOD');\n }", "public function getMethod()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "public static function getMethod()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "public static function method()\n\t{\n\t\treturn self::$router->getAction();\n\t}", "public function getRequestMethod()\n\t{\n\t\t$method = $this->server->get('REQUEST_METHOD');\n\t\tif(in_array(strtoupper($method),$this->methods))\n\t\t{\n\t\t\treturn $method;\n\t\t}\n\t\treturn ;\n\t}", "public function method() {\n return $this->method;\n }", "public function method(): string\n {\n return $this->request->getMethod();\n }", "public function method(): string\n {\n return $this->request->getMethod();\n }", "public function method(): string\n {\n return $this->request->getMethod();\n }", "public function get_method() {\n\t\treturn $this->method;\n\t}", "public function getMethod()\n {\n return $this->method;\n }", "protected function getVerb($method)\n {\n switch ($method) {\n case 'index':\n case 'create':\n case 'show':\n case 'edit':\n return 'get';\n\n case 'store':\n return 'post';\n\n case 'update':\n return 'put';\n\n case 'destroy':\n return 'delete';\n }\n }", "function route_method(): string\n{\n return RouteController::getCurrentRoute()['method'] ?? '';\n}", "public function method()\n {\n return 'GET'; // /categories\n }", "public function get_method();", "public function get_method()\n {\n }", "public function getMethod()\n {\n return QueryInterface::GET;\n }", "public function getEndpointUri($method) {\n\t\treturn 'http://' . $this->_makeDomain($this->_domain)\n\t\t\t. self::API_PATH\n\t\t\t. self::$_methods[$method];\n\t}", "public static function getMethodBase($methodName) {\r\n \r\n BaseController::PARTIAL;\r\n BaseController::ACTION;\r\n}", "public function method(): string\n {\n return \\strtoupper($this->request()->getMethod());\n }", "public static function getRequestMethod(){\n return $_SERVER['REQUEST_METHOD'];\n }", "public function getMethod() \n {\n return $this->method;\n }", "protected function getMethod(): string\n {\n return 'rest/getBindingsByCardOrId.do';\n }", "private function getApiUri($method): string\n {\n $endpoint = $this->isTestnet ? $this->apiEndpointTest : $this->apiEndpoint;\n return $endpoint . '/' . $method;\n }", "public function getMethod()\r\n {\r\n return $this->method;\r\n }", "public function method() {\n return $this->method;\n }", "public function get_normalized_http_method() {\n\t\treturn strtoupper( $_SERVER['REQUEST_METHOD'] );\n\t}", "public function getMethod()\n {\n return strtoupper($this->server['REQUEST_METHOD']);\n }", "function getMethod()\n {\n return $this->method;\n }", "public function method(): string\n {\n return $this->method;\n }", "function request_method() {\n return strtolower($_SERVER['REQUEST_METHOD']);\n}", "public function getMethod()\n {\n return $this->values[\"method\"];\n }", "function current_route_method()\n {\n return RouteController::getCurrentRoute()['method'] ?? '';\n }", "public function getMethod()\n {\n if (isset($_POST[$this->methodParam])) {\n return strtoupper($_POST[$this->methodParam]);\n } elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n return strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);\n } else {\n return isset($_SERVER['REQUEST_METHOD']) ? strtoupper($_SERVER['REQUEST_METHOD']) : 'GET';\n }\n }", "public function requestMethod($method = '') {\n\t\tif(isset($_SERVER['REQUEST_METHOD'])) {\n\t\t\t$m = strtoupper($_SERVER['REQUEST_METHOD']);\n\t\t\t$requestMethod = isset($this->requestMethods[$m]) ? $this->requestMethods[$m] : '';\n\t\t} else {\n\t\t\t$requestMethod = '';\n\t\t}\n\t\tif($method) return strtoupper($method) === $requestMethod;\n\t\treturn $requestMethod; \n\t}", "public function method()\n {\n return $this->method;\n }", "public function method()\n {\n return $this->method;\n }", "public function method()\n {\n return $this->method;\n }", "function http_request_method_register($method) {}", "public function getMethod()\n {\n }", "public function getMethod(): string\n {\n return $this->method;\n }", "public function getMethod(): string\n {\n return $this->method;\n }", "public function method(){\n return $this->__method;\n }", "private function requestMethod() \n {\n // Take the method as found in $_SERVER\n $method = $_SERVER['REQUEST_METHOD'];\n\n if ($_SERVER['REQUEST_METHOD'] == 'HEAD') {\n ob_start();\n $method = 'GET';\n } // If it's a POST request, check for a method override header\n elseif ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $headers = $this->requestHeaders();\n if (isset($headers['X-HTTP-Method-Override']) && in_array($headers['X-HTTP-Method-Override'], array('PUT', 'DELETE', 'PATCH'))) {\n $method = $headers['X-HTTP-Method-Override'];\n }\n }\n return $method;\n }", "protected function getHttpMethod()\n {\n return 'GET';\n }", "public function setMethod($request_method) {}", "public function GetMethod () {\n\t\treturn $this->method;\n\t}" ]
[ "0.7757784", "0.7044713", "0.69993806", "0.6950676", "0.69425595", "0.69022083", "0.68499595", "0.6751434", "0.67512506", "0.673701", "0.6710632", "0.6710632", "0.67083174", "0.66991824", "0.66866857", "0.66839993", "0.6681608", "0.6681608", "0.6681608", "0.6681608", "0.6681608", "0.6681608", "0.6681608", "0.6660021", "0.6655357", "0.66538393", "0.66538393", "0.66538393", "0.66538393", "0.66538393", "0.66538393", "0.66408545", "0.6627183", "0.6622155", "0.6580287", "0.656632", "0.65640026", "0.6562431", "0.6552938", "0.6542953", "0.65283084", "0.6524852", "0.6518087", "0.6517677", "0.6517583", "0.6498684", "0.64921385", "0.64773655", "0.6470819", "0.6470819", "0.6470819", "0.6470819", "0.6458944", "0.64513296", "0.64513195", "0.6424663", "0.6420628", "0.6396001", "0.63875216", "0.6374329", "0.6367621", "0.6367621", "0.6367621", "0.6356378", "0.635566", "0.633952", "0.6334218", "0.6331555", "0.6325839", "0.63253593", "0.6311881", "0.6310959", "0.6307594", "0.63040125", "0.63005596", "0.63001144", "0.62985045", "0.6290603", "0.62890565", "0.62800604", "0.62784183", "0.62691194", "0.6264776", "0.62637985", "0.6255748", "0.62553227", "0.62492025", "0.6248751", "0.6246231", "0.6238884", "0.6238884", "0.6238884", "0.6238393", "0.6238357", "0.62352914", "0.62352914", "0.6229731", "0.62276363", "0.62274534", "0.6220534", "0.6218086" ]
0.0
-1